This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SRC=$1 | |
DST=$2 | |
rio calc --co COMPRESS=LZW --co BIGTIFF=YES -t uint8 "(asarray (/ (+ 3278 (read 1 1)) 256) (mod (+ 3278 (read 1 1)) 256) (* 256 (- (+ 3278 (read 1 1)) (floor (+ 3278 (read 1 1))))))" $SRC $DST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def copy_extent_to_clipboard(separator=';'): | |
ext = iface.mapCanvas().extent() | |
coords = [ ext.xMinimum(), ext.yMinimum(), ext.xMaximum(), ext.yMaximum() ] | |
txt = separator.join([ "{:10.4f}".format(x) for x in coords ]) | |
QgsApplication.clipboard().setText(txt) | |
# Run: exec(open('C:/Users/j.arnaldich/copy_extent_to_clipboard.py'.encode('utf-8')).read()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check version | |
lsb_release -a | |
# Install zsh oh my zsh... | |
sudo apt install zsh | |
sudo apt-get install powerline fonts-powerline | |
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1 | |
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Proposed Purescript Solution for: https://github.com/josevalim/nested-data-structure-traversal | |
-- Pure solution (no mutability), Strongly Typed (try to mess around, eg, misspelling an attribute) | |
-- Nothing fancy (no optics), just the usual pure functional artillery (foldl, zipWith...) | |
-- plus the convenience of extendable row types in Purescript. A seasoned Purescript dev may improve | |
-- on this, though... | |
module Main where | |
import Prelude | |
import Data.Array (zipWith, length, (..), snoc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE VIEW table_columns AS | |
WITH table_oids AS ( | |
SELECT c.relname, c.oid | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE | |
pg_catalog.pg_table_is_visible(c.oid)), | |
column_types AS ( | |
SELECT | |
toids.relname AS "tablename", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq.exe --% -r ".result | map([(.doy|tostring), .timestamp, (.val|tostring), (.interpol|tostring)] | join(\",\")) | join(\"\n\")" rasdaman.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Also check data classes and collections for this | |
import inspect | |
import functools | |
def autoargs(*include,**kwargs): | |
def _autoargs(func): | |
attrs,varargs,varkw,defaults=inspect.getargspec(func) | |
def sieve(attr): | |
if kwargs and attr in kwargs['exclude']: return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--install-ghc runghc | |
--package aeson | |
--package aeson-pretty | |
--package lens-aeson | |
--package xml-lens | |
-} | |
{-# LANGUAGE OverloadedStrings #-} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--install-ghc runghc | |
--package aeson | |
--package lens-aeson | |
--package xml-lens | |
-} | |
{-# Language OverloadedStrings #-} | |
import Control.Monad.Reader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from affine import dumpsw | |
ts = rio.transform.from_gcps(ds.gcps[0]) | |
open(r"e:\public\aerot\1988040011117.tfw", 'w').write(dumpsw(ts)) |