« first day (2281 days earlier)   

3:02 AM
pretty good deal if you're looking to get the expansion
 
 
2 hours later…
5:05 AM
Cabbage
@AnttiHaapala So what's the conclusion, f-strings are faster than other methods or not?
 
@MYGz fstrings are faster
in almost all cases,
 
Great
 
if you concatenate strings or unformatted ints
 
@idjaw ohh. To me, the surrounding noise volume control is their coolest feature
 
 
1 hour later…
6:35 AM
quite impressive wifi range :D
I am sitting in a bus... the bus passes my parents house over 200 m away, with unconnected laptop on my lap - well, my computer tried to connect to their WIFI
 
6:52 AM
cbg
 
@AnttiHaapala Router model? :D
 
@MYGz it is really shitty :D drops connections all the time with everything :D
that's what funniest of it :P
I can't remember, probably ZyXEL
 
7:34 AM
Very lazy: using the computer to turn up the heat on my Nest, even though the unit is on the wall right next to me.
 
nest?
mine is a cave
 
Even lazier: run a busy loop so the CPU generates more heat. :)
 
See, I tried that during AoC, but my computer refused to catch fire.
It only does that when I'm out of the house and don't want it to. (Yes, it actually did.)
 
Years ago, someone gave me an old HD that was ancient even then. I think it might've had a capacity of 20MB. It was larger & heavier than a brick, and generated so much heat you could use it to keep your coffee warm. However, it was almost as noisy as a vacuum cleaner, so I didn't run it very often.
 
7:50 AM
Son: Please give me water.
Dad: Get up and take yourself. Don't be lazy.
Son: Please give me water (x3)
Dad: If you ask me once again, you are getting slapped.
Son: Ok. When you come to slap, get the water along.
@davidism similar situation? :D
Kazaa Anyone remember? :D
 
8:07 AM
Cabbage!
 
Cabbage('poke')
Don't understand that comment above try block.
It is raising an exception then why does it says `"We don't want to raise an exception because upon __exit__ the save() call will create the document
if necessary. `
pardon the poor indentation.
 
Please use external paste tools to post long snippets of code
 
@vaultah I was just reading that!?!?!?!? xD
 
want to move it back? :P
 
@vaultah roger that. wait poke
 
8:16 AM
"pardon the poor indentation" is the equivalent of "sorry for typing in caps, lol"
 
@MYGz The exception from the fetch is only re-raised again when the error code is not 404. So in other words: The exception is only swallowed for 404 errors
Which matches the comment since, when the document does not exist (404), then the error can be ignored since it will eventually be created at the end of the context.
 
@poke ah. got it. thanks.
 
cbg
anyone using gitkraken
 
Used it in the past, yes
 
8:31 AM
when i push the code
my push button wont stop revolving
 
does it work from the console?
 
it is pushed but it wont stop revolving
 
.. from the console?
 
yes
i have to close the
gitkraken
and restart it
everytime
 
8:48 AM
Cbg :)
 
@SohaibAsif If you want to post multi-line messages please use Shift-Enter, don't post a bunch of single-line messages.
 
9:12 AM
how can I split(" ") and exclude the empty string if it exists?
 
@PM2Ring Or don’t use enter at all? :P
 
@khajvah .split() does that. Doesn't it?
 
@MYGz oh, I am an idiot
 
cbg
 
9:30 AM
morning cabbage y'all
 
@khajvah nah happens often with everyone :D
cabbage
How to make Internationalized cabbage? :D
it's afternoon here you see.
Cabbage 0.1.1 --> 0.2.1 with internationalization support?
 
@MYGz AFAICT, the usual convention is to use your own timezone, especially when making general announcements, but it's also common to use the other person's timezone when replying to a specific person. Or just use UTC. :)
 
Cabbage
 
I like the "just use UTC" requirement. Makes my life much easier xD
 
