2024-05-13 15:59:34
Checking for file update every second against a whole tree of files…
Some places already have accounting for IOPS, RAM, disk, CPU time. I expect that to become more common even for private clouds.
https://utcc.utoronto.ca/~cks/space/blog/python/HotReloadingNotTooOft…
Teaching #Python folks the joys of clear and explicit object type definitions. An interesting experience...
#Programming
#Pydantic for Experts: Discriminated Unions in Pydantic V2
https://blog.det.life/pydantic-for-experts-discriminated-unions-in-pydantic-v2-2d9…
These is one of these days when it occurs to you: "hey, packages using #Python and #RustLang, may have *both* Python and Cargo-level tests." And then you spend a lot of time going over all Rust-enabled dev-python/* packages and adding `cargo_src_test` where appropriate.
As it turns out, many of them did. Most of these don't actually link to libpython, so I suppose it's fine to test them once. Pydantic-core does, so I test per-impl (but also can't test on PyPy). Cryptography has Rust-level tests that don't even build (they fail at linking).
#Gentoo
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
[[Taichi]] Lang: High-performance Parallel Programming in [[Python]]
https://www.taichi-lang.org/
#CPython 3.13 has some new fun flags for #Gentoo ricers.
USE=jit − enable to get Just-in-Time compiler and make stuff faster. Note that you're also going to see random segfaults, etc.
USE=gil − disable to get rid of Global Interpreter Lock and get a freethreading #Python. Expect some random breakage, race conditions, etc.
@… okay, just for you my english friend: i took a python project from github. then I put all these python files (all files of the project) into gemini - as context - then I prompted: dear gemini, please be so kind and create a PHP project for me, based on this python code - because I am not a python coder, I am a PHP coder - so it would be super nice if your could crea…
BeeTeeDubs, I'm going live in ten with a #LiveCoding #Python Tutorial drawing flags with turtle graphics.
Really it's about abstraction and decomposition.
#ComputerScience
I’m doing #python today...
This https://arxiv.org/abs/2111.00187 has been replaced.
link: https://scholar.google.com/scholar?q=a
wanna see some python crimes? https://github.com/GlasgowEmbedded/glasgow/blob/main/software/glasgow/support/plugin.py
Właśnie trafiłem na pierwszy padający test, wynikający z użycia JIT w CPythonie 3.13. Co ciekawe, wygląda na to, że hak `gc.collect()`, którego używano dla #PyPy, nie pomaga.
https://github.com/pallets/markupsafe/<…
From Beeps to Toots: Reviving Pagers with Python and Mastodon https://finnley.dolphinhome.net/2024/02/25/from-beeps-to-toots-reviving-pagers-with-python-and-mastodon/
Automatic Generation of Python Programs Using Context-Free Grammars
Kamel Yamani, Marwa Na\"ir, Riyadh Baghdadi
https://arxiv.org/abs/2403.06503 https…
1/ Once you look past syntax and "paradigms", many programming languages (Java, Python, Racket, …) share a common semantic core. But students seem to understand it very poorly, which leads to endless confusion (as often seen on here). What to do? ↵
https://blog.brownplt.org/2024/04/12…
RenPy is such an interesting project.
#programming #python
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
This https://arxiv.org/abs/2403.08012 has been replaced.
link: https://scholar.google.com/scholar?q=a
Cross-ecosystem categorization: A manual-curation protocol for the categorization of Java Maven libraries along Python PyPI Topics
Ranindya Paramitha, Yuan Feng, Fabio Massacci, Carlos E. Budde
https://arxiv.org/abs/2403.06300
Retrospring
Your quite techy (more.then me lol). Do you program.anf if.so what? — I do! I program in rust or python usually, rn I’m trying to make a WM in rust using smithay
Feel free to check my github! https://retrospring.net/@Luana/a/112258816818626868
This https://arxiv.org/abs/2311.18726 has been replaced.
initial toot: https://mastoxiv.page/@a…
GraphiQ: Quantum circuit design for photonic graph states
Jie Lin, Benjamin MacLellan, Sobhan Ghanbari, Julie Belleville, Khuong Tran, Luc Robichaud, Roger G. Melko, Hoi-Kwong Lo, Piotr Roztocki
https://arxiv.org/abs/2402.09285
This https://arxiv.org/abs/2310.06881 has been replaced.
initial toot: https://mastoxiv.page/@arXiv_qbi…
I’m doing #python today...
Decided I wanted to extract the transcripts from videos of talks I’ve given, and used ChatGPT to write Python code (I‘m not a Python programmer) to read the YouTube API (which I’ve not used before). First thing I found is that OAuth is needed so that Google knows who you are. Then found that I can only read the transcript for videos I personally posted. So now ChatGPT is helping me write code to scrape the web page that I can see the Transcript on. No way I could have done this on my own.
I have a question for those who know #rust. When I went to school I learned Assembly, ANSI C, Java, and Perl (oh... and Mathematica, but I'm trying to forget it). Then I learned VB (later .NET), C , and Python on my own. I've never been a full-time developer, but I will pick up an occasional pet project. Nearly everything I've done in the last 10 years has been in python.
Should I learn Rust? Are there new #programming concepts? Are there other reasons, as am #infosec professional, that make it worthwhile to run to an "Intro to Rust" class?
This https://arxiv.org/abs/2111.00187 has been replaced.
link: https://scholar.google.com/scholar?q=a
I just published "I rewrote “Good Morning, Milwaukee!” in Python" over on @…. https://jws.news/2024/i-rewrote-good-morning-milwaukee-in-python/
This https://arxiv.org/abs/2002.07179 has been replaced.
link: https://scholar.google.com/scholar?q=a
This https://arxiv.org/abs/2309.14369 has been replaced.
initial toot: https://mastoxiv.page/@arXiv_…
"I was able to run the software on the first try, just by following the instructions (on MacOS). That doesn't happen often, especially with really complex software, and *especially* if Python is involved"
i know it's my efforts that are being praised, but still i can't help but feel sad
"i can install the application and it runs" is just about the lowest bar you can have. the bar of downloading random installers to run on your windows xp machine, b…
planetMagFields: A Python package for analyzing and plotting planetary magnetic field data
Ankit Barik, Regupathi Angappan
https://arxiv.org/abs/2405.07168
staring at 3 pages of a stacktrace from Python, thinking this could have been an if err != nil
Come for wisdom on tox & Nox – stay for unrelated gems that will improve your life! #python #video
https://youtu.be/ImBvrDvK-1U
#Python
As I'm working on my #networking diagnostic script which relies on my OS abstraction layer for system information I built a number of years back, I decided it would make more sense to formally port this API up to pypi as a standalone library. (It doesn…
RenPy is such an interesting project.
#programming #python
I think I have finally™️ (for the third or so time) found myself a solution for :python: #Python development on :nixos: #NixOS that allows me to just work with #pythonPoetry et. al. as on other distros.
…Retrospring
Your quite techy (more.then me lol). Do you program.anf if.so what? — I do! I program in rust or python usually, rn I’m trying to make a WM in rust using smithay
Feel free to check my github! https://retrospring.net/@Luana/a/112258816818626868
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
Here's my newest optimization idea for #Gentoo #Python: for pure Python packages and packages using the stable #CPython API, let's reuse previously built wheels if they're compatible instead of building them separately for each Python implementation.
This is mostly a major gain for the lot of packages using #setuptools when you're using multiple PYTHON_TARGETS, since calling into that build system has a significant cost. However, it also saves some actual compiling in the packages using the stable API (particularly, Rust packages).
https://github.com/gentoo/gentoo/pull/36672
https://bugs.gentoo.org/931689
This https://arxiv.org/abs/2305.04311 has been replaced.
link: https://scholar.google.com/scholar?q=a
Decided I wanted to extract the transcripts from videos of talks I’ve given, and used ChatGPT to write Python code (I‘m not a Python programmer) to read the YouTube API (which I’ve not used before). First thing I found is that OAuth is needed so that Google knows who you are. Then found that I can only read the transcript for videos I personally posted. So now ChatGPT is helping me write code to scrape the web page that I can see the Transcript on. No way I could have done this on my own.
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
New blog post: Python Project-Local Virtualenv Management Redux
In which I describe how I currently manage my virtual environments for both unpinned packages and pinned applications. It started as a TIL update to an older TIL, but as it grew more and more, I’ve concluded this is a proper blog post!
Enjoy: https://
cosmocnc: A fast, flexible, and accurate galaxy cluster number, count likelihood code for cosmology
\'I\~nigo Zubeldia, Boris Bolliet
https://arxiv.org/abs/2403.09589
How about tests that fail in a completely nondescript way if your hostname is 12 characters long? I mean, the bash prompt gets into output and breaks matching in one environment, and doesn't in an environment with a shorter hostname.
As it turns out, it was caused by putting a wrong path to bashrc override while adding zsh support to #ArgComplete. I guess most people didn't get a long enough bash prompt to hit the failure.
#Gentoo #Python
Breaking #Packages in #Python: an exposé of the nooks and crannies of Python’s modules and packages
https://dagster.io/bl…
Dziś jest jeden z tych dni, kiedy myślisz sobie: "hej, paczki, które używają Pythona i Rusta, mogą mieć *zarówno* testy na poziomie Pythona, jak i Cargo." I potem spędzasz sporo czasu, sprawdzając po kolei wszystkich rustowatych przedstawicieli dev-python/*, i dodając `cargo_src_test` gdzie trzeba.
Jak się okazuje, sporo paczek miało takie testy. Większość z nich nie linkuje się z libpython, więc wydaje mi się, że wystarczy testować je raz. Takie pydantic-core z kolei się lin…
Detecting Refactoring Commits in Machine Learning Python Projects: A Machine Learning-Based Approach
Shayan Noei, Heng Li, Ying Zou
https://arxiv.org/abs/2404.06572
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
SNAKE-fMRI: A modular fMRI data simulator from the space-time domain to k-space and back
Pierre-Antoine Comby (MIND, BAOBAB), Alexandre Vignaud (BAOBAB), Philippe Ciuciu (MIND)
https://arxiv.org/abs/2404.08282
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
2024-03-19, ogłoszono dwie dziury bezpieczeństwa na liście mailingowej, poświęconej problemom bezpieczeństwa Pythona: "quoted zip-bomb" i "TemporaryDirectory symlink dereference during cleanup". Obie miały dotykać wszystkich aktualnych wydań CPythona.
Tego samego dnia, wydano nowe wersje Pythona 3.10, 3.9 i 3.8. Co ciekawe, nie było wydań dla 3.11 i 3.12.
2024-04-02, w końcu otagowano Pythona 3.11.9. Początkowo, podpis dla archiwum się nie sprawdzał. Dziś już …
I’m happy to announce build-and-inspect-python-package v2.2.0 that uses build’s new --installer argument for EVEN FASTER builds: https://github.com/hynek/build-and-inspect-python-package/releases/tag/v2.2.0
SNAKE-fMRI: A modular fMRI data simulator from the space-time domain to k-space and back
Pierre-Antoine Comby (MIND, BAOBAB), Alexandre Vignaud (BAOBAB), Philippe Ciuciu (MIND)
https://arxiv.org/abs/2404.08282
do you think Python would let you mix 2-space, 4-space, and tab indentation, in the same file, on the same line? (poll)
heise | Python-Editor für Anfänger: Einfach Code schreiben mit Mu
Mu ist ein übersichtlicher Python-Editor, der gerade für Anfänger interessant ist. Hinter den großen Buttons des Editors warten nützliche Funktionen.
https…
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
New on blog: "the story of #distutils build directory in #Gentoo".
"""
The #Python distutils build system, as well as #setuptools (that it was later merged into), used a two-stage build: first, a build command would prepare a built package version (usually just copy the .py files, sometimes compile Python extensions) into a build directory, then an install command would copy them to the live filesystem, or a staging directory. Curious enough, distutils were an early adopter of out-of-source builds — when used right (which often enough wasn’t the case), no writes would occur in the source directory and all modifications would be done directly in the build directory.
Today, in the #PEP517 era, two-stage builds aren't really relevant anymore. Build systems were turned into black boxes that spew wheels. However, setuptools still internally uses the two-stage build and the build directory, and therefore it still remains relevant to Gentoo eclasses. In this post, I'd like to shortly tell how we dealt with it over the years.
"""
https://blogs.gentoo.org/mgorny/2024/03/13/the-story-of-distutils-build-directory-in-gentoo/
As we face source-only security Python releases: is there an installer for https://github.com/indygreg/python-build-standalone/releases/ that’s not wildly out of date (looking at you Hatch) and/or difficult to use outside of predefined workflows (looking at you …
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
I’m very happy to announce build-and-inspect-python-package 2.1.0!
The two highlights are: 1. it’s faster courtesy of uv and 2. it allows you define your strategy matrix based on your trove classifiers!
https://github.com/hynek/build-and-inspect…
I've done some benchmarks to demonstrate how different versions of #Gentoo parallel #Python extension builds (using #setuptools) #PEP517 code in distutils-r1.eclass improved over the years. I've even copied the numbers into a gnumeric spreadsheet. Now I just need to find energy to make a nice chart out of that (probably using PGF/Tikz).
Some numbers for a rough idea:
Cython 3.0.9 (package with a few C extensions):
- serial PEP517 build: 46.7 s
- parallel build / build_ext PEP517: 20.8 s 2.7 s
- parallel PEP517 via DIST_EXTRA_CONFIG: 22.8 s
django 5.0.3 (moderate pure .py package):
- PEP517 build: 5.4 s
- unnecessary build PEP517: 3.1 s 5.3 s
- unnecessary build_ext PEP517: 0.6 s 5.4 s
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
python_dependency: Python Dependency Network
Python's package dependency networks. Nodes in the network are Python's packages registered to PyPI and edges are dependencies among packages.
This network has 58743 nodes and 108399 edges.
Tags: Technological, Software, Unweighted
https://n…
On 2024-03-19, two vulnerabilities were announced on #Python #security mailing list: "quoted zip-bomb" and "TemporaryDirectory symlink dereference during cleanup". Both were announced to affect all current #CPython releases.
The same day, security releases were made for Python 3.10, 3.9 and 3.8 branches. So far, so good. However, I found it surprising that there were no releases being made for 3.11 or 3.12.
On 2024-04-02, Python 3.11.9 was tagged. Initially, the signature on source tarball didn't verify. Today, it does verify, but the release still doesn't seem to have been announced. However, what I found the most surprising is the lack of fixes for the security issues announced before! Was the release borked?
So I've checked in more detail… and it turned out that both issues were already fixed in 3.11.8 (and 3.12.2), so the security announcement was wrong. Sigh.
That said, #PyPy is still affected.
https://mail.python.org/archives/list/security-announce@python.org/thread/XELNUX2L3IOHBTFU7RQHCY6OUVEWZ2FG/
https://mail.python.org/archives/list/security-announce@python.org/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/
https://discuss.python.org/t/python-3-10-14-3-9-19-and-3-8-19-is-now-available/48993
https://bugs.gentoo.org/927299