gerowen, to python
@gerowen@mastodon.social avatar

Just posted an update for my little #Python #programming project that downloads videos from sites like YouTube. You can check it out here:

https://sourceforge.net/projects/youtube-dl-gtk/

hynek, to python
@hynek@mastodon.social avatar

While frantically preparing for my vacation after just coming back from PyCon (don’t ask), I’ve pushed out https://github.com/hynek/build-and-inspect-python-package/releases/tag/v2.6.0 that adds support for the new ubuntu-24.04 builders and the name of the uploaded artifact as a new output.

villares, to python Portuguese
@villares@pynews.com.br avatar

I'm happy with this, I converted yesterday's sketch to an OO strategy and I could solve my "parent angle alignment" wishes. Code at: https://github.com/villares/sketch-a-day/tree/main/2024/sketch_2024_05_26
More sketch-a-day: https://abav.lugaralgum.com/sketch-a-day
I really need your support to keep going, if you can, donate any amount at: https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724

tiago, to python
@tiago@social.skewed.de avatar

@graph_tool has now a much improved integration with @matplotlib that works with every backend including @ProjectJupyter notebooks!

Check it out: https://graph-tool.skewed.de/static/doc/demos/matplotlib/matplotlib.html

pizzatorque, to python
@pizzatorque@emacs.ch avatar

I'm live on Twitch, come hang out! Let's make a simple lemmy terminal client in https://www.twitch.tv/PizzaTorque?sr=a

mayz, to python German
@mayz@chaos.social avatar
asx, to python
@asx@hachyderm.io avatar
ehmatthes, to python
@ehmatthes@fosstodon.org avatar

TIL how to use itertools.dropwhile() to get all lines from a file after a specific line. I always used to write my own loop to solve this problem.

I'm curious, have you heard of dropwhile()? Have you used it?

gvwilson, to python
@gvwilson@mastodon.social avatar

Using Python 3.11 or higher, I want to create an output file and add a line describing it to a log file as an atomic operation: either the output file is created and the log entry is added, or neither happens. fcntl.flock() is only advisory - will something else give me stronger guarantees, preferably on all three major OSes? -lock -operation

fohrloop, to python
@fohrloop@fosstodon.org avatar

Can sigtore signatures be uploaded to PyPI, and is there / would there be any use for them?

I was reading through https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ and noticed the .sigstore files were only uploaded to GitHub Releases.

#python #pypi #pythonpackaging #sigstore

snacktraces, to python
@snacktraces@hachyderm.io avatar

Ready to give your first talk at a software development conference? Want to share some Python related goodness with us?

I highly recommend you consider submitting for PyOhio 2024. Newbie friendly submission and more.

via @pyohio

https://fosstodon.org/@pyohio/112497649105690385

#python #SoftwareDevelopment

dcz, to rust
@dcz@fosstodon.org avatar

Trying to write a exploration tool. I've been putting it away because GUIs are painful.

Now trying again: looks fine, but not clear how to style tables.

Maybe I'll go back to . The idea of callbacks can be annoying, but at least styling is a breeze. You can even put widgets inside cells!

It turns out that making GUI is hard.

JackEvans, to python
@JackEvans@fosstodon.org avatar

Python folks I'm looking for a tool.

I want something like modulefinder that I can point at a target that outputs a subset of deps/requirements (so I can tree shake requirements in a monorepo).

Does such a tool exist? (before I attempt to write one)

#Python

wgrav, to python

does anyone know of a good api wrapper for creating ? looking to create something similar to reddit's u/cahbot for the fun of it (if it doesn't exist already)

bbelderbos, to Podcast
@bbelderbos@fosstodon.org avatar

And we're back with a new @pybites #podcast episode debriefing Pycon US 2024: favorite moments, takeaways / lessons, inspiration, and more. 😍 📈 🔥

And as usual we geek out over #books 😄 💡

Check it out here:
https://www.youtube.com/watch?v=-JR9QbXCF1U

#python #conference #pycon #developer

villares, to python Portuguese
@villares@pynews.com.br avatar
pizzatorque, to emacs
@pizzatorque@emacs.ch avatar

I'm live on Twitch, come hang out! and shenanigans and making a minimal terminal client for lemmy. https://www.twitch.tv/PizzaTorque?sr=a

jhx, to python
@jhx@fosstodon.org avatar

Cool #Python module to make reuqests over #Tor :python:

https://pypi.org/project/requests-tor/

paulox, to python
@paulox@fosstodon.org avatar

Today at 12.35 PM CEST I'll present the talk "Many ways to be a Python contributor" at PyCon Italia 2024 🚀

You can follow the talk in the Tagliatelle room or watch it live online on the website 👇
https://2024.pycon.it/en/event/many-ways-to-be-a-python-contributor

#PyCon #PyConIT #PyConIT24 #PyConIT2024 #PyConItalia #Python

jonny, to python
@jonny@neuromatch.social avatar

Here's an ~ official ~ release announcement for

repo: https://github.com/p2p-ld/numpydantic
docs: https://numpydantic.readthedocs.io

Problems: @pydantic is great for modeling data!! but at the moment it doesn't support array data out of the box. Often array shape and dtype are as important as whether something is an array at all, but there isn't a good way to specify and validate that with the Python type system. Many data formats and standards couple their implementation very tightly with their schema, making them less flexible, less interoperable, and more difficult to maintain than they could be. The existing tools for parameterized array types like nptyping and jaxtyping tie their annotations to a specific array library, rather than allowing array specifications that can be abstract across implementations.

