« first day (1496 days earlier)      last day (3451 days later) » 
00:00 - 17:0017:00 - 23:00

12:13 AM
anyone know of a simple tutorial for deploying a flask app to heroku?
the heroku tutorial still leaves me with many questions
 
 
1 hour later…
1:43 AM
Does there happen to be a way I can run a python file from the IDLE/interactive session in such a way that after the file finishes executing I'm back at the interactive session and can then interact with any variables/functions/classes/objects my file set up?
Kind of similar to setting a breakpoint in a compiled language, but not quite.
 
@Seth this works in bash, not sure about IDLE but try adding an ampersand at the end, such as python myfile.py &
 
naw, that'd launch the python process in the background and I wouldn't have access to it. I'm pretty sure I would have to launch the file from within the interactive session..
FWIW I tried it just in case, and it didn't work :/
 
sorry
perhaps make it so you can import the relevant stuff from the file
handle execution at the prompt rather than in the file
 
oh hm, I suppose I could try importing it.
 
I'm pulling my hair out because I have a Flask app that works fine locally but keeps giving a 500 error when I try to log in
 
1:49 AM
a little more work but still better than typing the entire file into the IDLE.
 
@Seth do you know Flask?
 
@majnemɪzdæn Afraid I don't :/
 
@Seth shucks, this has to be a simple fix. It works fine locally, but poops on production site
solved it!
something stupid, of course
 
 
1 hour later…
3:20 AM
Just posted a Q&A on Python 2's exception module and how to find the contents in Python 3. :D
 
Whoa, I finally have access to this place!
 
welcome!
It gets a little quiet overnight here.
So are you working on something @pyramidface??
 
Is there a way to access dunder methods by string value? i.e. some_obj.dunder_get(lookup[user_input])?
I know I can do some_obj.__dict__.get('some_normal_method') but I can't access for example __mul__ that way.
I guess I could do operator.mul instead...
 
 
1 hour later…
4:46 AM
Cbg
 
5:07 AM
Guys,
>>> x = [[1,2,3,4]] * 3
>>> x
[[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]
Why does this happen?
And what is it called? :)
 
@ShubhamGoyal the double brackets indicates it is a list containing another list
multiplying it by three now gives you a list with three lists
 
Why? And what is this feature called?
Any links would be appreciated :)
 
@ShubhamGoyal lists are data structures (along with dictionaries, tuples) in Python
perhaps this would be helpful?
 
Yup, I know that but why does multiplying a list with a constant do this?
 
dunno, it just does
 
5:16 AM
Anyone help can point me to more information? :)
 
79
Q: Python list of lists, changes reflected across sublists unexpectedly

Charles AndersonI needed to create a list of lists in Python, so I typed the following: myList = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: myList[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, ...

12
A: Generating sublists using multiplication ( * ) unexpected behavior

Jason My best guess is that using multiplication in the form [[]] * x causes Python to store a reference to a single cell...? Yes. And you can test this yourself >>> lst = [[]] * 3 >>> print [id(x) for x in lst] [11124864, 11124864, 11124864] This shows that all three references refer to the sa...

16
A: Python List Index

D ReadThe problem is caused by the fact that python chooses to pass lists around by reference. Normally variables are passed "by value", so they operate independently: >>> a = 1 >>> b = a >>> a = 2 >>> print b 1 But since lists might get pretty large, rather than shifting the whole list around memo...

@ShubhamGoyal see if any of these help ^^^
 
5:34 AM
thank you
help a lot
 
6:26 AM
I have another question :)
>>> def append(list=[]):
... # append the length of a list to the list
... list.append(len(list))
... return list
...
Why is the output as follows?
>>> append()
[0]
>>> append()
[0, 1]
Why is there a difference between calling append() first and second time?
 
Because the default values are bound to the arguments at function definition time. Mutating the default value means that the mutation is seen as the new default value.
 
7:26 AM
But won't the list argument be local in scope? Why is it maintained when the function is called again?
Please provide links which explain this is detail if you can :)
 
