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
| returnList.py | |
| _returnList.so | |
| *_wrap.cxx |
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 -*- | |
| from tomIntegrate import intor, randr | |
| from matplotlib import pyplot as plt | |
| from numpy import array, polyfit, log, exp | |
| def dxdt(X, r=28.): | |
| s = 10. | |
| b = 8. / 3. | |
| x = X[0] | |
| y = X[1] |
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
| from matplotlib import pyplot as plt | |
| from matplotlib import colors | |
| import numpy as np | |
| from tomIntegrate import randr | |
| from time import sleep | |
| NX = NY = 64 | |
| figsize=(16, 16) | |
| ptake = 0.001 | |
| pgive = 0.0004 |
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 time | |
| from datetime import datetime | |
| import matplotlib.pyplot as plt | |
| #get the csv lines as strings | |
| lines = list(open('hussieout.csv')) | |
| lines = lines[:-1] #remove final newline | |
| #split each line on commas (hopefully there's only one per line) | |
| lines = [line.split(',') for line in lines] | |
| #remove whitespace at the ends of the elements (mostly--only?--just \n characters at the ends) |
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 os | |
| import random | |
| import string | |
| import tempfile | |
| import subprocess | |
| def random_id(length=8): | |
| return ''.join(random.sample(string.ascii_letters + string.digits, length)) | |
| TEMPLATE_SERIAL = """ |
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 numpy as np | |
| import scipy.linalg | |
| n = 130 | |
| r = np.array(np.random.normal(size=(n, n)), dtype=np.float32) | |
| e = scipy.linalg.eig(r, left=False, right=False) | |
| print e.mean() |
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 numpy as np | |
| import scipy.linalg | |
| n = 130 | |
| r = np.array(np.random.normal(size=(n, n)), dtype=np.float32) | |
| e = scipy.linalg.eig(r, left=False, right=False) | |
| print e.mean() |
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
| ''' | |
| This example uses a MovieWriter directly to grab individual frames and | |
| write them to a file. This avoids any event loop integration, but has | |
| the advantage of working with even the Agg backend. This is not recommended | |
| for use in an interactive setting. | |
| This version avoids the ugly stateful plt.* expressions, and the | |
| set_data method. Instead, it uses the more generic axis methods. This is slower, | |
| but easier to remember, I hope. | |
| ''' |
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
| ''' | |
| Quick hack to combine two BibTeX files with truly indentical entries | |
| into one monolithic file. | |
| Someone else could write an argparse interface to make this more reusable. | |
| For now, I just need to get back to work. | |
| ''' | |
| from bibtexparser.bparser import BibTexParser | |
| with open('math.bib', 'r') as bibfile: |
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
| ''' | |
| Quick hack to combine two BibTeX files with truly indentical entries | |
| into one monolithic file. | |
| Someone else could write an argparse interface to make this more reusable. | |
| For now, I just need to get back to work. | |
| ''' | |
| from bibtexparser.bparser import BibTexParser | |
| with open('math.bib', 'r') as bibfile: |