« first day (2417 days earlier)      last day (2538 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
hey, I keep returning to this piece of code to "make it clearer". It's a part of the program that keeps bugging me to be "too complicated, should be simple" each time I sweep through the code. (This is the 4th time I'm trying to rewrite it).
It's also a constant source of bugs -.-
 
eh, well best of luck to you :D
 
5:16 PM
@davidism: am I the only one who finds these covecov report comments in the flask repo annoying as fsck?
 
DSM
@ThiefMaster: you're the only site mod who I've had to warn about language, so you're unique in that regard..
 
meh, when did this become a family-friendly channel? ;x
 
DSM
@ThiefMaster: about the time Jeff said so. ;-)
 
well he did not mention chat there ;)
 
DSM
You're free to ask on Meta to see if anyone else shares your idiosyncratic reading of his point.. but otherwise we get to see if site mods can be kick-muted. <0.5 wink>
 
5:25 PM
they can't
I've tried.
 
DSM
Can site mods kick each other out? We have MP and JC and BR around.
 
I don't think so
wait, maybe they can
I imagine Shog can do anything, for instance :D
 
DSM
Unlimited by either physical law or common sense.
 
even Madara is lurking here nowadays
 
boo
 
I've used the uncensored fscking quite some times
 
@ThiefMaster yeah, there's a way to disable them, I need to do that
 
also, boo
 
DSM
They should have visited StackOverflow. #callback
 
5:34 PM
What are you guys listening to while programming? Any specific music?
 
depends on what state of the solution I'm on.
If am in the design phase of the solution, definitely instrumental. Because the lyrics will distract me. Instrumental will be mostly - acid jazz, chill, trip hop

If the solution is worked out, and I have the main architecture of my code figured out, and I'm writing up the code to the "solved" features, I'll listen to whatever I'm in the mood for, which lately has been anything between rock or hip hop....mainly the latter these days
 
DSM
Dec 5 '16 at 16:47, by DSM
Okay, time to turn off the SO, crank up the cheery J-Pop, and get some coding done.
 
Total silence!
 
I often watch US late-night talk shows when working
 
5:37 PM
Can't have something take me out of the zone.
 
DSM
I like the sound of wind going through the trees. Comforting.
 
I did one of those personality tests last year and it told me my genre should be bubblegum pop
 
you definitely seem like the bubblegum pop kind of listener
definitely
 
found it
in CHATLAB and Talktave, Apr 4 '16 at 21:46, by Andras Deak
You should listen to Bubblegum Pop. You're never one to push boundaries or draw outside the lines, but so long as life is fun and a party's nearby there'll be a bounce in your step.
 
Lol I just searched bubblegun - some very old music >.<
 
5:39 PM
sheesh
poor Beethoven
 
I have a class in which a function say get_file() downloads files by iterating over the file's content writing it to the computer. I am able to calculate the average download speed and the downloaded percentage from the for loop. How can I get that value outside the loop, outside the function to be used by other functions.

    class Download:
        def get_file(self):
            start_time = time.time()
            filesize=0
            with open(filename, 'wb') as f:
                for chunk in self.response.iter_content(chunk_size=1024):
 
Andras is definitely the one that knows how to get the party started in the happiest way possible
 
note that I'm not implying that he was an early precursor to bubblegum pop
 
It always surprises me how people learn nowadays.
 
@AmitSingh What specific value is it you are looking to expose from that method. In general if you are looking to expose some "value" across your class, you usually want to store it in an instance attribute
 
5:43 PM
"I can create a connection to a server, request a file and download it to the hard drive no sweat". "I just can't seem to get the scoping".
 
I want to get the speed and downloaded value. I have thought about creating class variables and assigning those values in the loop. Will that work?
 
And @AmitSingh are you using python 3 now? If not, then you should probably add (object) into the class definition in order to define a new-style class
 
@AmitSingh Did you try? I don't see why not. Just create instance variables and assign the value to those attributes
class Foo:
    def __init__(self):
        self.speed = 0
        self.downloaded_items_count = 0
    def get_file(self):
        # things
        self.speed = new_value
        self.downloaded_items_count += 1
something like that
 
@AndrasDeak I am using python3.
@idjaw Thanks. going to try this.
 
@idjaw Well I could see why not :P - looking at the function it's kind of clear the function doesn't return until after downloading yet he wishes to show the instantaneous speed. (Well above would give you the average speed after downloading)
But then you might as well move the end_time = time.time(), speed = ... outside the with open()
 
5:49 PM
@paul23 yeah, and based on the name of the method and what it does, it wouldn't make sense to return the items he is interested in. I would expect a file or some representation to be returned. Which is why in that context using an instance attribute would make sense to expose it outside.
 
@ThiefMaster ok, should be disabled now
I'll find out in a second
 
hey davidism! :)
 
idjaw, you seem more talkative than usually. Guess either Greece treated you really well and you are fully recharged, or you just missed us that much :D I would like to think it's a bit of a/ and a bit of b/ :D
I like this side of you :D
 
hehe. I had back to back vacations lined up and there were a lot of home projects going on
so for the last month and a bit I was all over the place trying to get things done
 
did you achieve your goals ?
 
6:01 PM
I ate and drank everything
everything
 
cbg idjaw
 
DSM
I hope you left some food for the Greeks themselves to eat. They have nutritional needs too, y'know.
 
