Skip to content

Instantly share code, notes, and snippets.

View MandlaSibanda196's full-sized avatar

Mandlenkosi Sibanda MandlaSibanda196

View GitHub Profile
{
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
import matplotlib
matplotlib.use('TkAgg')
import pylab
import numpy as np
n = 100 # size of space: n * n
global p, r # probability of initially panicky individuals
p = 0.1
r = 1
import matplotlib
matplotlib.use('TkAgg')
import pylab as PL
import random as RD
import scipy as SP
import numpy as NP
RD.seed()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Simple CA simulator in Python
#
# *** Hosts & Pathogens ***
#
# Copyright 2008-2012 Hiroki Sayama
# sayama@binghamton.edu
# Modified to run with Python 3
import matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import heapq
from urllib.request import urlopen
import shutil
import gzip
import os
from collections import defaultdict
from bitarray import bitarray
import pickle