Skip to content

Instantly share code, notes, and snippets.

View dmasad's full-sized avatar

David Masad dmasad

View GitHub Profile
@dmasad
dmasad / spatial_sir_model.py
Created November 4, 2021 16:05
Mesa spatial SIR model with visualization server
from mesa import Agent, Model
from mesa.time import RandomActivation
from mesa.space import MultiGrid
from mesa.datacollection import DataCollector
from mesa.visualization.ModularVisualization import ModularServer
from mesa.visualization.modules import CanvasGrid, ChartModule
from mesa.visualization.UserParam import UserSettableParameter
# Model
@dmasad
dmasad / Mesa data collection profiling.ipynb
Created August 4, 2018 14:36
Mesa data collection profiling
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / Face Generation.ipynb
Created March 5, 2017 18:53
Face generation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / Grey's Anatomy ERGM with Python.ipynb
Created June 29, 2015 14:08
Replicating the Grey's Anatomy Hookup ERGM with PyMC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / Intro_to_ICEWS.ipynb
Last active February 4, 2017 18:12
Intro to ICEWS in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / TFC_Initial_Analysis.ipynb
Created March 19, 2015 14:55
#TFC15 Analytics
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / Aldich_Zimmer.ipynb
Created March 24, 2014 19:42
Simple model of network entrepreneurship based on Aldrich and Zimmer, 1986.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / GarbageCan.py
Last active August 29, 2015 13:55
Work-in-progress to replicate the 1972 Garbage Can Model of Organizational Choice.
'''
GARBAGE CAN MODEL OF ORGANIZATIONAL CHOICE
Replicating Cohen et al., 1972
Note: Choices are actually *opportunities* for decisions.
'''
import numpy as np
@dmasad
dmasad / ZI_Jungle.ipynb
Created January 22, 2014 01:16
Code for Zero Intelligence Traders in the Jungle. http://davidmasad.com/blog/zi-traders-in-the-jungle/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmasad
dmasad / ERGM_from_scratch
Last active August 10, 2021 17:47
Implementing an ERGM from scratch
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{