« first day (3140 days earlier)      last day (1802 days later) » 

1:46 AM
stackoverflow.com/q/56248200/4909087 this is asking for a resource or whatever. It's also too broad
 
 
1 hour later…
2:53 AM
I don't see why not: >>> print('नमस्ते दुनिया')Wayne Werner 21 secs ago
 
Hello world, nice!
 
Yo, do you guys have a favorite tool to downgrade an ONNX network, for example from ir_version (0.0.5) to (0.0.3)?
 
3:06 AM
@piRSquared If you have a second, would appreciate if you could weigh in here. I did not think the user's edit of this highly upvoted old pandas question was appropriate, so I had rolled it back. Edit history for reference.
 
3:18 AM
No pressure :)
 
3:58 AM
employee_name = "JOHN DOE"
fig, ax=plt.subplots(figsize=(15,15))
labels = list(data_agency_agg)[list(data_agency_agg).index('Reg Pay'):list(data_agency_agg).index('Sunday Legal OT NSD Pay')]
values = [0]*len(labels)
for i in range(len(labels)):
    values[i] = data_agency_agg.loc[employee_name][labels[i]]

ax.pie(values, labels=labels, autopct='%1.1f%%')
ax.axis('equal')
How do I omit 0% from my pie chart? Also any improvement suggestions on how I got to the chart?
 
cbg
 
 
2 hours later…
6:11 AM
cbg
Ugh, took me a long time to open room 6, some internet connection error.
 
7:11 AM
@U9-Forward It's not just you. And not just room 6. Other SE chats seem very sluggish at the moment.
 
@PM2Ring Okay, good to know, i am not the only one :-)
It's strange, and bad connection in the past minutes, but pretty good now
 
 
2 hours later…
8:50 AM
@U9-Forward yup... "ugh" is about the right expression... but seriously - a list for membership testing? :p
 
@JonClements Amm.. why not? :-)
Btw:
@JonClements If you felt bord: ''.join('asdqaefqe'.join(sorted(set([(str(hash(v)**1) + s[i])[-1] for i,v in enumerate(s)]), key=[(str(hash(v)**1) + s[i])[-1] for i,v in enumerate(s)].index)).replace('asdqaefqe',"b'w'").split("b'w‌​'"))U9-Forward 4 mins ago
You prefer that? lol
 
Just a question, was the dupe I marked in that question not the correct dupe?
 
@JonClements I will delete my answer, but curiously you should see my comment.
@DeveshKumarSingh I will close for you with my hammer, or jon, you do it?
 
@U9-Forward I had... at least mine was semi-sensible and readable :)
@DeveshKumarSingh I'm not sure it's the best of dupes... I'm sure I've seen better
 
I did it
 
8:59 AM
a few of the answers there don't even address teh question the OP is asking
 
Added one more
And one more
 
thanks, the golden hammer :)
 
@DeveshKumarSingh Haha, yeah, you're close to it or aren't you
Oh geez, forgot to delete, now id id
 
9:18 AM
cbg! Any regex gurus in the house? Why doesn't this: re.match(r'\d', 'asd123') find 123? I must be misunderstanding how this works.
 
naah, still 400 odd points left
 
@isquared-KeepitReal re.match "[...] at the beginning of string [...] "
 
@isquared-KeepitReal First of all match is for the beginning of the string, so use search:
>>> re.search(r'\d', 'asd123')
<_sre.SRE_Match object; span=(3, 4), match='1'>
>>>
But then it shoudl return the substring, so use:
 
for beginning of the string?
 
@isquared-KeepitReal Sorry, you need +:
>>> re.search(r'\d+', 'asd123')
<_sre.SRE_Match object; span=(3, 6), match='123'>
>>>
 
9:21 AM
basically, if you're using re.match for something not at the beginning of the string, you're using the wrong function
 
got it. thanks
melon
 
@isquared-KeepitReal Also, to get final one, use:
>>> re.search(r'\d+', 'asd123').group(0)
'123'
>>>
Or much better sub:
 
@U9-Forward because list membership testing is O(n), set membership testing is O(1).
 
>>> re.sub(r'\D+', '', 'asd123')
'123'
>>>
Or findall:
>>> re.findall(r'\d+', 'asd123')
['123']
>>>
@AndrasDeak I know, i was goofy, deleted it
 
9:23 AM
@isquared-KeepitReal Your welcome, btw, i am totally not a regex guru, not even near...
 
you are in my eyes laurel
 
@isquared-KeepitReal Haha, laurel
Got my bronze
Just now
rbrb
 
 
1 hour later…
10:53 AM
@U9-Forward Use sub for substring replacement. Don't use it if you just want to search.
 
 
2 hours later…
1:01 PM
@U9-Forward regex101.com is my go-to sandbox for regexification
 
1:20 PM
and cbg
 
1:37 PM
... kale
 
1:54 PM
cbg
If someone was to explain what this expression does, how would one go about it
foo_fields = []
map(lambda x:foo_fields.append({}), range(0, 10))
 
@cs95 I weighed in
 
it applies a function that returns None to a range iterator ?
 
a "None" function? what the function returns is only secondary to what it does.
 
ew, where did you find that?
 
ha, i suppose thats the better reaction :P
 
1:57 PM
that's foo_fields = [{} for _ in range(10)], right?
 
yes that's the right way, but somehow in the question above, I found this way to for the instantiation of the list of dictionaries
@ParitoshSingh I corrected it to function that returns None
 
The correct way to write that abomination is:
foo_fields = []
[*map(lambda x:foo_fields.append({}), range(0, 10))];
 
the correct way to write that abomination is to not write it :P
 
@ParitoshSingh yes /sigh but not as fun to rant about
 
2:00 PM
@piRSquared What language is that correct in? ;)
 
1. That is a side effect 2. It won't work on python2 right? @piRSquared
 
@DeveshKumarSingh apologies. what is Python 2? Seriously though, no
 
oh, i think i misread. i am impressed at myself
 
@PM2Ring syntactically correct in Python (-: But not correct in my heart. Don't kick me out of the club.
 
@ParitoshSingh so this is not an example of side effect
 
2:02 PM
hm?
 
I mean what @piRSquared came up with :) is that a side effect?
 
@PM2Ring everyone knows one should really use: list(map(dict, [{}]* 10)), right? :p
 
"This" is a mess. but it has 10 appends. each one of those is a function with a side effect.
 
@DeveshKumarSingh it is generally expected that what happens inside a comprehension or map or any functional like thing has no side effects. What I wrote is the opposite of that.
I would never use it except to mess around
even if I wanted to use append you do it like this:
foo_fields = []
for _ in range(10):
    foo_fields.append({})
 
ugh
 
2:07 PM
but even that is gross as what @AndrasDeak wrote above is the best way to do it.
9 mins ago, by Andras Deak
that's foo_fields = [{} for _ in range(10)], right?
 
@piRSquared I'll have to think about it. ;)
 
(-:
 
@piRSquared yes, and not [{}]*10 :)
so a list comprehension like the one you showed, which returns a list of Nones, but actually does what is was supposed to do (make foo_fields a list of dictionaries) would you call it a side effect
 
yes, and also considered bad practice.
 
@DeveshKumarSingh that's funny, coming from you
 
2:15 PM
@DeveshKumarSingh to be clear [{}] * 10 is a list of length ten in which all elements point to the same dictionary object. That has no side effects in the strict sense of the term but can lead to other wonky things. In certain circumstances, those wonky things may be exactly what you want. However, it is likely that there is another way to do the same thing that is less obnoxious.
 
makes sense, thanks @piRSquared :)
 
2:34 PM
There's something quite special about the initial map solution. Is that the result of a rabbit hole of contortions through not being familiar with the language or some functional programming approach that makes sense in another language?
Somehow the OP came up with that, I'm just curious what route it could have been
 
@roganjosh I thought you'd appreciate this it made me smile when I thought of it.
 
@piRSquared marred a little by the exec answer that followed, but it's a nice trick :) my initial thought would be a shift of the index values and get differences of >1 but I'm dead-ending a bit there in my thought process so I'll try remember this
 
I didn't even see that one. worth the down vote penalty /-:
 
Depending on how your day is going, your "Not seeing" could be an oversight or a death penalty to the premise of the approach :P
Oh poop, I missed the meaning of your comment. Well done me with a hasty response
 
2:50 PM
Anyone have a convenient dupe for - stackoverflow.com/q/56258767/2823755? ... if a and b and c
 
I think we discussed this dupe target a few months ago but I don't know if we got a new dupe target
 
dupe multiple conditions in a single if.
 
user7437554
3:10 PM
Hi guys, im interested in the animation of this website: demonstrations.wolfram.com/JouleExperimentOnFreeExpansion
 
user7437554
It gives access to the source code, do you know which language is and if it is difficult to create something like that?
 
user7437554
I guess some software is used otherwise the code is very, very long to write
 
Mathematica
 
user7437554
Do you have to pay to use it? Any analogue in Linux? @vaultah
 
@wwii Closed. BTW, you need to write that as [tag:cv-pls]
 
3:13 PM
Yeaa, thnx - don't post here often, found it later at sopython...
 
@santimirandarp You can get it cheaper if you're a student. See wolfram.com/mathematica/pricing/students-individuals.php
Mathematica is a pretty big deal. There aren't many languages with their very own Stack Exchange site.
 
I'm not often come across it but when I'm stumbled across it by clicking around in the HNQs stuff... some of it just looks amazing... so few lines of code to do some amazing stuff... but then - I'd expect that to be the case as that's what it's geared for...
 
3:35 PM
Stephen Wolfram has done well from it. :) And its fans are pretty passionate. I've never had much to do with it, apart from a few attempts to translate Mathematica code by trial & error. :)
 
yeah... the syntax is a little bit hard to grok - but then heck... so are a lot of languages when you think about it anyway...
I use to write SAS... the uni students that did that no doubt haven't done too bad themselves out of it either :)
 
Before python, I tried SAS. I found it baffling
 
@JonClements horrible syntax though
 
I got some decent results out of it but the "I have absolutely no idea what I'm doing" vibe was just too much, never seemed to diminish, and so I gave it up.
 
Python can be easy to read without the reader knowing much Python, if the writer sticks to the most basic syntax. But I wouldn't expect an outsider to grok nested comprehensions, etc.
 
@AndrasDeak well, I'm sure when you know it, it's actually suitable for what it does :)
@roganjosh I don't know... took a while of getting use to coming from a C background... the whole data step then proc's and all that was a little odd... but it worked nicely for the company that employed me at the time so...
 
It's supposed to do everything and it sucks for numerical problems
 
@JonClements at the time, I had some serious pressure that basically just left me with "I need to get out of Excel" and that was about it. Maybe I didn't have the right mindset when approaching it, but your impression coming from C is the same as mine coming from no programming so I think it probably does have a slightly strange approach
 
@piRSquared awesome. Well said. I think that's about enough time spent on this issue. I find it a little odd why someone with no experience in the tag whatsoever felt compelled to make decisions on the content of the post, but I've seen weirder things.
 
3:58 PM
@roganjosh given that we use to have a whole cupboard of manuals, and it was at that time around £4k for a base licence, plus another £800 if you wanted ODBC on up to 5 machines, and then if you wanted other stuff you get up to a site licence of nearly 100k... wowsers... It was nice - and it's keeping itself going, but with modern DBs and languages (like R or Python/pandas) - it's definitely struggling a little
 
@JonClements <hands up> guilty. I was still a PhD student whilst working so I was using the academic license. I can't see how they will sustain themself beyond the next few years. I'm probably fortunate that I found it quite alien so as not to push for a license
 
@roganjosh it could also do some really weird... umm... I guess I'd call it "php like stuff"
but even more so... in a way
 
I haven't used PHP and I wasn't really in a programmer position to judge at the time, so I'm glad my "this is weird" gut feeling was not misguided :)
I'm kinda interested how this kinda software will sustain itself. Matlab is more sensible, IMO, but there's a pretty big onslaught for these companies
 
@roganjosh I saw some interesting things in SAS... one of my "favourites" was that doing something like "1" * 1 would make your string a number, but it'd then default to making that number's length of its string the most digits it'd consider as a number... so when the next iteration of the data step came around, if you gave it "11" - it'd still give you back 1 or something like that...
 
user7437554
4:14 PM
@PM2Ring I'm trying it online, nice stuff. I wonder if animations could be done. Anyways, thanks for the link
 
I haven't used it since 2005, but even till now, one thing it did do, and I can't fault it for, was it really, really, logged things - it liked its log files - you had to go out of your way to turn 'em off - apart from OS system logs - I've yet to see a product that goes to that extent of saying what it's doing blah blah blah...
The other thing though @roganjosh which is quite weird... it use to make assumptions... I'm not sure what logic it used exactly but I know if you typoed a variable name such as "myarray" as "myarrya" - and kicked the process overnight, you got a log file with a warning such as myarrya is not known - assuming you mean myarray and continuing
 
Ha, you've jumped my half-typed comment. Maybe the logging is a result of so many things being kinda obscure so it has to tell you roughly what it did
 
4:34 PM
Can anyone help me with a pyinstaller issue?
 
what's the issue?
 
5:09 PM
Is there a SEDE for how many questions a person has voted to close as a duplicate?
 
@roganjosh there's one for hammers
 
Won't work in this case :/
No hammer involved. My google searches are giving back-to-front results in terms of how many times a question is used for closing rather than how many times a user has voted to close as dupe
 
for other users this might be a secret
 
I assume pretty much the same
 
I think rene had a query that returned questions that were successfully closed and had the user as one of the voters
 
5:24 PM
I'll have a go at looking for that, vaultah, thanks. It's purely for curiosity anyway so if the link isn't at hand then I'll just drop my curiosity
 
Can't find it, sorry
 
The blue screen at the end kills me
 
It's pretty good. I've actually done a multithreaded thing and didn't blue screen. It was just one function on it's own thread tho.
 
5:51 PM
@MisterMiyagi I was trying to create a executable from a python script with modules from a venv. When I was running the newly created executable an import error was rised. The only way I managed to create the executable was by installing all the modules outside the venv and do the pyinstaller from there.
 
 
1 hour later…
7:02 PM
@wim hehe
 
Pretty quiet this afternoon
 
oh hey, looks like the reprex url changed. stackoverflow.com/help/minimal-reproducible-example
 
@ParitoshSingh as did its representation in comments. I saw your use literally 30 seconds before you just posted this :)
 
^^ aye, i was pleasantly surprised.
 
7:55 PM
@ParitoshSingh your half attempt at Pi has just broken me a little inside
 
i was about to write say 100 or something, but in the spur of the moment, i couldn't resist :P
 
3.14159265358979323846. That's my limit
 
26433
after those. thats mine
though i have to think over it whenever i am writing it out
 
Off the top of my head...
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949
 
really
 
7:58 PM
100% certified, its in his name
 
I meant clipboard... top of my clipboard
did I say head?
 
wim
hah
 
The 1st 100 places are correct. I never bothered memorizing more.
 
At one point I memorized many digits of Pi. I gave up the upkeep when I realized that NO ONE CARES!
 
wim
really interesting article about how many digits of pi you actually need: jpl.nasa.gov/edu/news/2016/3/16/…
 
8:01 PM
including me. I enjoyed doing math in hexadecimal and hexadecimal instead
 
We had a shower curtain that was just Pi numbers. I bought it for my sister's birthday. We're normal, I promise
 
i..uh..watched a movie called the life of pi.
 
Pi digits* might be more accurate sorry
 
Charles Dodgeson, aka Lewis Carrol, memorized the 4 digit logarithm table. That would've been pretty useful.
 
I think it would be hilarious to have a combination between pi digits and something like thinkgeek.com/product/b9b2
 
wim
8:03 PM
TL;DR about 15 decimal places is enough for just about anything imaginable. People calculating more digits should better spend their electricity mining bitcoin or something.
 
Pi digits are a tradition. But yeah, there are more useful things in pure maths to waste electricity on, eg zeroes of the Riemann Zeta function.
 
i bought a shirt for pi day... that's it
 
wim
WimCorp bring in pies for everyone
 
oh, and I also enjoy apple pi(e), if that counts
 
wim
I don't know why they say pi are squared, because they were all round ...
 
8:08 PM
do you hear that? that's the sound of dads everywhere laughing
 
As I told my childhood friends as we grew up and they'd expect me to calculate how much we each owed on the split checks at Denny's... "I'm not rain-man, my talents lie in imagining how things fit together."
 
A decade or so ago, I made a half-hearted effort to memorize squares, so I could quickly calculate products using (a+b)*(a-b)=a^2-b^2.
 
AD enjoyed a funny one as he bid me farewell for the night, he said "rbrb pie"
And for the record and in regards to my username, no one ever asks about the radius. It's 1/sqrt(pi)
 
@piRSquared That's basically my main motivation for going to university; once we all go for a nice family meal, I get to deal with tallying up the debt fairly.
 
Coincidentally, I just looked at my phone, the time is 3:14
 
8:15 PM
Hey there central time (-:
 
illuminati confirmed?
 
When I toured Cal Tech in high school, they have a room pi in every dorm hall and people would run the halls yelling "Pi Time" at 3:14. That stuck with me.
 
@cs95 What more proof could you possibly need?
 
if I don't see another 100 pandas duplicates in the next hour then I'll believe they actually exist
 
wim
Q: why did the spider learn Python?
A: wanted to become a web developer..
 
8:32 PM
ba-dum psh
hope he catches all of those bugs before he deploys
 
@wim not one of your best :)
 
It was just awful, Arne, the awkward silence was working :P
 
it was getting too awkward
i had to do something
 
26 mins ago, by cs95
do you hear that? that's the sound of dads everywhere laughing
takes a dad to appreciate a dad joke
 
8:51 PM
@cs95 Gone, but one of the usual suspects went for it, like a fly to rotting meat.
 
yeah, it surprised me some to see that user actually post an answer to that garbage question because I haven't see them do that before. Must've been itching to code :D
 
wim
how do you know it's a homework question? maybe "your task is" was addressing esteemed stack overflow members.
 
He used to do a lot of FGITW answers. I guess he's slowed down a bit in the last 6 months or so.
 
wim
a user called AK47 fast gunning? there's a dad joke in there somewhere..
 
:D
 
9:05 PM
contrary to popular belief, dad-joke is not synonymous with bad-joke
 
Thank God I get a hint about who this is about :)
 
every bad joke is a dad joke, but not every dad joke is a bad joke
 
9:26 PM
ack. I deleted too many of my own posts today and can't delete this delete vote-pls I misread the question and my answer is plain wrong
 
the struggles are real
 
#SOProblems
 
this got a chuckle out of me :P
 
aghh. why are people downvoting! I need delete lol (-:
That's 6 rep I'll never get back... until 2.5 hours from now.
 
@piRSquared FYI vandalizing your posts like that is typically frowned upon. Nothing wrong with a wrong answer.
 
9:37 PM
too funny @ParitoshSingh
@AndrasDeak really?! I never thought anything of it. I've done it a number of times prior to deleting.
 
yup
also deleting too many of your posts can get one into trouble meta.stackoverflow.com/questions/288229/…
 
There we go. My wrongness in all it's glory
 
the context there was a bit different, but FYI anyway
 
First time in 3 or 4 years I decided to prune some old posts /sigh
 
yeah, sure, hence just FYI
you can't avoid what you don't know about
 
9:46 PM
Well that's interesting if nothing else. I've tons of zero vote answers it's time to get rid of. I found out today that I should do that slowly
 
Why do that? Just because nobody upvoted it doesn't mean it's bad. I have a bunch of no-vote answers where I helped a 1-rep asker solve something.
 
Hello guys, can I ask a question?! I'm looking for subdirectories in an directories in which there are other types of files. So I've said `for i in sorted(os.listdir('.')):
Sorry imcomplete question
 
you can edit/delete messages for 2 minutes in chat
and please practice code formatting in the sandbox, and see our formatting guide
 
it has said: too late :(
 
thus it was written, thus it shall be
 
10:01 PM
Hello guys, can I ask a question?! I'm looking for subdirectories in an directories in which there are other types of files. So I've said
`for subdir in sorted(os.listdir('.')):
if subdir. is a directory type and matches such a name:`
 
I'll chack all this out! :)
 
@MarlonHenriqueTeixeira did you actually try reading what I linked for you?
 
I'm doing how. :)
>>>for subdir in sorted(os.listdir('.')):
>>>if subdir. is a directory type and matches such a name:

Is that right? :)
almost, I guess...
import os
import pandas as pd

for pasta in sorted(os.listdir('/home/marlon/Shift One/Projeto Philips/Consolidação de Arquivos/dados')):
      if pasta.fnmatch.fnmatch('17448', 'inode'):
          pd.read_csv(file, header=None, sep='\s\s+', engine='python')
This is my code, but I'm not calling fnmatch.fnmatch correctly. :(
 
@Code-Apprentice this just in:
22
Q: MCVExit redux: I don't need a milkshake to know when I've missed the mark

Shog9A week ago, I had an idea: change a URL with thousands of outstanding uses and try to replace an awkward initialism with... Another awkward made-up word. ...Ok, that was... not a great idea. Fortunately, many of you generously donated your time to point out just how not-great that idea was, and ...

 
10:19 PM
Oh good. I really don't like "reprex".
May 16 at 10:17, by PM 2Ring
Also, reprex reminds me of Ruprecht from the movie Dirty Rotten Scoundrels.
 
 
1 hour later…
wim
11:24 PM
@piRSquared FWIW we can not delvote unless it has negative score
interesting pep (subinterpreters) python.org/dev/peps/pep-0554
the idea being, only one process (less OS overhead for your concurrency) but multiple interpreters, with one GIL per interpreter
 
@AndrasDeak and now I'm sucked into this years-long history of MCVE
 
Anyone know if there's a way to query a MS Access DB (would prefer under Linux, but Windows could be fine too) and get the _raw_ data coming down from the over the driver / API / whatever is coming from the file.

Every library I've tried is trying to convert it into a string of the native data type (Unicode, since I'm using 3) but I have some strange data

Basically, I have an app that took a VB6 BSTR, zlib compressed it and then shoved _that_ inside of a VARCHAR In the DB
I imagine what's going on under the hood in the VB6 app is that the driver is doing conversion under the covers to convert it back to a BSTR automatcally, since that's the native type. Since that's a native COM Windows Type, I would settle for a raw hex dump of the contents of those columns and I would just parse it myself... alas, even getting that seems pretty tricky.
 

« first day (3140 days earlier)      last day (1802 days later) »