Skip to content

Instantly share code, notes, and snippets.

@chryss
chryss / gist:7593127
Last active October 21, 2019 15:33
pygaarst doc snippets 1 - how to open and plot VIIRS HDF5 and GeoTIFF data, including plotting on a map.
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@chryss
chryss / Healy Thermal Scrapbook 1
Created November 21, 2013 19:04
Some plots of Landsat thermal imagery over the Nenana coalfields, using pygaarst
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
from osgeo import gdal
arys = []
ds = gdal.Open('sample.tif', gdal.GA_ReadOnly)
for i in xrange(1, ds.RasterCount+1):
arys.append(ds.GetRasterBand(i).ReadAsArray())
@chryss
chryss / index.html
Created November 10, 2013 02:38
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@chryss
chryss / DryCreek2012_1.json
Last active December 22, 2015 04:29
Dry Creek Fire 2012 - Fireprogression as per AICC/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chryss
chryss / test20130902_1.json
Last active December 22, 2015 04:28
Testing a GeoJSON snippet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
# Fixing permissions for group members. System default is UMASK 077 or 022,
# which makes file invisible to members of the group.
#
# This script recursively sets:
# * all directories under the given directory to 775
# * all files under the given directory to 664
# That is, the owner and group members have full rwx permissions,
# and others can access all directories and read, but not write/delete files.
#
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <locale.h>
#define MYLOCALE "de_DE.UTF-8"
int widecharcomp(const wchar_t *arg1, const wchar_t *arg2)
{