« first day (2848 days earlier)      last day (2083 days later) » 

 
1 hour later…
6:33 AM
Cabbage
 
sometimes I think people close their eyes before clicking the vote button
 
@coldspeed: i did not ;)
kind of depressing though that list comprehensions still outperform the built-in stuff
 
Thanks! I was referring to this question, actually. But yeah I suppose that would apply to the question I just answered too.
(Read the comments, not for the faint of heart)
 
I just wish that people wouldn't upvote incorrect answers. I guess some people are more inclined to upvote a simple looking answer that they can understand than a more complex one. OTOH, inscrutable one-liners win upvotes too.
@Cleb Can you give me an example of that?
 
the gif you link to summarizes it very well
there are other cases too. give me a minute (ot two ;) )
 
6:43 AM
"If possible some regex characters:" was shamelessly lifted from my answer. Come to think of it, that happens a lot. Lifts something that was in my answer and calls attention to it when I don't
 
@Cleb Oh, ok. I thought you meant a plain Python built-in, not a Pandas function / method.
 
Hey, How is Everyone!
Can someone share the important libraries for Data Science, I have been with Numpy and Pandas
Matplotlib is under learning and practice but i wanted to know where to follow from here
 
Did you google "python data science tools"?
 
@Cleb I don't use Pandas, but I do know a bit of Numpy. So it is surprising / disappointing that a Python loop works faster than getting Pandas to do the looping for you.
 
6:56 AM
Fully agree
Iirc, piRSquared has quite a few answers where he uses numpy to manipulate the data and then updates the dataframe agin
has anyone here used apache arrow? if so, what impression did you get?
 
7:17 AM
cbg morning
 
7:29 AM
Yes
But i am confused about the fact of Machine Learning as Every site has a different name, some forward for Tensorflow others for scikit @coldspeed
@Cleb https://github.com/smfai200/Python-for-Data-Science-and-Machine-Learning-Bootcamp/tree/master/Python-for-Data-Analysis/NumPy
This is a full overview Notebook of Numpy, May be Helpful!
 
 
1 hour later…
8:38 AM
cbg
@PM2Ring it was coldspeed that blew that one apart for me too. To my knowledge he's the only one telling us that the string library is poop, and the timeit backs it up. I had also assumed that I was using methods that were faster than python loops until I spotted it in one of his answers.
 
@SyedFaizan what if I told you that there's more than one library for machine learning with python?
 
That would be True, But which one should i focus more on ?
 
The syntax is very convincing in making you think that the operation is vectorized, to the point I never tested the alternative
 
if you have to look at solving a problem in terms of what tool to use, you're looking at the problem wrong
@roganjosh The problem is pandas handles way too many edge and corner cases. If you know your data is sane to an extent, you can bypass all those with a simple list.
 
@coldspeed oh absolutely, but I did feel kinda foolish when I saw your grand reveal :)
It's something I should have tested rather than take for granted
 
8:46 AM
Funny enough I learned the list comprehension idea from Alexander. Tbh he really undersold that one.
 
@coldspeed and now you carry the torch. Keep it up :)
@SyedFaizan you're aware that there a loads of difference facets to machine learning? What type of problems are you looking to solve?
 
Nope, Not as of now
Currently Working on matplotlib to gain more insights
 
Well, that's not machine learning
 
Yup but i saw an article which suggested to learn numpy, pandas and matplotlib before jumping into ML
 
8:55 AM
I agree with it
That doesn't mean there can be a standard answer for what comes next :)
Do you know about Kaggle?
 
Yup
 
So that will give you some idea of what libraries are used where
 
Alright :) Gonna check it up!
 
Then someone will XGBoost you out of the water with something that probably won't work in a production environment
 
Anyone Here who does not mind connecting over Skype ?
I am a fan of Meeting new People within the same Domain's
 
9:05 AM
Hello everyone.. can someone help me with this: stackoverflow.com/questions/51668808/…
 
@JafferWilson pretty sure the room rules suggest that you shouldn't be asking about new questions, precisely because I'm now going to say something here about the question which won't be visible to others on the main site
But it looks to me that they are normalised in isolation
 
@JafferWilson Welcome to the Python room! Sorry, but we don't answer fresh questions in here. You'll need to wait a couple of days. Please see the room rules for details.
 
But at least you can have a look at my question, right?
 
No.
 
@roganjosh Exactly. So please make your comments on the question. ;)
 
9:12 AM
@PM2Ring I'm not sure whether I'm being insightful enough for that :P
 
@AndrasDeak why no? I guess my problem is related to python, Am I right?
 
