« first day (1529 days earlier)      last day (3410 days later) » 

12:00 AM
And now, thanks to this conversation, it's Jonathan Coulton again. :)
 
@AirThomas Oh! Do you listen to the Ask Me Another podcast?
Oh, I went through a Rocky Horror Picture Show phase
 
@inspectorG4dget I haven't. Should I?
 
If you like puzzles and word games
 
If you have android/ios you should try Bonza out. It's a great game. It's like a crossword with a twist.
 
@Ffisegydd oh... the original soundtrack to les mis is awesome
 
12:05 AM
@inspectorG4dget Sounds like a winner. I have 8-10 hours of driving time coming up this week, and my wife wants to listen to an audiobook. I'd prefer something more engaging.
 
I will have to check it out
oh this is quite possibly something that could engage the two of you on a road trip. I've used it on roadtrips with friends before
 
@Ffisegydd on a side note - got some Welsh whisky sent to me as an xmas prezzie... might open it
 
I don't think my local station plays it, but it could just be on at a time I'm not usually listening. I catch Says You fairly regularly.
Unless, is it podcast-only?
 
well it's from NPR and available as a podcast
nono, it actually airs on NPR
 
also still a favourite - but won't be to everyone's taste: youtube.com/watch?v=5s-k8Q_40cA
 
12:11 AM
@Ffisegydd do you remember i told you about the error...
when i show you the labels stuff?
in one computer i'm having troubles in the other one it's fine..
 
check to make sure you have same version of scikit on each one
 
@ml_guy we take care in remembering what you have said?
 
I have the same version
 
Make sure you have the same version of everything else. "works on one computer, but not the other" is usually a version mismatch issue
 
ok..
 
12:19 AM
@JonClements yeah, he has an uncanny knack of trying to have the same discussion over and over again
 
@JonClements @Ffisegydd can you get on slack chat?
 
Yarp
 
How can I update everything with pip?
 
@ml_guy Have you read this?
 
12:22 AM
@AirThomas I second that link
 
Yes but the first answer is really old... still there is no a flag?
 
does it fail for you? if no, continue
 
Sort by active answers? Skim through them all?
 
In fact all ready do that... i dont want to mess up my configuration :S.. im afraid of mess everything
 
then you want a venv
 
12:27 AM
rather than asking about this in chat
it details how to set up a virtual environment to isolate what you install
 
@davidism are you using some sort of compositor?
 
@PeterVaro xfce has a basic compositor built in
 
(I still forgot which DE are you using..)
@davidism I know, I know
I'm asking, because I want to recommend you a "third party one"
 
If I wanted something fancier, I'd use Compiz
 
neither compiz neither xfce-builtin
it is called compton
it is very very lightweight
(not as heavy as compiz)
but also way better than the builtin one
I'm using it for like 2 weeks or so
and it is amazing
 
12:30 AM
interesting, what window manager/decorator are you using?
 
(it even has a nice GUI settings panel)
@davidism xfwm
with greybird theme
btw I started using compton, because even I have the proprietary binary driver for nvidia
the scrolling still tears the image sometime
and compton just fixed that
 
Wow, I'll definitely check that out.
 
it also comes with nicer (and configurable) drop-shadows
and also with blur on alpha-blended window's background
there are two things left for me, to call my OS the perfect one (from GUI POV) 1) OS X style overlay scroll-bars 2) file-menus collected on one of the panels (instead shown on each window)
(the latter is not that important, as I can hide the file-menu most of the time, as I don't need it, but the overlay scroll-bars are just plain beauties)
 
Ubuntu Unity does the file menu extraction, but I really dislike it
 
because it is not as nice as on OS X
 
12:39 AM
probably won't get that outside ubuntu unity though, as it requires patches for everything
 
(I installed Unity on top of Arch in a virtual box -- just because to see that feature in action)
@davidism exactly
 
don't get me started on unity. It's like someone tried to make it look like osx, abandoned the idea half way, then decided to turn your PC into a tablet
 
same with gnome-shell to some extent
 
@inspectorG4dget very very very true -- nice summary
@davidism it is even worse!
I could literally kill the guy who destroyed designed gnome shell's GUI
:20603355 yepp,
 
@PeterVaro thank you
@PeterVaro: how do you manage the strikethrough font?
 
12:44 AM
@inspectorG4dget ---strikethrough---
 
ahh! I had only two: --text-- failed. Thanki
 
Everyone gets a coffee on me:
for chatter in sopython.users:
    dispense(u"\u2615", chatter)
@davidism: what's slack chat? or am I not supposed to ask?
 
12:59 AM
It's a team chat for our projects, but we're basically using it for room owner discussion
 
ahh
I just had a chuckle at the one of the newest questions
Chuckle with me, if you know the one
 
chuckle
 
1:17 AM
Anybody know what is wrong with this? cursor.execute("UPDATE Accounts SET Credits = {0} WHERE Username = '{1}';".format(creds, name) Because this doesn't seem to be updating I enter the values it prints them out so I can confirm they are there but they never get put into the database
 
what is cursor?
 
it's from MySQLdb module
cursor = db.cursor()
 
Do you need to commit? Are you in a transaction?
 
I'm not sure what you mean.
The cursor just allows me to run SQL queries.
 
I can tell you some other things wrong with what you've posted, such as the fact that you're using string substitution, which is wide open to SQL injection
 
1:21 AM
I thought .format was better than the % formatters.
 
they're both equally bad in this case
use the dbapi's built in substitution, which handles escaping properly
 
is that the one with the triple quotes?
 
no
it has nothing to do with how python handles strings
notice how there's a "parameters" argument?
you pass your parameters in there, not in the sql command directly
I can't remember what the placeholder is for mysqldb though, and good luck figuring that out, it's documentation is non-existent
I almost feel like we've had this conversation before
maybe it was with someone else who came in
 
I'm reading this stack overflow post stackoverflow.com/questions/1307378/… and it appears he has used %s
No, the only time we've talked is the barcodes
 
alright, it's almost 7AM and I have been relieved. See you all later tonight! Rhubarb
 
1:26 AM
It had a lot of upvotes.
 
never mind, I spoke too fast
 
So I went and tried his solution with no luck.
 
notice how he doesn't use .format or %?
 
I didn't
 
he passes the values in as a second argument to execute
 
1:27 AM
Alright, it's almost 7AM. I have been relieved. See you all later tonight. Rhubarb!
 
cursor.execute("""UPDATE Accounts SET Credits = %s WHERE Username = %s;""", (creds, name))
nothing.
 
@lramos15 I think you need to re-read that answer as a whole, he explains exactly what I'm trying to
is there an account with that username?
 
Yes
 
@lramos15 at this point, without you posting a python script I can run to demonstrate the problem, there's no more I can say
 
user2555451
@lramos15 - You never answered davidism's earlier question. Are you calling commit() on your connection? You need to do this whenever you update a database.
 
1:29 AM
No I'm not, what does commit do.
I was confused about that part.
 
user2555451
It commits (saves) the changes.
 
I'm just using cursor.execute for everything
 
user2555451
You need to call commit on your connection object afterwards.
 
the docs clearly describe this
 
1:31 AM
Can I call it after everything or just after every update?
 
after anything that will modify the database
 
It works!
 
you can make more than one call at once, the commit once at the end
 
Sorry for being a pain in the butt, didn't really understand what you meant by commit and transaction.
 
user2555451
You should also follow davidism's advice and avoid % or str.format. They are big security holes.
 
1:32 AM
big security holes for sql commands
 
I am changing them now to the passing arguments way.
Is it okay to leave str.format for select commands, or should I change those?
 
using string formatting in general is not a security problem in normal python
 
user2555451
well, I assumed that was implicitly understood. :)
 
always use the dbapi substitution for sql commands, it doesn't matter what the command is
 
Why does this guy put triple quotes around his whole Query?
 
1:34 AM
so that he could write it on multiple lines
do you understand what triple quotes are?
 
I thought they were comments
like #
 
no, they are strings
 
Then what is a multi-line comment?
 
There are no mult-line comments in Python.
 
I've been lied to by other people...
 
1:35 AM
an unassigned string at the top of a module, class, or function is a docstring, but it's still a string
 
user2555451
Triple quotes make a multi-line string. Basically, it is a string literal that can span multiple lines. See the docs for more information: docs.python.org/3/reference/…
 
Do any of you know how to manipulate Windows accounts using python, I asked the other day but then got off shortly after never seeing if anyone replied
Specifically locking and unlocking them.
 
user2555451
It would probably be easiest to do that as system commands instead of Python. You can use os.system to send commands to the OS.
 
does that work on windows also, or just linux?
 
user2555451
os.system works on both, but the commands will be different.
 
1:39 AM
One last question. With the sql queries why does %s work even if the value being passed is an integer
 
user2555451
%s stringifies its argument. It is the same as calling str() on it.
 
Then why does the SQL database accept it even though the value I selected was integer
Like for credits, I said take data types of credits and I passed credits through %s and it still worked.
 
user2555451
It stringifies the argument for Python. See below for an example:
 
user2555451
>>> '%s' % 1
'1'
>>>
 
user2555451
For SQL though, it will be a number.
 
1:43 AM
Okay thank you.
 
user2555451
You're welcome! Drop by any time. :)
 
also, %s isn't python string substitution in this case, it's a general placeholder at the dbapi level
 
user2555451
That's if you use the api. I think he was referring to having Python do it like in the linked question.
 
2:20 AM
sup
I sometimes post answers on really old questions. They tend to slowly climb, but faster than the other answers. Is that a good thing? I think it probably is. hubrisbrag
 
user2555451
Sure it's a good thing. It means people found your answer useful. That is hard to achieve with old questions.
 
5:57 AM
@PeterVaro what's your compton.conf look like? I'm still getting tearing on Firefox.
 
abc
6:23 AM
Cabbage
 
I find this fact Interesting ! The interpreter is giving the same output for python ex1.py and python ex1.txt . what might be the reason ? can any one explain ?
 
Hello guys... again me
 
@VamsiPavanMahesh file extensions are meaningless anywhere but Windows. Most programs (such as Python) care about the syntax, not the extension.
3 messages moved to Trash
 
So there won't be any issues ?
with .txt
 
Well, no one will understand what you're doing. Just because the extensions aren't enforced doesn't mean they're not a good idea to signal intent.
@ml_guy please use dpaste.com to paste large blocks
also, please take your questions to the main site, it's getting out of hand here
 
6:38 AM
sure @davidism
 
Sir are you referring me ?
@davidism
 
@VamsiPavanMahesh no, that's why I put ml_guy's name on the message?
You have to follow multiple conversations here :)
 
Thanks , I am just getting started in python :)
 
also, use the menu to the left of a message to update it, rather than posting edits as separate messages
And please, for all that is cabbage, don't put a space before punctuation!
It's a pet peeve of mine in the room.
 
Will follow them :)
And what is cabbage?
 
6:47 AM
see "Metasyntactic Use" at the bottom
 
My University WI-FI is blocking that website
 
because it's a "chatroom"?
 
It should be having some 18 + words ?
No !
 
lol, your university blocks "bad words"?
 
Wow
 
6:49 AM
do they think you're 5?
 
Yeah ,It's India !
 
Holy shit
 
Most of the Institutions do that
 
Mine doesn't
 
also, do they teach you that spaces come before punctuation or something? I've seen a lot of people doing that recently.
 
6:49 AM
we can't access porn too :/
 
it's just not right!
 
use a vpn
 
seriously, use a vpn
that's messed up
 
I use one...
 
They don't teach English at University! That might be reason
 
6:51 AM
I'm just curious where everyone is picking that up, since I've only started seeing it recently.
 
Which one ?
 
It should be:
> Which one?
notice how there's no space before the question mark?
1 message moved to Trash
don't break the rule again
 
I don't get it, Can you explain me?
 
much better (in terms of punctuation)
 
Explain it in terms of RegEx
 
