Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 timeit | |
| import numpy as np | |
| import iris | |
| from iris.pdatetime import PartialDateTime | |
| def _ret_cube(): | |
| cube = iris.cube.Cube(np.arange(4)) |
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
| # Turn off audible bell | |
| vbell off | |
| # Turn off startup message | |
| startup_message off | |
| hardstatus off | |
| caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" |
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
| # Specify tag release | |
| export ESMPY='620_01b' | |
| # Download archive if not done already | |
| archive=ESMPy_${ESMPY}.tar.bz2 | |
| if [ ! -f ${archive} ]; then | |
| echo 'Downoading archive' | |
| wget http://www.earthsystemmodeling.org/python_releases/ESMPy_${ESMPY}/${archive} | |
| fi |
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 | |
| import sys | |
| import re | |
| def main(fnme): | |
| with open(fnme, 'r') as fh: | |
| lines = fh.readlines() | |
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 | |
| import sys | |
| import pyflakes.reporter as reporter | |
| from pyflakes.scripts.pyflakes import main | |
| # Monkey patch syntax error method for suitability with vim | |
| def vimhappy_syntaxError(self, filename, msg, lineno, offset, text): | |
| line = text.splitlines()[-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
| " setup wrapping | |
| setlocal textwidth=79 " width of document | |
| setlocal nowrap " don't automatically wrap on load | |
| setlocal fo-=t " don't automatically wrap text when typing | |
| " Colour column at 80char | |
| if exists('+colorcolumn') | |
| setlocal colorcolumn=80 | |
| else | |
| autocmd BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -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
| " ENABLE FILETYPE SPECIFIC VIM SETTINGS FILES | |
| filetype plugin on | |
| " language-dependent indenting. | |
| filetype plugin indent on | |
| " SET COLOUR | |
| " mkdir -p ~/.vim/colors && cd ~/.vim/colors | |
| " wget -O wombat256mod.vim http://www.vim.org/scripts/download_script.php?src_id=13400 | |
| set t_Co=256 |
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 copy | |
| import matplotlib | |
| from matplotlib import cm | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def plot_colormap(cmapname='jet'): | |
| """ |