@JafferWilson because you're now opening up another avenue of discussion
 
@roganjosh leave it please
 
oki doki
 
@JafferWilson We can tell you if your fresh question looks ok, or what improvements it needs to meet SO standards. And that question looks fine to me.
 
9:14 AM
@PM2Ring Thank you. That I know but still peope are downvoting and leaving no comment for the reason f downvote.
 
Unfortunately that's not our concern
 
Well thanks everyone....
 
We're glad to help if you still don't have an answer in two days
 
@JafferWilson Maybe someone thinks it's not clear enough. I can't tell, I don't do Pandas. Or maybe they just didn't like that you said "Please help me". Or they're just in a bad mood. SO can be like that, it's something that affects us all.
 
What is the plural of series?
serieses?
 
9:20 AM
series
 
Unless you're Gollum, then it's serieses. :)
 
see species
 
mmm, but that doesn't convey the pluralism of what I'm trying to convey, making the sentence read uncomfortably
I'll go with "each series"
 
Submit a PR to English:master
 
^ Now I know why I come here. Sound, practical advice :)
 
9:23 AM
really it's just abuse of Latin
 
I kinda miss the Cambridge Latin Course. That was like the original Game of Thrones
"multos sanguis fluebat" ("much blood was flowing")
And people being attacked by alligators and patched up with spider web and dead mice
In fact, it was so GoT that the language itself is basically killed off.
 
Fluebat sounds like a scary propagation vector for the disease
 
Yeah, it's changed a lot in English. Being English, I learned no other languages properly so I don't know if it remains in other languages as something more similar
 
What?
 
"fluebat" and "flowing"
 
9:34 AM
Ah. Well, fluids, fluency and whatnot, I guess.
 
I think it was necessarily changed because the word endings in Latin convey an awful lot
And it's not a very long word
 
Also English pronunciation has nothing to do with Latin
 
I'm probably spelling it incorrectly, but "traheberant" means "after having been dragged"
 
I hear Anglo-Saxons say "appendicitis" and bah
 
My 4 years of Latin did help me translate "impecuniosity" in a pub quiz. Totally worth it.
@AndrasDeak I would pronounce that phonetically, but then maybe you're complaining about my phonetics?
 
9:39 AM
is there really no canonical for NoneType is not iterable?
the OP originally thought it said "irritable" (-:
 
Haha, an interesting interpretation :)
 
@roganjosh Latin or English phonetics?
@tripleee tagged. Aren't you a gold badger?
 
@AndrasDeak I'm just curious on how you think we should be pronouncing it
 
@AndrasDeak His proposed dupe target isn't great.
 
Meh
 
9:44 AM
@AndrasDeak nope, upvotes on zero-score Python answers most welcome (-:
need 300 more
 
@roganjosh according to Hungarian phonetics :P
@tripleee hehe
 
or even negative, there was one the other day where I think somebody just downvoted all the answers because they didn't like the question
 
That does happen
 
@PM2Ring I would much appreciate a pointer to a better one, I looked at 20+ similar questions
and checked sopython
 
@roganjosh German works too
 
9:48 AM
Perhaps I'm being slow but I don't see where pygame.Surface object is created
So while the dupe might point to what the error means, it's not clear to me why it's being thrown in the first place
I'm not sure we should be closing things as dupes based solely on the error message but rather on what is throwing the error
 
@tripleee It's not exactly the same problem as 'NoneType' object is not iterable, although it is true that the OP is trying to iterate over a thing that isn't iterable.
 
You're right, I retracted my CV
 
@roganjosh His text_objects function returns a Surface, but he's trying to unpack it into textSurf, textRect. I reckon it's probaly ok to just answer the question & not try to dupe close it.
 
@PM2Ring mmm, true
stackoverflow.com/… <- for your enternainment, my answers with score <= -1
no really recent ones
 
@PM2Ring I'd answer it if I was you. I didn't see it.
nm, it's done :)
 
9:53 AM
@tripleee we won't vote on them, just so you know
 
I can't write a full answer because I don't know Pygame. But I've left a comment.
 
@AndrasDeak sure, I was wondering how to view those results, even the advanced search help didn't exactly spell it out
 
I think it was a fair outcome. I didn't see the issue originating from unpacking when I was trying to follow the logic through, but I also don't use pygame
 
translate.google.com/m/translate#en/de/appendicitis German version closer to what I have in mind @roganjosh
 
@AndrasDeak that's very subtly different to how I pronounce it
Like, to the point I had to play it twice to get the slowed-down version and I wouldn't pick it up in day-to-day speech
 
9:59 AM
OK, it's very different from the English one which was my point
 
FWIW, Americans say "appendectomy", British / Commonwealth speakers say "appendicectomy". Although the American version is becoming more common here.
 
Just to be sure: listen to the blue one that says Appendizitis :P
 
Umm, it definitely isn't very different to how I would say it. We have people here that say things like "skellington" instead of "skeleton" so it's possible you bumped into a bad example :P
 
@PM2Ring in the US, they said sidewalk and in England, pavement
 
@AndyK And in Australia we say footpath. But we're familiar with the English & American versions through TV & movies. And songs.
 
10:02 AM
@PM2Ring I spent some time in Melbourne last year and your road-crossing sounds were an endless source of entertainment for me. I felt like I was in an intergalactic battle
 
@PM2Ring footpath? lol.
 
I don't know whether it was a Melbourne thing but the "pszoom" sound was brilliant
 
@roganjosh you should not got to China or even worse... Laos
 
@AndyK I've crossed more than 1 dodgy road in my life. I'm only commenting about the sound that lights make when it's safe to cross there. Our lights just have a boring beep :/
 
@roganjosh oh ok. I thought it was dodgy in Melbourne
;)
 
