Skip to content

Instantly share code, notes, and snippets.


Andrew Dabson Onitz

Block or report user

Report or block Onitz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Onitz /
Created Feb 14, 2012
Stanford AI class programmed Markov chain
Now that i understand (to some extent):
* Bayes' Rule
* The theorem of total probability
* Markov chains
Im going to write a program to calculate the nth probability of an event in a chain
#Andrew Dabson
Onitz /
Created Feb 12, 2012
Khan sorting python example
#sorting function
#Andrew Dabson
def mysort(list):
for j in range(len(list)): #iterate through the list
b=j #let b be the index of the smallest value
for i in range(j,len(list)): #iterate through the last portion
if(list[i]<list[b]): #..and find the next smallest value
c=list[j] #swap the ith value with the smallest
You can’t perform that action at this time.