« first day (1381 days earlier)      last day (3568 days later) » 

3:01 PM
Just for the record, I starred that... not Kevin :)
 
Once more the sopython-close-toffee-hammer has spoken.
 
Woo hoo... another sopython crew closure :)
 
:D Lo all btw
I'm just hiding in the BG
 
@Ian doing a bloody lousy job by announcing that you're doing so then aren't you :)
 
...Oh crap
 
3:04 PM
Making progress, the guy posted a code sample. One with syntax errors that doesn't replicate the problem, but still.
 
@Kevin not exactly sure how sort applies to whatever they are trying to do though :)
@Martijn I might have an answer on 24... cough
 
@JonClements No you don't.
Not anymore...
 
oh wow... how did that happen... cough
 
DSM
@Kevin: best guess-- he's using Python 3, and he's eventually comparing an element of arr1 with arr2, generating a TypeError.
 
Yes, I suspect that as well
 
3:13 PM
lazy newbs
 
I sort of want to skip the song and dance and just tell him "sort one list using another one with list(zip(*sorted(zip(seq_1, seq_2))))[1]"
(disclaimer: not tested, etc)
 
DSM
Mutatis mutandis for 3, of course.
 
Well, I have to admit I am actually very impressed with Nationwide Building Society.
 
@Zero I use to use them... what's impressed you ?
 
DSM
@Kevin: his new code seems to rule out my theory, more's the pity. Looks like he's just feeding strings to float for some reason.
 
3:19 PM
It's odd because Ratings really does look like it only ever contains floats, so float(arr2[i]) should be fine
Maybe there's a problem in his swapping logic, which he helpfully did not include
 
-2
Q: Passing two or more lists to a function in python

DuckI am trying to do a modified sorting algorithm that uses the variable in one list to sort the others, when I try and pass both lists in the function as such (arr1 is strings, arr2 is floats): def sort_algorithm(arr1,arr2): and try to use them later in the function as: if arr2[0] > arr2[1]...

kadsljfalkjdsf
 
I got robbed on Saturday night, and the individual responsible obviously must have seen me enter my PIN when I was withdrawing money for a taxi (it's a thoroughly embarrassing story). Anyway, they completely cleaned out my current account.
 
downvote to oblivion :D
@ZeroPiraeus you do not have atm limits there?
 
@ZeroPiraeus Ick!
 
Just spoke to Nationwide Building Society's Special Investigations Team, and they've agreed to re-credit all the fraudulent withdrawals.
 
3:21 PM
I'm glad to hear it :-)
 
@AnttiHaapala Yes ... I can't see it on my online banking (transactions are "pending"), but apparently a large number of small withdrawals were made.
 
@Zero I've had that before... gone to a cash point and thought, "ummm: I know I'm constantly near being skint, but that doesn't look right"...
 
DSM
Mystery of the day: I like surface plots. Why don't javascript plotting library developers?
 
checked online banking and stuff, but can't see certain transactions... so phoned the telephone banking guys, who were able to advise and reverse the transactions...
 
Insufficient 3d rendering capability?
 
DSM
3:24 PM
@Kevin: I'd even take decent 2d surface plots ATM.
 
Maybe interpolating a nice smooth surface is a hard problem. I've never had to do it, myself.
 
I had no idea they would do that ... assumed the money was just gone. Very sympathetic people I spoke to - the worst thing was telling the same ridiculous series of events half a dozen times when connected to someone higher up the food chain.
 
Depends on whether you've got a discrete collection of points or a proper equation, I guess
 
user559633
does anyone have a link to that Guido quote in which a recruiter asked him how many years of python experience he has?
 
user559633
3:27 PM
apparently, it was dhh and rails
 
"You seem to have an awesome expertise on Python." Well, he's not wrong.
 
DSM
@ZeroPiraeus: yes, sometimes it's embarrassing to have to repeat the same implausible story again and again. Glad to hear that things worked out!
 
Ouch.
 
facepalms.
I say: don't write to sys.stdout when using multithreading.
Because that's going to lead to problems.
> your objection that the stdout method will lead to unexpected behaviour in a multithreaded environment (in fact multiple call can be made to the api concurrently), threading appears to be the only alternative
 
Implausible stories seem to be helpful, if the insurance claim people think "surely only an honest person would tell a story like this one"
 
3:30 PM
Not sure if they read what I said..
 
Well, "worked out" is perhaps overstating the case - I'm still down a phone, and will have to be careful with my emergency sock-drawer cash supply while new cards get sent out ... but it's a lot better than it could have been.
 
or that I understand what they are saying.
 
@ZeroPiraeus I have most of the time the atm limit set to something like 100 € per day, I never need cash here so...
 
Yeah, limits here are per withdrawal, not per day.
 
@Zero wow... you just reminded me to check accounts and I was overdrawn one of the accounts I don't have an overdraft on, so quickly xfer'd money from another one to bring it to zero, so I don't get bank charges :) (me luvs you!)
 
3:32 PM
I think they're missing a verb there. "Your objection that X will lead to Y, [is something]."
 
@JonClements Happy to be of service :-)
 
@Zero it's an account I rarely use - just for internet stuff and some DD's
 
DSM
Kevin: we live in a world that's too fast-paced for complete sentences. Because reasons.
 
hehe duck earned peer pressure :P
 
Sometimes it's apparent that the writer got distracted halfway through a sentence, and didn't quite pick up just where they left off. For example, "That depends on whether or not you have the correct dependencies or not"
 
"Whether or not X" and "whether X or not" are both fine, but it's weird to use both
 
@Kevin: clearly you cannot read it correctly:
it reads: "that depends on (whether or not you have the correct dependencies)... or not"
 
You're right, that is a valid interpretation
 
I want answers with 100 upvotes pls :(
 
hello
 
3:39 PM
Hi
 
cabbage
 
is there anyone with django
 
Not that I know of, although maybe some of our idle members are secret experts
 
DSM
@Pattinson: welcome to the Python chat room! You should probably read the welcome page to get a sense for the conventions. (I note you've just asked an SO question, for example.)
 
3:41 PM
@Kevin now you're at 94, awesome answer indeed
 
Thanks :-)
 
I broke up with Django and am now with Flask.
 
@DSM Thanks :)
 
Soon my gold badge powered mind control ray will be complete...
 
97 old bean.
 
3:42 PM
Er, which I will use for the betterment of humanity >_>
 
DSM
I was going to ask what's in it for us if Kevin reaches 100. Apparently mind control.
 
98
 
We all ready to retract the votes when he reaches 99 right?
 
97
 
So he drops back down to ~90
 
3:43 PM
Nice answer, too bad I've never used OpenGL :P
 
@Ffisegydd Please do not taunt the Kevin
 
thanks to the pics and anims, I could do this sleeping hands tied behind my back upside down in siberia
 
"Please do not tap on the glass. Kevin's are easily startled and may attack without provocation."
 
Look at those gifs! Cool. :)
 
3:45 PM
(man, that reference is almost as old as me...)
 
taps on the glass
taps more on the glass
keeps tapping on the glass
 
Oh boy, I'm at 100 :-D
 
Woo!
 
DSM
What can I say? I saw 99 and couldn't resist.
 
@Kevin \o/
 
3:47 PM
pokes with stick
 
tap tap tap tap tap
 
Augh, the poking and tapping...
 
Shh, you'll awaken my alternate persona, The Destroyer of Worlds
 
3:48 PM
not yet...
pfft
hate these holidays in civilized wordl
yesterday scraped together just 175 rep :(
 
I should start answering again.
 
@AnttiHaapala doing better than I am then :)
 
I have been lax lately.
 
I just want 50k now... where will this insanity end! :(
 
The Dark Council cannot control the Destroyer of Worlds, only placate it temporarily.
 
3:50 PM
@JonClements When they mail you a framed unicorn painting. The ultimate privilege.
 
@Ffisegydd no, I've almost caught up to you!
I haven't been answering much lately either.
 
@davidism...by our powers combined...we'd nearly be at 10k...
The only choice is for me to consume you and hence absorb your rep.
 
I can't fastest-gun while I'm multitasking, so most of my recent answers are for questions nobody else wanted to answer.
 
@Ffisegydd do me a favor and put [merge delete] in your description... no reason
 
Yeah sure! By the way I've voted on your answers before and as such you could get banned for sock puppetry if they think this is your 2nd account.
 
3:53 PM
I'm the #3 answerer of the month :-) Although I'm an order of magnitude less popular than #2 and #1
 
Bryan Oakley #1?
 
He's #1 of all time, but #2 for the month
Ahaha. Apparently you can reassign True and False in 2.7. That seems like a bad idea.
Simply guard against this problem by putting assert True and not False at the top of every function.
 
DSM
assert True is (True is True)
 
same as #define true false I guess
 
In 3.x they became effectively keywords
 
3:57 PM
Reminds me of a cruel prank, #define true (math.randfloat() < 0.999)
 
Still hold they're interpretable as int status though
 
DSM
I wrote a wrapper for f77 which basically introduced random bugs into an officemate's code during compilation on rare intervals.
 
@Kevin oooh that one is worse
 
DSM
Probably wasn't a good idea for me to have root on his machine.
 
3:58 PM
I like it
 
Bloody hell how many answers does a question need?
 
@AnttiHaapala I like that :)
I'm sad and glad I didn't get accepted on that one :)
got me two gold badges... can't argue :)
 
