This file contains hidden or 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
| class _ThreadRead_(threading.Thread): | |
| def __init__(self,serial): | |
| threading.Thread.__init__(self) | |
| self.stop_event = threading.Event() | |
| self.data = [] | |
| def run(self): | |
| """run is the function ran by the thread""" | |
| # set up here |
This file contains hidden or 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 setup() { | |
| //Start serial. | |
| Serial.begin(9600); | |
| Serial.flush(); | |
| } | |
| void loop() { | |
| char input; | |
| //int inc = 0; | |
This file contains hidden or 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
| ;Figure out why this is wierd. AKA this is bad lisp. | |
| ((lambda () ;or use progn? | |
| (setf in_rev (let | |
| ((Total_length 2.05) | |
| (Total_revs 35.5)) | |
| (/ Total_length Total_revs) | |
| )) | |
| (setf rpm 600) | |
| (setf in_min (* in_rev rpm)) |
This file contains hidden or 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
| def tobin(data, width=8): | |
| data_str = bin(data & (2**width-1))[2:].zfill(width) | |
| return data_str |
This file contains hidden or 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
| #!/usr/bin/env python | |
| from subprocess import call | |
| import os | |
| cc = "clang" | |
| cpp = "clang++" | |
| options = ["-Wall", "-Wextra"] | |
| libs = [] | |
| def main(): |
This file contains hidden or 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
| echo '==== Installing dynamism pre-reqs' | |
| apt-get update | |
| apt-get install -y build-essential | |
| apt-get install -y git | |
| apt-get install -y mercurial | |
| apt-get install -y clang | |
| apt-get install -y python-numpy python-scipy | |
| apt-get install -y gcc-multilib | |
| apt-get install -y g++-multilib | |
| apt-get install -y python-dev |
This file contains hidden or 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
| pandoc --mathjax -s -f markdown+tex_math_dollars -t html -o pandocMath.html pandocMath.md |
This file contains hidden or 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
| unbind C-b | |
| set -g prefix 'C-\' | |
| bind 'C-\' send-prefix | |
| setw -g mode-keys vi | |
| bind-key -r k select-pane -U | |
| bind-key -r j select-pane -D | |
| bind-key -r h select-pane -L | |
| bind-key -r l select-pane -R |
This file contains hidden or 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
| syntax on | |
| set autoindent | |
| set tabstop=4 | |
| set backspace=indent,eol,start | |
| execute pathogen#infect() | |
| syntax on | |
| "filetype plugin indent on" | |
| set background=dark |
This file contains hidden or 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
| function [ output_args ] = MechSys89( input_args ) | |
| %Promblem 8-9 | |
| B = [0;0;0;1]; | |
| A = [ 1 1 1 1; 3 4 5 6; 6 12 20 30; .25^3 .25^4 .25^5 .25^6]; | |
| C = A\B; | |
| C = [0;0;0;C]; %'cause C(1) and stuff don't exist | |
| beta = 180; | |
| s = @(t) C(3)*(t/beta)^3+C(4)*(t/beta)^4+C(5)*(t/beta)^5+C(6)*(t/beta)^6; |