This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
unzip ngrok-stable-linux-amd64.zip | |
./ngrok http 6006 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
OlderNewer