Show newer

hey folks, anyone have tips on how to navigate a world of having to completely use separate hardware for work things and non-worik things?

or tips to remind oneself to check the other device (phone, laptop) so you don't forget to do something?

@gytisrepecka @jack That still seems materially different from the thing Apple was doing, no? Apple was going to scan your images and report you for potential CSAM. This thing says it uses an on-device model to detect nudity and notify you that an image contains nudity before showing it to you or before you send it to someone.

@pythonbytes @mkennedy
Hi! Re: youtube.com/live/yve8JFJTyNA&t

The stdlib does know what .txt and .html is, scroll down 60 lines and you'll see a mapping of 170 extensions to 116 MIME types:
github.com/python/cpython/blob

>>> import mimetypes
>>> mimetypes.guess_file_type("my.txt")
('text/plain', None)
>>> mimetypes.guess_file_type("my.html")
('text/html', None)

The stdlib checks the OS database first, otherwise it uses the default mapping.

As someone who has been hoarding pebbles for some time now, I am very excited by this new development: repebble.com/

If it has an always on screen and physical buttons on the side, I'm in!

If your program is leaking memory (or CUDA memory, or file descriptors, or really any limited resource), one way to identify the problem is to use your test suite to identify specific problem APIs. I demonstrate this using pytest fixtures:

pythonspeed.com/articles/ident

#python #pytest #testing

@brettcannon Thank you for your efforts with this. I feel like I want to boost this because you posted it to publicize it, but I feel like the relevant people have already weighed in and people will adopt whatever you do, so even though I don't plan to participate myself, I am vicariously exhausted just thinking about this thread getting a big audience. 😛

How did they even find the time to play this much hockey?

@simon You may also want to note that this changes the semantics of your `datetime` object, which is why we didn't just make `datetime.utcnow()` an alias for `datetime.now(UTC)`. If you change it you have to change it everywhere, and make sure all the datetimes you are consuming from other libraries are also aware.

(Also in the second example you have `import python` instead of `import datetime`).

@anubhav @simon Generally I recommend using `datetime.timezone.utc` for the UTC object, though there's usually also a UTC object in `zoneinfo`.

@pradyunsg @brettcannon @kevin @tintvrtkovic I can't tell if that is right. I distinctly remember that Ruby used to be a pain like Python was (requiring a compiler, etc), and then they had a change similar to our change with wheels that made it not a pain.

I just created a bundle with `nokogiri` and `sqlite3` and this was included in the verbose output:

```
Fetching racc 1.8.1
Fetching sqlite3 2.4.1 (x86_64-linux-gnu)
Installing racc 1.8.1 with native extensions
Installing sqlite3 2.4.1 (x86_64-linux-gnu)
Fetching nokogiri 1.17.1 (x86_64-linux)
Installing nokogiri 1.17.1 (x86_64-linux)
Bundle complete! 2 Gemfile dependencies, 4 gems now installed.
Bundled gems are installed into `./.vendor/bundle`
```

That makes me think that `racc` has native code that needed to be compiled, but `sqlite3` and `nokogiri` had some pre-built binaries available. Maybe a person can chime in if I'm misunderstanding it.

@jscholes Actually my cards are mostly audio based as well because I've been using comprehensible input and there was a recommendation to avoid reading in the target language until fairly late in the process.

The cards are pretty Android specific and they currently only read the Spanish part, but they might be a good starting point. DM me your info and I can try to send you some of my stuff.

@brettcannon @kevin @pradyunsg @tintvrtkovic Looking into it a bit, seems like Ruby definitely has equivalent of a wheel ("native gems" I think they are called) and npm has something like this as well, looking at this: npmjs.com/package/prebuild

@brettcannon @kevin @pradyunsg @tintvrtkovic Ruby has some equivalent thing I think, no? Is that what a gem is?

I adjusted the prompt that generates example sentences for my Spanish vocabulary Anki deck so that it intermittently tries to include interesting facts in the cards, and it has worked out marvelously.

Apparently sperm whales (cachalotes) are the loudest animals in the world.

@somafm Instead of removing emojis, why not replace them with the canonical name from the Unicode standard?

Is there a good library out there in Python that provides a simple abstraction over the major LLM providers, such that it's easy for me to swap out which one I'm using for a given project?

I find myself writing my own version of this because each of the LLMs have strengths and weaknesses, and sometimes for a project I want to test them all out before committing to use a specific one.

A few months back I looked at @simon's `llm`, but from what I could tell it was mostly wrapping ChatGPT or compatible APIs, and I wasn't sure how to use it for everything.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.