This file contains hidden or 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
window = (500,500) | |
mwindow = ((-1,1),(-1,1)) | |
size(window[0],window[1]) | |
pinf = float("inf") | |
ninf = float("-inf") | |
def isBad(x): | |
return x != x or x == pinf or x == ninf | |
def inMend(z,c): |
This file contains hidden or 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
/* Copyright (c) 2011, Peter Barrett | |
** | |
** Permission to use, copy, modify, and/or distribute this software for | |
** any purpose with or without fee is hereby granted, provided that the | |
** above copyright notice and this permission notice appear in all copies. | |
** | |
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | |
** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR |
This file contains hidden or 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
# coding: utf-8 | |
# In[1]: | |
get_ipython().magic(u'matplotlib inline') | |
# In[2]: |
This file contains hidden or 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
#!/usr/bin/env python | |
import BeautifulSoup as BS | |
import argparse | |
parser = argparse.ArgumentParser() | |
args, other = parser.parse_known_args() |
This file contains hidden or 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
#!/usr/bin/env python | |
import argparse | |
from gemstat.matrix import * | |
import sys | |
import scipy as S | |
parser = argparse.ArgumentParser() |
This file contains hidden or 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 FigHolder(object): | |
"""Base class for all the figure holders we might implement.""" | |
def __init__(self, thefig): | |
self.fig = thefig | |
def add_subplot(self): | |
pass | |
def show(self): | |
self.fig.tight_layout() |
This file contains hidden or 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 matplotlib | |
matplotlib.use('webagg') | |
import numpy as np | |
from scipy.special import binom | |
import matplotlib.pyplot as plt | |
from matplotlib.lines import Line2D |
This file contains hidden or 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
\documentclass[12pt]{amsart} | |
\usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots. | |
\geometry{a4paper} % or letter or a5paper or ... etc | |
% \geometry{landscape} % rotated page geometry | |
% See the ``Article customise'' template for come common customisations | |
\title{An example of using bibtex} | |
\author{Bryan Lunt} | |
\date{2017-6-20} % delete this line to display the current date |
This file contains hidden or 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
# for gist naming purposes |
This file contains hidden or 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
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cmath> | |
#include <cassert> | |
#include <random> | |
#include <omp.h> |