« first day (2117 days earlier)      last day (2814 days later) » 

9:00 AM
Thanks
I just prefer stuff that has a stated purpose, and builds to that purpose, rather than hiding (or not knowing) the purpose and building $something
 
@RobertGrant 5k rep is rather much
 
I think so too
 
@RobertGrant I do not even have the bronze badge in SQLA
yet I've even contributed to it.
@RobertGrant upvoted though, but also please check your terminology
 
For sure. The scope of SOD is way too broad. IMHO, it would've been much saner to start SOD out with a very narrow scope, and once it was established carefully expand that scope where necessary.
 
You definitely want to weed out the spam/low-value stuff at the bottom - but I have niche knowledge in a couple of areas, and could contribute (usefully) on them - others will be the same/have more knowledge.
You also need to bear in mind that it's harder to garner rep now, as well, imo.
 
9:05 AM
wat
someone just added versions 2.2, 2.1 and 2.0 to python documentation?!?!
WTF
the guideline says that "include versions with significant use"
of course now that they did add, there are countless of examples that start "python 2 starting from 2.3"
 
I think the rep limit needs to be adaptable. Otherwise, virtually nobody would be able to contribute to niche topics.
Jul 22 at 11:12, by PM 2Ring
Otherwise, only people like Martijn would be doing all the work. :) Dude has gold in Unicode, FFS. :D
 
saödflsadlasdlkdsafölkfdsa
I cannot write link text to doc links
also, python 2 ffs
 
@AnttiHaapala We can't tell whether that's a face-desk or normal Finnish. :)
 
@PM2Ring normal Finnish face-kbd.
"Only list versions that see significant real world use. Pre-releases, release candidates, alpha/beta versions, and so on only serve to clutter the topics they're applied to.

Only remove versions that shouldn't have been documented in the first place. Removing versions from this section also removes them from all topics they are attached to."
 
too broad stackoverflow.com/questions/38715683/… Also, the expected output is inconsistent with the given input, and the OP isn't responding.
 
9:15 AM
cbg
 
@PeeHaa cbg :)
 
So quiet in here
 
Well... I think Antti has probably had a mental breakdown over SO Documentation... as for the others... it is 10:20am on a work day :)
 
@JonClements :P
:P
 
Wrong timezone man... UTC+2 or GTFO
 
9:22 AM
Hey... I'm in the correct timezone for my current location :)
 
@PeeHaa UTC+2? pfft.
UTC+1 or UTC+3.
 
You're just jelly
#EditFail
 
@AnttiHaapala It's almost on par with the LPTHW page :)
 
> Tthere is no version tagging
Fix that ^ while you are at it
It sums up the lists of docs crap pretty good though
 
9:32 AM
hitler on docker is awesome
starred
@PeeHaa what do you mean?
 
About the fix?
 
added "no button"
 
I don't think that double Tt is meant to be there
 
Jim
cbg all. Has anyone found any good doc entries we could use as a template for others?
 
No. There are literally none.
 
9:34 AM
ah :D
 
Jim
I was trying to create uniformity in the String Methods topic but gave up after a while.
 
@Jim no
 
so hands up who thinks that Python 2.0 has wide-spread use?
 
9:35 AM
hand
 
both hands
 
We don't need string methods documentation because we already have perfectly good docs at docs.python.org.
@Antti 2.0 or 2.x?
 
+1
@Ffisegydd 2.0
 
@AnttiHaapala am I getting robbed or something?
 
Ah, no way then.
 
9:35 AM
someone added version 2.0 specifically to docs
@davidism you're being fed to a bunny :D
 
Well that person is an idiot.
 
@AnttiHaapala what terminology?
 
lol, I blame the fact that's it's 2:30am
 
And yeah, 5k was a bit arbitrary
 
@RobertGrant tag vs topic
 
9:37 AM
@RobertGrant point 6 invalidates point 1, since low rep users are encouraged to self-answer too.
 
@AnttiHaapala btw it also works the other way around crap too broad questions on main gets answered by rep whores pointing to docs stackoverflow.com/a/38701585/508666
 
downvoted
 
Jim
@Ffisegydd couldn't agree more. I have completely given up now :-D
 
@davidism preferred :)
 
@Ffisegydd so when did dict.__contains__ appear?
2.0, 2.1, 2.2, 2.3?
 
9:38 AM
Also changed 5k to 1k, but from Q&A answers only, not questions etc
 
ta
 
and moreover who f*cking cares
 
@AnttiHaapala thanks yes
 
Bio
Hello, I have a problem with python :
for data in df_no_missing["TIMESTAMP"]:
mytime = datetime.strptime(data,"%d/%m/%Y %H:%M")
df_no_missing['jour'] = mytime.day
 
9:44 AM
@Bio We all do
 
I didn't want to make it too specific, but I guess that maps 100%
 
@davidism becase?
 
@RobertGrant ther ewas something else but can't remember :D
 
@JonClements the four comments I wrote
 
Bio
I try tu create a new column 'jour' which contains the day of thtimestamp
 
9:45 AM
it's barely related to the topic, most of the code is extraneous, and it doesn't actually explain the topic at all
 
Bio
I go always 29 which is not correct
any idea please
 
@Bio not the proper way of doing a new column to dataframe
 
Bio
how acan I do it properly then?
 
@Bio I'd suggest you read some tutorials on pandas and time.
There are plenty out there.
And very good docs (not on SO, on the pandas website)
 
that is for day of week though, I guess you want the "date" but close enough :D
 
9:54 AM
I wonder if @PeterVaro has missed me...
 
cabbage
 
@R.A.B.B.I.T no
 
Bio
@AnttiHaapala thank you very much
 
@Bio no problem
@Bio *day instead of dayofweek should be the solution
in any case, whenever you need a for loop with pandas, the rule of thumb is that you're doing it wrong :D
 
who feels migrations in django for field updates are unnecessary
 
10:14 AM
If it's master data then it's useful
 
Bio
df_no_missing['JOURNEE'] = df_no_missing['TIMESTAMP'].dt.day
df_no_missing['MOIS'] = df_no_missing['TIMESTAMP'].dt.month
df_no_missing['ANNEE'] = df_no_missing['TIMESTAMP'].dt.year
it works simply like this
 
If it's customer data then whether or not you want to trust a migration tool is up to you :)
 
I never quite understood storing date elements in separate fields...
 
10:31 AM
yeah, doesn't it need a lot of faff for recombining and splitting if you do that?
 
Depends on the use case. If you're frequently using the fields, say in some kind of seasonal analysis, then it makes sense to store as different fields.
Or, for example, if you regularly show binned data on a time series.
 
That mescalinum is a bit cheeky: VTC'ing as unclear, but answering it anyway.
 
10:47 AM
O-kay, so I totally fell for that puzzle. stackoverflow.com/questions/38715149/…
 
@Martijn looks like something to read properly later :)
 
11:04 AM
Only one more too broad, off topic, take your pick stackoverflow.com/q/38711757/344286
"write my code for me"
@RobertGrant Wow. That's crazy
 
hi
 
@MartijnPieters Nerd sniped ;)
Hi/morning cabbage, @paul23
 
@WayneWerner I guess he could take his time on that one. It's not like someone else was going to FGITW it. :)
 
Ok is there any reason why "py 2.7 -m pip list" will find a library yet "import x" says said library is not existing?
 
11:14 AM
Heh. I wish I could remember what it was, but I remember some show/movie where the guy comedically draws like a rifle, but it just keeps drawing and drawing and drawing like those magician scarves
That's what I imagine that answer was like :D
 
(Using pycharm to import)
 
@RobertGrant Very nice follow up
@paul23 You're sure you've got the right Python, right?
i.e. py 2.7 -c 'import sys; print sys.executable' shows the same one as import sys; print sys.executable
 
@WayneWerner yup triple check using "sys.executable" in both command line and pycharm's interpreter
 
next option - are you sure that the module has the right name? I've used some where you install a different name than you import
 
oh lol, apparently the "options" of pycharm don't correspond to the actual interpreter. - in the options it states I use C:\\python27\\ (the one found using py -2.7. But sys.executable finds it at D:\\python27\\ (A special one I installed for spyder/pythonXY).
 
11:19 AM
Heh heh. Wish they'd disallowed "-" signs in module names - it's fairly logical for noobs to try and import what they install, but of course the "-" will always cause syntax errors. Also, module distro names with periods in them are somewhat evil, IMHO
 
@paul23 niiice
 
Both are python first is 2.7.11 at the D drive is 2.7.10
 
I'm looking for a good dupe target for this: stackoverflow.com/questions/38718714/… The OP is comparing every line of file A with every line of file B in a double for loop, so obviously the inner for loop gets to the end of the file on its first run.
 
@holdenweb I'm fairly sure it used to be plain ol' inbox, but I guess Nylas got the package from him? I could have a fuzzy memory, though
cbg antti
@PM2Ring The accepted answer - stackoverflow.com/a/13142536/344286 on that linked question is technically the right answer...
it is a bit rubbish, though
rbrb - updating chromebook?
 
11:25 AM
@WayneWerner Yeah, which is why I asked in here, in case someone could find something a bit better. :)
 
well, that was snappy
 
At this stage, the new answers are better than the existing dupes, so I guess I'll just leave it open. :)
 
Yeah, unless something better comes along, the other one should probably just be turned into a dupe :P
 
@AnttiHaapala huh? that edit just looks like it added version tags (not necessary mind but based on text it was fine) - beyond that whole subject was messed up and I lost the interest in fixing it
 
@JGreenwell :D
it added version tags, I thought it was only my example
the version tags were incorrect though.
there were compatibility syntaxes, that were meant to be shown for both python 2 and 3
and this guy sabotaged them to show "python 3 only"
 
11:32 AM
yes
cause the version tags are messed up
 
Is anyone here connecting to AWS VPC's using a VPN client on their {desk,lap}top, please?
 
and I think I got confused cause the guy put up like 6 (I rejected most of them) and this one looked semi-okay so was going to edit
then got busy and probably forgot
so yeah, my bad
 
@MartijnPieters i believe your lambda is wrong
there is no build tuple
 
oh this is just "fun": "module compiled against API version a but this version of numpy is 9". Really "version a" is clearly older than "9", and this helps me so much searching for the right version.
 
ahmmm
 
11:39 AM
oh, wait. That one, yeah there was a conversation about that in SOD's room - and I got sick of it threw up my hands and said fine use version boxes even though they suck and are broken
tolerance for SOD had been surpassed
 
ah sorry
@JGreenwell when they're going to add version filtering, you cannot read the examples correctly any longer :D
@MartijnPieters ah nvm
there wasn't code for the lambda
 
I eventually got that user to stop adding version tags leading to this yesterday:
in Documentation Public Beta, 10 hours ago, by JGreenwell
no, others had same problem yesterday - we're just leaving it without version boxes for now and waiting to see update before making issue of it
 
Well I did an odd thing...
0
Q: Is there a tmux quiet mode, and how do I turn it off? (tmux not displaying keypress)

Wayne WernerI've got a tmux session and I'm fairly sure I did something weird to it, but I don't know what, or how to get back to normal. I can type whatever I want in the window, multiple commands, launch different programs - the same behavior is exhibited whether it's just zsh, ipython, or whatever. But n...

My cursory google search turned up no results...
.... wat.
now it's magically working again??? -_-
 
closing as no repro
cabbage
 
You just described most of my programming life. :)
 
11:46 AM
<sup><sub>devil solar flares</sub></sup>
 
@Ffisegydd re: the Owen Jones article you posted ... yes, I'd read that. It would take a lot of text and annoy the hell out of everyone else here to address everything he says. I think he's overly pessimistic on some points and slightly disingenuous on others, but there's no doubt that the current situation in the Labour Party is not a happy one.
 
weeeeh! libraries finally working. Always satisfactory when you can finally, begin programming.
 
anyway, today is actually a busy day so rbrb for now
 
@AnttiHaapala: :-P
 
@MartijnPieters that should've been closed as too broad :d
wish "too localized" would still exist
like... "how can you infer the contents of a lambda function from its arguments"
 