numpydantic is a super small, few-dep, and well-tested package that provides generic array annotations for pydantic models. Specify an array along with its shape and dtype and then use that model with any array library you'd like! Extending support for new array libraries is just subclassing - no PRs or monkeypatching needed. The type has some magic under the hood that uses pydantic validators to give a uniform array interface to things that don't usually behave like arrays - pass a path to a video file, that's an array. pass a path to an HDF5 file and a nested array within it, that's an array. We take advantage of the rest of pydantic's features too, including generating rich JSON schema and smart array dumping.

This is a standalone part of my work with @linkml arrays and rearchitecting neurobio data formats like NWB to be dead simple to use and extend, integrating with the tools you already use and across the experimental process - specify your data in a simple yaml format, and get back high quality data modeling code that is standards-compliant out of the box and can be used with arbitrary backends. One step towards the wild exuberance of FAIR data that is just as comfortable in the scattered scripts of real experimental work as it is in carefully curated archives and high performance computing clusters. Longer term I'm trying to abstract away data store implementations to bring content-addressed p2p data stores right into the python interpreter as simply as if something was born in local memory.

plenty of todos, but hope ya like it.

[Further demonstration of validation and array expression, where a Union of NDArray specifications can specify a more complex data type - eg. an image that can be any shape in x and y, an RGB image, or a specific resolution of a video, each with independently checked dtypes] For example, to specify a very special type of image that can either be a 2D float array where the axes can be any size, or a 3D uint8 array where the third axis must be size 3 a 1080p video from typing import Union from pydantic import BaseModel import numpy as np from numpydantic import NDArray, Shape class Image(BaseModel): array: Union[ NDArray[Shape["* x, * y"], float], NDArray[Shape["* x, * y, 3 rgb"], np.uint8], NDArray[Shape["* t, 1080 y, 1920 x, 3 rgb"], np.uint8] ] And then use that as a transparent interface to your favorite array library! Interfaces Numpy The Coca-Cola of array libraries import numpy as np # works frame_gray = Image(array=np.ones((1280, 720), dtype=float)) frame_rgb = Image(array=np.ones((1280, 720, 3), dtype=np.uint8)) # fails wrong_n_dimensions = Image(array=np.ones((1280,), dtype=float)) wrong_shape = Image(array=np.ones((1280,720,10), dtype=np.uint8)) # shapes and types are checked together, so this also fails wrong_shape_dtype_combo = Image(array=np.ones((1280, 720, 3), dtype=float))
[Demonstration of usage outside of pydantic as just a normal python type - you can validate an array against a specification by checking it the array is an instance of the array specification type] And use the NDArray type annotation like a regular type outside of pydantic – eg. to validate an array anywhere, use isinstance: array_type = NDArray[Shape["1, 2, 3"], int] isinstance(np.zeros((1,2,3), dtype=int), array_type) # True isinstance(zarr.zeros((1,2,3), dtype=int), array_type) # True isinstance(np.zeros((4,5,6), dtype=int), array_type) # False isinstance(np.zeros((1,2,3), dtype=float), array_type) # False
[Demonstration of JSON schema generation using the sort of odd case of an array with a specific dtype but an arbitrary shape. It has to use a recursive JSON schema definition, where the items of a given JSON array can either be the innermost dtype or another instance of that same array. Since JSON Schema doesn't support extended dtypes like 8-bit integers, we encode that information as maximum and minimum constraints on the

nedbat, to python
@nedbat@hachyderm.io avatar

The joy of trying to be on the cutting edge of #Python:

HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
'Programming Language :: Python :: 3.14' is not a valid classifier.

ptmcg, to python
@ptmcg@fosstodon.org avatar

I just published 0.9.0 version of logmerger, compatible with Python 3.13. Here is an example merge of a client and server log, plus PCAP packet capture file showing TCP send/receive traffic. Uses textual TUI framework for cursor and mouse interaction in a terminal session. https://pypi.org/project/logmerger

villares, to python Portuguese
@villares@pynews.com.br avatar
pyohio, to python
@pyohio@fosstodon.org avatar

🚨 🚨 🚨 We're approaching the Final Call for Proposals for #PyOhio 2024!!! 🚨 🚨 🚨

This Sunday, Anywhere on Earth (AoE) Will be your last chance to submit a talk for our awesome conference!

If you had fun at #PyCon and want to keep hanging out with the #Python Community, or have something you want to share with the rest of us, please submit a talk! We love first time speakers!

Find out more here:
https://www.pyohio.org/2024/speaking/cfp/

NorthBayPython, to python
@NorthBayPython@social.northbaypython.org avatar

It's a great week to buy your ticket to #NBPy 2024, Northern California's most one-track #Python conference:

  • 17 talks from Pythonistas from around California and the world (https://2024.northbaypython.org)
  • Outdoors in glorious California weather, in a very well-ventilated venue (a relaxed, data-informed hybrid masking policy compared with last year)
  • Beautiful scenery, friendly barn cats
  • Confirmed quite decent food

Convinced? See you there! Tickets at https://pretix.northbaypython.org/nbpy/nbpy-2024/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • InstantRegret
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • JUstTest
  • Durango
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • lostlight
  • All magazines