« first day (4245 days earlier)      last day (704 days later) » 

12:38 AM
stackoverflow.com/questions/21324940 is it a good idea to use dupe targets like this one instead of closing questions as typos or as unclear? (the typical context is that someone has posted code and an error message, not really asked a question, but it's evident what OP wants to know, and the target seems to have the necessary information)
the specific instance is stackoverflow.com/questions/72441042
 
12:52 AM
@KarlKnechtel If the new question is clear enough, and searchable by others with a similar problem, it's ok to close it as a dupe. OTOH, we probably already have a zillion good signposts for that, and don't need another one.
The main thing with the typo close reason is that it's unlikely to help future readers. If it's unlikely to come up in a search even if their problem is almost identical, then it's a good candidate for the typo close reason.
Closed dupes can hang around forever, unless they have no answers & have a few downvotes, IIRC. But typos are likely to get roomba'd.
@KarlKnechtel I disagree with your suggestion re the random module:
> I had it in mind that the default convenience implementation should use SystemRandom when available
SystemRandom is almost always available these days, except on some tiny embedded systems. But calling the OS's random is very likely to be slower than generating randoms in user space. Not every use of randoms needs crypto grade randoms. And many uses of randoms need seedable random streams, which you don't get from SystemRandom.
OTOH, it would be nice if we had access to a modern RNG like PCG, rather than being stuck with clunky old Mersenne Twister.
 
1:47 AM
stackoverflow is out of reach now.
 
 
6 hours later…
7:20 AM
@AndrasDeak--СлаваУкраїні Huh. Would have expected the opposite.
 
7:41 AM
@MisterMiyagi same
 
Wondering if it makes a difference to define the object() outside of the match and then just refer to it in the case.
Indeed it does!
So object() is a pattern for "an instance of a given class with (optionally) specific attributes" and going-through-the-hassle-of-defining-a-namespace-with-an-object-sentinel is a pattern for "a specific value".
Science!
 
8:07 AM
@MisterMiyagi if you do obj = object() and case obj: it also matches everything...
 
That's because case obj: is a pattern for name-binding to obj. 🤪
> A capture pattern looks like x and is equivalent to an identical assignment target: it always matches and binds the variable with the given (simple) name. PEP 622
Hm, now I'm confused. What's the difference between a capture pattern like case obj: and the wildcard pattern case _:?
Oh, should have read on. "Given that no binding is made, it can be used as many times as desired, unlike capture patterns."
 
What does that mean?
Ah, you can do things like case [_, _]:, I see
 
9:03 AM
and hence the utter confusion when someone thought if they could just match on an attribute (match module.value), surely they can match directly against a name (match value)!
🤪
@Aran-Fey Best part about this massive footgun is when someone thought they could just convert a concrete choice of string case [('Archer' | 'Wizard') as p, "walk"]: to point to some class (e.g. case [(Archer | Wizard) as p, "walk"]:) without issue and suddenly be very confused as to why none of this work (I was so annoyed with Python that I ended up rage writing this trivial answer).
In a more sane language like Rust, I could just do something like:
    let three = 3;
    match number {
        1 => "Yay you are number wan",
        three => "You came third",
    }
 
heh, well, I could throw in much more powerful expressions that simply cannot be expressed in Python - never mind that in rust, match is an expression that can be chained, no such luck in Python
also funny thing about this whole "bloat" mess - I also rage-created this gist to show how bonkers a trivial usage compare between rust and python.
 
9:23 AM
What exactly was the edge case that prompted Python to interpret case three: as a name binding when Rust manages to interpret three => ... "properly"?
 
I've been wondering about that ever since Karl posted RHettinger's Q&A
 
Well, for that matter, I actually don't get why we have a bare name binding pattern at all.
 
To spare you an asspression on the match line? :P
 
52
Q: How to use values stored in variables as case patterns?

jakevdpI'm trying to understand the new structural pattern matching syntax in Python 3.10. I understand that it is possible to match on literal values like this: def handle(retcode): match retcode: case 200: print('success') case 404: print('not found') ...

way more details in that thread.
but if the emphasis is structural pattern matching, then surely they can be used to deal with exceptions (i.e. Err(...) in Rust) no problem right??? 🤪
 
9:27 AM
yeah.
 
if you mean an answer it might be helpful to link to the answer :P
> The most overlooked word in the title of these PEPs is "structural". If you're not matching the structure of the subject, structural pattern matching probably isn't the right tool for the job.

The design of this feature was driven by destructuring (like iterable unpacking on the LHS of assignments, but generalized for all objects), which is why we made it very easy to perform the core functionality of extracting out parts of an object and binding them to names. We also decided that it would also be useful to allow programmers to match on values, so we added those (with the condition that
"if you're not matching the structure, this probably isn't the right tool" vs "so we added value matching anyway"
 
I supposed I am not exactly of the calmest mood when it comes to learning about the razor sharp edge cases in bleeding edge Python syntaxes
 
Also doesn't explain why a bare name capture is a thing. There's nothing structural about "just dump that in this name".
 
exactly
 
@AndrasDeak--СлаваУкраїні Yeah, that's the part that's confusing me. It doesn't seem to buy anything good but has a huge impact on usability.
But that quoted answer sure is enlightening.
 
9:30 AM
So we all agree it's a misfeature... very small comfort I'm afraid.
 
essentially
 
@MisterMiyagi quote from where?
 
You mean the one I quoted?
OK, I thought you meant another answer there...
ninja clarifying edit :P
 
Edit on, edit off!
 
9:35 AM
Heh, also further down there was this recommended example:
SUCCESS = 200
NOT_FOUND = 404

def handle(code):
    match code:
        case status if status == SUCCESS:
            print('success')
        case status if status == NOT_FOUND:
            print('not found')
        case _:
            print('unknown')
... I think the whole mess can be simplified back to using if.
 
FWIW, I quite liked match/case when porting some functional'ish code that relied a lot on types. But the 10% that are absolutely mind-boggingly weird just feel like speedbumps on a smooth ride. Super annoying.
 
yeah, and this is just another straw that broke my already broken proverbial back that supported Python
 
The good news is that once the camel's back is broken, it can take a lot more weight sprawled out on the ground.
 
hahahaha
 
9:45 AM
Hm.... from the PEP's mouth...
> It has been proposed that capture patterns are not needed at all, since the equivalent effect can be obtained by combining an AS pattern with a wildcard pattern (e.g., case _ as x is equivalent to case x). However, this would be unpleasantly verbose, especially given that we expect capture patterns to be very common.
 
???
that's a load of yam
"otherwise dump to a name" is exactly what case _ as x would express
 
It's certainly not what I expected.
 
^ this, we already have a precedence, what the heck happened to Explicit is better than implicit, Readability counts. and Special cases aren't special enough to break the rules.????
truly, truly Python making me headdesk
 
As far as reading the PEP and shaking my 🎱 goes, there's a vague outline that case foo: is in an unpleasant middleground between obviously being a value reference and obviously being the degenerate case (see what I did there?) of case [foo]: and friends.
 
Again, look at the question that I answered, OP literally made a very clear case on what specific thing to bind, perhaps they can still salvage it by treating the bits before as as a non-capture pattern
 
9:54 AM
Just saying I can see why the trolley went that way, not that I agree with it.
But MiyagiLang is still stuck in bootstrapping hell... D:
 
Agreed, it just screams to me they really haven't thought this feature through before releasing^W letting it escape
 
does the walrus nod
 
 
2 hours later…
11:53 AM
How would you write an empty dictionary to a file, so that the file is just {}? json.dump({},f) doesn't work.
 
@DrownedSuccess try using a method that actually writes to a file.
 
Sorry, typo.
 
Note that you can just print a literal pair of braces
 
Yeah, I know. I thought there was a more "sanctioned" way of doing it.
 
I would either print it manually, or use json.dump({}, f).
 
11:59 AM
Oh, it does work, I just had to flush it.
 
Note that json doesn't write a dictionary to a file, even though it might look like it.
JSON and Python's object notation differ in small but significant parts.
 
It's actually the soil subtrate that most of my plants are on, to make matters more confusing.
 
Hmmm, now, even though {} has been written to the file, I get json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
 
An MRE would be helpful.
 
12:06 PM
double-check that file, then post an MCVE
 
Most likely it's just an unrelated mishandling of I/O.
 
import json

f=open("/home/system/hi.txt","w+")

json.dump({},f)
f.flush()

json.load(f)
 
Yeah, don't do that.
Open the file for writing, write to it, then open the file for reading and read from it.
 
@MisterMiyagi and close the file in between
 
And use a with statement for each open.
 
12:08 PM
using a context manager ^ yeah like that
 
Oh, for other reasons, I need to keep the file open.
 
No, you need to close it.
 
"reasons"?
Or seek to the start of the stream...
But preferably close it and open it again. Especially if you are now wondering what it means to seek to the start of the stream.
 
Side note: could they not open it anew? How does that play together with the original file handle?
 
One file handle per opening.
 
12:10 PM
I could do that.
 
Technically, the file could be swapped out between read/write, or the filesystem could be some mad scientists weird custom pseudo-filesystem.
 
@MisterMiyagi That's clear, but: could they use the original w-filehandle to extend the file, meanwhile using another file handle to read from the start, as long as the latter doesn't catch up?
from my earlier run-ins with race conditions involving concurrent access to the same file I dare not assume anything at this point
 
Depends on whether you are asking MisterMiyagi, the practically helpful and joyful guy, or MisterMiyagi, the paranoid sysadmin dealing with weird stuff.
 
I guess I could test it to "works on my machine" accuracy, but I'm not invested enough
@MisterMiyagi I just suggested to someone that keeping track of point indices in a mesh with uint32 indices might not be sufficient, so I guess the latter
 
As a rule of thumb, I would consider any and all assumptions on filesystems+concurrency to be wrong.
 
There may definitely also be buffering involved, so even if the FS itself is well-behaved the OS might have already read some parts of the file before you re-wrote them.
 
@MisterMiyagi when you say "swapped out", do you mean something normal done by the OS, or more kike gremlins?
@MisterMiyagi but I'm not talking about "re"-writing. I'm talking about sequentially building up a file on the tail end, and meanwhile reading it back in on the head end.
 
Swapping out would be pretty normal, actually.
 
lot better behaved problem than arbitrary read-writes
@MisterMiyagi OK, so what does it mean? :D
I'm not a paranoid sysadmin
 
Writing to a file atomically usually means to write to a new file and then rename the new file to the "real" file name, for example.
 
12:18 PM
I can't really make sense of "atomically" in a scenario where open and write and close are separated in a script...
Are you saying that the OS/FS is allowed to only create the file at its destined name when the handle is closed?
 
Definitely if you are dealing with a distributed file system.
 
Was that the FUSE thing you mentioned earlier?
 
No, a DFS would be things like GPFS, Lustre or CEPHFS.
 
OK, then I just know nothing about that, thanks
 
I'm not talking about that FUSE thing without a lawyer.
 
The atomic writing isn't something you would find in basic Python, but it's a common pattern for some usecases.
 
So this is all deep YAGNI for me...
the question is what this all has to say about the above situation
 
"Use separate with open for reading and writing, lest there be dragons. And lectures."
 
but they need to keep the file open for reasons
 
Well, that's good old .seek then.
import json
f=open("example.json", "w+")
json.dump({},f)
f.flush()
f.seek(0)
print(json.load(f))
 
12:28 PM
seek and you shall find (an empty object)
 
For a practical situation, it also works to open the file again for reading after flushing. No need to close the original handle.
 
that's what I kept asking :P
 
Yeah, I just ended up keeping the original handle, then making two additional context managers for the reading and writing.
 
Sorry, might have gotten side-tracked there for a bit...
 
1:02 PM
Hello, i am wondering if it's a good practice to store the last file selection of QFileDialog in pyqt5, so every time a QFileDialog opens then the pwd will be the last selection directory.
 
@ChrisP I don't know about development best practices here, but as an end user I'd appreciate if reopening a file dialog remembered where I was.
 
Yes, until now in every case it opens the pc user home directory (example: /home/chris/ or C:/Users/chris for windows). And while running the test cases i spend much time to explore in the right directory and that's a bit annoying.
 
1:19 PM
If it makes your program easier to use, it's probably good practice
Just make sure that the dialog still opens even if the last file selection no longer points to a valid directory
 
 
1 hour later…
2:42 PM
I rather like it when a GUI will let me specify a directory or file by having a freeform text box, alongside a "..." button. If I happen to know the path I want, I can type it directly into the box, or paste it in. If I don't know what I want, I can click the button and browse around using the file dialog.
Granted, it's usually possible to type/paste a path into the file dialog itself. But in my experience it's a bit temperamental compared to a freeform text box.
 
@PM2Ring my thinking with random is that people who just want random numbers should by default get the highest quality random numbers available. It's not *about* cryptography, but having the default be cryptographically secure is... more secure.

People who want seeding want it for reproducibility, and they can just as soon get that with the instance-based API. it makes more sense to be taking the OO approach if you're going to be persisting seed data.

as for MT being outdated, I too am outdated.
 
Every once in a while, I'll see this super old style of file dialog. I think it's from Windows 95. I don't think this one lets you paste paths in.
 
Windows developers are statistically very slow to update. I assume you've heard to story of why there isn't a windows 9?
 
I recall much speculation that there are a lot of old programs with logic like if version.startswith("Windows 9"): print("Not compatible with Windows 95 or lower. Please upgrade")
 
yep. that's the only explanation anyone seems to have, and I'm pretty sure I saw an actually reliable citation for it once, maybe one of the old MSDN blogs
(though it would be "with 3.1.1 or lower")
 
2:53 PM
The Microsoft-approved PR-friendly reason appears to be: because Windows 10 is at least 2 versions better than Windows 8.
"We know, based on the product that’s coming, and just how different our approach will be overall, it wouldn’t be right to call it Windows 9" -- from the Windows 10 launch event
 
The one that's different was Win8, not Win10...
 
It's not a high bar to be two versions better than Windows 8 ;-)
 
And about the Win7?
 
I have an old Windows 7 box hanging around. It's... Fine.
 
For sure this is a good Windows, I am just talking about these Windows nomeclatures ordering sense.
 
2:59 PM
Only the odd numbered sequels are any good!
 
I can't muster a lot of anger for Microsoft specifically here. Inconsistent numbering shows up in games and movies and books too.
 
@MisterMiyagi Well, they say that Windows 98 is good.
 
Final Fantasy, Super Mario Bros, Friday the 13th, the Hitchhiker's Guide """trilogy"""...
 
is windows 10 considered good or bad?
 
It's relative
But it's good
 
3:03 PM
@Kevin yam it, I have specifically been using windows 7 as a reference point to explain to people how outdated 2.7 is. Now I'm getting undermined >_<
(for 2.6, the reference point is XP SP3)
 
For Windows standards, 10 is great. The only real problem is that it spies on you
Oh, and it has built-in adware
 
I don't think of it as "old" except when I have to apply another layer of duct tape to keep the display from falling apart
 
to be fair, the built-in adware is on apps that are kinda worthless and ignorable anyway. but also cortana spies on you on top of the OS stuff iirc
I'm more annoyed by windows 8/10 trying to shove mobile UI paradigms onto desktop
such that 10 ended up with parallel systems for doing a lot of system config type things, and sometimes you have to know which system to use for the exact purpose you want
anyway, one day windows 10 decided to tell me that my computer isn't powerful enough to run windows 11, without me asking or giving any details. so now I'm on linux :)
 
In general I reject the idea that software gets "old" in the first place. That's propaganda from the companies that want to sell you new stuff every year.
 
ehhh, that really depends
 
3:08 PM
@KarlKnechtel I really wonder what they were thinking, making Win11 require that specific hardware. Microsoft trying to commit suicide in the OS market?
 
Bit rot is part of the propaganda. "hey, we just invented this cool image format called .webp. Oh, you can't open that in old-school MS Paint? Well... Feel free to buy our new OS :^)"
 
interfaces break, and you aren't always in control of them
sufficiently old web browsers will have no concept of css3 or html5 for example
 
Interfaces are broken, by The Man
 
back on the python topic: I randomly decided to do this kind of search... did you know there is a [tag:python] question with multiple answers, an accepted answer, that isn't closed or migrated or a duplicate, and has a score of -23?
also, the accepted answer is at -5
 
lets just say I dont like going out of my way to seek pain
 
3:13 PM
(also: the median score for such questions is 1, 90th percentile is 5, 99th percentile is 50)
(and that's a minority of python questions overall)
it's actually better than I expected. I thought I would see a median of 0, and less than 1/3 of questions qualifying
 
@KarlKnechtel Which question??
 
3:43 PM
I assumed interested people could just reproduce the search, but: stackoverflow.com/questions/46994833/…
the bottom of the barrel: stackoverflow.com/…
 
Ok, thanks...
What is the explanation for questions scoring below -5 not being closed?
 
there isn't such a system. close votes are entirely orthogonal.
lots of people will downvote a question because "rtfm" and not find an adequate close reason.
 
Sorry, I misread what you wrote. For some reason I understood that questions with a score below -5 should be closed.
 
a lot of these should be closed,though.
rather, should have been closed
 
3:58 PM
Rewriting: why didn't these very low-scoring questions pass by the question-closing vote?
 
typically, because people didn't vote to close the question. However, it looks like this one actually got undeleted by a moderator at some point.
 
Downvotes can accumulate over a long time, but closing a question requires 3 (5 in the past) close votes in a relatively short time frame
 
more meta on the topic of canonicals: meta.stackoverflow.com/questions/385343
stackoverflow.com/questions/46087730 I'm rather intrigued by the style of the deliberately-written canonical that is exhibited in that thread.
also: TIL that there are tag wikis and the python one is actually really useful.
 
Right... I still find it intriguing why these very low-scoring questions are not closed.
 
now if only I could easily search for questions that have the attribute of being in a tag wiki for a given tag.
 
4:30 PM
Why don't you try a query for this? data.stackexchange.com/stackoverflow/query/new
 
4:56 PM
There's surprisingly little ewwww at the deep ends of those queries.
 
What you mean?
 
Hello guys, I try to build a package with setuptools and a pyproject.toml file. I works fine when i use a flat layout but then I need to: from module import module. I want to import the module directly, but when i copy my files, module.py and __init__.py to the project dir, I get a ModuleNotFound error for requests, which i have specified as dependencies = ["requests"] in the [project] table and works without problems when using a flat layout. Any ideas what I could do?
 
Show us your project structure and pyproject.toml
 
5:15 PM
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "atf"
readme = "README.md"
license = { file = "LICENSE.txt" }
dynamic = ["version"]
requires-python = ">=3.6"
dependencies = ["pandas", "scipy", "requests"]

[project.optional-dependencies]
dev = ["flake8", "pytest"]
 
https://stackoverflow.com/questions/72451754/i-paid-15-for-this-python-script-but-its-giving-me-an-error-missing-ple
Is this malicious code that should be deleted?
 
atf
├─`tests`
├─`__init__.py`
├─`atf.py`
├─`LICENSE.txt`
├─`pyproject.toml`
├─`README.md`
 
@Spartan You seem to be missing setuptools-scm in your requires
 
@Sören this is a config file
@Aran-Fey I had it in, didn't change anything
 
@Spartan That's not right. Your code shouldn't be in the same directory as the README and pyproject.toml and that stuff
Is your project a module (a python file) or package (a folder full of python files)?
Is all your code inside atf.py?
 
5:25 PM
@Aran-Fey I had a flat layout before, __init__.py and atf.py in a atf subdirectory before, then then pip install . works as expected but then i have to do an from atf import atf. Yes, I just have one file.
 
@Spartan my question had nothing to do with your code
 
@Sören sorry :)
 
Then it should work if you just delete the __init__.py
 
@Aran-Fey without the __init__.py i get an ModuleNotFoundError: atf
 
Idunno, works for me
setuptools apparently creates build and egg-info directories in your project folder?! What the heck is up with that
 
5:37 PM
@Aran-Fey Yes it does :)
 
2 more reasons to use flit
 
@Aran-Fey I tried flit, same behaviour
@Aran-Fey maybe not the buld egg-info part, I'l try again...
@Aran-Fey I just tried on a linux machine, there it works without the __init__.py but still i need to import the module like: from atf import atf...
 
Stop pinging me with every message please
Can you try uninstalling the module and then installing it again?
 
Sorry, I read the rules, not very attentive today..
I do this every time after a succesful install
Damn, I did it again :)
 
Well, I have absolutely no idea why it isn't working for you, but you could try a import atf; print(atf.__file__) and see if that gives you any useful information
 
5:54 PM
I tried with flit without the __init__.py. FileNotFoundError: .../atf/atf/__init__..py
 
There's so many things wrong with that file path, you need half a hand rounded up to count them
 
You told me to create a subfolder :)
 
No?
All I said is delete the __init__.py
 
Before that
My code shouldnt be in the same dir as the Readme ... you wrote...
 
Ah. Ok, my bad, that's not true if you only have a single python file
 
5:59 PM
Np, I tried anything anyway, whats one time more :)
Yes! It works finaly :) With flit, without the __ini__.py and everything in the project directory :)
Works with setuptools too, I don't know what I did yesterday the whole day, thank you Aran-Fey
 
6:17 PM
@965311532 please don't ask for help with questions that were recently posted on the main site sopython.com/chatroom
 
