« first day (2068 days earlier)      last day (2886 days later) » 

user559633
12:00 AM
i kind of did yesterday. played in scheme a little, but didn't get anything done. literally procrastinating on my nerd book club and end result procrastinating on work.
 
I was trying to find the video from futurama with the robot lincoln with multiple personalities (all Lincoln) but failed
so disappointed
also, reset days are important - my current research is driving me so insane I forced myself to take a day off yesterday and will today
 
user559633
and yeah, i'm a "vegequarian". i went back to meat-eating land for 2 meals and came back -- not sure what happened
 
user559633
brb
 
....is it weird that I have to force myself to take a day off?
 
no. The fact that you are aware that you need to take time off is great.
 
12:03 AM
when I kept kosher I was a "vegetarian by necessity" a lot of the time
 
I came to the realization this morning that I have way too many meals with meat in it
 
yeah, that came from a lesson earlier in life when I didn't and crashed hard
 
I do a really good job at alternate ways of getting my protein. But recently, it's been a bit excessive
@JGreenwell Yes. Same here. It was a horrible experience.
 
@RobertGrant I started my BS in computer science way back in 2002 at a community college but moved to Information Systems Management when I finished it (had plenty of experience in software development so made more sense).
Found I loved data and analysis and moved to straight Information Systems for my MS - current focus is limitations of machine learning (ML) algorithms, ML for IoT, and improving methods for NLP
 
 
1 hour later…
user559633
1:13 AM
re: too many meals with meat in it -- same. i just started thinking about chicken as filler, basically.
 
I've been trying to incorporate more beans and legumes
I love lentils
 
I like to do a baked falafel when I want healthier or more vegs
I also do nachos with the meatless scrabbled "beef" for the kids (not that this is healthy due to cheese and chips but more vegs at least) and they seem to like it
 
1:38 AM
python manage.py sqlmigrate polls 0001
cant run this command
i have an unofficial sql connector
 
1:53 AM
Has anyone used the SMTP lib package here?
I'd like to know if it's possible to specify an SMTP server.
 
Do you mean besides localhost? I believe the server is the first argument.
 
hobenkr, that's right.
I just saw that on the docs, sorry should have checked that first.
Guess I have to figure out a way to specify credentials now, thanks.
 
In the past I've used it to send mail through google's server and there seemed to be an abundance of tutorials for that.
 
@hoben
Oops
@hobenkr I just found this. docs.python.org/2/library/smtplib.html
I believe that should be everything I need.
 
 
2 hours later…
3:44 AM
@JGreenwell cool :)
 
 
1 hour later…
5:07 AM
@MoAli Typically you'll find that googling "python <library> <thing you want to do>" will produce great results
 
5:56 AM
I have to convert a date (in string like '2016-06-14') to datetime objects with time as min and max for a given timezone. For eg. +05:30 timezone, it should be datetime.datetime(2016, 6, 14, 05, 30, 00) and datetime.datetime(2016, 6, 15, 05, 29, 00).
I am currently using datetime.combine(d,time.min) and datetime.combine(d,time.max)
But it gives in UTC
 
6:56 AM
Okay.
What's your actual issue?
 
issue is that - the way I am doing currently is giving datetime.datetime(2016, 6, 14, 00, 00, 00) and datetime.datetime(2016, 6, 15, 23, 59, 59).
but I want as I mentioned above
 
So have you searched for "python datetime time zones"
Or looked at the datetime docs?
Because it's talked about there.
 
Yes
I did
So I came up with this solution:
value_date = dateutil.parser.parse(value)

min_dt = datetime.combine(value_date,time.min)
max_dt = datetime.combine(value_date,time.max)
min_dt = _convert_naive_datetime_to_given_timezone(min_dt)
max_dt = _convert_naive_datetime_to_given_timezone(max_dt)
min_dt_tz = timezone.localtime(min_dt)
max_dt_tz = timezone.localtime(max_dt)
import pytz
min_dt_tz = min_dt_tz.replace(tzinfo=pytz.timezone('UTC'))
max_dt_tz = max_dt_tz.replace(tzinfo=pytz.timezone('UTC'))
but this seems to be a lot of effort
I thought that there may be some easier way to do it
 
What are those functions meant to be? Where are your imports?
 
Just a min.. let me move that to some pastebin
Please see this.
 
7:19 AM
@anuj, you don't need paste bin, use ctrl+k after hightlighting your text
 
@AndyK why did you re-create his text?
Using pastebin is actually a lot more polite most of the time, especially for longer sections of code.
 
@Ffisegydd like that @anuj will be able to show everyone what he did
 
It's time for my once-a-month request for feedback on what I missed here: stackoverflow.com/questions/37804866/…
 
It stops chat from being clogged with code.
 
@Ffisegydd oh ok
 
7:20 AM
I got a dv for that, not sure why.
 
Haters gonna hate, downvoters gonna downvote.
The only thing I'd edit in is a link to the docs.
 
@Ffisegydd ah! interesting. You have the power to delete msg in chat
 
@AndyK No, I have the power to move your messages to another room.
We just happen to have a special room that we move messages to that we want to "remove"
Only mods can actually delete messages.
 
@Ffisegydd indeed I can see there is a gif of Tupac Amaru Shakur showing his middle finger in that room ...
 
7:23 AM
@Ffisegydd I'd do that if the docs were a little more explicit about this.
 
Martijn breaking the site again.
 
@Ffisegydd meh, me and the rest of the top 50..
 
Too many badges!
 
Does my code look ok?
Or it can be improved
 
7:43 AM
Cabbage!
 
8:06 AM
Hello there :)
 
Cabbage
 
Is cabbage a meme here?
 
Not sure why this user has 2k+ rep and doesn't seem to understand basic concepts like storing an instance in a variable: stackoverflow.com/questions/37806179/… (see the comments)
 
@Gemtastic Welcome! I see you mostly do Java stuff, and JavaScript. I think you'll like Python, but it will seem a bit strange at first. As for "cabbage", please see our rules and salad language
 
@PM2Ring Thanks, I read the rules (it's linked in the description) but the salad language part I missed. What a fun thing!
I do Java, JavaScript, Ruby on Rails, Swift, PHP and now I'm on Python. It's a very interesting experience so far :)
 
8:14 AM
cbg
 
Python reminds me a lot about Ruby, in the good ways
 
@Gemtastic :) We don't really use much of the salad language, apart from "cabbage" / "cbg", "rhubarb" / "rbrb", and a few others like "melon", "pineapple", and "garlic". And "yam" of course. :) However, some of the regulars hate salad language.
 
@MartijnPieters Sam has 2k in questionning, not in answering
 
@AndyK yeah, but after that many questions you'd hope they would understand basic programming concepts.
 
Jun 9 at 20:35, by Wayne Conrad
> I think Python is the "sensible older-brother" of Ruby - @Mango
 
8:17 AM
@PM2Ring I see :)
 
@MartijnPieters sometimes no alas ... -_-'
 
Well, I might be a bit potato but I hope you can bear with me
;P
Being a Java Bean and all :P
 
@MartijnPieters Maybe it was just a brain fart, and they just realised the error of their ways & self-deleted.
 
What are you pears and peaches up to?
 
@PM2Ring the overall quality of their other posts doesn't give me much hope.. Must refrain from serial voting.
 
8:21 AM
I'm having fun learning about importing modules and packages :)
 
8:37 AM
@MartijnPieters Ah, ok. Speaking of serial voting, check out this recent SE.Mathematics Meta post "No, I'm not a stalker, I'm merely looking at everything you've ever done on this site" :)
 
8:50 AM
Heads-up: I've started destroying the LinkedList.Node question asking accounts on-sight.
If I see such questions pop up, I'll also delete them first.
Feel free to poke me when you see one.
 
Does anyone happen to sit on a link to a good blog/explanation of using context files to link together packages?
 
Asks innocently "What's a LinkedList.Node?" account is nuked
 
Morning cabbage
 
@Gemtastic What do you mean? Not sure about "context files"?
 
@JRichardSnape hehe. I just deleted about 10 new accounts all continually posting about the same piece of code as they develop it. They are clearly all the same person, evading system limitations.
 
8:57 AM
I've been told it's common practice to use a context.py file where you write:
import sys
import os
sys.path.insert(0, os.path.abspath('../..'))

import my_module
to connect different modules
 
But since people here (including me) were answering these, I thought you'd all appreciate a heads-up as to the life-expectancy of these posts from here on out. :-)
@Gemtastic I wouldn't call it common practice.
 
If there's a better practice in the XY of accessing a module in a sibling directory back up the tree I'm all ears :)
 
Common practice is to use a virtualenv to put your project into and a proper top-level script to be the entry point.
 
Interesting
 
@MartijnPieters Can you show us an example so we know what you're talking about?
 
9:02 AM
Most recent example that I answered: stackoverflow.com/questions/37804866/…
The question survived because it doesn't have a negative score. The two newest incarnations were not so lucky.
 
Most recent deleted example: stackoverflow.com/questions/37806996/…
22 questions in 3 days time.
 
@PM2Ring I just read that guy , Zachary's question... I was tempted to ask him why he was evaluating every answer and I said to myself that the chap might be tempted to evaluate my answers if I poked him (a little bit like the eye of sauron) ... #creep
 
Maybe I should point out that I'm doing 2.7, there seems to be a lot of differences in python 3
 
9:10 AM
If you can, you should use 3.
 
@MartijnPieters Thanks. 22 questions in 3 days is somewhat excessive, even if the questions were all different. Some people... :grumble grumble:
 
@Ffisegydd +1 for Py3
 
@Gemtastic There are a few major differences between Python 2 & 3. I've been using Python for over a decade but just migrated to Python 3 a few weeks ago. As Fizzy said, if you're just starting Python now you really should be learning Python 3, unless the job you are doing needs Python 2 to maintain an old code base, or it's using some old library that hasn't been ported to Python 3.
 
I can't use 3 atm since I'm learning Python through working with a protype product
Someone chose 2.7 for me
Well, the other devs did
 
Fair enough.
 
9:16 AM
I intend to lobby for python 3 later on
But I try to see it this way; learning 2.7 will give me some history information going into py3, making it easier to understand what changed and why
 
You can get a degree of Py3 compatibility by using from __future__ import print_function, division and using // when you want floor division of integers.
 
Interesting
 
@Gemtastic do a print(2/5) in python2 & python3 and see the difference for yourself
 
@PM2Ring there are specific rate limits in place that are being bypassed here, plus the original account painted themselves into a question-ban corner.
 
I'm quite busy at the moment trying to figure why I can import the sibling directory fine, but importing a script in the parent directory throws an error as the script can't find the sibling directory
But I'll try the math thing when I have time :)
I only have 2.7 installed atm
I haven't really gotten to the point of proper version management of python, I only have pip
(I'm on my 4th day of learning python)
 
9:32 AM
@afidegnum please see our room rules sopython.com/chatroom
In particular, please do not link newly asked questions.
 
ok
 
How can I move messages to the Python trash room, if I want to...?
 
You can't.
Only Room Owners and moderators can.
 
You can however delete your own messages a few moments after you posted it.
 
9:49 AM
@Ffisegydd & @Gemtastic indeed
 
10:09 AM
I cannot get going with anything today. :(
So I'll come here to take inspiration from the rapier-like wit and repartee.
 
:)
I just found out that our Enterprise Readyâ„¢ clustered cache thingy breaks if you start the wrong node in the cluster before the other
 
Yeah
 
Pre-edit, I was picturing you and 100 colleagues all trying to synchronise pushing power buttons ;)
 
Haha yeah. Hence edit :)
Hilariously, it does proper on-disk caching in case the power fails, but if the wrong one happens to start first you have to delete all that to get it working again
 
10:12 AM
Does it break as in caches less efficiently, or break as in spews up all over the user.
 
As in it won't start because it can't join the cluster
 
Just shuts down
 
I can see some rather involved debugging ahead for Developer Grant...
 
In this particular case, Developer Grant will get his Solution Architect At Firm's Biggest Client hat, blow all the dust off it and raise an urgent feature request
With the power I wield, it should be fixed within 7-10 working lifetimes
Doh. I forgot to put the hat on.
 
10:16 AM
Ah, one of those situations. In which case, no doubt you'll be hardcoding a FIRST_NODE_START_ID variable somewhere... ;)
As a present for FutureDev.
 
