« first day (2794 days earlier)      last day (2170 days later) » 

12:16 AM
cool
but this is the python room, not react
 
12:28 AM
@coldspeed New profile photo? I preferred the rabbit Sherlock :)
 
@Ajax1234 Lol, that was a cat, not a rabbit :P
 
@coldspeed Ah my bad, I must not have looked close enough :)
 
@Ajax1234 thanks for taking my advice though, looking good there
 
@coldspeed Thanks!
 
 
3 hours later…
3:22 AM
@coldspeed Done. It's annoying enough that he answers blatant dupes, but he can't even be bothered to add the generic tag. :(
 
thanks man. I don't want to be the one to tell him because he's intolerant to feedback.
 
Yeah, I've noticed. But I guess I better stop whinging about him...
 
3:50 AM
0/
 
And just like that, the Saturday is gone
 
oh?
 
What did I do over the weekend? Oh yeah, nothing productive, that's right...
 
nothing productive or nothing productivec towards you? xD
 
unless you count reading manga as "being productive" towards myself, then no
 
3:52 AM
Lol
I finally got that report done
now to procrastinate over the trivial thing due tonight..
 
what is due on a saturday night?
 
sunday. And my class got a global extension on our Enterprise Software Architure final assignment to give people time to work on our thesis reports (which were due 2 days ago)
 
cool
 
yeah
I had already done most of it by the time I saw the announcement xD
now I just need to like, update a diagram and accompanying diagram-explanation from assignment 1 to reflect the new architecture.
And write readmes for executing/configuration the applications.
It's tedious xD
dear god where does windows put the launcher for Visio..
 
that's why you don't use windows man
 
4:04 AM
I'm trying to see if i can do it with WINE atm xD
my old one was done in visio so y'know
also like
all drawing tools agner me unbearably xD
uh
I think wine broke my keyboard shortcuts
And all my terminals. God damn it WINE
or maybe that was because vs code was out of date. xD
 
4:23 AM
man it's dead on weekends huh
 
indeed...
 
:\
 
tensorflow is the next fgitw gold mine paradise... I'm calling it now
 
eh? how so?
Ugh I think I'm going to have to switch to Windows to get this done :c
 
4:38 AM
lots of questions but not many to answer. Too many VLQs.
 
Ahhh
 
cbg
 
Monkey-patching: because if you're going to violate the Open-Closed Principle, you may as well do it at runtime.
5
 
@AaronHall xD
@user3483203 @SeanFrancisN.Ballais 0/
 
4:52 AM
Why isn't it donkeypatching?
 
Ugh I don't wanna do my assignments send help
 
I was going to put that in an answer, but I decided against it on the grounds that it's not precisely correct - if it extends instead of modifies...
 
Also it's only really applicable if oop was the goal.
 
5:54 AM
I've just been exploring the BeeWare site. It looks intriguing, with its cross-platform GUI stuff, and its Python bytecode to Java bytecode transpiler.
 
 
1 hour later…
7:10 AM
cbg
 
 
2 hours later…
8:48 AM
cbg
 
9:42 AM
pep8 says nothing about naming decorators. Should they use snake or camel case?
 
9:52 AM
They are functions. Does it say anything about functions?
I'd use snake but I hate camel
 
They don't have to be functions
 
But they are first and foremost callables, are they not? Or name each as what it is?
ClassyDecorator, funny_decorator...
 
Actually, I can't think of a good reason to implement a decorator as a class
 
Premature naming contemplation is the root of every other evil ;)
It could be useful for a decorator lib using a base decorator perhaps
 
I thought the decorator I was implementing would end up being a class, but then I realized it doesn't work as a decorator and has to be a metaclass instead
 
9:58 AM
Though I suspect anything done as inheritance could be done via function calls
 
@AndrasDeak That's a good reason to use classes. Bottom line: decorators get no special treatment, I guess.
 
That sounds sane
 
Good. With this, the biggest hurdle in this refactoring process has been cleared.
 
Hehe
Rationale: naming is based on type, not semantics
 
10:21 AM
>>> property
<class 'property'>
>>> partial
<class 'functools.partial'>
^ :(
 
:P
Pseudotype?
 
I wonder how the community would react to the stdlib being pep8-ified
List, Int, Str, ...
 
They wouldn't upgrade to python 4 ;)
isn't pep8 lenient with capitalization? It would suffice to have ordereddict, counter, etc.
 
Not sure. I have to admit, I've never read the whole thing
 
I think the bottom line is "be consistent with an existing codebase"
Been a while since I read it
> Class names should normally use the CapWords convention.

The naming convention for functions may be used instead in cases where the interface is documented and used primarily as a callable.
Decorators ^
 
10:34 AM
good find
 
> The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent -- nevertheless, here are the currently recommended naming standards. New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred.
 
so in the end, semantics do matter
 
Yup
 
Has Anyone read Code by Charles Petzold?
 
11:32 AM
No, but I have "Windows Programming - 5th Edition" of him laying around...
 
11:46 AM
Sweet
 
 
3 hours later…
2:53 PM
weekend cabbage
 
3:06 PM
@Code-Apprentice cbg
 
3:38 PM
@Simon cbg
 
Fancy a game of chess?
 
yah, I just saw your challenge. I'll accept in a minute
 
Ok sure.
 
 
1 hour later…
4:45 PM
I have a column of a dataframe with dates in the format "14 Dec 2017". I tried to get pandas to parse them with df['date'] = pd.to_datetime(df['Date processed'], format = '%d %m %Y')
but it gives me: ValueError: time data '11 Dec 2017' does not match format '%d %m %Y' (match)
what should I have done?
aha.. %b apparently
who knew :)
 
5:02 PM
the datetime docs, probably ;)
 
5:36 PM
Interesting. For those on Windows pip install gtk3 will return Could not find a version that satisfies the requirement gtk3 (from versions: ) No matching distribution found for gtk3. I've fixed reinstalled my MSYS2 installation and installed Python alongside it. It shows as a 3.6.5 installation but I can run a PyGTK3 project in it no problem (PyGTK3 stopped at Python 3.6)
* Stopped at Python 3.4 (not 3.6)
 
6:55 PM
Stuff like this really confuses me about Python. In a previous conversation I was slammed for using [some_array].sum() instead of np.sum([some_array])`because it's less clear and speed shouldn't be a consideration.
 
Sounds like whoever said that was trying to serve their own agenda
and, cabbage
 
yeah. arr.sum() is fine as you're sure you have an array
 
cbg
 
the latter might be appropriate when you can have an array-like
 
And it was Abarnert. You were in the convo, Andras :)
And I have a lot of respect for Abarnert
 
6:57 PM
I'll take your word for it
respectable people can be wrong too :P
 
I just don;t know where the bar is set :)
 
I'll try to find that conversation later
 
signs a cross oh was it abarnert? ... well I still disagree but if it's abarnert then he must have a good reason for saying so
 
He and I had a heated debate. I stopped to "unrustle my jimmies" and you said he had the patience of a saint
 
I remember: you consistently misunderstood his point
he said performance is marginal, and:
Apr 16 at 21:44, by abarnert
I don't know how else to explain this after three attempts, so I'll just copy and paste it from the first time, and you can tell me what's not clear about it: "putting np.prod at the start highlights the prod part, while wrapping it in parens and putting .prod on the end highlights the expression. Whichever one you want people to notice, write that." (And again, remember that 90% of the time, the expression isn't complicated enough for the question to come up. Which clearly includes A.)
 
7:03 PM
That's fine, but I've just linked to a question where enumerate() apparently isn't adequate and Martijn has posted an answer
 
he completely didn't say that arr.sum() is worse than np.sum(arr)
@roganjosh oh yeah, I also failed to see the relevance of the link :P But we're watching tv so I can't focus anyway
 
wow, chatting on SO when you're spending quality time with your wife... tsk tsk :p
 
^ seconded :P
 
sure whatever :P
 
7:12 PM
@AndrasDeak @roganjosh I can confirm that (I spent an afternoon trying to figure it out before discovering he was wrong :| )
 
Who and what was wrong?
 
frankly if it's you vs him I'm sure he's right :P
 
If you'te talking about abarnert then he's almost certainly right in his assertions, but I don't see eye-to-eye with him re: numpy. I know which is faster.
 
@AndrasDeak So true, but I had a second opinion as well :p
 
7:35 PM
@roganjosh there's a huge difference between the linked question and the older chat: in np.sum vs arr.sum the difference is marginal and O(1), but in case of looping efficiently the differences are O(n)
 
Indeed the only time ufuncs are truly faster than the unbound function is with numpy's sort function. The ufunc sorts inplace instead of creating a copy, and is much faster.
Rest of the time the delta is "seriously, don't worry about it" kinda small
 
@AndrasDeak the question I linked is not related to numpy, but it's marginal gains at the loss of readability. The question has a super simple answer. But looking back over the past convo I had, I might have misinterpreted that.
 
10x speed differences aren't marginal
 
I don't get why it has multiple upvotes and comparatively complicated answers
 
on that I concur
it's one possible grain of sand that led to a pearl
it's a very low-quality question
 
7:54 PM
@coldspeed that might be true if I wasn't working with problems that required an iterative approach that needs the sum 50K times. For my purposes, it's completely reasonable to have it in Python but I can shave off thumb-twiddling time
 
calling np.sum 50k times is your problem :P
 
It's a cost function in heuristics
 
Also having a good reason for optimization is fine. Discussing in generalities will give you a genaral answer. In general the choice doesn't matter
 
Then maybe that was my mistake
I want to push it into Cython but the work anti-virus has decided to just block all of that :)
 
My journey to 20k isn't going as planned
 
8:03 PM
you only passed me a few weeks ago, you'll be there soon enough
 
On the plus side, at least I'm consistent :D
 
no you're not :P
Apr 29 at 14:15, by Aran-Fey
I've also reverted to my old "I don't wanna answer anything" state immediately after I got the badge
yet you do :D
 
True. Every now and then I manage to overcome my weakness
 
yyyyyyyyyyyeah stackoverflow.com/users/1222951/… :PPPPPP
Not that I hold it against you
 
It might look like I answer a lot, but you have to take into account how many questions I look at without answering :p
 
8:11 PM
I don't ;)
meet you halfway and consider answerable questions you see
 
Hmmm. If I'm convinced that a question has been asked before but I can't find a dupe, is it "answerable"?
 
answer rate is not an indicator of being a cancerous contributor
 
@Aran-Fey yup, I'm feeling generous :D
 
if anything I'm so proud Rawing has a badge and the motivation to keep answering
 
@coldspeed I don't think "cancerous" is an appropriate adjective for people in most contexts
 
8:14 PM
for lack of better term,
 
Ok, I admit there aren't all too many answerable questions
(btw my usual strategy for dealing with "I'm sure this has been asked before" question is to leave it alone and hope someone with better google-fu comes along, which is probably not the best way to handle those situations)
 
anyway just because I usually don't like to answer questions doesn't mean others shouldn't either
@Aran-Fey I don't think that's a bad strategy. Just don't look back later to see all the redundant answers :)
 
sometimes I look for the duplicate but can't find it and end up giving up, even though I know it's a duplicate of something.
 
On mobile I very rarely start looking for dupes, so when I idly browse the front page and find an obvious one, I just close it and shake my head
 
@IljaEverilä is nearing mjölnir
 
8:22 PM
browsing on mobile? Count me out...
 
I sometimes do that when I'm bored enough. A lot of stuff are trivial enough that I wouldn't answer anyway, in which case I leave a comment
 
@AnttiHaapala only 16 upvotes to go :o
 
ssssh, just let it happen
 
well 15 or even less :P
 
@AnttiHaapala or odd
 
8:23 PM
no vote mongering plez ;p
 
Ilja's problem is that he's been deduping lots of content and answering the odd one there, mostly getting 0 upvote and the accept... :D
 
He still posts a decent amount of answers, he'll get there really soon regardless
 
512 python answers and not even 1000 score
 
lol
He's doing better than me :P
 
@IljaEverilä I think I've solved your problem: you've got 24 sqlalchemy question answers without python tag :D
 
8:27 PM
scratch that, his is worse
 
I just retag these and he'll have gold tomorrow :D
 
Don't drink and math. Then again I haven't even drunk.
 
@AnttiHaapala I meant to lurk the python tag for answerable content this weekend, but ended up fixing stuff around the house.
 
@IljaEverilä I am pretty sure this tagging gives you more than enough
 
17 points
 
8:32 PM
The bad thing about weekends is that there's a lot of garbage. The good thing is that there's not much competition.
 
just don't flood the front page with the edits
 
@AndrasDeak hmm :D
good point, better to have a break :D
 
8:45 PM
@IljaEverilä Score 3,541 Posts 997
@AndrasDeak you've got better post/score ratio than Ilja even without your scipy interpolation answer
 
yes, hence my "scratch that"
I suspect numpy pulls it up and matplotlib pushes it down, but I'm too lazy to do an actual analysis
 
you've got 11 numpy answers without
 
huh, neat, thanks, I'll look into those one day
I'm not getting a gold badge anytime soon (and I have a lack of motivation to look for dupes to go with it)
 
user8177336
cbg guys. so im tryna learn here. Why do a lot of python developers complain about not being able to look at the dependenies of a pip package without installing it? What use does checking dependencies before installing the package have?
 
8:51 PM
@BOi well, traditionally it is the setup.py that tells what the dependencies are
 
Hello
 
in call to the setup function.
@BOi the problem ofc is that setup.py is runnable code and it can do anything, such as
setup(
     install_requires=random.sample(['django', 'flask', 'pyramid', 'bottle'], 2)
)
 
hello, thicc @BOi
 
so you cannot know before you run the setup.py...
 
But why would you want to know?
 
8:54 PM
you cannot do any dependency analysis without a) unzipping/untar-feathering and running the setup.py...
 
user8177336
@Aran-Fey yes thats exactly what i was wondering
 
.. and that's what you should do if you're installing package A and package B and A requires C >= 1.0 and B requires C <= 2.0...
you could install C == 2.0 and satisfy both, but, you cannot deduce it before you've run about 200 setup.py's that you've got a problem here :D
so what we've got is "flexibility" that no one really wants.
 
user8177336
@AnttiHaapala oh i see. makes sense. thanks. What would you think of a database that would store all the dependencies that each pip package ever created needs and you can communicate with the database and figure out which dependencies each package needs before hand to avoid running into this issue? Sorry if i sound stupid
 
I think that's what that refers to
 
well, for one, to realize that the dependencies must not come from setup.py
 
8:58 PM
i.e. it's not doable in a general case
 
anyone read any good manga lately?
 
never read manga.
 
@coldspeed oh yeah I was going to say: reading on the weekend is far from not doing anything constructive. Reading is great!
 
user8177336
@AnttiHaapala yes i understand. But what if someone could just brute force through each pip package and run the setup.py file for all of them and store it in a database and then keep updating the database each time there's any new release for a package?
 
@BOi you didn't understand...
 
user8177336
9:00 PM
@AnttiHaapala oh sorry
 
user8177336
im kinda new to this stuff
 
the point is that the setup.py is a program, and you cannot ever find out what a program will output in general case...
it is simple if it just calls setup() with fixed arguments
but not all do that, they've got thigns like "if this is macosx then I want this library instead, and on Python 2.6 let's install this, and if this then that, and..."
 
user8177336
oh i see. so it does different things depending on the circumstances of how and where its being installed?
 
If you want a good bad example, look at numpy.
 
yes... and in general this class of problems is called Entscheidungsproblem
 
so there is no piece code that can figure out how the other code will run on every case...
you can always get only so and so good...
@AndrasDeak though numpy doesn't have install_requires :)
 
I don't know what it has, only that these parts are usually pretty convoluted
 
IMO it is very fine to have code that builds the project...
 
user8177336
oh. i realize how dumb my idea of a "database" was. haha. so are there absolutely no work arounds to this since there is no general case?
 
@BOi on the contrary, the database would be smart, but it cannot be ever generated from setup.py
the fix is to stop describing install_requires etc in setup.py
it will mean that some flexibility is lost though.
 
user8177336
9:08 PM
@AnttiHaapala so if you stop describing install_requires, how does the system know which dependencies to get?
 
@AndrasDeak even if it's manga? :D
 
supposedly there is some alternate mechanism
 
user8177336
@AnttiHaapala do you know more about it?
 
@coldspeed as long as it has a reasonable amount of text it counts as literature for me
 
@BOi there have been some alternate formats proposed.
 
9:17 PM
indeed. I've been following My Hero Academia, and the translations are fantastic
usually mainstream manga has good teams working on the TLs
I also read a lot of niche stuff like shoujo and one shots which are translated pretty poorly...
 
user8177336
@AnttiHaapala so until those formats are approved and used widely this "database" will not be possible?
 
@BOi exactly.
 
user8177336
Aww..man! I was thinking there would be a way to solve this problem. Anyway, thanks a lot @AnttiHaapala for the help in making me understand this and forgive me if i sounded stupid.
 
user8177336
cbg @coldspeed i just noticed you called me thicc. You're not wrong lol
 
9:36 PM
@coldspeed especially if it's manga. How else would you learn japanese?
 
@Aran-Fey To learn japanese from manga, I would need to know japanese so I can read it. But to read it, I need to learn from the manga. But to learn from the manga, I need to be able to read, but to...
 
user8177336
one more question before im out. so ever since i've been on SO, ive always asked good questions except for just once in the beginning. But for some reason now, I cant ask any more questions. Anyone have a clue why?
 
You just gotta read the translation notes, those explain a lot about japanese phrases and culture in general
 
If a character says "amazing", I internalise it as "sugoi!" etc, but that's about it. --- um this is totally irrelevant to what you just said
I once watched some episode of an anime (forget which, maybe little witch academia) Raw and understood ~40% of what was going on... in fact
 
hahahaha I didn't understand 40% of Witch Academia even though I watched it in english xD
 
user8177336
9:51 PM
alright. thanks everyone. have a great day.
 
10:50 PM
Hi guys. Anyone interested in freelancing & has worked with Django? Need to add GDPL popup in Django web project.
 
11:04 PM
Strange I have just got a comment, but the post has been deleted stackoverflow.com/posts/comments/88583891?noredirect=1
 
Thank you very much. :)
 
we should tell OP that there's no i in team
 
Wanting to "know the meaning to that line" suggests the code works. How is that line valid syntax? y == iteam would result in True (for example 'waffles'[True:]) and the comma stops the slice.
 
11:22 PM
@Simon iteam is an element of self.labels, so it can be anything. It will either become a bool or an array of bools, in which case it more or less makes sense as an array index. It truly only makes sense if every item of self.labels is a 1d array with the same number of elements as X.shape[0]. And of course if y and iteam are of different length, you'll get an error.
waffles[True, :] wouldn't be a broken slice; it would be a 2d array slice in numpy
No, it's probably like this: iteam is a scalar, but y is a 1d array with the same size as X.shape[0]. So y==iteam is a 1d boolean mask which indexes into the first dimension of X.
 

« first day (2794 days earlier)      last day (2170 days later) »