Skip to content

Instantly share code, notes, and snippets.

View SkamDart's full-sized avatar
👻
Too Spooky

Cameron SkamDart

👻
Too Spooky
View GitHub Profile
@SkamDart
SkamDart / stress.py
Last active April 24, 2017 15:25
241 stress test script slightly modified
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 18:06
Sample bash commands for testing client PUT/GET
# 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 July 12, 2017 18:57
bash script to uncrustify hpic repo
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 July 12, 2017 18:58
quick and dirty script to uncrustify hpic repo
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 July 12, 2017 19:14
ipython notebook for hpic buffer_integrity_test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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
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.
## 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")
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
./ngrok http 6006
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)