Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍

Ivan Ivanov suricactus

🌍
View GitHub Profile
View BuildingPCRasterOnUbuntu.md

What follows are the steps I took to build PCRaster on Fedora (34) from source. I chose to build from source because I didn't want to use the conda installer and I could not find a stand alone package.

The process below assumes that you have a working QGIS build environment since some of the PCRaster dependencies are provided by the QGIS dependency tree too.

git clone git@github.com:pcraster/pcraster.git
View test_tf_cuda
#!/usr/bin/env python3
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
View sattelity.py
from typing import (Union, Dict, Any)
import numpy as np
import pandas as pd
import geopandas as gpd
from geopandas.geodataframe import GeoDataFrame
import rasterio
import rasterio.features
from rasterio.io import DatasetWriter
@suricactus
suricactus / README.md
Last active May 29, 2020
OpenLISEM maps creation, Windows
View README.md
  1. Please setup all the needed gdal and pcraster tools in your PATH
  2. Make sure you follow the file structure:

-- soils -- DEM -- roads -- scripts -- ....

  1. IMPORTANT: find your ldd value yourself and change all the environment variables!!!
@suricactus
suricactus / kampala.sh
Last active Oct 11, 2018
Lisem scripts
View kampala.sh
#!/bin/bash -e
./scripts/lisem_mask_prepare.sh --resolution 20 DEM/kampala_demARCs1.tif 19887 --cleanup
./scripts/lisem_resample.sh landuse2016/frBU2016.tif mask20m.map build20m.map
./scripts/lisem_resample.sh landuse2016/frSOIL2016.tif mask20m.map bare20m.map
./scripts/lisem_resample.sh landuse2016/frVEG2016.tif mask20m.map veg20m.map
./scripts/lisem_resample.sh soils/bulkdens_sl2r.tif mask20m.map bulkdens_sl2r.map
View pcraster42_install_ubuntu1804.sh
#!/bin/bash
### To work properly, run this script as root
# path where the script to be installed
INSTALL_PATH=/opt
INSTALL_DIR=pcraster
# actual script, see http://pcraster.geo.uu.nl/getting-started/pcraster-on-linux/
cd $INSTALL_PATH
View .eslintrc
{
"extends": ["eslint:recommended", "semistandard-react"],
"rules": {
"comma-dangle": ["error", "always-multiline"],
"jsx-quotes": ["error", "prefer-double"],
"max-depth": ["error", 4],
"max-params": ["error", 3],
"max-depth": ["error", 4],
"max-nested-callbacks": ["error", 3],
"complexity": ["warn", 20],
View sublime-text-3
{
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_size": 10,
"ignored_packages":
[
],
"index_exclude_patterns":
[