6:54 AM
there is no space before a period, comma, semicolon, colon, question mark, or exclamation mark
there is a space after them though
 
But they look good to eyes? No?
 
no
it looks really weird when there's extra space
 
I do agree with that
 
ok, I'm happy that you did not type NO
Got to go, See you guys with another doubt!
 
@davidism why do you think this is happening ? (what i mentioned?)
 
6:57 AM
Why what is happening? And did you really just do that extra space after all that?
 
In one computer my code works, in this doesnt work. In this throws syntax error.
 
Yo, does anyone know any one line IPython magic to make plots take up the full width of the div?
@ml_guy So on one machine your code works, but on another your code does not work? Are you running on the same python version?
 
No, in this I'm running python 2.7.2 and in the one that it works im running python 2.7.1
 
You're using the exact same file, with the exact same code, in the exact same folder structure, with for sure python 2, on both machines?
 
You might want to check that you have the same encoding on both files/projects and additionally the same libraries
 
7:07 AM
Yes, same encoding and same libraries im just reading an writing some files. In one computer i have yosemite and in the other one mavericks
 
Is it the same operating system on both?
 
What in particular does the syntax error say?
 
@ml_guy I think the real solution is not to try to use ast.literal_eval to parse a file which is not python
1 message moved to Trash
 
in the other one (mavericks) everything works ok
 
7:11 AM
please use a paste service, I will not warn again
then use that one
 
Sure... but what is happening in this one?, i like to use both
 
what does the input file that fails look like? USE A PASTE SITE!
 
that is the entire file?
It works for me
 
It works for me too
 
7:15 AM
that one
 
What was the syntax error complaining about?
 
in the other one it works too.... in this one it doesnt work, what version of python do you guys have?
 
Python 2.7.8 (default, Oct 19 2014, 16:02:00)
 
2.7.9, but that really doesn't matter, any version of 2 will literal_eval that the same
 
this is the exception: pastebin.com/cp8LX7VW
 
7:17 AM
Do you have a different locale set on the machine? Is the file encoding different? Run md5 on the file on both machines, do you get the same hash?
That's a different piece of data that the one you just pasted us
 
It's the same structure...
 
That doesn't matter, when you're trying to debug something don't go changing other stuff. Keep a controlled environment and change one thing at a time.
Also please answer my questions.
 
They dont have the same key
 
then they're not the same file
so you were wrong when you told me "yes they're the same file" earlier
 
It's just a .txt... what's happening?
 
7:22 AM
How did you copy the file?
 
i didnt copy it, just followed the same structure... of the other file that works
 
What does "just followed the same structure" mean? How did you create that file on the machine that is failing?
Did you copy/pasted? Did you use a USB drive to copy the file? Did you use an editor?
 
textedit
but I set up to .txt utf8
 
It inserted a unicode BOM at the beginning of the file
there will be some setting in the editor to use "utf8 without bom"
if there's not, use a different editor
 
There might be a 0xFFFE or 0xFEFF in the file
 
7:25 AM
I tried to use gedit but it crashes here in OSX
 
@ml_guy from here, you'll have to solve this problem yourself
 
ok
 
I think you've got enough of an idea from us now on how to go about debugging problems systematically
 
Thanks
 
@ml_guy please carefully read and understand skidmore.edu/~pdwyer/e/eoc/help_vampire.htm
This was the last of my goodwill, we will no longer be tolerating long debug sessions with you.
I'm sorry if that sounds harsh, but you're going to have to learn on your own for a while.
Feel free to hang out in the room and chat, but make sure you understand that link before asking about code again.
 