10:06 AM
@roganjosh Yes, our pedestrian crossings in New South Wales also have sound effects. I'm pretty sure they're standard across the whole country. Most of the road laws here are unified across our states. They were always pretty similar, but most of the variations were eliminated a decade or so ago. There are still a few minor variations, though, IIRC.
 
I spent time in Dubai. The highways there are like an exhibition of horror
@PM2Ring you guys definitely got it right, though. I could feel like I was running from blaster shots
 
@AndyK Ask Antti about driving in Vietnam (his wife is Vietnamese).
 
@PM2Ring lol. Vietnam = Laos (in term of traffic).
 
In Victoria they have this crazy law that lets you do U-turns at traffic lights. Or maybe they finally got rid of that one.
 
In Dubai, the driving isn't as crazy as other places, but their attitude to crashes is very bizarre
I was one in a traffic jam and everyone was beeping. Turns out it was to get round a woman with very-obviously broken legs trying to get out of a smashed up car and they were beeping to get around her. That was the point that my relocation package was declined.
Also the fact that I could be arrested for what I just said :P
@PM2Ring looks like they got a good pygame answer in the end. Glad it wasn't closed :)
 
10:22 AM
@roganjosh Yep. The 1st answer was a bit too terse, but the new answer is quite good.
 
 
2 hours later…
12:32 PM
a little help here ,does anyone knows the solution for this ---> stackoverflow.com/questions/51240096/…
 
12:45 PM
@AkhilAlexander why did you accept the answer if it doesn't solve your problem?
 
partially solved
 
It must be XY problem day. Here's an interesting one. stackoverflow.com/questions/51672288/…
 
Looking at the question and the answer makes it seem solved. Looking at comments and the chat link therein suggests that you have a very different problem
(And likely another XY problem)
 
1:08 PM
I'll tell you what's an XY problem. Men!
 
Hello, I have an issue with nosetests stackoverflow.com/questions/51670284/… and I have no idea what's causing it
it seems the import of coverage fails but the package is available in my virtualenv
 
1:33 PM
cbg
 
\o cbg
@Cyril Welcome to our room, please take a moment to read our room rules which can be found at the top right hand corner of this page or here . Your question is fairly new still, maybe give it some time for people to read it ? If you can't wait, have you tried reading this post, specifically the comments seems to be helpful. stackoverflow.com/questions/14488601/…
 
I thought nosetests were ancient history.
 
some people are still working with ancient technology :D
 
I'm not the one that chose nosetests, I'm just the one in charge of maintaining the scripts
so coverage is well installed, I checked with pip freeze
I'll look into nose2 if it's better
 
2:00 PM
Not sure who starred that post. While it's nice to get a star and I'm thankful for it but i don't think the post needs to be on the star board. -pst- RO please use your star scrapper.
 
 
1 hour later…
3:02 PM
recbg
 
3:16 PM
cabbage
 
3:35 PM
Good day :)
 
I just got pinged on an answer from 2014, telling me that it doesn't work on Python 3. I'm slightly surprised that anyone wants to use uuencoding these days, instead of base64 (or base85). stackoverflow.com/a/27419217/4014959
 
Does anyone know the solution for 100% CPU usage with Anaconda in Sublime3? It's driving me nuts...
 
4:24 PM
I've been looking at the word "field" too long and now it looks really weird and misspelled. Keep thinking it should be "feild" all of a sudden.
 