@ShubhamGoyal stackoverflow.com/a/986145/2698552 this might help
 
7:45 AM
@ChillarAnand - It doesn't address the same question, does it?
 
7:56 AM
Cbg
 
819
Q: "Least Astonishment" in Python: The Mutable Default Argument

Stefano BoriniAnyone tinkering with Python long enough has been bitten (or torn to pieces) by the following issue: def foo(a=[]): a.append(5) return a Python novices would expect this function to always return a list with only one element: [5]. The result is instead very different, and very astonish...

 
This is the principle of by far most astonishment :)
 
@davidism we are both on 7092 rep. I want you to know that the upvote that takes you ahead of me was by me. Consider it a kind-of surrender, for now, in the rep wars :P
 
But it does teach you about Python if you stick to it
 
8:55 AM
Cbg :)
 
 
1 hour later…
9:58 AM
@poke still gradually ploughing through that types in function annotations debate :)
 
hi everyone :)
My code works :)
..finally. But, I got the following "error" :
"The traversal method does not work. Pay attention to the type of output (should be list) , to the order of the values, to handling correctly the None objects occurring at the end of branches."
My actual code is here: codeshare.io/rkusf
how can this be fixed? thanks for any help!
 
Where did you get this error from?
I assume from a teacher or such?
 
11:17 AM
yes, from the automatic grader (which has written the teacher)
 
11:37 AM
so, my concrete question is: how would you write the traversal method alternatively?
 
11:51 AM
Hi
all
 
Cabbage!
@RobertGrant huh? No, I finished it the same day :P
 
@poke I'm telling you about my progress :)
 
Oh :D
stackoverflow.com/questions/27030087/… – Can we get this closed please? It’s far “too localized”…
 
12:07 PM
hi sorry for disturb i want to install python on my windows 8 64 bit pc
i am getting error while on installing it
 
what kind of error?
 
Hey is there a way to echo something with curses if user don't press a key or let key up.
if c == '':
clearPins()
elif c == ord('w'):
forward()

Like this, but this don't work.
 
12:27 PM
Can someone ELI5 what magic this line does ?
data2 = np.hstack([np.arange(data[:,0].size)[:, np.newaxis], data[:,1:]])
hstack stacks two arrays horizontally. and I know what arange does.
rest all is confusing.
 
user559633
Is there such thing as a washable cooking glove? Whenever I cut garlic, I can smell it for like 2 days
 
@tristan You could use one-time gloves
 
user559633
Yeah, I considered that @poke, but it just seems wasteful
 
You could keep a pair wherever you keep your garlic, so you can reuse them for that purpose
 
user559633
Although in the grand scheme of things I do, throwing away a few grams of latex glove once a week isn't too bad
 
12:31 PM
is there any alternative form of my method "traversal" ?
How would you write the method alternatively ?
 
@tristan I think you should learn to love the smell of garlic
 
@MarkF6 Your “bTree” is a binary tree, right?
 
user559633
I like the smell of garlic, just not the smell of "still there after washing my hands" garlic
 
@tristan linen gloves may do. Which can be easily washed and put back on. Latex gloves are difficult to take off and put back on repeatedly.
 
user559633
cheers @Ffisegydd
 
12:38 PM
The only issue would be them absorbing the moisture/smell
 
@Ffisegydd If you blow air into them (while wearing them), those disposable gloves are easy to take off.
 
But latex gloves are definitely not very reusable, they're designed to be thrown away after all.
 
user559633
Yeah, I think I'll just say f the world and get latex gloves
 
And as long as you keep them dry when you take them off, they can be reused just fine.
 
@poke I've never found them reusable or easy to get back on. This is after 4 years of wearing them most days in a lab :p
 
12:42 PM
cbg
 
@Ffisegydd Oh. Well, maybe the lab things you do make them non-reusable… :P
@Martijn Cabbage Martijn
Best question I have seen today: One that included full OAuth credentials.
 