We should bulk out sopython.com/wiki/2 some more
 
@Ffisegydd what'd you have in mind?
 
4:00 PM
@JonClements still error :P
 
@Jon nothing in particular, was just bring it to attention in case anyone happened to have any.
 
ah no right
 
def m_to_n_trues(iterable, m=1, n=1): is an interesting function name. I often bend over backwards to avoid referring to a parameter's name in the function's name, although now I'm wondering if it's worth the effort.
"Automatic refactoring tools won't rename the function if you rename the variable" is just about my only objection to it, but I never use refactoring tools.
 
I accepted this because it is what I decided to actually use for my code, and because it was the first answer with timings on it. @Jon Clements answer was a close runner up. — Matthew Scouten May 29 '13 at 14:08
(the runner up that's outscored by 5 times... yeah, cough)
 
fixed
 
DSM
4:04 PM
@JonClements: that sounds like the sort of thing the rival in a rom-com says. "But I'm handsome! And I'm ten times richer!" Sometimes the heart wants what it wants.
 
What does Matthew know, we all recognize your greatness :-)
 
@DSM hey - two golds from that one - I love the guy :)
 
@Ffisegydd should really make each of those a canonical item, since they're bound to come up in questions
although some of those fall more into the Fancy Python Tricks category
 
plz someone explain this code.
dropwhile(lambda v: not v, l)
mainly lambda.
 
it will drop values until the first truthy value
 
4:14 PM
I sometimes worry about having too many canonical questions, they should only be added if they're commonly asked.
 
Oh
 
@Ffisegydd that should really be solved with tagging and searching
 
it doesn't
 
but right now it is pretty unmanageable
 
DSM
@AvinashRaj: what about the lambda is puzzling you? The syntax, or what not v is meant to do?
 
4:16 PM
@davidism yeah true tagging and searching will help
 
it seems like lambda is function.
lambda v only if the v is not found in the list
am i correct?
@DSM
 
DSM
lambda v: not v is just another way to write def somefun(v): return not v. It doesn't do any membership tests in l.
 
@vaultah I think you were correct in your now deleted post of using bool instead of a lambda
 
What's the function of lambda?
 
DSM
That's like asking "what's the function of function"? Do you mean "why would someone use the lambda syntax in the first place?" or "what is the purpose of using not v" here?
 
4:23 PM
please explain this
dropwhile(lambda v: not v, l)
in a pythonic way.
 
DSM
Do you understand the documentation of dropwhile?
 
@AvinashRaj it returns an iterator with all leading false values dropped
all values after the first true value, whether true or false, will be present
Technically, I've just described it in an English way, not a Pythonic one.
 
@Jon, no I wasn't :(
 
@vaultah oh yeah, it's the opposite cough
brain burp
dropwhile(operator.not_, l) would be the best way then
a mysterious appearance from @qwertynl :p
 
4:40 PM
@davidism but this one drops all the true values until the first false vale.
# dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1
 
@JonClements :-P
 
@AvinashRaj yes, I mixed up true and false
 
Just wanted to it
And it's closed
 
Thanks @DSM and @davidism :-)
 
4:44 PM
@vaultah 😝
 
Pulling out my hair only when reading python docs. Ahhhhh...
 
@JonClements missed me?
 
@qwertynl now you're back - I can stop ordering ample supplies of tissues to wipe dry my tears :)
 
@JonClements haha. im only on for a few mins
 
@qwertynl I'll re-order the lorry full of tissues then :)
@MartijnPieters can you join me briefly please?
 
4:51 PM
@JonClements :-P
 
@qwertynl it's okay, just let me know where to send the invoice :)
 
@JonClements Brooklyn NY 11230
 
5:07 PM
I've set the sound to my SO Notifier that gives me a shiver :|
 
