« first day (2173 days earlier)      last day (2790 days later) » 

8:00 PM
There are optional ones.
curl freud.io/cigar
404 Analysis Not Found
Or that should be 204 Nothing
 
What is this "JavaScript"?
 
Oh son of a bitch I'm in the wrong room again
Sorry
 
Should probably flag that one guy who approved the edit
 
Another poor beginner who wants to learn the hard way
2
Q: Beginner : python len() closes file?

PhoenixI am new to Python and going through the book of Zed. I stumbled upon the following exercise, scope of which is to copy one txt to another. The original code from the book works perfectly and I copy below - so that I can show the difference: 1 from sys import argv 2 from os.path import exists 3...

 
8:09 PM
works as advertised
 
Also? "the book of Zed" - I wonder if it's covered in human skin.
 
wim
someone told me once that lol is an emoticon for a drowning man and now I can't unsee it, plz help
 
wim
\o/
 
that's fantastic
 
wim
8:10 PM
not fantastic. it's a curse
really annoying
 
@vaultah how do you flag that?
 
@SterlingArcher any post if user is a robo, custom flag
 
^
 
Custom flag what though? One of their questions/answers? Comments?
Oh or the question proposed to edit?
 
"The user seems to be a robo-reviewer, see [this] and [this] and [this] for instance, review ban might be in order. Thank you."
 
user6568562
8:11 PM
@WayneWerner Eyyy : D Got reference. The book must start with author wanting to play a game
 
That's probably not the worst edit to approve though. Plenty of people edit questions with stuff from comments, or with clarification after the op accepts a guess answer.
 
@SterlingArcher I'd probably flag one of the posts (Q/A) of the robo. But only if I made sure it wasn't a one-off incident
and that it's a blatant act of robo
 
@davidism unfortunately this was not one of them. OP gave no context
@AndrasDeak yeah I'm not gonna look too deep into it but I'll check out this GangWolf
 
if you don't collect enough evidence to convince the mod to look into it, you'll just get declined and waste the moderators' time
if you want to flag, look deep enough
 
I was born to waste mods' time
 
wim
8:24 PM
[Django] Settings mixes application configuration which should be public and passwords, which should be private:
If I am distributing an app MIDDLEWARE_CLASSES is something which I would assume users would not (generally) modify. Similarly, in most of the cases, INSTALLED_APPS, would also be something which users would not change, (unless you are distributing standalone_apps). This means, I want to source control settings.py. But settings.py also contain my DB setiings, and SECRET_KEY, which means, I cannot source control settings.py.
from a blog post here
 
cbg("all", reason="evening pestering")
 
wim
almost 10 years later, this thing with settings.py still causes me pain
with docker , even worse
settings module is a big mistake
 
you just use env vars?
thats what I do ...
 
Or an second secret_settings.py that is imported from settings.py and isn't under source control
 
sure ... but that defeats the purpose ...
 
8:27 PM
Also has the added bonus of not running if they haven't generated it
 
Traceback (most recent call last):
  File "<chat#6>", line 1, in <module>:
    cbg("all", reason="evening pestering")
 NoError: reason matches default.
 
well if you use os.environ['SECRET_KEY']... and its not defined ... I can guarantee you will find yourself with a 500 error that has a traceback pretty fast ...
 
wim
the problem with using env vars is that lots of logging tools and that kind of stuff dump out the environment
it's not very secure
 
@Augusta - harrumph
 
@IntrepidBrit Sorry to act on your.. intrepidations! :y
 
8:32 PM
@JoranBeasley Well, only the secret/instance specific stuff goes into secret_settings.py, meaning that settings.py can be safely source controlled :)
 
huehuehuehue
 
so i assume the logging is protected and not under version control
effectively making it irrelevant to the issue you described ....
I think at least
its not an ideal solution but there is really no good way to have any kind of security credentials under version control ... its no different than an app that has sqlalchemy or really any other db connection, etc
 
@Augusta I should never have come back her after hours.... On the other hand, I do enjoy a good pun.
 
wim
using env vars was poo-pooed at europython 2016
 
@IntrepidBrit That's two for two! :y
 
wim
8:36 PM
skip ahead to 10:49
 
I'm too frazzled to have an indepth discussion on the topic - I yield @Joran! ^^
 
You're quite the generator, indeed.
 
Not a silly question; date objects should have a .datetime() method; what's silly is that they don't have such a method. — Zags Oct 14 '13 at 3:57
 
@wim i have no speakers ... do they propose a superior way?
 
8:40 PM
Agreed. Apparently I'm now annoyed by the datetime stuff in Python, and arrow, despite supposed to be better, isn't.
@JoranBeasley you could use the cc thing
 
wim
you can watch it later ... he seems to say the better way is using correctly permissioned files
 
and processes
 
Honestly? I run into so many bloody problems with date/time in python, I'm half tempted to start a time & date alternative library
 
wim
yes
 
@WayneWerner smh....I've just went through a day of datetime shenanigans
I'm about done with today
coupled with having to fight with flexmock....
 
8:42 PM
But I'm not sure I could handle Antti telling me I'm wrong/could do it better on a daily basis
 
I'm double done with today....I'm really glad I'm playing hockey tonight
 
(mainly because he'd probably be bloody correct)
 
Canada-Fury
 
wim
I agree that env vars is kind of hacky and lame, but I lack the unix competency to do the file and process permissioning properly with docker
so, admittedly, i use os.environ too
 
@IntrepidBrit in the spirit of WTForms -> FUdatetime
hmm...doesn't have the same ring to it...surely we can come up with something good
 
8:44 PM
@IntrepidBrit We'll let him be our PM
 
@IntrepidBrit alternative to Antti's?
 
Has Antti got one?
 
not yet:P
 
We should just call it AnttiTime ;)
3
 
Love it.
Might call it that just to wind him up
 
8:49 PM
@WayneWerner dude that's genius
+1 for me
MAKE TIME GREAT AGAIN!
AnttiTime - Make Time Great Again
I'd pip install that over and over again
 
Sep 18 at 12:21, by Andras Deak
no, everybody knows we should use Anttime
Sep 18 at 12:12, by Antti Haapala
I am writing my own datetime package now
finally found it ^
 
@AnttiHaapala ^^ chop chop
 
with a name so perfect like that...how the hell did Antti not have the motivation to finish that in a day. jeez man...
:P
 
he doesn't call it anything like that:(
 
8:53 PM
he doesn't get a say in this anymore.
This is the name of the package now
 
I'm cool with that
 
Right, you guys distract him, I'll hijack his repo when his back is turned
 
fork it
 
He'll give in to the peer pressure and just use the new name
We will have Anttitime
 
Now I want to see it.
 
9:00 PM
on that note. Time to go pick up the kids, make some pizza and go play some hockey
rbrb folks. \o
 
rhubarb
 
rhubarb idjaw, and I should probably head off as well.
Rhubarbs to the rest of ye too
 
wtf are you guys smoking?!
 
you can't resist the will of the masses:P
 
Time, apparently
 
9:02 PM
AnttiMe
 
wim
Let's hope Antti never meets AntiAntti , they will mutually destruct
 
Anttimater?
 
Could you say the university that granted his degree would be his Antti alma mater?
 
I am my own anttiperson
 
Majoranantti
 
9:05 PM
it feels like I am self-destructing
 
That's rather Antti climactic.
 
DSM
@everybody: interview of intern did not go well. "Programming Expert in Python" was not an appropriate title. :-/
 
That was on their resumé?
 
DSM
Yep. I copied and pasted.
 
9:07 PM
@DSM so, I'd say that interview did go well
 
snicker
 
and for that interviewee as well
 
DSM
I have several more to do this week and my enthusiasm is flagging..
 
some reality checking for their resume
 
I wouldn't put Python expert on my resume without knowing every single module in the Python stdlib, and have used them at least once. Probably even if I were a core contributor I wouldn't consider myself expert.
professional, sure
 
9:09 PM
seriously
 
but expert... I've got quite a bit to go there.
 
I'd call a person who's used every single module in the python stdlib insane.
there is stuff that ... just ... shouldn't... be ... used
 
well, there is that ;)
 
DSM
I say that I'm fluent in Python, which is fair. @AnttiHaapala: I thought of asking about aifc, but then I caught myself. ;-)
 
Oh yeah, fluent for sure
If I were teaching other people Python I'd probably call myself an expert, though ;)
 
wim
9:11 PM
anyone have a better answer for this? stackoverflow.com/q/39734252/674039
or is it really a shortcoming in str.format
 
DSM
Oh, blek. That's awful.
Maybe we're missing something obvious.
 
wim
user image
5
^ It's a "programming expert in python"
 
In [16]: '{:010.4f}'.format(-10.0040)
Out[16]: '-0010.0040'

In [17]: '{:0>10.4f}'.format(-10.0040)
Out[17]: '00-10.0040'
The docs say they should be equivalent
 
DSM
@wim: heh
 
@wim eww :D
 
9:14 PM
> '>' Forces the field to be right-aligned within the available space (this is the default for numbers).
 
DSM
Okay, the team is saying it's beer-o'clock (which is so out-of-date it's almost touchingly retro). Rhubarb for all!
 
rbrb dsm
 
@DSM We were missing that it's a string and not really a number
 
rhubarb for DSM
@vaultah '00-10.0040' is bollocks
 
yeah, I know :P
My point was that these lines should be equivalent
unless I'm missing something
 
9:18 PM
my point is that even if they were the same, it would be useless;)
 
>>> '{: 10.4f}'.format(-10.0040)
'  -10.0040'
you really wouldn't want those spaces in between the - and 0
 
@vaultah (it was reopened)
 
@DSM what programming questions did you ask said "python expert"
it reminds me of the M$ employee who self rated 8 at python but could not write a function to return true if their name was in a list ...
 
wow
herpetologist, probably
 
wim
9:37 PM
seven 0-score solutions and counting stackoverflow.com/q/39734549/674039
 
I upvoted your passive aggressive comment when there were none
 
It's eight now.
 
Wow. 8 answers no upvotes. Impressive
let's downvote all of them
:D
 
I'm seriously contemplating it
 
wim
me too
 
9:47 PM
accepted
 
wim
funny how nobody with rep is touching that question
ugh, itertools, groupby, operator
 
and number 9 just came in
 
wim
map, itemgetter, sorted
why the heck do people do this in python, just write a for loop for pete's sake ..
 
ah, somebody's been busy:P
 
@wim That's a really interesting phenomenon. :y
 
9:50 PM
@wim because people who don't know better think that by making something fit in to one line or everything within parentheses/brackets means it's better
 
somebody's serial upvoting the answers
that's not nice
 
wim
the irony: n00bs think "for loops are for n00bs"
 
If you can't do it in a list-comp then it's not worth doing. >:0
 
wim
 
^^ that episode was so good
 
9:54 PM
[print("it's pythonic") for k in range(1)]
 
["deal with it" for i in range(10)]
 
