« first day (2003 days earlier)      last day (2952 days later) » 
00:00 - 20:0020:00 - 00:00

12:02 AM
well FWIW, @DSM I wouldn't poison you.
 
if the food was roofied then the woman did DSM a favor anyway :P
 
I came up with a great idea.....realized there was already a subreddit for it: "drunk or a kid"
 
For the record, I don't endorse eating other people's food
not in public, not in the workplace
but in Hungary, you don't eat stuff that you left in public:P
("In Soviet Russia, food eats you after being left in public")
 
@idjaw that is also on How I met your Mother
 
awwww really?
 
12:18 AM
yep, "fireworks in the Microwave? Drunk or a kid?"
 
I need to work on my creativity.
 
good night!
 
peace
 
It is a good game, but I think most of those who have had a few with buds have played the drunk or a kid game
It must be Saturday. Looked at 3 questions and all of them were "gimme code"
 
Weekend questions are so bad
they are either really obscure bad questions, or really bad gimme the code questions
 
12:27 AM
after tutoring, TA, and classes in general: I'm still a little shocked at how many of them are for assignments I recognize (at least in form)
last year I actually caught two of the cheater here, red-handed :) :) >;)
 
ha that must have been awkward for them
 
In this chatroom? @JGreenwell
 
no, on the main site
@idjaw the awkward one was someone who used my code (from git) on an assignment for a class I helped tutored - but didn't know that I had sent the professor my code the previous year
 
slow clap
 
I have never understood how people cheat through college. How are they going to succeed in the workplace?
 
12:38 AM
hint: If your going to turn in someone else's code - knowing how it works is just part one - explain why the methods used were chosen is key ;P
the main reason I've been given (with development classes) is: "I want a degree in X and I just need this intro class but I'll never use it."....where X is usually networking or cybersecurity or just straight CIT
 
The most frustrating part is when you've been working on your code so long you can't tell what is messing it up
 
 
2 hours later…
3:10 AM
@BobEbert I'm glad I could help. One suggestion though about your new code. string stores a line that previously had a newline and now has a slash in its place. So f1.write('/' + string + '\n') is incorrect. Since you want a new line after the '/', do string = string.replace('\n', '/\n'), now you can just write f1.write(string).
 
 
4 hours later…
7:08 AM
@DSM it's amazing what not having a steady income will make people do. Give it 6 months and you'll see...
 
8:04 AM
@user3561871 they want to grab the coattails of clever people for their first project or two, then suggest to their manager that they move into project management as they've "discovered" they "really like working with people"
Hence all the "yes I used to be technical" people who clearly, clearly were never any good
@PM2Ring it would be the cruelest of jokes to go to where his remains are, and add "!!!!!!!" to whatever inscription is there
 
 
2 hours later…
9:44 AM
guys, how effective would it be for me to sit down and go through all of docs.python.org/3/library
 
@Skyler Depends. How much experience do you have?
 
Guys, I am deploying a django site to heroku but it is gving me a error 500
 
I've done a few classes in C++, some in Java, spent a lot of time doing scripting in bash, and have been trying to incrementally add in Python to my workflow
 
The site runs fine on the local server though and logs dont tell much either
 
@Skyler it'd probably be a massive waste of your time.
 
9:51 AM
any helps?
 
most of my C++ and Java is terribly rusty
 
@Skyler I'd suggest you look for tutorials that will introduce you to Python in a structured way, rather than just reading the library docs like a book.
The docs are brilliant, but that's not what they're designed to do.
 
@Skyler Learn python the hard way is good one.
 
It'd be like picking up the dictionary to teach you to speak English.
@Ajit LPTHW is not a good one.
 
@Ffisegydd That's what I've been following . Why is that?
 
9:54 AM
@Ajit read the link.
 
exceptions after 48 exercises is a little crazy
@Ffisegydd I guess I'm wondering why its not like a person who's been taking spanish classes picking up a portugese dictionary, what is the structure stuff you are referring to that is different enough from C++ and Java to warrant attention
 
Yeah. We've just found (qualitative, selection bias, etc) that people that use LPTHW seem to come out confused at the end of it, if they even reach the end. Usually they get half way through and have been taught some quite advanced things and not been taught some very basic things.
@Skyler moving from Java to Python is more than just structure though.
You could probably learn the structure in a few hours, but you would be writing poor Python code.
There are tutorials that are aimed at people with prior programming experience which might help.
they don't bother explaining "This is an if statement..." etc
 
@Ffisegydd i mean what are you going to learn in the "structured way" you mentioned here that i should pay attention too
 
