« first day (1574 days earlier)      last day (3377 days later) » 

12:12 AM
Hmm I really expected my solution to be faster here
but the regex beats me by almost 50%.
[x for x in lst if re.search(r"[aeiouAEIOU]{2}", x)] versus [x for x in lst if any(a in vowels and b in vowels for a,b in pairwise(x)]
 
12:46 AM
http://stackoverflow.com/questions/28356669/find-all-subarrays-multi‌​ples-of-3-in-a-given-array
 
what if you change to vowels = set(vowels)
@AdamSmith
oh like @PadraicCunningham's answer
 
right, but he's building a set from each slice of 2 char
I figure doing two compares to a set is probably cheaper than building that many sets just to do intersection on them
 
for a,b in zip(x[::2],x[1::2]) also might be faster than tee'ing it
 
In [3]: vowels = set('aeiouAEIOU')

In [4]: %timeit [word for word in s.split() if any(this in vowels and next in vowels for this,next in pairwise(word))]
10000 loops, best of 3: 36.2 µs per loop

In [5]: vowels = 'aeiouAEIOU'

In [6]: %timeit [word for word in s.split() if any(this in vowels and next in vowels for this,next in pairwise(word))]
10000 loops, best of 3: 36.4 µs per loop
0.2 microseconds! Break out the bubbly!
 
12:50 AM
:)
 
what if you try that zip I posted instead of your tee fn
 
In [7]: vowels = set('aeiouAEIOU')

In [8]: %timeit [word for word in s.split() if any(this in vowels and next in vowels for this,next in zip(word[::2], word[1::2]))]
100000 loops, best of 3: 19.7 µs per loop
we have a winner
 
and then call vowels.intersection([a,b]) == {a,b} as your condition
or maybe len(vowels.intersection([a,b])) == 2 not sure which would be faster
although anything you gain in speed ofc is lost in readability vs the regex
 
both the set intersections are about 30 micros
 
really... hmmm
 
12:54 AM
== {a,b} and len(...) == 2
 
thats slower than the and comparison?
 
by half
 
I was sure it would be faster
 
20micros to 30 micros
 
12:55 AM
In [10]: %timeit [word for word in s.split() if any(vowels.intersection([a,b]) == {a,b} for a,b in zip(word[::2], word[1::2]))]
10000 loops, best of 3: 33.4 µs per loop
but yeah, regex is definitely the tool for the job
it's just fun seeing what you can get away with without breaking out the Big Guns.
 
that really suprizes me
 
Could make it less readable. [word for word in s.split() if any(all(map(lambda k: k in vowels, thisnext)) for thisnext in zip(word[::2], word[1::2])]
sometimes I worry that I've become too good at writing troll-ish "How ugly can I make this look." Then I realize that's a problem for future Adam.
rbrb quitting time
 
lol
I sometimes put those little gems in my work code base ...
cause theyre so clever ...
then later I look at it and im like wtf
 
 
2 hours later…
3:15 AM
cbg
 
http://stackoverflow.com/questions/28358045/hidden-web-base-bot-issu‌​e
http://stackoverflow.com/questions/28357685/message-cannot-be-define‌​d-def-crash-message-display-cannot-be-defined
 
3:47 AM
@AdamSmith any(all())... huh...
 
4:10 AM
@corvid Not only is it almost incomprehensible, it doesn't actually work. :)
>>> [word for word in s.split() if any(this in vowels and next in vowels for this,next in zip(word, word[1:]))]
['boat', 'rain', 'near', 'mysterious']
@AdamSmith And it's missing a ), presumably just before the final ]
 
oops, it is missing that last ) isn't it?
 
time to start burning and
now where's that bot I wrote...
5
 
@corvid It's an any wrapped around a genexp that uses all. It makes sense, it's just uglier than sin :)
 
that's what I was thinking
 
I think I was trying to keep from using re.search(r"[aeiou]{2}", word)
because, you know, regex is slow, right?
 
4:27 AM
Also, zip(word[::2], word[1::2])] misses some combos; it should be zip(word, word[1:])
 
