Skip to content

Instantly share code, notes, and snippets.

View peterhinson's full-sized avatar
🌊

Peter Hinson peterhinson

🌊
View GitHub Profile
@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@endolith
endolith / Figure 1 zero-phase.png
Last active July 13, 2023 01:24
Multitone test signal generation (and Rudin-Shapiro sequence) in Python
Figure 1 zero-phase.png
@usmcamp0811
usmcamp0811 / ManyCSV_to_TFRecords.py
Last active May 23, 2019 01:51
Takes many CSVs and converts to a TFRecord file, then opens the TFRecords file and outputs training data
import tensorflow as tf
import pandas as pd
import numpy as np
from tqdm import tqdm
import os
def _int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
@eleciawhite
eleciawhite / td-snapshot.py
Created February 15, 2017 16:35
A Temporal-Difference Learning Snapshot
# ===== A Temporal-Difference Learning Snapshot =====
# Patrick M. Pilarski, pilarski@ualberta.ca, Feb. 11, 2017
# ----
# 'xt' and 'xpt1' are the state information for the current (time t) and next (time t+1) time steps in the form of binary vectors
# e.g., if you had a house with five rooms, 'xtp1' could be [0,0,1,0,0], with the single '1' indicating that you are in Room 3;
# in this case, 'xt' might be [0,1,0,0,0] indicating you were just in Room 2;
# for a robot servo, instead of "rooms" you could use binned joint angle ranges.
# 'r' is the signal to be predicted; this is a scalar and could represent reward, or any other signal of interest
# e.g., in the examples above, it might be the reward you get for entering a given room, or the current draw of the servo.
# 'gamma' is the desired time scale of the prediction (with 0 <= gamma <= 1);
@FabianInostroza
FabianInostroza / socketcan-golang.go
Last active August 21, 2023 13:25
SocketCan in Golang
package main
import "fmt"
import "golang.org/x/sys/unix"
import "net"
import "log"
import "encoding/binary"
import "flag"
// CANMsg almacena un mensaje de la red CAN
@boseji
boseji / Rpi-InfluxDB-Install.md
Last active February 5, 2022 17:34
Raspberry Pi InfluxDB installation

Raspberry Pi InfluxDB: The solution for IoT Data storage

Raspberry Pi is costeffect linux computer very commonly used for IoT home automation projects.

Here are the 3 problems with conventional databases for IoT data store applications:

  • Too much or complex configuration
  • Unable to expire data / set retentional policies
  • Not tailor made of Time Series Data
@AbsoluteDestiny
AbsoluteDestiny / 01. Download Locations for FFmpeg.md
Last active March 16, 2023 12:54
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@buptliuwei
buptliuwei / Kubernetes cluster setup based on amd64 && NVIDIA JETSON TX2.md
Last active August 31, 2020 21:54
Our project aims to build a Multi-platform kubernetes cluster, we use the VM on x86 as master node and two nvidia tx2 development kits as node. So we can schedule both CPU and GPU resources.

Kubernetes cluster setup based on amd64 && NVIDIA JETSON TX2

Thanks to @luxas create the Kubernetes on ARM project. But my project has some different, i have a VM on x86 as master node and two nvidia tx2 development kits as work node. So my kubernetes cluster are multi-platform. I use kubeadm as a deployment method.Some basic information of my platform is as follows.

Versions

kubeadm version (use kubeadm version):1.10.0

Environment:

  • Kubernetes version (use kubectl version):1.10.0
  • Cloud provider or hardware configuration:an amd64 master and 1 arm nodes (nvidia tagra TX2)
@endolith
endolith / DFT_ANN.py
Last active June 12, 2024 18:25
Training neural network to implement discrete Fourier transform (DFT/FFT)
"""
Train a neural network to implement the discrete Fourier transform
"""
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
import numpy as np
import matplotlib.pyplot as plt
N = 32
batch = 10000
@alexellis
alexellis / README.md
Last active July 29, 2021 18:09
Provision a Raspberry Pi SD card

You'll need

  • Raspberry Pi 3, 3+ or 2 (only)
  • A Linux PC, laptop or Raspberry with SD card reader/slot
  • A number of Raspberry Pis configured with Ethernet

You must have an SSH key, if you don't know what this is then type in ssh-keygen and follow the instructions.

Prepare to provision RPis: