« first day (1678 days earlier)      last day (3269 days later) » 

1:14 AM
hey hey, what's pythonic?
 
Depends, but it's mainly a term to say "A way of doing things in Python".
Ah nvm, wow, I must be new here.
 
Activate crush soul mode: pretty sure that's a dupe.
 
user559633
1:19 AM
noooo it's better than the others i found as a canonical
 
user559633
i searched a bit and didn't see anything that was like BLAM here are the options
 
nah it's fine ;)
 
:P I like how you even gave yourself exhaustive options.
 
user559633
gonna get me that badge
 
user559633
@AlexanderHuszagh lol yeah, i resisted the urge to heckle myself with "you should read the official documentation" as a comment
 
1:25 AM
@tristan Fortunately not too much heckling here. (I'm newer, so I ask stupid questions once in a while).
 
user559633
@AlexanderHuszagh heh, yeah, we're a good group
 
Yeah no, looking back I'm looking at a lot of my old questions and I'm like... this is explained in English in the doc statements I couldn't read 2 months ago.
 
I plus oned it.
 
user559633
Oh cheers
 
user559633
lol dick
 
1:28 AM
I also heckled it.
 
cbg all
 
1:47 AM
Yeah, the problem with documentation is it's written by experts in the subject, so you won't be able to understand it until you're an expert
Hey, everyone be sure to drop by tristan's Q&A and heckle him.
2
Q: Is it possible to use Angular with the Jinja2 template engine?

tristanI have a Flask site and I want to use the Angular JavaScript framework. Unfortunately, it seems as if the delimiters overlap. How do I use Angular with Jinja2 if both rely on double curly braces ({{ expr }})? Is it even possible?

 
user559633
actually laughed out loud at the follow up comment
 
2:04 AM
heckles under his breath
 
2:35 AM
Hmm anyone have experience with Pandas indexing?
 
what's up?
 
I'm trying to force a rough hack to avoid a data export issue.
 
be more specific
 
Yeah, one second. So in exporting to Excel with hierarchical columns and index=False for the index, the data shifts left one relative to the header.
IE, it's kinda like an index_label = 'some_val'
 
3:01 AM
I'm not a fan of exporting to Excel, so I never do it.
 
Yeah, I wouldn't but I code for biologists.
I had to tell them what "ImportError" meant and how to find "Command Prompt"
Ok fixed it.
Not a legitimate fix, but just a simple little re-writing the header as the first n rows and then turning the header off.
 
I hate Excel
like HATE it
 
Same....
But I was told to parse .txt documents using it when I joined the lab (not kidding)
For get this, manual data processing...
 
I hate the crazy text files people create with it sooo much more
I refuse to call them csv files....cause they ain't
 
Pretty much... I only have Excel installed for that reason
To make sure other people can read the output
 
3:09 AM
I just spent 2 weeks creating a script to parse some crazy financial sheet that people said "Monday will just be manually copying this file"
my script runs at an average 28 seconds :)
 
Yep. Sounds like my job
:D
 
the worst part: created it using VBA...........loathe Excel
 
Yeah one of my labmates tried learning VBA just for that
The funny part is he was trying to learn a VBA to adjust for bad scientific software written with Java with no actual support (maintainer made awful algorithms and dropped the project).
 
I never learned VBA, I just occasionally use it while closing my eyes and going to my happy place.
 
I'm not going to and hope I never have to. And I doubt he knew much either: I have to constantly remind him what a "flag" is for the command line...
 
3:20 AM
csv isn't a standard
 
no, but it does kinda indicate some general ruleset....not like the need to create 20 rulesets for a single file
though I might be a wee bit frustrated with the whole thing so grain of salt (or whatever that saying is) :)
 
Yeah, well, the datasets I've gotten can have random delimiters that are part of the data normally without escape characters.
It's... maddening
 
ah, the plight of those destined to parse insanely formatted data
anyway, rbrb all off to study and bed for me
 
3:36 AM
Night
 
4:00 AM
cbg
 
4:51 AM
Cbg, all. When and where is sopycon, please?
 
When: every day. Where: our hearts. <3
It's somewhere in the UK in July? Ask @Ffisegydd or @JonClements.
 
5:22 AM
http://stackoverflow.com/questions/30364958/correct-convert-stri‌​ng-to-bynary-python/30365097#30364958 incorrect dupe hammer
It's a bad question that may deserve being closed for being unclear, but it's definitely not a dupe of what it's pointed at.
 
5:59 AM
hai
 
Hai hai
 
tweets_by_state = {} #key is string and value is list of dictionaries
tweets_by_state[state_name_key] = tweets_by_state.get(state_name_key, []) + [sf, ] #sf is a dictionary - this works
tweets_by_state[state_name_key] = tweets_by_state.get(state_name_key, []).append(sf) #this does not work
why?
 
what's the error? aka, ask a better question, like we've explained to you multiple times
 
No error, but items of tweets_by_state are {'CA':None, 'NJ':None}
 
Sooooo.... Not a list of dictionaries.
 
6:05 AM
ideally value part of tweets_by_state should be [{}, {},..]
ya
 
so what don't you understand here? You can't append to None.
 
am not getting error as append is not an attribute of NoneType
 
Well what's the error then...
 
You mean you are getting an error.
 
We would have known this if you had detailed the error and given an example that reproduces this.
 
6:07 AM
am not getting error, am getting {'CA':None, 'NJ':None} which is the problem
 
so construct your dict differently
 
Just construct your dict to initialize to {k: [] for k in states}
 
please, let me repeat my question
tweets_by_state.get(state_name_key, []) should return [] for first time in loop and then append(sf), Is this wrong?
 
It will return the value for that key, or [] if the key is not in the dict
obviously, the key is already in the dict, with the value None, so it returns None
 
6:10 AM
So then the answer is: reconstruct your dict.
 
tweets_by_state = {} #key is string and value is list of dictionaries
 
obviously not, or you wouldn't have this problem
 
so key is not in the dictonary yet
 
Produce a full example ok?
 
@overexchange you have not clearly explained your problem in a reproducible way. This is a > one page warning. Either post a reproducible example or you will be kicked.
 
6:12 AM
amdoing that, let me copy, am chatting from univ library machine
 
cbg @Ffisegydd
 
sf = {1:2, 2:3}
tweets_by_state = {}
state_name_key = 'CA'
tweets_by_state[state_name_key] = (tweets_by_state.get(state_name_key, [])).append([sf])
 
how the yam did it take you that long to copy that?
you're assigning the result of .append(), which is None, back to the dict
tweets_by_state.setdefault(state_name_key, []).append(sf)
 
In this expr tweets_by_state[state_name_key] = (tweets_by_state.get(state_name_key, [])).append([sf]) sub expr (tweets_by_state.get(state_name_key, [])) will fist return empty list [] and then am expecting [].append(sf) should return [{1:2, 2:3}]. Is my understanding wrong?
 
yes, I just explained why
also, it's incredibly frustrating to wait 5 minutes between each of your posts
either devote attention to the conversation or go elsewhere
 
6:27 AM
may be, I am taking more time to type
I did not get you when you say result of .append(), which is None
 
@overexchange this is trivial. Go in an interpreter and type [].append('test') it will return None
Also, saying "I did not get you when you said <thing I said>." isn't useful, because you don't explain what you didn't get, so what am I supposed to respond to?
 
yes you are right, but [].append(sf) should actually append sf to [], Isn't it?
 
it does, but the result of the function call is None, the list is modified in place, not returned.
 
Which is of course what you're setting as the value of the key
Which is why [] + Server Fault works
 
tweets_by_state[state_name_key] = this goes None
 
6:32 AM
(That's a typo)

[sf ]
 
nice
 
Yes: because you're assigning to a value that does not return.
It's a bit like saying

my_list = my_list.sort()
In this case, you want something that returns a copy of the list so that you can assign it to the dictionary.
 
@AlexanderHuszagh no you don't
 
Or just re-assign it in place
 
you don't want to assign at all, you simply want to set a default value if it's not set then append to it
 
6:35 AM
Yeah
d[key] += val

Right?
 
no, see what I posted above about setdefault
 
Ah this?
tweets_by_state.setdefault(state_name_key, []).append(sf)
 
yes
 
Ah ok yeah.
He could also use a defaultdict(list) and just always append(sf)
Simplifies it for him
 
yeah, except this user regularly comes in here very confused about basic concepts, so I was trying not to complicate the issue
 
6:39 AM
I think tweets_by_state.get(state_name_key, []).append(sf) just creates some temporary list which is not accessible. correct?
 
incorrect, it appends to the list in place
 
Yeah, explains it.
Sorry, I was responding to you, not @overexchange
 
@overexchange rather than asking us basic questions and if you're "understanding is correct", just go try stuff. This is trivial, and we've told you before that this sort of behavior is not appreciated.
 
it spawns these ridiculous conversations
 
6:42 AM
Basically, @overexchange, you're creating a list with d.get(key, []) by setting the default to [], which initializes a new list when the key is not found. You're then appending to this in place, and returning nothing.
 
I appreciate that you're willing to help, but I'm trying to end this. It just encourages him to keep coming back and do the same thing.
 
Ok
My bad.
 
initializes a new list when the key is not found which is pointed by value of dictionary d?
 
kicked
 
Sorry about that. I'm new here so yeah, what you say makes sense: no point in trying to someone not willing to listen.
 
6:53 AM
It's fine. If you hang around more you'll get to know how we work. :) The room gets much more interesting in a couple hours, these are the quiet hours.
 
No worries, thanks. And yeah, I'll be sticking around more.
 
Morning
 
I shouldn't even be awake right now. Rhubarb.
 
Morning
 
Yeah, thought it was late for you @davidism, morning @AlexanderHuszagh
 
7:08 AM
Cabbage!
I got my stepper motors yesterday
But I have no jumpers to connect them to my Arduino, because of course I don't :/
And my makeshift wires don't seem to be working
 
cbg BobbyG :)
 
Hello
 
Hi everyone.
 
cbg @Christine and @dearn44
 
let me start my first nebbish comment
what does cog stand for?
cbg*
 
7:21 AM
Hi
 
:)
 
noobish*
so many mistakes so early in the morning :p
 
Well, I'm so new I'm afraid to ask. :-)
 
cbg
 
Hehe... checkout sopython.com/chatroom for rules and cbg :)
@Bhargav how was your jog?
 
7:24 AM
Bad. Was questioned by the night patrol cop :(
It was fun though! I had never seen cops at night
@dearn44 And this particular section for cbg sopython.com/salad/?highlight=cbg :)
 
Yes I saw it. Sorry for you jog, must have been fun :p
 
@BhargavRao Haha, that's never happened to me
 
@Bhargav now stalking following you on twitter :p
 
Puppy is following me \o/
 
@JonClements Haha, that's what I always do when I join a new chat room
I stalk follow the regulars
 
7:31 AM
@SomeGuy Mumbai has a better night life!
BTW I was jogging at 3am
 
Oh, wow
That's a lot later than I'd thought. Why?
And where are you again? I forgot :p
 
@Some because @Bhargav just isn't normal :)
 
Lol! I was feelin bored that's it!
@SomeGuy Bengaluru
 
Oh, nice! Are you attending the PyCon in October?
 
hey careful, I used to go cycling with my friends at that hour. Don't listen to him @BhargavRao
:)
 
7:34 AM
We go on drives at that time occasionally
 
I broke my poor cycle
I'm against driving at that time. You can't enjoy the breeze
 
mine got stolen, @SomeGuy driving at that time is mehhh
 
I enjoy it
But I enjoy driving in general, so that probably has something to do with it :p
 
already has been ;)
 
7:38 AM
That was fast! I had just voted
Perhaps Tag spamming made it quick I guess
 
You were the first to vote as well - so very quick :p
 
Hey guys can someone help me with a django thing?
I can make it a question later.
if we solve it.
 
@dearn44 From the rules
> You do not need to ask if it’s okay to ask a question.
> You may ask your question without a preamble.
 
Right - I'd better answer these emails... bbias
 
So just ask
 
7:40 AM
I know I saw it. But it does not feel polite nonetheless
 
@JonClements Haha, I love your profile picture on Twitter
 
Thanks :)
 
@JonClements Puppies get mails from?
 
Clients that expect him to do stuff for them :p
 
Like licking things and fetching bones?
 
7:41 AM
That's bad! They should just throw a stick
 
If only guys - if only :(
 
Or ask "Who is a good dog?"
 
ME! ME! ME!? IS IT ME!?
 
YOU ARE!
 
Anyway I made a model that holds users. And I found swing time that offers 'Events' functionality. But since I have a 3 hour experience I cannot find a way to correlate them. Just like they do in the django tutorial with questions answers.
 
7:42 AM
Cabbage!
 
YES!!! Hugs
@poke Cbg Poke!
 
Cabbage poke?
:o
Sounds tastyyyy
 
Q: when you post a question, how long would you wait before you figured no one was interested in answering? Wondering what the norm is here.
 
A week.
 
Or till you become a tumbleweed :D
 
7:46 AM
:D
 
from my small experience, i'll either get a response within the day, or the day after. If not probably never.
 
That is if the tag is a popular one
 
Yeah, something like is definitely like that
 
Melon!
 
[C#] is insane. Unlike our [python], they never close dupes actually
 
7:48 AM
You mean Python is not a popular one?
 
@Bhargav Agreed. It’s a mess.
 
@Christine Not nearly as much as JS :p
 
Ah
 
An off-topic question gets 4 upvotes and 16 answers in 5 minutes! That's [C#] for you :)
 
ugh
 
7:49 AM
Python is still one of the most popular ones, and definitely the one with the most organized community.
 
@poke not that you're biased at all? :p
 
:)
 
[js] is good but again they don't care bout cleaning up. For e.g. stackoverflow.com/questions/30367133/…
 
@Jon I may be biased but unlike you, I actually contribute to many other tags too.
 
The answer is a block of code
[java] is funny actually
 
7:53 AM
@poke I spend too much time talking here to branch out :)
Talking of Java - must get some more coffee at some point - nearly out
 
A [java] gets a comment from a high rep user, then goes to -20 with the comment going to +20. They close it, but forget to delv it
 
@BhargavRao Higher frequency, so cleaning up there is harder
 
The [js] room guys are doing a good job though!
 
@BhargavRao What's wrong in that? dystroy's closed it. Do you think it should be deleted?
 
No No!
P.s. Look at the answer timings and the dupe timing
 
7:57 AM
Good morning everyone
 
Oh, haha. Yeah, easy rep, right?
 
Good morning DilMac
 
morning
 
Morning
 
@SomeGuy The answers were posted after the question was closed!
[js] is js!
 
7:58 AM
@BhargavRao There’s a short window after it was closed that still allows posting the answer.
 
is possible to ask technical question here?
 
@DilMac Sure just see sopython.com/chatroom once
@poke Yep. There was a MSO post as to why they do that! But I doubt that 4 mins is the window duration.
 

« first day (1678 days earlier)      last day (3269 days later) »