« first day (2624 days earlier)      last day (2318 days later) » 

12:13 AM
huh, I've never noticed that ylabel/set_ylabel in matplotlib return the text object of the label
 
@MartijnPieters, I see you are using dataclasses quite a lot; is it in replacement of subclassing namedtuple?
 
@Simon An application to capture software requirements, has to be offline. I quite like Django's Model classes so it'll be cool to use that or something similar.
 
Well I would have thought you could use django and at worst use some sockets or urllib.request as well
@nobism You mean something like determining the OS?
 
12:31 AM
determining the OS?
 
I'm not actually into Django (more towards Flask) so you are going to have to give me some info to work with.
 
That's alright, I'm not looking for a solid answer, I'm thinking Python might not be the right language to use for my intentions anyway...
 
Python is good on most things.
 
12:52 AM
What are your intentions @nobism
 
I need help on this - % matplotlib inline
i was copying some code and this line spits out an invalid syntax on my script.
i did some googling and it says it plots something in ipython. I am not using that though.
Just simple python3 with CMD. How do i replicate it
 
1:15 AM
you comment it out, or delete it @james
It is a jupyter notebook magic line incantation
that has no effect outside of the notebook. (and maybe the ipython console?)
 
1:35 AM
okay. what do i use if i want to plot a 3D graph though.
i think that line does that in jupyter.
@ReblochonMasque
 
@nobism not at all. You can run Django on a local machine use a browser to load pages from 127.0.0.1
 
no, that line does not do that - you search stackoverflow, and the answer pops up: stackoverflow.com/questions/2294588/…
 
Christmas cabbage
 
Rhubarb. Good luck with the Django @nobism
Cbg @Code-Apprentice
 
cabbage @Code-Apprentice
 
2:39 AM
@Simon Django is awesome : ) I'm reading Test Driven Development with Python, excellent book.
 
2:50 AM
this is probably one of the most asked questions. but i am rather new and am thinking where;s the best place to learn python for big data analytics?
is it even a good language for that? i heard it's slower than C++ etc
 
3:16 AM
Python has a large data science community
 
@Code-Apprentice any tips to get started? or resources or forums etc
 
3:31 AM
I started a udacity course a while back. They and udemy have great online courses for such things
 
4:19 AM
cbg
OK, I have a problem. I'm trying to install tensorflow on the new laptop, but running into issues. I installed Anaconda, but pip is not showing as a recognized command - is there something special I need to be doing?
 
DSM
That's very odd. What python version?
 
3.6
 
DSM
Then you should have pip 9.0.1 installed in the env. Do you see it in conda list?
And I can't remember, are you windows or linux?
 
win
how do i see the conda list?
 
DSM
conda list :-)
 
4:28 AM
well
conda is not a recognized command
im so confused
 
DSM
That sounds like you've installed Anaconda but didn't select the option to add it to your path. In your start menu, type "anaconda" and select "anaconda command prompt" or whatever.
 
@DSM You're a wizard.
 
 
3 hours later…
7:07 AM
The advent of Langton ants :)
 
8:06 AM
cbg
 
cbg
 
@piRSquared I've put a bounty on that question I showed you earlier... in case you're interested
You had some really good points, so you should totally flesh them out
 
ok, if I find the time (-:
 
8:23 AM
:F
 
I am new to stack, is this question relly qualify as duplicate:-stackoverflow.com/questions/47937941/…
 
welcome aboard @MukulSharma . In what ways do the linked answers not address your question? @MukulSharma?
 
complex made this much easier :P
 
@AnttiHaapala looks like we have a similar imagination
 
8:31 AM
"complex made this simple"
 
@rablochon well the linked answer sure satisfy the query, but question don't look "exact match" to me
I just wanted to answer that question
 
Is anyone here familiar with a fully convolutional network?
 
@MukulSharma when pinging, just type @ and use tab, people won't see your pings if you mistype the name :d
 
got it. Thanks :)
 
