python

Back Open Paginator
02.04.2026 18:03
treyhunner (@treyhunner@mastodon.social)

“There is one feature of self-documenting expressions that I really appreciate: you can put spaces around the equal sign to make the result a little bit more readable.”

Read more 👉 pym.dev/debugging-with-f-strin




Show Original Post


02.04.2026 17:30
Reuven (@Reuven@fosstodon.org)

Have a #Python #Pandas series with datetime values, and want all those until now? Compare with pd.Timestamp.now():

df.loc[ pd.col('when') < pd.Timestamp.now() ]

This returns the rows from df where the "when" column is before now.





Show Original Post


02.04.2026 17:28
yvan (@yvan@toot.ale.gd)

#TIL: There is a UK Ministry of Justice #PyPi account: pypi.org/user/ministryofjustic

Discovered because I was wondering if there is a #Python library for UK public holiday data, as want something that updates itself really, and ideally isn't some sort of live API (which would be daft)... I mean, probability is fairly high we'll have some random extra one sooner rather than later when Charlie pops his clogs.

There is such a library, and the Minstry of Justice is one of its maintainers: pypi.org/project/govuk-bank-ho

Whodathunkit... (assuming this is a real official account.)




Show Original Post


02.04.2026 17:13
malick (@malick@infosec.exchange)

#Anthropics #Claude hat völlig autonom einen Root-Exploit für #FreeBSD gebaut. In exakt vier Stunden. Wir reden hier nicht von einem simplen "Schreib mir ein #Python-Skript"-Prompt, sondern von echtem, iterativem #hacking Das Modell hat die #Schwachstelle im Netzwerk-Login gefunden, sich selbständig ein Lab hochgezogen, den #Payload smart in mehrere Pakete gesplittet und den eigenen Code knallhart gedebuggt, wenn der erste Versuch gecrasht ist.

Der ganze Bericht unter

forbes.com/sites/amirhusain/20





Show Original Post


02.04.2026 17:00
PythonPeak (@PythonPeak@mastodon.social)

How to Use rpartition to Split From the Right

rpartition splits on the LAST occurrence. Perfect for filenames. One call. No regex. Nobody uses it.

#python #rpartition #split #string #howto #oneliner

youtube.com/watch?v=tYohVygO3-0




Show Original Post


02.04.2026 16:52
ubuntu_touch (@ubuntu_touch@mstdn.social)

Animacion 3D mostrando deformacion de rejilla

La fuerza de cizalla empuja las capas superiores de un cubo de goma mientras la base queda fija

#python #numpy crecimiento #STEM
software sostenible soberania #Anzoategui #Lecheria





Show Original Post


02.04.2026 16:44
CyberGame (@CyberGame@mastodon.social)

Scales of Justice
You are the Lady of Justice and you must keep the Serpent from rising up and corrupting your Python code-base.

Game Link: blackcatwhitehatsecurity.com/t





Show Original Post


02.04.2026 16:09
Posit (@Posit@fosstodon.org)

We are pleased to announce Quarto 1.9 ✈️

New features for #RStats, #Python, and #JuliaLang users include Posit Connect Cloud publishing, PDF accessibility (PDF/A & PDF/UA), brand asset synchronization, enhanced #Typst support, list table syntax, and #LLM -friendly output.

Learn more: quarto.org/docs/blog/posts/202




Show Original Post


02.04.2026 16:06
jrdepriest (@jrdepriest@infosec.exchange)

I'm writing Python and I'm not a Python person.

I have a need to get a Unix timestamp of a time that is an arbitrary number of days ago.

In PowerShell, you can do something like this:

PS > Get-Date -Date (Get-Date).AddDays(-30) -UFormat %s

In Python, this is the best I came up with and it is ugly:

import re
import datetime

`int(re.split('\\.',str((datetime.datetime.now(datetime.UTC) - datetime.timedelta(days=30)).timestamp()))[0])`

That was from me reading module documentation and hacking away at it for a bit.

Surely, there is a better way.

I'm interfacing with an API that only takes datetime in Unix Time format and only down to the second in precision.

#Python #DateTime #UnixTime #EpochTime




Show Original Post


02.04.2026 15:55
pypi (@pypi@fosstodon.org)

PSF Security developers have published incident reports on the LiteLLM & Telnyx #supplychain attacks. Read what happened, who's affected, and what developers & maintainers can do to prepare and protect themselves from future incidents. #security #python
blog.pypi.org/posts/2026-04-02




Show Original Post


02.04.2026 15:30
frontenddogma (@frontenddogma@mas.to)

So Where Are All the AI Apps?, by @algal.bsky.social and @rensd.bsky.social:

answer.ai/posts/2026-03-12-so-

#ai #dependencies #python #metrics




Show Original Post


02.04.2026 15:27
catalystcoop (@catalystcoop@mastodon.energy)

RE: mastodon.energy/@catalystcoop/

Last week, we told you there was one week left. Now, merely one week later, there are fewer than 48 hours left to apply to our data lab! Click the link! Apply! bit.ly/catalyst-data-lab

#Energy
#OpenData
#Electricity
#OpenSource
#Python
#Education




Show Original Post


1 ...232 233 234 235 236 237 238 239 240 241 242 ...1615
UP