« first day (4889 days earlier)      last day (272 days later) » 

12:18 AM
Any thoughts whether anything should be done to this old highly-voted 2015 question with 17 answers, it's a bit of a mess: "Round (float) number to nearest integer". It got a few squirrelly answers; the OP's use-case was only about rounding small positive floats with 3 or 4 dps, for RGB->HSV conversion and then getting the hue angle: H * 360 In any case, OP's mistake was not assigning the result h = int(round(h))
...do we just leave that glorious mess as is? It's actively confusing to new users. I can't see what can be done with it. [This is not a question about canonicals.] I guess there's also a parallel implied question about the version evolution of Python math package and math.round() behavior, round-to-nearest.
 
6 hours later…
6:28 AM
@roganjosh 'Sure. Pro Machina' could also be a cycling team or a gym class :P Who says "ex" is a negative word, you or some SEO advice? 'Ex parte' and 'E pluribus unum' are not negative phrases, 'exemplary' and 'exceptional' are not negative words... or Excalibur... only exfiltrate...
7:10 AM
^^ round-to-even since 3.0
7:34 AM
^ Argh. Forget that, the OP mistakenly claimed numpy rounding disagreed with Python 3.0 rounding.
8:10 AM
@smci I don't think that's salvageable. Most answers started out ignoring the actual question to begin with, which is somewhat of a good thing since it's just a typo, but they've also diverged the topic massively. The only thing I see as feasible is to edit out the question code - only a single answer (albeit the highest voted) actually addresses it.
8:43 AM
@smci "ex" also being the term for someone you broke up with, or something that you no longer are. I obviously know the latin, but I'm not sure others would
9:15 AM
@MisterMiyagi Agreed. Just wondered if it was salvageable. I wouldn't edit the question after-the-fact to make it conform to offtopic answers, though.
@roganjosh Sure, just I was surprised you found the word negative. (Being an ex-businessman or ex-teacher doesn't have any connotation, positive or negative.)
Even without speculating on the sentiment it gives to other businesses, I think "pro" makes more sense anyway since the software tells the machines what to do, so "to/for" the machine makes more sense than "from". I guess. If it wasn't for the film, I wouldn't be in a position to make justifications for the new name and convince myself I prefer it but... here we are :/
10:09 AM
@roganjosh I'd like to see Alex Garland and Ridley Scott collaborate, although there might be a clash of wills.
10:38 AM
@roganjosh exquisite ;)
 
2 hours later…
12:58 PM
I'm searching (yet again) for a good function name. I have a target picture of a set of resources and the current state of said resources, and the function in question takes those two definitions and returns three things: the resources that meet the target, the resources that need to be shut down, and the resources that need to be allocated. is there a good word for that task?
I'm getting stuck on "verify", which isn't really what I'm doing. I'd expect a verify_x function to return something bool-ish
1:11 PM
I'm a bit sad that orms seem to never really consider "scale"
we are working with databases growing into the gigabytes, with many millions of records per table. However then I read things like: code.djangoproject.com/ticket/16427
@Arne Something mentioning "threshold"?
At its core, it looks something like a "filter" operation, but I'd associate that with lists et al. and not necessarily resources
@paul23 why do you want to truncate the table?
@Arne I'd go with something that reflects you are basically compiling information into different categories. Something like "itemize" could fit.
itemize_worksets? the names of the three returned values are "to_create", "to_delete", and "no_op"
@roganjosh I think I'd use filter if the second argument were a function instead of an object.
@roganjosh Sometimes logs can be truncated after a certain "indexing" period has closed and an actual backup is made somewhere. Like yearly (which would give few 10million entries)
but general handling of these kind of sizes should be fast, in the order of seconds, not minutes that django takes.
1:26 PM
That's not what TRUNCATE does, though
"TRUNCATE quickly removes all rows from a set of tables. It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. This is most useful on large tables."
Ok, sorry, I got muddled with you trying to process logs and actually just wanting to throw them all away after some time
Just get the raw connection and do it that way. I don't see why an ORM should wrap every bit of SQL functionality. FWIW in my latest project I use SQLAlchemy and I don't touch the ORM once; the whole thing is in raw SQL
Actually, I lie. I think I use a single command to get a User object so that flask-login works
@roganjosh the problem is that for ISAE standards sql directly is not valid (as far as I understood things). We need some validated library to communicate with a DB (which django is, sadly sqlalchemy never spent effort to get a formal validation from an official organisation). This is to provide the highest level of protection against data breaches.
@Arne I'm thinking something like categorize_resources or maybe group_resources
I've never heard of the standard. Is it this? Presumably you're a 3rd party data processor for non-financial stuff?
Wait, I can find two definitions of ISAE 3000, one saying specifically non-financial and another definition specified exactly financial. I'm so confused
1:41 PM
think it's that yes, I normally don't interfere with that stuff
It's just that every month some guy turns up, checks randomly through the gitlogs to find places where we've been inaccurate with prs, tests or other things like updating libraries.
Well, I'm glad I've never had to experience that. We've had SOC 2 and ISO-27001 audits but they didn't look at whether we used raw SQL. For the Django ORM to be "certified" but not SQLA seems very strange to me; it would be worth getting clarity on that. I mean, what about DB admin tasks? Any DB admin could go in and foobar the DB way worse than a restricted user using raw SQL
And those actions wouldn't be in the git logs at all
@roganjosh that's why those with access to the production db have a way way higher clearancy and much higher background check done on them yearly. I just had to show proof I am not in financial troubles and never had gambling addiction or something like that.

« first day (4889 days earlier)      last day (272 days later) »