I hereby claim:
- I am nikmolnar on github.
- I am nikmolnar (https://keybase.io/nikmolnar) on keybase.
- I have a public key whose fingerprint is 183C 6E34 83E2 035C 2BE3 9A75 F3D6 201C 27A6 6A6C
To claim this, I am signing this object:
from openpyxl import Workbook | |
import os | |
COLUMNS = [ | |
'Name', 'Data Lead', 'Description', 'Date Obtained', 'Time Period of Content Date', 'Publication Date', | |
'URL', 'Contact', 'Processing Notes', 'Keywords', 'Relative Path', 'Absolute Path' | |
] | |
def parse_readme(f): |
""" | |
This script converts from a simple binary elevation format to ArcASCII. The format of the binary file is: | |
Offset Type Description | |
----------------------------- | |
0 uint Grid width | |
4 uint Grid height | |
8 float* Elevation values as floats in row-major order from lower-left to upper-right. | |
""" |
import mapnik | |
m = mapnik.Map(600, 600) | |
m.srs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' | |
rs = mapnik.RasterSymbolizer() | |
# COLORIZER_DISCRETE is a binned/classified rendere. Other options are COLORIZER_LINEAR (stretched) and | |
# COLORIZER_EXACT (unique) | |
rs.colorizer = mapnik.RasterColorizer(mapnik.COLORIZER_DISCRETE, mapnik.Color(0, 0, 0, 0)) |
<?php | |
$SECRET_KEY = "<secret key here>"; | |
function base64url_encode($data) { | |
return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); | |
} | |
function is_valid($secret, $value, $salt, $signature) { | |
$verify = base64url_encode(hash_hmac("sha1", $value, sha1($salt . $secret, true), true)); | |
return $signature === $verify; |
""" | |
This script takes a directory of NetCDF datasets and a single JSON style file and creates one ZIP archive | |
per dataset, ready to upload to Data Basin. | |
""" | |
import json | |
import os | |
import sys | |
from zipfile import ZipFile, ZIP_DEFLATED |
#!C:\Users\nik\Documents\environments\databasin_web\Scripts\python2.7.exe | |
# EASY-INSTALL-ENTRY-SCRIPT: 'celery==3.1.17','console_scripts','celery' | |
__requires__ = 'celery==3.1.19' | |
import sys | |
from pkg_resources import load_entry_point | |
if __name__ == '__main__': | |
sys.exit( | |
load_entry_point('celery==3.1.19', 'console_scripts', 'celery')() | |
) |
from databasin.client import Client | |
c = Client() | |
c.login('user', 'pass') | |
# Package must have complete metadata and style necessary for one-step import | |
dataset = c.import_netcdf_dataset('/path/to/netcdf_with_metadata_and_style.zip') | |
# One-step imports are private by default | |
dataset.make_public() |
I hereby claim:
To claim this, I am signing this object:
""" | |
Django settings for untitled1 project. | |
Generated by 'django-admin startproject' using Django 1.8.10. | |
For more information on this file, see | |
https://docs.djangoproject.com/en/1.8/topics/settings/ | |
For the full list of settings and their values, see | |
https://docs.djangoproject.com/en/1.8/ref/settings/ |
""" | |
Django settings for foo project. | |
Generated by 'django-admin startproject' using Django 1.9.4. | |
For more information on this file, see | |
https://docs.djangoproject.com/en/1.9/topics/settings/ | |
For the full list of settings and their values, see | |
https://docs.djangoproject.com/en/1.9/ref/settings/ |