« first day (1643 days earlier)      last day (3288 days later) » 

6:00 PM
d:d
 
:-)-:
 
DSM
At sopycon I'll wear a beret.
 
user559633
I'll bring a delicious meal
 
user559633
then y'all be like :d
 
I will walk among you, but you will know me not, as foretold by the prophecies.
 
DSM
6:02 PM
We'll be able to figure out by a process of elimination. Carrying delicious meal? Tristan. Wearing a beret? DSM. Three-legged? Jon. And so on.
[Unimpressed? davidism. I can do this all day..]
 
Man! I dislike compiling thrice after a simple change
:(
 
I know that feeling.
 
DSM
Why three times? Is this TeX or something?
 
YEP
absolutely
 
user559633
because five is right out
 
user559633
6:05 PM
Also, Four shalt thou not compile
 
Some days I compile and it's like "application domain unloaded" and I compile and it's like "error on line 0, column 0 in file NULL" and I compile and it says "compile complete, no problems detected"
Insanity Software development is trying the same thing over and over, and expecting different results
 
Does anyone know as to why we need to follow that particular sequence?
LaTeX - BibTeX - LaTeX ...
 
Today I am annoyed because I went back to check if this post ever got a solution, but the OP has been AWOL for two weeks.
 
DSM
That post has yet another Kevin, although he's lowercase.
 
Ufff! I rather leave early tonight!
Got to much job to do
2 submissions tomo
Rbrb all
:)
 
6:14 PM
There are at least three Kevins on Puzzling. I plan to trap them in my labyrinth.
4
 
DSM
It's a good thing my cup was on the table. :-)
 
Resplendent with colored hats and guards that always tell the truth (or not) and door mechanisms where you have to identify which weight has a different mass from all the others but you can only use the scale three times.
 
@Kevin If you can contrive a post on Puzzling with that exact, justifiable title, I'll consider signing up just to upvote it.
 
DSM
Speaking of puzzling, Kevin, did you follow yesterday's Albert, Bernard, and Cheryl excitement?
I know you've talked about those ordered-knowledge questions before.
 
No, I don't think I heard anything about this.
 
6:18 PM
SO profile says "~44k reached", that seems pretty ridiculous
 
It's a pretty straightforward example of the genre.
 
DSM
Someone posted a joke related to it which I hadn't heard before but loved:
Three logicians walk into a bar. The barman asks “does everyone want a drink?” The first logician says, “I don’t know”. The second logician says, “I don’t know”. The third logician says, “Yes”.
 
Ha :-D
 
Ah yeah, I call these "perfect logician" questions. Requiring reasoning about what reasoning other reasonable agents will make, and what reasoning they'll make about the reasoning you make about them.
Usually when I see them on Puzzling, I'm disappointed by the solution, which typically employs brute force or informal arguments. I feel like the perfect answer would be laid out like a formal inductive proof.
I feel like there ought to be a symbolic representation of e.g. "A knows that (B knows that (if X, then Y and C knows (A knows X)))"
 
You guys keep having interesting discussions and distracting me from my job. Now I'll have to explain you to my boss.
 
6:29 PM
Is there some itertools magic to get me every possible subset of a set?
 
A stupid question. I am using a free hosting service which doesn't have python cgi script support. Is this possible that I can zip the complete Python31 directory along with the site( html pages and scripts ) so when cgi scripts looks for a python interpreter it can search the same directory?
 
DSM
@QuestionC: so for {1,2,3} you want [set(), {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}]?
 
Yea
 
DSM
Take the powerset recipe.
 
Compress looks promising.
 
6:32 PM
chain.from_iterable, I always forget that one.
 
Wow. That's beautiful and I totally don't understand it.
 
DSM
It's just basically just for size in sizes: for combination in combinations(seq, size): outlist.append(combination).
 
Cabbage! I am trying to use the if/else in pandas.
whoops didn't mean to send that yet ;)
 
DSM
Too late! Now we know you're using a conditional, and your evil plot will be foiled!
 
@androidplusios.design I've never tried it, but I have a gut feeling that that won't work
 