What kind of sound makes you shiver?
ghosts? skeletons?
 
sound of a python
ussssssssssssshhhhhhh
lol
 
Dinner time, rhubarb all!
 
@MartijnPieters thanks for your time
 
dinner time? @MartijnPieters are you in Asia?
 
5:09 PM
@AvinashRaj he'd be in the UK :)
 
DSM
"dinner" is also used to mean "lunch" in some places.
 
@DSM let's not forget "supper"
 
Hmm, not familiar with that one. Sounds like a dubstep sample.
 
This is a prestige sound from CoD Ghosts
 
5:11 PM
With a hint of the BWAAA noise from Inception
 
Supper is a name for the evening meal in some dialects of English. While often used interchangeably with "dinner" today, supper was traditionally a separate meal. "Dinner" traditionally had been used to refer to the main and most formal meal of the day, which, from the Middle Ages until the 18th century, was most often the midday meal. When the evening meal became the main meal, it was referred to as "dinner", and the lighter midday meal was called "luncheon", with a later, nighttime meal then being referred to as "supper". == Etymology == The term is derived from the French souper, which is still...
 
DSM
@Jon: in my house growing up we tended to use lunch/supper, with the sole exception of questions like "will you be home for dinner?"
 
has anyone used Cordova? (in this room)
 
I was about to jokingly suggest "elevenses", but I was surprised to discover it isn't a fictional hobbit-exclusive meal, but an actual thing
 
@DSM yup... my parents during summer holidays (for instance) always told me to be home before "dinner time"
 
5:15 PM
It's exclusively "dinner" for me. Last person in my family to use "supper" was my grandma.
 
argh python headache
 
kids these days aren't hard to to get home before "dinner time" - just open their bedroom door and they're on the computer playing fifa or on an ipad playing angry birds or something
 
DSM
Weird. "dinner" sounds more formal to me, and so more like something my grandmother would have said.
 
True is True is False is True is False is True is None is False is True is True is True is False is True
what is the value of that expression?
 
DSM
False.
 
5:16 PM
ummmmm
 
@DSM that is true that it is false :D
 
depends on if it's left or right associative???
 
@Kevin no.
 
:-(
 
if that is false
then.. what is
True is True is False is True is False is True is None is False is True is True is True is False is True is False
(added 1 is False)
 
5:18 PM
>>> True is False is False
False
>>> True is (False is False)
True
>>> (True is False) is False
True
Whaaaaaaat
Maybe it's that thing where a op b op c expands to a op b and b op c
 
bingo
 
DSM
Didn't you already write this one up for the gotcha page?
 
I discussed a > b == c, but I didn't know is followed the same logic
 
@JonClements you still in the miaou room?
 
@davidism nope - would you like me to join?
 
5:20 PM
sure
 
The Card Security Code that you entered does not appear to be valid. Please enter the 3 or 4 digit Card Security Code printed on your credit card. - errr... IT IS!
growls
 
DSM
Is there a good way to get google to search for things like @somedecorator?
 
Not that I've ever been able to find.
 
haha. I guess I never tried very hard.
 
DSM
5:23 PM
It seems to be picking up more somedecorator references (without an @) than I'd expect, but maybe my expectations are wrong.
 
The syntax is "the exact string to find"
 
Searching for python "+=" seems to ignore the symbols entirely... Maybe it only works for symbols preceding alphabetical characters.
 
My search engine removes all non-alphanumerical characters at preprocessing step :P
 
food time, rbrb
@davidism thanks for your time
 
> Search ignores punctuation. This includes @#%^*()=[]\ and other special characters.
@Kevin ^
 
5:31 PM
but it works for @somedecorator. Get your story straight, Google.
 
5:49 PM
I'm kinda confused about something... do sites often dispatch two different sets of pages upon looking at user-agent? Eg, if they see a mobile device, they dispatch a different template than the one for a computer
 
I know some sites do, much to the displeasure of mobile users that just want the web version
 
I'm using cordova, so I want to bind some phone-specific events like slide or whatever for the phones. Offer a fallback to "use web version" at the bottom?
 
Seems like a good idea, yeah.
The primary sin of the above mentioned sites is that mobile users are redirected automatically to a version of the page that has fewer features than the normal page. Binding to phone events sounds like it would provide more feautures, not fewer, so that's ok
 
yeah, I'm not really sure how this technology works. It seems to imply that it compiles everything into mobile code, so I think it might just use restful endpoints?
 
6:27 PM
@Kevin That's called operator chaining
 
Thanks, I couldn't recall the name.
 
Using some op else == True is a common mistake.
 
syntax error: else
 
so... what's a good place to deploy a webapp? What are the advantages of each place?
 
6:44 PM
aws
:D
if you run out of resources in AWS, you can start your own competitor
 
6:55 PM
why is AWS good, though?
 
@Crow why not
 
watched the movie Rush
 
just bought dvd
howsit
 
6:57 PM
I'm just trying to figure out what the differences between these services are. I've only used heroku
 
i loved it!!!!!
 
aws gets you bare metal
and lots of it and fast...
but... ymmv
I like to run my own servers.
I ... need... 17 ... rep....!
 
make it happen
 
why cant anyone ask anything nice
 
17 reputation for what??
 
7:03 PM
Ew, this site has the Minecraft cursor when you hover over images ;-;
That's a weird design choice.
 
my reputation increased to 10 and some privileges were unlocked for me. but rep is still 1 @ask ubuntu. any idea?
 
203
@tilaprimera 17 until 200
there are badges for 1, 50, and 150 days of 200 rep
so far hit the limit only on 20 days
MartijnPieters on the other hand.......
easier to count days that he does NOT hit the cap :D
 
hehe : ) got it!
time to hit the bed
rhbrb peeps!
 
