Skip to content

Instantly share code, notes, and snippets.

View glostis's full-sized avatar
🛰️
Remote sensing

Guillaume Lostis glostis

🛰️
Remote sensing
  • Paris, France
View GitHub Profile
@glostis
glostis / Dockerfile
Created March 14, 2024 09:14
Dockerfile based on Archlinux with `yay` installed
FROM archlinux
# Need to create a non-root user, otherwise `makepkg` refuses to work
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build
RUN echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN pacman -Syu --noconfirm && pacman -S --noconfirm sudo
USER build
import random
from copy import deepcopy
from collections import defaultdict
from itertools import product
from tqdm import tqdm
def play_game(size=3, verbose=False):
candidates = {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@glostis
glostis / .travis.yml
Created November 26, 2019 10:12
Example of a .travis.yml with addons, several stages, and PyPI deploy
os: linux
dist: xenial
language: python
python: 3.7
addons:
apt:
sources:
- sourceline: 'ppa:ubuntugis/ppa'
packages:
- gdal-bin
from planet.api import ClientV1, filters
from simplekml import Kml, Style, Color
def get_items(item_type="SkySatScene", permission="assets.basic_panchromatic_dn:download"):
client = ClientV1()
query = filters.and_filter(filters.permission_filter(permission))
request = filters.build_search_request(query, item_types=[item_type])
result = client.quick_search(request)