« first day (4912 days earlier)      last day (44 days later) » 
04:00 - 12:0012:00 - 00:00

4:49 AM
@Aran-Fey There are tons of packages in Python and R where the documentation is not useful, merely a collection of pages with low-level summaries autogenerated from a docstring. Not a quickstart/ getting started/ vignette/ user guide on how to do a certain task e.g. plotting, summarizing, esp. For such packages, often best to rely on third-party summaries/ cheatsteets/ github gists. There are third-party companies which make a living out of that, or use them to generate leads/ inbound inquiries
 
user22676652
Hello, does anyone here know how to handle multiple errors at the same time?
 
5:03 AM
@zoomingspeed You mean code throwing multiple exceptions? Show us an example line of code and the exceptions. Do you want to catch the first exception, print it and raise the second?
 
user22676652
No, I want the code to detect ALL errors at the same time, and handle them. I didn't figure this out but I figured out how to handle one error to get rid of the rest
 
6:06 AM
I asked which errors? Show us an example line of code and the exceptions, and we'll take it from there. Until we see that we don't know what you mean by errors.
 
 
4 hours later…
9:55 AM
Ugh, Chrome has seemingly trashed a part of my app. It seems to stop me opening a file upload dialogue box now on my site. I just checked on Firefox and it still works. Has anyone else noticed this issue?
nm, whatever they did must have been a temporary glitch because a further update has made it all work again. Thanks, Chrome, for sending me down a path of git blame on myself. It always feels shameful with that name
 
@roganjosh been there done that :D
@roganjosh for me it's the opposite, ff keeps crashing and chrome works fine :D
 
10:11 AM
It wouldn't hurt so much if that one feature hadn't taken literally days of dedicated effort as I was fiddling with image compression and getting the upload to scale properly in the preview box. "Oh man, what have I done?!" when it suddenly stopped working across multiple pages.
 
 
1 hour later…
11:26 AM
I'm having issues with mojibake. I have a piece of data with an unknown encoding, so I try a bunch of different ones until I find one that can successfully decode it. The problem is that sometimes the text gets decdoded "successfully", but the output is garbage. I know the text is supposed to be german and the problems are usually caused by umlauts (äöü). Is there an easy way to check if the decoded text is "valid" german?
 
Only German?
 
I think in rare cases it might be english, but that's a subset of german anyway :D
 
Ouchie
Actually, that might be a compliment? I'm in mixed emotions
My first thought was chardet but I'm guessing you tried that. It looks like language-specifics take a lot of effort with its own Mongo DB
 
Yeah, chardet doesn't always get it right
I should add, my data is essentially a serialized dataframe, not just text. So ideally I'd like to avoid working with bytes. I'd prefer to decode it and then run some sort of sanity check once I have the data as a string
 
How does the encoding become ambiguous in this process?
 
11:41 AM
The file is created by a 3rd-party program from the 90s. I don't know how it decides which encoding to use, but unfortunately it's not consistent
 
@Aran-Fey I'm pretty sure a number of NLP have language detectors. Depending on the output you make be able to check if the output is in the Latin Unicode blocks. You can possibly strip non-{Latin and white-space} characters and see if any words are in a German dictionary.
 
Latin is too permissive, unfortunately. Letters like ã are also in the same code block
 
My idea was if you're getting a ton of special characters and other non-sense - "Depending on the output"
 
Oh, here's an idea: all(char.isascii() or char in "ÄÖÜäöüß" for char in text). Let's see if something explodes, but I think that'll be good enough for my purposes
 
04:00 - 12:0012:00 - 00:00

« first day (4912 days earlier)      last day (44 days later) »