« first day (1837 days earlier)      last day (3111 days later) » 

3:00 PM
So, anyone here implement two-factor login authentication?
 
If not clear I'll post a code
 
@jonrsharpe oh look Cody still posts code-only answers
 
@vaultah Cody Douche more like! (high-fives self)
 
:)
 
3:02 PM
There is already a solution for Permutations and indexes, python, but I wonder if you can do better than O(N^2) run time.
 
@jonrsharpe I wish there was a more effective way to deal with people like that. But he's just going to keep posting code dumps.
 
^^
 
@davidism if he keeps doing it he may hit an answer ban
 
@corvid I haven't but it's better to get two types, as in something you have, own, or 'are'. That's all I've got for ya :D
 
@jonrsharpe that exists?
 
@direprobs Was the Java programmer talking about Java, or Python?
 
-2
A: determine_score and calc_average funtion in Python

Cody Boucheinb4downvotes def main(): scores = [] for i in range(1, 3): name = input('Enter name {0}:'.format(i)) num = int(input('Enter score {0}:'.format(i))) scores.append(num) print('{0}: {1}'.format(name, determine_score(num))) print('Average: {0}'.format(det...

 
But given that he acknowledges in the comments that he's repeatedly been told to stop it and continues anyway, I doubt anything else will stop him.
 
> inb4downvotes
 
@Kevin about Java
 
3:04 PM
"different languages have different scoping rules" is not surprising to me. There's no governing body that rules how scoping must be performed.
 
I know they're different
 
Do you know what happens to people who love answering every single question they can get a hold of, regardless of quality? They end up with lots and lots of rep.
Because you certainly don't get any for Mjolniring things.
 
@jonrsharpe seems like the criteria would be to constantly downvote said individual. Which unfortunately does not seem to be the case for Mr. answer dumper
 
If you're asking "but why does Python do it this way, when Java demonstrates a much more sensible alternative?", good question. The minds of the Python devs are mysterious indeed.
 
@idjaw IDK, their last three are on -1, -4 and -5 right now
It would be less aggravating if they actually explained their answers to the crap questions they insisted on answering
 
3:06 PM
speaking of crap questions, all those three questions he answered that we just closed
 
@TigerhawkT3 Reminds me of this:
Mr. Wonka: "Don’t forget what happened to the man who suddenly got everything he wanted."
Charlie Bucket: "What happened?"
Mr. Wonka: "He lived happily ever after.”
 
You can't watch him all day. If he answers question like this 15-20 hours a day, he'll eventually reach phase 3: profit.
 
let's not stalk the guy in here, just deal with SO stuff
 
ok sorry
 
Yes True, but as I said it would be much clearer if they implemented the similar behavior, since as you now a class is a self-contained namespace, just like a module, you don't have to use the following: module.x when you reference var x (within) the module), similarly for functions, you don't have to use: func.x in order to access a var defined within the function and these are all self-contained namespaces and it makes a lot of sense to be able to reference the var within the (scope)...
 
3:08 PM
@direprobs you can reference the var within the scope inside a class definition
 
@jonrsharpe to correct myself , (to use it without qualification) (.e.g X.Y)
 
@direprobs at this point, I think it would be more useful if you dpaste.com an example demonstrating your issue rather than attempting to describe it
 
I'm trying to use this tutorial to make a simple search for a "brochure" website but instead of it running Search.py and returning results its just trying to open Search.py --- anyone have any ideas what to look for that would cause this? I don't know Python so not sure what to look at: zackgrossbart.com/hackito/search-engine-python
 
@direprobs yes, you can. For example, if you have a class attribute class_attr = 1 another one can access it another_class_attr = class_attr * 2.
 
Is this question related to the weird thing where you can't do:
class foo:
    a = 4
    b = [a+x for x in range(10)]
in 3.X?
 
3:10 PM
No qualification required (or possible, because the class name isn't defined until the definition completes)
Or do you mean something else?
 
Originally it was giving a 405 error but we cleared that up using stackoverflow.com/questions/24415376/… which instead caused it to ask to be opened
 
The code demonstrating my issue: paste.ofcode.org/P3MCMXpgHa7UTC7EGX5c7p
 
I really like this suggestion:
58
A: Make it easier to close job shop "gimme teh codez" questions

Brad LarsonTo riff on Shog9's answer, what if we didn't look at close votes as the way to stop terrible questions like this? What else could we do? James presented an interesting proposal on Meta.SE last year: what if we automatically closed any question that got below a net score of -5? Give something lik...

 
@Ryan Sounds like the server is improperly configured. Not sure how to actually fix it, though. But do double check that you've followed the steps under "Running This Application in the Real World"
 
@direprobs oh I see, thought you meant within the definition itself
 
3:12 PM
@MorganThrapp meanwhile shog's answer answers nothing
 
@Kevin my boss (who built the server) believes Python is running on it. Is there any easy way I could check that just by uploading some sort of file to it?
 
rbrb
 
It's documented in the PEP277
https://www.python.org/dev/peps/pep-0227/
 
I suspect you need to do more than just have a Python interpreter working on the server.
 
Morgan's "I am an idiot" debugging tip of the day: < != <=.
3
 
3:16 PM
@direprobs so that means that you can't access global variables within your Java classes if they share names with class attributes?
 
@Kevin oh like install more stuff or some config issue? any idea what I might try looking up or searching for? I know we're also running it on Nginx not Apache
 
=<= looks like a tired pointy nose man.
 
@Ryan that example is written as a cgi script. So you need to configure your server to accept CGI and call the script
 
DSM
Aaargh, X-Document-Type: Workbook. Why are you so annoying? I feel tired, and pointy-nosed!
 
However, I would really avoid that, as CGI is an ancient, slow standard for web apps and is not commonly used or supported in the Python ecosystem.
 
3:17 PM
I still do = instead of ==. All. The. Time.
 
:\ was about to say thanks I'll look into it but guess not. What might you suggest instead?
 
It's also probably insecure
 
@jonrsharpe I don't really know, cuz I'm not a Java programmer, I was told by a Java programmer, that Java has this behavior when I asked her about classes
 
@DSM Resist the urge to peck at your monitor. It's emotionally satisfying but expensive.
 
those are frameworks... I'm not looking to build a website in Python just search the website we already have built
 
3:19 PM
cgi is a "framework" too: it describes a standard way to accept requests and produce responses
 
Have your site's search button link to Google.
 
But this is not a big issue since if you shadow a global name, you can qualify (e.g ` X.Y`) I guess, just like inside functions, you can shadow global names too!
 
you can write a flask app that's one script too, just because you use a framework doesn't suddenly mean you're writing a huge application
 
@direprobs how would you qualify out to a module-level constant?
 
If you already have an existing framework in place that isn't Python cgi, perhaps it would be better to write a script in whatever language that framework uses, that will execute the python script as a subprocess, and present its results. Not sure if that's any easier than setting up a one page flask app, but there you go.
 
3:21 PM
@davidism hmm that might be beyond something I could write on my own but I'll look into it
 
Or just write the search functionality directly in that language. But then you wouldn't be using Python, so I immediately dismiss this possibility.
 
@Ryan the flask isn't the complicated part (no more complicated than cgi), the search is, and the tutorial already covered how to do that
 
its a static html website, only higher code it uses is some php to include menu/header/footer/template and handle two forms. The rest is around 40 html pages
 
If you're speaking about Java I don't know, but in Python you can for example if you have the following:
class A:
     open = 20
and you want to have access to the built-in function then you would say within the class:
class A:
   ....
   __builtins__.open(...) #Qualify`
 
@davidism so if that tutorial would still work within say Flask what makes it CGI? I mean can I just run that exact function within a Flash application and expect it to work?
 
3:25 PM
@direprobs I meant more like:
 
@Ryan it doesn't work with flask, it's written to use cgi right now
 
@Kevin Moved every URL request to a bunch of threads; everything runs faster!
 
honestly, you can go with the cgi if that works for you
 
marginal increases in speed make me happy
 
Nice.
 
3:27 PM
but it just sounds like you're out of your depth in terms of setting up a web server, and that's not something we can really help you with over chat
 
CONSTANT = 'something'

class Whatever(object):

    CONSTANT = 'else'

    def instance_method(self):
        # how do I get 'something'?
 
@davidism well I'm out of depth on the web server, because I don't do web server. Before I bug my boss again with another server thing for him to do I was hoping to confirm if it is a server issue. Sounds like it is if we do want the CGI method he'll need to go in and give the server permissions
 
cbg
 
hey Adam
 
@direprobs you can't compare the two. This entire misunderstanding is coming from the fact that you think Python classes are equivalent constructs to Java classes, but they are not the same thing.
 
3:29 PM
Is the site you're trying to search located on a private network, or is it on the public Internet?
 
if it was up to me I'd just assume use something like FindBerry or pay the $100 for ad-free Google Search, but he doesn't like the idea of those @davidism
 
If you mean the global variable then you simply can import the module of CONSTANT within the function or outside it if you will and just qualify module.CONSTANT
 
Does he not like the idea of the $100 ad-free Google search because of the $100, or because of not-invented-here?
 
@davidism True, I think Java uses prototypes, not sure
 
Importing a module from inside itself sounds like a bigger hassle than having to do Whatever.CONSTANT
 
3:30 PM
@direprobs your import idea makes no sense, and now you're confusing Java with JavaScript
 
Because I can tell you right now that it would cost more than $100 in payroll to reinvent this wheel get this done in-house.
 
really, just stop trying to compare the two, they're not comparable
 
What if they implements Comparable?
 
or think of Java classes as Python modules, although that's not right either, but it at least explains the scoping slightly better
 
@TigerhawkT3 he's fairly paranoid IMO (and from his own admission) to allow anything to crawl or access the site. Its why he built the server himself too
 
3:32 PM
So, it's on the company's private intranet? Not a public site?
 
But this again is more about my common sense which I carry, because a class is a scope, I think we should be able to reference vars without using attribute notation inside the class. Just like functions and modules.
 
I would suggest "just write it in PHP, which you already know runs on your server" but then I'd have to admit that PHP isn't always the wrong choice forever
 
We're hosting it here but its publicly available
 
Right, I'm saying that your common sense is based on Java, so it makes no sense to apply it to Python. Or at least it makes more sense to change your common sense as it applies to Python after the response you've received.
 
That's like not allowing people to look at your house through binoculars.
 
3:33 PM
@Ryan as much as it's terrible advice, I'm with @Kevin: if you're already running PHP, why are you trying to do this one part in Python?
 
Is your boss's boss aware of this waste of resources?
 
I don't know what you guys are talking about, but, to be fair
 
Anyway, I'm not comparing the duo, I was trying to understand why the implemented it they way it is now.
 
my boss is the owner of the company
 
I think most people wouldn't like it if they knew someone else were looking throught heir house w/ binoculars
 
3:34 PM
@direprobs because it makes sense and GvR said so. There's no other reason.
 
Well, then you can either tell your boss it's a huge waste of money (orders of magnitude) or slog through the project through days... weeks... months... who knows.
It all depends on your working relationship with your boss.
 
Devil's advocate: better to pay a local employee $200 in wages, which he will spend on local businesses, than to pay $100 to Google, where it will sit in the Mountain View money vault, not stimulating the economy.
 
DSM
I don't like doing things manually, but sometimes I have to admit it's faster than spending an hour trying to automate it (when the import only takes five minutes.)
 
Whoa, we're kinda blowing this out of proportion. @Ryan we can't help you further: you have a CGI script, you need to set up your server to serve it using cgi. Ultimately, it's a low quality solution compared to others, but you're not in a position to change it apparently, so that advice doesn't matter.
 
Personal experience example: at my old job, we had some legacy documentation done in RoboHelp, which we no longer had a current license for. We were manually editing the HTML files whenever we needed to make changes.
Two possible solutions: buy a new license for RoboHelp, or convert the thing to Framemaker.
RoboHelp was about $1000 IIRC. Porting the help content over to Framemaker would've taken us weeks.
 
3:38 PM
@DSM but successfully automating it is so much more satisfying
 
It really wasn't too hard to convince our boss to shell out the $1000 for some software that would solve the problem almost instantly.
And it would only be $100 to solve this problem.
 
@TigerhawkT3 Unless the google search thing requires integration with the existing server, at a difficulty level equivalent to installing cgi. In which case we're back to square one :-)
 
True, but I would think Google would help with that after you paid them $100.
 
They better send the Google commandos rappelling down my office building to offer their aid
 
This is like encrypting your Twitter feed so the NSA can't search for terror keywords.
 
3:42 PM
I'm surprised plot with intermediary colors hasn't gotten any attention. Seems like a fairly easy Q if you know matplotlib.
But then, I don't know matplotlib, so maybe drawing gray bar charts instead of black ones is super hard?
 
Aw, I was reading that
 
not gonna add to davidism's cleanup :)
 
look Tiger I know it would be easier, and perhaps the results would even be better. But my boss prefers we try to as much in house as possible, and given that my entire role here could just easily be contract work which I brought up with him before he even hired me, I'm not going to fight too hard against doing things in-house if that's how he likes it done
 
DSM
@Kevin: you'd have to comment out all the if c == "grey": raise SystemExit lines, and who has the time for that?
 
3:44 PM
if I can't figure out a solution we can run easily enough on our own then I will convince him to use Google or FindBerry, but I'm going to try alternatives first
 
Job security then. As long as you don't mind working on something that's not exactly new territory, you're golden.
 
@Ryan ok, we've already told you three solutions: write it in php which you're already using, set up cgi server correctly, or use a better framework. I don't get why this discussion about looking for alternatives continues.
@TigerhawkT3 let it go
 
@davidism I heard you and have other tabs open doing just that. Tigerhawk was asking so I answered. I'll stop replying if its upsetting you :\
thanks for the help @davidism and the suggestions @TigerhawkT3
 
@DSM And then there's the ancient prophecy about the "greye bar charte" bringing about the "ende of dayes", which sounds like a real drag
Maybe OP should just stick with primary colors.
 
like mahogandy
 
3:49 PM
Yes, the lesser known cousin of Gog and Magog. He's in the prophecy too.
 
DSM
This got apocalyptic fast.
 
cbg all
 
Cbg, sir puppy.
 
How come I always miss the fun? :p
 
3:52 PM
Well, I'm hoping for 'You have keyboard skills of a dismembered octopus and the debugging acumen of a brain-damaged amoeba'. — Martin James 40 mins ago
 
Great power etc etc
 
I'm going to start using that.
 
we purposely have fun when you're not here. ;)
 
I think even a regularly-membered octopus would have trouble using a keyboard.
Like a cat stepping on the keys times a hundred.
 
3:53 PM
Maybe they'd finally have enough hands to use emacs modifiers.
 
@idjaw cvs?
 
@AmagicalFishy awwwww :*(
 
neat. my output.csv ends up being... thousands upon thousands of random chinese characters?
a single row
 
@davidism shoot...sorry..typo
 
3:55 PM
Jon you must be too busy doing the boring stuff like working...
 
@AmagicalFishy just say it's correct and convince everyone it's a really cool form of encryption :)
 
It's ok, I laughed. Things would have gotten bad for you if I hadn't though.
 
That question could use some medicine.
 
@JonClements You, sir, know how to impress people :D
 
@davidism Then I'm glad you had your sense of humour hat on for that one :)
 
4:00 PM
man
everything is finally perfect
except for the sudden i/o error that turns all of my columsn and rows into a single cell filled with another language's alphabet
 
@TigerhawkT3 The mystery now is, did OP solve it....or did your comment make them see the light? We will never know! :P
 
I have use it but it will only show my Python codes in the browser! What is wrong? — Mobin Ranjbar 47 mins ago
Do these things happen in waves or something? It can't be coincidence.
(also, that question as too broad, I'm trying to find a dupe)
 
DSM
People's intuitions about how likely clustering is when random processes are involved aren't always reliable.
 
@idjaw My comment on what where?
 
@TigerhawkT3 The "how to open a csv file"
 
4:06 PM
Oh, it got deleted. Maybe they realized that if they had spent twice as much time working on their issue, those ten additional seconds would not have gone to waste. :)
 
Fun over on Programmers: "I am wanting to know the difference between JavaScript and JetBrains when it comes programming for a app." (programmers.stackexchange.com/questions/301004/…, for anyone 10k+ there)
 
That 404 provided a nice moment of confusion before I remembered that I'm 10k+ on SO, not Programmers.
@JonClements I decided it was time to change the ol' avatar. :)
 
@jonrsharpe just out of curiosity...did we coincidentally set the same dupe? or did you see my dupe flag and accept?
 
@idjaw the latter
 
thx
 
4:17 PM
@TigerhawkT3 a good choice - even if I do say so myself :p
 
4:32 PM
Yup - you look fantastic :)
 
hahah that's awesome
 
Wow. Is there anything that hasn't been implemented in Javascript? Python in Javascript.
 
Still working on JavaKevinScriptScript.
 
Skulpt is cool, but very incomplete, with inconsistencies compared to actual Python.
 
Are there any sensible reasons why this line doesn't use cls (ref: stackoverflow.com/q/33373247/3001761)?
 
4:40 PM
Other than "because the author didn't think to do it the other way", I don't think so
 
Man, Cody must be really upset that I linked him to a help page.
 
Oh wow
 
I wonder why py.exe runs Python 2 by default.
 
@MorganThrapp umm... that'll get reversed at 3am :)
 
@JonClements Oh I know. I'm not worried.
 
4:44 PM
someone's mad bro.
 
And even after that, I'm still up 32 rep :D
 
This is a talk by Jeremy Kun, who I've linked before. He does really cool work (above my head) about algorithms and math, and uses Python to do it.
 
> I tried to reduce the integer=int(x) to integer = x but then I couldn't use the x as an integer
Ummm, duh?
 
I love. you. thanks so much for this. you're a saint It works perfectly — krisbb Sep 2 at 17:11
sigh
 
4:50 PM
Guys, if you keep downvoting his posts retroactively (instead of as they appear), you'll get reversed just like he will.
 
Yeah come on guys.
God damn amateur hour around here.
You should know how to serial downvote someone by now! HAVE WE TAUGHT YOU NOTHING!?
 
You can still close and delete the questions, where appropriate, if that's how you want to spend your time.
 
DSM
@Kevin: thievery!!!
 
;-)
 
DSM
Bloody guy gets +3 and probably an accept for / vs `\`.. mutter mutter mutter
 
4:53 PM
2
Q: Parse answer in Quora that contains code

Cosma IaffaldanoI want to parse this post from Quora or a generic post with code. Example: http://qr.ae/Rkplrt Through using Selenium, a Python library, I can get the HTML inside of the post: h = html2text.HTML2Text() content = ans.find_element_by_class_name('inline_editor_value') html_string = content.get_...

 
I also identified a naming error. That's worth a couple points, surely? (no)
 
py.exe would run Python 2 by default if the environment variable is set to it.
Possibly related, I had an issue where the py command would run Python 3, but double-clicking a Python file would run Python 2, regardless of environment variables and filetype associations.
Solved that one with this answer.
 
That's interesting, I thought the solution would be "your .py filetype is associated with c:\python27\python.exe when it should be associated to c:\windows\py.exe"
Maybe that post precedes the existence of py.exe, or at least its inclusion in a default install
 
It would be nice if computer users didn't have to change a setting in three different ways for it to take effect.
 
Theoretically, the shebang would override everything else (assuming py.exe is the default association). I don't bother to use it myself, though
 
5:02 PM
Does windows support shebang lines?
I've never actually used one.
 
no
well...if you're using something like cygwin
but that doesn't really count
 
I'm not sure, but I tried that and it didn't do anything. I had to use assoc and ftype.
 
It mentions them in the Using Python on Windows page, so I assumed yes
 
oh really?
 
Reading further, there's no OS-level support for them, but py.exe will look for them and run the desired version.
 
5:03 PM
I'm sure! ...that the answer to that is "maybe."
Has anyone else noticed that "that's a really good question" is often used as an inaccurate euphemism for "I don't know the answer to that"? (In general, not SO.)
 
That's a great question! freakonomics.com/2015/01/15/…
 
@TigerhawkT3 I often use that as "floundering time" to get an answer ready.
"That's a really great question" ...that I should know the answer to...crap crap crap hang on I've almost got it "and I'm going to tell you something about that" oh right, THAT'S it!
 
DSM
I was going to object that tags = {'drugs', 'sex', 'rock and roll'} has them in the wrong order, but it's a set, so really I can't complain.
 
I used that conversational device just today, during the "class scoping" argument above.
 
DSM
Psychic debugging: at some point Andriy had some_dict = some_dict.update(something_else).
 
5:11 PM
@DSM Yup.
 
I suspect a relationship between how soon people assume "May be it is a bug in Python 3.4.3?" (or whatever language/version) and how likely it is they're right.
 
@DSM That fool. Didn't he know that something_else was a string? No wonder you're getting ValueErrors all over the place.
 
I once emailed customer support to find out how to do something that I just couldn't make work, and it turned out there actually was a bug in it.
Custom CSS fonts in WebWorks ePublisher Designer, in case anyone cares.
And I hope you don't, because not even I care, except to the extent that I got this story out of it.
 
I've found tons of bugs in Borland's database engine, but that's about it. To be fair, those bugs are not hard to find and are widely documented.
But Borland hasn't existed for years, so they're never going to get fixed.
 
I ran into an actual real bug in PIL at least twice. ImageFont.getsize(text) returns the wrong value for height.
 
sdd
5:16 PM
Where can I find a good proxy list?
 
Bugs don't actually bother me that much
 
Plenty of people found it before me and they since fixed it, but still
 
@sdd What does that have to do with Python?
 
what bothers me is advertised features that don't work as intended
 
@sdd a tuple's a good proxy for a list
 
sdd
5:17 PM
Since there isn't a room named "Proxies" I had to choose one @MorganThrapp
 
lol
 
@sdd No, you didn't. You could've just not asked an off-topic question.
 
I wanted to talk about something and there wasn't anywhere to do that, so I decided to change the topic of a room I've never been in before.
 
EVERYBODY STOP IT'S TIME FOR MY THING NOW
 
I wrote a proxy list not too long ago
 
5:18 PM
Kind of like those people who don't have comment privileges, so they post their content as an answer, and when someone tells them it's not an answer, they say "but I can't post comments yet, so I have to post it as an answer instead."
 
class GoodProxyList(list):
    # TODO: do the needful
that's all I have.
 
@AdamSmith Sure, but these are major bugs. Like, if you try to index a table that's bigger than 1GB, it corrupts the entire table.
 
Good start. Turn it into an SO question.
 
I have to find a good proxy list. here is my codes

    class GoodProxyList(list):
        # TODO: what do?

what next?
 
"I have this code for a proxy list, but it doesn't seem to be generating the correct output. Can anyone show me how to fix it up? Don't write it for me; just show me exactly what I need to write."
"Thanks!"
 
5:20 PM
Just get Cody to write it for you. I'm sure he'd be happy to.
 
so I was trying last night to use zip and itertools's grouper to get sqrt(N)*sqrt(N) sections of an NxN 2D list as part of a sudoku solver
I finally got it working, and it's arguably the ugliest single line of code that's ever graced my keyboard.
subsections = grouper((cell for n_row in n_rows for col in grouper(zip(*n_row), section_length) for cell in itertools.chain.from_iterable(col)), self.boardlength)
 
Burn it with fire
 
I vaguely recall reading about a way you can use numpy to do sudoku with strides etc.
Ah it's in the NumPy Cookbook
 
(n_rows is grouper(self.board, int(self.boardlength ** 0.5)))
yeah I figured numpy would have a good way to do it
but this was for a codewars challenge thingy so I didn't have the luxury of using the right tools for the job :)
I could clean that up, I'm sure
but meh
 
5:30 PM
It's a really neat way to take a (9, 9) array and get the (3, 3) blocks out of it, basically
 
shoot...I forgot codewars is still using Python 2....*changing code....*
 
Wait, is that 3 levels of nested generator?
That's... frightening impressive
 
yep!
built a class Sudoku that had properties for rows, columns, and subsections
rows was iter(self.board). columns was iter(zip(*self.board)) (Python2 remember)
subsections was that.
 
Isn't there something about flat being better than nested in Chapter PEP, Verse 8 of the Holy Documentation?
I should probably get to sleep before 11am.
Shame; it's such a beautiful cloudy day.
 
@TigerhawkT3 yeah the alternative was nested for loops. This is technically flat :)
 
5:42 PM
 
You have not earned acces to this kata's solutions :(
Also, they have a typo.
 
oh I can't even share the code??
bah stupid thing. Sec
 
Yeah you have to "forfeit" your eligibility to get points for the solution
so if you don't care you can forfeit and open solutions
 
I figured I could link it directly and get around that
The last test case was [[True]] which passed even though it shouldn't
which is the weird any(type(c) != int for c in row) at the end
 
5:48 PM
It's not a perfect system. Questions are put together by users. They put together the test cases. The questions go in to beta and "voted' in to official point standing
sometimes things are missed. I've found a few bugs myself
I also think the creator of the question can change things afterwards too. So you might try your solution and all of a sudden it does not work because a test case is added for a new edge case
 
user559633
sup nerds
 
werd
 
6:12 PM
what up brosef?
 
Bro Montana
 
user559633
Boseidon, Lord of the Brocean, dankest Brolympian from the Bronze age
 
actually calls his best friend 'bro', 'brotholomew', et al.
It started off ironic, but then we just kept doing it.
 
user559633
haha i call my best friend python-tan and we go on adventures together (through my mind!!!!)
 
6:36 PM
Adventures of Tris-tan and Python-tan... I'd watch it.
My elbow hurts. I think Python may be to blame because I was writing Python code today.
Should I file a bug report, or...?
 
you should write it up and show it as a gif to show the motion your elbow makes that causes you pain and ask why
 
@Kevin There's bugs in your elbow? I recommend a doctor.
 
I'd go out in public and start elbowing people just to give it a real reason to hurt.
 
user559633
i think that's more an exterminator's domain
 
I'm sure most exterminators have enough stuff on their truck to stop Kevin's elbow from hurting.
 
6:39 PM
It's the only way to clear up a Kevin infestation, after all.
 
user559633
i'm sure exterminators have some pain killers or various drugs
 
Rhubarb, everyone.
 
in a try/except, if a line throws an error are the lines after ran?
in the try block
 
no
 
thank you
 
6:45 PM
try:
    stuff = do_stuff()
    print("will not run")
except Exception:
    print("fail")
if do_stuff raises an exception
you won't see that print("will not run")
 
I'm sure OSHA would be very interested in the fact there are workers being injured while working with Python(s?) at your workplace.
 
OSHA has no jurisdiction over -- flex -- these pythons
6
 
user559633
OSHA has no jurisdiction over -- flex -- how I spend my time as an unemployed person
 
Huh, in Python 2 str/int returns 0.
 
I keep getting letters from the Bureau of Alcohol, Tobacco, and Firearms to register these guns, though
 
6:55 PM
@MorganThrapp huh?
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "a" / 3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'str' and 'int'
 
user559633
@Kevin Oh really? they normally just send me my rewards card points around the holidays
 
>>> str = 0
>>> int = 1
>>> str/int
0
 
Wait, nope. I just forgot that input in 2.x returns an int.
 
bah
you made me think. NOBODY MAKES ME THINK
 
6:58 PM
Today I learned that PIL can read animated gifs.
Don't think it can determine frame speed, though. Still somewhat useful.
 
Wait... so it can read the images but not the header?
 

« first day (1837 days earlier)      last day (3111 days later) »