By "structured" I meant more that you could end up learning really, really advanced stuff about dictionaries before you've even encountered a list because dictionaries come before lists in the contents :P
 
love php interactive docs. So much "information" so little knowledge.
 
10:02 AM
So "structured" would be "A high-level overview of most of the data structures, then some more detailed stuff on each individually, etc"
wiki.python.org/moin/BeginnersGuide/Programmers might be of help, they're tutorials that are aimed at people with prior programming experience.
 
Just spent 2 seconds to find some information on how broken PHP is and found this gem instead: "Note that if you pass this function a url without a scheme (www.php.net, as opposed to php.net), the function will incorrectly parse the results. In my test case it returned the domain under the ['path'] element and nothing in the ['host'] element." (which of course is rare in a way that PENIPBBKAC)
 
brb need to go to the shops
 
@Ffisegydd and just in case I am overestimating my programming skills, any materials for learning python for sucky programmers
 
@Skyler I like Programming Python myself by Mark Lutz. It's very in-depth. But I'd suggest you start with online tutorials first to give you a flavour of whether you need to invest the money.
 
just cuz ive done things for a while doesnt mean im sure ive done it well
 
10:04 AM
Anyway, brb.
 
@Skyler I'd be a bit wary of the python wiki
@Skyler it had Learn Python the hard way there for ages before I got it removed...
in any case, if you haven't gone through Python 3 tutorial in its entirety and you're a guru in Java, then you should read it through before going for any other materials
 
@AnttiHaapala guru is definitely an overestimation, lets just say im better with C++ than Java and didnt ever really like Java to begin with
 
well if you're guru in C++
if you've written a program that didn't crash, in C++...
 
@AnttiHaapala then id be the worst guru ever, but i get what you mean
 
just look at the here
90 % of the people who ask in that tag never reached that level :D
@Skyler in any case: read the Python 3 tutorial in its entirety first, it is a good introduction for people who can program in other languages
docs.python.org/3/tutorial this one that is
 
10:13 AM
if im working in a project where 2 is used is there anything to watch out for besides print() print
 
yeah, 2 is horrible.
if you need to do unicode text you'd have pitfalls everywhere
people who are accustomed to Python 2 then say "it is so easy" but it is not really easy to explain to people
 
@AnttiHaapala i do work in science so a lot of that is still in python 2
 
10:29 AM
negative
most of that is already in 3
the base
I'd be very wary about writing more stuff for 2
 
11:11 AM
cabbage
 
11:24 AM
Hey guys
I'm trying to make UDP server but it doesn't seem to be working
 
Getting any error?
 
Can you look trough my port forwarding settings, to see if I've set 'em up right?
 
@JustasSame that doesn't have much to do with Python.
You should consult some networking specialists.
 
If I set this up right, then my python code should be wrong
 
That doesn't change the fact that you should consult some networking specialists, as opposed to Python specialists.
Consider looking at some of the other SE sites.
 
11:28 AM
@Ffisegydd Thanks, going to look them up
 
2 hrs Spring meeting .... :/
I missed the Summer 2015 meet, So @Ffisegydd, you retired as the chair and dropped the gavel? :P
 
@BhargavRao I'll always be the hidden chair behind the scenes, pulling the strings.
 
Lol. But you forgot to teach him that he needs to bang the gavel
 
@Bhargav @Ffisegydd doesn't need a gavel - he has a special hammer
 
That reminds me, Congrats Fizzy for getting the Python hammer
 
11:40 AM
Ta. Long way to matplotlib gold.
 
700 pts aint hard if you try
Long way still.
 
@Ffisegydd That's a brave and long mission indeed... think I'll leave that one to you :p
 
Pfft I'm not even gonna bother.
I answered a handful of Qs to push me over to gold, but that'll do.
I'm retired from answering Qs now unless I find a really interesting one, but I never actually look them up so it is a moot point.
 
cbg all!
 
cbg
 
11:49 AM
Question: There is main.py which has a global variable called glob. main.py imports class A froma.py. How can I access glob in class A?
 
You should read a tutorial on how importing works.
 
12:46 PM
cabbababababage
 
1:19 PM
@AbhishekBhatia circular dependencies
 
1:52 PM
@Ffisegydd I agree with you about your comments about 'learn python the hard way', I've found that 'learn C the hard way' is the same way, but a bit worse. I remember being stuck on exercise-17 for a long time because it was just too much code all at once without a firm understanding of more basics.
 
2:09 PM
@idjaw cabbababababage Cappapapapapaptain! :)
 
2:19 PM
pups! how's the sunday going @JonClements
 
Well - it's lovely weather for a change - but otherwise, same old - how's yourself?
 