@AnttiHaapala I was already looking (-: my version: spoiler
 
8:34 AM
Rest assured, it is a perfect match @MukulSharma
 
@piRSquared ooh you used complex for that, clever :P
@piRSquared mind blown :D
beautiful :D
 
@AnttiHaapala yeah, even the diff between part 1 and 2 is complex parameter
And TY
 
damn this was cleverly crafted puzzle then
 
I look at @piRSquared, and wonder why I have Nodes classes & Enums... :D
 
I wonder how many others were similar but went way over my head
 
8:40 AM
@ReblochonMasque don't seem to get it, mark as duplicate look harsh to me, closing and mentioning in the comments looks fine to me. Is there a guide i can refer?
 
Running datetime.datetime.strptime("Thu, 21 Dec 2017 16:02:03 CET", "%a, %d %b %y %H:%M:%S %Z") Gives me a ValueError saying the format is invalid. What am I missing?
 
@cᴏʟᴅsᴘᴇᴇᴅ %y vs. %Y I think, or in other words "Year without century as a zero-padded decimal number." vs. "Year with century as a decimal number."
 
Don't overthink this @MukulSharma, your question was answered. You will find plenty of links here: sopython.com/wiki/Useful_Comments
 
@IljaEverilä Good catch. Fixed that, but .... hmm.... still getting the ValueError.
 
Yeah, something else as well...
 
8:46 AM
Timezone throws it for me
 
1
Q: Parse CEST/CET time in python

dangonfastI have these date strings: Fri Oct 7 16:00:09 CEST 2011 I want to convert them to UTC. I have tried with this implementation: def LocalToUtc(localtime): return datetime.strptime(localtime, "%a %m %d %H:%M:%S %Z %Y").isoformat() + 'Z' But I get a ValueError: ValueError: time data 'Fri ...

Interestingly enough EET works. Yay.
 
(lambda s, z: pd.to_datetime(s).tz_localize(z))(*"Thu, 21 Dec 2017 16:02:03 CET".rsplit(' ', 1))
@cᴏʟᴅsᴘᴇᴇᴅ
 
Yup, I was able to get it done with dateutil.parser.parse myself, but wanted to understand why this wasn't working. So it was the timezone after all.
 
cbg
 
thanks
 
closed
 
cabbage everyone!
 
re-cabbage
 
9:40 AM
@ReblochonMasque NamedTuple is always immutable, dataclasses are usually mutable.
But the two concepts do provide solutions for similar usecases.
 
Thank you @MartijnPieters. Outside of mutable/immutable, it is difficult to find example use cases that illustrate a clear distinction; have you got cases where a NamedTuple would be your clear cut choice, and other cases where it would be a dataclass?
 
9:57 AM
Langton ants reloaded :D
 
red was wrong... this is right
 
10:08 AM
@ReblochonMasque If you want something immutable and indexable, use a namedtuple.
Namedtuples also use __slots__ by default, dataclasses don't (yet).
The attrs project, which inspired datatables, does have slots support. The PEP hints at dataclasses gaining slots support in future.
 
@MartijnPieters I confess I haven't been following python-dev super closely lately - is the plan for dataclasses to use slots or not?
 
hmmm martijn has 19 hats already
 
ha, answered already :)
I got a secret hat, no idea where from
 
Last year I go all but one hat. This year, I opted out
 
10:13 AM
aha, thanks!
 
Hmm, I've got one answer at 91
I sooo want the great answer badge
 
GALAXY BRAIN
 
I'm concerned that there are too many useless pandas questions. Most of them poorly named or outright misleading, or have hyper specific problems whose solutions aren't likely to be of any use to anyone besides OP. If you google with a particular set of keywords looking for a particular solution, you almost always get junk results
 
@tzaman that would be universe brain
 
I wish pandas questions were as endangered as the species.
 
10:16 AM
What I said could be applied to just about any tag, but the thing about pandas questions are its answerers (including me) are more inclined to answer than than DV/VTC)
 
Oh, right
 
@tzaman As long as there is data, there will be pandas
Because pandas = PANel DAta
 
categorizing pandas topics is difficult and titling questions is a challenge. I'm incented to make a title succinct. But doing so with a pandas question almost always leaves the title useless.
On top of that, as i pointed out in my pivot post. there is are a ton of ways to ask the same question with varying degrees of specificity. It then becomes more difficult to generalize pandas answers.
On top of that, I believe the typical pandas asker has less developer experience as they are likely an aspiring data scientist and don't yet have a developer mindset
 
Your canonical QA, while really good, will be the kind of question that an asker with the same question reads with glossed eyes, and ends up asking another question just because they couldn't figure out how to adapt any of those techniques to their data.
 
@tzaman The PEP has deferred slots.
 
10:22 AM
So there could be 20 questions/answers that would solve their problem. But even if presented those same question/answers, they would be useless because the would be asker can't generalize.
^^^ yes.
 
In other words, pandas askers expect to be spoonfed, and that sort of mindset has come to be because the answerers promote the same thinking
 
@cᴏʟᴅsᴘᴇᴇᴅ agree totally
 
Day 22 solution committed, afk.
 
Well there are a # of answers who keep enabling them ... /hidesincorner
 
10:23 AM
Every time someone asks a pivot question, I CV with your Q&A and answer their question in the comments >.>
 
I appreciate that
 
Now, all we need are canonicals for resampling, aggregation, and graphing
ha
 
Every one of those probably requiring more effort than the pivot post
 
Hmm, pivot was a stellar effort. We need a couple more like that at least. It would be good to identify a few common patterns and address those, because answering the same, tired old questions is just... (and finding a dupe, when you know it exists is equally hard just because of the bad titles)
 
Thank you @MartijnPieters, very useful. I actually had not realized that dataclasses are in python 3.7; that explains the lack of depth in explanations and examples to be found. I appreciate your time helping me. :)
 
10:31 AM
^^ mind numbing?
 
Yes. You don't learn anything. It's not interesting or fun.
 
One of the things I like about answering is providing a new look at problem. Mostly because that is what entertains me
 
Last night, I found something called pd.DataFrame.squeeze, and wrote about it in an answer.
 
did you know there is a squeeze parameter for pd.read_csv?
as well as np.squeeze
 
yes, never thought it was useful until this question was asked
np.squeeze, ravel and flatten are common functions I've used before
(all do the same thing, so why are there so many?)
 
10:36 AM
good question
 
Actually, squeeze is different from the other two, my bad
 
right. but I never understood ravel flatten
 
@cᴏʟᴅsᴘᴇᴇᴅ flatten and ravel have a distinction, iirc. The other will always create a copy, other can produce views.
 
I guess one day someone got sick of typing flatten
@IljaEverilä ohh, really. That is good to know
 
And it's flatten which will always produce copies.
 
10:38 AM
ravel copies if needed
nice
 
@ReblochonMasque look for attrs examples instead :-)
 
rbrb all
 
11:06 AM
Will do @MartijnPieters, thank you.
rbrb @piRSquared
 
 
2 hours later…
12:39 PM
Pet peeve of the day: When people use the word "logic" to describe their methodology
 
@cᴏʟᴅsᴘᴇᴇᴅ How do you feel about "deprecated" vs. "depreciated"? :P
 
@IljaEverilä Almost as bad as "Thanks in advantage" :P
 
wim
@piRSquared I don't think good to use j as a free variable if dealing with complex literals
Maybe y,x or row,col better
 
12:59 PM
@IljaEverilä decapitated
 
@poke From now on I shall decapitate old attributes etc.
 
I think that’s the only way forward.
 
Another pet peeve: Being called sir/bro (meaning people either 1) think I'm some old guy, or 2) are assuming my gender)
I'm not old, okay!
 
Dear Sir-bro...
 
Or uncle, but thankfully no one's gone that far yet.
 
1:43 PM
I'm glad that today's AoC problem doesn't require you to know of the existence of view spoiler in order to get an answer in a reasonable amount of time
In fact it's not useful at all for part 2
 
I was wondering if part 2 will also cycle at some point
 
My unfounded guess is "yes"
 
AoC 22.3: Construct a starting pattern that causes the Evolved Virus to cycle in within less than 100000 bursts.
 
The two-state version becomes periodic at 10k iterations or so. For all we know, it takes (10k)^2 cycles for the four-state version to become periodic
"we" here meaning "the people that haven't bothered running for a million iterations and seeing", a set of which I am a member
 
I ran it for some 10 minutes or so, no cycles yet
 
1:58 PM
Does it look like the virus is staying in the same general area, at least? Or does the bounding box of affected cells occasionally grow.
 
very centric
 
I consider it cycle-ish if it never leaves some finite area of effect, even if there are a googol of possible states that area can have
 
it seems like it gets easily trapped in areas where it already was in, and going into fully uninfected regions sends it back to where it came from pretty fast
That would also be a nice plot, "distance from starting point over time"
 
Hmm, could be unbounded, but very slow, a la the painter algorithm
"Wander randomly through infected space for N rounds, where N is appx the size of the space, then infect 10 cells, then go back to wandering"
 
Oh man, I would really like to know how I could trigger cycles, but I need to get presents.
Stressed rbrb!
 
2:21 PM
@cᴏʟᴅsᴘᴇᴇᴅ Okay son
 
I like California's approach, where "bro" can refer to any person and also a wide range of inanimate objects.
[Car doesn't start]. "Really, bro?"
 
It would be cool if there was an answer for "why does 0.1*3 give 0.30000000000000004?" that went into absolutely exhaustive detail, describing the complete structure of ISO-compliant floats, the exact bit-level mathematics involved in adding/multiplying them, and an exploration of various languages' algorithms for cutting off decimal places when displaying them
The last time I tried exploring the topic at a greater depth than "what numbers can be exactly represented as floats?", I ended up completely unable to find relevant information that wasn't behind a paywall. I guess you have to pony up standards viewing fees to ISO if you want to know how to add.
 
Why would you need anything ISO for that?
You know how the number is encoded, that’s all you need to be able to explain it
 
Or whatever three letter acronym standards body is the one that defines how common data types work.
 
(-1)^s * 1.m * 2^e
 
I don't think I can derive float multiplication rules from first principles. If for no other reason than I recall that there's some obscure step where half of the time it rounds up, and half the time it rounds down, to prevent bias in some common corner case. I don't know which half of the time which rounding occurs, so I can't get the exact same bytes that a compliant floating point arithmetic unit would give
 
3:13 PM
Oh, so you mean what the CPU does when it encounters the float multiplication?
 
Yeah.
 
That’s probably written down in some Intel x86 specification
 
I couldn't find it within three googles last time, so I gave up.
 
Always great to see an OP reverse the initial question impact by adding something close enough to an MCVE that we can help em.
(stackoverflow.com/questions/47943416/… is not the best such example, but still nice to see someone not shout at the community for the voting they got initially).
 
IEEE Standard for Floating Point Arithmetic is what I seek, available for only $97.00
Possibly "What Every Computer Scientist Should Know About Floating-Point Arithmetic" contains the same information, although a quick skim doesn't reveal exactly what I'm looking for wrapped with a neat little bow
 
Ah, nice, thanks :-)
 
That might be a start but I also didn’t really find good stuff
 
> V. ADDITION AND SUBTRACRION ALGORITHM
Hmm, probably not a document that spent six months under committee review, I gather
 
> # TODO: Fix this entire block of ugly code so it doesn't make me sad inside to look at
the perils of wanting to get this out before the weekend
 
4:00 PM
rb folks
 
4:25 PM
cabbage
suck a long day, I could only AoC in the late afternoon :(
@MartijnPieters is that what I think it is?
Huh, I was surprised that my mpl answer got such attention after a day of crickets. Thanks @cᴏʟᴅsᴘᴇᴇᴅ for the bounty :P
 
I wager 5 quatloos that it's a 22.2 visualization
 
looks like it
using straightforward labels and the good old new viridis colormap
 
Looks a bit like dog barf
 
it looks a lot like the fake barf from Day of the Tentacle (bottom row middle)
@cᴏʟᴅsᴘᴇᴇᴅ np.squeeze squeezes out singleton dimensions, ravel gives you a 1d view (always 1d!), and np.flatten doesn't exist :P
In [140]: np.squeeze(np.random.rand(2,1,3)).shape
Out[140]: (2, 3)

In [141]: np.ravel(np.random.rand(2,1,3)).shape
Out[141]: (6,)
 
I wish I enjoyed point-n-click adventures. Monkey Island and Grim Fandango together were enough to show me the genre isn't for me
 
4:38 PM
nevermind, you've alrady discussed these
@Kevin what matters is that there are things you enjoy :)
I'm primarily a point-and-click fan
 
5:13 PM
Good point! I'll clean it up.
Btw I thought I replied to this via mobile but I don't see it. So I might be replying again.
@wim
 
sqlalchemy documentation recommends that one should add relationship() directive to the parent table. Just for testing purpose I added relationship() directive to the child class and it appears to be working fine. Am i missing something ?
 
Last-Day-Of-Work-CBG!
 
@Simon cabbage
 
Is there anyone who know the answer this question?
 
The pool of available experts is pretty shallow on the last business day before Christmas
 
5:22 PM
@Cody Which? I have a suspicion it's Numpy in which case I don't know.
 
Presumably he's referring to his previous message, ending with "Am i missing something ?"
 
@wim now with better variable names spoiler
 
@Kevin @Simon Yes
@Simon It related to numpy just sqlalchemy
 
anyone here familiar with neural networks?
 
@Cody Ok I'll be reading but probably not saying anything!!!
 
5:27 PM
why is that ?
 
Because he doesn't know the answer, presumably
 
Quite correct. I'm not going to bother everyone with useless guesses. ;)
 
DSM
Morning cabbage for all.
 
cbg
 
@DSM Cabbage!
 
5:38 PM
cbg
 
Is there a cheater library to animate a bunch of arrays?
 
matplotlib.animate
 
that sounds like it might have promise
(-: thx
 
check out Martijn's repo for yesterday
 
5:47 PM
see also his starred tweet ->
 
I use PIL and ImageMagick for such things
 
for yesterday's result I'd use that too
you missed that, Kevin, but I only barely missed a wild goose chase (saved thanks to DSM)
I thought that matplotlib would weirdly change the plot under certain circumstances; turns out that the fractal-like fine detail in the 2k*2k image led to weird artifacts with insufficient resolution
 
I got the wrong answer for 21.1 for a while because I thought if the input was rotated and/or flipped, the output would be rotated and/or flipped too
 
24 hours ago, by DSM
@AndrasDeak: I only see things like this.
DSM's figure ^
if you plot that with mpl you see weird artifacts
24 hours ago, by Andras Deak
PIL is magic!
the moral of the story for me ^
oh damn you were right here
why did I think that you missed it?
 
I'm like a ghost. You only see me if I want you to see me.
 
5:52 PM
...who said that?
 
You thought it was the wind, but it was me, Dio Kevin
 
DSM
Memes learned today += 1
 
6:10 PM
huh, never heard of the generic problem for today
 
Or 2 or 3, depending on how you count it. There are a number of variations on the "it was me" meme. Dio is used for general bamboozlement. There's also "you thought it would be a cute girl, but it was just me, <fictional female character with low self-esteem>". And there's "IT WAS ME, BARRY!" which is used to indicate that something that by all rights appears to be an unfortunate coincidence, is actually caused by a powerful enemy of yours who can invisibly influence past events.
Ex: "Do you remember when you tripped on a rubber duck and cut your hand? IT WAS ME, BARRY! I WAS THAT DUCK!"
 
I'm pretty sure there's an explicit bamboozled doggo submeme
 
can't wait to see your acknowledgements section
 
Special thanks to DSM and Andras Deak for their unfailing support during the long process of making that chat room message
© Kevin Kevinson 2017 All rights reserved
 
6:20 PM
\o/
have I expressed my annoyance with the fact that Kids These Days call every image macro a "meme", oblivious of the original meaning?
 
There's a certain poetry to the term mutating and becoming widespread
 
the word becoming somewhat self-referential barely reduces my annoyance :)
 
I'm putting all my linguistic energy into getting "literally" back to its original meaning. Meme is on the backburner until then.
 
6:42 PM
You can meme "literally" to shame people into using it correctly. Like:...

"Your breath is like a summer breeze. 'Literally'"
 
I'm going to give away free iPads on literal_means_taking_words_in_their_usual_or_most_basic_sense_without_metaphor_‌​or_allegory.com
You have to type out the entire url by hand to get one though
And you have to get it right on your first try
 
Water is to Ice as Lava is to Rock... Literally.
 
you can golf down the last part of the url, metaph_or_allegory
 
