SnoopJ, to jupyter
@SnoopJ@hachyderm.io avatar

Dear #lazyweb, is there any good guide to configuring #Jupyter to have multiple kernels associated with distinct #Python virtual environments?

I know that this is a thing that can be done and I have done it, but only by cobbling together the information from docs and partially-useful posts on forums/etc.

I have never encountered a good write-up of it that is beginner-friendly.

(I know that you can install Jupyter into each venv and switch servers, but this is NOT what I am asking about)

grrrck, to python
@grrrck@fosstodon.org avatar

I made a little TikTok about my all-time favorite new feature: dark mode! ☀️🌙

This one is for Shiny for , but the version will be dropping soon so follow the @Posit channel to make sure you catch it!
https://www.tiktok.com/t/ZTL7qM1SK/

pybonacci, to python
@pybonacci@mastodon.social avatar

I am completely happy using pip, conda/mamba to manage my dependencies and environments.

Lately (and not so lately) I've seen poertry, pixi, hatch, pipenv, pdm, rye, uv,... Of course I feel I'm missing something. What are your thoughts/comments about these tools?

mathsppblog, to python
@mathsppblog@fosstodon.org avatar

Just used operator.itemgetter to reorder values of a dictionary.

Quite neat snippet of code:

from operator import itemgetter  
d = {"a": 1, "b": 2, "c": 3}  
it = "cab"  
print(itemgetter(*it)(d)) # (3, 1, 2)  

ehmatthes, to django
@ehmatthes@fosstodon.org avatar

django-simple-deploy 0.6.5 is out.

This solidifies support for Platform.sh; multiple deployments should work, and it should work if you have multiple orgs as well.

Now the work shifts to implementing an internal plugin model. I'm really looking forward to this phase of work. :)

https://github.com/ehmatthes/django-simple-deploy/blob/main/CHANGELOG.md

sethmlarson, to python
@sethmlarson@fosstodon.org avatar

Want to follow along with Nate Ohlson who's working on adopting hardened compiler options for as a part of Google Summer of Code 2024? They're publishing to Mastodon!

https://fosstodon.org/@nohlson@social.python-gsoc.org

bbelderbos, to python
@bbelderbos@fosstodon.org avatar

Did you know about this optimization tip? 💡

Integers from -5 to 256 are cached, meaning they are preallocated and reused, boosting memory efficiency. 📈

See below where I use "is" to show the ints that are preallocated to the same object = optimized:

FelipeSMBarros, to python Portuguese
@FelipeSMBarros@mastodon.social avatar

🚀 Anúncio: Nova Versão do Módulo Python crossfire!

A nova versão do módulo Python crossfire, desenvolvida por mim e @cuducos está disponível!

✨ Novidades:

Bug corrigido: Agora compatível com Google Colab!
Funcionalidade extra: Parâmetro que desempacota dados aninhados para facilitar a análise.
Ideal para jornalistas de dados e analistas! Cadastre-se na API do Fogo Cruzado e acesse os dados direto no Python.

Mapa da região de recife apresentando pontos indicando a localização de tiroteios e os motivos daods mesmos, como "Ataques a civis", "Ação Policial", entre outros.

djangobrew, to Podcast
@djangobrew@fosstodon.org avatar

Adam here! We are currently recording a new episode of Django Brew, but I wanted to document how (and a little bit of why!) we make this podcast. ✨

https://dev.to/adamghill/so-you-want-to-make-a-podcast-242c details our process and shows some of the behind-the-scenes work that goes into every episode. 😅

HelPy, to Finland
@HelPy@fosstodon.org avatar

🐍 🇫🇮 Welcome along to our third meetup of 2024 on Wednesday, 12th June, hosted by and !

https://helsinki-python.github.io
https://www.meetup.com/helpy-meetups/events/301336578/

We have two talks lined up:

↗️ How we use Python and Vector Embeddings for Item Recommendation at Wolt by Matias Jokela

🔃 Hybrid sync/async interfaces with AnyIO by Alex Grönholm

❓ And not forgetting the famous quiz!

📸 Photos from last time: https://www.meetup.com/helpy-meetups/photos/34491169/

dubbel, to python
@dubbel@mstdn.io avatar

Reported 5 malicious packages to : numberpy, tqmmd, pandans, openpyexl, reqwestss all by the same user leemay1782.

All with the same "functionality", getting commands via a socket from dzgi0h7on1jhzdg0vknw9pp9309rxjl8.oastify[.]com and executing it.
I don't think I saw the setup.py entry_points being used as a trigger mechanism before?

morenonatural, to emacs Spanish
@morenonatural@todon.nl avatar
villares, to python Portuguese
@villares@pynews.com.br avatar
kernellogger, (edited ) to linux
@kernellogger@fosstodon.org avatar

Wait, what? Building now (e.g. since [1], which is in 6.10-rc1) requires [2]? At least when building the msm graphics driver? Uhh, interesting. 🧐

[1] https://git.kernel.org/torvalds/c/5acf49119630a463b4f6daa4b96344f87453d46d and https://git.kernel.org/torvalds/c/0fddd045f88e34d6160785a3a5e506d374566454
[2] https://lore.kernel.org/all/87a5l0lmlv.fsf@intel.com/

levlaz, to python
@levlaz@hachyderm.io avatar

pro tip: learning this the hard way, if you're trying to fix linter issues based on ouput with or start fixing from the bottom of the output because if you start on the top then all of your changes will effect the downstream line number references.

itamarst, to python
@itamarst@hachyderm.io avatar

Another example of why you want to optimize your code before switching to parallel execution: an image processing algorithm where I get a 15× speedup by replacing generic APIs with specialized datastructures that allow reducing repetitive execution.

https://pythonspeed.com/articles/lets-optimize-median-local-threshold/

ivelasq3, to python
@ivelasq3@fosstodon.org avatar

Thank you, Rachael Dempsey, for the chance to talk about pins, Quarto, and scheduled publishing!

Also making dashboards is so much fun 🤓

🐙 Repo: https://github.com/posit-marketing/inflation-explorer
📹 Recording: https://www.youtube.com/watch?v=xnJuXOw7iu8
✍️ Slides: https://colorado.posit.co/rsc/inflation-explorer-slides/

mich_waveform, to Philippines
@mich_waveform@mastodon.social avatar

How do I find people (especially women and POC and LGBTQ+) who started as scientists and somehow found their way to programming and love it so much but were never formally trained and so they just figure it out as they go but they make it work anyway?? Too specific?? (I’m a half #filipino woman and ally, let’s be pals?) #python #rstats #diversityintech

mort, to python
@mort@fosstodon.org avatar

How are you supposed to distribute programs written in these days? You used to be able to package it up and put it on PyPI and tell people to just pip install it, but now that pip doesn't work without a virtualenv, what's the replacement?

I don't view telling people to pass --break-system-packages to be a good solution, I would rather want to avoid telling users to "break system packages"

qlp, to VintageOSes
@qlp@linh.social avatar
carlton, to python
@carlton@fosstodon.org avatar

I don’t know if the Mojo language is going to become the thing or not, but this post on memory management and ownership, by Chris Lattner no less, is absolutely worth your time. 👾

https://www.modular.com/blog/what-ownership-is-really-about-a-mental-model-approach

#Mojo #Python

andy47, to python
@andy47@aus.social avatar

Dear #python #lazyweb how do I create an instance of a dataclass with only some of the values specified? I can't seem to find a way to specify attribute names in the constructor, must I always just provide values in the order that they are specified in the class definition?

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

🎉 PyOhio Registration Is Open! is a FREE conference this July 27-28th in ,

https://www.pyohio.org/2024/attend/registration/

Join us to connect with folks who use Python in a vast number of ways: to solve problems around them, or make the world just a bit nicer or more fun, or just to make something small and lovely! If you’ve never programmed before, this is a great chance to see what you can do with Python. If you’ve used it for years, it’s a great chance to see different approaches!

zsol, to python
@zsol@mastodon.green avatar

https://notes.zsol.me/py.wtf/Web+Architecture is about fitting api docs for #python PyPI packages into the free tier of various providers

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