morning everyone
spent 30 minutes doing a proof only to find out it was just as easy as it originally seemed :\
 
user559633
morning martijn, corvid
 
@poke yes, it's a binary tree
:)
 
@MarkF6 I figured after reading more than the first line xD Note that a btree is something else though.
As for your traversal, it seems a bit odd to me to have the traversal separate like that. Usually you would call the insert recursively for each child. But if it works, it is just fine.
I don’t really understand your insert though; why are you inserting a left and a right value?
– considering that it’s a binary tree, and not a heap, it might make some sense after all… so nevermind me
 
12:56 PM
cbg
 
cbg old bean.
 
Today I am annoyed at the design team behind my Thinkpad.
 
@ poke: One moment, I copy what the methods should do...
traversal():
For binary trees there exists a special algorithm for visiting all nodes in the tree called in-order traversal. This generates a list of all the nodes, in a particular order, which is defined recursively as follows: first the elements of the T.left , then T.root_value, and finally T.right.
Example: The in-order traversal letters.traversal() is ["e", "h", "j", "g", "i", "f", "k"], and is obtained by following the green arrows above.

insert(parent_value, left_child_value, right_child_value):
 
It has a hardware wifi/bluetooth switch whose only purpose in the time I've had it has been to occasionally get nudged to the "off" position, causing momentary confusion. Today it decided it would rather live permanently in said "off" position. So now I'm living in some archaic wired hellscape.
 
@MarkF6 Oh I see. Well in that case, I think you did fine.
One thing though, in traversal, drop the list() call in this line: for el in list(self.traversal_help()):
 
1:07 PM
Hey! Is there a way to run tkinter without a gui? I would like to read key inputs user are giving. I am running python on raspberry pi and connecting on it with putty.
 
tkinter without a gui? But...but...tkinter is a gui...
 
user559633
O_____O what is happen
 
Cabbage !
 
Okay, is it possible to run tkinter on shell
with shell I mean
 
You want a different tool than Tkinter.
 
user559633
1:12 PM
@Arto what are you trying to do, just read key input?
 
@poke: ok, i dropped the list() call, but I still get the error
The traversal method does not work. Pay attention to the type of output (should be list) , to the order of the values, to handling correctly the None objects occurring at the end of branches.
:(
 
@MarkF6 That’s the first time you mention an error :o
 
yes I am trying to read a keay input that user is giving to us, like when user hold 'w' variable forward will go on.
 
Guys I want to download pdf files which contains non-ascci characters with python, how can I do that? I am trying this:

r = requests.get(url)
filetitle = pattern.sub(lambda m: rep[re.escape(m.group(0))], filetitle)
with open(filetitle, "wb") as code:
code.write(r.content)
 
I have been trying to do it with curses and getch, but there is a allways problem to see when user is not pressing any key
 
1:15 PM
@MarkF6 Do you have some example code I can test it with?
@Kerem That should work. Do you get an error?
 
@poke No, but my files look like: FİLENAME???.pdf . Question marks are in a diamond shape. Also, okkular crashes when I try to open these files
 
Oh, so you’re talking about the filename
You could do filetitle = re.sub('[^A-Za-z0-9_-]', '', filetitle) to get rid of all special characters.
 
@tristan Do you have any ideas how to check if user don't give any input? My code is here. pastebin.com/ybWEPQ8J
 
and I learned that if you answer a question that is tagged but for which an itertools solution is far, far better, you'll not get any votes.
 
user559633
1:24 PM
read the room rules @Arto
 
mathy programming question. Say my math expression is something like the following:
 
because regex question viewers don't understand itertools, I suppose.
 
@poke filetitle = pattern.sub(lambda m: rep[re.escape(m.group(0))], filetitle) does the same what you say already
 
@KeremZaman Well, that’s what you say; yet your filename has special characters in it.
 
actually this code replaces ç with c, ğ with g etc.
 
1:25 PM
assume `f0, f1, f2...` is a sequence defined as:
f0 = 5, f1=16
fk = 5*f(k-1) + 7*f(k-2) for all integers k >= 2
prove that fn = 3 * 2^n + 2 * 5^n for all integers n >= 0
So essentially, are you defining two functions like this:
 
@KeremZaman Then you should still replace all characters that are not ASCII afterwards. Because it’s likely you don’t convert all of them.
 
def fk(x):
  if x == 0: return 5
  if x == 1: return 16
  return 5*fk(x-1) + 7 * fk(x-2)

def fn(x):
  return 3 * 2^n + 2 * 5^n
then evaluating if all values for fk(x) == fn(x)?
 
@corvid It would be more f(n) and f_k.
@corvid You can’t test all natural numbers. You need to proof that formally.
 
@poke I'm saying mostly conceptually, not programmatically, if that makes sense. Are they saying the results of the two functions will always equal each other?
 
1:30 PM
i am aniket
i want to install python on my pc
 
WE are aniket
 
:)
nice can u help me
my machine 64 bit
 
