python

Back Open Paginator
30.01.2026 00:10
sckottie (@sckottie@hachyderm.io)

Do the 2026 #python developers survey surveys.jetbrains.com/s3/pytho




Show Original Post


30.01.2026 00:02
gtronix (@gtronix@infosec.exchange)

"How to Install Odoo 19 on Ubuntu 24.04"

"Odoo is a popular open-source suite of business apps for CRM, e-commerce, accounting, and more. Learn how to install and deploy Odoo 19 inside a Python virtual environment on Ubuntu 24.04."

linuxize.com/post/how-to-insta

#Linux #Ubuntu #Python




Show Original Post


29.01.2026 23:43
paulox (@paulox@fosstodon.org)

I’ve just filled in the Python Developers Survey 2026 ✅

If you use Python at work or in your projects, it’s worth a few minutes. Python is a community-driven project, and this is one of the ways our voices actually get heard. 📢

Please take part 👇
pyfound.blogspot.com/2026/01/y

#Python #Developers #Survey





Show Original Post


29.01.2026 23:41
treyhunner (@treyhunner@mastodon.social)

Python Tip #29 (of 365):

When processing small files line-by-line, just read the whole thing into memory.

Reading files line-by-line with a "for" loop is a good practice if your files might be large, but for small files it's often faster to just read the whole file all at once and then call the splitlines() method:

lines = file.read().splitlines()

That should be pretty fast for kilobytes (or even megabytes) of data.

But... why use read() instead of looping?

🧵(1/2)




Show Original Post


29.01.2026 23:00
stephenblum (@stephenblum@mastodon.social)

I lost four nights of sleep to one missing semicolon.





Show Original Post


29.01.2026 22:58
stephenblum (@stephenblum@mastodon.social)

Python lets you redefine functions but it replaces the original.





Show Original Post


29.01.2026 22:56
stephenblum (@stephenblum@mastodon.social)

Python picked double underscores for special names, and I hate it.





Show Original Post


29.01.2026 22:55
stephenblum (@stephenblum@mastodon.social)

Imported cowsay in Python, said Hello world, and it worked.





Show Original Post


29.01.2026 21:57
dalke (@dalke@toots.nu)

How do I get #python #ctypes to understand a packed C structure on Linux-y x86_64&macOS w/ gcc and clang? I have:

typedef struct {
int index;
double score;
} __attribute__((__packed__)) hit;

For years I've used:

class Hit(ctypes.Structure):
_fields_ = [
("index", _ctypes.c_int32),
("score", _ctypes.c_double)]
_pack_ = 4

I started migrating to Python 3.14. It warns _pack_ requires _layout_ = "ms" for Microsoft layout.

Is that enough or do I also need __attribute__((ms_struct)) in C?




Show Original Post


29.01.2026 21:49
TechKeysX (@TechKeysX@mastodon.social)

S1 EP19 Lab 2 - Machine Learning in Python - Python Tuple Unpacking - for Beginners





Show Original Post


29.01.2026 21:32
reddit_tech_vn_bot (@reddit_tech_vn_bot@mastodon.maobui.com)

Chia sẻ mã code nhỏ cho Homelab! Một số script python hữu ích cho Emby Server. #Homelab #Script #Python #EmbyServer #TựHOST #MãCode #PhầnMềmMiễnPhí #CodeSnippets #SelfHosted

reddit.com/r/selfhosted/commen




Show Original Post


29.01.2026 20:40
itamarst (@itamarst@hachyderm.io)

Parallelism is one source of speed, but not the only one! In this article I demonstrate using it with NumPy, and how additional speedups are possible in other ways.

pythonspeed.com/articles/numpy

#python




Show Original Post


1 ...566 567 568 569 570 571 572 573 574 575 576 ...1587
UP