Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View perusio's full-sized avatar

António P. P. Almeida perusio

View GitHub Profile
using GeometryBasics
x(a::AbstractVector) = first(a)
y(a::AbstractVector) = last(a)
x(a::AbstractMatrix) = a[ :, 1 ]
y(a::AbstractMatrix) = a[ :, 2 ]
function orientation(p::AbstractVector, q::AbstractVector, r::AbstractVector)::Int
val = ( y(q) - y(p) ) * ( x(r) - x(q) ) - ( x(q) - x(p) ) * ( y(r) - y(q) )
return (val ≈ 0) ? 0 : ( (val > 0) ? 1 : 2 )
@perusio
perusio / .tmux.conf
Last active October 25, 2021 17:17
My tmux.conf
## tmux configuration.
## Inspired by: https://github.com/tony/tmux-config/blob/master/.tmux.conf
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow
# Easy reload config.
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
# set window split
@perusio
perusio / lake_konstanz_aoi.json
Created October 21, 2019 13:25
Lake Konstanz AOI
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / geostore-found-spot-AU.json
Created September 23, 2019 14:44
Geostore found image not available through OneAtlas API. Australia.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / job_inputs.json
Created September 19, 2019 05:56
UP42: Re-using a previously downloaded image
{
"tiling:1": {
"tile_width": 768,
"tile_height": 768,
"match_extents": false,
"output_prefix": "",
"augmentation_factor": 1,
"discard_empty_tiles": true
},
"data-conversion:1": {
@perusio
perusio / data.json
Created September 19, 2019 05:14
UP42: GeoJSON from downloaded image with order ID.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / data.json
Created September 19, 2019 04:49
UP42: GeoJSON TestQuery output with price estimation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / data.json
Created September 12, 2019 17:00
ryo geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / first_workflow_aoi.json
Created August 29, 2019 11:54
UP42 Getting started: Running your first workflow AOI.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@perusio
perusio / first_job_run.sh
Last active August 29, 2019 11:23
UP42 API: Script to run your fist job via the API.
#!/bin/bash
# first_job_run.sh --- Simple bash script to run a first job via the
# UP42 API.
# Copyright (C) 2019 UP42 GmbH
# Author: António P. P. Almeida <antonio.almeida@up42.com>
# Permission is hereby granted, free of charge, to any person obtaining a