python

Back Open Paginator
15.10.2025 04:36
villares (@villares@pynews.com.br)

Checking out #shapely's `make_valid` that @hx2A told me about recently! very cool!

Code at: github.com/villares/sketch-a-d
More sketch-a-day: abav.lugaralgum.com/sketch-a-d
If you like this, support my work:
paypal.com/donate/?hosted_butt
liberapay.com/Villares
wise.com/pay/me/alexandrev562 #Processing #Python #py5 #CreativeCoding





Show Original Post


15.10.2025 04:35
villares (@villares@pynews.com.br)

Code at: github.com/villares/sketch-a-d
More sketch-a-day: abav.lugaralgum.com/sketch-a-d
If you like this, support my work:
paypal.com/donate/?hosted_butt
liberapay.com/Villares
wise.com/pay/me/alexandrev562 #Processing #Python #py5 #CreativeCoding





Show Original Post


15.10.2025 03:25
mlaachir8 (@mlaachir8@mastodon.social)




Show Original Post


15.10.2025 03:20
peterdrake (@peterdrake@mstdn.social)

TIL Python and Taylor Swift were born the same month (December 1989). #Python #TaylorSwift




Show Original Post


15.10.2025 03:05
mlaachir8 (@mlaachir8@mastodon.social)




Show Original Post


15.10.2025 03:01
mlaachir8 (@mlaachir8@mastodon.social)




Show Original Post


15.10.2025 02:57
faraiwe (@faraiwe@mstdn.social)

#Python





Show Original Post


15.10.2025 02:27
linuxgal (@linuxgal@techhub.social)

Parse boolean expressions and build a truth table with #Python #TN

#!/usr/bin/python3
import sys
from sympy.logic.boolalg import truth_table
from sympy import sympify
expr_str = sys.argv[1]
try:
expr = sympify(expr_str)
except Exception as e:
print("Error parsing expression:", e)
sys.exit(1)
vars_in_expr = sorted(expr.free_symbols, key=lambda s: s.name, reverse=True)
table = truth_table(expr, vars_in_expr)
print(' '.join(str(v) for v in vars_in_expr), ':', expr_str)
for vals, result in table:
print(' '.join(str(v) for v in vals), ':', int(bool(result)))





Show Original Post


15.10.2025 02:03
clonbg (@clonbg@masto.es)

Un par de cursos de Youtube sobre programación myblog.clonbg.es/un-par-de-cur #Programación #VueJs #Python clonbg.es





Show Original Post


15.10.2025 01:40
mlaachir8 (@mlaachir8@mastodon.social)

salam




Show Original Post


15.10.2025 01:14
modulux (@modulux@node.isonomia.net)

Well, PyPI uses HCaptcha. So no registration for me. #a11y #python




Show Original Post


15.10.2025 00:58
walidelhefny (@walidelhefny@mastodon.social)

Swapping Variables in Python 🐍

How does swapping variables using a,b = b,a work in Python?

R1: Pack a and b into a temporary tuple (b,a).
R2: Assign the first tuple item to a.
R3: Assign the second tuple item to b.

🎥 Free Python beginners YouTube course: youtube.com/watch?v=bLSTVnkDfUg





Show Original Post


1 ...1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 ...1560
UP