did you go visit the coast cities?
 
@DSM they told me not to come back. I accidentally the whole thing
@MooingRawr I was pretty much along the coast for all my visits. It was beautiful
 
nice nice, I read some things about allow tourist go on fishing boats to catch fish for their lunch, was that something u got to do ?
would you go back ? was it hot ?
 
DSM
6:15 PM
Now I have no rainstorms but blue skies and white puffy clouds and birds chirping. An unusual Monday!
 
I would definitely do that fishing thing, but I did not see that happening. I would absolutely love to go back and the weather was beautiful. It wasn't too hot.
still raining here
 
6:29 PM
Hope you have the high ground :D
TIL I was following the mnemonic OSASCOMP rule for adjectives ( opinion, size, age, shape, colour, origin, material, purpose ) without even knowing what it was....
 
doesn't sound very mnemonicky to me
Oct 4 '16 at 10:57, by Andras Deak
 
:D I found out while I was wiki page hopping around : en.wikipedia.org/wiki/Adjective#Order
 
7:29 PM
Has any of you in here ever made use of a linked list - in practical?
 
in practical? what does that mean ?
 
Like not for educational purposes, but because it actually was needed to solve your problem at your job, or whatever you were facing of an issue in the real world.
 
hard to answer. I would say "maybe?". Because you can justify using a linked list for practical examples depending on what you are trying to solve.
 
I would be surprise if there isn't a program that implemented a linked list somewhere.....
 
yeah was just typing out something like that
underneath "the hood" of whatever you are programming in, there will most likely be implementations of "data structure in question"
 
7:42 PM
:D Great minds think alike :D or was that Canadians think alike... sorry?
 
sorry yes. great minds.
 
sorry
 
no worries. sorry.
 
I was simply asking to get an idea of how frequently it was used. A lot of people claim that it rarely is used, I just wanted to see how often you guys used it.
 
Hi anyone familiar with sklearn?
 
7:52 PM
No, but I would like to :)
 
same here im just learning it atm
 
@n4zg if that's your question then maybe, if there's a follow up question regarding sklearn please read sopython.com/chatroom our room rules.
 
@MooingRawr sorry the problem i am having is removing a target column from a dataset
 
You might provide us with a little more details in able to us to help you.
What would you expect us to answer to that?
 
stackoverflow.com/q/44249451/2301450 too broad/dupe + upvoted NAA
 
8:00 PM
bleh
 
Hey! I'm using Flask.
I tried to deploy on Heroku
And I get this error:
`/app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/pip-install: line 5: /app/.heroku/
python/bin/pip: No such file or directory`
 
it looks like you don't have pip set up in that location?
I never used heroku. I assume there are preliminary configurations you have to set up to ensure you are looking in the right location for the "things" you need?
 
Yeah.
I have done the configurations.
 
8:21 PM
Sounds like a problem with your buildpack, not with Flask.
Are you using a custom one? What's in your .heroku folder?
 
DSM
8:47 PM
Another problem solved, I guess!
 
7 minutes till closing time :( Jays playing tonight, time to go home and watch the stro' show. Got any plans tonight ?
 
DSM
If only every game could be against the Mariners..
We're still within spitting distance of 500, which this year I'll take as a victory.
 
We took 2 away from Rangers.( even thought I think we somehow just have their numbers, and I'm scared to face the Yankees or anyone in our division :( )
We won't make the playoffs if we are a .500 - .600 team :(
 
DSM
Oh, that was pretty much ruled out by the 1-9 start.
Since the start of the Rays series at the end of April we're 17-10. If we continue playing the rest of the season at that rate we'll wind up with 94 wins! \o/ ;-)
 
9:03 PM
2006 St. Louis Cardinals won the Series with only 84(?) wins :D
I have faith in us, if we can stop sending our regulars to the DL that would be great :D
welp I do hope you and the rest of the room enjoy the rest of the day, have a nice one.
 
DSM
Blue-sky rhubarb for you.
 
rbrb
 
alright. Time to get home, see the family, put the kids to bed, and watch some hockey
go preds
rbrb
 
rbrb to you too
 
DSM
Well, if we're all going, my gym bag isn't getting any more packed..
Work-off-those-winter-pounds rhubarb for all!
 
 
1 hour later…
10:55 PM
Sup?
Can anyone explain to me what happened to NumPy's content in the transition to 3.x? Sometimes when solving online challenges I get a NumPy challenge which I can, and want to, solve with Python 3 and the lack of NumPy hinders me.
Aight, a simpler question which exemplifies what I'm talking about.
https://www.hackerrank.com/challenges/np-arrays
My try at solving this in Python 3 is the following
print(list(reversed(list(map(lambda x: "{0:.0f}{1}".format(float(x), "."), input().split())))))
This fails for obvious reasons: I'm priting a list of strings when it's supposed to be a list of floats.
How do I go about formatting floats to get the desired output? I can't find this online, I always end up on string formatting.
 
In pandas, do people typically mutate dataframes all the time, or is it done in a more functional style?
 
11:46 PM
@GitGud what do you mean by "lack of NumPy"? And why do you cream so much into one line of code?
 
@Code-Apprentice I mean this:
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
That's because it's the first time I saw a way of solving a challenge in one line.
 
00:00 - 17:0017:00 - 00:00

« first day (2417 days earlier)      last day (2538 days later) »