Problem is they're services starting on different VMs, so they can't talk and synchronise. I could set the one that should start second to manual start, but that also seems bad
 
I'm going to run a sweepstake on how long you can hold out not debugging it while MegaCorp sit on your feature request.
 
I have no chance to debug it; it's a boxed product we plug in :) Perhaps I can just install Redis and no-one will notice
 
:D
brilliant. 5 years later, someone runs top. "What's this redis instance doing here?". Runs ls. And why has cluster_start been renamed cluster_f*ck?
 
 
1 hour later…
11:22 AM
I committed a delete recently in a git repo on a file that was excluded by sparse checkout. Anyone seen that before?
 
Only when Mercury is in retrograde.
 
Read that as "Only when Mercurial is in retrograde." and was impressed. You have invaded my subliminal conscious, Fizzy.
 
I read it as "mercurial" too :')
I had to re-read it twice to see that it said "mercury"
 
11:56 AM
now you are being punny on behalf of Fizzy
outsourcing humour
 
Why are all the critics comparing Warcraft to Lord of the Rings?
 
lol
because "fantasy"
it could be worse, they could be comparing to game of thrones
 
re-cbg
 
I've literally read like five reviews that are saying "why doesn't it have elf-man with bow and human-man on horse like Lord of the Rings?"
 
For some inexplicable reason my mother compares Discworld to Lord of the Rings, but she's only read the 1st 2 Discworld books. I'm trying to get her to start on the Witches books. Maybe I should've gotten her onto those before The Colour of Magic...
 
12:12 PM
@corvid have you seen it yet? I'm thinking about going this week
 
@Programmer Seen it twice, it's pretty good. I'd give it a 60%, not quite accomplishing what it's trying to do but not a failure either
 
I've seen it once, 8/10 for me.
There are issues with it, just like most movies have.
I really want to see an extended cut, apparently Duncan Jones had an extra 30 minutes of footage that got cut.
 
@Ffisegydd thank you for your help :)
It's just a really weird problem slash I'm probably an idiot but don't know why
 
Well hopefully Blizzard will pursue movies for their other universes, if this was considered a success.
 
Lost Vikings - The Movie
 
12:20 PM
I need Arthas and the Lich King in a movie.
 
fighting the zerg
crazy universe crossover
 
Yeah exactly - crossovers are the future
 
HotS!
 
Star Wars 8: Kerrigan and White Hand
 
Age of Protoss
 
12:25 PM
@Ffisegydd it completely feels like scenes are missing, which bothers me a bit
 
@corvid Yeah. And some scenes were just cut short.
 
maybe it's going to be one of those best seen as a director's cut outside of theatres
 
some movies get way worse with director's cuts. Alien and Donnie Darko, I'm looking at you
 
Cbg all.
@corvid Alien, or Aliens? The Aliens directors cut I thought was better, with the background bits on LV, and the automatic gun turrets, obv.
 
Alien, apparently the director didn't even want a director's cut
 
12:30 PM
Ouch, that's got to hurt.
 
Anyone check out any trailers from E3. Resident Evil 7 looks promising!
Excited for that
 
I never played any of the RE games
 
:O
 
except maybe an arcade rails shooter?
 
oh yeah....I didn't know that was released in North America
I think I'm thinking of something else
Oh Darkside Chronicles. I did not like that game that much
 
12:42 PM
RE4 on the Wii was cool
RE5 on the 360 was not.
 
RE6 was a train wreck
 
user559633
I really liked Resident Evil: Global EXpansion. Bit of a learning curve, but I enjoyed how finite the state of the game's machinery was
 
This is probably a dumb question, but if I am running a local server, is it possible to make it run as if it were in another time zone?
 
cbg
 
@corvid - this is usually an OS-level setting
 
12:54 PM
Anyone got a decent linux tutorial for absolute beginners they would like to recommend?
Got a new minion.
 
@corvid Sure, just set the time zone. But you really should just use UTC
It's been forever since I was an absolute beginner...
like, 10 years before I was an absolute beginner at Python
it's been a loooooong time
 
@Ffisegydd What're they doing with linux? Just plain linux command line?
 
I'd say, look around the internet for fork bombs so one knows what to avoid and obviously don't do rm -rf /
 
