Balance between excell and C++ is NB
- Python -- a bit more flexible than MATLAB for instance
- Matlab
- R
#!/usr/bin/env python | |
""" | |
A short script that is used to fill gaps in a time series (gap_filler_with_noise). | |
The method uses gaussian processes (aka Kriging) to get the trend (calls gaussian_smoother). | |
I recommend that you play around with the theta0 value to find the correct scale for the trend. | |
Noise is added to the estimated trend by assessing the noise around the trend. | |
Diagnostic plots can be created with this script. |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
This script is written to calculate total alkalinity according to Lee et al. (2006). | |
Please see function help for more details. | |
Please acknowledge use. | |
""" | |
__author__ = "Luke Gregor" |
\b(\w+)\s+\1\b % repeated words | |
^[A-Za-z].*[A-Za-Z0-9] % lines that do not end with a full stop |
def dataset_encoding(xds): | |
cols = ['source', 'original_shape', 'dtype', 'zlib', 'complevel', 'chunksizes'] | |
info = pd.DataFrame(columns=cols, index=xds.data_vars) | |
for row in info.index: | |
var_encoding = xds[row].encoding | |
for col in info.keys(): | |
info.ix[row, col] = var_encoding.pop(col, '') | |
return info |
import numpy as np | |
from pylab import num2date | |
from itertools import ifilter | |
from time import struct_time | |
from __future__ import print_function | |
class TimeTupleArray(np.ndarray): | |
def __new__(cls, input_array, info=None): |