« first day (1614 days earlier)      last day (3348 days later) » 

12:16 AM
@Kevin Interstellar 6.7 / 10 -- still not sure to recommend it, or not
but I guess you will watch it anyway.. maybe you already did that
 
Cabbage
 
Pupppppy :-)
 
@thefourtheye my evil twin!!!! :p
 
@JonClements Potato puppy?
 
12:24 AM
tired... busy... etc.... but always fine... melon... potato?
 
Same here.... Running the machine with 3 hours of sleep daily... :)
 
oucherz... I feel suddenly a bit better then :p
 
Soon I ll catch some rest... (hopefully :D)
538
A: Reserved Keywords in Javascript

art4theSouldHere is my poem, dedicated to those who remain honest in the moment, and not just try to score: Let this long package float, Goto private class if short. While protected with debugger case, Continue volatile interface. Instanceof super synchronized throw, Extends final export throws. Try ...

 
 
1 hour later…
1:37 AM
@DSM wow... nice pandas answer... I'm still not sure what the OP is asking :p
 
Cabbage all :D
Hey Jon!
 
cbg @rvraghav93 :)
@offby1 love the name :p
 
DSM
1:54 AM
@JonClements: well, he kind of changed it on me.. fortunately it was only a one-word fix..
 
@DSM ahh... pandas is such a fickle tag :p
@DSM is it just me - or when you read this one did you think.... pandas can do that easily! JSON source, quick time grouper and .avg() - done? :p
 
DSM
If you're asking whether df.resample("1h") crossed my mind, then yes, it did. :-) But I try to watch myself to make sure I'm not being too much the library evangelist, and if the pure-Python way isn't much more complicated then I usually leave well enough alone..
Ehhhhh? That's the first time I've ever seen a notification like that.
 
2:10 AM
@DSM oh? Happens occasionally... as you're an RO on the trash room and it's in read-only until authorised mode, people can make requests to get write access
(so, the system notifies RO's someone's asked for access - just ignore it - no one needs access to that room except ROs)
 
DSM
Interesting outcome re: BalusC, by the way. Not quite as clearcut either way as I was expecting.
 
I'm just reading through that...
umm... I made a cup of tea using my nice shiny SO mug... and now can't find it
 
DSM
Did you drink it? If so, it's probably in your stomach, and hopefully not apparent to the eye.
 
user559633
@JonClements might want to hit up a singles' event if a mug is your significant other
 
@tristan it's fine... one can never be lonely when one has an inflatable goat :p
 
user559633
2:20 AM
do i ask?
 
If I do the same computation twice, is there a reason to believe the second time it might be faster and/or take insignificant time? I'm wondering if results are stored in some cache. It's fair to assume the computation is trivial like multiplication or taking some power of a number
 
DSM
In CPython, no, results aren't cached. You can cache them if you'd like, but if the computation is really that trivial it might take longer to look something up in the cache than to recompute it.
 
user559633
@Blob depends on the code
 
something like
a = x ** 2
a = x ** 2
 
user559633
then no.
 
2:24 AM
damn. now my hunt goes to the processor :|
although i really doubt it
 
user559633
was holding out saying no until i was sure it wasn't a variable bound in some closure
 
user559633
@Blob post the full code?
 
@tristan there's no full code, i'm just curious.
 
user559633
then why are you going on the hunt?
 
curiosity....
 
DSM
2:24 AM
Curiosity kills, they say. This hunt may end poorly.
 
user559633
do you want it to?
 
user559633
did you run something and the second call was faster?
 
ok, fine, how about something like:
foo(x ** 2)
bar(x ** 2)
that's a legit reason to be curious :|
 
user559633
oh, well, you said processor, so i assumed you say something
 
user559633
what's x in that ?
 
user559633
2:26 AM
if it's already the result of some function, then yes, it could already be set
 
DSM
I suppose if x is a custom object, it could cache the result of __pow__.
 
x represents an int
 
user559633
yes, but an int set HOW
 
i really want to say compile-time constant, but it's the python equivalent
it's hardcoded
 
user559633
you incur the overhead on x = some r value
 
DSM
2:27 AM
Wait, by "hardcoded" do you mean it's not really x there but 1283192 or something?
 
something like this:
def foo(x):
bar(x ** 2)
baz(x ** 2)
# elsewhere..
foo(1234)
bar and baz calls are inside foo()
 
user559633
only "optimization" is that x is set on foo()'s first call
 
DSM
Ah. Then no, CPython won't optimize that to avoid the repeated calculation. There are some compiletime optimizations on math involving numeric literals -- 1234**2, but that's different.
 
user559633
and subsequent calls to x inside foo() don't have to set x again
 
user559633
also @Ffisegydd holy crap congrats (now get a damned job you hippie scum)
 
2:33 AM
how much overhead does assignment incur? would assigning a value to x**2 in foo() theoretically increase performance?
 
user559633
look into python profilers
 
i doubt the difference is big enough to be noticable
 
user559633
depends on the nature of the assignment :)
 
user559633
and knowing when to bind a result to a variable can be super non-trivial :]
 
hmm, "Disassembler for Python bytecode" is a thing. i'll see if that helps.
 
user559633
2:37 AM
haha okay, godspeed
 
user559633
@Blob this is kind of related to the path you're going down and might give you exposure to some helpful modules: stackoverflow.com/questions/27805200/…
 
@tristan thanks
 
user559633
cheers
 
3:01 AM
@JonClements there's an offby1one many places; he's not me. We keep bumping into each other.
er, offbyone
 
the irony of you being off by one 1 there :)
 
I'm irony-proof at this point
 
DSM
Okay, time to escape. Rhubarb for all!
 
@DSM rbrb!
 
github.com/offbyone <-- my nemesis!
github.com/offby1 <-- me!
'round and 'round we go
 
3:05 AM
Where you stop - no one/1 knows? :p
 
3:28 AM
@JonClements why is your name so familiar ... are you a Lisp type in addition to being a Python fellow?
 
anyways, got around to testing it and in my case, saving the value saved 6/100millionth of a second
that's.. nice
 
Have experimented with Lisp, but certainly wouldn't put myself down as proficient... so - not quite sure why my name sounds familiar...
 
 
2 hours later…
5:15 AM
cbg
 
Cabbage new RO :-)
 
cbg
oh, pineapple Antti :)
 
cbg pineapple @Jerry
 
cbg Sword. Why pineapple me?
 
because I was quite late at looking up at what pineapple meant.. :P
 
5:19 AM
ok... xD
 
I have a problem when contact the string + variable in shell scripting
 
is that python? I hope it's python
 
curl -X POST -d "branch=esoftcar_abc-a&commitId="$LASTLOCALCOMMITID"&commitM=$LASTLOCALCOMMITMESSAGE&lastUpdateDate=$LASTLOCALCOMMITDATE&response=$PULLOUTPUT" 'http://ddd.com/updates/system.py'
$LASTLOCALCOMMITID isn't parsing to it
 
you can prolly do that in python
 
how can i do it in shell ?
 
5:38 AM
this is python room and you come here to ask how to do things in shell :D
@Sword lol :D
@wadehuang - could you share your code about deleting folders? — letsc 8 hours ago
lol
 
5:57 AM
0
Q: 'User' object has no attribute 'snippets'

manabreakI'm following the Django REST Framework tutorial, and at the moment I'm stuck in the Part 4. I get the error mentioned in the title when I try to list the users. I think it has something to do with binding the snippets to users. It works the other way around, though: when I query the snippet lis...

this is the standard django-related tutorial stuff, I have absolutely no idea what the code is doing, magic upon magic :d
 
Never seen us come up on MSO before...
 
Cbg
 
@JonClements Awww... I look cuter in that photo :-)
 
6:30 AM
Cbg
@Ffisegydd congratulations :)
@AnttiHaapala thanks :)
@AnttiHaapala django rest framework is meant to be awesome. There was a kickstarter project to make it even better. I've never used it, but I bet the docs are good :)
 
6:57 AM
@RobertGrant I read the tutorial and the question and I am not sure myself either...
 
Oh, fair enough :) But the question's vanished anyway
 
7:09 AM
so I guess there was something missing that was introduced in the tutorial
all these copypaste tutorials should have "get the code here"
I went to django channel and asked "where can I get the tutorial app"
"just type it from the tutorial"
What does drop references to it mean? — mchangun 4 mins ago
OH MY GOD.
 
@Antti yes? :)
 
7:26 AM
@JonClements sorry Jon, as I have sinned, not following the second commandment that was given unto me.
 
@Antti in light of your recent promotion - I'll let you off - just this once mind you!
 
:/
 
7:43 AM
why :/
 
Hey up
 
Umm... I thought typed cbg - not sure how I pasted that... :p
 
@Jon over time you've said to me "do you want a book or something?" with regards to doing a bit of Nidaba and various things. I've always said no. I have to ask for something now though... If you have a spare SO sticker can I has one? O.O
 
If you want one, sure. Do I have your up to date address, I'll whack some in the post next time I'm in town :)
 
Wow I was only half kidding. I think it was up to date on that CV. I can message you it via Google in a bit. You're a gentleman and a scholar.
 
7:50 AM
lol
so sticker
<3
how do I get the IRC
everyone's stopped doing ircs
sucks
 
@Ffisegydd you're more than welcome... :)
@Antti we could install an IRC server on sopython.com - just for you :)
 
aha
nope i mean international reply coupon
if one orders the stickers
seems that everyone stopped printing them
 
Oh lol, I thought you meant...IRC IRC as well
 
@Robert glad I'm not the only one - seems to be a natural conclusion being geeks :)
 
@RobertGrant I am from the hometown of IRC
why would I need you to give me IRC
 
7:58 AM
Ah :)
Good question
 
the first irc server is named after Universitas Ouluensis as "Unixverstas Olutensin Finlandia Vodka"
or "Unixworkshop Beerfirst"
 
Would you say that my spelling is bad?
 
No
 
That was an easy question, next!
 
8:03 AM
I think the spelling within this room is exceptionally good, the exception being me :P
and grammarwise as well, Antti proves the rule
 
Thanks guys, I was not sure if "one of our regulars freely confesses he has terrible spelling, bad enough that I was convinced he was based in Europe and English was his second or third language" was describing me...
 
@vaultah of course not! You're not considered a regular.
@vaultah I'm joking :)
 
I mean I freely confess that my grammar is bad, but I've always thought that my spelling is good enough
 
Who are you anyway? I miss 61612. He was awesome.
 
@RobertGrant :P
 
8:09 AM
well, does not take much to convince anyone that I am from Europe and English is my second or third language.
 
@Antti you aiming to hit 20k today?
 
not actively
 
I'm 220 away from gold badge. Might start pushing more again
 
@Ffisegydd ...
@Ffisegydd told you so
@JonClements I have given answers to bountied qs, total bounties 150 rep, if they'd just award me...
 
Well I've finished the thesis now so I have more time :p
Plus @davidism is far too ahead of me. That needs rectifying.
 
8:21 AM
and me? :d
 
@AnttiHaapala dude your SO profile basically lists expertise in so many things, I may as well go into management
It's so bad I've regressed to a simpler state and am calling you dude, dude.
 
@RobertGrant or you might as well get the work
no one wants to hire me...
or they say "I do not have specific expertise in X"
 
For what values of X?
 
like "your java ee-fu is not good enough"
"you have not programmed clojure for 7 years"
that's it today
in my hometown, basically
or then they'd pay the junior level salary
which is the same as a cashier in grocery store would get.
 
Time to move :)
 
8:25 AM
or do my own biz
the money's the problem though :D
gotta live too
 
Dude (see?), interview for Google, get them to relocate you to London and go from there in a year's time
 
hehe
but I'd be living in london :D
actually my friend went to a G interview in London, at their expense, and said "Well, I am not interested".
 
Yeah that's cool, but if you have the expertise and the time, why wouldn't you give it a go?
 
my wife's learning Finnish right now :D
dunno how complicated it would be her in Britain, bc her English is not much better than her Finnish :D
 
Cabbage :)
 
8:42 AM
Cabbage!
 
Cabbage
 
@Antti feel free to tidy up :p
 
@JonClements ? :D
 
@Mr_LinDowsMac you only asked that 10 mins ago - it'll already have eyes on it :)
 
:D
ahhh :P
now I understood :D
how ot do that
 
8:49 AM
@Antti you're expected to earn your absence of pay :p
Under room on the right, there's "move messages" - you then select messages, and a destination (in this case Python Trash) then click relocate and they move... (feel free to try it)
 
Thanks :)
 
@JonClements Hmmm... I didn't know that I have to wait some time...
 
to post it here...
but, anyway...
 
8:52 AM
@Mr_LinDowsMac if there were no rules about posting the questions, there would not be any discussion here, only constant stream of question oneboxes
 
I will wait the notification in the StackExchange App...
 
@Mr_LinDowsMac it's cool to bring it to attention when it's not received any attention, but generally anyone who can answer it will already be monitoring the front page and their favourite tags... - not the 3/4 of us that are here at the moment :p
 
@Mr_LinDowsMac see the sopython.com/pages/chatroom - heading "Posting Question/Answer Links"
 
yeah, sorry
re-reading the room rules xD
1.-Do not link your recently posted questions in the room. The main site is the dedicated space for posting questions, and having them answered.
If you have posted a question on the main site and a significant amount of time has passed without receiving a satisfying answer, then you can discuss your question in the room.
That's it
 
19 minutes is not "significant time"
 
8:56 AM
Yeah, I don't discuss that
 
the people in this room are polling for questions, so anyone in the room that is available, and could answer your question would have read it by now;
I am not
 
sorry guys
 
I am about to leave for lunch :D
but your question is a bit information heavy, could you make a smaller example of your exact problem
 
Uh... not sure... actually I think that some people will ask me to provide more code than the relevant posted... :S
 
I like questions where I can see in 20 seconds that "the problem must be there"
it can be that the problem is really hard to solve
but I do not like a question where the hardest part is parsing the question and finding the problem...
 
8:59 AM
that's why I provided the relevant code instead the entire file and classes like in other questions...
 
I skip most of long questions because I know that somebody will beat me to answer and I won't get enough upvotes...
Though this is why I still haven't got to 10k
 
Oh, just noticed, @Antti is now italicized ;)
 
Welcome to the team ;)
 
I don't know why, must have been the worst mistake ever
@poke melons
 
9:04 AM
Let me try to small it: The problem is in a slot, I need to create an instance of a class, the only thing that stops me is a parameter that I know how to get, but don't know how to set
I figured out that I need to set the button which is pressed, as parent of the qactions of the menu, at runtime at mousepress event...
 
:D
 
Dev
9:29 AM
Hi guys
 
Hello.
 
@Dev have you seen Test?
 
Dev
which test?
 
Ignore him, he's being an idiot trying to make jokes.
 
Dev
Okay :)
 
9:32 AM
And I feel pretty good about it :)
 
Umm I can't seem to find the 9gag's rules for comments
I downvote comments like "I like Putin, those who don't are brainwashed" and they magically disappear after a day or two. Some of them have a big number of upvotes, I doubt it's the posters who remove them
 
That's amazing.
 
Hello, I would like to compare strings and return the similarity:
strings:
abcdef
abcd
abchgdu

output:
abc
any Idea?
 
@Ffisegydd interesting choice of name for the poster as well... leave it to a mod whether it's a genuine account or not :)
@user2534685 what exactly do you mean by similarity? Longest common prefix? Longest common substring? etc...
 
@user2534685 Look up cosine similarity.
 
the letters of the stings, they are same in each string. sorry for my english
 
9:59 AM
@user2534685 so you're looking for substrings that are contained in all strings?
 
@user2534685 at the start of the string, or could it be anywhere in the string?
 
I love random downvotes…
 
@Ffisegydd yes.
 
Eg: 123abc and 456abc will still be abc - or would it be empty?
 
@JonClements it is enough to start at the start of the string
 
10:01 AM
If it's only at the start, you can "cheat* and use os.path.commonprefix...
>>> from os.path import commonprefix
>>> commonprefix(['abcdef', 'abcd', 'abchgdu'])
'abc'
 
lol, nice hack :P
 
@MartijnPieters I hope you're being sarcastic
6
A: How to cancel profile deletion?

Martijn PietersIf you did not confirm the deletion and you removed the please delete me message from your profile, the deletion process will automatically be cancelled. You don't have to do anything else. Glad to have you stay with us!

 
@JonClements thank you :) how it works with start anywhere in the string?
 
@user2534685 have a look at the difflib module
 
@JonClements Thanks!
 
@JonClements could sort the strings' contents first then do that :)
 
@Robert don't be a meanie :p
 
Isn't it okay? At least for relatively small numbers/lengths of strings?
 
@BoltClock: towards that user: oh hell yes. But I wrote it as a general reference answer.
 
@Robert err... you'd find the longest sequence of consecutive letters - which isn't necessarily the same as the longest common sub string
 
10:23 AM
Oh, lol sorry
 
@BoltClock: besides, is keeping the account better than to have to track yet another new account?
 
@MartijnPieters Good ;)
 
What am I thinking
 
@Robert haha... I assumed it was a joke suggestion! :p
 
What if you sort, not by alphabetical order, but by whether or not they appear in all the other strings...
 
10:24 AM
@BoltClock: I didn't think that Damnit, why won't you just go was going to be taken all that well as a Meta answer here. Not enough context for the Meta community to not vote that into oblivion :-P
 
Yeah, and that was kind of you :)
 
When someone asks "efficient way to do X" .. what does "efficient" mean? Fast? Or could it have other meanings?
 
@user5061 speed, memory, readability, etc
 
python 3.4.3 page has wrong download link
 
10:25 AM
Concise @user5061
 
@user5061 that's too broad a term, yes.
 
@MartijnPieters Only reason it's still around is because we're still tracking this one
 
Usually they mean fast and / or low memory footprint.
 
Ok, thanks friends. bb!
 
@BoltClock good, thanks for tracking it too. :-)
 
10:26 AM
I use it to mean optimize for "speed and memory and writing effort"
or "least money"
 
Umm... wonder why this one ended up being spam/offensive... I flagged as NAA... Didn't think it was spam/offensive - just a crap non-answer...
 
@JonClements I guess enough people flagged it as spam.
 
if I need 2 computers to execute a oneliner, then that's not efficient if 2 lines can be executed with 1; but writing 30000 lines is not efficient either bc with that I'd buy the other computer
 
That message is just noise, not spam.
 
@AnttiHaapala yeah that's a good definition
 
10:28 AM
@Martijn so 6 people flagged it "wrongly" or something... that's not exactly encouraging...
 
@JonClements "deleted by Community" alone means the user was destroyed, taking their unvoted posts with them
Not that the post was deleted by spam flags
 
@BoltClock ahh.... so a mod (presumably) nuked the account, then community does a roomba?
 
Pretty much
 
@BoltClock I'm still confused why it gets the "this post was marked as spam/offensive..." though ;(
 
@JonClements Oh, that's because there's at least one spam flag on it
It was marked helpful when the post was deleted..
Not sure declining it first before destroying it would have improved anything - either way there is nothing to be seen there
 
10:33 AM
Well... given the original user name, it was clearly a wind-up account... I'm not bothered either way... at least now I know why it says spam/offensive - so I'm happy :p
 
@JonClements I flagged it as spam, sorry :P
 
"should not flagged spam" - case: "It contains only gibberish, such as "fsdguejgkfdlk". Use the 'offensive' flag for these cases, or flag 'for moderator attention' with a custom explanation if it requires more detail."
186
Q: What are the spam and offensive flags, and how do they work?

KipWhen flagging, there are two special case options: spam and offensive. What is spam, and when should I flag content as such? What is considered offensive content? How does the spam flag differ from the offensive flag? What is the effect of these special flags? Is there any way to remove these f...

 
Or, you know, "very low quality"
 
but then I am not sure what is "unsolicited" here, I flagged 1 message as spam, though it was a bit borderline, and it was accepted...
 
One of the few proper use cases for VLQ and nobody uses it that way
 
10:37 AM
bc name of the flag is not obvious
"This answer has severe formatting or content problems. This answer is unlikely to be salvageable through editing, and might need to be removed."
if this would have "The answer is totally nonsense or gibberish, has severe formatting or content problems. yadayadayada"
 
Yeah
 
now ppl look at NAA and VLQ
and they choose NAA because, well, it is not an answer, while the VLQ is "an answer that has low quality"
 
Frankly, VLQ looks like a subset of NAA
 
@JonClements not really 6, but a significant number.
 
there should be an obvious way to deal with those answers that are answers but do not contribute *anything* to the question. For example, it is ok if someone posts an answer that has an SQL injection or severe vulnerability, or is just plain stupid; it should just be downvoted and serve as a warning.

But then there are these answers that do not say anything, that look like they are are partial answers but not not begin to answer at all, like a question says how to do this in MySQL and Python, then someone links to the PHP interactive manual...
 
10:47 AM
Since it was deleted by Community when the account was deleted, a majority could have been 2 spam flags..
not entirely sure about how the chips should fall for it to be marked as such on deletion.
@AnttiHaapala: 20k is within your grasp today!
 
yeah
yay
@MartijnPieters like every day this week :P
 
@Martijn Python gold badge... made an RO, then 20k - he's on a power rampage :p
 
@JonClements it goes to your head, all these rewards, it really does.
Now gimme my Flask gold tag badge!
etc.
 
@MartijnPieters Nothing to do with the spam flags. Deleting an account takes all negatively-scoring posts with it, and destroying takes all 0 and negative score posts with it
 
@Martijn I'm just happy having tea in my SO mug, and writing notes with my SO pen :p
 
10:53 AM
@BoltClock We are not talking about the deletion here.
 
We just happen to destroy accounts in response to valid spam flags
 
@BoltClock: the deleted message has the spam or offensive redaction text.
and we are speculating as to why it got the redaction vs. a regular delete.
 
@MartijnPieters Ah OK. The redaction is simply because like I mentioned it has a spam flag that was marked helpful with the deletion
But whether it's deleted by roomba or a mod is irrelevant
 
@Martijn sounds like we just blame @poke :p
 
huh?
 
10:59 AM
@JonClements sounds like it!
 

« first day (1614 days earlier)      last day (3348 days later) »