Skip to content

Instantly share code, notes, and snippets.

import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.tri as tri
import numpy as np
import numpy.ma as ma
from osgeo import gdal
from scipy import ndimage
from scipy.ndimage.morphology import binary_dilation
from scipy.signal import fftconvolve
@colek42
colek42 / geodesy_regex.py
Created September 23, 2016 16:36 — forked from cgudea/geodesy_regex.py
regular expressions for verifying common coordinate systems
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
Ext.define('Videx.common.basewebplayer.videoslider.VideoSliderModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.videoslider-videoslider',
data: {
sensorId: null,
startTime: null,
stopTime: null
},
@colek42
colek42 / gist:651127a7925b36f176192749338979c6
Created August 18, 2016 00:45
penumbra line, sunlight
https://github.com/AnalyticalGraphicsInc/cesium/issues/4123
var viewer = new Cesium.Viewer('cesiumContainer');
var penumbraSunlightPolyline = viewer.entities.add({
name: 'sunlight/penumbra polygon',
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray([
0, 0,
1, 0
{
"editor.fontSize": 14,
"go.gopath": "/home/cole/go",
"go.vetOnSave": true,
"go.formatTool": "gofmt",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.formatOnSave": true,
"eslint.enable": true,
"eslint.enableAutofixOnSave": true,
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"],
@colek42
colek42 / kalman.py
Last active June 3, 2016 18:52
Kalman Filter
import math
import random
import matplotlib as mp
rndm = random.Random()
class KalmanFilter():
def __init__(self):
self.kalmanGain = 0
self.covariance = 1.0
import re
import codecs
import base64
import os
from Tkinter import *
from tkMessageBox import showinfo
from tkFileDialog import askopenfilename
class Person:
def __init__(self, file=None, baseDir=None):
import re
import codecs
import base64
import os
from Tkinter import *
from tkMessageBox import showinfo
from tkFileDialog import askopenfilename
class Person:
def __init__(self, file=None, baseDir=None):
//Paste this into http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html replacing exisiting code
var date = new Cesium.JulianDate.now();
var outObj = []
for(var i = 0; i < 100; i++){
var rand = Math.floor((Math.random() * 10000000) + 1);
var newDate = new Cesium.JulianDate();
Cesium.JulianDate.addMinutes(date, rand, newDate);
outObj.push({
ISO: Cesium.JulianDate.toIso8601(newDate),