Skip to content

Instantly share code, notes, and snippets.

ShuaiYi Zhang understar

Block or report user

Report or block understar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
understar /
Created Apr 27, 2017 — forked from oeon/
notes from processing Harmony Landsat post

##This workflow is only for the pansharpened images

gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" rgb.vrt LC80430352013339LGN00_B4.tif LC80430352013339LGN00_B3.tif LC80430352013339LGN00_B2.tif

####NIR, SWIR, and visible red
gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" false.vrt LC80430352013339LGN00_B5.tif LC80430352013339LGN00_B6.tif LC80430352013339LGN00_B4.tif

####color infrared
gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" cir.vrt LC80430352013339LGN00_B5.tif LC80430352013339LGN00_B3.tif LC80430352013339LGN00_B4.tif

understar / gist:2c879afc911d9152e49ca6ded0ac8cfa
Created Mar 22, 2017 — forked from drewda/gist:1299198
Jenks natural breaks classification
View gist:2c879afc911d9152e49ca6ded0ac8cfa
# code from
# described at
def getJenksBreaks( dataList, numClass ):
mat1 = []
for i in range(0,len(dataList)+1):
temp = []
for j in range(0,numClass+1):
understar /
Created Apr 11, 2016 — forked from evi1m0/
12306 新版验证码识别脚本;
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
12306 Captcha Picture:
author: Evi1m0@20150316
1. Download Captcha
2. Pic Conver Text
View gist:d28554d0d05ce7beac7c
import numpy as np
def makeGaussian(size, fwhm = 3, center=None):
""" Make a square gaussian kernel.
size is the length of a side of the square
fwhm is full-width-half-maximum, which
can be thought of as an effective radius.
understar /
Last active Aug 29, 2015 — forked from kastnerkyle/
与scikit learn的pipeline兼容的,ZCA白化,自带特征标准化
# (C) Kyle Kastner, June 2014
# License: BSD 3 clause
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.utils import array2d, as_float_array
from scipy.linalg import eigh
import numpy as np
class ZCA(BaseEstimator, TransformerMixin):
def __init__(self, n_components=None, bias=.1, copy=True):
understar /
Created Aug 4, 2014
scikit-learn RBM feature extraction and logistic classification
Restricted Boltzmann Machine features for digit classification
For greyscale image data where pixel values can be interpreted as degrees of
blackness on a white background, like handwritten digit recognition, the
Bernoulli Restricted Boltzmann machine model (:class:`BernoulliRBM
<sklearn.neural_network.BernoulliRBM>`) can perform effective non-linear
feature extraction.
understar /
Last active Aug 29, 2015
plot picture scatter
# -*- coding: cp936-*-
__author__ = 'shuaiyi'
import logging
import numpy as np
import calc_tsne as tsne
import matplotlib.pyplot as plt
from features import dataset as ds

Basic example of taking an output from our server and putting it on a map. As leaflet allows you to add geoJSON directly, we convert it from esri's JSON format to a more standard one.

understar /
Created Jul 24, 2014
基于sstv(slow scan television)技术的图像编码到音频
Demonstrates playing the generated samples directly using PyAudio
Tested on PyAudio 0.2.7
from __future__ import division
from pysstv.sstv import SSTV
from time import sleep
from itertools import islice
import struct, pyaudio
You can’t perform that action at this time.