overall OK. But sick at home while the family is enjoying a brunch with friends. =/
 
Awww... puppy will make you some chicken and vegetable soup - that cures everything apparently :)
 
Also, grapefruit juice. Lots of Vitamin C without being shudder orange juice.
 
orange juice with extra pulp ftw
chicken soup makes everything better
 
2:23 PM
Orange juice is the 2nd best juice. Behind apple.
This isn't including the mixture juices like "apple and raspberry" which are amazing and frankly witchcraft.
 
@Ffisegydd especially the fermented apple juice variety? :p
 
@idjaw Oh god, why. That's like the worst possible juice.
 
Fermented. Unfermented. Anything apple is best.
 
@Morgan'Venti'Thrappuccino a lot of people agree with you. I just love it so much
 
I just don't understand the appeal of pulp. It's just so nasty.
 
2:28 PM
Damn, My System crashed. Back to say rhubarb
See ya later
 
rbrb
I can't explain my love for pulpy orange juice. But I just love it so much
it just tastes so fresh.
 
I don't want to chew my drinks.
 
My wife always warns me when I go grocery shopping...don't get the pulp...the kids hate it
 
Good, at least someone in your house is sane. ;)
 
I think you're mistaking pulp for something else.
 
2:31 PM
Do Canadians call champagne pulp? Because then I like pulp in my orange juice.
 
haha
does pulp have different meanings in other parts of the world?
 
Or maybe your oranges are weird.
 
I don't think so.
 
2:46 PM
well being sick allowed me to blaze through netflix shows
need to watch something else now...
 
Watched Dark Matter yet? I loved that
and of course Jessica Jones was awesome
 
jessica jones I've seen. Dark Matter. no. Let's see
can't seem to find dark matter on netflix
I saw jessica jones
 
Dark Matter's on the US Netflix - they're making it a bit harder to proxy now though
 
hmm maybe I should go back to house of cards
 
I've not watched the remake, watched the original a while back - thoroughly loved it
Can you get "The Thick Of It" - that's awesome if you're into that sort of thing
 
2:56 PM
nope just UK it seems
 
curse you regional licencing!
 
watched the first episode of the thick of it. too real, too much like a documentary
 
@Antti bah - it's a brilliant series :)
 
3:14 PM
well house of cards it is
 
3:56 PM
@AnttiHaapala yeah, thanks.
What is the best procedure to follow when importing from one directory up? stackoverflow.com/a/23103505/3646408 or stackoverflow.com/a/1054293/3646408
 
4:23 PM
Can anyone tell me why this isnt working?

monsters = ('fly', 'mouse', 'rat', 'serpent', 'goblin', 'gnome')

MONSTERS_STATS = {
'fly': Stats(hp=10, attack=2, defense=1),
'mouse': Stats(hp=20, attack=4, defense=1),
'rat': Stats(hp=25, attack=6, defense=3),
'serpent': Stats(hp=40, attack=7, defense=3),
'goblin': Stats(hp=55, attack=8, defense=4),
'gnome': Stats(hp=55, attack=8, defense=8),
}

def rand_mon():
ran = random.random()
if ran < .34:
battling = MONSTERS_STATS['fly']
print(battling)
elif ran >= .34 <= .66:
I have random imported
 
Are you getting an error?
 
no its just printing nothing
 
What's Stats()?
or alternatively, have you tried just printing MONSTERS_STATS['fly'] to see if that works?
 
I believe a namedtuple if thats what youre referring to
I have
that works fine
 
Just eliminating stuff here - did you try printing ran before the if/else
 
4:29 PM
strange, when I added print(ran) before the if/else it worked fine and printing battling worked too
now I removed print(ran) and it's still working. I've had this happen before where after a few tries something started working in the console without needing to change it, any idea why/
I run python 3.5.1 IDLE
 
Well, glad it's working now!
Hey everyone - have a feeling I'm missing something very obvious so I'm coming here rather than posting :) sphinx-apidoc/napoleon don't seem to be picking up the summary of my methods. They pull in the args, params, etc...just not the summary. Can't find anything on Google/SO where someone had the same issue. I'm using Google's Python style, here's an example of what I have:
"""Sets access token.

Set the access token after creating an OutlookAccount object.

Args:
access_token: A string representing the OAuth token

"""
 
4:51 PM
@Zorgmorduk hey, I used the first one. It was stated in the pep also that way as per one answer stackoverflow.com/a/1054281/3646408
 
