« first day (1557 days earlier)      last day (3374 days later) » 

12:16 AM
cbg all!
 
Dan
cbg
 
user2555451
Aw, I thought I'd be able to hammer that. :(
 
Ah, yes ... wasn't brilliantly tagged as posted.
 
@iCodez, if you vote to close it is automatically closed right?
 
has anyone here had experience with generating images from python?
 
@elyase As originally posted it only had the tag, so it'd need someone with a gold badge in that specific tag to automatically close it.
 
12:45 AM
I see, thanks. So after the edit he doesn't have the same power, right?
 
The edit makes no difference one way or the other; if it were possible to edit a post so that it gained a tag you (or an accomplice) had a gold badge in and then hammer it, there'd be potential for abuse on a grand scale.
 
Yes, makes sense. One can trust the gold tag owners, but only in their realm.
 
I got zero work done today, and it was my day off. now three days of work till the week end :(
good night everyone
 
As it happens we do have a Hammer-wielder in the room, but I guess he's either afk or remaining above the fray for some other reason :-)
rbrb @Reut ...
 
hello python friends
long story short, a friend wants to learn programming by starting with python. I am a 9-5 Android developer that wouldn't mind learning alongside
my frind will be stuck with languages and control structures etc, I've read all of that and want to start with the meat
so, is the website fullstackpython a good reference
 
1:00 AM
Welcome @MLProgrammer :-)
 
Welcome
 
if so, I'll pick one between django and flask and code away
thanks guys
 
I would go with Flask of the two - with that, you'll learn Python, whereas with Django you'll learn Django.
Don't know fullstackpyhon though.
 
I recently saw codecombat.com, for you it will be too basic but could be good for your friend if this is his first encounter with programming
never heard fullstackpython mentioned
 
it just popped up on google when searching for python restful
 
1:05 AM
May be this discussion will be useful, lots of opinions
 
at least the frontend is well presented, but I couldn't know about content
for my friend I'll just use learnpythonthehardway, it's a book that I really like, very high level an well explained
it covers the language and some standad modules, but it doesn't cover what to do with python
 
I know LPTHW is popular these days ... haven't read it, but I have seen some SO questions that made me wonder what the author was thinking ...
 
There is also the Coursera courses (for your friend). May be it is only me but I don't remember the last time I used a book to learn something new. I think programming is too practical to be learn from books like math, or physics. I prefer focused one topic at a time tutorials. I also try to search for videos/webinars to see exactly all details that are some times missing from books.
 
the coursera one got her veeeeeery confused, they go from 0 to webapp with google engine within two weeks
 
1:21 AM
Maybe start out with the official tutorial then? That's a gentle start, I think.
 
cbg @Jon :-)
 
I was more interested about my stuff
like, the whole flask and django thing
but it seems to be that way
 
Flask Web Development is very highly regarded.
 
More options for your friend: news.ycombinator.com/item?id=8562778
 
1:29 AM
cbg all
 
It also interesting to visit reddit/python, I think is the biggest python community, for example:
http://www.reddit.com/r/Python/search?q=learn&restrict_sr=on
cbg @MattDMo
 
@MLProgrammer-CiM have you checked out Learning Python by Mark Lutz? I highly recommend it for your friend, and perhaps for you as well. After you've finished that, Programming Python is the next step.
 
> A programmer may try to get you to install Python 3 and learn that. Say, "When all of the Python code on your computer is Python 3, then I'll try to learn it." That should keep them busy for about 10 years. I repeat, do not use Python 3. Python 3 is not used very much, and if you learn Python 2 you can easily learn Python 3 when you need it. If you learn Python 3 then you'll still have to learn Python 2 to get anything done. Just learn Python 2 and ignore people saying Python 3 is the future.
— Zed Shaw, Learn Python the Hard Way.
No no no no no, he's ABSOLUTELY DEAD WRONG.
 
@Zero you are absolutely correct
 
