Skip to content

Instantly share code, notes, and snippets.

f(x): x^n
f'(x): xn^(n-1)
f(x): 1/x
f'(x): -1/x^2
f(x): sqrt(x)
definition:
x \in [0; \infty[
derivation:
@zoeleu
zoeleu / affinepy.py
Created August 25, 2022 14:40
affine.py
from math import *
@zoeleu
zoeleu / converterpy.py
Last active March 30, 2022 18:54
converter.py
from math import *
import kandinsky
import ion
from ion import *
LCD_HEIGHT = 320
LCD_WIDTH = 222
def convert(i, modifier, exponent):
return i * (modifier**exponent)
@zoeleu
zoeleu / mandelbrotfbpy.py
Last active March 29, 2022 17:36
mandelbrot-fb.py
from math import *
from kadinsky import set_pixel, color
def mandelbrot(N_iteration):
for x in range(320):
framebuffer = []
for y in range(222):
# Compute the mandelbrot sequence for the point c = (c_r, c_i) with start value z = (z_r, z_i)
z = complex(0,0)
# Rescale to fit the drawing screen 320x222
@zoeleu
zoeleu / calcpytest.py
Last active November 11, 2021 19:14
calcpytest
from math import *
@zoeleu
zoeleu / noto-emoji.sh
Last active April 2, 2021 20:43
Noto Emoji for arch linux!
#!/bin/sh
set -e
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
echo "Setting up Noto Emoji font..."
# 1 - install noto-fonts-emoji package
pacman -S noto-fonts-emoji --needed
# pacman -S powerline-fonts --needed
echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)"
# 2 - add font config to /etc/fonts/conf.d/01-notosans.conf
echo "<?xml version="1.0"?>
@zoeleu
zoeleu / manifest.schema.json
Created November 18, 2020 13:10
Chrome Manifest Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Manifest",
"description": "A Google Chrome extension manifest",
"type": "object",
"required": [
"manifest_version",
"name",
"version"
],