5:09 PM
MONSTERS_STATS = {
'fly': Stats(hp=10, attack=2, defense=1),
'mouse': Stats(hp=20, attack=4, defense=1),
'rat': Stats(hp=25, attack=6, defense=3),
'serpent': Stats(hp=40, attack=7, defense=3),
'goblin': Stats(hp=55, attack=8, defense=4),
'gnome': Stats(hp=55, attack=8, defense=8),
}

def rand_mon():
ran = random.random()
if ran < .34:
battling = MONSTERS_STATS['fly']

elif ran >= .34 <= .66:
battling = MONSTERS_STATS['mouse']

else:
battling = MONSTERS_STATS['rat']


def battle():
battling = rand_mon()
 
I am getting a syntax error. :/
Have a look here if possible bpaste.net/show/36ab88dceaf0
 
5:29 PM
@AbhishekBhatia and ... you know when the syntax error occurs, it says exactly where it is happening.
and the syntax error is exactly at the dot following network_comm
the part after from cannot have any dots. the dotted stuff must go before the from.
 
wb cap'n
 
we need a new close reason: "code badly indented"
 
Aye
I slept through a couple episodes of house of cards. Will have watch them again at one point hehe
 
The worst is when someone formats their code with the text block. You can't undo that with an edit. I really don't feel like editing out all those '>'
 
5:37 PM
@AnttiHaapala `from ..network_comm.audio_client_tcp import AudioClientFactory`
`ValueError: Attempted relative import beyond toplevel package`
 
well, isn't it obvious
you can only import within the package structure, they're not directories
for that to work, your current module should be foo.bar, and the other module foo.network_comm.audio_client_tcp, that would contain AudioClientFactory
 
Why don't you make your life easier and just import based on where you are executing from
it makes things so much simpler
 
Because that would require them to think things through as opposed to asking us.
 
Fizzy sweeps in for the hit
 
5:43 PM
and someone downvoted my perfect and correct C answer
 
Probably because the question was about php.
 
isn't that awful when you answer to a question... in wrong language :d
 
Haha is that what happened?
 
Would I lie?
 
not now..
but it has happened to me on multiple occasions :D
 
5:45 PM
heheh
 
or I comment about something being utterly wrong in Java syntax
and then 20 minutes later I realize the question had
 
I know this one guy, who shall remain nameless, that once sarcastically commented "That doesn't look like Python, does it?" on what turned out to be a Cython question.
 
nvm..more people commented...joke isn't funny anymore
 
@Ffisegydd me?
 
@AnttiHaapala Sry I am a bit confused. foo is the top-level directory and bar.py and /network_comm are in it?
 
5:52 PM
@AbhishekBhatia no, they must be python packages.
stackoverflow.com/questions/36533196/… seriously, this is a MCVE?!
 
Antti needs a drink
Weekends are never good for SO questions
 
I want a gold badge in C but I guess I'd lose my mind before getting there
is never good for SO questions.
 
all gold badges require 1000 right?
 
is there a shorthand for running a function multiple times?
 
5:55 PM
yes there is, because it is such a common requirement </end-sarcasm>
@Shniper perhaps you need a for loop?
 
I suppose I could do that, I was hoping there was a solution similar to printing multiple times but a for will work fine
 
"printing multiple times"
 
@AnttiHaapala No I was thinking of someone else. We'll call him...BubblyGreat.
 
what solution there is for printing multiple times
@Ffisegydd I am pretty sure I've done that too
 
print("hi" *5)
it's for testing balancing in a battling system so I'm looking for the simplest possible way
 
6:00 PM
That's not calling the print function multiple times.
That's printing a single time but you're multiplying the string.
 
calling the print function multiple times would have been trying to do print("hi")*5
but you will be met with a fun little exception doing that
 
I'm aware, that's why I know that won't work with a function, but I was just wondering if there is anything similar
 
but that isn't similar
 
How the minimal, complete and verifiable example in this case has to be 530 lines of code in 2 C files?! — Antti Haapala 7 secs ago
 
someone was patient enough to answer it
@Shniper are you looking to store the return values of the method that you are executing? Or are you just looking to execute it X times
 
6:05 PM
my score in C is 364. :/
 
no need to store them no
 
good evening
 
just use a loop
for _ in range(n):
    your_method()
that's it that's all c'est tout.
 
am i correct that the following error has something to do with not compatible tensor shapes ? assert_same_rank
"Shapes %s and %s must have the same rank" % (self, other))
ValueError: Shapes (?, 10) and (?, 10, 10) must have the same rank
 
perhaps
 
6:07 PM
thats a taunting answer :)
 
Pretty taunting question.
We don't even know what you're trying to do.
We don't know what library you're using.
 
ok so it wasn't just me
 
We're not mind readers.
 
