pyOpenSci, to opensource
@pyOpenSci@fosstodon.org avatar

python -m pip install sciform

You can wrestle with scientific-formatting yourself, or you can use the sciform package from Justin Gerber!

sciform is used to convert python numbers into strings according to a variety of user-selected scientific formatting options including decimal, binary, fixed-point, scientific and engineering formats, using documented standards wherever possible!

📄 documentation: https://sciform.readthedocs.io/en/stable/

asx, to python
@asx@hachyderm.io avatar

Reminder that @pyohio CFP closes this Sunday May 26, 2024 AoE. If you have a proposal that you have in your drafts (in your brain or in writing) now is the time. Details: https://www.pyohio.org/2024/speaking/cfp/
Lets go!! :python_logo:

fabian, to python
@fabian@floss.social avatar

🐍 aprxc — A tool to approximate the number of distinct values in a file/iterable using the (easy to understand) Chakraborty/Vinodchandran/Meel .

:codeberg: https://codeberg.org/fa81/ApproxyCount

Vs. sort | uniq -c | wc -l: needs slightly more memory, but 5x faster.

Vs. awk '!a[$0]++' | wc -l: just as fast, using much less memory (20x-150x for large inputs).

At the cost of ~1% inaccuracy (configurable).

Useful? You decide! :)

¹ https://arxiv.org/pdf/2301.10191#section.2

box464, to python
@box464@mastodon.social avatar

A free intro to python webinar for kids this weekend!

https://guruface.com/webinar/python-coding-classes-for-kids/416

mblayman, to python
@mblayman@mastodon.social avatar

🐍 I read all of the standard library documentation. Should you do that? Here's what I learned by taking that journey. https://www.mattlayman.com/blog/2016/readthrough-python-standard-library/

pamelafox, to python
@pamelafox@fosstodon.org avatar

My talk for Posette this year will be about "pgvector for Python developers" - two of my current fav things. The conf is virtual and free, so join us on June 12th!

https://www.citusdata.com/posette/speakers/pamela-fox#abstract

Pamela pointing at her slides about pgvector for Python developers

mmisamore, to neovim
@mmisamore@sigmoid.social avatar

I wrote a little custom terminal toggle for in : https://github.com/mmisamore/neovim-config/blob/c74c848d2abdb348687f850bb6fc7591d4da7c52/init.fnl#L151

Works well enough with ipython with autoindent disabled. Posting in case anybody finds it helpful as an alternative to fancy plugins.

pamelafox, to python
@pamelafox@fosstodon.org avatar

My talk from VS Code Day is now live!

"Building a RAG-powered AI chat app with Python and VS Code"

I showed how to do RAG on a local PostgreSQL database, both with Ollama and OpenAI models.

https://www.youtube.com/watch?v=3ctFWU492xk

JasonBrewster,
@JasonBrewster@fosstodon.org avatar

@pamelafox Excellent Video!

Lot's of good best practices to communicate with wider teams.

is it possible to get the PPT?

rvstaveren, to python Dutch
@rvstaveren@mastodon.online avatar

TIL: Need a turnkey terminal progress indicator for anything that is iterable in ? I discovered https://tqdm.github.io is perfect for that job

jpmens,
@jpmens@mastodon.social avatar

@rvstaveren highly cool!

ramikrispin, to python
@ramikrispin@mstdn.social avatar

(1/4) TIL about the plotnine library- the grammar of graphics in Python 🚀

I had never heard about the Plotnine library until I came across the Posit Plotnine contest (see the link below). The plotnine is a Python implementation of a grammar of graphics based on the ggplot2 library.

image/png
image/png

bbelderbos, to python
@bbelderbos@fosstodon.org avatar

Tip: you can create an entry point to your package by adding a main.py module to it.

This makes it callable using: python -m my_package.

Example:

bbelderbos,
@bbelderbos@fosstodon.org avatar

Related video:

How to add an entry point to your package
https://www.youtube.com/watch?v=ERRIJUvK5Q0

martinpeck, to python
@martinpeck@fosstodon.org avatar

A lot of of people on social media such as LinkedIn will post "What do you think this python code will do? A, B, or C" questions.

Are these useful to anyone?

The code is generally of a style I'd recommend people avoid writing, or that I'd question in a code review. Often it's using strange edge-cases for what's possible...but not what's idiomatic or "good".

I can't imagine they're useful to people learning . I imagine they deter some people from using . Am I wrong?

Daves,
@Daves@fosstodon.org avatar

@martinpeck These are the sort of questions I’d expect on a certification exam so unless I’m prepping for a specific certification, I tend to ignore them. For day to day developer use, I don’t find them particularly useful and usually ignore them.

davep,
@davep@fosstodon.org avatar

@martinpeck Honestly… I generally read them as a weird and irritating self-serving flex.

edsuom, to python
@edsuom@hachyderm.io avatar

To those who follow this account for rants and politely tolerate my posts about the wonderful and elegant programming language I’ve used almost daily for over a decade: The conference required masks because they apparently haven’t stopped caring about the people behind the keyboards.

Yes, masks. In 2024. At a tech conference. It’s a beautiful thing.

villares, to python Portuguese
@villares@pynews.com.br avatar
treyhunner, to python
@treyhunner@mastodon.social avatar

On the other hand, adding or removing items from the beginning of a list is very slow (it requires shifting all items after the change).

Read more 👉 https://trey.io/d8D57O

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