Skip to content

Instantly share code, notes, and snippets.

View PageotD's full-sized avatar

Damien Pageot PageotD

View GitHub Profile
@PageotD
PageotD / voronoi.py
Last active January 25, 2022 14:35
Voronoi map
import numpy as np
def voronoi(nx, ny, dh, xp, yp, val, xrng, yrng):
"""
Simple Voronoi 2D interpolation.
:param n1: number of points in the first dimension of the output model
:param n2: number of points in the second dimension of the output model
:param dh: spatial sampling
:param xp: x-coordinates of points to interpolate
@PageotD
PageotD / eikonal.py
Last active August 6, 2024 19:26
Eikonal
import heapq as hq
import numpy as np
import numpy.ma as ma
class Eikonal:
"""
Eikonal solver.
References
----------
@PageotD
PageotD / vigenre.py
Created December 31, 2021 09:53
The Vigenère cipher
#!/usr/bin/python
def chartable():
"""
Define universe, i.e the character table available for encryption and decryption
"""
universe = " " # space character
universe += "0123456789" # numbers
universe += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" # letters
universe += "!#$%&'()*+,-./:;<=>?@[\]^_`{|}" # special characters
@PageotD
PageotD / main.yaml
Created December 4, 2021 18:41
Simple Ansible role: Grafana
---
- name: 'Install Grafana dependencies'
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- gnupg2
state: 'present'