9:45 AM
“How do you pronounce GIF” – I love this year’s survey.
 
@poke I'm ready to deanonymise any survey result that doesn't agree with my choices. Tabs?! Jiff!? Here, taste this lead pipe!
 
Tabs? Is there a tabs question coming?
 
@poke if you are lucky enough, yes!
 
Also, to make things clear up front: GIF with a hard G, and tabs are okay in certain languages/environments (consistency matters more).
 
@PM2Ring The worst is when people don't use UTC
especially for appointments
I don't even trust people converting to my timezone
just convert to UTC
I don't even know or care about my stupid timezone
 
9:55 AM
I’m currently struggling with the “compensation and benefits” list, because “Health benefits” is absolutely important but also irrelevant in Germany where it’s a default companies cannot take away.. stupid US oriented questions..
> If two developers are sharing an office, is it OK for one of them to get a mechanical keyboard with loud "clicky" keys?
lol
 
It's so weird to me that that's like... a problem for other people
tapping, crinkling, etc. has almost no effect on me
 
yeah
 
especially not in an office environment
 
> How much influence do you have on purchasing decisions […] - Consultants
People purchase consultants?
gotta love human trafficking
 
9:58 AM
early morning kid-threw-up-twice cabbage
Well, you purchase a consultant's time, right?
That's pretty much the same thing
Also weird? We totally allow indentured servitude. We just call it Credit Card debt and/or student loans. And/or payday loans.
 
Not sure what I should tick there when working at a company that employs hundreds of consultants..
 
tricksy business. <other>?
 
Checking “not applicable”
 
I'm really curious what the survey result will reveal about how we feel about performance reviews.
I really didn't like any of the options they provided. Naturally half of them were the woooorst
e.g. "Number of bugs found"
 
> Think back to the last time you updated your resumé, CV, or an online profile on a job site. What prompted you to do so?
A WINTERBASH HAT
 
10:04 AM
heh. Nice.
for me it's typically because a recruiter contacted me, so I remember that I haven't updated my CV in a while.
That's my "regular" CV update :D
 
> On which of the following sites do you maintain a profile, CV, or resumé?
Stack Overflow isn’t even in the list… odd
 
that was mentioned in here before, heh.
It's basically SO and LinkedIn
 
Having found my current job via SO, I don’t see why I should even sign up on those other weird platforms
 
which is interesting, because I don't think any of my job offers or anything else have come from anywhere besides SO
 
It’s not like I’m begging for people to invite me to their professional network on LinkedIn or anything
@MartijnPieters I was lucky
 
10:09 AM
@WayneWerner I got a few offers by facebook
of course they were shitty ones only
 
I had a FB recruiter contact me once, but they wanted me to relocate...
currently the way I feel about relocation is nope.
 
I would relocate to somewhere nice
like Berlin
 
Oh, now onto the programming language list.. this could take a while.
 
hahaha
The SO questionaire doesn't like my generic top level domain email address
 
I live near(ish) to family right now. I could move, but I don't have a compelling reason.
Not gmail? Gmail worked for me.
 
10:15 AM
Ah it's okay, I just used my old email address
Just find it amusing that SO isn't on top of that sort of problem ^^
 
What TLD does it have?
 
$4,700*6, or about $30,000
that's the raise that I'd have to get that would allow me to visit family roughly as frequently as I currently do
That doesn't include cost of living increase
 
@poke .solutions
 
I would have to have a ridiculous raise to live somewhere like SF: bestplaces.net/cost-of-living/fort-smith-ar/san-francisco-ca/…
Hah. It'd actually be cheaper to relocate me to NY than SF: bestplaces.net/cost-of-living/fort-smith-ar/new-york-ny/70000
on the order of like $100k cheaper
 
@IntrepidBrit You cannot even use + gmail labels… >_<
 
10:26 AM
@poke facepalm
 
@poke Booo for bad email validation
 
2
Q: The survey isn't accepting my email address

