Skip to content

Instantly share code, notes, and snippets.

View rytse's full-sized avatar

Ryan Tse rytse

View GitHub Profile
@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
set runtimepath^=~/.vim_runtime
let &packpath=&runtimepath
source ~/.vimrc
@rytse
rytse / gr_py3_guide.md
Created April 28, 2019 18:04
GNURadio with Anaconda Python 3 Installation Guide

GNURadio with Anaconda Python 3 Installation Guide

At its current state, GNURadio 3.7 does not work out-of-the-box with Python 3. This is a guide to building GNURadio from source to use a Python 3 Anaconda environment. This setup is particularly nice since you can still easily import other Python packages with conda and use them inside GNURadio blocks.

This guide assumes you have installed all the system dependencies of GNURadio (not including the Python ones) and Anaconda 3. You can find the list of system dependencies on the GNURadio website. You need all the ones that aren't called gnuradio or python-*.

Pulling the Source

Pull the GNURadio source and the environment.yml file that describes the conda environment that plays nice with GNURadio. At the time that this tutorial was written, this worked for [ 72aa97d](https://github.com/gnuradio/gnuradio/commit/72aa97daab609f907ba10

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@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 / gr_py3_env.yml
Last active October 9, 2020 10:06
Python 3.7 conda env that gnuradio will install with (see full install guide here: https://gist.github.com/rytse/9f5c38caa9ce13e8063298be284c8897)
name: dsp
channels:
- conda-forge
- ostrokach
- anaconda
- defaults
dependencies:
- alabaster=0.7.12=py37_0
- asn1crypto=0.24.0=py37_0
- at-spi2-atk=2.16.0=1
@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 / 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 / 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-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: