Skip to content

Instantly share code, notes, and snippets.

View rytse's full-sized avatar

Ryan Tse rytse

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rytse on github.
  • I am rytse (https://keybase.io/rytse) on keybase.
  • I have a public key whose fingerprint is DFA3 7368 0621 E4F7 1FB7 6078 6CDA ED61 C183 FDED

To claim this, I am signing this object:

@rytse
rytse / pidHelper.R
Last active November 12, 2016 23:29
R script to plot data used for tuning PID
############################################################
# Script: pidHelper.R #
# Author: Ryan Tse #
# #
# This script is meant to assist PID tuning. It takes a #
# log file containing throttle/setpoint and encoder/ #
# measured data over time. It plots the setpoint and #
# measured value over time, the error over time, the #
# derivative (differences) of the error over time, and the #
# integral (cumulative sum) of the error over time. #
@rytse
rytse / vidhsvcontour.py
Last active March 31, 2021 16:58
Python OpenCV script for HSV filtering, finding contours, and displaying the contours
import cv2
import numpy as np
def nothing(n):
pass
# Contours w/ greatest number of points
# TODO max by area
def biggestContourI(contours):
maxVal = 0
@rytse
rytse / PathfinderTester.java
Created March 16, 2017 20:44
Generates the left and right MPs for FRC Team 449 2017 robot's right side autonomous routine
package net.tse.pathfindertest;
import jaci.pathfinder.Pathfinder;
import jaci.pathfinder.Trajectory;
import jaci.pathfinder.Waypoint;
import jaci.pathfinder.modifiers.TankModifier;
import java.io.FileWriter;
import java.io.IOException;
@rytse
rytse / network_visualizer.py
Created August 3, 2017 04:04
Python script for visualizing a few deep neural net variant topologies using python graph-tool
#!/usr/bin/env python
from graph_tool.all import *
# Vanilla
vg = Graph()
vil = [vg.add_vertex() for i in xrange(3)]
vd1 = [vg.add_vertex() for i in xrange(10)]
vd2 = [vg.add_vertex() for i in xrange(10)]
vol = [vg.add_vertex() for i in xrange(6)]
@rytse
rytse / pybombs_install_gr-radar_log.txt
Created July 17, 2018 12:50
Log of how PyBOMBS fails to install gr-radar
make all-recursive
make[1]: Entering directory '/usr/local/src/apache-thrift'
Making all in lib/cpp
make[2]: Entering directory '/usr/local/src/apache-thrift/lib/cpp'
Making all in .
make[3]: Entering directory '/usr/local/src/apache-thrift/lib/cpp'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/usr/local/src/apache-thrift/lib/cpp'
make[2]: Leaving directory '/usr/local/src/apache-thrift/lib/cpp'
Making all in compiler/cpp
@rytse
rytse / .tmux.conf
Last active July 26, 2019 22:45
NRL tmux
######################
### DESIGN CHANGES ###
######################
set -g default-terminal "screen-256color"
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
@rytse
rytse / setup.sh
Last active December 29, 2021 02:21
## Personal setup script
## TODO: before using, change email addresses in git and ssh
# Update system, install the basics
sudo apt update; sudo apt -y upgrade
sudo add-apt-repository ppa:pi-rho/dev -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade -y
(env) rytse@SEDRSSHYPRES:~$ !pybombs
pybombs prefix init ~/prefix -a myprefix -R gnuradio-default
PyBOMBS - INFO - PyBOMBS Version 2.3.2
PyBOMBS.prefix - WARNING - There already is a prefix in `/home/rytse/prefix'.
Continue using this path Y/[N]? y
Alias `myprefix' already exists, overwrite Y/[N]? y
PyBOMBS.prefix - INFO - Installing default packages for prefix...
PyBOMBS.prefix - INFO -
- gnuradio
PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing.
(env) rytse@SEDRSSHYPRES:~$ pip install numpy mako lxml cheetah
Collecting numpy
Using cached https://files.pythonhosted.org/packages/85/51/ba4564ded90e093dbb6adfc3e21f99ae953d9ad56477e1b0d4a93bacf7d3/numpy-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting mako
Collecting lxml
Using cached https://files.pythonhosted.org/packages/39/e0/bb4bb8d03a98ba530a13e5d27c7ae5eb9b2b53ce36c4e854429fcf2b90be/lxml-4.2.4-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cheetah
Collecting MarkupSafe>=0.9.2 (from mako)
Collecting Markdown>=2.0.1 (from cheetah)
Using cached https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl