« first day (1605 days earlier)      last day (3340 days later) » 

2:17 AM
cabbage
 
2:35 AM
hi there. I'm having trouble with Django/inserting string values without the quotation marks. In my table, the field type is varchar, and i have another table with the same field which inserted all the values without quotes. Is there a way to remove the single or double quotes from the values I insert? thank you
 
have you tried asking a question
 
i will be now, thank :(
 
2:50 AM
my older questions make me want to hide under a rock :(
 
haha, some of mine too. I'm getting better, but it's slow going. I'm guessing this is something dumb with escaping: stackoverflow.com/questions/28934557/…
 
are you making something to trade stocks? @tandy
or display them?
 
@zachgates -- yeah, it's pulling a bunch of stocks in, calculating their current trades/etc, and storing historicals.
 
I can show you how I do it in strict Python code, if you like
 
it also has a news-agg component to it, which is pretty cool.
 
3:02 AM
ah cool
 
sure sure, now distracted with some video games :)
 
off-topic
here's what I would use @tandy pastebin.com/Qfpjxne9
Trader('AAPL')
 
@zachgates -- interesting approach. thanks for sharing.
 
4:58 AM
"...the rules by which they do that are complicated and unmemorable..." Now such statements make you feel so safe when programming... — Johan Dec 9 '11 at 16:24
 
lol
@thefourtheye sees all, Thank you. May the iteration always be in your favor. I am always amazed by the kindness and respect that occurs on this site. With great sincerity. — Mark Jaramillo 7 mins ago
Awww... Nice thing to hear about us, in the morning :-)
 
 
2 hours later…
6:38 AM
cbg
 
7:14 AM
Hey up
 
cbg
TypoError :expected a character buffer object at w.write(myvar) — Tania 1 min ago
^^^ oh the irony...
 
user559633
cbg
 
ok, 70 rep in , 0 in
cbg
@JonClements maybe should vote to close that as offtopic: needs minimal example
 
huh?
 
the typoerror question
it is obvious that the question is wrong
use with open.. and change the type of var to string. — Avinash Raj 1 min ago
not useful to solve a problem with minimal context
 
7:25 AM
@Ffisegydd I'm almost convinced that is the right answer, but I'm still getting a weird behavior: The cursor never changes when dragging...
 
0
Q: fastest way to check if a key exist in shelve

Jack Jianpeng ChengI have used python shelve library to pre-store a list of key-vector pairs. There are 3 million entries in total, which takes 6 GB memory storage. On a separate training file, I need to check for every record if it is a key in the shelve dictionary. This renders my program extremely slow to run. ...

oh my :D
943 @ python
seems I might get mjölnir sooner than 20k
 
user559633
haha awesome, 6gb shelve
 
Love this song, but don't know why :'(
@61612 Oops, sorry I didn't mean to top your message...
 
Naah, that's fine
 
7:31 AM
:)
 
it's that "wimmowebbo" song :D
 
Yup, that's amazing... Since the morning, its playing in a loop :)
 
And the way these guys have sung is totally awesome. I like this one better than the one in the movie.
 
7:37 AM
I tried this w.write(str(myvar)) Now it works like a charm — Tania 12 mins ago
omg
so useless question: "how do I write csv to a file"
and the accepted answer is w.write(str(myvar))
 
When the data is in a complicated structure, like this, you should fix the source :( — thefourtheye 3 mins ago
 
why are we so harsh on these questions, but those offtopics that are less useful to anyone at all we keep? :D
(and cvd) ;)
 
@thefourtheye also that question you duped... I was suspecting the OP was going to come back with something like:
thank your answer,but note: eg: the key is serverSeconds that haven't quotes both sides.thisis JSONDecodeError: Expecting property name enclosed in double quotes, but how to solve — karis ankedy 11 mins ago
 
That data is not JSON. Preferably make the server produce proper JSON or try parsing it with a YAML parserAntti Haapala 2 mins ago
but actually that could be parsed with yaml
 
7:44 AM
You want me to reopen? But I still feel that its a bad question
 
no
not until op edits it :D
 
user559633
whenever i start working with images in python, i miss accessing things by reference :/
 
you are accessing things by reference
 
user559633
i just want to use globals without the shame of typing globals, is that too much to ask? ;___;
 
user559633
sure, but i mean for things out of scope of a function
 
7:46 AM
just... dont :d
 
@AnttiHaapala I find it very difficult to help people like this. They don't know what they have, don't know what they want, but they want us to get the job done... Sighs
 
user559633
@AnttiHaapala :[ but i know what i'm doooing
 
I feel bad when a pylady asks for me to remove a downvote for a very badly researched question
 
user559633
@61612 when i see stuff like that, it makes me want to troll in response
 
7:47 AM
maybe I should use positive gender discrimination :D
 
user559633
@AnttiHaapala why? asking to remove a downvote? lol
 
user559633
@AnttiHaapala treating someone with more respect or putting on kid gloves because gender is discrimination
 
Hi @AnttiHaapala. I added what I tried in my question. Can you please remove the downvote? :) Thank you — Tania 18 mins ago
and the accepted answer shows that myvar is something that is not quite a string or something :D
now she got an upvote: "this question shows research effort, it is useful and clear"
 
user559633
call the press
 
user559633
anyway
 
user559633
7:58 AM
oh opencv for python, you crazy diamond
 
user559633
for a read image, image.shape returns y,x of an image.
 
user559633
resize handles in order of x,y
 
user559633
7:59 AM
i'm pretty sure i'll find a function that is x,z,y ordered
 
user559633
cbg bobby
 
cbg all!
 
More and more people here are calling me Bob. I like it.
 
user559633
bobbert
 
user559633
7:59 AM
cbg @pepoluan
 
user559633
i'm torn on crap questions that get interesting answers
 
That...is also something one person calls me :)
 
user559633
i wish there was an approved path of "the question was unintentionally useful, here's is its new contents"
 
I'm reading this answer: http://stackoverflow.com/a/26366422/149900
I wonder if there's a reason for using `def sync():` there instead of `sync = libc.sync`?
 
Now I think about it, I have quite a few different names I get called. Thankfully for my minimal self esteem, they're generally affectionate
 
user559633
8:01 AM
yeah, i genuinely am glad that you're a regular here @RobertGrant, so take that for what you will because i'm a superjerk weather pattern
 
Haha thanks
 
user559633
@pepoluan he could have also done sync = libc.sync. i probably would have done this
 
user559633
in either case, calls to sync() end up at libc.sync()
 
None of that stuff bothers me; I get it. I'm probably less like that now than I used to be, for the sake of the many people I know who don't get it, but I'm totally fine with it, as it's exactly how I am :)
 
yup, exactly. Oh well, I'll just implement it as sync = libc.sync then.
Thanks!
 
user559633
8:04 AM
no problem
 
Especially when you agreed with me about that Django thread. You can say anything after that.
 
user559633
@RobertGrant i don't understand what you mean and i forgot what we were talking about with django :)
 
user559633
oh, it doesn't bother you that i'm a jerk, haha
 
Well, I wouldn't phrase it like that :) It's not jerkiness to me.
I saw a cool article on making Javascript libraries when I couldn't sleep on Saturday night. Not exactly room-relevant, but here you go anyway: code.tutsplus.com/tutorials/…
 
user559633
neat. i'm hoping that it helps me sleep (it's 4a here)
 
8:07 AM
@pepoluan how about "sync('foo', 'bar')"
 
Ah, yeah that was about the time I finished the article and started looking at an hour-long Paul Irish video on jQuery internals
 
user559633
sync('kitchen')
 
There's a pretty high-paying Python job on reed.co.uk in London, if anyone wants the link :)
I almost applied, but then remembered that if I got the job I'd ruin the company because my Python is terrible
 
user559633
def sync(): libc.sync() instantiates a new object. sync = libc.sync() only adds a new reference. the latter is better because performance.
 
user559633
"Python is terrible"
 
user559633
8:08 AM
I agree
 
Oh flip I accidentally matched a Room Subversion Regex
So, yeah. If I'd done Python instead of Java for the last 10 years I'd now be applying for a 100k+ GBP job in London
As it is I'm doing enterprise development in South Africa
Don't be like me, kids
 
@RobertGrant though with 100k+ GBP job in london, you spend 99K for living in london...
and you'd still be living in ... london :D
 
Look, that is true :)
I got headhunted for a job in Cheltenham that's also really well paying (though not like that London job), but then I'd be in Cheltenham working for a consultancy
Rather be in London than Cheltenham
Trying to afford the rent on a 1 bedroom flat
 
I'd rather live in south africa
 
Wow, okay :) Why?
 
8:12 AM
100k job in London? Why would I want to take a pay cut <g> :p
 
@JonClements damn you and your brain
 
looks are deceiving - I may appear to have a massive head and eyes the size of blue apples, but really, my brain, alas, is barely the size of a pea :(
 
Here's that job, just in case: reed.co.uk/jobs/…
 
@61612 deleted
 
8:16 AM
Good
 
And if anyone gets it, please give me money or cool projects I can use to bump my CV and become cool like you :)
 
@JonClements you need subcontractors? :D
 
or a time machine so I can fit more work in per day :p
cbg @IanClark!
 
user559633
"Our client is seeking a very special technologist and leader to join them as a CTO. Someone who wishes to remain hands-on writing code in a mixed Python / JavaScript environment" avoid
 
I'd do it for free room and board and job title
That's not true. But why don't you like it? Isn't that better than board meetings all day or whatever?
 
user559633
8:19 AM
job title might be useful, but good god "startup" + cto writing JS
 
cbg
 
user559633
@RobertGrant because "top level executive writing jquery" is not the signs of a company that has things figured out
 
Isn't that because it's still a startup?
It'll only be a few people
 
user559633
yes, a finance "startup" that wants to recruit programmers and needs to throw out the CTO title bait to get one. doesn't sound like a hellish gulag that chased off its smart workers at all
 
They require pandas. I could mentor you secretly in the ways of the Ailuropoda and then you could give me a job.
 
8:22 AM
Yeah that is a possibility
Okay, I feel better about not being qualified for that job. Thanks.
 
@tristan at least they'll be giving a CTO to someone who knows about technology
 
Don't listen to tristan, he wants the precious for himself.
 
user559633
@AnttiHaapala sure, until they get a bit bigger and run the person out :)
 
This is the crazy thing though; if the startup succeeds you could do really well
 
user559633
lol no way, that would be a paycut for me and as our very own fin already said, that would mean living in london
 
8:28 AM
Paycut? I seriously need to find a better way to make money.
 
user559633
also good god no thanks. writing javascript for a financial startup? shudder
 
been seeing 1 startup where CEO does not execute and CTO does not know about technology, but at least CCO (creative) is making everyone create lots of shit.
 
user559633
chief creative officer? lol at companies that haven't realized that ideas are free
 
Yeah that CCO thing is never a good sign. We have a person who is head of Innovation here, which is also a bad sign.
 
head of innovation is a good thing
... if it is not a named position :D
 
8:30 AM
Yeah, and if lots of people share the position :)
 
user559633
no. head of inno is a good thing to have if the person is useful and that person is also god damn it antti get out of my brain
 
@Bob if you're looking to make money I'm pretty sure I have all the equipment to make crystal meth in my lab.
 
how about "money without enemies" :D
 
user559633
yeah, we have synthesizers and ableton pr..oh you were talking about the drug
 
@Ffisegydd I thought you only did that when you lived in a country without free health care...
 
user559633
8:32 AM
@JonClements best part about that show? teachers have fantastic health insurance
 
shut up dickens — Tom Finet 40 secs ago
 
user559633
breaking bad: the reality would be walter white getting expert treatment in the country with the world's top medical professionals
 
Cuba?
 
user559633
@AvinashRaj lol just woke my girlfriend up from laughing at that
 
user559633
8:33 AM
@Ffisegydd heh
 
@AvinashRaj flagged
2 times
helpful flags ++ ++
 
user559633
cuba has cheap drugs, not amazing healthcare
 
@tristan come to SA if you want the best trauma surgeons, or hope that your surgeon did a stint here.
 
user559633
@RobertGrant haha, pass.
 
Nowhere else do you get the combination of first world healthcare and third world car accident rates
 
user559633
8:36 AM
seriously, what is with every story about SA starting with "yeah so this awful crime/crash/other-thing happened, but don't let it paint your impression in a negative light"
 
Because people have decided that it's impressions you paint in a negative light, rather than the subject of the impression
I agree; it's crazy
 
user559633
Oh, okay.
 
But it's really because there's so much crap going on here, but you'd have to blame the terrible post-Apartheid government for most of it, and people are reluctant to do that because they might seem pro-Apartheid.
 
user559633
"yeah, i mean besides the hobo named stabby charlie that lives in my walk-in closet, it's a pretty good place to live -- don't let his creative use of a wall shards put the place in a bad light"
 
8:38 AM
The reality is that Apartheid was a horror, but reasonably well run and lots of people even in SA didn't realise the extent of it due to media coverage, whereas now everyone can vote, which is awesome, but the country is run by very corrupt people who don't take responsibility for anything.
 
@Robert sounds like the UK :)
 
@JonClements you have no idea how bad it is here for that stuff. The UK (as one of many places) is like a well oiled machine compared to here
It's...insane
 
user559633
literally 100% of the anecdotes of people that i know that have travelled in SA have a story involving theft, carjacking, armed burglary, or worse
 
There's a daily radio report as part of the traffic news telling people the main traffic lights that don't work today
As in, the president's brother openly admitted on the radio that he took bribes to ensure a certain company got a huge contract, and the president just said, "That's my brother. I don't take responsibility" and that was that.
 
@tristan well - did they book an "action packed" holiday? If so, they got what they asked for at least :p
 
8:41 AM
@tristan let me lower that percentage; I've never had any of those happen to me
@tristan or are your friends criminals, who perpetrated those acts? :)
 
user559633
@RobertGrant okay, now it's only like 88% :)
 
@Ffisegydd I'm not exactly looking to make money (though obviously I am to some extend), I just don't know what to do with my life
 
@AnttiHaapala In file segment.py I have this code to test all the defined functions.
#Driver code from user
p1 = make_point(1,2)
p2 = make_point(3, 4)
line = make_segment(p1, p2)
midpoint = midpoint_segment(line)
print(midpoint)
 
Cbg @Jon! Long time, hows things? :)
 
user559633
8:44 AM
@RobertGrant make a shell out of household items and live the rest of your life as a turtle
 
@Ian not bad - how's yourself?
 
@AnttiHaapala when I say python rectangle.py I see the driver code from segment.py getting executed. How do I understand this?
In rectangle.py I have from segment import get_size
 
user559633
@RobertGrant although seriously, what do you want to do with your life?
 
@AnttiHaapala complete code is here codereview.stackexchange.com/q/83626/37254
 
@overexchange good, I am busy
 
8:48 AM
@tristan not enterprise development :) But something where I can make decent money, and when I tell people what I do, they go, "Okay, cool" rather than "Uh huh."
 
user559633
@RobertGrant oh, well, you're definitely smart enough that your goal is attainable
 
And I don't mean random people I meet who I want to impress or whatever, I just mean, like, my family :)
So the easy (hah) way to accomplish those things would be to work for somewhere like Google, and I don't know if I want to do that, so maybe I have other, secret criteria.
But those are the two I've figured out.
 
user559633
Google would probably make you work on their refuse-to-let-it-die social network or adwords :)
 
Yeah I flunked an Adwords interview, which I don't mind much.
Mostly because instead of just researching what the recruiter said they ask me about, I went off on a panicked binge of all of what the internet says Google would ask me about.
 
user559633
i thought about using google as a relocation service to germany, but they're not in the city i want to live in
 
8:51 AM
And my brain only said "cache control" when the guy asked me what are some sample HTTP headers
And the guy was like, "Sure...also, what about status?"
"Oh...oh yeah."
 
user559633
"status is so mainstream"
 
user559633
you can put whatever you want in there :]
 
Yeah true :)
I think I did produce working code in the coding challenge bit, which was good. Obviously wasn't enough :)
 
user559633
for a while, on a project i won't name for legal reasons, i put a header called "NSA-filter-host" on most webservers
 
Nice :)
I've been to GCHQ as part of what was easily the coolest project I've been on
 
user559633
8:54 AM
neat, can you give details?
 
Yes, and it took me here. — Nathaniel Johnson Mar 12 '14 at 16:18
LOOOOOOOL
 
Sure, it was about snap
 
this is exactly why these kinds of shit questions need to be downvoted
 