CerbrusThe developer survey isn't accepting my perfectly valid email address: I suspect the + throws it off. The censored part is just some letters. My profile accepts the address just fine. Note that the + is a perfectly valid part of the email address.

Also:
There should be an option at the very beginning like “I have the time, give me all the questions instead of filtering out random ones”. — poke 1 min ago
 
@WayneWerner Thats a nice side, didnt now this. Comparing to Europe possible?
cbg o/
 
@manuzi1 not on that one. I found one that compares to Canada
> Hammes faces up to 1,130 years in a federal prison if convicted.
Wow that's a lot of years
@poke True story!
 
@poke I had to answer "yes" to that one. I am that developer.
 
10:38 AM
Likewise on the clicky keyboard. Not gonna lie, I relish in the hatred.
 
@Martijn I answered yes too because I’m generally a very tolerant person. So feel free to join me in my office.
 
You can buy those silencing rings as well
They work pretty well imo
But I like clickity, makes ir sound like we're productive
 
sharing the news guys because SO helped a lot and the python room too, I was confirmed at my job
3
 
@AndyK Congrats !!
what is the job?
 
I think what helped me most in my phd was SO.. Even i am a biologist... :D
 
10:43 AM
Thanks @khajvah data analyst
actually, SO just massively increase my IT knowledge
 
very cool
 
I'm trying to help the Python guy fix his PCG answer. Can anyone think of a shorter way to write:
n<2 or n and expr
n>1 and expr or n is the same length
 
@MartijnPieters apparently you, @poke, and me need an office together. We'll get poke some Cherry Blues and at any given moment it will sound like machine gun fire pouring from our office.
@AndyK +1 excellent!
 
@Wayne I’ve never actually tried mechanical keyboards
at least not knowingly, I have no idea how they feel
 
Cheers @WayneWerner
 
10:57 AM
it's a subtle difference. If you've used a macbook or other scissors keyboard, like that but just a little bit more so
there's a distinct detent where the key actuates. It's a bit like sleeping in higher thread-count sheets
 
I use a Logitech K800, it has “PerfectStroke” and feels really good, so I’m really curious if mechanical keyboards could actually feel better
 
@PM2Ring would some kind of any/all be shorter? I doubt it. Not sure if there's a better way than that :P
> This system uses the scissor-key mechanism found on laptop keyboards for an improved key feeling and faster response time.
So, yeah, it's a scissors keyboard. There's a subtle difference. It's not much of one, at least between the cherry browns.
There's a huge difference compared to my Model M ;)
typing on that keyboard is a joy, though it aggrieves my wife something awful
I had a glorious model M at my first job, they found it in a closet somewhere. It had a detachable 6' curly cable. It was so good.
Just about the only good thing at that job. That and the food days. Mmmmm, food days.
 
does gunicorn work on windows?
 
11:20 AM
Only if you're using docker or something to that effect
 
cbg
 
@AndyK Congratulations & condolences!
 
@AndyK cg ;)
 
@AndyK Congrats! Party time
 
the macbook pro lie (old article)
I am so not buying a mac
 
11:40 AM
thanks @IntrepidBrit. grandeur and decadence of a paid job e.g stability but whitening hairs and loss of it, sometimes lol
thanks @manuzi1
 
@AnttiHaapala they are gonna give me a macbook at my new job :(
 
hey @BhargavRao thanks. It is not even 1Pm and I'm wishing for a beer.
wait ... is it alcoholism at work here ...?
;)
 
wishing beer is quite normal
> "for a developer work machine, 16GB is the uncomfortable minimum requirement,"
that's so much bs
 
@khajvah it is true
I have 16G
wouldn't have 8G any longer
 
I have 8 and rarely have any issues
 
11:48 AM
I run linux, occasionally I need to run windows vm with stupid ie
 
running pycharm, browser with lots and lots of tabs and a webserver
 
pycharm several browsers, postgresql varnish, whatnot, android emulator etc.
remember that this is a computer you're supposed to use >6 months :D
 
yeah, that's a good point
 
Apple: There is no ESCape
 
Joe
hi
 
11:50 AM
@Joe cbg
 
Joe
why python is better than matlab????
 
for what?
 
Joe
I want to understand
 
@Joe python is a general purpose language
 
Joe
what deos that mean?
 
11:52 AM
It's good for most application areas.
Cabbage, all
 
Joe
thanks
 
Would anyone care to comment on the appropriateness of my last comment on stackoverflow.com/questions/41617014/… please? I'm not sure I'm entirely right about whether deletion is an appropriate suggestion
@AndyK congrats on your confirmation!
 
@holdenweb you should write an answer
I think
 
Thanks @holdenweb!
 
@khajvah Don't have the time right now, and it's not really clear to me what the exact issue was ...
 
12:06 PM
@holdenweb I agree with @khajvah - if the OP doesn't write an answer someone should.
 
Is there a better / safer way to ensure that a file name is in the current directory (including within one of its sub-directories, or their subdirectories, etc) than what I propose here?
 
DSM
@PM2Ring: just passing through, but startswith looks like it's going to cause problems. Say your path is /a/b/cd and os.getcwd() returns /a/b/c..
 
@DSM Oh yam... Good point!
 
you should do os.path.dirname(thing) == os.getcwd(), I think...
 
12:22 PM
@WayneWerner I need to handle thing being in a subdir of the cwd, at any depth.
 
ah....
 
did anyone scrape moz.com
 
@PM2Ring I think you can make sure that the cwd ends with os.sep and then call startswith safely: path.startswith(os.path.join(os.getcwd(), ''))
 
@vaultah Yep. That's what my new code does. :) I'm in the middle of posting it right now.
 
DSM
Modern Python has os.path.commonpath, which does what os.path.commonprefix should have done.. wouldn't be surprised if there were something clever in pathlib now too.
 
12:34 PM
I think something like return Path() in file.parents would work
 
@SohaibAsif did or does? I don't know why you would
 
DSM
@vaultah: I think that would fail if the directories were exactly the same, although that's easy to fix.
 
In [23]: Path() in Path().parents
Out[23]: False
yep
 
I am curious... For instance, how can I change specific tick label in the plot?
for instance, let's assume I have 3 data frames. A =[1,2,3,4,5], B=[ 7,8,9,10], C=[3]. x axis values from A.
How can I compare that x tick values with C and change that xtick label?
 
12:53 PM
@DSM I forgot about os.path.commonpath (& didn't notice it in the docs in my rush to fix my old answer). But I've just added another alternative that uses it. stackoverflow.com/a/41634356/4014959 Thanks again for your help!
 
DSM
Cool. Time to go get up and start the day! rhubarb..
 
cbg
any idea about airflow dag schduler
 
Is it possible to store input from tkinter.scrolledtext into a list line by line?
 
@edsheeran Is it possible to store input from tkinter.scrolledtext into a string?
@edsheeran Is it possible to store a string into a list line by line?
 
1:08 PM
@WayneWerner Who needs OPs? They can only give you 25 points, but Future Readers may give you hundreds. :) I don't know SQLAlchemy, but I'm willing to give you the benefit of the doubt for writing a good answer to an old question that looks like it could be an asset to the site.
 
Well that's the obvious solution but since I'm dealing with a lot of text it's very slow so I was wondering if there is something like readlines() method but for tkinter text widgets
 
Or if I simplify the question, how can I find same values and change between a two lists?
 
@holdenweb I guess it's a bit hard to give the OP more specific advice without knowing what roto.command.CommandExecute is doing, but they seem to be happy with the suggestion in your previous comment, and the suggestions in your final comment sound perfectly fine to me.
 
@anniejcannon ,
>>> a = [1,2,3,4,5,6]
>>> b = [4,5,6,7,8,9]
>>> set(a) & set(b)
{4, 5, 6}
>>> set(a) - set(b)
{1, 2, 3}
>>> set(b) - set(a)
{8, 9, 7}
 
@edsheeran IME, calling the .splitlines method on the string returned by textwidget.get("1.0", tk.END) is fast enough.
 
1:17 PM
>>> set(a).symmetric_difference(b)
{1, 2, 3, 7, 8, 9}
 
@Kevin how can I replace the duplicates? For instance I wanna change {4,5,6} values with {egg, ham, cheese}
 
brief biohazardous cbg
 
>>> [{4:"egg", 5:"ham", 6:"cheese"}.get(item,item) for item in a]
[1, 2, 3, 'egg', 'ham', 'cheese']
 
nice
 
@Kevin ok, how can I do this in the loop and between one list and one data frame?
 
1:19 PM
"But I can't make a dict literal because I don't know what the keys are at compile time", you might say. In which case,
 
pandas data frame
 
>>> x = ("egg", "ham", "cheese")
>>> same = set(a) & set(b)
>>> d = dict(zip(same, x))
>>> [d.get(item, item) for item in a]
[1, 2, 3, 'egg', 'ham', 'cheese']
@anniejcannon I don't know because I don't know what a data frame is.
I'm aware that pandas is a library that exists but I've never used it
 
@Kevin hmmm... Actually I am plotting two pandas data frames and I want to change specific xtick in that plot. If you want I can send the code?
 
No thank you. It wouldn't be constructive because I know nothing about pandas.
"ask someone a simple stdlib question, then ask them an unrelated question about a specific library" is a cunning plan to get someone engaged, but the drawback is the person you hook might just have no idea how to help with the second part
 
@Kevin Ok, thanks anyway. :)
@Kevin like "I have a problem with plotting pandas data frame. Is anybody have any idea?" Is it right?
@Kevin But you help a lot. thank you :)
 
1:26 PM
Your original question seemed fine, it just looks like nobody knows the answer unfortunately
 
:grumble: The OP of that path in cwd question was active 18 minutes ago, but I haven't got any feedback from them.
 
why is using pickle a security risk?
 
IIRC if you unpickle arbitrary text, it can execute arbitrary code.
 
yeah but celery task isn't arbitrary
can't be
 
@Kevin ok, get it. :)
 
1:34 PM
So the untrusted end-user has no control over any aspect of the object? This is not a rhetorical question, I actually don't know anything about Celery.
 
@khajvah someone could forget to secure Rabbit or whatever broker you're using and a bad task could get injected in.
Or, one machine could get compromised and the real program could inject bad tasks that another machine executes.
Etc.
 
and you'd be in a pickle
@anniejcannon pandas and numpy objects support vectorized logical comparison
in case your matching values are located in the same positions
anyway, I don't know pandas either, it just came to my mind
I should probably not be interacting with people right now anyway:D
so rhubarb till later
 
@AndrasDeak don't worry, thanks for advice.
@AndrasDeak rhubarb
 
Hey @AndrasDeak There's a recent Numpy / matplotlib question that you might be able to offer some suggestions on: stackoverflow.com/questions/41635737/…
 
@Kevin no, in my case.
 
1:47 PM
If I were in your position, then, I'd have no problem using pickle.
Although I'd probably be lazy and just use whatever is the default, which is apparently json
Everything goes swimmingly until davidism runs into the room and yanks on the big red "HALT SERVER" lever on the wall and tells me about the corner case I forgot about.
 
@Kevin the problem is, my results are objects and I don't want to write json serializers/deserializers
 
pickle the object, then run json.dumps on the string. Security!!!
 
amazing
 
"Security!!!" is not a testimony of the approach's suitability. Rather, it's me alerting the guards to have myself ejected from the building.
 

« first day (2281 days earlier)