« first day (1644 days earlier)      last day (3529 days later) » 

00:16
@poke what the heck are you still doing up? :p
I could ask you the same question.
darn it... can't think of a witty retort to that... so +1 @poke
:)
00:48
cbg all
OP is getting offensive in the comments
 
3 hours later…
03:20
cbg
Cbg @Unihedro and others
cbg @vaultah @Unihedro et al :-)
04:10
@JGreenwell Sadly, some of the comments by others are flaggable. I'm not gonna, because... whatever. But people being offensive isn't an excuse to be offensive in return.
04:37
cbg
@WayneConrad I saw that too but the whole thread had been deleted by then so...
04:52
Anyone here with enough score in the tag to help out with this?
05:05
Cabbage boys
And a brassic welcome to you :-)
cbg @thefourtheye
Cabbage @JGreenwell & @ZeroPiraeus
05:47
@davidism wouldn't work directly either :P
@davidism loading existing packages with classifiers... they are not in cache :D
need to do a merge
A conflicting state is already present in the identity map for key (<class 'pypackages.models.package.Classifier'>, (4,))
guess that is my fault :d
dunno what's happening there
Guys, can't you customise your Django admin to look exactly like Wordpress admin?
@EnglishMaster what do you mean excatly like wordpress admin?
06:26
The latest xkcd is kinda cute: xkcd.com/1513
I want it to look exactly like wordpress admin. As you add apps and model, they will be listed on the left side bar instead of in the centre
and pretty much everything like wordpress
@ZeroPiraeus That's a little too ambitious for a 1st script. I hope my comment doesn't upset them.
06:41
collections.Counter is very useful on codeeval
I should know better than to answer questions from someone who calls SO sackoverflow...
07:22
Cbg :)
user4433485
Cbg
@wim Looks like your "pathological potato" uncovered a bug in the documentation :-)
Cabbage @Katherina and @IanClark :-)
user4433485
hi @thefourtheye
Heya @Katherina
07:48
Should I dv this answer now, or should I give him more time to respond to my comment?
More time I'd say
I'd have thought you can't expect people to go on SO more than once a day, but other people may think that's not enough
Good point. I guess it doesn't really matter, as my answer has made his answer redundant. I'm a little reluctant to dv answers if I've posted my own answer to a question, it seems un-sporting... unless the answer is really bad and the person doesn't respond to constructive comments.
08:04
Someone else downvoted it anyway.
Pity they didn't upvote mine too. :) But I guess mine doesn't directly address the OP's original question. I suppose I should add a short preamble to cover that...
Anybody know why Sphinx automodule wouldn't output anything?
Okay, I got it with autoclass. Is there a way to make automodule include classes?
08:30
12 hours until the elections begin.
user4433485
Got lessons in Android studio today. lol
@Ffisegydd thanks; was about to flag
user4433485
again that EnglishMaster
Based on his previous behaviour, kick first and don't bother asking questions.
08:34
I work with the tools I have :)
08:54
cbg, AvinashRaj. Nice work on stackoverflow.com/a/29681130/4014959
I'm still in shock over Katerina's teacher thinking PHP is superior to Python. chat.stackoverflow.com/transcript/message/22693531#22693531
09:14
I'm still addicted to codeeval
The problems are getting hard enough now that I'm not doing all the coding in the html editor, as the debug cycle takes too long for more than one or two tries
hi, guys , i am new to python and I get confused with the following code
base_members = dir(base_class)
all_members = inspect.getmembers(cls, predicate=inspect.ismethod)
return [member for member in all_members
        if not member[0] in base_members
        and (hasattr(member[1], "__self__")
             and not member[1].__self__ in inspect.getmro(cls))
i know that at the last line, member[1].__self__ is referring to the object that is holding this method
but why this object has the possibility of not being contained in its method resolution order?
09:31
I am not satisfied with the answers to this question.
16
Q: Making an object x such that "x in [x]" returns False

wimIf we make a pathological potato like this: >>> class Potato: ... def __eq__(self, other): ... return False ... def __hash__(self): ... return random.randint(1, 10000) ... >>> p = Potato() >>> p == p False We can break sets and dicts this way (note: it's the same even ...

@thefourtheye I am.
Also note that testing for equality is potentially slow.
I feel that the main question is not answered yet
so testing for identity first is a Good Idea, from a performance perspective.
But list and hash based structures behave differently with contains call. Is it fine?
@thefourtheye yes, because their implementation is different.
Again, performance is paramount here.
Containment in a set or a dict requires computation of the hash first.
Wim also screws with the hashing here.
09:50
hey, does anyone know of a python package that provides frameworks for several programmin patterns? (e.g. producer-consumer or observer pattern)
@MartijnPieters I couldn't come up with any valid counter arguments. Then it must be correct :-)
Then fixing Py 2.x and 3.x docs should be fine here I guess.
user4433485
@BhoomikaSheth I love your ava!
@Katherina What are you doing these days? Back to classes?
user4433485
@thefourtheye Yep :( it's so boring srsly
lol... What are they teaching you?
user4433485
10:03
Today, they want to teach us how to develop android apps, without any java experience background
user4433485
now we are working with Android Studio, and I have absolutly no clue what I am doing lol
user4433485
Copy paste everything from others:p
It reminds me of my lab programs..
user4433485
They are actually teaching me where to find CMD-C and CMD-V
You know what, in my college, we used to write lab exercises in Paper :D
user4433485
10:05
hehe
Teacher will come and read through the program and he will give marks
user4433485
oh sounds good
We took power-saving to the next level ;)
user4433485
here its
user4433485
hey, you have to upload your files
user4433485
10:06
5 months later, you see that it's marked as " good "
user4433485
I once uploaded a empty .php file, and couple weeks later it was marked as good aswel lol
Why don't you guys ask your teacher to teach a little bit of Java also?
user4433485
the point is, I am the only one with some motivation
user4433485
most of us are playing Guild Wars II or Counterstrike in courses
Counterstrike... Wow :)
user4433485
10:09
1 year to go, and I leave this horrible place =P
user4433485
CounterStrike Global Offensive or something
@Katherina Well, it had no errors. :)
user4433485
what?
user4433485
Ohhh! I am done here for today, I'll brb ! have to drive to home
@Katherina Take care. Have a safe drive back home :-) Rhubarb
user4433485
10:10
@thefourtheye Thanks! See you in 30 minutes:)
@thefourtheye I did programming on paper in early high school, but our teacher had a good excuse.
What was that?
Cheap computer time wasn't easy to come by in 1971. :)
Oh, careful. You are giving away clues to your age :D
10:18
rbrb for a bit. Badminton time.
@Katherina I also played CS in my...CS degree
I can barely remember how to write in some of the early languages I learned like PL/I, IBM 360 assembler, APL, FORTRAN, Pascal, COBOL. I could probably write stuff in a simple version of BASIC (my very first language); I once estimated that I'd used over 20 different dialects of BASIC.
Which is why I now get mocked in programming chatrooms
Stay away from it and learn :)
10:35
cbg
Anyone know how to convert a decimal fraction to minutes and seconds? I was going for: multiply it by 60, and the whole-number part of the result is the minutes, and multiply the fractional remainder again by 60 to get the seconds, but that doesn't work.
Which is weird, because it works most of the time
@thefourtheye yep, same . I'm also did the same thing..
@Robert when doesn't it work?
0.001, but I think it's just the way I've coded it. I think I have to work out seconds first, or something.
The 0.**00**1 part screws that up, I think
So what should 0.001 give?
10:44
Hello folks!
0.00'03"
Sup brah.
user4433485
back
@Ffisegydd Not much. What about you?
Preparing for a phone interview this afternoon.
R Data Science Consultant position.
10:44
Cool
@Robert so 0.5 should give what? 0' 30''?
@Ffisegydd Don't be nervous, take a deep breath before answering the call. I know you know this, but its good advice ;)
0.30'00" I think
user4433485
someone interested in a Golf III convertible?:p
@Ffisegydd what helps me is saying the word "Hello" a couple of times before answering, just so you don't come out with "HHEEell".
10:46
What you mean I can't just answer with "Hey up flower!"?
Dare you to answer with "Cabbage?"
@Katherina I've met teachers like yours over the years. Most of them are rather insecure about their own languages, frameworks and skills. Think about it like this, if you see that your language is dying, wouldn't you want to help it by adding to its adherents? Don't be so hard on the guy. Not everyone is on the winning side ;)
@RobertGrant It'd be funny if the guy replied with a "Yam you. Only English"
user4433485
But @GamesBrainiac if you are insecure and have no clue what to do, why would you become a teacher?
@Katherina the question is, why wouldn't you?
user4433485
because he can't teach us anything.
10:49
@Robert I'd do it like this
In [64]: x = 0.001