@JonClements @tristan @Ffisegydd @AvinashRaj Amazing cartoon
xD
 
user559633
?
 
8:56 AM
@tristan your avatar
 
I mean the cartoon of @JonClements about healthcare
 
@tristan actually it was totally not that difficult from a tech point of view, but they loved it. Which was one of the reasons I'm quite worried about tech and the British armed forces.
 
user559633
Oh, is "SNAP" a thing?
 
I feel amazed how some Americans refuse the idea of an goverment healthcare
 
@tristan it was my neck
 
user559633
8:58 AM
haha, oh
 
@Robert "British armed forces"? I wouldn't worry about them - we won't have any left soon enough
 
@Mr_LinDowsMac where?
you mean the one posted by Jon?
 
@JonClements we need to stop buying aircraft carriers with no aircraft :)
 
@AvinashRaj yes, that one
 
Annnnd in the office. So yeah. Get a job Bob and then give me one. Preferably not in London.
 
user559633
9:01 AM
that reminds me... it's 5am, i should probably try to sleep
 
@Ffisegydd I would totally give you a job, if I had any to spare :)
 
@tristan at 5am is it even worth going to bed... :)
 
If I get a job as a CTO of a data analysis company I'd basically have to hire you so I'd know what to say in meetings.
 
Yeah tristris, stay up with the cool kids.
 
user559633
yes. a small amount of sleep is better for your brain and organs than no sleep
 
user559633
9:02 AM
:| i'm not a cool urropean yet
 
My organ definitely works better if I don't stay up all night playing it.
Oh snap
(Self-inflicted)
 
What the...? Dickens! — Robert Grant 22 mins ago
 
really don't know the meaning.
unparlimentary word?
 
Charles Dickens
the OP comment was removed
 
9:05 AM
yep, the above name appears on the google search result.
:-)
 
shut up dickens — Tom Finet 40 secs ago
that was the original
 
user559633
I don't understand why he typed that
 
@RobertGrant If you want to learn data analytics just read datatau.com. It's basically Hacker News but for data people (tristris would love it)
 
Thanks
 
user559633
omg this rules thank you fizzy
 
user559633
9:07 AM
it's like hacker news, but interesting
 
0
Q: How to cut short a long 'if' statement with multiple logical AND in Python?

user3565150I am parsing a logfile after doing 'ls' to see whether my build clean is complete: if "ls: cannot access fepu/*.elf: No such file or directory" and "ls: cannot access mpu/*.elf: No such file or directory" and "ls: cannot access sbmu/*.elf: No such file or directory" and "ls: cannot access fepu...

 
@JonClements Yeh well thanks :) busy busy
 
Umm... just noticed news.ycombinator.com/item?id=9064826 - that thread got quite large in the end
 
user559633
pro tip: don't read hacker news
 
user559633
it's not news and it's no longer for hackers
 
9:13 AM
Well... I was only searching for where sopython turns up... and that's on the 2nd page of google results...
 
But it does give your adwords a bump when you post on it
 
I browse HN occasionally for interesting tidbits, but only actually read 2-3 articles per day.
Usually "Look a new Python package that does X"
 
user559633
archimedes was relatively unappreciated in his time too and we're basically on the same level
 
actually
I will close that as unclear
 
9:26 AM
I just applied for a job at a company that uses Hadoop.
 
Not too fussed about it, but we'll see what happens :)
 
@RobertGrant Well, at least you are not applying to a job at a company that still uses VB 6 :S
 
No, they aren't that old :)
And I was expecting to get mocked by @tristan, but perhaps he's busy
 
@RobertGrant ?
@RobertGrant I would like to apply to jobs in my city which use something different than .NET
:/
 
user559633
9:30 AM
@RobertGrant heh. i was trying to figure out why the image i was passing to some method was not resizing (turns out tired brain hardcoded a pixel count instead of using a var)
 
user559633
things that i know about hadoop: it has an adorable logo
 
9:43 AM
It's all about Spark brah!
 
1. This answer came up in the Low Quality Posts queue, so evidently, SO cares... 2. Thank you, 3. I totally agree, but maybe it would be better as a comment... — Lea Cohen 41 mins ago
lol :d
I flagged some "UTFG" posts and now some OP started complaining for LQ complaints
 