6:36 PM
@BhargavRao Yes, because I've watched Word completely fail to get it right. LaTeX to figure out what the references are, BibTeX to find the text representations of those references, and LaTeX again because the first LaTeX couldn't know how much space to allot for the references. Widows and orphans and tables hop around madly.
 
ha ha yeah. Well for some reason I get this error: 'AttributeError: can't set attribute' when I do
dftrain.ix[dftrain.preciptotal == 'M', 'preciptotal'] = .01
but this works fine
dftrain.ix[dftrain.preciptotal == ' T', 'preciptotal'] = .01
Does anyone have any idea why I get the error with the 'M'. I have already checked the 'M' is dftrain.
 
@Kevin And David Bowie?
 
DSM
You have no power over me!
 
@cphlewis If his prices are reasonable, sure
 
DSM
@Hound: that looks weird to me-- you're wanting to fill a column with letters with numbers instead? Anyway, I suspect it'll be easier to help if you make a self-contained example people can copy and paste and ask it on the main site. There's a half-dozen of us or so who answer pandas questions pretty quickly. :-)
 
Think on, I've had a more immediate experience of the typeset-twice problem: my first papers with footnotes and references were written on a typewriter. One typed out the footnotes first, marked off the required room on the pages they were expected to land on, and hoped for a consistent result (and sometimes edited on the fly to make things fit).

Whoever typeset the later editions of _Decline and Fall of the Roman Empire_ was an unsung genius.
 
@Kevin any idea what might stop it from working?
 
I question the premise that "the cgi scripts looks for a python interpreter". I would expect the server to get a "please show me the somePage.py page" request from the client. The server says "I don't know what to do with .py files, so I'll just give them the text". I don't think it ever bothers to ask the OS if there are any executables associated with the .py extension or anything.
 
Basically I don't think you can "trick" the server into doing more than it's already configured to do.
 
DSM
6:58 PM
"How to debug Python code before posting to SO", by DSM.
 
Air
Is the shebang line ignored on Windows? Or does the interpreter just silently substitute a Windows PATH?
 
windows doesn't do shebangs
 
Air
Right... that's why I ask
PyCharm is confusing me. The console says it's running my code with the 2.7 executable but it's handling print() with no complaining (and no future import)
 
DSM
What happens when you do print("abc",end="fred")?
 
that's probably implicit-tuple-stuff
not actually print-as-function
see if x = print gives you a SyntaxError
or try print.__name__, or etc.
 
Air
7:03 PM
@tzaman Ohhh, right
 
DSM
@tzaman: or, he could see if print accepts the end argument..
 
print x is the same as print (x) is the same as print(x)
 
Air
Yeah, @DSM that fails.
 
@DSM yep, or that
my way is less typing ;p
 
Air
I forgot that my 3.4 install is on a different machine.
 
DSM
7:06 PM
I think the least-typing version is print,, which should fail under 2.7 but work under 3.
 
can't get shorter than 1 extra char
nice one :)
 
DSM
♫ who would you rather be ♫ The Beatles or The Rolling Stones ♫
 
And they're releasing their debut album soon, yay
 
I have heard rumors that Keith Richards is an immortal wizard. So not much of a choice there.
Unless... The Beatles learned how to transcend the physical plane during their journey to the far east
 
DSM
7:20 PM
I haven't even watched the first trailer. I'm going in cold.
 
Is it possible to use comprehension to set an item in the list?
 
The trailers actually seem to be good about not spoiling anything important.
 
instead of [f for f in objects] I want f.bar=True for f in objects
 
Yes, but you shouldn't need this @Nick
 
Here is my code, is there a cleaner way?
 
DSM
7:22 PM
@Nick: sure! But you have to flip it. You write for f in objects: f.bar = True, and you drop the square brackets. ;-)
 
def turn_on_table(key):
    if key == 'all':
        for table in tables:
            table.visible = True
    else:
        for table in tables:
            if table.name == key:
                table.visible
@DSM lol
 
looks fine to me
 
hmm ok
 
+1 looks good
 