ahyes
My original code worked that way :)
 
Some variants:
[w for w in s.split() if any(c0 in vowels and c1 in vowels for c0,c1 in zip(w, w[1:]))]
[w for w in s.split() if any(t[0] in vowels and t[1] in vowels for t in zip(w, w[1:]))]
[w for w in s.split() if any(vowels.issuperset(t) for t in zip(w, w[1:]))]
@AdamSmith Optimizing can be dangerous! :)
 
@PM2Ring something something root of all evil
 
Yep.
Although IIRC Knuth actually said "Premature optimization is the root of all evil"
But speaking of optimization, last night I discovered that
bytearray(struct.pack('>L', n)[1:]) is noticeably faster than bytearray.fromhex(u'%06x' % n)
 
read on the internet "I am currently working on building a device which produces more energy than it consumes"... huh
 
5:01 AM
-18
Q: Why don't we have intdelta (a quеstiоn about timedelta)?

ValI wonder why do you need the time delta but not delta for any other linear type? I see the double standards here. The standard answer to rationalize the timedelta makes no sense because it basically says that type is different because it is different, which is a circular argument, it also co...

reading worst questions of them all :D
 
how did you find that?
 
delete?
 
search
dunno ...
but that is pretty bad troll there :d
 
yeah, I'm voting to delete, that thing is ridiculous
 
5:08 AM
Can't we just archive at for comedy value? :D
 
look at that user's suspension: May 11 '24
 
deleted
@AdamSmith it is archived for comedy value
for 10k+
just get some more upvotes :D
 
WTB 20 upvotes on my answers.
:)
 
though it is not found by search :D
I dunno how to find the deleted questions
maybe we should write them up in wiki
 
@AnttiHaapala how did you search for negative votes? I must be missing something.
 
5:16 AM
search by votes, last page
 
/facepalm
 
Out of delete votes :-(
 
stackoverflow.com/questions/22209729/… laurel, no close reason for this question :D
old q so no need to think about reps :d
 
5:32 AM
lol vaultah's answer
 
I don't think the second one's deleteworthy - it's not a good question, but 7000 views in less than a year suggests it's a good waypost to the dupe target.
 
could be
the first match of How to make an infinite loop in python
maybe could modify the other question title :D
then we could get rid of that
done editing
 
5:49 AM
@Antti sorry ... notified of your edit just as I finished mine. I think mine's marginally better, but then I suppose I would ...
 
hmm so if your's is better then rollback mine
 
only way to know for sure is a cabbage to the death
 
Have at thee, ruffian!
 
9663339933388889999993333333666666666333888855558888993336666...
"hmm, he doesn't have anything worth taking"
 
why now undelete?
 
completely out of left field "thanks for the explanation of while loops, tell me how to make a .exe"
 
@AnttiHaapala For the aforementioned reason ... it's a heavily-viewed dupe at the top of the googles for the question, so a good signpost.
Very funny comment though ;-)
 
@ZeroPiraeus but now the title on the dupe does not match "how to make an infinite loop"
that was the point of my edit, the reason why google gets there is that
 
5:55 AM
Answers the question, though.
 
the other one does not say it clearly, it was like "blobloblbollblo"
when the question really was: "how to make an infinite loop, gangnam style"
 
Of course the original title is the best ;-)
 
I google imaged "cabbage fight", now I am very confused: theworldofchinese.com/2014/05/…
 
or offtopic with "clear problem statement"
 
says "it won't print" but actually means "it won't stop looping/print what I want"
 
6:01 AM
stackoverflow.com/questions/14046163/… hoho see the comment on the accepted answer
looks like perfect xy problem, OP wants to do image resizing
 
lol, I remember that "sorry I left caps lock on" comment
 
@ZeroPiraeus omg
just realized that "infinite loop not printing"
see there is an accepted edit by someone "fixing" the indentation
the prints were not in the loop
GRRRRR
 
Yeah.
 
even more so that deserves a close
 
@AnttiHaapala I hate it when people "helpfully" edit the problem away like that.
 
6:14 AM
if the op couldnt care to fix the code
 
