Skip to content

Instantly share code, notes, and snippets.

View ougx's full-sized avatar

Michael Ou@SSPA ougx

View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@ougx
ougx / packages.json
Created January 29, 2019 05:48
Sync Settings for Atom
df
#==========================================================
#======================== 01 exec =========================
#==========================================================
universe = vanilla
executable = 2_run_NPNM.bat
log = out/all.$(Cluster).log
output = out/out.$(Cluster).$(Process).txt
error = err/err.$(Cluster).$(Process).txt
#initialdir = result
#==========================================================
#======================== 01 copy =========================
#==========================================================
# Run job on each machine
executable = 1_copy_files.bat
output = 1_out/copy.outfile.$(Process).txt
error = 1_err/copy.errors.$(Process).txt
transfer_input_files = 1951-2000-pump.zip, unzip.exe
:: Check the cells that are skipped and export them to a file for reconstruct the condor sub file
@echo off
cd result-pump
echo failed cells > ..\3_failed.txt
echo finished cells > ..\3_finished.txt
for /f "tokens=1, 2" %%i in (..\3_cell_list.txt) do call :process %%i %%j
goto finish
:process
:: echo %1 %2
echo Working directory: %~dp0 of %computername% by %username%
echo Running time: %date%; %time%
set lay= 1
set row= %1
set col= %2
set pump= -0.2
set namfile=rrca
set cell=R%1C%2
echo Working directory: %~dp0 of %computername% by %username%
echo Running time: %date%; %time%
rmdir /s /q C:\condor\data
mkdir C:\condor\data\
unzip.exe -o MF_DATA.zip -d C:\condor\data\
@ougx
ougx / base-style.css
Created December 14, 2018 19:16
style-sheet-dash-app
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
- Code
@ougx
ougx / irrigation_survey.md
Last active September 3, 2018 15:35
Irrigation Survey

Irrigation Survey

Which of these categories best describes your employer?

Self-Employed Irrigation industry Water resources management Political representative Wildlife organization

I am aware of the efforts of improving agricultural irrigation sustainability.

@ougx
ougx / zonal_stats.py
Created September 21, 2017 05:22 — forked from perrygeo/zonal_stats.py
Python implementation of zonal statistics function. Optimized for dense polygon layers, uses numpy, GDAL and OGR to rival the speed of starspan.
"""
Zonal Statistics
Vector-Raster Analysis
Copyright 2013 Matthew Perry
Usage:
zonal_stats.py VECTOR RASTER
zonal_stats.py -h | --help
zonal_stats.py --version