@AndrasDeak Consider it my olive branch to you ;-)
 
7:02 PM
I can't be bribed :P
 
I can!
Yes I just managed to edit that.
 
Please send all bitcoin bribes to Kevin at yahoo dot webzone.
 
your bribes are getting cheaper
 
Or AOL Keyword "moneyplzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz". That's 30 z's.
 
Tomato! I'm not getting a free iPad.
@AndrasDeak you can be bribed. It just might not elicit the desired response.
 
7:12 PM
or: "I can be bribed, but my price is way out of your league" :D
 
(-:
 
At a certain price point it becomes more cost effective to replace Andras with a replicant that has whatever opinions you desire
My bribe point is one dollar cheaper than that
 
@AndrasDeak Or: "I bribable but I want so much it's not worth it".
 
One bounty has gone to his head
:p
 
^ that made me laugh
 
7:17 PM
Me too.
 
7:54 PM
last advent of code is a langton ant isn't it ?
 
So it seems. I didn't know what that was until... chat.stackoverflow.com/transcript/message/40551144#40551144
 
DSM
@cᴏʟᴅsᴘᴇᴇᴅ: all your sum answer did was remove an unnecessary tuple call and make the result a list instead of a tuple, no? Your opening line "Here's a suggestion - create an iterator out of d." is what the OP is already doing.
 
8:13 PM
that's exactly what it looks like
that's a pretty appropriate question
 
DSM
I'd probably do [sum(islice(itd,x)) for x in sz] or something but that's because I like itertools so much. :-)
 
and I was thinking of using accumulate here...
I'm pretty sure OP's genexp+iter approach is pythonic enough
 
DSM
Like coldspeed I'd drop the inner tuple, but apart from that it seems fine. To quote myself quoting myself:
Aug 2 at 15:01, by DSM
Sep 30 '14 at 19:39, by DSM
@Zero: I use "The Pythonicness that needs hours of thought is not the true Pythonicness" sometimes when people are working hard to make their perfectly functional code more Pythonic instead of doing something useful.
 
@DSM well, yeah :)
 
Hey guys, can someone help me with keras lstm input shape?
 
9:14 PM
I'm so behind on AoC.
Got "answer is too low" for Day 18 Part 2, fixed a bug, the answer's even lower. :-|
 
9:26 PM
that's better than mine was
Dec 18 at 12:20, by Andras Deak
soooo many infinite loops :'(
 
10:17 PM
cbg
 
cbg
 
what should I do to properly "bump" my old question without any answers/comments? I think asking it again isn't good choice...
 
definitely not; you can edit it to bump it if it had too few views, or post a bounty on it
you can also post it first here to see if anyone can help with it
 
0
Q: pygame.mixer.music.play() doesn't recognize Fast Tracker (.xm music format) repeat position

MaxLunarThe problem is: I try to play Fast Tracker module in infinite loop, but doing so just replay music from start, instead of following repeat position. Example: (here's the source for module https://api.modarchive.org/downloads.php?moduleid=153915#zeta_force_level_2.xm) import pygame pygame....

 
10:37 PM
Oh, I already bumped that when you posted it here two weeks ago
48 views in more than a month...that's not very good visibility :/
@MaxLunar you've done all you could and waited patiently, and I can't find anything even remotely similar. Your post keeps coming up in searches. So I posted a bounty on it; if anyone knows what to do, hopefully they'll see it and step up :)
 
Thank you.
 
let's hope for the best
 
10:54 PM
btw, what is the best solution to update the variable contents from file? On script startup I load my config file and read its contents, but also this config can be edited in runtime, so I should keep it up to date. I was thinking about setting a thread or process to reread file with time interval, but maybe theres a better way?
 
11:18 PM
@davidism triple check your opcode implementations. I misread the jgz specs.
It takes a value, not a register.
 
I also missed that for part 2 you actually need to store the value received :|
 
11:41 PM
my laptop just froze after getting 500% system CPU load :|
I have no idea what it was...kernel log got stuck in buffer
 
We are about to lose AndrasDeak Any second now...
He will be seen flying through the sky holding on to his laptop..
 

« first day (2624 days earlier)      last day (2318 days later) »