Sorry! Didn't know
 
no worries
 
@Sören I had a look afterwards out of curiousity, since I have the necessary skill to analyze it without being compromised. It attempts to download a .bat from a Github repository, save it with a different name with a .exe extension, and run it using the original file name. The .bat looks like it intends to try to get elevated privileges by creating and running a temporary VBS script, and then invoke Powershell to download and run several executables from the same repository.
I am pretty sure it would not work; the script's attempt to run the downloaded .bat should fail, and I am pretty sure there is not a privilege escalation that easy hanging around in modern versions of Windows.

However, the described error makes no sense in context, and the code is obfuscated for no legitimate reason. It was absolutely intended to be malicious and absolutely an attempt to compromise machines using social engineering.
Between that question and OP's only other question, I conclude that OP is a "script kiddie" who should be banned from the site.
I raised a custom flag on the first question to say as much.
 
7:04 PM
@KarlKnechtel good thing it's deleted
 
 
1 hour later…
8:21 PM
stackoverflow.com/questions/2639915 Is this useful on its own? Is it better as a duplicate of one of the bigger "mutable default argument" questions?
 
I think if there's a canonical that answers that question, it can be called as a duplicate.
 
@KarlKnechtel The answers make it a dupe but I think they missed the point of the question tbh
"I guess the answer to the question is that if you want to append something to a list, just do it, don't create a function to do it." errr.... that clearly isn't what they asked
My interpretation of the question is "Is the None placeholder, which then requires an extra if check, really the most elegant way of handling the mutable default argument problem?"
The bit that derails it would be, in my paraphrased version, "and, if so, why would the language be designed like this to make that a pattern in the first place?"
 