Fizzy is. But he takes Sunday's off
 
using skflow, which is a wrapper for tensorflow, trying to fit a classifer with data that has the shape : (73257, 3072)
(73257, 10)
i guess thats not very helpful either
 
6:11 PM
OH MY GOODNESS I FOUND A SO DARK THEME FOR CHAT
clicking on random profiles helps
 
where :D:D:
 
this is so awesome
 
I want it
 
well to give the user credit to where I found it
rlemon, Ontario, Canada.
11.3k 8 57 94
 
6:12 PM
so i guess i should post it on the stackoverflow website,maybe someone knows something
 
Feb 22 '15 at 10:29, by Antti Haapala
need to have a close reason "Exceeds my clairvoyance abilities" :D
 
it's right in their profile description
oh this is so comforting on the eyes
 
I like the clairvoyance better than mind-reading.
 
This is pretty nice.
 
I do not want to read anyone's dirty mind
 
6:13 PM
I like the me/RO/others distinguishing.
 
pfft "install for chrome"
keep your theme
 
Though the colours are quite bright compared to the dark background.
 
what browser do yo use Antti?
 
I also love the fact that "less active" people are dimmed, not opaque'd.
 
firefox, obviously
 
6:15 PM
Owch.
 
well, Fizzy and I are going to enjoy this dark theme in our Chrome browsers.
look at all that dark
 
Chrome/Chromium is broken. I use it only to verify that page X was b0rken, not that firefox broke it.
 
Chrome Bros!
 
high five
 
well, I'd find it homey.
United colors of Finland.
 
7:11 PM
If I wanted to create variables in an object would I just do something like
armor_types = [light, medium, heavy]?
 
What exactly do you mean by "variables"?
Do you mean that your object could have one of the 3 armour types there?
 
x = 1
each of the light, mediu, heavy variables are actuallyu going to be defined as lists
 
Sounds like you want enums.
 
never heard of them >.>
 
Well I'd suggest you Google around then, you've got the name now.
But it's not 100% clear what you actually want.
 
7:20 PM
I have some classes (archer, mage, etc) each one will use light heavy or medium armor, each armor set has different names for their pieces.
 
It sounds like light, medium, heavy, etc should be enums.
And I assume the individual pieces ("Fizzy's Helm Of Sarcasm" for example) should be objects.
 
I'm having a hard time understanding the difference between an enum and a class. They give a one line explanation and it doesn't make that much sense to me.
 
There is an entire documentation page on enums.
You'll also be able to find the wiki page on them.
 
I know, thats where i am
8.13.14. How are Enums different?
Enums have a custom metaclass that affects many aspects of both derived Enum classes and their instances (members).
 
In computer programming, an enumerated type (also called enumeration or enum, or factor in the R programming language, and a categorical variable in statistics) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value. In other words, an enumerated type has values that are different from each other, and that can be compared and assigned, but...
 
7:25 PM
can someone hammer this please
 
hamma.
 
ty
 
@idjaw oooh it's not a dupe
I've re-opened as it's not a dupe, it's unclear though so should be closed
 
eh? How?
 
brb
He's not expanding the inner lists
They just want to get them out. It's really unclear and doesn't make much sense.
 
7:29 PM
you're right
it's unclear
 
7:49 PM
What's the average # days paid holiday in NA? Random question but just reading an article.
 
is this including national holidays? Or just vacation
 
Just vacation.
 
well, I know default is typically 10 days which I think is the mandatory minimum
 
Article I read said the average is 10 days.
 
yeah
 
makes sense
 
O_o really?
 
what is in your area?
 
I think I have 28 days, not including national holidays.
Add them together it comes to 36 totalish.
 
is that an average though?
is it common to have that?
 
7:54 PM
That's not an extravagant amount, but it's also not stingy.
I'd be a bit unhappy if I had less than 24-25.
 
right. I have four weeks, plus a few days for sick days
 
Not sure what I have for sick days.
Oh 28 days is the minimum entitlement.
 
in your area?
 
In the UK.
 
wow
 
7:57 PM
Which is why I was so shocked at that thecodist article.
At FizzyCorp we're allowed to take holidays forward too, so I'm taking 10 days forward that I've not used, meaning I'll have 38 (+ 8 national) next year.
 
We have to negotiate extra vacation in the hiring process. Typically, they try to throw two weeks at you (three is VERY common these days however) and then you try to bump that up
we have quite a few national holidays. But, hearing about UK at mandatory 28 minimum...that just puts us to shame
 
00:00 - 20:0020:00 - 00:00

« first day (2003 days earlier)      last day (2952 days later) »