Skip to content

Instantly share code, notes, and snippets.

👺
-- TODO (SkamDart) think of creative github status

Cameron SkamDart

👺
-- TODO (SkamDart) think of creative github status
View GitHub Profile
@SkamDart
SkamDart / stress.py
Last active Apr 24, 2017
241 stress test script slightly modified
View stress.py
import subprocess
import sys
"""Usage:
python stress.py localhost:4000 PUT test format.h
alternatively,
chmod u+x
./stress.py localhost:4000 PUT test format.h
@SkamDart
SkamDart / test_commands.sh
Last active May 3, 2017
Sample bash commands for testing client PUT/GET
View test_commands.sh
# fill in n with some integer
# run in foreground
for i in $(seq 0 n) ; do ./client localhost:4000 PUT file$i.txt file.txt ; done
# run in background
for i in $(seq 0 n) ; do ./client localhost:4000 PUT file$i.txt file.txt &
# diff all files in foreground
for i in $(seq 0 n) diff temp_dir/file$i file.txt ; done
mkdir tmp
for i in $(seq 0 n) ; do ./client localhost:4000 GET file$i.txt tmp/file$i.txt ; done
for i in $(seq 0 n) ; do diff file.txt tmp/file$i.txt ; done
@SkamDart
SkamDart / gist:8d7657ffb401647ee045e771712bb023
Created Jul 12, 2017
bash script to uncrustify hpic repo
View gist:8d7657ffb401647ee045e771712bb023
find ~/hpic/includes/ -type f -name "*.h" | xargs uncrustify -c ~/.uncrustify.cfg --no-backup
find ~/hpic/src/ -type f -name "*.h" | xargs uncrustify -c ~/.uncrustify.cfg --no-backup
@SkamDart
SkamDart / beautify.sh
Created Jul 12, 2017
quick and dirty script to uncrustify hpic repo
View beautify.sh
find ~/hpic/includes/ -type f -name "*.h" | xargs uncrustify -c ~/.uncrustify.cfg --no-backup
find ~/hpic/src/ -type f -name "*.h" | xargs uncrustify -c ~/.uncrustify.cfg --no-backup
@SkamDart
SkamDart / buffer_integrity_test.ipynb
Created Jul 12, 2017
ipython notebook for hpic buffer_integrity_test
View buffer_integrity_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View kenneth_install.sh
# to run this and install some useful packages use
# chmod u+x kenneth_install.sh
# ./kenneth_install.sh
# homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# python3
brew install python3
# update package manager
pip3 install --upgrade pip
# install computing libraries
View q10.tex
Given $\dot y = Ly$ with $y^{(0)} \neq \hat 0$, determine the behavior of the linear system of ODE's.
We can express $y(0)$ as the linear combination,
$$y(0) = \sum_{i = 1}^{n}\alpha_iv_i$$
where $\alpha_i$ is a scalar. Then we have a closed form for $y(t)$,
$$y(t) = \sum_{i = 1}^{n} \alpha_i v_i e^{\lambda_it}$$
Consider the following cases for $L$ with
First, let $L = -(A^TA)$. The matrix $A^TA$ is symmetric positive definite so it has all strictly positive real eigenvalues. Hence, $L$ has strictly negative real eigenvalues.
View twitterurl.py
## Import libraries and functions needed
## define URL
def get_url(All=None, Exact=None, Any=None, Not=None, Hashtag=None, From=None,
To=None, Mention=None, Near=None, Dates=None):
#Base URL
url = "https://twitter.com/search?l=&q="
# All
if All != None:
a = All.replace(" ", "%20")
View ngrok.sh
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
./ngrok http 6006
View add_line.cpp
void
add_line(unsigned int start_pos, unsigned int end_pos,
unsigned int* canvas, unsigned int* origin)
{
int step_size = 1;
if ((start_pos ^ end_pos) & 31)
{
step_size = 32;
}
if (start_pos > end_pos)
You can’t perform that action at this time.