I think this puzzle is harder than the hardest logic puzzle in the world, since I could solve the latter but not the former.
I don't know whether it's harder than the hardest logic puzzle ever, though, since I couldn't solve either of them.
I suspect there's a branch of mathematics based specifically around problems like these. "Person A knows fact X. Person B knows fact Y, and knows that person A can't know fact Y. Person C doesn't know whether Person B knows fact Z."
(I just made that up so don't try to derive anything from it)
It's the serious version of that dialogue that appears in comedies occaionally: "I know about [whatever]". "I know that you know". "I know that you know that I know." etc
 
7:28 PM
@kevin almost sounds like the mathematicians that went to ensure the bill is paid, but not who paid it problem
 
This is the kind of confusion that can power small starships.
 
being mediocre with computers sucks, when everyone else is terrible at them :|
 
think it's in the loft somewhere, but it's definitely a good book... introduced a few ideas that I hadn't thought of
(albeit old now)
 
DSM
@Kevin: some of my favourite comedy routines are all about people finding themselves in different parts of a "who knows who knows" graph and (of course) making a decision which seems defensible (even if a little strange) but is clearly going to lead to catastrophe.
 
Just once I want the dialogue to end like:
Alice: I know that you know that I know that you know that I know.
Bob: What? I didn't know that!!! _runs off to salvage his scheme_
 
DSM
7:36 PM
Let's see. Paul doesn't know the two numbers, but he knows the product, which means the product can't be prime or he would know them. So it's composite.
Sam knows that Paul doesn't know, which means he knows that the product of the two numbers is composite even though he only knows the sum.
 
It also can't be a composite whose prime factorization is exactly two numbers (ex. 2*5 = 10)
 
DSM
Why not? Paul wouldn't know if it were 2*5 or 1*10.
 
ooh, is 1 a valid number? Time for me to reread the requirements.
Ok, it can't be a composite number greater than 1000 whose prime factorization is exactly two numbers.
(ex. 113 * 131 = 14803)
 
DSM
Urf. I can't be writing equations when I should be working on calling JavaScript from Java. That's what the subway ride home is for. :^)
 
7:51 PM
I decided to give arbitrary names to some of these concepts so they'd be easier to reason about. I got this far:

#a clipped number is a number greater than zero and less than 1001.
#a shiny number is a number that can be represented as the product of two clipped numbers in exactly one way. (ignoring ordering. a*b and b*a count as the same way)
#two numbers A and B are an additive decomposition of N if A and B are clipped, and A+B = N.
#a number N is bouncy if, for all possible additive decompositions of N, A*B is nonshiny.
I hadn't even reached Dean's line, by this point.
Paul knows his number is nonshiny, and Sam knows his number is bouncy, and when Paul learns that sam's number is bouncy, he discovers that his number is clingy...
 
This sounds like the premise of either a children's show or a bad sitcom.
 
It's simple once you realize that each Time corner point rotates through the other 3-corner Time points, thus creating 16 corners, 96 hours and 4-simultaneous 24-hour Days within a single rotation of Earth.
 

« first day (1381 days earlier)      last day (3568 days later) »