DSM
More seriously, comprehensions are for building objects -- lists, sets, dicts. If you don't want some object at the end of it, just use a loop.
 
7:23 PM
I guess I just got addicted to comprehension
 
I can comprehend that.
 
DSM
At the price of a few more comparisons, you could write
def turn_on_table(key):
    for table in tables:
        if key=='all' or table.name == key:
            table.visible = True
 
I like that more
 
Air
or key in ('all', table.name)
you know, if we're golfing
 
7:25 PM
@Air shame on you, use a set! ;)
 
in Tavern on the Meta on Meta Stack Exchange Chat, 7 mins ago, by pizza
If you're missing Your Common Sense... he's now active on ru.SO.
 
DSM
Ehh, this isn't at the golfing stage yet. :-)
 
Air
Obviously, I'm not a golfer
 
Is there a common text editor in OSX that inserts only \r when you press Enter? I'm trying to track down the cause of opening and reading file in python with variable
 
DSM
Dunno how things behave now, but it used to be that sets were slower for a few elements because of hashing overhead.
 
7:29 PM
I don't have a reference, but that's fixed now. I think Martijn said something about it last time we had this discussion.
 
\r was the standard line ending for apple before OSX. I imagine there's quite a few.
 
guys I'm terrible at teaching people javascript :|
 
Are you sure your students aren't just terrible at understanding bird?
 
I always thought that open does line ending conversion magic for you if you don't open in binary mode. But I was able to replicate OP's behavior.
Maybe the conversion magic is limited to converting \r\n to \n, not converting \r to \n.
 
See "universal newlines mode": docs.python.org/3/library/functions.html#open
 
7:35 PM
I see, thanks. I see it's deprecated. I wonder if I should tell OP about it anyway.
 
actually, just use the newline keyword (read further down the docs)
... which seems to indicate that universal mode is enabled by default? Now I'm confused about newlines again
 
Air
@davidism "Okay class, for this course all official lectures and problem set submission will take place via Twitter #goodluck #nocurve"
 
Right there with ya :-)
I notice that readlines properly splits on line endings even if they're just "\r".
 
Bleh, hey up all.
 
@davidism lol: ---> 56 g._unique_cache = cache = getattr(g, '_unique_cache', {})
 
7:41 PM
yo
 
@Ffisegydd grr :D
 
@Antti good lol or bad? :)
 
g obviously not available...
 
hello
 
7:43 PM
how is the syntax of the if condition that can be placed in a variable?
 
@AnttiHaapala ah, you're not using Flask-SQLAlchemy
 
value?value2:
something like that
 
anw I do not like the g pattern really at all
 
var variable = value?:value2
 
@eddwinpaz If you're looking for the "ternary" operator, you want "A if B else C"
 
7:43 PM
It's called a ternary expression and it's x if y else z
 
in a variable?
 
>>> x = 23
>>> y = "Hello" if x > 10 else "goodbye"
>>> y
'Hello'
 
I know there is a way to do it in the same variable
 
@Antti You can put the cache as a class attribute on Model or something. Just be sure to clear it at some point if you're not using Flask, otherwise it will just grow and grow.
 
no no no no
variable x = a=b:?b;
something like that
 
7:44 PM
yes yes yes yes yes.
That ain't Python mate.
 
its python
 
The Python version is x if y else z
 
i've seen it
 
Please explain the desired behavior of the line you just proposed. Give example values for x, a, and b
 
print ($v) ?: 'No Value';
 
7:46 PM
That is not Python.
 
In python you can do it to
 
YES! YOU CAN! IT'S X if Y else Z
 
v if v else 'No value here, listen to what others say'
 
@eddwinpaz either do what Kevin asked and post some example data, or I will end this conversation
 
7:46 PM
>>> x = 23
>>> print x or "no value"
23
>>> x = None
>>> print x or "no value"
no value
Like this?
 
how is this if condition called?
I need to reproduce it on Objective-C
 
The or behavior I just demonstrated? I guess you'd call it "short-circuiting"
 
@eddwinpaz Kicked, please post expected input output when you return
 
Why is all the gin gone?
 
