« first day (2197 days earlier)      last day (2734 days later) » 
00:00 - 16:0016:00 - 23:00

12:05 AM
\o/ story complete. All system tests passed. This was a long one.
 
 
3 hours later…
3:23 AM
morning all
 
4:21 AM
Well then the problem is clearly that one of the matrices in image_list isn't 3 dimensional, but the first one is.
 
4:47 AM
@Natecat Thanks alot, that was indeed the case ;)
 
5:03 AM
@Natecat teach us your basic error reading ways!
 
 
1 hour later…
sP_
6:30 AM
@Withnail Can you share your e-mail id so I can get in touch with you?
 
 
2 hours later…
8:03 AM
You will probably find a room owner will delete that message - pasting code into the chat isn't helpful. See the room rules for further guidance - and welcome to the room
 
8:16 AM
@holdenweb OK, got it, thanks for the headsup. (I found the cause though!)
 
9:04 AM
Great
 
9:21 AM
How is everyone today?
It's friday. No server alerts (yet), nothing on fire (yet). Today is A Good Day so far.
 
@sP_ I can, but in relation to what we were talking about, if we go looking for someone (in Jan), it'll be on site, and I'm not sure that'll be any use for you? :)
 
hehe Finland is the 6th least empathic nation among 63 in a new research, above Lithuania, Venezuela, Estonia, Poland and Bulgaria.
somewhat surprising that someone ranks even lower.
 
9:39 AM
cbg
@Kevin so JavaScript is better than Python?
 
@AnttiHaapala how's first? can we take a look at that ranking?
 
yes
 
@RobertGrant day or week?
 
9:53 AM
Go get some
@AnttiHaapala :-)
 
I am not sure if I have "strong knowledge of Python"
 
@RobertGrant ahh, that sounds awesome ;)
 
and I don't have a degree
 
is this your company?
 
I could be a web engineer for £80k
 
9:54 AM
Now I know that Antti's hatred of all things he hates at any one second is due to his wallet being far too heavy
 
It doesn't look for a degree, though?
 
@PeterVaro no, just spotted it
I only program Python professionally when I can scrounge up a reason to get away with it
 
but idk if I really would like living in London.
 
And by "professionally" I mean "getting paid for it" not "doing it well"
 
I don't apply for this kind of jobs actively because I am a terrible programmer'
feels like a waste of time
 
9:56 AM
Meh.
 
I found the process of applying for jobs a learning experience in itself
 
not bad gig
 
but
 
the code tests were instructive, and a good focus on being idiomatic and getting stuff done
 
9:56 AM
I am also surrounded by terrible programmers
 
also, applying for jobs is a skill in itself.
I applied for... about 8? I'm definitely better at this than i was when I started.
 
right, I will apply for this one
 
I'll get you for coffee if you come over for interview. :)
 
(Also - hotjar are recruiting, and have an entirely remote team)
 
9:58 AM
lol, friend got Google to pay tickets from Helsinki to London, and hotel, for interview
 
I was about to apply for them when i landed current job
 
then he basically said "Meh"
 
what a great position to be in!
 
he was 99 % sure beforehand he was going to say "meh!"
 
Google is meh
but I would gladly work in that meh
because I am like a hooker
I saved my professor's lab session yesterday by fixing Linux servers
 
10:10 AM
\o/
 
the apt messed up some packages
and it turns out have no life and spending hours on breaking and fixing Linux OSs can be useful
*having
 
We give programmers a code test. One of them involves counting things. Yesterday's candidate got the logic more or less right, but the implementation was horrendous.
First of all he was testing for dict membership with key is in d.keys().
 
That's panic, I think :-)
 
Secondly, rather than counting directly he was creating a list against each key and appending True to it for each occurrence. A final pass replaced the lists with their lengths.
We do make allowances for "exam conditions" because we ask them to code on their own with pen and paper only.
 
That sounds worse
Yeah that second one is just weird
 
10:22 AM
yeah
 
But the team agreed that this wasn't acceptable.
 
I discovered default dict a few months back
it's so cool
 
sum(list(map(int, array_of_bools))) # (-:
For when regular unnecessary just isn't enough
 
I asked the candidate if he'd learned Python by writing Django sites (which leads some people to think they 'know' Python without having understood the principles of the language). Apparently not.
 
@RobertGrant my wallet heavy? lol.
I wish
I could paraphrase Holden here...
 
10:24 AM
@khajvah if you like defaultdict(int) you will love collections.Counter()
 
except, I am not famous
 
I love collections.Counter
 
(though, in some circles, infamous)
 
It's that bad boy look that you show off in your SO profile pic, antti
 
@holdenweb yeah I use it too
 
10:29 AM
@RobertGrant it is 10 years old now, I've never changed my gravatar, because I am lazy.
 
He's probably bald with no teeth by now, then
My own avatar is also somewhat outdated, but it's good enough to let people recognise me
 
I am recognizable from the pic if you're not face blind
my twitter avatar is only 4 yrs old though
btw, zed a shaw is much better as an artist than a teacher :P
 
Something of a weird one here
I'm working in a virtual environment in which Jupyter is installed.
The VE uses Python 3.4.3. When I run jupyter notebook I get a server that offers a 3.5 kernel and a 3.7.0a kernel, but not 3.4.3. Which means I can't access the modules in my VE. What am I doing wrong, please?
 
@AnttiHaapala damn how old are you?
 
@khajvah 34
33.95
 
10:36 AM
so your birthday is in a week?
 
in ~0.05 * 365 days
 
lol typed 0.02 in the calculator for some reason
 
@khajvah hint, we have a birthday calendar @sopython.com :P
I am stupid enough to defame my real name online, anyone with brain can google for all my details anyway :D
 
I am also that stupid
 
they can find my home address as easily
anw did I hbd rob?
can't remember anyhow
well, if I didn't, happy belated bd, if I did, happy birthday in advance @RobertGrant
 
10:58 AM
Whats really happens when we use * and ** in python in a function?
 
That's pretty easily searchable on the main site: stackoverflow.com/questions/36901/…
 
getting downvoted for asking silly questions :(
 
Might indicate a lack of independent research on your part.
It's always better to say "I found this, that isn't quite what I want" or "I tried this, but the result was X instead of the Y I was expecting"
People are often more willing to help if you can demonstrate you have already tried and failed to solve a problem
 
@AnttiHaapala haha thanks :-)
 
11:06 AM
can i get someons maii id to clarify my doubts in python.. if this is an unnnessesary qustn forgive me..
 
@project_ananthu also, it might be that your question is too broad...
@project_ananthu like github.com/alex/what-happens-when
 
That's top quality snark tbh
You can ask questions here, but look at the room rules, don't post big screeds of code. If it's a conceptual qu, people may help.
 
@AnttiHaapala meh, doesn't get into kernel
 
11:23 AM
@project_ananthu we appreciate if you have time to at least read the official Python tutorial. * and ** is discussed there too; it is easier to explain a piece of code from tutorial, or meaning of a certain vaguely worded sentence, than "what happens when we use * or ** in a function"
 
@AnttiHaapala just started to learn python .. sorry
 
that's ok, just try to skim through the tutorial too
 
sP_
@Withnail That's why I would like to know more! If possible I would come there!
 
@AnttiHaapala are you a room owner?
 
@khajvah yes, for now :D
@khajvah howso?
 
11:43 AM
?
 
why are you asking if I am a room owner?
 
dunno. saw your deleted comments and just wondered :D
 
@khajvah hint, name written in italics
 
ah. I thought it showed the level of coolness
 
only if upright is cooler than slanted.
I never kick anyone :D
the most useless room owner, I am way too tolerant, except about Python 2. Or PHP.
 
11:49 AM
yeah maybe that's why I never noticed
@holdenweb I learned Python by writing a Django site :(
 
Lem
hi, i`m new in python, i have a question:

I need to handle django delete item when user delete image in admin panel, here - http://pastebin.com/Ja71sK5R i write some code , but it not work , my method 'delete()' not work

can someone help me or suggest something?
 
@khajvah ^
 
:)
 
self.image_list is a list and lists don't have a delete method. Perhaps you meant to do del self.image_list?
Or perhaps self.image_list = None and let the garbage collector deallocate it for you
 
12:05 PM
@Kevin shh, this is a django model
doesn't work intuitively
or to write it in Python,
(not isinstance(django.db, Pythonic)) is True
 
serious problem: my gunicorn/uwsgi server spawns 100s of threads
and doesn't clear
 
hehe one of my friends is going to be an official OSCE observer to US elections...
 
got an impressive itinerary for 2 weeks
"Helsinki-Frankfurt-Austin-Orlando-Savannah-Charleston-Richmond-Orlando-Tampa-Mi‌​ami-Key West-Orlando-Washington-Frankfurt-Helsinki"
 
god
 
12:10 PM
I didn't know they were letting Frankfurt vote in the US elections. Seems strange but I never did understand politics.
 
can't wait to hear his comments about the organization of elections in Florida, if they're anywhere near the thriller-mystery of 2000
@Kevin :D
 
0
Q: uwsgi spawning too many processes

khajvahHere is the uwsgi configuration file. [uwsgi] chdir = /home/ubuntu/mira_website module = miraFrontEnd.wsgi:application master = true processes = 2 enable-threads=true max-requests = 300 vacuum = true http = localhost:8080 pidfile=/tmp/mira-master.pid daemonize=/var/log/wsgi/mira.log This confi...

repost my previous question
 
@khajvah place a bounty too
 
is 200 enough?
 
dunno, I can't answer that :d
100 is the minimum, you could do that
 
12:14 PM
50 is the minimum
 
but it is in no way guaranteed that you'd get good answers
@khajvah 100.
your own question?
or was it 100 if you answered
 
Boolean Addition Assignment in Python unknowingly edited his code sample into something that completely solved his original problem. I love a happy ending.
 
@khajvah ok then :D 50
 
I really really need this :D 200 is good
 
12:15 PM
but yeah, bounty doesn't guarantee anything besides visibility
@khajvah remember that you need to increase the bounty for next period :P
 
so if you start with 50, next you can put 100
cbg
 
@AnttiHaapala it's ok, I will start rep whoring in SOD
 
12:35 PM
what does uwsgi do when it receives a request?
does it spawn a single thread?
I have a request that ends up giving birth to multiple threads
but my application is singlethreaded
I don't manually create threads
 
doesn't uwsgi spawn new threads ...
is it just the max requests?
if you lower it to something sensible like 10, does it create 10 threads?
and instead you should set the listen backlog somehow?
 
the cause is my code iteslf(I think), because it doesn't create new thread for every request
for simple requests, it doesn't create anything new
but for curtain request, it might create like 5
but I don't do multithreading anywhere
@AnttiHaapala if I lower max-threads it will still spawn new ones and then when it reaches the limit, it reloads the server
 
ah :D
 
I wonder what can spawn a new thread inside my application and then stay awake
pool.ThreadedConnectionPool
psycopg2 is the devil?
 
12:51 PM
The result, the explanation and the dupe don't match each other. Things are not quite right here. — idjaw 20 secs ago
?
something does not seem quite right there
 
is there a way to watch the traceback while on a breakpoint in pycharm?
 
voting to reopen this. They showed code, and what they are trying to do does not match the duplicate.
 
@idjaw yes... but ...
sorted doesn't change anything, and sort returns None...
which one is it a duplicate of now?
 
that's fine. It's just not a dupe of that. So, need to find the real dupe now :)
I actaully can't find a good one
 
I downvoted it
 
1:02 PM
Oops I answered it teehee
 
141
Q: Sort a list of tuples by 2nd item (integer value)

AmythI have a list of tuples that looks something like this: [('abc', 121),('abc', 231),('abc', 148), ('abc',221)] I want to sort this list in ascending order by the integer value inside the tuples. Is it possible?

this one?
 
That looks like the same as the thing it was originally closed as a target of.
 
ah yeah...
now I see...
this is rather stupid question
it took quite some time to understand that they're talking about columns...
 
It's kind-of-sort-of a dupe if you consider "transpose the list first" to be a trivial little detail not worth distinguishing
 
because if you pprint that list
the [5, 4, 3] is a row.
 
1:07 PM
Yeah OP's terminology is... Unconventional.
 
Yeah. that's why i was a bit confused. The original question had the wrong explanation, the wrong dupe was provided
 
I guess you could argue that row-major order vs column-major order is an implementation detail, so we can't really know which one is the column and which one is the row
I'm sure lots of people think of computer memory as a big column with 0x0000 at the top and 0xFFFF at the bottom, in which case a (3,4,5) is a column ;-)
 
I am rewriting
@Kevin edited
 
It's a shame neither of his attempts actually produced useful output, so my "you were pretty close" statement is a little white lie.
He wasn't close, but he was close to being close.
 
@Kevin you should really remove it :D
because it is not exactly "little"
@Kevin close?
he just had cargo-culted some answers from stack overflow, zero genuine own attempt :D
 
1:15 PM
Ok, but I'm going to keep the "the attempts you made will..." sentence because that's still true. Both of them do produce a list sorted in some way. It just happens to be the case that neither one of them show up in stdout.
 
of course :d
@Kevin you could also add that sorted returns a new list... l.sort modifies l in place and returns none
@Kevin also, itemgetter is way faster than lambda
 
My computer is slow, and I want everyone to be as miserable as me, so it is logical that I recommend lambda.
Topic change. I downloaded the "Google sheets" app today and it showed me spreadsheets that I had created five years and two computers ago.
 
I don't want cloud integration, I want to put text in little rectangles.
All part of my continuing quest to have a nice way of taking notes on my phone. The built-in memo app has a weird system where every time I try to make a new memo, it makes a new page in the existing memo, and vice-versa. I just want .txt files ;_;
 
1:34 PM
wat?
nvm
bug in my code
 
cabbage
 
user559633
cbg
 
DSM
1:50 PM
Morning cabbage.
 
2:02 PM
I'm going to be annoyed if Removing pairs from a list in python replies to my comment saying "I only said that was like the answer. That's not the actual answer. I just meant the result should be a list of strings"
 
Oh joy. Fourth meeting today. Looks out of window and sighs
 
Be strong.
 
user559633
Just me or unsalvageable? stackoverflow.com/questions/40178570/… yeah [tag: cv-pls]
 
Shortening "for example" for "f.eks". That's a new one.
 
FOUND THE LEAK FOUND THE LEAK FOUND THE LEAK
the 200 bounty was unnecessary though :(
 
2:06 PM
Omg, what was it?
That's been going on forever. Can you tell me and I'll answer and have the bounty? one of us might as well have it...
 
user559633
Heh.
 
DSM
@Kevin: I think I can follow his goal. Just kill pairs with the same leading char moving from left to right. You wind up with uncancelled 1g, 3g.
 
@Withnail the cache object was listening to redis for changes
and it was being created too many times
@Withnail :D the bad thing is, the info in the question isn't remotely enough to answer
 
I don't think I follow. 1a and 1b have the same leading char, so remove those. 2b and 3c don't have the same leading char, so keep those. etc... Then the answer is ["2b", "3c", 2d", "1g"]
By "leading char" he means "the first character in the string", not "the first alphabetical letter", right?
It can't be the latter though because then 3c would definitely be in the answer because it's the only C in the input
 
I could just appear a little bit psychic.
 
2:12 PM
Ok, now I see answers that produce the desired output, I see what he wants.
2b and 2d get removed even though they aren't adjacent.
Likewise for 3c and 3d.
 
@Withnail I am so damn stupid. All I had to do was adding self.listener.stop() in __del__()
 
@khajvah yet you're relying on __del__
 
@AnttiHaapala nah, not any more
but
well the actual fix is design fix
the __del__() would fix it though
@Withnail I will post the cause of the issue, you can post the solution and get free 200 points
 
user559633
make him earn it with a better solution than using __del__
 
cool
 
DSM
2:19 PM
@Kevin: yeah, he never said the pairs had to be contiguous.
 
But pairs are supposed to come in pairs ಠ_ಠ
 
user6568562
Cbg everyone
 
DSM
@Kevin: a couple separated by distance is still together in their hearts.
 
Does anybody here use Luigi?
 
user6568562
*kind of
 
2:30 PM
It's a basic question and it's driving me nuts.
 
> Just remember every time you look up at the moon, I too will be looking at a moon. Not the same moon, obviously, that's impossible.
 
In a task, I have def output(self): return luigi.LocalTarget('myfilename.h5'), and in def run(self):` I have store = pd.HDFStore(self.output(), table=False). I get the error, Expected bytes, got LocalTarget. I'm expecting self.output() to spit out a file path, but clearly I'm wrong.
 
Knowing precisely nothing about Luigi, I would inspect the LocalTarget object to see if there's an attribute or method that will give you a useful file path.
 
Morning cabbage.
 
Thanks Kevin, I found this: luigi.readthedocs.io/en/stable/api/… Maybe it'll be helpful
 
2:37 PM
1
Q: uwsgi spawning too many processes

khajvahHere is the uwsgi configuration file. [uwsgi] chdir = /home/ubuntu/mira_website module = miraFrontEnd.wsgi:application master = true processes = 2 enable-threads=true max-requests = 300 vacuum = true http = localhost:8080 pidfile=/tmp/mira-master.pid daemonize=/var/log/wsgi/mira.log This confi...

dunno if I explained it in a good way
 
user6568562
Yo Morgan
 
but there it is
 
user559633
cbg 2: the cbgening
 
user6568562
@Kevin They had to use the term cloud since sending data to a farm upstate does ring a painful bell
 
user6568562
Yo tristan
 
2:41 PM
Hey all
 
Figured it out, supposed to use self.output().path. sheesh
 
hoping for some help, I'm fairly new to python.. Using the requests module to GET from the github api, cannot for the life of me get it to send parameters
according to docs.python-requests.org/en/master/user/quickstart/… I should just add json=payload to the requests.get(), but this hangs my script and it won't output anything - even a print on the first line
(no error codes... :/)
Sorry, supposed to use params=payload. json=payload works but the api doesn't return what I expect..
Here's my script: pastebin.com/DPJReBLe
Looking now and using the json parameter and printing r.urlshows that the params weren't appended to the querystring
 
Does it still hang if you supply the timeout parameter?
 
Just can't understand why it's locking up when I use params
will add it now and try
 
It's a bit unusual that a hanging get call would prevent a print statement on line 1 from executing. Unless your stdout isn't getting flushed in time... I never have problem with that myself but some people do
 
2:57 PM
cbg
 
No joy :(
This all seems very strange..
If anyone's running docker it should be pretty easy to clone & run my app: github.com/Billy-/IssueTrends
If anyone's feeling generous with their time
or just bored :p
 
@vaultah you're no longer a blank canvas!
 
meanwhile I'm still trying everything I can :p
 
@idjaw I already miss it, to be honest :P
 
@vaultah It is going to take some getting used to. But, I for one welcome you in your blurry glory.
 
3:07 PM
Ok, should have guessed.. Problem with the logic in the loop that GETs the different pages
 
I just missed that
 
user559633
made the predictable joke on "blurry glory"
 
Where my mind is going is probably what your message was hinting at. And I will leave it at that
what's up @tristan :)
 
user559633
javascriptin'. you?
 
end-of-agile-day. Worked a lot of hours today. At home, reading through all the things I ignored this week personally and trying to just make sure last bits of code make their way in to master, because you know, the burn down chart is your measurement of success
 
3:17 PM
I'd prefer to say that operational systems are the measurement of success, and the burndown chart is to help predict when you will get there
 
user559633
i'd say cash in the bank is the measurement of success
 
Cold hard cash is good, but you want your cache to be hot and fluid.
 
My comment was more of a silly joke. The combination of working things and money is the real deal.
 
user559633
@idjaw Oh, I caught it, I just decided to follow the "well, to be serious" thread
 
user6568562
What ! I thought number of motivational quotes over sunset backgrounds on fb timelines is the true measurement of success : /
 
3:21 PM
internet chatting is hard. Is there a course I can take?
LCTHW
wait...that's done
hmm
 
user6568562
I'm afraid not. Either you have procrastination in you, or you don't
 
Seeking a dupe target for Changing list while iterating
The old "why does an item get skipped after I call remove in a for loop?" question
 
3:41 PM
looks like Padraic took care of that for you
cbg
@idjaw Learn Trolling The Hard Way
 
Padraic's a pretty cool guy, eh closes dupe posts and doesn't afraid of anything
 
grr my cat tries to catch the mouse pointer
he already jumped into the screen a few times
 
@WayneWerner yes! Perfect
 
@vaultah he's just training you to use Vim ;)
mine tries to catch the fly that was buzzing around here
 
heh, I hope I'll never have to use Vim
or emacs
 
DSM
3:56 PM
I come back and people are harshing on the One True Editor?!
 
I agree. I hope you always have neovim available!
 
this is too much for me to take
I'm going to enable vim mode in PyCharm, just because.
 
someone asks me "how can I do X with docker?"
responded with docker -help | grep X
 
00:00 - 16:0016:00 - 23:00

« first day (2197 days earlier)      last day (2734 days later) »