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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyFPmr8gxiYTmuD+sFiQZofVII0xW1xBYY+SWEKU9vGOmSZeH/LFpLAouKPOh/3Rmutc67r27YwZ90GpMcw0flDwwpFUkb9ETgiULw4tysoIT119NklhVMuxhbgAgI9a9rTmsvYM5qDDYhiCef19xEFhKUitbp0WOF9idnV+OyvqfA7eudO80gqmwyiO7HWhaW5NmX4c4t95953sjq65CBFuyybC1lK5P6Nn+bEOo8KmldX3Cjmhxt69ZJu3tZRxAtqv5hw0abbD4Ou7BmsTSdRrp2JUQcS83s1YuRW5eFpqyl55rwbBaxYwtq0CHYGI/ismN9BdNHDBwv0jDbASPj koverholt@continuum |
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 | |
| from pyspark import SparkContext | |
| from pyspark import SparkConf | |
| conf = SparkConf() | |
| conf.setMaster("spark://<HOSTNAME>:7077") | |
| conf.setAppName("NumpyMult") | |
| sc = SparkContext(conf=conf) | |
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 pyspark import SparkContext | |
| from pyspark import SparkConf | |
| if __name__ == "__main__": | |
| conf = SparkConf() | |
| conf.setMaster("spark://{hostname}:7077") | |
| conf.setAppName("WordCount") | |
| sc = SparkContext(conf=conf) | |
| file = sc.textFile("/mnt/gluster/pg2591.txt") |
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 __future__ import division | |
| import bloscpack | |
| import cPickle | |
| import numpy as np | |
| import timeit | |
| x = np.empty(10000000) | |
| # cPickle without protocol keyword argument |
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 sys | |
| from PyQt4 import QtCore, QtGui, uic | |
| qtCreatorFile = "" # Enter file here. | |
| Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile) | |
| class MyApp(QtGui.QMainWindow, Ui_MainWindow): | |
| def __init__(self): | |
| QtGui.QMainWindow.__init__(self) |
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 geopy | |
| from bokeh.browserlib import view | |
| from bokeh.document import Document | |
| from bokeh.embed import file_html | |
| from bokeh.models.glyphs import Circle | |
| from bokeh.models import ( | |
| GMapPlot, Range1d, ColumnDataSource, LinearAxis, | |
| PanTool, WheelZoomTool, BoxSelectTool, HoverTool, | |
| BoxSelectionOverlay, GMapOptions, | |
| NumeralTickFormatter, PrintfTickFormatter) |
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 conda_cluster.config import get_cluster_list | |
| import subprocess | |
| SSH_KEY_LOCATION = '/Users/koverholt/.ssh/koverholt.pem' | |
| CLUSTER_NAME = 'cluster_fds' | |
| USER = 'ubuntu' | |
| # List of cluster nodes from conda-cluster | |
| clusters = get_cluster_list() | |
| compute_nodes = clusters[CLUSTER_NAME]['machines']['compute'] |
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
| ## module error | |
| ''' err(string). | |
| Prints 'string' and terminates program. | |
| ''' | |
| import sys | |
| def err(string): | |
| print string | |
| raw_input('Press return to exit') | |
| sys.exit() |
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 | |
| def stats(path, string): | |
| # Write to stats text file | |
| filename = path | |
| f = open(filename, 'a') | |
| f.write(string) | |
| f.close() | |
| headers = np.array(['Name', 'Temperature (C)', 'Heat Flux (kw/m2)']) |
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 | |
| from __future__ import division | |
| import math | |
| def myexp(x): | |
| ''' myexp(x) will compute e^x for any x by measuring the difference in the last 2 terms of the series. ''' | |
| tot = (1 + x) | |
| n = 1 | |
| while (tot != tot + x): |