Not sure if there's an equivalent in more strongly typed languages, especially if they coerce the results of or to a boolean.
 
7:51 PM
Got a phone interview for "Data Scientist Consultant" position tomorrow.
It's mostly R, so gonna have to study up on it again.
 
So is the wisdom now that Julia > R in most situations? Or are they different?
 
They're different things.
 
R is better because the name is shorter. Julia devs, please change the name to J.
 
That happen to do similar jobs.
Julia is better for full-on algorithm writing I suppose.
 
don't go there @eddwinpaz
 
7:54 PM
R is one of the most un-googleable languages around. Might as well have called it "the".
 
@eddwinpaz your question was ridiculous. It had no detail and you repeatedly refused to listen/give details.
Now please, drop it.
 
I was pretty specific about what to post when you came back.
 
@Wayne it's usually called r-lang for that particular reason :P
 
I'm pretty sure I answered it anyway :-) (in case you missed it)
 
7:55 PM
Writing pure R in an algo is pretty damn slow (doing manual loops or whatever).
 
cbg @SeanVieira
 
@Ffisegydd I think "Fizzy" is a much better name. When are you going to make a language to go with that name?
 
I'm going for fork KevinScript and call it FizzyScript. It will be the Python 3 of KS.
 
@davidism - cbg?
 
7:57 PM
@Ffisegydd :D
 
@Ffisegydd I forget if I ever actually wrote this in my licensing terms, but yes, that is permitted.
 
Chuckles Cool, thanks :+1:
 
Share and enjoy :-)
 
@davidism I guess the dogpile.cache will be cleaner
 
7:59 PM
The only bit of intellectual property I want to retain a stranglehold on is the use of the prefix "Kevin" in programming contexts.
The actual code can go take a flying leap.
 
The code needs some kind of license to prevent someone from closing it, though. At least something like MIT.
 
I keep meaning to add an actual license, and then misremembering that I did it already, and then forgetting about it.
 
We should write an sopython licence.
 
@ZeroPiraeus I am marklar
 
@AnttiHaapala oh yeah, didn't consider that
 
8:04 PM
hmm actually one ought probably use an attribute on session
simply
 
I think I had problems with that at some point, can't remember what though.
Probably as good as any other place until it's not.
10k laurel, that angry guy in the JS room made a meta post: meta.stackoverflow.com/questions/290496/…
 
Augh! Capitalization of Random words!
 
packages=# select * from classifier;
id | name
----+-------------------------------------------------------------
1 | Development Status :: 3 - Alpha
2 | Framework :: Pyramid
3 | License :: OSI Approved :: Apache Software License
4 | Programming Language :: Python
works...:d
 
@AnttiHaapala what's this project going to do?
 
@davidism and got a temp ban for his behaviour.
 
8:07 PM
@Kevin The subtitles in a recent major video game had capitalisation randomly in the middle of sentences. I vomited.
 
@davidism better pypi search
 
I almost feel like doing another salad translation of that post, but it would be too much work.
 
@Ffisegydd I hate it when I see grammar problems in "offical" text, like the captions for a big movie or something. My editing finger itches, but I can't make a revision.
 
@AnttiHaapala if you add the ability to weight by github/bitbucket commit/issue activity, I will be ecstatic
 
8:10 PM
Or some general "popularity vs activity" metric.
 
it was one of the first features suggested by my co-criminal
 
DSM
My entire office just got distracted into arguing about what we'd name a turtle.
 
@DSM Logo
 
also, comments and "similarity links" that works, and proposed alternatives, and colors and... whatnot
 
Yeah, I'd go with Logo too.
 
8:10 PM
@DSM Logos for a religious reference (GNU Pratchett)
 
Anything that itself rhymes with "turtle". Any Renaissance artist that hasn't already been taken.
 
@cphlewis Or if you are going to go Pratchett, then it'd be A'Tuin or Om.
 
Don't hurtle Myrtle, our fertile turtle,
For if she's scared her eggs will squirt all
Over the carpet and man, that stains.
 