The title edit is "interesting" too.
 
@AnttiHaapala Yeah, definitely unclear as written (and as you say, unfixed by OP).
 
6:52 AM
stackoverflow.com/questions/27508898/… gem, oh how much do I miss the "lacks minimal understanding"
 
@xnx it should work for 0 though — tom Dec 16 '14 at 16:11
:-)
 
@ZeroPiraeus That comment deserves an upvote. :)
 
Love the stackoverflow VLQ queue:
 
I thought so :-)
 
7:02 AM
0
Q: Android setting development or production environment

Marco LauI have an Android project that is communicating with an API. However, the API URL is hardcoded into the code. Coming from a Rails background, it is possible to communicate to a staging server or a production server based on the Rails environment on which is defined in a config file. I found Bu...

flagged as vlq the answer there, basically the question says "How can I do so that I have different url for staging and release builds"
and the answer says "Have different urls for staging and release builds".
the problem ofc is that there is no selction for "this answer does not try to answer that which is asked"
 
@AnttiHaapala Oh dear. These people who try to apologize for posting crap by saying it's their first time using Stack Overflow crack me up. Why can't they read the help info and then spend a little bit of time looking at existing questions first, so that they get some idea of what's acceptable and what's not?
@AnttiHaapala I call VLQ the slops bucket.
 
7:17 AM
@AnttiHaapala done
> Do we have enough RO coverage between midnight and 6am – if not, should we be concerned about it? - Jon
What RO means in the above?
 
room owner
 
7:57 AM
Cbg my lovelies
 
cbg :-)
 
8:18 AM
Cbg :)
 
8:40 AM
does anyone know a good api for redis that would be more natural than the redis module
py3
 
8:56 AM
0
Q: Edit time limit

jurgemaisterI'm currently doing a tag cleanup meaning I have to edit a lot of questions. Since I'm only doing tag edits, most of these edits take very little time, but I'm hitting a wall here: After editing a few quesion in rapid succession, I start getting these "You can perform this action again in n se...

Don't we know someone that has a script for that!? cough
 
stackoverflow.com/a/28359742/918959 this is a comment that is also obsolete, and was obsolete when written, but when I flagged NAA it was disputed :D
 
9:52 AM
cbg!
 
long time no see @AshwiniChaudhary - how goes it?
 
10:24 AM
Hello, can we apply the moore neighborhood for a 3D array ?
 
Wow. Funny how you still come back to us "satanists" for help isn't it.
Incidentally, yesterday when you went off on one in a huff at me, I wasn't even referring to you. Maybe you should read back through the chat before you go throwing a tantrum?
 
FINE THEN
I'll go :P
 
@Intrepid pipe down.
 
Well, while cleaning up [scan], you should scan the questions for further issues. Quite possibly the question should be closed, voted upon, or edited further than just removing the tag. If you do that. You say "the editor already knows what to do before the "edit" link is clicked", but this is the completely wrong mindset - you know that the tag is wrong, but you don't know if simply removing it without doing anything else is the best course of action. — l4mpi 1 hour ago
my opinion nicely covered
 
@Intrepid sorted out the tax man yet?
 
10:43 AM
(also cabbage)
Tax man is sorted. I'm no longer thousands of pounds in debt to the bank
 
Huzzah!
 
Now I just need to keep an eye on the bank to see if they charge me a trillion £s in fees
Please tell me your day is better
 
I bought some kitchen knives.
And...that's about it.
 
Swanky
I like
 
@Ffisegydd are you as anal as I am about kitchenware stuff? I bought a set of knives once that I could just bend.... they were that rubbish... got some really decent ones now though...
no guessing who flagged that is there :)
 
10:53 AM
oh.
cbg.
I keep forgetting that.
 
@Shog9: Don't you think it would be smart to use an username that's not basically impersonating a SE employee?
 
@ThiefMaster can you not just delete the account? :(
 
unfortunately he needs to actually request deletion - the user info text is just an additional confirmation
 
@JonClements if there is actual content, I'd expect a moderator to just reset the name to the anon userxxxxxx version.
 
Okay... can I formally request a chatban then please?
 
10:55 AM
rather than delete the account.
 
they're a persistent irritant to this room, and I'd rather not spend my time flagging and kick muting
 
TL;DR of what he did? Was there e.g. flagging abuse?
 
help vampire/doesn't listen/constantly protests/pain in the arse/disrupts conversations - don't make me dig up transcripts - I don't have the time
 
He referred to us as satanists when he didn't get what he wanted.
Although that was on a different account, which has now been banned for sockpuppetry.
 
ugh.. do you remember which account it was?
 
11:03 AM
@ThiefMaster in short - he's not welcome in this room (or any I imagine)... I'll keep flagging and kicking where I can
 
> This account is temporarily suspended for rule violations. The suspension period ends on Feb 6 '16 at 11:06.
 
@Thiefmaster first turned up as PythonLearner (now "Shog9") 45 minutes after being kickmuted (for the nth time) as Begueradj for asking whether it's okay to create an SO account specifically to ask bad questions, which was itself an act of trolling, given his history.
 
This guy.
I did not know I have more than 2 profiles. Thank you for informing me. — Shog9 2 hours ago
 
>_<
 
11:13 AM
thank you @ThiefMaster and @BoltClock
@Zero wow... you put that together nicely... good job sir!
 
@JonClements Anyway back to our previous conversation :P I'm not fussy about plates or cutlery, as long as I have something to put my food on, and an implement to shovel it into my mouth, then I'm happuy.
 
"happuy"? :p
 
But I am very fussy about the actual things used to cook. I've got very nice pots/pans/wok etc. And even nice spatula/spoons. I've been meaning to get some nicer knives for a while.
 
@JonClements I think in Welsh that's pronounced "happier" ;-)
 
It's actually slang for "happy guy". Come on guys, get with the times!
I also keep on meaning to buy a whetstone to properly sharpen my knives.
 
11:19 AM
when we got our first place, my partner and I didn't have much spare money... her parents helped out with an oven and microwave, and my mum got us a toaster and a fridge freezer
 
Hello to all ;)
 
cbg @KasraAD
 
Wotcha @Kasra :-)
 
and we went to a local ASDA and bought a "home starter kit" thing - a set of sauce pans, frying pan, knives/forks/spoons kind of thing
 
@JonClements @ZeroPiraeus Cabbage!:)
 
11:21 AM
There's a kitchen shop in Bath which is absolutely amazing. It's got a wall full of kitchen knives. Ranging in price from reasonable (£20 each) to insane (£200+ each).
@JonClements I know the type of kit :P had one when I was a student.
 
I've got a wall full of kitchen knives too. But enough about my relationship problems ...
 
What I really want is something like this blok-knives.co.uk/knives but at £240 for a single knife, it's a bit out of my range at the moment.
Hand made though...
 
@Ffisegydd I've got a steel/titanium cook's knife thingy...
that was a slightly drunken online purchase at 3am for about £600 I think
 
When me and SO get settled down with jobs I may buy myself one of those Blok knives for Christmas.
 
@Ffisegydd nicee
 
11:34 AM
@JonClements Ever wonder why anyone bothers with banning accounts when it is so easy to circumvent them
I wonder too
 
but I wouldn't get to use a knife if I bought it :(
 
one of the downsides being married to a Vietnamese...
 
I do have a careers profile, but they don't have much coverage in my area :P
There are 8 jobs within 50 miles of Bath on Careers.SO.
 
@Ffisegydd don't complain, plenty of options
there are some jobs within 500 miles radius of Oulu
half of them even in my country.
 
11:37 AM
@Antti If only there were some giant mobile company near you.
 
there is none
well there is one networking company, not so Giant
but they hire lazily
 
Talking about mobile companies - it appears that BT is buying EE
(or has bought)
 
Hah yeah. I used to be with Orange, who then merged with T-Mobile to become EE, and now EE has been bought by BT :P
 
my first mobile phone contract was with "BT Genie"
a good old nokia 3310
had unlimited WAP access...
 
@JonClements I imagine they'll rename themselves Bête ...
 
11:51 AM
anyone else remember when you just charged your phone once a week? :(
 
I heard they used witchcraft
 
Initially read that as "changed", and thought "wow, that's taking the whole bleeding-edge thing a bit far".
 
@IntrepidBrit Ahh yes... I did ponder why some people instead of plugging the phone into the mains, did chanting and sacrifice goats
 
Aren't they Python programmers?
 
obviously not - they should sacrifice a cabbage instead
 
11:56 AM
That's not what I heard yesterday. Was starred and everything
 
seriously though - does anyone with a smartphone actually get more than a day of battery life (if that)
 
I can get a few days out of it, if I just use it as a phone
 
I usually get a day to day and a half, depending on usage.
 
(No wifi, 3/4G, etc)
 
Yeah I could get much more if I just used it as a phone.
In fact mine has an Extreme Power Saving mode which disables everything but phone calls and texts.
In which case it lasts ages.
 
11:59 AM
Nice
 
if I put it in "airplane mode" - I get many days...
but then, might just as well turn it off
 
EPS is more for "I only have 10% battery but need to take a call in the next few hours" than a permanent solution.
 
I'm tempted to buy a Kazam rugged old style phone for my next actual phone
 
I can forget to charge mine one night and it'll usually make it to the end of the next day ...
 
And then just use my existing phone as an advanced Ipod
 
12:02 PM
we should get @Kevin to create a fusion source that we can use for batteries
dropping your phone and destroying a city could be an issue... but...
 
Why Kevin? Don't we already have a registered Scienceman for that sort of thing?
 
It's Kevin because's he's our mad scientist... we're all ready adding "blow up the planet" to-do's.... we might as well stay consistent
 
Ah, so he's our unregistered scienceman. Gotit
 
Mind you - the Mars terraforming project and suitable light-speed transportation to get there project, i hope is ahead of the "inadvertently blow the world up" project
 
12:07 PM
My chat timed out, I had a big speech grumbling about you picking Kevin over me, I called you many bad words, but Intrepid stood up for me in my timing out :P
Which is why he got the kawaii kitten.
 
fist pumps yus!
 
I'm not allowed to chase the kitten am I?
 
Are you a kawaii puppy?
 
cbg
 
12:09 PM
@IntrepidBrit if I say I am, can I chase the kitty?
 
cbg(PM)
 
I'm so tempted to post some evil code as an answer to stackoverflow.com/questions/28364758/… ; the comment trail is interesting...
 
@JonClements Yes. But if I catch you in a lie, I'll have to smack your nose with a newspaper and shout "bad dog" a lot.
Then maybe take you to the V word, just for a check-up
 
@IntrepidBrit you're not friends with the RSPCA I see? :p
 
Nope. Don't have those heathens up here! We just have the wholesome SSPCA ;)
 
12:13 PM
Bleh I need a haircut.
 
@JonClements What's wrong with a good old-fashioned Plutonium-238 RTG ?
It's that colour because 1kg of Pu238 (a lump about 3cm across) puts out a little over 500 watts of heat
 
I do love science.
 
With ref to stackoverflow.com/questions/28364758/… how's this for down-right scary?
altsum=lambda s:sum((t[1],-t[1])[t[0]&1] for t in enumerate(s))
My earlier version was
altsum=lambda s:sum(t[1]*(-1)**t[0] for t in enumerate(i,s))
but I decided that was too simple. :)
 
@PM2Ring: looks nice and gnarly!
I once did something like that to a how to test a sudoku question. It works, does the job, but good luck explaining it to your teacher.
 
:) Hang on, how did that i get in there? :oops:
 
Wow.
 
3rd flagged copy of the same ripoff by the very same user.
 
You flagged it? Awesome.
 
Did you mention that this was the 3rd time?
 
12:27 PM
yes I did now
 
Awesome, hopefully that'll put a stop to it.
 