just go to the download link, installs much like anything else
 
Is it okay to answer someone by saying "This appears to be a bug. Try a different filetime (png rather than pdf). I've opened an Issue on GH here."
Or should it be a comment?
 
@corvid Yes. The f(k) is the recursive definition of f. For every value of k, it gives you a solution. For 0 and 1, it’s explicitely given, for all other values, it can be calculated recursively. f(n) is a closed form of the same function. It can be calculated without evaluating it recursively, in a fixed time. f(n) being the closed form of the recursive f, both should have the same value all the time.
 
1:33 PM
@corvid
u python developer
 
no, I don't even program, I'm just in the python room all the time
 
@Ffisegydd Sounds more like a comment. And if it’s true, the question should probably be closed.
 
@poke In my dictionary there are all non-Ascii characters that can be in file name:

rep = dict((re.escape(k), v) for k, v in rep.iteritems())
pattern = re.compile("|".join(rep.keys()))
filetitle = pattern.sub(lambda m: rep[re.escape(m.group(0))], filetitle)
 
ok ur profetion
 
@Aniket I understand that English may not be your first language, but please at least attempt to speak properly.
 
1:34 PM
Also, all files are 5.3kb , which is not possible
 
Please don't use "ur" etc.
 
@poke: yes, here you go:
family = bTree_2("Jonas")
family.insert("Jonas","Sarah","Marko")
family.insert("Sarah","Laura","David")
family.insert("David", "Anna", "Matthias")
print family.size()
print family.traversal()
family.insert("Matthias", "Lena", "Luca")
print family.traversal()
family.insert("Jonas", "Secret Mum", "Secret Dad")
print family.traversal()
#family.insert("Jonas", "sah")
family.insert("sad", "dj", "huh")
but I can't reproduce the error / see where the error is...
 
@poke yeah thought so. I've commented anyway. Not going to VTC just yet.
 
@KeremZaman There are more than 110k characters in Unicode. ASCII contains 95 printable ones. I highly doubt that you have all non-ASCII characters in your dictionary.
 
@Ffisegydd sorry for spelling mistake it not happen again
 
1:37 PM
@poke okay, sounds good, thank you for the help
 
but today i got new python project previously i use java and now python new for me
so pleas adjest me
*adjust
 
You can edit your messages by pressing up.
 
On your keyboard.
 
hoo i got it
 
1:39 PM
is this theoretically valid? all([fn(x) == fk(x) for x in range(0, 100)])
 
@poke I don't have all non-ASCII characters but I have non-ASCII characters which are in file names, because I know which characters are in file names.
 
@corvid don't need the list.
 
here anyone from india
 
@KeremZaman Since you still appear to have non ASCII characters in the final file names, obviously you are wrong.
 
@AniketDeshmukh bangalore
 
1:40 PM
@corvid For numbers up to 100, yes. But it’s true for any natural number.
 
@AniketDeshmukh in any case, you can download Python from here python.org/download/releases/3.4.0 as corvid has already told you.
 
ok u have free time now
 
@poke that's fine, I'm mostly just tinkering around with it
 
@AniketDeshmukh where are u from?
 
@poke I think my code can be wrong, did you look at it?
 
1:45 PM
@MarkF6 I drew the tree now on a paper, and the output looks just fine. So I’m not sure what the problem there is. Where does the error come from? Is it some online testing tool? Can you see the desired output?
 
tinkering around with something and seeing what makes it work/break is the fastest way to have a good understanding, imo. Maybe I just suck at abstraction
 
@KeremZaman I’d suggest you to just print out intermediary values so you can see what’s going on. And you could still add my line after your conversion just to make sure everything else is gone.
 
@poke: it's an online testing tool, yes. But unfortunately, I don't see how the tools tests my code. But wait a moment, I copy the whole homework text
 
@corvid Are those formulas actually correct?
 
nope, they're not, mistyped the fk formula
 
1:52 PM
what’s the correct one?
 
@poke Ok, I added the whole text.
There are 2 questions: The solution of the first one is ok, but not the second one :(
http://www.codeshare.io/rkusf
 
For those marking this question down. This question I have just found has 9 up-votes and helps me a lot more than you have. stackoverflow.com/questions/11279291/…Jon 1 min ago
 
@MarkF6 Sorry, I’m out of ideas. Your code looks just fine to me, and it does produce the correct output for the example there. So if there is some special case that should be handled separately, then the spec just isn’t clear on this. So it’s not your mistake imo.
 
thanks for your words, poke
I can't see any fault, either :/
 
@Jon So it took you 6 minutes after posting the question to find something that answers it. Then take that exactly as the reason you are being downvoted. — poke 12 secs ago
 
2:01 PM
@poke f(k) = 7 * f(k-1) - 10 * f(k-2)
 
@poke nice. You just can't trust people named Jon.
 
@MarkF6 What confuses me a bit though, is this note in the instructions: “with the convention that if left_child or right_child is None nothing should be done on that side. (Therefore an existing child may be overwritten.)”
 
@Ffisegydd struggling to write unittest for 'number of favorites for a question' for nidaba
 
The overwritten part especially..
 
@ChillarAnand ah right
What have you got so far?
 
2:05 PM
i am not familiar with TDD. dont know how to write test without code
 
To be honest, I don't do much TDD either.
Games actually suggested BDD instead of TDD.
 
@poke: yes, me too. Because I didn't take special attention to this while coding
but how would you change / adapt the code?
 
@ChillarAnand pune
 
@corvid I completed the proof, if you’re interested.
 
would be very helpful, what does it look like?
 
2:12 PM
Hand-written notes?
:D
 
Why hide Emma? :( Oh ^^
 
So I'm kinda lost after the base step... which is to say... the entire problem. Mostly, what is the equation to be set up?
 
Well, you want to do a formal proof by induction
 
(the truth about emma :))
cbg(all)
 
2:16 PM
so basically, (3 * 2^k + 2 * 5^k) + (3 * 2^k+1 + 2 * 5^k+1) ?
 
wtf Peter
 
this is old :)
 
cbg @davidism
 
cbg @Ffisegydd, I see you couldn't stand being tied for too long :)
 
2:28 PM
thanks so much poke, this is incredibly helpful!
 
You were in front for a good 2 hours before I got into the office, abandoned my PhD, and spent the morning searching for questions.
@ChillarAnand it might be better if you wait for us to set the framework up for the TDD. That way you know what other things look like. If I get a chance this weekend I'll look into setting things up so it can be started.
I still haven't worked out myself how we're going to set it up
 
@corvid Sure :) if you have any questions, just ask
 
Say I have a set of methods for extracting question features in nidaba.features.question. These methods will accept a Question object and will return the feature, so they're kind-of higher level. On a lower-level though I will have functions that these use, which accept a string or a dict or such. Does anyone have any clue about how to go about structuring this, should I have another subpackage for the lower level functions? Any ideas on a name?
Possibly something like nidaba.features._raw, but raw sounds wrong.
That way nidaba.features.question can import the functions and use them all dandy.
Also I'm going to have Question, Answer, and User objects, for example, where would be a good place to store these? nidaba.objects? Sounds silly.
 
2:43 PM
@Ffisegydd “internal”?
 
core?
 
I’m out for ~40 minutes or so. rbrb!
 
@davidism hmmm yeah nidaba.core.Question would work.
Just looking through other packages to see how they do it.
I suppose once that is done you can always import it from the lower subpackages into the top nidaba namespace, kinda like how pandas as pandas.core.whatever.example.stuff.ohaider available as pandas.ohaider
 
DSM
3:16 PM
Morning cabbage for all.
 
cbg DSM
 
Hm. Not sure how to write this mathematically so it can be proven. if n % 2 == 1: 9^n % 10 == 9 else 9^n == 1
 
DSM
You're allowed to split by cases.
 
DSM
 
user559633
3:31 PM
stackoverflow.com/questions/26933513/… i love that i'm getting downvotes on my answer, even though it addressed the question and the other answer is just 2 naked links offsite.
 
DSM
:-( I don't know anything about the subject so I can't help. But QC is one of us, right? And since he accepted your answer it must have been helpful to him.
 
user559633
Yeah, QC is one of us and it was helpful. Edited answer anyway
 
Holy wall of text MTFL-man!
 
user559633
hah, that's the RFC.
 
user559633
Just putting "here's the RFC link, go away" is crap, so I inlined it
 
3:38 PM
Yeah true.
I didn't DV the other one though, as at least he states what the numbers are. So even if the links die, people can look them up.
The most annoying is when someone says "Oh you can find it here" and "here" is just a link to some random website that could die at any time.
 
user559633
Yeah, I have a canned response for that sort of answer.
 
j0h
3:54 PM
Im reading this book
and it says that python is good for web programming
can someone here substantiate the claim
how is python good for web development?
 
@j0h boy did you come to the right place. The web app for this room, sopython.com, is written in Python.
 
DSM
If you're interested in Python for web development, I'm not sure how that book would help very much. QT is a desktop GUI library, no?
 
the repository is here: github.com/sopython/sopython-site
 
@davidism 1) are you proud of me -- I'm using arch as my everyday installation at work ;)
althogh I love it 2) I have problems with the audio
 
j0h
so its using python to generate the page?
 
4:03 PM
it randomly works..
 
DSM
@davidism: https doesn't seem to be working for me.
 
(one day it is perfect the other day I have to switch on and off and stuff to make it work -- any idea on this?)
 
@PeterVaro so proud :)
@DSM mistyped, also, I think technically there's a web renderer for qt, although it's just a preview. It renders qt windows as crazy javascript
@j0h yes, it uses python to manage a database, handle requests and render responses
here's qt with an html5 backend: youtube.com/watch?v=qDyWjNju1yU
and gtk as well: vimeo.com/21062117
 
DSM
Will wonders never cease!
 
I just got back from a three week vacation. New rule: THREE WEEKS IS TOO DAMN LONG!
 
4:15 PM
@PeterVaro make sure all the sound stuff is installed, I think this will do it:
sudo pacman -S alsa-{lib,tools,utils,plugins} pulseaudio pavucontrol
 
I have all that installed already
I even ran alsactl store when it worked
 
are your cards configured right in pavucontrol?
 
yepp
 
after that, make sure alsamixer looks right as well
 
it looks right too ;)
as I said: it sometimes works after boot -- but unfortunately sometimes it doesn't
it is almost total random
I have to open the different mixers click here and there
and suddenly it starts to work again..
total mystery
 
4:17 PM
I can't remember, is there a service in systemctl related to alsa?
 
I don't know..
 
sudo systemctl enable <try tab complete here> to show what services are disabled
if there's something related to alsa, enable it
otherwise, might want to try the archlinux forums, they are very good
 