Normally pet names should be restricted to something that you could shout in public and still retain your dignity, but you can trend a little wackier for exclusively indoor pets. Especially ones with low top speed that make running away infeasible.
 
Edgar.
 
8:13 PM
Edgar?
 
All pet names should be names that are absolutely inappropriate for a "normal" pet. I.e. some kind of old fashioned awesome name.
 
@cphlewis heh, nice rhyming turtle with "squirt all".
 
squirtle!
 
Nah man. Call it Charmander just to pokemon-snipe people.
 
DSM
Is @Zero around? I'd like to be able to say I polled three continents.
 
8:15 PM
@DSM that sounds slow, you should switch to a push-based mechanism
 
Reminds me of the Wayside Stories chapter where the school kids are trying to make a poem where they rhyme something with "purple". They come up with:
The baby won't stop crying.
Its face is turning purple.
What can solve this problem?
I bet a burp'll.
 
DSM
Or @thefourtheye or any of our other subcontinental friends?
 
how do you confirm the existence of a nested key in a dictionary in python?
 
@Kevin that's a pretty good poem
 
if outer_key in d and inner_key in d[outer_key]
 
8:16 PM
@corvid in any of the values?
 
The meter of my reproduction is a little off but I think it was better in the actual book
 
@Ffisegydd I'm naming my next pet King Alfred the Great.
 
any(key in value for value in d.itervalues())
 
DSM
@Kevin: Verrocchio is definitely a dark horse candidate. We could call him Verry for short.
 
Basically, I want to confirm that "profile.recent.viewed.videos" exists, for example
 
8:17 PM
Me and my GF like to come up with awesome names for cats we see on the internet. My favourite so far is "Professor Herbert von Snugglehaus"
 
d.get(first, {}).get(second, {}) ... etc. works, but you might be better off writing a helper for safe dict-traversal given a 'path'
I need to find a caffeine-delivery method stronger than coffee, better tasting than energy drinks and more convenient than IV drip
 
Proplus ground into powder and snorted off the back of a javascript textbook.
 
Whoa. Hard core.
 
Only way to feel alive.
 
why a JS textbook when I have a perfectly good copy of Effective Python right here?
 
8:23 PM
Because then you'd ruin a perfectly good book, as opposed to a perfectly awful book.
 
touché
 
8:37 PM
cbg
 
DSM
That is interesting.
 
About time, Arch and Gentoo have been using Py3 for years.
 
> If you're interested in this effort, please email me.
I am, but I don't want to deal with tons of unicode problems
 
DSM
8:45 PM
It's weird when you get pinged on a ticket you haven't thought about in four years.
 
Meh, emailed him anyway
 
SQLAlchemy 1.0 is out!
6
 
That's me right now, except my silk robe has cats on it.
the changelog is huge
 
whoa really?
 
8:54 PM
yeah, good bit of new stuff in there
nice!
 
Wow!
Good on Zzzeek!
 
Can someone link changelog?
 
thank you!
 
8:55 PM
that migration guide lists the key changes, but there's a detailed log as well
 
@davidism we still need to sit down at some point and try to sort out the Post/PostLink issue.
 
It's sitting half-finished on my home computer
 
DSM
♫ started from the bottom, now we're here ♫
 
I need to finish the rest of the models too.
 
@davidism I'm watching the video you linked yesterday (the day before?) now. Hettinger's lecture on beautiful code
 
8:57 PM
I've got the full dataset now, so can actually start adding stuff to postgres.
 
The problem is, I just bought a DJI Phantom quadcopter, and have been flying it nonstop instead of doing anything productive.
 
:O
 
In fact, I'm heading home right now to go fly it some more.
 
See that's why I want a job. To buy batshit stuff like that.
£900 though. Steep.
 
Even though I know I can afford it, it was really hard to drop $1200 at once. But it was so worth it.
 
9:00 PM
I do love making big purchases like that. Just dropping a lot of money on one thing.
 
Now the problem is that even though it's basically foolproof, I get anxiety every time I see $1000 flying away from me.
 
@davidism Drop some more money -- mount a GoPro to it
 
