MBB( int b, int room, int canTake )
if b == 0
if canTake == 1 && bush[b] <= room : bush[b]
else: EMPTY
if canTake == 0 || bush[b] > room
MBB( b - 1, room, 1 )
else:
min { bush[b] + MBB(b - 1, room, 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
with open('localities-coords.txt','r') as in_file: | |
with open('coords.txt','w') as out_file: | |
for x in in_file: | |
coords_in = x.rstrip() | |
csplit = coords_in.split('.') | |
long_int = int(csplit[1]) | |
if long_int > 18000: | |
long_int = long_int - 36000 | |
csplit[1] = str(long_int) | |
lat_deg = csplit[0][ : len(csplit[0]) - 2 ] |
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
#!/bin/sh | |
# Install PIP | |
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py && python get-pip.py --user | |
# Fix path | |
echo "set path = (\$path \$home/.local/bin)" >> ~/.tcshrc | |
export PATH=$HOME/.local/bin:$PATH | |
# Clone the repo |
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
# Check if I'm in tmux plz. | |
if [ "$TERM" != "eterm-color" ]; then | |
if [ "$TMUX" = "" ]; then tmux; fi | |
fi | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ |
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
INSERT INTO Music VALUES('Alberta Hunter','TRSGHLU128F421DF83','Don''t Pan Me',1922); | |
INSERT INTO Music VALUES('Barrington Levy','TRMYDFV128F42511FC','Warm And Sunny Day',1922); | |
INSERT INTO Music VALUES('Barrington Levy','TRRAHXQ128F42511FF','Looking My Love',1922); | |
INSERT INTO Music VALUES('Barrington Levy','TRFAFTK12903CC77B8','Warm And Sunny Day',1922); | |
INSERT INTO Music VALUES('Barrington Levy','TRSTBUY128F4251203','Mandela You''re Free',1922); | |
INSERT INTO Music VALUES('Barrington Levy','TRODGCA128F4251206','Something In My Heart (Full Vocal)',1922); | |
INSERT INTO Music VALUES('Papa Charlie Jackson','TRLOZBM128F4280BF6','Airy Man Blues',1924); | |
INSERT INTO Music VALUES('Vernon Dalhart','TRZCBEO128F4285118','Wreck Of The Old 97',1924); | |
INSERT INTO Music VALUES('Vernon Dalhart','TRTRZWN128F4285110','The Prisoner''s Song',1924); | |
INSERT INTO Music VALUES('Vernon Dalhart','TRTRKSF12903CFEDD7','Wreck Of The Old 97',1924); |
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
with open('tracks_per_year.txt','r') as in_file: | |
with open('musicinput.sql','w') as out_file: | |
for x in in_file: | |
SQL_in = x.rstrip() #Get rid of those newlines | |
SQL_out = 'INSERT INTO Music VALUES(' | |
SQL_vals = SQL_in.split('<SEP>') | |
# Grab vals from split | |
year = SQL_vals[0] | |
song_ID = SQL_vals[1] | |
artist = SQL_vals[2] |
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
diary on | |
format compact | |
type solve2_3b.m | |
function C = solve2_3b(A) | |
size_of_A = size(A); | |
n = size_of_A(1,1); | |
format long, b = randi(10, n, 1) | |
x1 = A\b; | |
x2 = inv(A) * b; |
I hereby claim:
- I am jacobj on github.
- I am jacobj (https://keybase.io/jacobj) on keybase.
- I have a public key whose fingerprint is 0CCC 4636 0573 C42B 56EB 8C0A 2A95 6239 DF1D 952D
To claim this, I am signing this object:
#Emacs Resources Here's a list of some great resources for getting started with Emacs! ##Getting Started Guides
- Absolute Beginners Guide to Emacs - Start here.
- Emacs Hand Drawn Guide
- Emacs For Developers - Pretty dense guide that highlights alot of cool Emacs things.
##Emacs Starter Packs
- Better Defaults - A few little tweaks that make Emacs more pleasent (I use this).
- Emacs Prelude - A huge package with a ton of nifty features.
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
#include <iostream> | |
int* packedArrayTournamentTree(int* score_start, int* score_end) { | |
int score_size = score_end - score_start; | |
// Check if size is 2^n or 2^n - 1 to satisfy completeness of tree. | |
bool check = false; | |
int power_of_two = 1; | |
while((power_of_two - 1) <= score_size) { |