I think that is still true for the pydata community
pypy, quantopian, still on 2.7
 
1:37 AM
If there are specific dependencies keeping you on 2.x, that's fine, but 3.x is a better, easier to learn language, and knowing "the right way" and then learning the idiosyncracies of 2.x afterwards will save a new learner a lot of grief.
 
cough Twisted cough
 
WTF? Okay, that's it ... 2.6.5 is most definitely not "what you should see". I officially shift my position from vague unease about Mr. Shaw's approach to outright hostility.
> With the 2.6.9 release, and five years after its first release, the Python 2.6 series is now officially retired. All official maintenance for Python 2.6, including security patches, has ended. For ongoing maintenance releases, please see the Python 2.7 series. The NEWS file lists every change in each alpha, beta, release candidate, and final release of Python 2.6.
 
2:06 AM
Hey, I just mind read this questioner and got an accept, but I'm not sure how to clarify the question so it's easier to find by people with this problem in the future: stackoverflow.com/q/28036403/541136
 
2:50 AM
Cbg
 
It's 3AM there, are you still up? :)
 
Yeah, had to get up at 1 to do some stuff
Hi there @Jedi
 
3:23 AM
does anyone know of a good library for generating image files?
 
depends what kind of images - a basic one is pillow
 
I'm writing a book and I've got some graphs in it, instead of just going through every part and manually plotting things I'm trying to parse the TeX document generate the images then copy in the markup with a link to the generated image file.
As for images only 2d stuff, some very basic graphs and similar.
 
so, you want to generate charts?
look at matplotlib or something
 
ok will do
 
or pyplot
 
3:27 AM
I also wanted to "heatmap" some things which I think will be a bit trickier. The charts is definitely a good start though.
 
matplotlib has heatmaps
 
oh nice
 
Plenty of examples on matplotlib.org
 
well this is awesome
I remember a while ago I was using R for stuff like this and always lamented that I couldn't just use Python, looks like things have progressed a lot since then.
 
works nicely with ipython notebook as well
 
3:39 AM
It's a new trend to release new singles after years of silence, it appears
 
Just means they worked really hard on the single? :p
@MRS1367 participating in enough rooms? :p
 
@JonClements no, unfortunately :P
 
oh okies then
 
My awesome palindrome rep is now just 7666 because of "When you put a tuple of tuples, python simplifies it" answer. Eh.
 
oh - you're the downvoter then - AJ doesn't appear to be happy about it - but they've since corrected their answer - so it's okay to un-downvote :)
 
user2555451
3:48 AM
stackoverflow.com/a/28037451/2555451 - See the horrors you've unleashed @JonClements?! :P
 
@iCodez OMG - I did it semi in humour - semi because it might be useful to know - putting it as an answer!? WAT!!!?
 
user2555451
Useful? Maybe over on codegolf. Putting that in production is just evil.
 
Hence my comment
WTF - is this copy me morning or something
post a comment, and then a little while later, an answer appears with the exact same thing
 
@JonClements yeah, removed my downvote. It still got one though
 
Sure there's a dupe for that tuple one I answered
Thanks @JonClements. However, I am still a bit confused. Look at my typical log file here: stackoverflow.com/questions/28017121/…Deepak 5 mins ago
Can anyone see how I can explain that any better?
I'm on the verge of just deleting it and moving on
 
3:56 AM
Oh, that AJ's answer is now on -4
@JonClements something like this I believe
 
Something like that - but the string thing confuses it slightly I think
 
Intrigued to know why you removed your downvote ... it's flat wrong.
 
There's another one that was closed as a dupe of the string one (and Martijn is along the close-voters)
 
"When you put a tuple of tuples, Python simplifies it". Nope. "instead of your desired for x, y in ((1, 2)), it is turning out to be for x, y in [(1, 2)]". Nope. "put a comma after the initial tuple: ((1, 2), ), which tells the interpreter that the nested tuple has more to come". Nope.
 