and also said the guy says he lives in india and copies blog articles by a spanish mister and a kenyan lady while speaking of both of them in first person singular
the most annoying thing is that I think that user is knowledgeable enough to contribute something valuable...
but instead just wants to farm rep by plagiarising
the funny thing is that the post says "see my github"
and links to antonio leiva living in madrid
 
@MartijnPieters Nice.
 
@MartijnPieters you deserve reversal with that answer :D
 
@PM2Ring the OP even got back to me with a doesn't work comment about splitting out the numbers from the file.
@AnttiHaapala 15 more votes to go then! Not all that likely.
 
12:33 PM
just remember to remind ppl to upvote you there :D
 
is it wrong to sing along to a les miserable sound track...
 
@JonClements does it help if I say my kids do that all the time?
 
do they play it via a 300W speaker system?
 
There's nothing wrong with singing along to Les Mis. Les Mis is awesome.
 
@Ffisegydd was lucky enough to see it in the west end
 
12:41 PM
Yeah went with GF last year to see it. It's an amazing show.
Phantom of the Opera is also good.
 
don't have the time now to go see theatre as much as I'd like to
use to go see plays and opera... loved both of them
 
I like classical orchestra music, especially strings and piano, but never seen the appeal of opera.
 
DO YOU HEAR THE PEOPLE SING, SINGING THE SONG OF ANGRY MEN
 
I prefer the Yorkshire version of Les Mis "Does thee hear t'people sing? Singin' song o' angry men!"
 
I have seen phantom of the opera in queens theatre, I wanted to see les mis, though can't complain, local government paid for me
 
12:46 PM
Yeah I saw POTO at Queen's Theatre.
 
@Ffisegydd Sophie use to like it, and she played chello, and studied in Italy... so... couldn't really say no
Opera... not my kind of thing... the woman (lead singer) had such a powerful voice though - the send shivers done your spine thing
always nice when a good track comes up on random
 
Resource recommendation... Sort of.
Technically he's not asking for an "off-site" resource, because he wants code that SO users have themselves written ;-)
 
I'm going with too broad
 
oh ffs, another client that's emailed "I clicked delete and it's gone"
you get a prompt to enter a 4 digit random password to confirm deletion
 
Before deleting, user must compose a five thousand word essay explaining why he believes that deleting the file is a good idea.
Writing style analysis will be carried out to verify that it was written by the user, rather than one of his underlings.
 
1:01 PM
well, it's only soft-deletes... so no biggie, but still, sighs
 
And then we just hide the file instead of deleting it anyway.
 
what were they expecting when they clicked delete?
 
@ShinySides well, I'd like to think delete
 
Maybe Delete is right next to Edit, and when the confirmation box appeared, they only read exactly enough of it to determine how to make it go away.
"yadda yadda, enter password, ok fine... where did my file go?"
 
so obviously didn't get the "THIS RECORD WILL BE PERMANTLY DELETED - TO CONFIRM, PLEASE ENTER THE RANDOM 4 DIGITS AND YOUR PASSWORD TO CONFIRM"
No idea how I could make that more obvious
 
1:06 PM
You can't because users don't read.
 
make it red with warning signs everywhere, make it scary
:D
look at the way github handles the delete, the whole popup it's pretty much red
 
I feel that you may be underestimating the ingenuity of fools ;-)
 
oh I know I am, there's only so much that can be done
 
Make the dialog slide out of the way when they get the pointer over the button three or four times, then when they do manage to click it, have a video of the CEO pop up saying "no, but are you really sure?"
 
Ooh, I know. Charge them 99 cents per delete. "Enter credit card information now" ought to get their attention.
 
1:11 PM
164 tabs open in firefox, well that's a record... today...
 
I wonder how you can be use all of 164
be using*
 
I usually max out around 20 when I am working on something that has a lot of reference material
 
someone put it very nicely: "Wouldn't it awesome if Mozilla made this sleek new browser without any unnecessary extra features... then realize that they did it already" - facepalm.
 
My Firefox just went into a "(Not Responding)" state just as you posted that :-)
(it is responding now, evidently, or else you wouldn't be reading this)
 
re-cbg
 

« first day (1574 days earlier)      last day (3377 days later) »