hello, I save a picture with saved=cv2.imwrite('picture',orgininal_pic) , then i see the picture is really saved. However when i run read_saved=cv2.imread(saved), each time i print read_saved I get None. Why ?
 
10:07 AM
cbg
 
@Kabyle because saved is a boolean flag?
cv2.imread() takes filename, not a boolean.
 
I have been cleaning some "UTFG" answers
so funny how ppl react to the LQ votes there :D
 
and
> If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( Mat::data==NULL ).
 
cbg
 
10:10 AM
@Ffisegydd Well, I choose that answer as the most helpful
 
@MartijnPieters so even, now I answered some C++
today... I am at 943 and 18700
 
@AnttiHaapala wow, hold your horses! Careful now.
 
my rep / python upvote ratio has been steady 20 for the last 5000 rep
 
@Ffisegydd The user three_pineapples deserves its bounty
 
steady as she goes, 47 votes in Python to go, you do need more posts in other tags if you wanted to hit 20k before that gold badge..
 
10:13 AM
as I said, I posted 2 easy c++ answers and got 7 upvotes there... :D
and then some accepts
 
1300 is 4 days work, 5 at the outmost.
 
@AnttiHaapala @MartijnPieters With your reputation and badges, beside you guys, I feel like Yamcha
 
come on, keep at it! 10 accepts a day plus cap, easy peasy.
@Mr_LinDowsMac We all started at 1 :-)
 
@Jerry cbg Jerry
 
@Mr_LinDowsMac I am a noob compared to martijn
 
10:17 AM
@Martijn I don't think you've duped correctly here: stackoverflow.com/questions/28939378/…
 
Cabbage!
 
@AnttiHaapala Well, at least your reputation level is over 9000....
 
@poke: oops.
@JonClements bah, the OP confused me with their total lack of readable post.
 
@MartijnPieters thanks. I resolved the problem but can not understand why it works now.
 
@JonClements: now edit the question into something resembling something readable.
The Illuminator badge awaits you!
 
10:28 AM
@MartijnPieters I'm in the middle of doing so... hold your horses :)
 
:-P Sorry, I am a fast editor I guess.
 
Umm... okay - not the greatest edit in the world... (more gutting it out and starting from scratch, but the OPs intent seems to remain - I hope)
oops, corrected the edit... had a couple of typos and extraneous stuff left in there
I chechked it but it result to an error that says: name 'groupby' is not defined.should i import something?except itertools? — mahya.khazaee 1 min ago
 
bwaah I didnt get the silver badge yet even
 
They can't even copy/paste code sighs
 
I removed the new at Python noise. It doesn't matter why they ask is. And of course they'd be grateful for answers, that's why they presumably posted the question in the first place.
 
10:37 AM
I need to flag some more utfg posts
 
UTFG?
 
use the fscking google
 
@Mr_LinDowsMac awarded the bounty.
 
@Ffisegydd lots of upvoted answers like
1
A: ASP.NET MVC is opensource but where is the source code?

Mike ScottTry this: http://www.google.co.uk/search?q=asp.net+mvc+3.0+source+code+download

 
@MartijnPieters :)
 
10:40 AM
What are you flagging as?
 
That’s offensive in my book. Like a lmgtfy link.
 
@poke offensive carries a hefty penalty if a post gets 6 of them.
-100 to the poster.
 
oh
Good to know
 
So I'd be careful with that if I were you. :-)
 
Although it’s still “offensive” in my book, even if I wouldn’t flag it as such.
 
10:43 AM
@poke I flagged that one as not an answer.
a LMGTFY link in a comment earns a Not constructive flag from me.
 
I kind of want to flag all since they are all “link-only answer”… but for that question, it doesn’t really make sense to do something else. So it’s probably better to close the question as off topic…
 
Thief bonked it :)
 
@poke true! It's a resource request (where do I find a link to the source)
VtCed it.
 
@AnttiHaapala I disagree. The 301 vs other redirect answer is spot on.
 
10:51 AM
But I really do not understand - does googlebot only operate from US IP addresses? DO I need to do something else? IS this flat out a bad idea. Apparently it used to work a couple of months ago.
basically "how does google work"
 

« first day (1605 days earlier)      last day (3340 days later) »