Skip to content

Instantly share code, notes, and snippets.

View tazzben's full-sized avatar

Ben Smith tazzben

View GitHub Profile
@tazzben
tazzben / KnowledgeSimulation.py
Last active May 8, 2022 10:54
Simulates Threshold Metric using Binomial Distributions
#!/usr/bin/env python
from __future__ import division, print_function, absolute_import
import numpy as np
import pandas as pd
from itertools import product
from multiprocessing import Pool
def GetStudents(mu, q, n, threshold = 0.80):
studentability = np.random.binomial(q, mu, size=n)
StudentClass = []
@tazzben
tazzben / CreateFocusGroups.py
Created May 8, 2022 10:59
Script creates the most representative focus groups based on criteria listed in a file
#!/usr/bin/env python
import pandas as pd
from progress.bar import Bar
from multiprocessing import Pool
def createSample(data, n, fields):
dataSample = data.sample(n=n)
d = {}
d['ids'] = dataSample['ID'].tolist()
@tazzben
tazzben / survivalscale-usage.ipynb
Created October 1, 2025 10:11
survivalscale-usage.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.