cbg. is there elgant way to group [True, True, False, False, True, True] => [[True, True], [False, False], [True, True]]?
 
Is it just every two elements from the list of booleans you want to chunk?
 
12:58 PM
@Ffisegydd This can be usefull.
 
@bereal You want to create partitions of size n?
 
@corvid @Withnail no, by value
or rather by a predicate
 
Then why are there two groups for True?
 
@corvid by value in a row
 
Shame, missed opportunity to trot out one of my favourite little helper functions.
def chunker(seq, size):
return (seq[pos:pos + size] for pos in xrange(0, len(seq), size))
 
user559633
1:02 PM
"Missed opportunity" but posted it anyway
 
@Withnail isn't that the same as the zip(*[iter(seq)] * size) trick?
 
haha, ok, missed opportunity for it to be helpful :P
 
user559633
:D
 
nvm, will just write a function
 
@corvid Yeah mostly. Working with Python.
Nothing too hench.
 
1:13 PM
@bereal Um, use groupby. :)
from itertools import groupby
a = [True, True, False, False, True, True]
b = [list(g) for k, g in groupby(a)]
print(b)
#output
[[True, True], [False, False], [True, True]]
 
@PM2Ring indeed, thanks. For some reason didn't work for me on the first attempt :(
 
This one makes (key, group_length) tuples:
[(k, len(list(g))) for k, g in groupby(a)]
 
yep, got it
 
The tricky thing with groupby is that the groups produced are iterators that share the underlying source iterable so you generally need to wrap them in list to prevent weird stuff from occurring.
 
Yeah - I've come a cropper that way before now.
realises come a cropper might be highly idiomatic I've been caught by that...
 
1:21 PM
> (Britain, idiomatic) To suffer some misfortune; to fail.
Yep, idiomatic. The Internet says so, so it must be true.
 
too broad stackoverflow.com/questions/37813211/… Also, flagrant use of Comic Sans. I guess that's not an actual close reason, though. :)
 
> flagrant use of Comic Sans. I guess that's not an actual close reason, though
I beg to differ.
 
Going with "too broad" there, as I usually do for questions of the form "here is some code I have that works (maybe), now I want another feature"
Typically worded in such a way that it's unclear as to whether OP expects us to implement the feature, or just provide general guidance.
 
@JRichardSnape "come a cropper" is perfectly valid in Australian English, so I knew what you meant. :)
 
"How do I make it frob widgets?": Ok. "I want to implement a widget frobber": well at least you're the one doing the implementing. "It needs to frob widgets": Sure, that will be 100$/hr.
I have never heard of "come a cropper" ever before. I assumed it was an autocorrect typo of "come across"
 
1:27 PM
Huh, the etymology of that isn't what I thought it was.
 
@PM2Ring yes, that was a list thing, thanks.
 
cabbage all
 
@WayneWerner I don't know if I'd call that a typo, though. But it is a popular error today. :) stackoverflow.com/questions/37805330/…
 
1:42 PM
well, 'a' would fix the problem (possibly)
vs 'w'. Typo is probably the closest thing to the reason
 
2:00 PM
cbg all
 
cbg(inspector)
 
2:17 PM
Is it bad that I laugh at that as a parent?
 
Stole coworkers new £200 hockey stick from his desk. Placed it in other coworkers desk. Coworker came back to desk very angry to find his stick gone, messaged both me and patsy demanding it back. Both of us played the fool. I then went to patsy's desk and "found" stick. Returned stick to actual owner.
 
Did you get a hero reward?
 
"So long story short, what's the best way to get blood out of office carpeting?"
 
How did Patsy react?
 
user559633
@idjaw no, it means you didn't stop being a person when you had a kid. good on you. people that change who they are and make an accomplishment that a 13 year old girl can achieve define them make me sad
 
2:19 PM
He was on the phone at the time and so could not react/hide it/whatever.
He silently applauded me though, he is a troll also.
 
user559633
"hockey" is "tennis" in the UK, right?
 
yes
that's exactly it
and I actually had some coffee come out of my mouth on that. So thanks.
 
Give him his tennis stick back, Fizzy, you bully ;)
 
I did! I went and found it for him!
 
The hardest part about being a parent is giving away all the kids who didn't look cute enough on day 1.
 
2:23 PM
I just wanted to say tennis stick
 
we once took a co-workers laptop and put it in one of the cash registers in the POS lab and just left the key on the individual's desk. He really wasn't happy about that.
 
The trick is to never lie. "It was there when I went to get a drink" is a perfectly true sentence, the fact that I stole it as walking back with my drink is immaterial.
 
user559633
@RobertGrant Really? Because for me it's been the relocation and building up a credit record again
 
@RobertGrant don't you just wander around and swap for one you like?
oops
 
Probably easier to just withdraw a few thousand £ a year and just burn it.
 
2:25 PM
tennis stick? What's next, basketball ring?
 
@Zero did anything ever come of that mail thread suggesting some syntax for x = foo('x', ...)?
 
why is it so hard to find apartments?
 
DSM
Code-review morning cabbage for all!
 
@corvid I just moved. My old place is up for grabs
 
DSM
Oh, yeah, now it's all about the g4dget_condo.
 
2:36 PM
g4dgetlair? g4dgetcave?
 
cbg back, will the mod allow this question to be moved to another SE forum namely the game dev forum, please? -> stackoverflow.com/questions/37813211/…
 
I'm still kicking myself for g4dget is entirely on the left hand (on a keyboard) - very unbalanced
@AndyK flag it for migration
 
@inspectorG4dget left hand does number and qwerty rows; right does asdf and zxcv. Optimised, brah.
 
lol! nice. Now, if only I can undo years of learned muscle memory that quickly
 
My apartment can be the crow's nest
 
2:41 PM
is there any way to do this in python?
if (varname = expression()) in mydict: do_stuff_with_varname
 
@inspectorG4dget done
 
@AndyK someone will take care of it
 
You can't do that exact thing because assignment statements are statements and you can't embed a statement inside an expression.
As to whether there is some way to carry out the intent of that line with slightly different syntax, I can't say for sure.
 
DSM
@corvid: a friend texted me about "a strange half-naked musical performance about a woman in love with a crow and a man terribly heartbroken about it" at a festival. Couldn't help but think of you.
 
yeah, that bothers me. C lets me do that
 
2:42 PM
@DSM that was probably me
 
I'm basically trying to avoid having to do this (my current solution):
 
I really like crows
 
varname = expression()
if varname in mydict: do_stuff_with_varname
or this
if expression() in mydict:
    varname = expression()
    do_stuff_with_varname
 
DSM
Sorry, what's wrong with the first one?
 
I don't want that additional line to assign to varname
 
2:45 PM
>>> mydict = {4:8}
>>> if [globals().update({"varname": 4}), varname][1] in mydict: print("found it: {}".format(varname))
...
found it: 4
 
DSM
Get used to disappointment. #princessbride
 
@inspectorG4dget you be crazy, bruh
 
hrm... I like that better than my way, but it's still kludgy
 
DSM
If something is important enough to get its own name, it's important enough to have its own line.
 
If the choice is between globals().update and having one additional LOC, choose the latter.
 
2:49 PM
updating globals() is a step in a right direction, though it's not the right answer at all
 
Actually "If the choice is between globals().update and __________, choose the latter." Is pretty much true regardless of what you fill the blank with
 
really? #sadpandasaysalright
 
Yes.
Yes, so much.
 
what if I were to fill the blank with "regex"?
 
Just have the extra line and do yourself, and anyone else trying to read your code, a favour.
 
2:50 PM
(lambda varname: do_stuff_with_varname(varname) if varname in mydict else None)(input) # why doesn't pass work inside the else?
 
pass is a statement, technically, I think.
 
I guess I could replace it with 1 or whatever, now I look at it
Or None
 
DSM
We're all friends here, so I'll break out the Nerf cluebat instead of Lucille.
 
user559633
I prefer frenemies.
 
DSM
You would. (spits)
 
2:53 PM
If the blank was "eating a pine cone" it would be a tough decision, but one with ultimately only a single correct answer
 
DSM
@inspectorG4dget: heh. That's exactly the scene I was thinking of. I like the bit where he's eating the sandwich and still playing great.
 
tee hee
it was also a fantastic setup for a Lucille Ball reference
 

« first day (2068 days earlier)      last day (2886 days later) »