8:38 PM
which would then be closed as opinion based
 
It was a long time ago, and everyone just picked up on the second part
 
I agree, and voted to close as opinion based.
However, I think there is room for a better version of the question, which would stand separate from the existing canon: "how can I work around the MDA problem?" which would include the standard None solution along with other possibilities
(and I think I'll write it up this evening)
 
8:54 PM
Why I got an error with this code?
import pandas as pd

pd.options.plotting.backend = “plotly”
File "<ipython-input-6-e486c1449971>", line 7
    pd.options.plotting.backend = “plotly”
                                         ^
SyntaxError: invalid character in identifier
Code from the plotly doc: plotly.com/python/pandas-backend
 
because those are fancy quotes, not "
 
Yeah, I just discovered this problem, thanks
That code's line with these fancy quotes was copied from a Medium's site
 
@KarlKnechtel it's not great form to edit titles of high-profile canonicals such as stackoverflow.com/posts/1132941/revisions. Many people probably search for it based on the title, so changing that can very much hinder hammer wielders and other experts alike.
e.g. "is floating-point math broken?" is one that is not great but a huge beacon blinking in many people's mind
OK, I had to look up the exact title, but changing that title to something more reasonable would make it a lot harder to find it for people who are explicitly looking for that question
 
Aye, I used to search for duplicates by very specific wordings of the question title/body that I memorized
 
I think that was a good/useful edition
 
9:07 PM
In fact with 1223 linked questions I'm going to roll that edit back, sorry
@Marco thanks
 
Not yours edition, but from the Karl
 
@vaultah I can relate. I would very much like for it not to be a thing. You really do have to be exact. "why does arg=None" will not pull up stackoverflow.com/questions/10676729, without the "using"
related: meta.stackoverflow.com/a/418436/523612 if we did this, a search like [python-faq] mutable default argument would (I imagine) pull up all the top related questions, without distractions, making it easy to choose the best one in context.
 
How is a conflict over edits resolved? I think an edit made by a user with a higher reputation over Andras (like Karl) should prevail over an edit made by a user with a lower reputation over Karl (like Andras). The same applies if a user with a higher reputation than Karl edits Karl's edit.
 
:D
 
@Marco it's usually resolved by a fight to the death
 
9:12 PM
I don't think it's resolved in that manner.
 
I'm not a fan of the reputation system in general; many people try to game it and it's not a good indication of either wisdom, discretion or subject matter expertise.
 
Can a post be blocked from editions?
 
it does a reasonable job of measuring trustworthiness and engagement with the system, but that really tops out with the highest privileges (20k or 25k?)
 
@KarlKnechtel For certains things (like that) I think is a good indication.
 
We'll have to postpone the fight to the death until Karl and I can meet in the middle, somewhere in the Northern Atlantic
 
9:14 PM
(as a side note, in English we don't actually use "edition" to mean "an act of editing something", even though it would make perfect sense. It just means "one of the versions of something produced by editing")
 
Interesting, now the "Suggested edit queue is full" from that question.
 
(and even then, normally we would say version in a technical context - "edition" is for, e.g., a director's cut of a film)
I think the suggested edit queue is pretty small.
Probably a good thing, honestly.
 
Ok, thanks, Karl, I'll use now in that manner.
I'm not a native.
Sorry.
 
@AndrasDeak--СлаваУкраїні do we have a process by which we can make these kinds of improvements without being held back by inertia?
 
hahahahaha
 
9:17 PM
(on a technical level, it would be nice to give redundant titles to a question, rather than needing actual duplicates)
 
I agree
 
@KarlKnechtel this. So much this. I actively rely on that title for everyone that I want to point to the question
16 mins ago, by Andras Deak -- Слава Україні
@KarlKnechtel it's not great form to edit titles of high-profile canonicals such as https://stackoverflow.com/posts/1132941/revisions. Many people probably search for it based on the title, so changing that can very much hinder hammer wielders and other experts alike.
 
What is the edit's post queue limit?
 
@KarlKnechtel I doubt it. At the end of the day we should ask ourselves what "the improvement" would really improve. Editing just because the final title is prettier with the rest of the question is worth less to me than the question serving as a good signpost---for power users and experts.
If we're worried that random help seekers don't find it: this not very specific duckduckgo query lists that question at fifth place. That's more than good enough for me.
So what I'm saying is that as far as I'm concerned this is not "inertia": the current title of the question is the optimal one. It shouldn't be moved in the first place.
 
Okay, that's satisfactory to me then.
 
So a fight to the death won't be necessary anymore
 
the ancient laws aren't too specific in this regard
 
I see
 
There was something about a Goat King and some ritualistic dance, but I don't think we'll be condemned for skipping those laws this one time
 
9:29 PM
35
Q: How long is the suggested edit wait usually?

JoundillI've just received this message on a suggested edit I'm trying to submit on a question. The edit queue is full at the moment - try again in a few minutes! I've tried a few times now, and haven't been able to get my edit onto the review queue. How long does it usually take for this to clear...

 
Great, thanks!!
@roganjosh hahaha
 
10:13 PM
Long shot, but can anyone recommend me a way to do OCR with handwritten text? I'd like to read numbers at the very least
 
Doesn't opencv have one built in, are are you looking to develop an OCR system from scratch?
 
I was hoping to find something ready-made, but I haven't been able to
 
Hmm, weird, I'd expect that to be a common use case. Perhaps it's that difficult to do in general?
 
@Mikhail I can't find anything relevant in opencv. People seem to use it to find the text, and then use Tesseract (or whatever) to do the actual OCR
 
Indeed, so use that... Its a common pattern. For example OpenCV doesn't implement their own fft algorithm but rather provides a unified interface.
 
10:20 PM
I tried it, Tesseract is absolutely unusable for handwriting
 
Oh you mean cursive script?
 
first one from the latter list seems promising github.com/githubharald/SimpleHTR, and earlier I saw github.com/githubharald/WordDetector from the same user to segment the words first
 
Looks your best bet is to run OneNote in a separate process and use its OCR engine : makeuseof.com/tag/convert-handwriting-text-ocr
I'm almost joking
 
"best bet", "onenote", yeaaah
 
10:23 PM
@AndrasDeak--СлаваУкраїні Hmm, neat, there are some in there that I hadn't seen yet
 
When I was a kid I used to work in publishing, and in our workflows running MS products as part of the pipeline was "normal". Although distasteful.
 
we must break the cycle of hate
 
its more of a centipede
 
Oh yeah, SimpleHTR is one of those I tried. I had to rewrite a bunch of it only to find it has terrible accuracy with my text :/
 
too bad
if all else fails you could try training it on text like your text... probably as a last resort
 
10:26 PM
@Aran-Fey Try this one? pypi.org/project/google-drive-ocr
I've worked on a bunch of image processing and hand writing OCR should be pretty hard.
 
I can't figure out how to get the client secret... the link is dead
 
You probably need to create a project at console.cloud.google.com and generate secrets from there
 
I've been stuck on a easier to but more niche problem
So I made a bunch of .pyi files for a module but not sure how to validate them
vs code doesn't seem to use them, although the code runs fine in both cases
`from module import something` #<-no warning
`from module.submodule import something_else` #<-issues an import cannot be resolved error
so Id expect that pylint would either look inside the .so file or in the .pyi file but not sure why its not doing either of them..
 
10:48 PM
Woah, that's good OCR
the module is terrible though
It legit takes input as a file and writes the output into a file...
If something goes wrong, it catches the exception and returns a Status.ERROR...
 
you're basically stealing compute time from Google
good work
How will it work "at scale" :-)
 
It's not stealing... google is offering it to anybody who can figure out how to navigate their terrible website
 
I'm sure we've all paid the bill a thousand times over
 
they probably make money from you stealing compute time from them
 
11:07 PM
Wow, apparently my limit is 20k queries per 100 seconds. That's easily enough for the whole company...
Anyway, I'll continue tomorrow. Thanks everyone
 
https://stackoverflow.com/questions/72454956
I know it sounds too basic, but is there a canonical for "how do I make a list with values that are already in multiple variables"?
(which is vaguely related to the "variable variables" problem, but backwards)
 
11:35 PM
@vaultah maybe they sell the OCR results :-)
 
yeah, Aran-Fey will send them data that's at least a little interesting to at least someone
and knowing which pieces of data are interesting is the idea behind Google
 

« first day (4245 days earlier)      last day (704 days later) »