12:02 PM
@AnttiHaapala: I was having too much fun to pay too much attention to that ;-)
 
The code itself is rather badly written.
A recursive function to extract per-column characters from the output using a lambda that relies on access to a global.
and the function takes a 3rd parameter that is never used.
 
it is clear from the example that it wasn't written
it was obfuscated
 
It was obfuscated manually.
 
yeah true.
 
12:03 PM
They forgot several variables, and the sys.argv variable is unused.
 
or perhaps it is used in the lambda :d
 
Give me an hour with the ast module and I can come up with something far harder to decipher again.
 
at least I'd remove line numbers :D
 
Yeah, you could easily strip that info from the bytecode.
But then again, this is a pretty basic piece of obfuscation here. Increasing column-wise rotations?
 
Security through obscurity is better than nothing, I guess. :)
 
12:08 PM
I'd obfuscate the bytecode by making code that the compiler can't do
 
am new to python . So please give me the code for this problem — Shan 22 mins ago
Classic
At least they asked nicely
 
at present i need this code urgently.. so please write a script for me, — Shan 10 mins ago
I wonder how much they're paying...
 
user559633
@WayneWerner did you accidentally suspend it with control + s ?
 
@tristan then it wouldn't refresh on focus change, would it?
that was my first idea too
and commands wouldn't appear either
 
@tristan That's what I thought, but ctrl+q had no effect :P
 
user559633
12:13 PM
nah, when the terminal is suspended, nothing paints until unsuspended
 
and it was every pane, not just the one
 
user559633
do you owe it money?
 
(which is one of the ways I figure out if my connection dropped, or I just accidentally hit ctrl+s in that pane ;))
 
Pity about SO's "Be nice" policy. I feel like goading him until he throws a hissy fit: I've always wanted to see what happens when the fit hits the shan.
 
I see what you did there:P
 
user559633
12:14 PM
Sometimes tough love is being nice.
 
(also, screw Be Nice)
 
user559633
^ agreed.
 
10 points if you trip the NLP test of @queen in the SOCVFinder room:D
 
user559633
this is the internet, not a support group
 
Well actually "new to python" might be a good statement. - If you're starting with programming advising to build an in memory database isn't the thing you should do. "newer" people would understand manual approach better and till they hit the brick wall of scalability that's good enough.
 
user559633
12:17 PM
I'm new to being awake today. Give me a coffee.
 
The trick is to have a drink in the mornings before you open up SO.
 
@tristan That's not good for you either :P.
 
Is XSS allowed on purpose in your spoiler? sopython.com/spoiler/…
7
 
Nah our head dev is just a scrub (cc. @davidism)
 
12:18 PM
"accessing database: use mysqldb (python 2 only), use sqlite3"
 
*scrum
 
@PeeHaa :D
 
You do seem to do some escaping/encoding, but you are doing it wrong ;-)
 
shitty templating language.
 
user559633
Bravo @PeeHaa.
 
12:19 PM
had he used Tonnikala, there wouldn't have been any problems
 
@paul23 Yes: "I'm new to python, no in-memory databases please". No: "I'm new to python, need moar codez nooowwwwwww"
 
@AnttiHaapala :D
 
user559633
This is probably the result of using Python for something in production
 
:D
 
I had one of my comments deleted last week. The OP was all "Read this link. Do this. Do that. Write this code". I told him to be more polite: we're volunteers, not his slaves. Sure, the OP probably didn't mean to be so bossy, that was mostly an artifact of his poor English skills, but I found it really irritating.
 
12:20 PM
@AndrasDeak True, though in my mind I read "need more code" as "please give a full out written code so I can see how it works". (Which is valid, as most people learn best by example - yet many difficult examples lack explanation of the easier things - obviously).
 
user559633
@PM2Ring I wonder who deleted that comment? That seems like a fair comment and you don't employ hyperbole and wind people up as much as...some of us
 
Often SO feels like reading my math book: "working out this formula is left as an excercise for the reader".
 
@paul23 if "I'm new to python" is the response to "what have you tried", the only option is the pit
 
@tristan agreed; PM is hundreds of times more patient than I am
 
@paul23 then it's working fine; SO is not a TA that will write your code
 
12:22 PM
2 days and 100 sheets of paper later: "omg this is impossible" (true story right here at my desk).
 
Why did I click on that?
 
user559633
Are you just popping in some JS?
 
user559633
@corvid awesome. did you add that/?
 
12:23 PM
<script>location.href='https://www.youtube.com/watch?v=oHg5SJYRHA0';</script>
 
user559633
Cool, didn't know if it was something more exotic
 
never gonna give you up...
 
I never escape anything in my templates
 
good guy noscript
 
@AnttiHaapala I think we need a Selenium thing to spin up and test URLs to make sure they don't go there before they get added as spoilers :)
 
12:24 PM
Tonnikala is such that I need to sometimes unescape things.
 
@AndrasDeak Not going to argue further (I lose arguments anyways), but I come to the SE family often because literature is too abstract - because I don't understand things in the books/manuals. And I need help implementing that theory...
 
user559633
Are you ever like, thanks a TON..nikala
 
Davidism has a history of messing up things like this. Let's not forget his most famous %quot;accident&quot;.
 
Haha yeah
 
@paul23 sure, I don't mean to argue. Code is fine; I only have an issue with needy lazy askers:) Cheers
 
12:27 PM
 
Tristan just had a nosebleed.
Like some anime character seeing their senpai.
 
@AnttiHaapala hahahahaha
 
davidism wanted to ensure that no-one is ridiculing him for quoting too many times.
 
Taking credit for my meme that I made ages ago, Finnish swine.
 
12:29 PM
@Ffisegydd :D
 
Oh lol I remember that meta post
 
Apparently I upvoted a comment on davidsm's answer/apology ;)
good times
 
A coworker here has a great holiday email autoresponder. It starts with "If this is an emergency, dial 9-9-9 now", explains when he'll be back, whom to contact in the meantime about specific subjects, suggests http://ww.random.org/coins/ if you need him to make a decision, and if that is not enough, and you desperately need an answer, that nearly every question is ultimately answered somewhere in the Wisdom of the Ancients: <youtube link>.
Guess what that last link goes to ;-)
 
Nice. Very nice ;)
 
@AnttiHaapala that is so good
 
user559633
12:35 PM
I'm nearly confident that I need to add a build step to test for my favorite placeholder URL
 
Huh. I answered a question a short while ago. It's not a great question: it's a bit of an XY problem, but it was easy to answer, and I guess other Python newbies could try to do something similar. But the OP decided it was a dumb question & deleted it. I'm wondering whether it's worth re-opening undeleting. stackoverflow.com/q/38719534/4014959
 
that really is a stupid question
we could undelete none the less; if only to teach OP that deleting answered questions is a no no
(otherwise I don't think it benefits future readers)
 
I agree it's a bit unclear. And wanting to swap the for loop index variables like that is a bit weird, but I guess if you're coming from a language with pointers it's not that weird.
 
user559633
Alright, javascript land for the day. Remember me as I was
 
console.log(tristanInstance)
 
12:54 PM
@AndrasDeak True. OTOH, if he thinks it's so dumb that it could embarrass him in the future I'm happy to leave it deleted. :) But I must admit it does annoy me to spend time (even if it was literally only a couple of minutes) answering a question only to have it deleted.
 
I can see why (of course cue "that's your risk for answering crap"). If you wish, I'll gladly undelvote.
 
I think if the question were worded better, even if it seems like a weird thing to want to do, it wouldn't be that bad
I don't have a problem with questions for academics' sake
I'm mostly just still confused as to what they were trying to do, lol
 
Meh, gotta leave right now. If it's partially open when I get back, I'll vote. If it's open, do try to enlighten OP about their misguided ways:)
 
Let's see if this works... Latest flickr rabbit images
 
This part:
> The one exception involves deleting a question right after someone posts an answer to it. This (fairly rare!) pattern is seen as so overtly hostile that it does impose a pretty stiff penalty... But that's also a far cry from "self-censoring".
 

« first day (2117 days earlier)      last day (2814 days later) »