4:02 AM
@Zero wanted his palindromic rep back? :p
Okay guys - seriously, could I make stackoverflow.com/a/28037256/1252759 clearer?
 
Fair point. Deleted now, anyway ...
@JonClements Ergh, dunno ... it does feel like it could be clearer but I'm not sure how I'd go about that.
 
I mean - you get me, right?
 
Yeah, but OP is clearly having a hard time seeing it.
As much as anything it's that they're clearly not very good at reading their own code.
 
The whole code's a mess, but I'm not going to point that out, because that way madness lies :)
 
Well, yeah :-)
 
4:15 AM
Mind you, I frequently jump from the cliff of madness into the sea of insanity :p
 
Have a +1 for sheer persistence anyway :-)
 
lol - thanks :)
Have some badges in return
that pypi one was good - I've made a note of that
 
Ta :-) Yeah, the PyPI answer was quite nice because I didn't know any of that before going googling for possible solutions. Always fun to actually learn something ...
 
hi all i am trying to install pyodbc module for python using the command :C:\Users\elyon>pip install https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip but gives me the following Error : Command "C:\Python33\python.EXE -c "import setuptools, tokenize;__file__='c:
\\users\\elyon\\appdata\\local\\temp\\pip-x_fvvo-build\\setup.py';exec(compil
e(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file
__, 'exec'))" install --record c:\users\elyon\appdata\local\temp\pip-swgatz-r
i have my path variable set to point C:\Python33\Scripts and pythin version is 3.3
 
So, a different python version and error message than you posted 9 hours ago?
 
4:25 AM
yes ..
 
Why don't you edit your question to update it, that'll bump it back to the front page and maybe garner more attention?
 
ok sure will do that ...just not getting ahead with pyodbc .
 
@eylon you do have a compiler installed on your machine?
Otherwise - it looks like there are binary installers for windows, and a pure python alternative: see stackoverflow.com/questions/23299034/…
 
do i need to have visual studio 2010 installed
 
Yeah, you'll need some form of compiler/development setup to compile it
 
4:31 AM
pycharm and pydev ..don't do anything right ? i would still need visual studio 2010+ right for compiling
 
it is expecting some (Unable to find vcvarsall.bat)
 
okay, then yes, you will need visual studio
and presumably the development version python with libraries and such
 
i have already installed visual studio 2013 ...
how should i proceed from here ..'
sorry a bit new to python
 
no idea - don't know your system setup... your level of experience etc... and don't have time to hand hold you through it step by step :)
if you want to get started quickly, use the pypyodbc project instead - as per the answer linked above
then worry about compiling pyodbc later - OR - use the pre-packaged binary installers available on its homepage
 
4:34 AM
no problem jon ...but thanks for confirming about compiler and will go through the link you provided ..thanks :)
 
no worries - good luck
 
4:53 AM
thanks i have installed visual c++2010 ...may be i will have to look out for the .bat file and put it in my python33 ...
 
Yay - 800 consecutive days! Not sure if that's good or bad though
 
@JonClements Did you get a secret platinum Zealot badge? ;-)
 
Well obviously - I can neither confirm/deny that statement
@Zero wow... I wasn't a fan, but I remember the Free Deirdre campaign :)
 
Not a Corrie fan either - sad news though, obviously.
 
who was in the show for 42 years - wow
so she was 18 when she joined - and never really left... amazing
Mind you, I think Bill Roach is the longest one there
Ahhh
The popularity of her character was demonstrated when a real-life campaign was launched to free Deirdre when a storyline saw the character jailed in 1998 after being duped into a mortgage fraud by fiance Jon Lindsay. The campaign was even backed by Prime Minister Tony Blair.
oh god - I'd forgotten Blair's involvement in that... sighs... just when I think the world's not completely insane, I get reminded of that
Wait an hour or so until you've forgotten that you dropped a small sharp pointy thing, then take off your shoes and socks and walk across the room. The little bastard will find you. — Eight-Bit Guru yesterday
 
