Skip to content

Instantly share code, notes, and snippets.

View joshgrib's full-sized avatar
🤔
coding

Josh Gribbon joshgrib

🤔
coding
View GitHub Profile
@joshgrib
joshgrib / MA222 Notes
Created June 16, 2015 20:48
MA222 - Probability and Statistics for Engineers
<h1 id="ma222-probability-and-statistics-for-engineers">MA222 - Probability and Statistics for Engineers</h1>
<p>“Probabilty and statistics aren’t really my thing” - Andrei-Paul Grecianu, professor for the course</p>
<p>An awesome <a href="http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference">guide to MathJax</a></p>
<p>Probably note needed, but also <a href="http://adrai.github.io/flowchart.js/">flowchart guide</a></p>
<p><div class="toc"><div class="toc">
<ul>
/*
Josh Gribbon
QF365 - Data Structures and Algorithms
Code to parse a csv file with C++, using data from yahoo finance for the DJIA
*/
void printData(string ticker){
ifstream readObject;
string line;
string fPath = "data/" + ticker + ".csv";
readObject.open(fPath.c_str());
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include <boost/random.hpp>
#include <boost/generator_iterator.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
0 0.068752889 0.037500796
-0.031092729 0.968374816 0.743494347
0.031092729 0.543203528 0.500660391
0 0.009969506 0.272924522
0.014 -0.007 0.655151916
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include <boost/random.hpp>
#include <boost/generator_iterator.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include <boost/random.hpp>
#include <boost/generator_iterator.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib> //for system()
#include <fstream>
#include <math.h>
#include <algorithm>
#include <numeric>
#include <vector>
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib> //for system()
#include <fstream>
#include <math.h>
#include <algorithm>
#include <numeric>
#include <vector>
@joshgrib
joshgrib / sieve-output.txt
Last active February 9, 2016 19:00
Checking to make sure output stays formatted for larger inputs
josh@josh-HP-ZBook-15:~/Documents/2016S-Notes/cs385/workspace/hw1_sieve$ ./sieve
**************************** Sieve of Eratosthenes ****************************
Search for primes up to: 20000
Number of primes found: 2262
Primes up to 20000:
2 3 5 7 11 13 17 19 23 29 31 37 41
43 47 53 59 61 67 71 73 79 83 89 97 101
103 107 109 113 127 131 137 139 149 151 157 163 167
173 179 181 191 193 197 199 211 223 227 229 233 239
@joshgrib
joshgrib / WITC Excel Stats Functions
Created March 2, 2016 21:22
Some excel functions to create reports for the WITC, I got parts online so I wanted to pick them apart to understand, and then make some new ones
//Get list of courses, store is A7:A
=unique( //take the list and remove duplicates
transpose( //flips rows/columns along a TL-->BR diagonal
split( //split up stuff by whatever has a space between it
ArrayFormula( //use forumlas on an array, I think this is like map
concatenate('Student sign-in'!E2:E&" ") //put all the course sign-ins into a list seperated by spaces
),
" "
)
)