Skip to content

Instantly share code, notes, and snippets.

from PIL import Image
from random import randint
import random
import os
def full_random_image():
image_name = random.choice(os.listdir("images"))
asset_image = Image.open("images/"+image_name)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tschucker
Tschucker / list_compression.ipynb
Created October 24, 2021 23:38
compress score list analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tschucker
Tschucker / nrf24l01_badge_code.py
Created January 18, 2022 01:02
nrf24l01 CircuitPython badge test
#NRF24L01 CircuitPython Badge Test
import board
import neopixel
import time
import struct
from adafruit_pybadger import pybadger
from digitalio import DigitalInOut
from circuitpython_nrf24l01.rf24 import RF24
# set this to 0 or 1 for the two badges
@Tschucker
Tschucker / aerochrome_emulation.ipynb
Created February 15, 2022 17:11
Python Aerochrome film emulation image processing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tschucker
Tschucker / attiny85_fuel_gauge.ino
Created June 17, 2022 20:39
battery voltage monitor for attiny85 arduino
#define MAX_V 1023
#define STEP_V 38
int voltage = 0;
void setup() {
pinMode(0, OUTPUT); //P0
pinMode(1, OUTPUT); //P1