5:24 AM
Right, tonight I'm going to sleep while it's dark and waking up before noon ... rbrb all ...
 
rbrb sleep well
 
6:21 AM
Cbg
 
cbg Robert
 
6:32 AM
cbg
 
6:43 AM
cbg
 
Hello there, guys.
 
cbg all!
funny running into you here @GamesBrainiac
 
@inspectorG4dget Hey! How ya doing?
 
that string templating thing saved my sorry ass. Everything is working now
 
Awesome.
 
6:45 AM
interestingly, remember that I was working on a bunch of apps for my mom (Jon, Zero, you might be interested in hearing this, too)?
it turns out that there's a school for children with autism that a close friend works at. She has asked me to rehash the app for the school, to use with their kids. Used easygui to slap a small interface on the webpage creator, and it's almost deployable now
all that's left is for me to figure out how to turn it into an exe, which shouldn't be too hard
 
@AnttiHaapala I need some help with Sqlalchemy.
Can you spare a few moments?
 
just ask
 
Actually, let me try solving it myself a few more times.
@AnttiHaapala I think I got it to work myself :D
yay!
 
@GamesBrainiac: congrats
 
6:59 AM
Yea, it hurts my pride to ask for help, but if something is taking 3+ hours, then I ask.
 
so, basically... configuring anything on linux
 
Pretty much.
Thats why no more linux for me! :D
 
says the guy on a mac
 
haha
I'm an ex-linux guy.
 
I know - we've pretty much followed the same path, independently of each other. We've had that linux vs. mac conversation far too many times before you bought your mac
 
7:05 AM
Yea, buying a mac is a pretty expensive decision.
These puppies aren't cheap.
 
Only compared to the cost of their components and assembly :)
 
nope! but they get the job done
I don't remember being able to push any other machine this hard
 
Maybe you're getting stronger
 
that's actually how I broke my last machine - it started to smoke when I ran an evolutionary algorithm on it
lol @RobertGrant. I /have/ been eating more
 
Very good :)
I'm pretty sure that the components that affect that are made by standard suppliers and used everywhere
 
7:10 AM
so am I. Yet, I am still unable to explain why I'm able to push my macbook harder than my previous HP (even adjusting for the relative increase in the quality of components over the 4 year buying gap)
alright, time for me to get outta here. Rhubarb all!
 
Did you also spend more on the Mac?
 
@GamesBrainiac so now that you solved it yourself you can tell us what you were goin to ask
 
It was about creating an adjacency matrix, with the same table.
 
good that you didn't ask me, could have been that I would have had to reveal my ignorance
 
7:36 AM
I'm back!
 
Ahahaha
 
anyone know how I can create a standalone .exe of a python script from a mac?
 
@poke Huh, how are we in the wrong here :(
 
@thefourtheye Looks okay to me. I was about to give a +1, but you removed it.
 
@AshwiniChaudhary Yo! How ya been?
 
7:45 AM
மத்திய வணக்கம் @thefourtheye (afternoon greetings)
 
@AshwiniChaudhary Don't know why somebody downvoted mine and @poke's. But I +1ed him, it is so much better than mine.
@inspectorG4dget Google translate ah thala? ;)
 
Oh, I thought that Google translated that properly :D
Watched "i"?
 
Matiya vanakkam?
 
@GamesBrainiac Yup, means Good afternoon :)
 
7:48 AM
Yea, google translate is awesome
 
hello
 
@thefourtheye mmeh! I know sufficiently amounts of tamil to write my own using transliterate
@GamesBrainiac part of my NLP final during my master's was to trash talk google translate
@GamesBrainiac: why does pycharm screw up while creating virtualenvs?
 
