Skip to content

Instantly share code, notes, and snippets.

View yejiyang's full-sized avatar

Jiyang Ye yejiyang

  • NGI
  • Oslo, Norway
View GitHub Profile
@yejiyang
yejiyang / read_zmapplus.py
Created December 20, 2017 14:40 — forked from wassname/read_zmapplus.py
python function to read zmap plus asci grid format
def read_zmapplusgrid(inputfile,dtype=np.float64):
"""Read ZmapPlus grids
Format is explained here http://lists.osgeo.org/pipermail/gdal-dev/2011-June/029173.html"""
# read header, read until second '@', record header lines and content
infile = open(inputfile,'r')
comments=[]
head=[]
a=0 # count '@'s
headers=0 # cound header+comment lines
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 -n [number] -m [message] -u [username] -p [password]";
echo "";
echo "[number] = SMS number to send message to";
echo "[message] = Text of message you want to send";
echo "[username] = Username assocated with aql account";
echo "[password] = Password assocated with aql account";
echo " Both the username and password options are optional and";
# KISS Install and use pyenv on CentOS 6.5 (final)
# pyenv => https://github.com/yyuu/pyenv
cd ~
git clone git://github.com/yyuu/pyenv.git .pyenv
echo '# pyenv config' >> ~/.bash_profile
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile