« first day (3424 days earlier)      last day (1524 days later) » 

12:03 AM
@AndrasDeak Good advice
 
12:19 AM
needs details, severely. no MCVE stackoverflow.com/questions/28389606/…
 
Voted. I think they also have a plotting problem: they seem to have 1d data which they won't be able to magically plot as a surface.
 
12:36 AM
Does anyone know how to retreive the vertices of a polygon from a shapefile and put it in an array?
 
meshio can probably help with that
 
Thanks; I actually got it
 
12:56 AM
I'm trying to create a voronoi diagram of the US. I've been trying to do it for the last 5 hours
But it's just so hard!
 
What for? Are you sure you're using the right tools for the job?
 
Honestly, I'm not sure. I'm doing this as a kind of Creative Unit Project
 
 
1 hour later…
2:12 AM
How do you make a plot bigger?
 
2:33 AM
Does anyone here know how to work with GeoPanda?
That would be great
 
@DarkRunner I am working on Geopanda problem at present
 
@Jason Would you mind taking a look at my code? It runs without error, but it just seems off
 
yes sure
 
Basically, I graphed all the cities in the US on top of the states
But if you actually run the code, you'll see that some states have basically no cities in them! Weird
OK, that looks fine.
But then look at Texas
There's nothing! @Jason any ideas?
OK, ... it seems to happen only to certain states
Like Arizona, as well
 
3:13 AM
This is the weirdest thing I've ever seen!
What does it mean for tuple index out of range?
@Dodge Any ideas?
 
3:37 AM
Question for all of you: why is the SEO for Python doc so messed-up wrt versions: preferring 2.x over 3.x, and 3.1 over latest 3.x? When I google for "python collections.Counter", the #1 hit is 2.x, and for "python 3 collections.Counter", #1 is 3.1, followed by #2 being 3.x. Who should I contact about this?
 
@smci IDK, but I hope you can sort that out as it's always bugged me for the longest time...
I think there is a way to say "this is the canonical page for this page." though
Maybe if the docs did that we'd be happier? What's the canonical page? Latest stable?
 
4:01 AM
@AaronHall I can't sort it out that's why I asked here. I doubt the answer has to do with page title, it's probably among other things due the number of backlinks, which in turn depends on #1 SEO it, so it's a vicious circle. By now 2.x documentation should be well below 3.x, and how on earth is 3.1 still top...
 
@smci maybe relevant: yoast.com/rel-canonical
Maybe rel=canonical is the wrong solution because that should be for pages that are semantically the same
These are pages that are nearly the same, except for their versions.
None of these values for the rel attribute seem apropos: developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
 
4:17 AM
I have a dictionary` stores characters of a string as key and their frequency as value. I want to create a heap according to the frequency of the character. How can I do it with heapq?
 
4:29 AM
@AaronHall Interesting. The individual pages may have roughly the same text for each individual object, but their outlinks to other stuff from the same version certainly don't...
 
@smci Google's SEO docs say nothing about "documentation" or "versions" in that sort of context...
 
user10984358
5:19 AM
I seem to have got into the habit of having names like “x_file_obj”, “y_match_obj”, “z_path_obj” in my code. x, y and z are what that gives it a meaningful name. Is this behavior of mine bad and not recommended? Should I just use x,y and z as names and type annotate? I always found it an extra step.
 
user10984358
Heck I even have “user_list”, “commands_dict” :/
 
7:24 AM
@TheNamesAlc I don't think it's bad, but might be unnecessary for some. What should matter is how you feel when the corresponding suffix is not there.
@TheNamesAlc I'd usually just write users & commands.
 
8:00 AM
Hello, all. Please help: stackoverflow.com/q/60431834/8759300
 
8:12 AM
@TheNamesAlc to give a contrasting opinion, I frequently do the same if it's some object that I'm going to use throughout a long function of data processing e.g. if I need to run a query at the start to build some baseline mappings
 
user10984358
8:23 AM
Most of the time I just name “type_obj” if it’s a temporary variable like a file handler or regex match object. Maybe I’m just used to having names this way cuz I don’t use a fancy IDE that shows me associated methods/attributes when you do ctrl+space. I tend to do the way roganjosh does. Thanks for the suggestions both of you.
 
Contrasting with the other opinion you got, that is. I often read the appended _dict as a quick clue that it's something I defined maybe 15 lines earlier whereas users is something more throw-away, if that makes sense. That's obviously not a rule but it makes it "more global/official" to my mental parser
 
8:44 AM
@TheNamesAlc Seems like hungarian notation to me. Personally, I feel it's redundant, distracting and hard to maintain.
IMO the name should express the meaning, e.g. arguments, and be relatively generic. If you refactor the concrete implementation of a variable, e.g. List[str] to Tuple[str], the name of the variable should not need change.
If you feel the type of a variable is important, annotate it. This will also give proper tooling support.
 
user10984358
9:22 AM
Didnt know there was such a notation! Might as well get into he habit of annotation then
 
9:37 AM
My primary recommendation would be do use a fancy IDE. Python's strength is its ecosystem, you are shooting yourself in the foot if you don't use the tooling available.
 
9:52 AM
@Pythoaholic probably lst = [(freq, key) for key,freq in dct.items()]; heapq.heapify(lst) etc
 
10:40 AM
@MisterMiyagi tis a silly place
 
 
4 hours later…
2:59 PM
hi, im trying to use numba cuda functionality, so i started with this tutorial:weeraman.com/put-that-gpu-to-good-use-with-python-e5a437168c01. However, when I run the first piece of gpu optimised code I get this error:
`Possible CUDA driver libraries are found but error occurred during load:
/lib/modules/5.3.0-28-generic/updates/dkms/nvidia.ko: only ET_DYN and ET_EXEC can be loaded`
 
3:16 PM
@3141 I can only guess but try to figure out if there might be any version constraints for cuda support
 
3:41 PM
thanks, will do
 
 
2 hours later…
6:31 PM
Comic Book Guy ? ;-]
 
Cosmic Background Gravity
 
Capillary Blood Glucose
 
 
2 hours later…
8:30 PM
Stuff like this edit makes me grumpy. It was only after rolling back that I realised that it was the OP that approved the edit but is this at all a reliable indicicator? As far as I'm concerned, the edit should not have been suggested (in regards to the missing ] in the first place). If the OP accepts that edit, should the assumption be that they genuinely made that very mistake in transcription?
Or, are they just going along with something they think other people want to see
 
No, OPs are generally unreliable.
 
to that extent, it might also be some kind of misconception or perceived power play at work from the OP's perspective.
 
You mean OP not knowing better?
facing a "high"-rep user I mean
 
aye, or assuming that its only moderators who edit or something along those lines
"someone who knows better"
 
yup
 
8:38 PM
Totally agree; I can definitely see myself accepting that edit if I was in their position. I'm still thinking my rollback was correct (the OP went on to re-implement it themselves)
 
oh absolutely, the edit was bad, plain and simple
 
Just a shame that this seems like a really-solid instance of where community moderation is genuinely unwelcoming; the OP (in hindsight) did what they thought was right in accepting, only for someone else to come and just tell them they were wrong on accepting a fix on what they did wrong the first time :/
 
@roganjosh yeah, superfluous at best
@roganjosh well it depends on how you tell them they were wrong
 
I haven't touched on the OP themself, just why I rolled back. I don't know how how to make it coherent for the OP in this particular situation, only to say why the editor was incorrect
 
the act of rolling back the accepted edit should not shock OP in any way
 
8:46 PM
Hopefully not. It's easier for me to drop the conundrum from my mind given the fact that the question itself is cv-pls material from multiple angles anyway
 
I don't think you should lose any sleep over a two-line question (or any other question for that matter)
 
@JonClements We went to watch A Foreigner's Journey last night. I'm not sure whether you listened much to either band (but you definitely have an American slant on taste! :P ). They were very good. Nobody told me it was a tribute act; I thought it was a joint tour, so I was constantly wondering "why the yam are they playing in Holmfirth?" until we'd set off
@ParitoshSingh Thanks for the dupe suggestion. Now we can start a debate on whether they accepted it because you've made a power play :P (joking)
 
9:10 PM
I've been reading through Open Sourcing a Python Project the Right Way and got a bit overwhelmed. It feels like a decent 50% would have to be cargo-culted in if I were to try work one of my projects into opensource, or I could never actually build the product
Since we have a few people leading open libraries, I'm curious whether you could (sensibly) cargo cult this general framework and expect others to take over in particular parts if you manage to create something useful
 
@roganjosh in before badger and setuptools
 
@AndrasDeak Sure, I guesstimate badger will have a lot to say. But there's a crap load more to that than just setuptools in there :)
"Tools and Concepts" is a big list! I don't know whether it's realistic to try start putting something together with all of those capabilities in place, but you could certainly design the project to make them possible if there's a chance you could snag people that can help
 
9:26 PM
woah, that guide is ancient
it's from back when people distributed tests alongside their code
 
Which makes me think it's only got more complicated since due to new automated tools, rather than things being outdated (a lot of the files e.g. tox are still in big libraries)
 
well, you don't need to include all the available tooling. CIs are all the hype, but simple/static packages don't really need them and thus avoid >50% of the really overwhelming stuff
the rest, I'd say, got easier
after working just short of a year with poetry, I'd still recommend it. that one alone already handles nearly all the publishing work I have to do
seems to be a good guide though, just a little outdated with a few concepts/decisions
if you now get wim to chime in, you might even get a qualified opinion which parts are good
 
After just a cursory glance over poetry, can it wipe a few things off that checklist?
 
I'd need to actually read the whole thing to be sure, but it should handle all the setup stuff plus publishing
 
It sounds like a good shout, though, thanks :)
 
9:37 PM
happy to help. Feel free to ping me if you have a question
 
That's great; thank you. I have, for many years, believed that I can rebuild jsprit in numpy and build a GUI on the front on it with Flask. OpenDoorLogistics did it, but it packages the Java solver in. That, in itself, is a ridiculous amount of work
But I did it for machine scheduling with no precedent in my current job. I just have no idea about how to build a decent generic API - all my code was targeted to a specific problem. That's weighed in on my debate about learning a Java-like language to try think about interfaces more. If I'm gonna do that, I might as well open-source it too
 
that looks like it'll be quite the project
 
Mega project
But I've just hit a dead end where I can't learn any more about decent software design now when I just keep working on my own. I can't ask questions anywhere like SO and I wouldn't even recognise issues in my own code on its overall structure.
But functionally I've almost matched the speed of the jsprit solver in another real-life domain, in Python and with more constraints, so it's maybe worth a pop
If nothing else but for people to crap all over the API and make me think about problems outside of a particular problem :)
 
10:02 PM
I would take a look and try to comment on issues that I see
 
I wasn't very clear, sorry. I mean for people to criticise my API
In trying to find a way forward to get better at overall design, it might be best to just release a library and take the feedback from users
 
You know what they say: the fastest way to get a question answered is to post a wrong answer on the internet
 
^ perfect
 
10:35 PM
oh @roganjosh that reminds me, I had wanted to update you on which server we were going to use to deploy a microservice over at ArneCorp
you did ask about that a couple months ago, right?
 
I do remember it but I'll need to refresh on the wider context sorry
Dec 6 '19 at 10:52, by Arne
@roganjosh django has no chance, we will mainly look at flask (most experience already) and aiohttp (most promising given the problem), and also some basic exploration of popular others like cherrypy and falcon, to see if they are surpisingly amazing
That's what we're talking about?
 
yep
so, flask, aiohttp, and fastapi got tested in the end. I was very happy with fastapi and wrote the first version of the service with it. We ended up switching to flask because some analysis showed that 1) the io blocking tasks that i expected did not matter enough to make a server with async necessary, 2) the team I would be working with only had experience with flask (minor point, but not irrelevant), 3) the same people felt nervous about fastapi not having a 1.0 release yet,
4) we have to use a a message protocol for which flask had a plugin and fastapi did not
so in the end we went with the better supported / more stable server, because we didn't strictly need any of the fancy new stuff the the more modern frameworks had to offer
.. but if it was up to me, I'd still go with fastapi and just write the missing plugin myself
 
11:05 PM
@Arne that's awesome feedback, thanks!
I have a funeral to go to tomorrow so I need bed and probably won't reply tomorrow, but I'm really grateful for you sharing that and I'll go through the steps the day after
 
take care
 
Thanks :) rbrb
 
11:29 PM
rbrb, see you
 

« first day (3424 days earlier)      last day (1524 days later) »