Skip to content

Instantly share code, notes, and snippets.

sudo apt install -y git build-essential autoconf pkg-config libssl-dev libvncserver-dev
git clone https://github.com/LibVNC/x11vnc.git
@XavierTolza
XavierTolza / update_rambox
Created July 2, 2019 15:11
Python script to automatically update rambox from deb
#!python3
import urllib3
import json
import re
import os
user_agent = {'user-agent': 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'}
http = urllib3.PoolManager(10, headers=user_agent)
url = "https://api.github.com/repos/ramboxapp/community-edition/releases"
data = json.loads(http.request('GET', url).data.decode("utf-8"))
assets = data[0]["assets"]
#!python3
import re
from argparse import ArgumentParser
from base64 import b64encode
from os.path import basename, abspath, dirname, join
parser = ArgumentParser()
parser.add_argument("filename")
args = parser.parse_args()
@XavierTolza
XavierTolza / fit.py
Created September 28, 2021 15:59
Fit 1st order
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import minimize
from scipy.signal import lfilter
t = np.linspace(0, 10, 1000)
y = (1 - np.exp(-t / 1))
y += np.random.normal(0, 0.05, y.shape)
import numpy as np
from scipy.optimize import minimize
from scipy.signal import lfilter, butter
Fs = 50
Ts = 1 / Fs # sec
tmax = 10 # sec
noise_level = 0.05
system_order = 1