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 python3 | |
""" | |
If you, like me, often have to send a bunch of very similer emails to a bunch of | |
people you may have got tired of copy pasting and resending as well. | |
This is my proposed solution: | |
This script reads a template file, using the simple python templating language | |
that substitutes vaules like $this with data from a dictionary. |
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
__author__ = 'danlmarmot' | |
""" | |
This Python script measures hash performance, and attempts to answer this question: | |
'Given a hash function and a block size for reading, which is the fastest hash function and block size?' | |
There's no warm up, there's no cache/memory/whatever filling, just a simple way to explore performance for | |
commonly used functions with the timeit library | |
""" |
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 xarray | |
from scipy.stats import norm | |
import numpy as np | |
import matplotlib.mlab as mlab | |
import matplotlib.pyplot as plt | |
list_indices = ['tasmax'] | |
indices = list_indices[0] | |
data = xarray.open_dataset('/g/data3/w97/dc8106/AMZ_def_EXPs/test/tasmax_sc_001GPsc_E0_test.nc', chunks={'time':1000}) |
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
#!/bin/bash | |
# A cross-node version of gnu parallel | |
# | |
# node-parallel [command [arguments]] < list_of_arguments | |
# node-parallel [command [arguments]] ( ::: arguments | :::: argfile(s) )* | |
# | |
# The command can use gnu parallel replace tags (e.g. '{}' is replaced with an | |
# argument), see 'man parallel' for full details. | |
# Note that unlike gnu parallel a '{}' will not be automatically added if not | |
# present, it must be manually added. |
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 quart | |
implicit none | |
type quaternion | |
! q(4) = (w, x, y, z) where w is the scalar part | |
real :: q(4) | |
! Flags to tell us if we want to keep the quaternion unitised, and | |
! also if the quaternion represents an improper rotation (rotation + inversion) | |
logical :: unit | |
logical :: improper |