View gist:9459517
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 json | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from sklearn.neighbors.kde import KernelDensity | |
file_name_business = 'yelp_academic_dataset_business.json' | |
file_name_checkin = 'yelp_academic_dataset_checkin.json' | |
file_name_review = 'yelp_academic_dataset_review.json' | |
file_name_user = 'yelp_academic_dataset_user.json' | |
def read_data(file_name): |
View gist:9823465
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
review = pickle.load(open('pickles/review.pkl')) | |
review['date'] = pd.to_datetime(review['date']) |
View gist:9898311
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb |
View gist:9900461
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb |
View gist:9925745
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
View gist:9939408
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
View gist:9944886
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
View gist:9944874
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
View gist:07d66c402b14bdb6c398
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
collect=[] | |
def fib(length): | |
first = 1 | |
second = 1 | |
if length < 2: | |
return length | |
else: | |
collect = [0,1,1] | |
length = length-2 | |
for i in range(length): |
View gist:c3ccd51c17aec9fb9ae1
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
class montymc(object): | |
""" | |
### VARIABLES ### | |
samples = how many trials to run | |
simulations = number of simulations of X samples | |
doors = number of doors for the game (default: 3) | |
switch dictates what the user does after monty opens the door: | |
switch = 0, no switching | |
switch = 1, always switch | |
switch = 2, random |
OlderNewer