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 / 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)]
(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
rytse@rytse-VirtualBox:~$ virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/rytse/venv/bin/python2
Also creating executable in /home/rytse/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...^[[Ddone.
rytse@rytse-VirtualBox:~$ source venv/bin/activate
(venv) rytse@rytse-VirtualBox:~$ pip install pybombs
Collecting pybombs
Downloading https://files.pythonhosted.org/packages/f1/40/b820ecd701ffe7a222815769b372c4626f1122d70f0bdd3fb28976e8c7f6/PyBOMBS-2.3.2.tar.gz (75kB)
100% |████████████████████████████████| 81kB 3.8MB/s
rytse@rytse-VirtualBox:~$ sudo apt install libgtk2.0-dev libgtk2.0-0
[sudo] password for rytse:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk2.0-0 is already the newest version (2.24.30-1ubuntu1.16.04.2).
The following package was automatically installed and is no longer required:
libllvm5.0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
rytse@rytse-VirtualBox:~$ sudo apt install libgtk-3-dev libgtk-3-0
[sudo] password for rytse:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk-3-0 is already the newest version (3.18.9-1ubuntu3.3).
The following package was automatically installed and is no longer required:
libllvm5.0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
@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 / 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