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
understar / landsat_notes.md
Created Apr 27, 2017 — forked from oeon/landsat_notes.md
notes from processing Harmony Landsat post
View landsat_notes.md

##This workflow is only for the pansharpened images

####red-green-blue
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
understar / gist:2c879afc911d9152e49ca6ded0ac8cfa
Created Mar 22, 2017 — forked from drewda/gist:1299198
Jenks natural breaks classification
View gist:2c879afc911d9152e49ca6ded0ac8cfa
# code from http://danieljlewis.org/files/2010/06/Jenks.pdf
# described at http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
def getJenksBreaks( dataList, numClass ):
dataList.sort()
mat1 = []
for i in range(0,len(dataList)+1):
temp = []
for j in range(0,numClass+1):
temp.append(0)
@understar
understar / PicConverText.py
Created Apr 11, 2016 — forked from evi1m0/PicConverText.py
12306 新版验证码识别脚本;
View PicConverText.py
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
# website=linux.im
'''
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
understar / preproc.py
Last active Aug 29, 2015 — forked from kastnerkyle/preproc.py
与scikit learn的pipeline兼容的,ZCA白化,自带特征标准化
View preproc.py
# (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
understar / plot_rbm_logistic_classification.py
Created Aug 4, 2014
scikit-learn RBM feature extraction and logistic classification
View plot_rbm_logistic_classification.py
"""
==============================================================
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
understar / 420show.py
Last active Aug 29, 2015
plot picture scatter
View 420show.py
# -*- 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
logging.getLogger().setLevel(logging.INFO)
View README.md

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
understar / img2wav.py
Created Jul 24, 2014
基于sstv(slow scan television)技术的图像编码到音频
View img2wav.py
"""
Demonstrates playing the generated samples directly using PyAudio
Tested on PyAudio 0.2.7 http://people.csail.mit.edu/hubert/pyaudio/
"""
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.