Skip to content

Instantly share code, notes, and snippets.

View pepijndevos's full-sized avatar

Pepijn de Vos pepijndevos

View GitHub Profile
@pepijndevos
pepijndevos / wordle.py
Last active January 12, 2022 17:00
Try to play wordle optimally
choices = ["cigar", "rebut", "sissy", "humph", "awake", "blush", "focal", "evade", "naval", "serve", "heath", "dwarf", "model", "karma", "stink", "grade", "quiet", "bench", "abate", "feign", "major", "death", "fresh", "crust", "stool", "colon", "abase", "marry", "react", "batty", "pride", "floss", "helix", "croak", "staff", "paper", "unfed", "whelp", "trawl", "outdo", "adobe", "crazy", "sower", "repay", "digit", "crate", "cluck", "spike", "mimic", "pound", "maxim", "linen", "unmet", "flesh", "booby", "forth", "first", "stand", "belly", "ivory", "seedy", "print", "yearn", "drain", "bribe", "stout", "panel", "crass", "flume", "offal", "agree", "error", "swirl", "argue", "bleed", "delta", "flick", "totem", "wooer", "front", "shrub", "parry", "biome", "lapel", "start", "greet", "goner", "golem", "lusty", "loopy", "round", "audit", "lying", "gamma", "labor", "islet", "civic", "forge", "corny", "moult", "basic", "salad", "agate", "spicy", "spray", "essay", "fjord", "spend", "kebab", "guild", "aback", "motor", "alon
* schematic
Rresistor3 vcc out resistance=1000
Mnmos2 out in gnd gnd mymos w=0.001 l=0.00001
Vvsource4 in gnd dc=2 ac=1 sin(2.5 2.5 1000 )
Vvsource5 vcc gnd dc=5
ARR: 1.06%
ARR: -7.30%
ARR: 1.83%
ARR: 1.11%
ARR: 3.19%
ARR: -2.74%
ARR: -3.50%
RRR: -6.26%
RRR: 35.19%
@pepijndevos
pepijndevos / upload.py
Last active October 2, 2022 18:20
Upload code to the Robot Inventor hub
import base64
import json
import sys
import serial
import random
import os
if len(sys.argv) != 4:
print(f"Usage\n{sys.argv[1]} tty code.py slot")
exit()
@pepijndevos
pepijndevos / PKGBUILD
Last active March 21, 2021 15:16
capnproto-git PKGBUILD
# Maintainer: David Runge <[email protected]>
# Contributors: Dave Reisner <[email protected]>
# Matthias Blaicher <[email protected]>
# Severen Redwood <[email protected]>
_pkgname=capnproto
pkgname=capnproto-git
pkgver=0.8.r1.b5ab41ea
pkgrel=1
pkgdesc="Cap'n Proto serialization/RPC system"
.global Vss Vdd
.model digital_pulldown d_pulldown
.model digital_pullup d_pullup
Ad_pulldown Vss digital_pulldown
Ad_pullup Vdd digital_pullup
.SUBCKT __BUF_ A Y
.model buffer1 d_buffer
using ModelingToolkit
using StructuralTransformations
using OrdinaryDiffEq
using IfElse: ifelse
using Plots
function NMOS_L1(Vg, Vd, Vs, Vth, W, L, uCox)
Vgs = Vg-Vs
Vds = Vd-Vs
@pepijndevos
pepijndevos / nodevoltage.jl
Created December 2, 2020 19:54
Calculate node voltages from a netlist
using LinearAlgebra
@enum Element Resistor Voltage Current
netlist = [
(0, 1, Resistor, 4),
(0, 1, Current, 6),
(0, 2, Resistor, 6),
(0, 3, Resistor, 8),
(1, 2, Resistor, 3),
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
driver.get("https://www.domijn.nl/mijndomijn/inloggen/")
assert "Domijn" in driver.title
@pepijndevos
pepijndevos / main.rs
Last active May 3, 2020 16:35
ILI9341 program for STM32F4DISCOVERY that draws a circle, slowly.
#![no_main]
#![no_std]
use panic_halt as _;
use stm32f407g_disc as board;
use crate::board::{
hal::stm32,
hal::spi::{Mode, Phase, Polarity, Spi},