7:28 AM
Ok i will leave the room
thanks guys
 
8:13 AM
Cbg
 
Cbg
Potato?
 
Tired, you?
 
Same same
Partially defeated
I used IDA Pro today and attempted to disassemble/reverse engineer an obfuscated exe venturing into the depths of Windows hell. It was not pretty. Now I wish I got my day back.
 
8:36 AM
I just wrote to someone "I may try reproducing later". I feel ashamed.
 
Your human fork command has been disabled for your own good
 
9:10 AM
Cbg :)
 
I already used my close vote for the first revision, which didn't include the all-important detail that the OP was using multiprocessing.
 
9:34 AM
Just one more close vote; there is now a low-quality answer on that post because it hasn't been closed yet.
 
Done
 
@Ffisegydd thanks.
 
Morning
 
Hey up sunshine
 
How's it going? Switched from Cabbage to Sprouts yet?
 
9:48 AM
Nah mate. Don't do sprouts. They're vile (at least the way my mum cooks them)
Been slow cooking some beef brisket overnight though. Absolutely amazing. It literally falls apart on the fork. Gonna mix some BBQ sauce today and then have it for dinner.
 
Nice. Also, completely agree with the Sprouts thing. Who on earth thought they were a good idea?
 
10:05 AM
Also - I hate you. I miss having a kitchen. I'm getting fat from eating out all the time
 
You don't have a kitchen?
 
Kinda. I currently don't have my own place - existing between my girlfriend's and my parents (depending on where clients are needing me to work)
(The girlfriend's kitchen scares me)
 
Ah ok, makes sense. I'm back home now for Christmas.
My GFs kitchen is...well...it's not good. It's just usually covered in plates and dishes from her and her housemates.
 
My GF owns her own place with her brothers. I wish plates were the worst problem
The George Foreman is actually stuck/overflowing with (permanent) grease, and they like it that way because "it adds to the flavour". Boke
Cabbage again @holdenweb
 
Sounds grim.
 
10:16 AM
cbg
 
yeah, I avoid going in there. I actively refuse to go near the fridge shudders
Cabbage @MartijnPieters.
 
the Discombobulate question was a bigger hit than I could have hoped for.
It was even listed on the hot questions list last night.
It was tweeted out by the English SE twitter bot too; nearly 1000 views and it hasn't even been 24 hours.
 
hm? linky?
 
10:33 AM
@Ffisegydd - What sort of things cause beat frequencies?
 
cabbage, InterpidBrit
 
(I mean, I know it's caused by two distinct close frequencies - but I'm trying to wrack my brain to work out why I'm seeing them more regularly than I would expect in this data)
 
Very good.
Haha, I walked right into that one
 
:D I dunno, I mean you've just defined them yourself.
What data are you looking at? Acoustic?
 
10:36 AM
Vibrational
But basically acoustic
 
@IntrepidBrit Sprouts are wonderful - when properly cooked. If you boil them into submission then they are bitter and textureless. Just sayin'
 
Hi I was directed to this site by LinkedIn developer community itself you can check this link for further details [link]developer.linkedin.com/blog/stacking-api-support-linkedin Please remove the hold — Shashank 6 mins ago
>.<
 
@MartijnPieters It's a very Python room heavy Q&A. I see a few familiar names there ;)
Good question though.
@holdenweb Could explain it. I just couldn't see any redeeming features of sprouts. VERY bitter, rubbish texture and makes one fart like sin
Maybe I should go all Scottish on it and try to deep fry them
 
It's all about leeks anyway.
 
10:45 AM
@IntrepidBrit Nope. Just DON'T overcook them. They are better steamed than boiled, and they should be firm - a little like al dente pasta. Ten minutes simmering is usually plenty - you can eat them raw in salads if you like, though that wouldn't suit me much
 
@Ffisegydd Yeah, well someone with a double "f" at the start of their name would say that, wouldn't they? ;-)
 

« first day (1529 days earlier)      last day (3410 days later) »