It has an HD camera on a gimbal, but you can't swap it out.
The camera's pretty good quality, although a GoPro is definitely better.
 
Oh man, shoots in DNG too.
 
rbrb
 
DSM
9:04 PM
Rhubarb in the air for davidism!
 
Oh lord there's a new Star Wars trailer.
And it shows Ford as Solo.
I need to go lie down.
 
You're late to the party, read up ;)
But I am now cautiously optimistic.
 
Well I don't think episodes i-iii were nearly as bad as people make out.
So I am very optimistic.
Plus I believe in J. J. Abrams.
 
I was impressed at the lack of lens flare.
 
DSM
I like Abrams, but he has a relatively small set of moves. They're good moves, don't get me wrong, but they're not numerous.
I should get a successor to the "Han shot first" shirt-- "My Star Wars has Thrawn".
 
9:12 PM
I've read any of the larger canon. It's something I've always meant to do.
Never known when to start. Maybe once I've finished the Dresden Files I'll go for it.
 
9:25 PM
@DSM The older you get, the less old a ticket has to be to give you that feeling.
 
9:40 PM
rbrb guys
 
cbg
 
Air
10:13 PM
@Ffisegydd Ep. 1 was half-decent if you ignore Jar-Jar, but Ep. 3 had pretty much no redeeming qualities IMO
 
Whaa-at? I actually thought they got better as they went along. 4-5-6, then a giant drop in quality in 1, but successively better in 2 and 3
therefore I'm assuming episode 9 is gonna be awesome
 
lol I liked 3
 
I did too
 
Air
A wild difference of opinion appears!
 
I dislike 1 and really dislike 2
 
Air
10:15 PM
I honestly barely remember a thing about 2
 
I'll be honest: I don't really remember 2
ha!
 
exactly ....
 
Air
Ep 3 was just so maudlin and boring
"I killed them all"
"noooooo"
zzzzzzzzzz
 
I showed my boss (a 50 year old woman who apparently still has a full-size cardboard cutout of Han Solo) the screen of Chewie and Han from the ep 7 trailer.
She squealed like a teenager
 
Air
10:32 PM
Is there an abstract term for all the various types of things that come out of os.listdir?
From one perspective, everything's a file, but then os.path.isfile doesn't make sense
PowerShell calls everything an "Item" but that's vague and also that's PowerShell
 
11:17 PM
I like to call them seashells
 
@JoranBeasley he doesn't know how to use the three seashells. Ha!
 
double plus good
hehe different futures but meh
said sanda bullock to sly
 
11:35 PM
@DSM cabbage :)
 
clearly @ZeroPiraeus is not up to par with his early 90's action movies
 
Guilty as charged.
 
in the future they have 3 seashells instead of toilet paper
and westly snipes
and sly
and sandra bullock
 
Truly a dystopian hellscape.
 
Demolition Man - A police officer is brought out of suspended animation in prison to pursue an old ultra-violent nemesis who is loose in a non-violent future society.
Just in case it's not immediately obvious that the police officer played by Sylvester Stallone who was put into suspended animation until he was needed wasn't enough of a badass
he's also named John Spartan
 
11:45 PM
Ah, yes, the Golden Age of Stallone films ... The Specialist is also the story of excrement being scraped together, IIRC.
 
And rob schnieder thought it was hilarious that this cave man did not know how to use the 3 seashells
so what I posted was directions i found online :P
 
Yeah, getting that. Maybe it's just me, but I don't think there's any context in which a picture of someone defecating into a seashell is appropriate in this room.
 
Unless we toss it in paint and draw hot pink arrows pointing to the defecation and labeling it "Javascript" and "Ruby" and...
Alrighty quittin time
 
@Adam Red. Red freehand circles, always. In the circumstances, maybe no drop shadows, though.
 
rhubarb, all
 
11:52 PM
less risque
(as in not at all risque... but allows you to witness the greatness of demolitionman
 
Air
Jan 6 at 21:44, by AirThomas
@corvid Do you know how to use the three shells?
Nice callback ;)
 

« first day (1643 days earlier)      last day (3288 days later) »