Skip to content

Instantly share code, notes, and snippets.

nouyang nouyang

Block or report user

Report or block nouyang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nouyang
nouyang / terminalTimer.sh
Last active Jul 24, 2019 — forked from tir38/terminalTimer.sh
in-terminal timer shell script
View terminalTimer.sh
# script to create timer in terminal
# Jason Atwood
# 2013/6/22
# Nouyang -- added large font, send-notify popup, gnome-terminal resize, and play wav file
# 2019
#!/bin/sh
# start up
#echo "starting timer script ..."
@nouyang
nouyang / 2019-01-30 20:34:12_arucotagData.csv
Created Mar 5, 2019
Files for 6-axis force torque sensor
View 2019-01-30 20:34:12_arucotagData.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 5 columns, instead of 4. in line 2.
Arucotag time, tag1 xyz, tag2 xyz, tag1 rollpitchyaw (xyz), tag2 -- xyz zerod averaged; 1.4325604438781738; -0.04961893824233008; -0.05359939423137295; -0.04982387644324944; -0.05038360130221645; -0.04640478914072482; -0.050179964932310084; 2.8118697239913235; -8.772199918827821; -9.82776223299835; 2.7892837261660275; 9.890234153377573; -14.972194520722148; -0.05000126977227327; -0.05000209168604888; -0.05000192068777976; 2.8005767250786757; 0.5590171172748759; -12.399978376860249
Arucotag time, tag1 xyz, tag2 xyz, tag1 rollpitchyaw (xyz), tag2 -- xyz zerod averaged; 1.4791462421417236; -0.04959811047099668; -0.053596665003502485; -0.04976573979042518; -0.05038360130221645; -0.04640478914072482; -0.050179964932310084; 4.738171612374154; -15.070717763088878; -22.51421969502433; 4.756004713612519; 15.445164648243166; -30.858389788111364; -0.04999085588660657; -0.05000072707211366; -0.04997285236136763; 4.747088162993337; 0.18722344257714418; -26.686304741567845
Arucotag time, tag1 xyz, tag2 xyz, tag1 rollpitchy
@nouyang
nouyang / test.sh
Created Jan 31, 2019
thinkpad nub (trackpoint) settings
View test.sh
# https://askubuntu.com/questions/37824/what-is-the-best-way-to-configure-a-thinkpads-trackpoint
echo 200 | sudo tee /sys/devices/platform/i8042/serio1/serio2/sensitivity
echo 200 | sudo tee /sys/devices/platform/i8042/serio1/serio2/speed
@nouyang
nouyang / fill_pdfrw2.py
Last active Jan 2, 2019
sign pdf on ubuntu while retaining fillable fields (using python)
View fill_pdfrw2.py
#! /usr/bin/python
import os
import pdfrw
INVOICE_TEMPLATE_PATH = 'delay.pdf'
INVOICE_OUTPUT_PATH = 'delay_pdfrw2.pdf'
@nouyang
nouyang / Commands
Last active Jan 3, 2019
Ubuntu 18.10 on Thinkapd X1 Yoga Gen 2
View Commands
* Brightness keys don't work. Instead
rui@chaiX1YG2:~$ xrandr --output eDP-1 --brightness 0.8
As a temp solutions, I created keyboard shortcuts for 0.8 (super-f6) and 0.3 (supers-f5) settings, using
gnome-terminal -e "sh \home\rui\brightdown.sh" (may require chmod +x)
Via the settings GUI -> add a custom shortcut
* Suspend doesn't seem to work
systemctl suspend -i
@nouyang
nouyang / 0_README.md
Last active Dec 30, 2018
Automating Mal-Lys form submission
View 0_README.md

To use

(install python)

$ pip install requests
$ python robo_submit.py

Created by nouyang for jbaek

View vimtips.vim
:s/#\([a-z]\)/# \1/g
" replaces:
" #test
" with:
" # test
# to comply with pep8 (inserts space)
@nouyang
nouyang / ImageShow.py
Created Dec 5, 2018
use eog instead of imagemagick in PIL Image
View ImageShow.py
#hinted from
# https://stackoverflow.com/questions/16279441/image-show-wont-display-the-picture#answer-31596116
(mlenv) rui@rui-chai:~/mlenv/lib/python3.6/site-packages/PIL$ $ which python
/home/rui/mlenv/bin/python
rui@rui-chai:~/mlenv/lib/python3.6/site-packages/PIL$ $ vi ImageShow.py
class DisplayViewer(UnixViewer):
def get_command_ex(self, file, **options):
@nouyang
nouyang / Python Tutorial 2018.ipynb
Last active May 27, 2019
AM205 Python Tutorial 2018
View Python Tutorial 2018.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View .bashrc
# ~/.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
You can’t perform that action at this time.