Ah, good old semantic saturation. I had that happen to me in the last few days with "bound" and "growth".
 
Of course there's a name for it. Cool.
 
How does one jsonify a SQLAlchemy model? Most of the solutions I seem to find seem to be very old.
One solution that I did find recommends to picklize serialize = dump(query) but i'm not quite sure how to implement that.
1
Q: Flask SQL Alchemy GET all json

Nigel F.I am trying to retrieve and serialize users from my database, but I'm having trouble getting more than one user at a time. This is my serialize method: def serialize(self): return { 'first_name': self.first_name, 'last_name': self.last_name, 'email': self.email } ...

I did come up with a workaround but I haven't tested this against the scenario when another model is attached:
https://pastebin.com/a8zbwnGL
 
4:52 PM
@Ishmael everything's "old" because the answer hasn't changed: stackoverflow.com/questions/5022066/…. Either do an absurd amount of work to generalize serialization of complex models, or use something like Marshmallow to describe the format you want.
Definitely don't pickle the query object, that's not what you want and is unsafe if you're accepting from / transmitting to others.
 
wim
mashmallow have been sitting on the 3.0 pre-release for over a year and a half now
wish they will stop twiddling their thumbs, I want to use this in production
 
It's still on Python 2?
 
No, it works fine on 3.
 
wim
Talking about marshmallow 3.0, not Python 3. Beta release was March 2017, it's an awful long time to be sitting on a beta
 
Thanks i'll try to work with that lib
 
5:02 PM
Is there a good reason to prefer marshmallow over dataclass for something like data schemas?
I ask because I recently decided against using marshmallow, but I didn't look too much into it.
 
It works on versions besides Python 3.7 and is for an entirely different purpose.
 
"entirely different purpose" that's what the PEP asserts as well, but they didn't give that much info on what exactly that is.
 
Huh? I'm talking about Marshmallow, it's not meant to do what data classes do at all.
 
I thought both do data schematizing?
 
DSM
dataclasses aren't about schemas, really; you can still put whatever data you want into them regardless of the typing. They just simplify a lot of boilerplate you'd otherwise have to write if you want to use a class as a little data bundle.
 
wim
5:09 PM
marshmallow does a lot more than dataclasses
serialization / deserialization and validation for starters
it would be a fair chunk more work to bolt those features on top of dataclasses
 
nested serialization too
 
I did write a nesting and validation mixin for the dataclasses I use, so I guess you're right
and solved serialization by telling everyone to not use non-native types
datetime is overrated anyways
 
DSM
Belated cabbage for all, BTW.
Last night I picked up some "enjoy tonight!" discounted steak, and even though it's the next day it's still very tasty.
 
wim
Big misteak
 
oh wow
 
DSM
5:21 PM
Hey, poke. I've been trying to catch up a little bit lately but it looks like you're still going to beat me to 200k. :-/
 
From stackoverflow.com/questions/51676027/… How not to delete punctuation: text.translate(string.punctuation) :)
 
@DSM Sorry not sorry xD – And I even was a little more inactive in the past few weeks and didn’t really get to answer much
 
wim
@PM2Ring thematic horizontal-stream-of-garbage from you-know-who there
 
DSM
@PM2Ring: not a maketrans fan?
 
@wim You'd expect that with a username like that he'd write clean code...
 
wim
5:27 PM
took me a moment .. :D I get it
 
@DSM I am, but the OP isn't. I have occasionally made my own translation tables manually, but that was mostly in Python 2 days. It's a bit more work in Python 3, unless you just want a table to do deletion.
@wim I was going to call him "No mess Charlie", but I figured you might be too young to remember those ads. :)
 
wim
ah, so it using indexes in the string as codepoints. weird failure mode.
str.translate is a sore point when writing cross-compat code
 
@wim Yep. So you don't see many failures, since most text strings don't have many codepoints < 32 apart from newline, and possibly tab.
 
wim
when duck-typing goes bad... there is a similar one using random.choice on a dict which happens to have integer keys
 
@PM2Ring took me a long moment.. and being primed by deadpool, which I rewatched a week ago.
 
5:36 PM
@wim Interesting! I wasn't expecting that.
 
Do you ever wonder who set fire to the This Is Fine dog's house
 
>>> from random import seed, choice
>>> seed(42)
>>> d = {i: i*100 for i in range(10)}
>>> [choice(d) for _ in range(10)]
[100, 0, 400, 300, 300, 200, 100, 800, 100, 900]
 
wim
TIL KeyError and IndexError have a common ancestor LookupError
never noticed until now that these classes were siblings
 
5:51 PM
@wim Yeah. The Python 2 docs for str.maketrans don't mention LookupError, and I only really noticed it in the Python 3 docs today.
 
@PM2Ring Understanding what's happening here took me way longer than I am proud to admit.
As a side note, thanks room 6 for teaching me so much about python's wonky behaviour =)
 
I just went to upvote this comment on a dupe target, and then noticed that I wrote it. :)
Each entry in the resulting xs dictionary will have a reference to the same a object as its value, whether or not a happens to be mutable. But of course the problem in the OP only arises when a is mutable and you mutate it. — PM 2Ring Jul 5 '16 at 7:55
@Arne It's definitely wonky. But yeah, it's choosing a number k at random from range(len(d)) and then using that to get d[k].
 
wim
6:11 PM
now add the key 11 into the dict and you randomly get a runtime crash, but only 9% of the time.
 
pastebin.org no longer functional?
 
DSM
6:23 PM
Isn't it pastebin.com?
 
wim
anyone know why uWSGI don't ship wheels?
I was surprised to see only sdists there pypi.org/simple/uwsgi
 
 
2 hours later…
8:46 PM
@wim might be the sane thing to do
@wim see "why psycopg2 will stop shipping wheels"
 
I considered searching their mail list, but they zip it monthwise.. lists.unbit.it/pipermail/uwsgi
 
I've finally got a model implementation that I like in my SO API library. Need to figure out some way to manage the client object that makes requests without passing it around to every object.
Considering either using LocalStack from Werkzeug or something like SQLAlchemy's sessions.
 
9:02 PM
@davidism yuck :/
explicit better than implicit
 
9:19 PM
cabbage
 
wim
@wim - The above-linked post was written for questions, not answers. There isn't anything egregiously bad with their code formatting, and following them around to downvote them about this doesn't look good. Please don't continue to do this. — Brad Larson ♦ 50 mins ago
There is a moderator accusing me of "following around to downvote" on Ajax1234 content ..
 
back to pytest after a long hiatus. IntelliJ/PyCharm has added a LOT more support for it now. For example, you can Ctrl-Click on a test parameter and it will jump directly to the corresponding fixture.
@wim then you'd better quit doing that!
can mods see who downvoted?
 
wim
Well, I'm not doing that. To be fair, I do downvote that user a lot, but I come across it a lot.
 
Complex oneliners aren't good practice no matter what language is used.
 
wim
Hmm, they might be equating "code formatting" with "readability". Certainly related, but just one piece of the bigger picture.
 
9:32 PM
@wim Ajax is such a prolific answerer that it's hard to avoid his answers. And so many of them are below par. At least he does respond to constructive criticism, when he understands what you're trying to tell him.
 
yes, readability is more than just formatting
 
And the OP is responsive
 
wim
@PM2Ring My experience is the opposite
 
@TemporalWolf done
 
@wim I'm more diplomatic. :) But I certainly don't have a 100% success rate with him.
I just found a great dupe target written by Tim Peters. Unfortunately I didn't find it fast enough to stop a certain person from posting an answer... stackoverflow.com/questions/51680154/…
 
wim
10:08 PM
I've always been unsure - is it still called "garbage collection" if an object was deleted by ref count decreasing to zero and the gc was not involved?
(because those are collected even if gc is disabled)
I usually don't call that gc, just ref counting, but in Tim Peters' answer he seems quite happy to refer to that as garbage collection all the same
 
@wim I agree it's a little confusing. "Garbage collection" does seem to be the general term, but I'd be happier if it were only used when the gc machinery is involved. But what do we call what happens when the refcount goes to zero? :)
 
wim
I just call it deletion
 
I guess that works.
 
10:37 PM
@TemporalWolf I re-opened. I think the dupe is helpful, but way too broad especially with the amount of effort the user actually put in.
also cabbage
 
10:51 PM
@AnttiHaapala that's also the one i stumbled over, with no clear idea why they dont make use of it. Maybe noone complained yet and they are comfortable with their white spot on the wheel-shame-list.
 
11:02 PM
@user3483203 Thanks! They put in a lot of extra information after the dupe hammer fell, which is why I was thinking they deserved an answer :)
 
Yet another asking about Python's many string-formatting methods, and which is best. I linked some near-duplicates in comments, although the most-upvoted ones are old, pre-2016. What to do?
 
11:38 PM
Cbg
 
wim
11:52 PM
Anyone here know what is minimum version of gcc required to compile CPython with all the PGO stuff enabled?
 

« first day (2848 days earlier)      last day (2083 days later) »