I have a simple regex doubt. I have been trying since a long time but it's not working
How do I find the value of viewstate in
<input name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTE0MzI5ODM0MA9kFgJmD2QWAgIBD2QWBAIBDxYCHgNzcmMFF34vaW1hZ2VzL29ubGluZWxvZ28uanBnZAIDDw8WAh4EVGV4dAUoQS5QLlRyYW5zcG9ydCBEZXBhcnRtZW50IE9ubGluZSBTZXJ2aWNlc2RkZCWpEXdhyGvxl0LrB0l6ZGEESvAt" type="hidden">
 
It doesn't, it is insanely easy :p
 
Xin bắp cải các bạn!
 
7:58 AM
re.search(r'id="__VIEWSTATE" type="hidden" value="(.*)"',soup)
didn't work
 
@Wally you don't.
in short: zalgo.
 
@Ffisegydd I created a project directory, and a subdir to throw the venv in. PyCharm creates the venv in the subdir, then complains that there's no bin/python in the projectdir
 
@AnttiHaapala I don't get you
 
@Wally read this detailed answer here: stackoverflow.com/a/1732454/918959
 
(Best answer ever)
 
8:00 AM
oh yeah! that's the bestest post of all time. If there were an oscar for SO answers, that one takes the cake
 
@Wally in your case you can use regex, but you're better of using html parser anyway
 
But kivy doesn't support BeautifulSoup
I did the app in BeautifulSoup. But I'm now porting it to Android. So I need to do it in regex @AnttiHaapala
 
@inspectorG4dget lol... People are going crazy about that movie thala... Watch it if you get a chance.
 
@Wally if the problem is regex matching too much, you can try (.*?)
but as you notice, the one you copied has type="hidden" after value, whereas your regex has before... :P
 
@Wally is there no html parser for Android?
 
8:03 AM
I know (no pun intended :P), but I've heard the story from a friend (who also tells me that the editing is pretty bad) and that's good enough for me
 
@GamesBrainiac I am fine. How you doing?
 
A quirk of English that amuses me: "beer" is a subset of "beverage" both lexically and semantically :)
 
Mmmmm. Beerverage.
 
@inspectorG4dget Hmmm, I am not excited anyway... But Vikram has put a lot of effort, it seems.
 
@thefourtheye Don't talk about beer. I live in a dry state. :/
 
8:06 AM
lol
 
I think I'd actually miss wine more than beer these days
 
@RobertGrant The wines I have tasted in local shops here are terrible :(
 
Where is that?
 
@AshwiniChaudhary Do you drink?
@RobertGrant Chennai, Tamil Nadu, India.
 
Ah okay
 
8:09 AM
Yes, I used to. But around 1.5 years sober now, thanks to Gujarat.
 
Ah, is it a recent thing?
 
For those who know Gandhi, he was born in Gujarat. So, that's why it is dry state.
 
Yup... Too bad even social drinking is not allowed :(
 
@thefourtheye It /is/ a Vikram movie, so I might watch it after all. He's one of the actors whose movies I tend to want to watch. However, Mazaa was a let down, though Asin was good, so "paisa vasool!" (I got my money's worth)
 
Hmmm... That guy atleast tries different things...
 
8:17 AM
welp! I traded mine with the devil a long time ago for a doughnut
 
8:29 AM
Kivy supports only LXML
Can any body recommend a tut on LXML
Or just tell me for now how to get text from an ID
	<TD align=right colSpan=2><B>Fuel Type:</B></TD><TD id="ctl00_OnlineContent_tdFuelType" align="left" colspan="2">PETROL</TD>
Or the equivalent of this in beautiful soup
soup.find(id="ctl00_OnlineContent_tdVehClass").text
 
Cabbage!
 
@poke cbg
 
@thefourtheye No idea.
 
8:45 AM
@poke Anyway, I upvoted yours because it is better than mine.
 
Seeing that all answers are downvoted now, I don’t think there’s anything wrong with it.
 
Cbg :)
 
But all the other answers are not matching OP's expected output.
 
Loupi’s does.
 
9:02 AM
Anybody know LXML?
The docs are very confusing
 
@Wally the SO website may be a good place to ask for help :)
 
I asked and got a -
No body answered
 
@Wally I don’t have lxml here, but try this: tree.xpath('//[id="ctl00_OnlineContent_tdVehClass"]').text
 
@poke awesome
 
9:07 AM
@poke What library do I need to import?
 
@Wally from lxml import etree and then you need to parse the document using tree = etree.fromstring(foo)
 
I'm getting an error:
entity "nbsp" not defined,line 42, column 53
@poke
 
9:28 AM
The built in component that's meant to make my life easier when displaying dates as strings totally ignores the timezone I set, in any format
Helpfulness
 
@Wally data.cssselect(#ctl00_OnlineContent_tdVehClass) That’s not a string.
 
What do I do to get the string from that id
#ctl00_OnlineContent_tdVehClass
 
data.cssselect('#ctl00_OnlineContent_tdVehClass') ?
 
Yes
Ok. I get it
global name 'tree' is not defined
 
munches popcorn
 
9:39 AM
re-cbg
 
@Ffisegydd sup
 
Can I have some popcorn?
 
Sure, sit back and watch the show :)
passes popcorn
 
omnomnom
 
9:49 AM
Hello.
 
cbg all
 
I have python xmlrpc server, i need to store the print statement of server to the client log file is it possible ......
 
VERY shiny
Wow, the cloth demo is cool
 
I have python xmlrpc server, i need to store the print statement of server to the client log file is it possible ......
 
9:54 AM
Not only am I not bright enough to write that, I'm not bright enough to use it
 
The circle stack is fun.
And the wrecking ball. I can pretend I'm Miley Cyrus.
 
Yipee!
I mean, Cabbage
 
Yippe thanks to Poke it works now. Now all I need to do is figure out how to compile it to android!
 
Voted voted voted
 
I'm now just curious to find out what infinite timedelta man wants
 
closed, closed, voted
 
10:29 AM
cbg
 
cbg(Martijn, Jon)
 
A programmatic representation of Infinite Crisis
 
Cbg all
 
@IntrepidBrit ahh... so it's cbg(*args) ? :)
 
10:33 AM
Probably cbg(*args, **kwargs). But I've needed to kwarg someone yet
cbg(Jon, tone=menacingly)
@poke I just don't see why it still has to be infinite within the python space. I would just go what Reut suggested and make a wrapper if it offended me so
 
@IntrepidBrit cbg(foo, mood='sleepy')
 
How to test pandas in python Looks like Korean? Or maybe Japanese actually.
 
Oooo! It's started to snow!
 
@Ffisegydd South Korean.
And it is a test post. Voted to close, downvoted, commented and flagged as very low quality.
(and I say South, as I assume that the North Koreans are not even allowed proper internet in their country).
 
Yeah I thought Korean but a few of the symbols kinda made me think Japanese. Done the same anyway.
 
10:44 AM
@Ffisegydd Once upon a time all I could get for my MSX hobby was Japanese magazines. So I learned some Japanese (mostly Katakana, phonetically spelled English).
 
It's gone. Removed by OP.
 
Had a power cut for a bit earlier, managed to get a couple of bits done using ssh on a mobile phone... how sad am I? :p
 
@MartijnPieters 今日は
 
@Ffisegydd range(11) to get the numbers from 1-10? :p
 
@Jon yep edited :P
 
10:52 AM
@poke 昨日, 明日
But not 今日は
:-P
 
wat
 
@Ffisegydd hehe, would have been a nice surprise what with 0 % 4 == 0 :p
 
@poke Sorry, translation error. 今日 is today. 今日は is 'hello' or 'good day'
I responded with yesterday and tomorrow...
 
oh
:P
 
As I said, it was years back.
 
10:55 AM
I’m really out of shape too.
 
If I got an argument that's not of the type I expect, I raise TypeError?
 
@ReutSharabani yes, TypeError is for unexpected types.
For most code, I'd not bother.
 
@MartijnPieters Thanks :)
 

« first day (1557 days earlier)      last day (3374 days later) »