Someone looking for "someone to explain all my codez to me"
 
too broad
might want to edit your comment also, it says the opposite of what you meant
 
Gah, yeah, ta.
 
4:21 PM
No question mark found in post, voting as unclear.
 
there's a meta question related to these types of questions, it was getting posted in custom close reasons a while ago
 
Added python tag for more exposure.
 
cbg
 
I'm liking the look of pytest so far.
 
cbg, all! I'm working from home today, so I have access to chat. Wahoo!
 
4:23 PM
I've used unittest I think in the past
cbg @MattDMo :D
 
45
Q: How to handle "Explain how this ${code dump} works" questions

pennstatephilI've been seeing more and more frequently what I call "explain how this works" questions. A good example is: Function explanation needed Essentially, OP posts a block of code they either found somewhere on the net or some legacy code they don't understand, and asks us to tell them exactly what i...

and also
29
Q: "Explain X to me" questions: How to react?

Jean-François CorbettThe question mould is: How does X work? I've read the [Wikipedia article / original paper / documentation / other resource] but I can't make sense of it. Please explain X to me in plain English. where X is a concept, algorithm, pattern, etc. (Not a code dump.) I've come across a number...

 
@Ffisegydd May I know what else someone did in the fallowing Stackoverflow post if he is not asking to explain code same as I did : stackoverflow.com/questions/22639587/…manu 57 secs ago
Also: entire-room-closed-question, where is the gong?
 
It'll be party time again this holiday season
87
Q: Do we want hats?

bluefeetI'm pretty sure I already know the answer to this but last year, Stack Exchange ran Winter Bash 2013, in which users earned hats which they proudly displayed upon their gravatar. There was a leaderboard of hat earners that looked something like this: Well we have the option to do it again ...

 
@Ffisegydd it's not exactly a very loud gong.... :)
 
4:28 PM
@JonClements You just can't hear it because dogs are colour-blind.
 
Ahh... that'd be it then...
 
DSM
Wait, dogs are colour-blind, so Jon can't hear the gong? Well, I've had a cold, so..
 
@MartijnPieters I loved your answer.
 
@MattDMo I still had screenshots from last year, it seemed fitting.
 
@DSM Damnit I'm a physicist, not a biologist. It's probably a good enough reason.
 
4:37 PM
@davidism I have edited the description of my question . I hope now it would be as par the guidelines .please correct me if I am still wrong . — manu 39 secs ago
no, it is still wrong, I'm out
 
@Ffisegydd you should have gone for "Damnit, I'm a ffisegydd, not a biolegydd!" :p
6
 
DSM
Heh!
 
@corvid Look at what numbers 9^n generates, especially the right-most digit. 9^1 == 9, so obviously the remainder is a 9. 9^2 == 81, so the remainder is 1. Now if you multiply that by 9 again, the remainder will be a 9 again since 1 * 9 = 9 (we don’t care about the other digits). So 9^n % 10 will continue to flip between 1 and 9. Uneven n produce a 1, even n result in a 9.
So if you know that n % 2 == 1 (n is uneven), then the remainder will always be 9.
 
@davidism all righty, danke!
 
wow... that's my first starred post in.... I can't remember.... you better watch out @Kevin!
 
4:49 PM
You've beaten my high score for this week, I think.
I think I had three messages with two stars apiece on the board at one point, but I haven't had any four star messages in a while
 
I think the PSA is my best message since the “I hate Java” thing.
 
DSM
I was pretty proud of my "Hi! Has someone seen @poke recently?" "He came, he taught us how to format code, he left" followup to that.
 
huh?
 
Haha
5 hours ago, by poke
http://stackoverflow.com/questions/27030087/python-error-with-quotation-mark – Can we get this closed please? It’s far “too localized”…
(it’s still open)
 
00:00 - 17:0017:00 - 23:00

« first day (1496 days earlier)      last day (3451 days later) »