print ''.join([[char for char in "it's pythonic"] for n in (0,)])
(That's the joke.)
 
SyntaxError: Missing parentheses in call to 'print'
 
Ha ha wow, that's even better. :D
I got TypeError: sequence item 0: expected string, list found
 
yeah ^^ I got that one because I ran it in the one true Python...Python 2
runs
 
9:58 PM
Which was the joke until I realized that Python2 print is different from Python3 print.
Aa, found it.
@wim This question reminds me of this: thedailywtf.com/articles/…
 
10:21 PM
cbg
 
cbg good sir
 
cbg
@JGreenwell I read that the US is developing grenades that can be used both as "kill small place, much boom" and as "kill big place, little boom much shrapnel, wow", using a switch. As I don't know anything about grenades, I found this interesting:)
 
yes, but key word is "developing"
so like 6-8 weeks
 
yeah I read that it's not exactly straightforward, and might all be a bluff:)
and very few details are known
actually, all information might be contained in my above message:D
except fancy words such as defensive and ofensive grenades
 
I think that already exists? The Germans made a regular HE grenade that they could fit a fragmentation jacket over on-the-spot during World War 2.
Which may be different from what you're thinking.
 
10:26 PM
it should be similar, but this one would have a single switch, no batteries needed
 
That.. sounds really hoaxy to me. But who knows? :y
 
who indeed
 
Also, needlessly complicated.
Not that war isn't already overwrought.
 
yeah, its just one of those silly projects that are developed by military - carrying extra grenades has never been a problem for anyone I knew but making more efficient heavy weapons which are lighter......yeah, not worth it :P :\
 
10:28 PM
force fields for tanks is still cool though - and a real project
 
It's way more fun to develop A Weapon So Costly We Cannot Deploy It.
 
the principle of mutual bankruptcy?
 
The Rule of Cool.
 
I just want my lightsaber
 
That said, the Principle of Induced Bankruptcy is a real and very interesting thing. Want to invade your neighbours? Paint a bunch of metal scrap black and out to the woods and scatter it around, start a bunch of little fires, then explode a small but powerful bomb. Tell everyone around you that your new stealth bomber crashed. Within months, they'll all be spending themselves into ruin trying to close the Stealth Bomber gap. Meanwhile, your flying caddy shacks bomb the hell out of their runways
 
10:32 PM
@JGreenwell I have bad news....... :P
 
you mean how it would melt your hands off? well your a physicist figure it out ;P
 
no, my issue is that light is made of bosons:(
 
@Augusta I like your tactics.
 
they don't really mind passing through each other
 
How very forward of them. Without even waiting for an introduction.
 
10:36 PM
I once had a friend who got into a really cool discussion of how we could make a "lightsaber"-like device using other materials - but we were all drunk so the math/physics probably suffered a bit
 
of course there are extreme conditions and materials where light doesn't behave linearly, which means that they interact with each other
but that doesn't work like that
 
Well, don't tell them about the bomber. Leak it.
It's even more convincing if your country sucks to begin with~
"So that's why they're filthy invalids! They were spending all their money on XxHiGh-TeKk WePpOnZxX!!"
Ha ha, naw. Cocaine.
Cocaine and Faberge eggs.
It's hard to outbid the Hermitage! >:I
 
Is this the potted history of DPRK?
 
Man, I got back at a weird time.
 
hmm
 
10:39 PM
@JRichardSnape Nope! The DPRK's problem is that Kim Sung-il sat on a microwave oven once and it had some lasting effects.
 
datetime.datetime.now() - datetime.timedelta(hours=4)
that didn't work....time travel is hard
 
The guy himself was actually a really decent administrator. Those kids of his, though-- rubbish.
 
The guys I had this drunken discussion with tried to explain how a force field would work but I was completely lost after like 4 words (but eventually I think it came down to making a moving laser field that just burns anything away that hits it)
^ could be 120% incorrect
 
I feel like that's the only way it could work.
 
Is that even a 'force field' though?
 
10:42 PM
They also tried to explain ways in which light could be made to be more "solid-like" but I lost them after "solid-like"
 
Photons are a 'force', I suppose, in a pinch, but it's not so much a 'field' as a 'shower'. :I
 
I think the determining factor is if the rebels have to shut it down or not.
 
rebels?
are we talking about star wars now?
whats going on?
 
user559633
wait, were we not?
 
laser = star wars
heck, the US named an actual defensive science project after it
and it failed horribly
 
user559633
10:45 PM
yeah, data, the starship enterprise software. jean-paul ricard. star wars.
 
uhh...use the leviosa Luke?
 
@Augusta they actually described it to me as a "shower" but said the name stuck due to scify
 
user559633
"use the Morse, Luke" - someone reminding Luke how to send a telegraph
 
I think I saw that one. Was that before Snape kills Yoda?
 
apparently, politicians won't give grants for boring force or photon "showers" but force field is cool - dump money into it
 
user559633
10:49 PM
@idjaw Yeah, with Ralph Vader
 
Loved that one. Johnny Number 5 and Gizmo. Best duo ever.
OK..I'll stop
 
@idjaw I was going to eat him, but too Chewie
 
user559633
@idjaw Yeah, with Rex Legroom
 
I hear that some guy died during a drum solo during the last one?
 
@JRichardSnape Snape smash?
 
10:50 PM
I wasn't really paying attention.
 
@tristan trying to think of a max headroom quote...not coming to me...so.. <insert max headroom quote here> . there we go.
 
user559633
I've never a Max Headroom video. I just know the reference from coworkers.
 
I never realized I knew Max Headroom, until someone showed me who Max Headroom was...and I said, Oh, that thing...Oh OK...
yeah..that was a great story. I know.
 
When I think of Max Headroom, I (incorrectly) remember Johnny Mnemonic.
"I want room service!"
 
user559633
I never confuse Johnny Mnemonic because I use a Johnny Mnemonic device.
 
10:54 PM
You need to find some kind of Johnny mnemonic.
 
parts of that movie were filmed in Montreal
 
All I remember from that one is some smart-ass dolphin and "Don't crash my board, man! That's my lifestyle!"
 
DSM
I'd +1 Augusta's mnemonic joke but after several pints my sense of humour is questionable
 
^^ the interviews went that bad?
:P
 
Or that good?
 
10:56 PM
haha
 
pints, I needs a few pints myself
or just whiskey or gin
 
user559633
a few pints of whiskey or gin sounds like a bad idea
 
@DSM Don't let that stop you! :y
 
why? that's my usual amount
 
is it a teacher thing?
 
11:00 PM
You're surely not suggesting he drink a pint of Teacher's ?
That would be truly objectionable.
 
lol
 
user559633
cops, soldiers, firefighters, programmers, business consultants; what do they have in common?
 
nah, district testing was today which just made it long
 
@tristan pass
 
@tristan go on...
@JRichardSnape Isn't that how knowledge is passed?
 
11:02 PM
bracing for an anti-joke
 
I think I'm hyping this up too much in my head
 
user559633
you are.
 
user559633
it's the "people that hit the booze hard"
 
okay
 
that list is too short
 
11:04 PM
yep...expectations were too high
that's almost as my bad dad joke
 
@idjaw Mainly the knowledge to not drink Teacher's. Which is useful knowledge, TBH. Probably more useful than a lot of what I do try to pass on.
 
Apr 6 at 18:33, by idjaw
Feb 23 at 12:36, by idjaw
did you hear about the guy who got his left side cut off?
 
Was he alright?
:P
 
<3 YES!!!!
He definitely was alright!
1000 points to Snape
 
Hi fives across the pond
 
11:06 PM
hi five!
 
I thought you were leaving me hanging for a moment there. Nice addition to the Dad Joke canon.
 
Was making sure I had it in the chat log before making a "dupe" :P
 
Anyhow... I should really sleep. G'night all.
 
night :)
 
rbrb
 
11:11 PM
later @Augusta!
 
user559633
i wasn't trying to make a joke :|
 
good thing I braced myself;)
 
yeah, but your list was too short
 
I have noticed your new stash, @tristan
looks classy
now those IP lawyers will never find you:P
 
11:43 PM
I am looking for a complete code starting from logging into the mailbox to generating a list of order numbers with the person and their emails. — Judy Freshman 4 mins ago
questions like this are why I'm 3 away from 500 flags
just...really? do all the work for me plz!
 
user559633
:)
 
@tristan you so silly:P
Try a programming on it. You may be delighted with the results. — tristan 43 secs ago
 
user559633
How'd you know that was me? Must have been my evil twin.
 
I didn't actually check
could've been any tristan with your user ID
 
user559633
11:49 PM
Haha, wow TMBG
 
music starts around 1:30
 
@JGreenwell the aol and the "Freshman" name scream troll to me
 

« first day (2173 days earlier)      last day (2790 days later) »