Install i2c tools to check for PCA9685 board.
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
Install vim and git.
| (ns wiki.core | |
| (:use net.cgrand.moustache | |
| ring.adapter.jetty | |
| ring.util.response | |
| [ring.middleware params stacktrace reload] | |
| hiccup.core | |
| com.ashafa.clutch) | |
| (:require [clojure.string :as s]) | |
| (:import org.pegdown.PegDownProcessor)) |
| #ifndef __NN_H | |
| #define __NN_H | |
| /* Data structures. | |
| * Nets are not so 'dynamic', but enough to support | |
| * an arbitrary number of layers, with arbitrary units for layer. | |
| * Only fully connected feed-forward networks are supported. */ | |
| struct AnnLayer { | |
| int units; | |
| double *output; /* output[i], output of i-th unit */ |
| ## | |
| ## Sample code to demonstrate circular time plots in R | |
| ## matt@baggott.net | |
| ## Dec 22, 2012 | |
| # inspired by | |
| # http://stackoverflow.com/questions/2076370/most-underused-data-visualization | |
| library(lubridate) | |
| library(circular) |
| # See also:_https://pythonspeed.com/articles/conda-docker-image-size/ | |
| # The conda env build stage image: | |
| # 1. Create conda env | |
| # 2. Optionally install conda dependencies | |
| # 3. Optionally install pip dependencies | |
| FROM continuumio/miniconda3 AS conda_build_env | |
| # Create a bare conda env. | |
| # We need at minimum python, pip, conda-pack and gcc and g++ (to build any binary pip packages later) |
| # Pyflink Streaming Table Env + Event Utilities Event Platform integration. | |
| # Download wikimedia-event-utilities Flink: | |
| # Download Wikimedia Event Utilities Flink jar, e.g. | |
| # https://archiva.wikimedia.org/#artifact-details-download-content/org.wikimedia/eventutilities-flink/1.2.0 | |
| # wget http://archiva.wikimedia.org/repository/releases/org/wikimedia/eventutilities-flink/1.2.0/eventutilities-flink-1.2.0-jar-with-dependencies.jar | |
| # Also download other dependencies we need: | |
| # wget https://repo1.maven.org/maven2/org/apache/flink/flink-connector-kafka/1.15.2/flink-connector-kafka-1.15.2.jar | |
| # wget https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/3.2.3/kafka-clients-3.2.3.jar | |
| # If you like, use ipython for your REPL, its nicer! |
Install i2c tools to check for PCA9685 board.
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
Install vim and git.
| set from="user@protonmail.com" | |
| set my_user="user@protonmail.com" | |
| set my_pass="pass" | |
| set ssl_starttls=yes | |
| set smtp_url="smtp://$my_user:$my_pass@127.0.0.1" | |
| # workaround for https://github.com/neomutt/neomutt/issues/1211 | |
| set imap_authenticators=login |
| # Instructions for fresh install | |
| $ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
| # reboot | |
| $ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
| $ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
| $ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
| $ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
| $ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
| $ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
| import numpy as np | |
| import pylab as pl | |
| from numpy import fft | |
| def fourierExtrapolation(x, n_predict): | |
| n = x.size | |
| n_harm = 10 # number of harmonics in model | |
| t = np.arange(0, n) | |
| p = np.polyfit(t, x, 1) # find linear trend in x | |
| x_notrend = x - p[0] * t # detrended x |