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 | |
from ecmwfapi import ECMWFDataServer | |
from datetime import timedelta, date | |
def monthly_range(start_date, end_date): | |
start_date = start_date.replace(day=1) | |
while start_date < end_date: | |
last_day_month = start_date + timedelta(days=33) | |
last_day_month = last_day_month.replace(day=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
package main | |
import ( | |
"fmt" | |
"image" | |
"io/ioutil" | |
"log" | |
"os" | |
"unsafe" |
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
'''This script demonstrates how to build a variational autoencoder with Keras. | |
Reference: "Auto-Encoding Variational Bayes" https://arxiv.org/abs/1312.6114 | |
''' | |
import numpy as np | |
import matplotlib | |
matplotlib.use('agg') | |
import matplotlib.pyplot as plt | |
from scipy.stats import norm | |
from keras.layers import Input, Dense, Lambda |
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
#!/g/data/xc0/software/python/miniconda2/bin/python | |
############################################################################### | |
# $Id: gdal_merge.py 33790 2016-03-26 12:42:12Z goatbar $ | |
# | |
# Project: InSAR Peppers | |
# Purpose: Module to extract data from many rasters into one output. | |
# Author: Frank Warmerdam, [email protected] | |
# | |
############################################################################### | |
# Copyright (c) 2000, Atlantis Scientific Inc. (www.atlsci.com) |
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
#!/g/data/v10/public/modules/dea-env/20181015/bin/python | |
import argparse | |
import os | |
locations = """'Yanco',-34.9878,146.2908,2012,2017 | |
'WombatStateForest',-37.4222,144.0944,2010,2017 | |
'Whroo',-36.6732,145.0294,2011,2017 | |
'Warra',-43.09502,146.65452,2015,2017 | |
'WallabyCreek',-34.00206,140.58912,2005,2013 |
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
#!/g/data/v10/public/modules/dea-env/20181015/bin/python | |
import datacube as dc | |
from datacube.helpers import ga_pq_fuser | |
from datacube.storage import masking | |
import pyproj | |
import numpy as np | |
import xarray as xr | |
import datetime | |
import warnings |
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
#!/g/data/v10/public/modules/dea-env/20181015/bin/python | |
import datacube as dc | |
from datacube.helpers import ga_pq_fuser | |
from datacube.storage import masking | |
import pyproj | |
import numpy as np | |
import xarray as xr | |
import datetime | |
import warnings |
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
#!/g/data/v10/public/modules/agdc-py3-env/20171214/envs/agdc/bin/python | |
import pyproj | |
import argparse | |
import glob | |
import os | |
import sys | |
import shutil | |
import uuid | |
import subprocess |
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
from keras.models import load_model, Sequential | |
from keras import layers | |
from keras.layers import Layer | |
from keras import models | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys | |
x = np.load("/datasets/10zlevels.npy") | |
y = 1000*np.expand_dims(np.load("/datasets/1980-2016/full_tp_1980_2016.npy"), axis=3) |
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 pickle | |
import matplotlib | |
matplotlib.use('agg') | |
import matplotlib.pyplot as plt | |
#hist = pickle.load(open("trainHistoryDict_0-5-7", 'rb')) | |
hist = pickle.load(open("trainHistoryDict_9", 'rb')) | |
print hist.keys() | |
plt.plot(hist['loss']) | |
plt.plot(hist['val_loss']) |