« first day (2177 days earlier)      last day (2764 days later) » 
00:00 - 18:0018:00 - 00:00

wim
12:08 AM
Because you want to use your own language?
 
Are you a monster?
every time somebody creates "Munkaidő nyilvántartás 2016 december .xlsx" a bunny dies (and not just becasue of incorrect hyphenation and whitespace and MS Office)
 
wim
Disagree. If software breaks because of a weird filename, that is the bug in the software. There's nothing inherently wrong with non-ascii filenames. There is something wrong with denying the majority of the world from using their mother tongue when working with computers and/or the internet.
 
I'm not talking about breaking; I'm talking about my eye twitch every time I see "fájl" written someplace (it's the Hungarian transliteration of file)
but sure, just because I loathe accented and whitespaced file names doesn't mean nobody can use them
People are entitled to their opinions even when those are wrong and stupid.
 
wim
12:28 AM
are you calling yourself wrong and stupid, or other people wrong and stupid? ;)
 
I'll just shake my magic 8-ball....
it says "the night is dark and full of terrors"
I'll just go to sleep then
rhubarb
 
 
2 hours later…
It's kind of a duplicate of "How do I iterate over a list?" and "How do I use a dict?" combined. — Aaron Hall 6 mins ago
 
3:07 AM
o/ good evening
 
@idjaw hi
 
@AaronHall hey! how are you
 
I'm quite well thanks. Didn't we link up on LinkedIn? You can follow my latest exploits there.
Yep, we did! :)
 
cool! :) will check that out
 
I finally made a website too. It's an early draft, I need to get around to pushing the update, but when I focus on it, I'm just writing, and not pushing.
I decided to go with emacs orgmode as my technology. I can't bear to write in plain html.
There's just something about emacs that I really like.
 
3:20 AM
I never really put too much focus in to emacs
I just fell in to vim and really enjoyed it
 
I like how emacs is written in mostly C and extended with lisp.
But it's really like an operating system as opposed to an editor. I use vim to drop into quick edits myself.
I was using spacemacs for a little while, then switched back to vanilla emacs when I got a new laptop, but I miss the vim keybindings a bit. I went through the tutorial again, and I have no idea why people would use ctrl-b and f instead of the left and right arrow keys or vim keybindings.
 
heh...I actually just discovered for myself that PyCharm has vim mode. I had absolutely noooo idea
 
I've refused to try PyCharm. I'm sure it's great, but with emacs at home and the eclipsey one at work (and now I'm starting to use Jupyter notebooks for teaching) I just don't want to bother with learning another IDE. Plus I'll have to help everyone when they have issues if I learn it. I'd rather not.
Supporting IDEs doesn't scale, to me. Unless it's emacs. Maybe. I'd like to teach people how to use emacs.
 
3:36 AM
cbg
pycharm also has eclipse mode
eclipse is IMO ok for java...
but for python....
bleh!
 
It's custom C++ tied together with Python, architected by an early Eclipse contributor/author. I heard speculation about replacing it with Eclipse, but I don't see why we should.
 
@wim the distribution name should match the import name...
there was a pep about it but it was withdrawn
 
Cabbage
I'm amazed to see you here, Antti. Shouldn't you be unconscious? :)
 
well technically I am
I am worried that I will start having a hangover soon
 
3:53 AM
Just keep drinking water. Some vitamin B & C may also be a good idea.
 
:P
or actually juice
 
sounds like a troll
ah no
it is little-endian issue
 
@AnttiHaapala True, and I guess if they're using Python, they might be using struct, and just need to fix their format string. But I guess we'll never know, because they've deleted the question.
 
4:14 AM
anyone in here familiar with jquery?
 
This is a weird puzzle-type question: stackoverflow.com/questions/39802857/… I don't see how the function can raise an exception, no matter what you put into the dictionary.
 
@DataDev I've heard of it.
It's the one that has all the things, right?
 
@DataDev Some of the regulars here are familiar with jQuery, but questions about it are off-topic, unless they somehow relate to Python. Please read the room rules.
 
I was going to point to the Javascript room, but I forget how because it's not in my starred rooms.
 
 
1 hour later…
5:43 AM
help
 
5:58 AM
Cabbage :-)
 
6:22 AM
resource req, asking for opinions stackoverflow.com/questions/39803227/… Also see the OP's last comment...
 
...and gone
 
6:43 AM
cbg
 
 
1 hour later…
8:03 AM
re-cbg
 
re-cbg
that went well.
 
Any thoughts on that puzzle question I linked earlier? The OP accepted a solution using a class derived from dict, but that seems like cheating to me. Is there some weird object that can be put into a normal dict that will raise an exception when an attempt is made to access it?
 
Override the dunder hash so it can only be accessed once to store the dict maybe
By having an internal counter that is incremented when you call the function, you could have it raise if counter > someVal
Not perfect due to lack of private variables, as the counter can be manually reset
 
8:25 AM
@Ffisegydd Yeah, I tried using a counter in __getattr__, but couldn't figure out a way to make it work. I also played around a bit with gc.get_referrers.
But I'll see if I get any joy from __hash__
Hang on. __hash__ is called on the key, not on the value, so that's not going to work. :)
 
8:40 AM
@PM2Ring not when accessing but you could make any other operation on that object to raise :/
 
9:15 AM
@Ffisegydd new job is entertaining and horrifying in equal measure. I've spent the first two days saying variants on "What the hell does this do? Why is it done like that?"
 
Thanks for the reply! Ya, I do know that dict.get(key, default_value) doesn't raise any exception but this question has been asked in a seminar since then I am wondering how this can be achieved. I am allowed only to change dictionary "a". — raghubasireddi 5 hours ago
@PM2Ring ^
 
The horror! Watched the new MacGyver and now I'm afraid the 80's will come back stronger than ever.
 
9:34 AM
@RomanLuštrik :?
 
user6568562
Morning everyone !
 
user6568562
@AnttiHaapala How's that hangover going ? Manageable ?
 
@randomhopeful no hangover
 
user6568562
Nice !
 
He's still drunk.
 
user6568562
9:44 AM
Hahaa : D That's a possibility
 
9:58 AM
@randomhopeful Here's another Oz track from the 80s with a nice bass line for you: the somewhat controversial Man Overboard by Do-Ré-Mi. The singer, Deborah Conway, was also one of the co-writers. Wiki says: "It is the first Australian hit to include lyrics referring to anal humour, penis envy and pubic hair".
 
The 80s will never die!
 
user6568562
@PM2Ring : D A first is a first. I'll check it right away
 
Sadly, the success of Man Overboard led to Deborah Conway being snapped up by a big record company and the breakup of Do-Ré-Mi. She went on to have a string of commercial successes, but they were all pretty tame compared to Man Overboard.
 
@Withnail I think that is the way most corporate jobs start - the answer to why is usually "we had a problem and needed a quick fix and well, band-aid after band-aid after band-aid isn't very strong and we're afraid to really fix it"
 
10:23 AM
Tbh, it looks quite interesting.
I was mildly pleased that they'd had a dev agency come in to evaluate the state of the system and a) I know them, they're good guys, b) they said the same things I did (got their report at the end of day 2, and c) I got the linux version working in a day and a half and it took them 4. :D
Well, certainly, they billed us for 4. ;)
 
user6568562
@PM2Ring I hear you. So many terrific artists that wasted their talent on ego related shenanigans or unfortunate circumstances. I dig Man Overboard a lot
 
user6568562
Her voice is so powerful in it. And that nice bass line is a treat : D
 
@randomhopeful To be fair, it wasn't totally Deborah's fault: the record company misled the band, and initially told them they just wanted Deborah to do a solo record, and after that the band could get back to doing their indie-sounding stuff. But that didn't happen.
 
@RomanLuštrik now watching the MacGyver pilot...
... this is sooo bad
 
user6568562
@PM2Ring I see : /
 
10:40 AM
sigh. I've just spelled museum with an R. Need coffee.
 
how does one spell a museum with r
 
user6568562
musrum if it's related to key alignment
 
ЯEDЯUM
cabbage
 
user6568562
Yo Andras !
 
@randomhopeful Here's another Aussie indie rock song with a solid bass line and controversial lyrics, Bower of Bliss by Clouds. I love the girls' quirky vocal harmonies.
 
10:53 AM
@AnttiHaapala muserum? :)
 
user6568562
@PM2Ring Yeah, I like it !
 
It's pretty wild. :) I must admit I was a bit surprised when I first heard it, late one night while watching music videos.
 
Roman wins. :)
 
user6568562
@PM2Ring Yeah I can imagine that. I had a similar feeling when I first listened to Electric Six - High Voltage. Quirky vocal lines and out of this world crazy vibes
 
user6568562
@Withnail Man, I was that close !
 
user6568562
11:03 AM
Gotta get back to that learning thing. Laters everyone [ :
 
take it easy
 
@randomhopeful Thanks for reminding me of that one, I hadn't heard it for years.
 
11:33 AM
Hi , I want to convert this list of list of tuples to 2d numpy array, how can this be done? please help thanks a lot.
X = [[(0.5, 0.5, 0.5), (1.0, 1.0, 1.0)], [(0.5, 0.5, 0.52), (1.0, 1.0, 1.0)], [(0.5, 0.52, 0.52), (1.0, 1.0, 1.0)], [(0.52, 0.52, 0.52), (1.0, 1.0, 1.0)], [(0.52, 0.52, 0.52), (1.0, 1.0, 1.0)]]
np.asarray([sublist for sublist in X]), will get a 3D array which I don't want to.
 
user6568562
@PM2Ring Yayah !
 
user6568562
I would like to understand better the lexicographical order in Python. A reading material would be so nice. Here's what I don't understand :
 
user6568562
>>> 'abc' > 'xyz'
False
 
user6568562
Shouldn't it evaluate to true, since order goes : Alphabetical while Lower case > Upper case ?
 
@aBiologist how should that be a 2d array?
 
11:45 AM
do you want the look of the desire output @AndrasDeak?
 
no
just an explanation of how you want to reduce the dimensions of your data
a list of lists is a 2d array
if you have one more level of nesting, it's non-trivial to have it as a 2d array
so you have to flatten it out somehow, which you have to specify
what are columns, what are rows?
Do you get what I mean?
 
user6568562
Oh I get what I got wrong. It's actually reverse alphabetical order while Lower case > Upper case. I should've thought of it since 26 is obviously greater than 1
 
hmm recommendations for an action film? :D
 
newer marvel ones?
or deadpool
or Edge of Tomorrow which is surprisingly good for a Tom Cruise movie
 
@AndrasDeak we've watched all of them...
 
user6568562
11:49 AM
@AnttiHaapala Beasts of no nation, man ! And if you want action without the based-on-true-events stuff, then Edge of Tomorrow for sure
 
user6568562
@AndrasDeak Eyyy, gimme that five : D
 
and ack for edge of tomorrow
 
*gives five*
 
user6568562
No ack, come on. The time warp thing or whatever it's called was decently done
 
gotta put that beasts of no nation on list, but perhaps something lighter today :D:D
 
11:50 AM
@AnttiHaapala The Last Witch Hunter?:D If you're into senseless Vin Diesel badassary
 
anything goes today :d
 
user6568562
@AnttiHaapala Do tell me what you thought of it, afterwards !
 
user6568562
Laters peeps
 
I can watch almost everything, but not adam sandler :D:D
 
The columns are the first and second elements of the tuple , namely (0.5, 0.5, 0.5), (1.0, 1.0, 1.0) and the rows are the list that holds the tuples for instance this [(0.5, 0.5, 0.5), (1.0, 1.0, 1.0)] @AndrasDeak
 
11:54 AM
@aBiologist np.array(X).transpose(1,0,2).reshape(2,-1)[0,:] might work
unless I misunderstood your vague description of the problem
the result will be 2x15 in your example
but I suggest that you try these things with less trivial dummy data to see if you screw up something
@AnttiHaapala so if you haven't seen The Last Witchhunter, I recommend it, good way to waste two hours
especially if your bar is "anything above Adam Sandler"
@aBiologist if I misunderstood and you want to have 6 columns from 3+3 in your tuples, then it's even simpler: np.array(X).reshape(len(X),-1)
 
@AndrasDeak "anything above adam sandler, new macgyver, gravity and argo"
 
so I guess witchhunter is above :D
 
definitely!
 
it doesn't mean that I don't enjoy good movies and would rather watch good movies but it is quite seldom that I am bored by any movie :D
 
12:01 PM
I wouldn't even call that a bad movie, but some people expect way too much from the wrong kinds of movies
 
@AndrasDeak its 2 columns and 5 rows
 
but I cannot stand movies like Gravity or Argo that repeatedly say that this is a true story or this is how physics work...
 
@aBiologist that's 10 numbers, you have 30.
@AnttiHaapala nobody said that physics worked like that...I hope
"Based on a true story" = the writer heard a story which sounded cool and it inspired them to come up with a heartwrenching new story, truely
 
like, I enjoy many films based on true stories as well...
for example the walk.
but argo is just plain bad bag of badness
it is good if the film makes a simple story more complex
but to make a complex story more simple...
pfft
 
@AndrasDeak Each of the column has three values and so that 3 * 2 * 5 =30
 
12:10 PM
you want a tuple-valued array?
don't do that
 
Why do you recommend instead
I mean , I want to at least have so sort of comparison between the column 1 and with 2 by their tuple-values
 
3d array...
then use all(col1==col2) with an axis speification
 
When using Numpy it's a Good Idea™ for your base array elements to be Numpy's primitive data types. Tuples are not one of those primitive data type, so you lose most of the benefits of using Numpy if you make an array of tuples.
 
The problem I am doing this is because I am using Pylearn2 to train my dataset and the require 2D array
 
...
you have an XY problem, please fix
 
1:19 PM
rm(XY). Done.
 
1:53 PM
saturday cbg everyone o/
 
cbg
took me a while to realize what's off
I wonder if any of the mathy peeps will prove me wrong:D
 
Cabbage
 
o/
Is there a good dupe target for any? stackoverflow.com/questions/39807545/…
 
any good dube target?
 
Waits till there are 5 answers before hammering
 
DSM
2:18 PM
Morning cabbage for all.
 
morning cbg DSM
 
user6568562
Morning DSM [ :
 
Cabbage \o
 
DSM
@AndrasDeak: I think the final number the OP is looking for is smaller than you seem to find. I get around 5.1428977355299e+49287457.
Well, I should be clear: that's what I get for b. I'm too lazy to check to see how that relates to his recurrence. :-)
 
2:34 PM
well. rbrb for now
time to do saturday things
o/
 
user6568562
@Andras Deak The number of brilliant hungarians I'm learning about is increasing
 
DSM
\o
 
user6568562
Laters @idjaw
 
2:36 PM
cbg
 
@DSM possible, I ran it now during lunch and the log10 is 49287457.71120789
I wonder where it's off...
OK, it should be the off-by-one error
In [94]: math.log10(2)*(2**28) #k==28
Out[94]: 80807124.15573882

In [95]: math.log10(2)*(2**27) #k==27
Out[95]: 40403562.07786941

In [96]: math.log10(c)
Out[96]: 49287457.71120789
@randomhopeful haha, thanks, but I probably don't even have an Erdős-number;)
 
DSM
I think mine is 7, which isn't very impressive. I wanted to coauthor a paper with a math friend who was much lower but never got around to it..
 
user6568562
@AndrasDeak Well you're still at the start of your trek, so who knows !
 
user6568562
And thank you about the article, very interesting and didn't know of it
 
@DSM nice anyway
 
2:50 PM
@randomhopeful well I'm a physicist, so odds are I might never enter the same network as Erdős:)
and yes, @DSM, that's awesome!:D
 
FWIW, Vi Hart's Erdős number is 3, Natalie Portman's is 5, and Danica McKellar's is 4.
 
I've only coauthored one paper...
I am pretty sure I don't have the number :P
 
I just answered a combinatorial question. My code is O(2^n), so I'm wondering if there's something a little more efficient. :) stackoverflow.com/a/39807897/4014959
 
Israeli-American actress Natalie Portman has an Erdős–Bacon number of 7. She collaborated (using her birth name, Natalie Hershlag) with Abigail A. Baird,[26] who has a collaboration path[27][28][29] leading to Joseph Gillis, who has an Erdős number of 1.[30] Portman appeared in A Powerful Noise Live (2009) with Sarah Michelle Gellar, who appeared in The Air I Breathe (2007) with Bacon, giving Portman a Bacon number of 2 and an Erdős number of 5.
 
@PM2Ring tleon there too...
eager incorrect math answerer
 
3:01 PM
@AndrasDeak considering that Natalie Portman has got Erdős number 5 by coauthoring a psychology/neurology article, I wouldn't see it impossible for you to have one...
 
me neither, just unlikely:)
 
and you're from H, so chances are greater then
 
@AndrasDeak Ah, ok. I don't think I've run into them before. They agreed that their code is wrong, but haven't done anything about it. :)
 
DSM
Okay, I've confirmed I'm <= 7.
 
I'm a theoretician, so it's not that far-fetched that a coauthor of my coauthor wrote math
@PM2Ring same thing here, we've just met:P
@DSM is there some tool that tells you that?
I found one a few weeks ago, but it didn't turn up any results for my name (and we are many)
 
3:03 PM
@AndrasDeak there is no defined integer overflow in C++.
the integer overflow is explicitly undefined
 
yeah, I figured after their response
in hindsight I should've known that
 
DSM
@AndrasDeak: so was I-- there are lots of physics paths. You can ask MR I think, but for me I just remembered who my supervisor's best-connected author was and followed that route.
 
ah, too bad:)
thanks
it should be easy for me, with only 7 or so papers so far, I don't have that many co-authors:D
 
stop talking and start writing papers
 
heh, I'm on it;D
 
user6568562
3:08 PM
The internal handling of floor and modulus division of Python is pretty damn impressive. I wonder if there's some background story to it
 
@randomhopeful ?!
 
user6568562
@AnttiHaapala Ensuring that the remainder is always greater or equal to zero and less than divisor when divisor is positive. While remainder is always less or equal to zero and greater than divisor when divisor is negative
 
is it different from any other integer math?
 
user6568562
My math grasp is very basic, so I get impressed by these things. And by background* story I meant anything related to this
 
Which reminds me... I should test if q, r = divmod(a, b) is still slower than q, r = a // b, a % b in Python 3.6. I was most annoyed when I discovered that divmod's slower in Python 2.
 
3:12 PM
@PM2Ring How do you know so much about mental illness
Was your grandmother mentally ill
 
@randomhopeful the background should be how remainders work, right? x = m*y + r, where m is the integer divide, and r the remainder. For positive values it's most natural that the remainder is 0<=r<m, otherwise you could take one more y from x. I think it's straightforward to do it the same way for negative numbers...unless I misunderstood you
@Wally ???
oh, I remember you, cbg
are you at home?
 
Cbg. We were talking about mental illness yesterday.
 
yeah I found it
 
I'm in the mental hospital
 
@Wally I have suffered from depression & anxiety myself at various times. Medication has helped, but I haven't been on any medication for a few years. One of my sisters is bipolar, one of my grandmothers had depression (and was given ECT), the other was prone to anxiety and took endep for years. Plus I've had various friends with various types of psychosis & schizophrenia.
 
user6568562
3:16 PM
@AndrasDeak No, actually you got that dark spot right when you asked if it is something different from math. It didn't seem that straightforward to me : D
 
I see:D
are you familiar with the whole concept of division with remainder?
 
user6568562
Not well enough. The book I'm following left it there and jumped to bitwise operations, so I actually thought about finding more theory about division with remainder. If you got any resources or keywords I could use : P
 
@PM2Ring there should be, if you take numpy.argsort on the string, then find the longest monotonic subsequence of the indices. Wikipedia quotes that algorithm as O(N log N)
 
I am planning to import ESP8266 arduinos etc and sell them on eBay and Amazon
Form Aliexpress
 
@AndrasDeak Thanks. That sounds promising.
 
3:21 PM
@randomhopeful I don't think so, it's very instinctive for me. But the main point iswhat I wrote: you need to find m and r such that x = m*y+r. If you take a specific y, say, 3, then start looking at x values one after the other, you'll be able to "put one more y" into each x for every third step. So for x=0,1,2 you can't fit y in there. For x=3,4,5 you'll have m=1, because you can decrease x with 1*y, and the rest is 0,1,2 which can't be divided with y
 
@randomhopeful in every sane programming language the x = q * y + r holds for quotient and remainder of x and y
be the flooring, rounding rules whatever
 
@AnttiHaapala I think his main point is that |r| is always between 0 and |y|-1, instead of r being between 0 and y-1
 
user6568562
@AndrasDeak Spot on !
 
user6568562
@AnttiHaapala That I got, and it does look very sane to me.
 
so then you pick the rounding rule for division;
originally C didn't even define the rounding for negative
so you could have the python behaviour or then not :d
 
3:29 PM
@AndrasDeak Someone just found an answer with a Python implementation, so I hammered it. It feels a bit weird hammering a question I've answered, but I guess there's no point deleting it. :)
 
Thoughts on writing a canon dupe for asking for user input and looping until correct value provided? Answer will also include how to handle types through exception handling
Motivation is the 5 billionth time this question is asked stackoverflow.com/q/39808288/1832539
 
@idjaw Kevin's already done that.
 
@PM2Ring no, I think you're fine:)
 
Oh good!
@PM2Ring I'm on mobile so I can't do the needful. Can you fire away?
 
The link page is here: sopython.com/canon/8/…
@idjaw Sure!
 
3:33 PM
In computing, the modulo operation finds the remainder after division of one number by another (sometimes called modulus). Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n. For example, the expression "5 mod 2" would evaluate to 1 because 5 divided by 2 leaves a quotient of 2 and a remainder of 1, while "9 mod 3" would evaluate to 0 because the division of 9 by 3 has a quotient of 3 and leaves a remainder of 0; there is nothing to subtract from 9 after multiplying 3 times 3. (Note that doing...
 
@PM2Ring thanks putting that in my memory bank the next time that one comes up
 
user6568562
@AndrasDeak I get it better. Thank you, dude [ : Considering y the number of "steps" for r to reach x makes it clearer
 
no worries:)
 
niiiice
 
3:37 PM
Which is also a self-answer from Kevin.
 
I see that all the time
 
3:54 PM
DST is about to start here, so I better go and try to get some sleep. Rhubarb.
 
Cya
 
user6568562
@PM2Ring Laters ! [ :
 
@PM2Ring good night:)
 
4:40 PM
@idjaw wasn't there one
 
@AnttiHaapala yeah. PM pointed me to Kevin's solution for it. Glad there is one. Going to remember to use that going forward. That question comes up several times in the month of Sept/Oct :P
 
what is POB?
 
4:53 PM
Primarily Opinion Based
 
I would say it could easily lead to opinion. However, at the same time is it wrong to have different implementations on how to support that requirement?
 
user6568562
@BhargavRao I don't know. What's your opinion on that ?
 
user6568562
Screams : Those rotten tomatoes only make me stronger !
 
@randomhopeful Throws another rotten tomato
 
@BhargavRao Pretty much what OP is doing is fine. An alternative approach to that would be to create a custom exception that inherits from the base exception that they want to catch and add their extra details.
But the result ends up being the same. The only thing they gain is something that provides some extra details around the nature of the exception with respect to their own code
But even then, it can probably lead to opinion that maybe you shouldn't create your own custom exception and let Python tell you what is exactly going on :P
so....maybe it is opinion after all
this has been another episode of idjaw thinks out loud.
just voted opinion based :P
 
4:57 PM
It's opinion based for sure.
It made idjaw think out loud
 
haha
We could look at it that way too!
haha @BhargavRao the last line of the person who answered the question
> Don't mind me. It's an opinion, after all.
 
Haha, Epic :D
 
5:28 PM
Anyone have insight on how to best deal with this
OP asked a practically identical question to that already, got answers. But then posted it again...but seems to be implementing it another way and now saying they can't use certain modules. i.e. probably homework assignment and now they realize they have extra restrictions.
 
Close as no MCVE
 
I think I know what's going on here. Homework assignment has questions about traversing the data structure in different ways
yeah closing
 
No Cvs left :(
 
5:49 PM
Why is tristan doing a silent stream?
If I wanted to watch someone play ftl badly I'd watch myself. I watch for the snark!
 
Maybe he doesn't know he is streaming!
:P
 
00:00 - 18:0018:00 - 00:00

« first day (2177 days earlier)      last day (2764 days later) »