This file contains 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
openFirePro:~ koverholt$ brew install -v pyqt | |
==> Build Environment | |
CC: /usr/bin/cc => /usr/bin/gcc-4.2 | |
CXX: /usr/bin/c++ => /usr/bin/c++-4.2 | |
LD: /usr/bin/cc => /usr/bin/gcc-4.2 | |
CFLAGS: -O3 -march=core2 -w -pipe | |
CXXFLAGS: -O3 -march=core2 -w -pipe | |
MAKEFLAGS: -j2 | |
==> Downloading http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.7.4.tar.gz | |
File already downloaded and cached to /Users/koverholt/Library/Caches/Homebrew |
This file contains 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
openFirePro:~ koverholt$ brew install pyqt | |
==> Downloading http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.7.4.tar.gz | |
File already downloaded and cached to /Users/koverholt/Library/Caches/Homebrew | |
==> python ./configure.py --confirm-license --bindir=/usr/local/Cellar/pyqt/4.7.4/bin --destdir=/usr/local/Cellar/pyqt/4.7.4/lib/p | |
==> make | |
g++ -c -pipe -fno-strict-aliasing -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.6.3/mkspecs/macx-g++ -I. -I/usr/local/Cellar/qt/4.6.3/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.6.3/include/QtCore -I/usr/local/Cellar/qt/4.6.3/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.6.3/include/QtGui -I/usr/local/Cellar/qt/4.6.3/include -I/usr/local/Cellar/sip/4.10.5/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I../../QtCore -I. -I. -F/usr/local/Cellar/qt/4.6.3/lib -o qpycore_chimera. |
This file contains 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): |
This file contains 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 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 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 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 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 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 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") |
OlderNewer