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 subprocess, os | |
def get_big_blobs(git_repo, nitems=10): | |
# Query the git repo for large items | |
os.chdir(git_repo) | |
big_blobs = subprocess.Popen( | |
('git verify-pack -v .git/objects/pack/pack-*.idx | ' | |
'grep -v chain | sort -k3nr | head --lines={1} -').format(git_repo, int(nitems)), | |
shell=True, | |
stdout=subprocess.PIPE) |
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 Foo(object): | |
def __init__(self): | |
self.datasource = something | |
self.cache = {} | |
@property | |
def data(self): | |
if 'data' in cache.keys(): | |
return cache['data'] |
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
"""Plot to test line contours""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import matplotlib.mlab as mlab | |
import mpld3 | |
def create_plot(): | |
x = np.linspace(-3.0, 3.0, 30) | |
y = np.linspace(-2.0, 2.0, 30) |
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
%!TEX root = ../thesis.tex | |
%!TEX TS-program = pdflatex | |
%!TEX encoding = UTF-8 Unicode | |
\chapter{Results} % (fold) | |
\label{cha:isothermal_results} | |
Isothermal flow solutions were calculated for 1666 flow configurations: these had 49 aspect ratios between 1/5$\;\leq\beta\leq\;$25, with 34 values of the Bingham number per aspect ratio. I only performed actual calculations for flows with $\beta \geq\;$2, since cases with $\beta<2$ can be obtained from these results via the symmetry of the flow configuration (i.e. by swapping $H$ and $W$ and rescaling other values). The Bingham number varied between zero for Newtonian flows, to the critical value $B=B^{\star}(\beta)$ when the weight of the fluid is completely supported by its yield strength (discussed in \S\ref{sub:viscoplastic_rheology}). I outline how the critical Bingham number $B^{\star}$ can be obtained analytically for rectangular channel flows in \S\ref{sec:critical_bingham_numbers}. The number of iterations required for convergence of the Lagrangian optimiz |
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
%!TEX root = ../thesis.tex | |
%!TEX TS-program = pdflatex | |
%!TEX encoding = UTF-8 Unicode | |
%!TEX root = thesis.tex | |
% Jess Robertson, 2011-01-30 | |
\newpage | |
\pagestyle{empty} | |
\singlespacing | |
\vspace{80mm} |
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
%!TEX TS-program = pdflatex | |
%!TEX encoding = UTF-8 Unicode | |
% Preamble (fold) | |
\documentclass[12pt, openright]{book} | |
% \includeonly{chapters/frontmatter, chapters/introduction} | |
% Load packages | |
\usepackage[ibycus, english]{babel} | |
% \usepackage{amsmath, amssymb} |
NewerOlder