python

Back Open Paginator
25.02.2026 18:05
brianb (@brianb@fosstodon.org)

I need to work with some data and struggling to think today.

I have a list of assignments in a SQL table. I have a separate table with scores for each assignment (linked to a user account). I need to turn this into a table of users and assignments.

My thought right now is to create a list of assignments and use that to create a collection of OrderedDicts with keys entered in the same order as the assignments list. Then I can iterate into table rows. Or is there a better method?

#python




Show Original Post


25.02.2026 18:00
bbelderbos (@bbelderbos@fosstodon.org)

Tomorrow's free LIVE session covers how to structure real Python projects using these patterns.

#Python #CleanCode #SoftwareEngineering #ABCs




Show Original Post


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

Apply different aggregations to each column when grouping on a #Python #Pandas data frame with agg and a dict:

(
df
.groupby('VendorID')
[['trip_distance', 'total_amount']]
.agg({'trip_distance':['median', 'std'],
'total_amount':'mean'})
)





Show Original Post


25.02.2026 16:37
treyhunner (@treyhunner@mastodon.social)

Newly public screencast on the lexicographical ordering of tuples in Python.

youtu.be/vJrYgnRYqPo




Show Original Post


25.02.2026 16:25
mopicmp (@mopicmp@mastodon.social)

Python Tip: Walrus Operator :=

# Assign AND test in one line
if (n := len(data)) > 10:
print(f'Too long: {n}')

The walrus operator (:=) assigns a value and returns it. Perfect for avoiding redundant...

raccoonette.gumroad.com/l/Pyth




Show Original Post


25.02.2026 16:25
mopicmp (@mopicmp@mastodon.social)

Python Tip: match/case (Structural Pattern Matching)

match command.split():
case ['go', direction]:
move(direction)
case ['pick', 'up', item]:
grab(item)
case _:
print('Unknown command')

Python 3.10 match/case goes beyond switch statements. It destructures and binds variables.

raccoonette.gumroad.com/l/Pyth




Show Original Post


25.02.2026 16:19
r (@r@fed.brid.gy)

[March, 4 , 2024]: An old, but important post. #Européens should take thos seriously #WhiteHouse Warns Against Using #Memory-Unsafe #programming #Languages Should we teach #Rust instead of #Python ? I would quite agree.. with this point of vue.. #education #cyber thenewstack.io/white-house-...

White House Warns Against Usin...




Show Original Post


25.02.2026 16:18
rod2ik (@rod2ik@mastodon.social)

[March, 4 , 2024]:
An old, but important post.
should take thos seriously

Warns Against Using -Unsafe

Should we teach instead of ? I would quite agree.. with this point of vue..

thenewstack.io/white-house-war




Show Original Post


25.02.2026 16:16
mgorny (@mgorny@social.treehouse.systems)

Aaand we're seeing the first '#setuptools < 82' runtime dependencies in random packages because they are trying hard to workaround breakage due to pkg_resources removal.

#Python




Show Original Post


25.02.2026 16:15
dnparadice (@dnparadice@mastodon.social)

More work on my pure . I added the ability to edit user functions for the calculator with syntax highlighting thanks to the IDLE editor.

github.com/dnparadice/PyCalc





Show Original Post


25.02.2026 15:26
villares (@villares@ciberlandia.pt)

Using #Processing's #ControlP5 #GUI library with #py5

discourse.processing.org/t/con

#CreativeCoding #Python #Java





Show Original Post


25.02.2026 14:46
driscollis (@driscollis@mastodon.social)

Read or subscribe to join almost 9000 other people here:

pythonpapers.com/p/python-pop-




Show Original Post


1 ...424 425 426 427 428 429 430 431 432 433 434 ...1590
UP