FediScanner

#python

← Back

The controller for my sprinkler system died last year, and the good controllers are ridiculously expensive.

So I spent the afternoon writing a Python script to run my sprinkler system with a Raspberry Pi. I got it wired into an 8 relay module and verified that things are turning on and off like they're supposed to. Now just waiting for a 24VAC transformer, which should be here tomorrow, and my automatic sprinkler system will be back in business.

#Python #RaspberryPi #DIY #HomeAutomation

Show Original PostReport

Python Tip #219 (of 365):

Validate your ducks with goose typing.

You can use isinstance() WHILE duck typing. This is called goose typing (coined by Alex Martelli).

>>> from collections‍.abc import Iterable
>>> isinstance([1, 2, 3], Iterable)
True

Point doesn't inherit from Iterable:

class Point:
def __init__(self, x, y): self.x, self.y = x, y
def __iter__(self): yield from (self.x, self.y)

And yet...

>>> isinstance(Point(1, 2), Iterable)
True

🧵 (1/3)

Show Original PostReport

Affirm is hiring Software Engineer I, Full-Stack (Home and Search Experience)

🔧 #kotlin #python #aws #kubernetes #mysql
🌎 Remote; United States
⏰ Full-time
🏢 Affirm

Job details jobsfordevelopers.com/jobs/sof
#jobalert #jobsearch #hiring

Show Original PostReport

Keras 3.15.1

Keras 3.15.1은 보안 강화, 버그 수정, Python 3.14 호환성 개선을 포함한 패치 릴리스다. IMDB·Reuters·CIFAR 데이터셋 로딩에서 제한된 unpickler를 적용해 pickle 기반 임의 코드 실행(CWE-502) 위험을 줄였고, .keras 아카이브 추출 시 압축 해제 폭탄으로 인한 디스크 고갈 공격을 차단한다. H5 모델 파일의 중첩 그룹 경로를 검증해 잘못된 경로 탐색 가능성을 완화했으며, JAX NNX 백엔드에서 T5처럼 build 메서드가 없는 모델의 TraceContext 오류도 수정했다. Keras로 외부 모델·데이터셋 파일을 로드하는 서비스는 특히 보안 패치 적용을 검토할 만하다.

github.com/keras-team/keras/re

#keras #security #python #jax #machinelearning

Show Original PostReport

Кольца на срезе или сколько лет программисту?

Возраст дерева можно определить по количеству колец на срезе дерева. Сколько колец столько и лет. А как определить “профессиональный возраст” программиста ?

habr.com/ru/articles/1066816/

#возраст_программиста #java #python #linux #js

Show Original PostReport