I hereby claim:
- I am zeitsperre on github.
- I am zeitsperre (https://keybase.io/zeitsperre) on keybase.
- I have a public key ASAYbNVyoi4t4gD94LiYrYO6-b3YuMNwLY3pTddnlo6ImAo
To claim this, I am signing this object:
import logging | |
from datetime import datetime as dt | |
from getpass import getpass | |
from pathlib import Path | |
from paramiko import SSHClient | |
from scp import SCPClient | |
logging.basicConfig( | |
filename=f"{ dt.strftime(dt.now(), '%Y-%m-%d')}_{Path(__file__).stem}.log", |
def read_shapefile(shp_path): | |
""" | |
Read a shapefile into a Pandas dataframe with a 'coords' column holding | |
the geometry information. This uses the pyshp package | |
""" | |
import shapefile | |
#read file, parse out the records and shapes | |
sf = shapefile.Reader(shp_path) | |
fields = [x[0] for x in sf.fields][1:] |
""" | |
Install Anaconda3 https://www.anaconda.com/products/individual (Beginner-level, larger install) | |
or Miniconda3: https://docs.conda.io/en/latest/miniconda.html (Experienced, minimal install) | |
In a terminal / command prompt with `conda` installed: | |
$ conda create --name data_processing -c conda-forge python=3.7 xarray clisops | |
$ conda activate data_processing | |
<Modify paths to folders (source files, target_folder)> | |
$ python subset_clisops_xarray.py |
from pathlib import Path | |
from typing import List | |
import xarray as xr | |
from xclim.core import calendar as xcal | |
root_dir = Path(Path().cwd().root) | |
source_dir = root_dir.joinpath("my/source/files/folder/") | |
processed_files = [x for x in source_dir.glob("*.nc")] |
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | |
<qgis readOnly="0" simplifyLocal="1" simplifyMaxScale="1" version="3.6.0-Noosa" styleCategories="AllStyleCategories" simplifyAlgorithm="0" minScale="1e+08" hasScaleBasedVisibilityFlag="0" labelsEnabled="0" simplifyDrawingTol="1" maxScale="0" simplifyDrawingHints="1"> | |
<flags> | |
<Identifiable>1</Identifiable> | |
<Removable>1</Removable> | |
<Searchable>1</Searchable> | |
</flags> | |
<renderer-v2 forceraster="0" type="graduatedSymbol" enableorderby="0" attr="hist_1981-2010_p50" graduatedMethod="GraduatedColor" symbollevels="0"> | |
<ranges> | |
<range label=" 980.0 - 990.0 " upper="990.000000000000000" symbol="0" lower="980.000000000000000" render="true"/> |
import asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |
# setup | |
from cdo import * | |
cdo = Cdo() | |
cdo.debug = True | |
in_file = '/path/to/in_file.nc' | |
out_file = '/path/to/out_file.nc' | |
date1 = '2018-03-01T00:00:00' | |
date2 = '2018-03-01T02:00:00' | |
# my target is in meters |
#" .. " | |
#" .PLTJ. " | |
#" <><><><> " | |
#" KKSSV' 4KKK LJ KKKL.'VSSKK " | |
#" KKV' 4KKKKK LJ KKKKAL 'VKK " | |
#" V' ' 'VKKKK LJ KKKKV' ' 'V " | |
#" .4MA.' 'VKK LJ KKV' '.4Mb. " | |
#" . KKKKKA.' 'V LJ V' '.4KKKKK . " | |
#" .4D KKKKKKKA.'' LJ ''.4KKKKKKK FA. " | |
#" +QDD ++++++++++++XX++++++++++++ GFD+ " |
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Dec 14 17:34:07 2017 | |
""" | |
import sys | |
import random | |
import time | |
def boardOut(board): |
I hereby claim:
To claim this, I am signing this object: