linuxmagazine, to RaspberryPi
@linuxmagazine@fosstodon.org avatar

Have you heard about @makerspace
Check out projects on smart homes, retro gaming, laser cutting, and more! Join now at https://makerspace-online.com

bbelderbos, to python
@bbelderbos@fosstodon.org avatar

🚀 Speed up your code 🐍 with caching ... 💡

You can use the functools.cache() decorator to cache expensive function results easily boosting performance. 😍📈

Simple example below:

f4grx,
@f4grx@chaos.social avatar

@bbelderbos you're giving a really bad example. Something that is expected to have some real time side effects like an accurate execution delay should always produce said side effect. Such shortcuts could have life threatening consequences if used in the proper bad way (as it will inevitably be)

bbelderbos,
@bbelderbos@fosstodon.org avatar

@f4grx it's a tip to show a Python feature, not production code. If you have a better example please post it here. Thanks.

anders, to ai
@anders@thoresson.social avatar

If I want to transcribe every new audio file that appears in a folder on my Mac using (Mac)Whisper and then run the transcription through a LLM using Ollama to clean it up, what are my best options? Do I have to write some Python code myself or is the readymade tools for this?

tartley,
@tartley@mastodon.social avatar

@anders I am a Python fanatic of many years but I'm not sure Python is the tool I'd reach for here. But I'm also a Mac newb so this is going to be very unhelpful. On Linux I'd do something like this, and I imagine there must be Mac equivalents:

In shell (I use bash, but I understand Mac defaults to zsh)

Use a loop like this to watch for changes in a folder:

inotifywait --quiet --monitor "$folder" | while read changed
do
echo "$changed"
done

1/n

tartley,
@tartley@mastodon.social avatar

@anders inotify watches for filesystem events without polling all the existing files. I'm fairly sure it doesn't exist on Mac, but there simply must be some equivalent.

Then, replace the 'echo' with the command needed to do the conversion on file "$changed". (Maybe this step is "then just draw the rest of the owl"? Sorry!)

doctormo, to python
@doctormo@floss.social avatar

I'm slowly making my way through a 8 thousand line python addition to 's library for parsing text and font elements in properly. It's important and useful, but it's also a lot.

I'm not sure how to say "please run pylint over your code because my eyes hurt trying to read this". without sounding like an ungrateful jerk. 😅

ZesteDeSavoir, to python French
@ZesteDeSavoir@framapiaf.org avatar

La PyConFR, la convention #python francophone, c’est pour bientôt ! Si vous souhaitez proposer une conférence, un atelier, ou un sprint de #programmation c’est le moment

https://zestedesavoir.com/billets/4677/pyconfr-2024-strasbourg/

phildini, to python
@phildini@wandering.shop avatar

Hi folks! Former chair of @ThePSF Conduct Working Group with a message that might be timely!

If you see a member of the community behaving against the spirit or the letter of the CoC, especially if the comments are in public about an official event, especially if using a hashtag, please report to conduct-wg@python.org as you are comfortable.

The WG might not be able to take action due to the CoC’s scope, but its useful background for the inevitable next incident.

Thanks! ✨

glyph,
@glyph@mastodon.social avatar

@phildini @ThePSF @Yhg1s sigh, sometimes you really can see that next incident coming without a telescope or nothin’, can’t you

treyhunner,
@treyhunner@mastodon.social avatar

@phildini not in the WG anymore but still able to put that "well I need to take action here" hat on. Thank you Philip! 💖

xgranade, to python
@xgranade@wandering.shop avatar

Welp, @andreasjung blocked me for asking him to not use his platform to spread COVID denialism. That's his right to do so, of course, but it really makes me sad that someone in the community would do this.

To everyone who supported and went along with the mask policies at PyCon this year, thank you so much.

iqbalabd, to python
@iqbalabd@mtd.pythonasia.org avatar

First thoughts coming back from #PyConUS #pyconus2024: Do you know anyone who works hard but is unrecognized in your #Python community? Nominate them for stuff at the @thepsf ! Don't know what or how? I've written a README here:
https://iqbalabdullah.net/en/posts/2024/05/nominating-pythonistas-at-the-psf/

Yhg1s,
@Yhg1s@social.coop avatar

@iqbalabd @hugovk @Thepsf the board makes the decisions for both of them. Sometimes a CSA nomination leads to a DSA being awarded. It doesn't hurt to suggest a DSA though :)

brainwane,
@brainwane@social.coop avatar

@iqbalabd Thank you for writing this!

https://www.python.org/community/awards/psf-awards/ doesn't have any awards after late 2022, and doesn't mention the 3 awards you pointed to in the March 2024 board meeting https://www.python.org/psf/records/board/minutes/2024-03-13/#new-business . So maybe those recipients haven't accepted their awards yet?

villares, to genart Portuguese
@villares@pynews.com.br avatar
datatrash,
@datatrash@mastodon.social avatar

@villares Very nice!

villares,
@villares@ciberlandia.pt avatar
ramikrispin, to python
@ramikrispin@mstdn.social avatar

This looks like a really cool course 👇🏼

College Precalculus – Full Course with Python Code by Ed Pratowski and freeCodeCamp focus on the foundation of calculus with Python implementation. This 12 hours course covers the following topics:
✅ Core trigonometry
✅ Matrix operation
✅ Working with complex numbers
✅ Probability

https://www.youtube.com/watch?v=Y8oZtFYweTY

#python #DataScience #MachineLearning #math

doctormo, to python
@doctormo@floss.social avatar

Are there any videos for ? I saw a bunch of comments about the keynote and other talks about they seemed really interesting, but I can't find anything after the fact.

mariatta,
@mariatta@fosstodon.org avatar

@doctormo if you're registered you can watch it in the online platform. (In person registration gets access to the online platform too).
Otherwise videos are usually uploaded to YouTube a little later. (Last year it took 2 months after the conference)

niccokunzmann, to python
@niccokunzmann@toot.wales avatar

I just found #Flet - which allows you to build #Python apps for the browser, Mac, Windows, Linux, Android and iOS! https://flet.dev/ 😍 I am excited!

treyhunner, to python
@treyhunner@mastodon.social avatar

With Python's slicing syntax, the first item is the start index, and the second item is the stop index.

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

_KevinTrainor,
@_KevinTrainor@mastodon.online avatar

@treyhunner Claiming that the second value is the “stop index” is not helpful to people learning Python for the first time. I like to say that the first value refers to the first position that you “want”. The second value refers to the first position that you “don’t want”.

treyhunner,
@treyhunner@mastodon.social avatar

@_KevinTrainor I agree with the sentiment, but I do think calling these by their names is helpful.

  1. Python uses the terms start, stop, and step for slices & ranges
  2. Names are handy for remembering, even when the names may feel a bit off. The alliteration helps a bit in this case too.

Calling out the exclusivity is definitely necessary though and calling it "weird" might me helpful too! I certainly critique some of Python's decisions ("I wish they were called generator comprehensions").

leanpub, to python
@leanpub@mastodon.social avatar
chrisjrn, to python
@chrisjrn@social.coop avatar

Now that #PyConUS is over, why not attend and support a regional #Python conference?

PyCon US sold out this year, and it will probably continue to do so. Smaller, regional events are going to be a more important part of how we support the growth of our community, but we need your support -- attendance and sponsorship -- to fulfil that role.

I run @NorthBayPython (#NBPy), but there's plenty of others in the US, including fellow @ThePSF events @pycascades and @pyohio off the top of my head.

chrisjrn,
@chrisjrn@social.coop avatar

What's the best way you can support @NorthBayPython right now?

Buy a ticket -- https://pretix.northbaypython.org/nbpy/nbpy-2024/ -- the event's in 5 weeks and we'd love to see you there.

Alternatively you can donate to us (tax-deductible in the US thanks to @ThePSF) https://psfmember.org/civicrm/contribute/transact/?reset=1&id=46 or sponsor us https://2024.northbaypython.org/sponsor

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