In [65]: y = x * 3600

In [66]: divmod(y, 60)
Out[66]: (0.0, 3.6)
And that's the right answer btw, 0.001 is 0 0' 3.6''
Yeah
Wow that's cool. investigates divmod
user4433485
I won't be a master construction worker when I don't even know what a hammer is,
@Katherina It is unfortunate, but these days teachers aren't exactly the role models the should be. Most want you to fail, in order to maintain their bell curve. They are not there to teach you, but rather add to their CV that they taught at an educational institution that often carries some weight with certain interviewers.
user4433485
why would he be a teacher if he has nothing to teach us
@Katherina Likely because s/he could not find more meaningful employment.
@RobertGrant So, hows life? Faced an deadlocks or race conditions recently?
10:51
@BobbyG of course you'd have to take into account when x > 1
@GamesBrainiac I doubt that's true for lots of teachers, but no doubt some are like that
@Ffisegydd yeah I just lop that bit off and shove it back on at the end
@RobertGrant I myself teach to understand my own lack thereof. But most of the teachers I've met have been major disappointments. Some even rant about the fact that they had a 3.9 GPA but <good university> did not accept them, so they're stuck teaching us.
@GamesBrainiac that's disappointing, sure, but your experience of teachers is a pretty small subset of all teachers, ever.
cabbage all
user4433485
cbg
10:57
@RobertGrant Most people's experience is. However, my sampling is more balanced since I've had lower, middle and upper school in europe, middle east and asia. I've been to rich schools, poor schools, schools didn't have whiteboards, and schools that used electronic ones. In general, there are very few teachers who actually enjoy teaching and wholeheartedly do so. I've never lost contact with such people, since they're the ones who truly helped me succeed.
There's a difference between a teacher who actively doesn't give a flying foo, teachers that go above and beyond what is necessary, and (probably the majority) the people who just want to do their job and live their life.
I think it all comes down to teachers being underpaid.
There's nothing wrong with any of the groups, even the people don't give a flying foo. They're just people.
I mean universities these days rarely offer tenure, only contracts.
@Ffisegydd not sure; that reasoning justifies anything, ever :)
11:01
My point is quite general, I'll admit that :P
I think the point was, just because someone doesn't care doesn't make them a bad person.
Well true, although from what I see on TV almost nothing makes someone a bad person, so I think we need more granular measures :)
@RobertGrant I might appear pessimistic. But, I really do (eventually) want to become a teacher, when I actually have the knowledge and skills that the role demands. The good teachers I've met have been the ones to really push me to this decision. So instead of seeing my observations as most teachers are bad, some teachers are so good, that they make up for the ones that aren't.
Does that make sense?
I need to think of some questions to ask in this phone interview.
@GamesBrainiac maybe :)
@RobertGrant Thats good enough for me ;)
11:04
I think you're all wrong and I'm right.
@Ffisegydd No one ever even hinted other wise, my good man :)
@Ffisegydd are you joining a team? Ask about that? E.g. churn rate
Good shout.
Although don't say churn rate
@Ffisegydd Ask a question about the challenges they face.
11:05
"How many people do you sack per year? Do they cry?"
I've got a similar question Games "Where do you see the company going next?" and the linked "What are the new interesting projects you have coming up?"
"Would the analytics of how many people you sack be considered data? Or big data?
There's no such thing as big data :P
That's all part of the joke. I think they'd get it.
As soon as you have "enough" data points to do your analysis, it makes sense to split the analysis into more groups (i.e. demographics of people). At that point, you need more data for your groups :P
@Ffisegydd Well, what I was thinking along the lines of, what kinds of challenges have their teams faced. For example, how do they deal with the size and scale of their operations. How does the company ensure that their codebase is fresh etc etc.
11:08
How do they perform on the Joel Test
I also need to ask about internal training as they don't mention that specifically on their website.
And maybe advancement opportunities?
"Do you have a rap battle team for when you're competing for contracts against other companies? Can I join it? If not, why don't you have one and can I create it for you?"
@Ffisegydd Do you really want to join this company?
Uhh, yes, why?
11:13
Then you'll be fine. Stop worrying.
user4433485
@Ffisegydd What kind of company
Circus.
user4433485
Becoming a clown programmer?
I know some clown enterprise programmers already.
user4433485
It's a cool life tho
user4433485
11:15
gypsy
11:34
@Ffisegydd I found my own, much crappier way of doing that thing
The problem was I was stupidly converting that decimal part to an int, for reasons long dead, but that meant it was chopping the 00 from 0.001
11:48
@Katherina There's an old saying in English: "Those who can, do; those who can't, teach". Meaning that if someone's got good skills & motivation they're most likely doing a job with decent pay (and status). That saying doesn't apply to all teachers - there are excellent teachers who keep their skills up to date and are passionate about passing on knowledge. But sadly it does apply to many teachers.
user4433485
Yes, unfortunately
@RobertGrant: FWIW, here's some code of mine that converts integer seconds to hours:minutes:seconds
def StoHMS(t):
    ''' Convert seconds to H:M:S string '''
    if t < 60:
        return ':%02d' % t

    seconds = t % 60
    t = (t - seconds) // 60
    if t < 60:
        return '%d:%02d' % (t, seconds)

    minutes = t % 60
    t = (t - minutes) // 60
    return '%d:%02d:%02d' % (t, minutes, seconds)
Or, you can just use the stdblib ;)
Well, yeah. But I wrote that before I was familiar with the labyrinth that is the time, datetime, and calendar modules. :)
No arguments there. Very elegantly partitioned too, might I add.
12:00
SeriousTalk: Full 3 piece suit for interview or just 2 piece?
I personally love the waist coat and would wear it everyday if I could, but I understand it may be overkill.
Ta. The function name's not PEP 8 compliant, but it works for me. :)
@PM2Ring "Labyrinth" is a necessary but not sufficient term to describe it.
Nice
My code is hilarious
Partly because I haven't learned formatters yet; that would help
@Ffisegydd 2 piece
Yeah :( shame
Not because it matters, but because some of the people you see may be small-minded, mediocre people who have no soul.
12:08
@RobertGrant This might be helpful then, pyformat.info
Thanks!
My pleasure.
@BhargavRao: Does the coding shebang have an effect in the interactive interpreter? Would it work in the $PYTHONSTARTUP script?
Help! Does someone have Python 2.7 and 64 bit Windows? We have a "cannot reproduce" stackoverflow.com/questions/29698591/…
@PM2Ring It basically means that you can do something along the lines of script.py <arguments> instead of python script.py <arguments>
The other advantage I would think that if you want that script to be run by a particular interpreter, then you can point directly to that interpreter in the shebang line.
@GamesBrainiac Bookmarked. I really need to learn more about (and practice using) new-style formatting. But I'm afraid that it's hard for me to stop using % formatting - 30+ years of doing it in C has made it rather ingrained.
@GamesBrainiac You misunderstand me. I meant this sort of thing # -*- coding: utf8 -*-
12:20
@PM2Ring 30+ years of C is a serious achievement, conquering this trivial formatting syntax will be no match. In most cases its rather intuitive.
@PM2Ring I most certainly have, if I knew you were experienced, I wouldn't have responded as such. You have my apologies.
@PM2Ring In most cases, that will not work. Instead try # encoding=utf-8, and that that does is tell the python interpreter that the following are all unicode characters, and to perceive them as such.
No need to apologize - it was a simple mistake of interpretation. And although I've been programing for decades, I know there's still plenty of stuff I'm not an expert in. OTOH, I am reasonably competent at a lot of programming stuff. :)
I have no doubts about that. But the encoding thing is rather problematic. Use the one I suggested because on some of the interpreters, # *-<...> doesn't seem to work.
@GamesBrainiac Hmm. That's annoying. But I guess it's allowed according to stackoverflow.com/questions/728891/…
@PM2Ring It is, but that doesn't mean it alway works. I don't know why really.
12:32
I've completely mis-timed this interview prep. Just been through all the example questions I can find and am psyched to go, but the interview is not for another 2.5 hours D:
Hi guys, can anybody help me ?!
i have a string like this "PATH: /remote/directory/path/"
I want to get rid of white spaces and `/` symbol so im doing re.split("\/|\s+", str)
but in output im getting a list like this

[
'PATH:',
'',
'remote',
'directory',
'path'
''
]
how to get rid of these empty items? of course i can do 1 more iteration , but is there another way?
Cute rabbit is cute. But capybaras have more attitude: i1.kwejk.pl/k/ckeditor/pictures/2015/04/images/Karol/…
why are pomegranates the best thing ever?
Because reasons.
I just wish the juice wasn't so expensive.
the juice is so sugary without the fibery part, the arils are the best
user4433485
12:41
@Ffisegydd Ah that's damn cute!
@PYPL Perhaps you should use sub instead of split.
"No, I do want the output to be a list and not a single string, so I want to keep using split", you say? In that case, you could loop over the list and add only the non-empty elements to a new list.
seq = re.split(whatever, s)
new_seq = []
for item in seq:
    if item:
        new_seq.append(item)
@PYPL What's wrong with replace or re.sub commands?
From there, it's straightforward to turn it into a one line comprehension.
seq = [item for item in re.split(whatever,s) if item]
12:54
@PYPL My advice: don't wrack your brains trying to devise a clever regex. If it's too clever, it makes the code harder to read. Keep it simple & do two passes. But in that case you don't need a regex - you can do it with str methods and a list comp:
>>> s="PATH: /remote/directory/path/"
>>> [u.strip() for u in s.split('/') if u]
['PATH:', 'remote', 'directory', 'path']
A parting thought: in terms of programmer time, asking "what's the very most shortest way to do [thing]? " On here is usually less efficient than thinking up a medium-length implementation on your own. In the time it took you to get an answer from us, you could have written your own loop five times over.
>>> s = "PATH: /remote/directory/path/"
>>> re.findall(r"[^/\s]+", s)
['PATH:', 'remote', 'directory', 'path']
"Oh, I did have an implementation, but I was just curious if there was something better", you say? Oh, sorry, I thought you were coming straight to us when you had a problem. In the future, you can clear up such misunderstandings by showing us what you already tried first.
is there a way to re order python traceback? in traceback i want to show user files first then standard/3rd party package files
Of course, the regex guru has a succinct, easy to understand answer. I ought to have thought of using re.findall() - after all, I just used it here: stackoverflow.com/a/29697747/4014959 . But I was too focused on using re.split(). Oh well. :)
13:06
@AnttiHaapala that's for performance reasons. The unique cache is only used when you try to create new objects with the get_unique method. I think I wrote another method at some point to populate the cache manually, maybe I didn't push it though.
Yo
Recbg
user559633
@ZeroPiraeus Did you mean '^.*ar.?$'
13:22
and also the most bizarre Flask code I've seen in a while
cbg
@PM2Ring I doubt you can do that in the interpreter! For that you've gotta do that sys.setdefaultencoding('utf-8') as far as I know
will aliasing python to python3 mess with programs that need to use python 2.7 on a mac system?
@davidism that's some pretty weird flask... is that some kind of weird library that requires it be written like that?
@BhargavRao Ok. I didn't think it would work in the interpreter, so I was a little puzzled when you suggested it to the OP. But I thought it more polite to comment here.
user559633
@RobertGrant you staying safe mate?
@corvid Probably
13:35
@tristan safe as ever
my vim keeps segfaulting after :q :\
if excepthook is called from multiple threads at the same time, will this lead to convoluted output?
Just had a recruiter call. Always a confidence booster.
@PM2Ring Aargh! I just saw that he was in the interpreter! My bad :(
@tristan Wow, that's embarrassing. I actually meant ^.*ar.$ :-/
13:39
Annoyingly, he accepted an answer that assumes he's doing it in a script & not in the interactive interpreter. I guess he was just using the interpreter to illustrate his problem, and didn't realise that there are subtle differences.
Should I add that point about reload(sys) and sys.setdef... ?
user559633
@ZeroPiraeus A very special kind of embarrassing.
user559633
if it makes you feel better, i still think you're very intelligent
@tristan that's not very MTFL like :)
@tristan It does make me feel better, yes :-)
13:41
No no it's totally MTFL.
@BhargavRao Nah. Don't encourage use of sys.setdefaultencoding('utf-8'). :) See stackoverflow.com/questions/28657010/…
Can you answer after it's closed as duped? Interesting case here stackoverflow.com/questions/29700761/…
The problem with my stupid job is that for now it's in demand, but if the product collapses for some reason, then I'll be an old person who can't write anything from scratch.
Set them up before crushing them even more.
user559633
Just kidding, your brain is rubbish lol!!!! your shoes are tacky
13:42
@tristan nice South African pun there
@PM2Ring Oops Martijn's blog there! I need to bookmark it again
(They call trainers/sneakers tackies)
user559633
I did not know this
user559633
back in 10
@BhargavRao blog? you mean his answer..
13:44
cbg y'allll
So I buy timbits (for non-canadians: this is what they are every Friday at my office. Today someone said they'd give me breakfast and asked what's my favorite? Porterhouse steak, baked potato and 20 years aged scotch... I don't think he's gonna go for it
Maybe the baked potato
That would still be alright I guess. But now I'm looking at pictures of nicely grilled steaks
And salivating
In my part of the world, those are called "donut holes". Coffee chain Dunkin Donuts sells them under the brand name "Munchkins".
You know. I've not had an Aberdeen Angus steak in many, many moons
@corvid no, that user just doesn't understand that using a class there is completely unnecessary
13:47
Oh yeah? That's actually cool. I like donut holes better than timbits
The name I mean
I blame Martin for my current state of dreamy eyed, steak induced state
hehe
I think we just call them...donuts...
But the latter is understood to mean the former even in non Dunkin Donuts contexts. Similar to how "hand me a kleenex" makes sense even if you only have the off brand.
@BhargavRao What's interesting about it? It looks pretty standard to me. And Cyber should know better than to answer it, especially since he's a Mjölnir-wielder...
13:48
@Ffisegydd well these are like mini-donuts
I'm going to ask a single question to Martjin , "How did you learn Python?"
@Ffisegydd Heresy. Donuts have to be toroidal, or contain delicious filling. Donut holes qualify for neither.
Surely they contain delicious filling?
Not here. They're just tiny. They're like the size of golf balls
Can't reload Flask page with audio element same dupe (somehow it got reopened even thought the op confirmed it was a dupe)
13:49
So you buy like 100 for $16
Ah okay.
How much do they cost where you are, @Kevin ?
I regard the interior of a donut as flavorless material that only acts as a supporting structure for the tasty exterior.
@Martin About the same, I'd say.
@AvinashRaj Yep! His answers are like long blog posts
I don't know the exact cost because I'm not the guy that buys them every Friday for the office.
13:51
@PM2Ring It's interesting coz he answered it after it was closed!
Where are you, by the way?
I dunno how
US?
Yeah, Philadelphia
@davidism done
13:51
The donuts which contain jam/custard are probably more common than the toroidal ones here.
@Jon thanks, want to get the dupe posted higher up too? :)
I find a lot of stuff the States is cheaper than here
@Martin you from Canada?
Yeah
13:53
Quebec though :/
I don't understand global economics, so I'm just going to blame corn subsidies.
I'm visiting Halifax this summer
NS
Yeah me too Kevin
Nice, I hear it's very nice over there
You've heard of Dalhousie University?
Nope
13:54
@davidism also done :)
Goin there as Visiting Researcher
:)
how long will you be there for?
2 months
THinkin of visitin Montreal on 26th Jul
Awesome, I bet it will be fun
@BhargavRao I have several friends there, it's an awesome place.
13:55
That's where I live
It's a lot more fun here than in NS
(Dalhousie)
I've got many frenz in University of Toronto!
Too far away
Let me know when you're here, maybe we can go for a drink
@BhargavRao Spooky! I suspect that Cyber submitted an answer, then started improving it in the grace period, so it wouldn't be recorded as an edit, and while he was editing, Jon hammered the question.
@PM2Ring Yep! Maybe I'll write a meta post on that
@Martin Sure, but it's doubtful coz the Prof is a strict guy!
13:57
Oh it's with the school?
@DonkeyKong Do gimme their contacts! I'll meet them
Yeah.
Got a scholarship offer
And Jul 26th is the last day of the JFL festival rite?
Will do :)
user559633
Welcome @Martin :)

« first day (1644 days earlier)      last day (3529 days later) »