Skip to content

Instantly share code, notes, and snippets.

@sosi-deadeye
sosi-deadeye / gist:9c36d663bdb03bdb62d688b0ba7b1474
Created September 2, 2025 11:19
PPP Daemon for Raspberry Pi
# This is not complete yet nor tested
sudo apt-get update
sudo apt-get install ppp dnsmasq iptables
sudo nano /etc/ppp/peers/esp32 <<EOF
115200
noauth
local
nodetach
@sosi-deadeye
sosi-deadeye / PrimePY.py
Created March 25, 2021 18:57
made it more pythonnic
#!/usr/bin/env python3
"""
Python Prime Sieve
MyFirstPython Program (tm) Dave Plummer 8/9/2018
This is the main prime_sieve class. Call it with the number you wish as an upper limit, then
call the run method to do the calculation. print_results will dump the count to check validity.
#!/usr/bin/env python3
"""
This program find files by following pattern:
> dog000001.txt
> cat000054.txt
> lion010101.txt
> mouse123456.txt
@sosi-deadeye
sosi-deadeye / test101.py
Created April 5, 2020 13:29
Code Improvement
"""
https://pastebin.com/raw/dxUqR7RH
https://www.facebook.com/groups/PythonUserDeutschland/?multi_permalinks=2079508368861796&notif_id=1585918939113861&notif_t=group_highlights&ref=notif
"""
import csv
from contextlib import contextmanager
from datetime import datetime
import ratelimit
#!/usr/bin/env python3
"""
Das Programm lädt ein Wörterbuch herunter.
Alle Wörter mit 6 Zeichen und der Summe 66 werden ausgegeben
"""
import os
import sys
from argparse import ArgumentParser
from contextlib import contextmanager
"""
Delete everything, pictures are excluded.
"""
from argparse import ArgumentParser
from pathlib import Path
from textwrap import dedent
from PIL import Image, UnidentifiedImageError
"""
Delete everything, pictures are excluded.
"""
from argparse import ArgumentParser
from pathlib import Path
from textwrap import dedent
LOSS_LESS_FORMATS = (