python

Back Open Paginator
18.12.2025 16:46
majoranaoedipus (@majoranaoedipus@mathstodon.xyz)

AndreaCensi/contracts
> PyContracts is a #Python package that allows to declare constraints on function parameters and return values. Contracts can be specified using Python3 annotations, or inside a docstring. PyContracts supports a basic type system, variables binding, arithmetic constraints, and has several specialized contracts and an extension API.
github.com/AndreaCensi/contrac




Show Original Post


18.12.2025 16:39
majoranaoedipus (@majoranaoedipus@mathstodon.xyz)

numpy.org/neps/nep-0022-ndarra

And I didn't know that #NumPy has
NEPs

#Python




Show Original Post


18.12.2025 16:28
majoranaoedipus (@majoranaoedipus@mathstodon.xyz)

I have been investigating this:
```Python
from numbers import Real
def positive(x: Real) -> bool:
return x > 0 # Type Check failed!
```

#PEP 484 said that one should use `float` instead, but this does not solve for other numerical types e.g. #GMP numbers or #NumPy numbers.

And I found some old threads like github.com/python/typing/issue
github.com/python/mypy/issues/
discuss.python.org/t/numeric-g
discuss.python.org/t/clarifyin

And it seems like none has make any real progress.

To my understanding, ABC should also provides a good protocol for typing, just like typeclasses in #Haskell.

#Python #Typing #MyPy #Pyright




Show Original Post


18.12.2025 16:21
davidr (@davidr@hachyderm.io)

#constraintprogramming #ortools #scheduling/#routing #optimization

I think I'm thinking about this wrong.

My basic problem is scheduling #radar collection intervals in continuous time. There are many constraints on the intervals already and that's all working (by which I mean "running"--I'm not actually connected to a radar yet).

However, I also want to put a constraint on interval *transitions* to make sure we don't require the dish to move instantaneously.

AFAIK, the only way to constrain adjacent items like this is via a circuit. So I was going to add a "circuit overlay" to the model. Then I could say that the "edge" from radar dwell A to radar dwell B had to be a certain time distance apart or whatever.

I'm writing a tiny test program to see how that works and it isn't doing what I expect.

But in debugging that, I think I just realized my entire plan doesn't work. There's no reason the circuit overlay is going to come out in the same order as the intervals as laid out in time. That voids the entire plan!

Also, even though all the kids are home for #christmas none of the #nerd are awake for rubber-duckying

GRRRRRRRRRRRRRR

#python #software #engineering




Show Original Post


18.12.2025 16:17
urfistlyon (@urfistlyon@social.sciences.re)

Nous sommes particulièrement fiers de présenter, sous votre sapin de Noël, un programme particulièrement riche pour lancer 2026 : 🤩du Zotero bien sûr (avec ou sans IA), de la veille, des "Regex", du Wikipédia/data et Openrefine, du Python et encore du Python (pour les SHS) et toujours du Python (avec les LLM?), des cartes mentales, de la découvrabilité, de l'automatisation avec N8N, du Obsidian, du Html, de la sobriété numérique, des modèles ontologiques, de l'analyse de réseaux bibliographiques, du TXM, de la TEI, de la Dataviz et de la prise de parole en public, pour finir avec, n'en jetez plus, une "install party" Linux ! Amis de l'ESR, courez vite vous inscrire, les places vont être chères (quoique gratuites) !

#openscience #urfist #ist #python #wikipedia #linux #obsidian #txm #dataviz #etc

sygefor.reseau-urfist.fr/#/pro 🤩




Show Original Post


18.12.2025 16:17
reddit_tech_vn_bot (@reddit_tech_vn_bot@mastodon.maobui.com)

Sam Keen & Max Kirchoff thảo luận Kiến trúc Sạch với Python • Tham khảo [link] | Thảo luận [comments]. #DevTopic #Python #KiếnTrúcSạch #LậpTrìnhViên

reddit.com/r/programming/comme




Show Original Post


18.12.2025 16:16
ycombinator (@ycombinator@rss-mstdn.studiofreesia.com)

Using TypeScript to Obtain One of the Rarest License Plates
jack.bio/blog/licenseplate
#ycombinator #Life360 #API_reverse_engineering #driving_leaderboard #speed_leaderboard #viral_project #TikTok #programming #Python #Next_js #web_app #data_visualization #hacking #job_offer #side_project




Show Original Post


18.12.2025 16:16
RodStephens (@RodStephens@hachyderm.io)

Blur an area on an image in Python
rodstephensbooks.com/blur_area
#Python #Privacy #ImageProcessing #PIL #Drawing





Show Original Post


18.12.2025 16:04
majoranaoedipus (@majoranaoedipus@mathstodon.xyz)

Type Promotion Rules — Python array API standard DRAFT documentation
data-apis.org/array-api/draft/

#Python #TypeTheory




Show Original Post


18.12.2025 15:52
habr (@habr@zhub.link)

Строим сервис, который повышает собираемость показаний счетчиков ЖКХ

Привет, Хабр! Передача показаний счётчиков во многих домах всё ещё требует ручных действий. Жильцы откладывают эту задачу, пропускают сроки и получают пени. Чтобы повысить дисциплину, мы перенесли механику стриков, знакомую по одному приложению для изучения языков с совой — последовательные своевременные сдачи показаний образуют серию и небольшую скидку как вознаграждение, которая мотивирует поддерживать регулярность. В статье разберём Python-сервис, который отправляет персонализированные SMS, принимает ответы и подключает голосовой вызов для тех, кто не ответил.

habr.com/ru/companies/exolve/a

#sms_api #мтс_exolve #python #игрофикация #жкх #flask #коммунальные_платежи




Show Original Post


18.12.2025 15:45
ubuntu_touch (@ubuntu_touch@mstdn.social)

Graficar 9 cubos iguales en el espacio de forma asimétrica

¿ Quieres aprender a programas en Python ?
@python_cursos Costa Rica

#Python #plotly #Ramanujan #Simetrias





Show Original Post


18.12.2025 14:52
driscollis (@driscollis@mastodon.social)

has several constants that you cannot use as variables. 🐍🚀

Here are some examples:





Show Original Post


1 ...795 796 797 798 799 800 801 802 803 804 805 ...1578
UP