Skip to content

Instantly share code, notes, and snippets.

View francbartoli's full-sized avatar

Francesco Bartoli francbartoli

View GitHub Profile
@TylerWanner
TylerWanner / README.md
Last active March 4, 2024 20:54
Terraform Deploy Prefect Server to GCP

Provisioning Prefect Server on GCP using Terraform

Requirements: Terraform, GCP credentials with permission to create a project Tested with: Terraform v0.12.23, google cloud provider v3.26

To run:

You can use an environment variable to set which service account key to use during provisioning export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key The service account you use must belong to a GCP project that has the necessary APIs enabled (such as billing and resource manager)--if it does not, you may have to enable these APIs manually along the way in those projects In this directory, run terraform init then terraform apply -- you will need to provide a billing_id and organization_id for your GCP project

Once successful, be sure to add the following to your ~/.prefect/config.toml

@tomkralidis
tomkralidis / README.md
Last active August 3, 2020 00:48
Metadata records TinyDB experiment

Overview

This gist demonstrates creating a document store of OGC API - Records records using TinyDB as a backend.

Steps

pip3 install lxml owslib tinydb
python3 create-records-tinydb.py msc-wis-dcpc-discovery-metadata.xml
@t-book
t-book / Apache:GeoNode SSL-TLS LE Authority
Last active May 7, 2019 19:21
Add let´s enrypt to geonode
# - Close port 8080 for inbound networking
# - Edit your local_settings to use proxy /geonode (and not port 8080)
# - Add following to local_settings: AVATAR_GRAVATAR_SSL = True
# - make sure mod_ssl is active: $ a2enmod ssl
# add let´s encrypt repository
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
# install certbot
@dedsm
dedsm / timescale--db--backend--base.py
Last active April 24, 2024 14:15
WeRiot Django Timescale integration
import logging
from django.contrib.gis.db.backends.postgis.base import \
DatabaseWrapper as PostgisDBWrapper
from django.db import ProgrammingError
from .schema import TimescaleSchemaEditor
logger = logging.getLogger(__name__)
@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active April 16, 2024 21:39
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@francbartoli
francbartoli / nc_to_gtiff.py
Created November 24, 2017 22:55 — forked from arbennett/nc_to_gtiff.py
Workflow for uploading data from netcdf to google earth engine
#!/usr/bin/env python2
"""
Script that allows for conversion of a netcdf file to
a stack of geotiff files with each raster being a time
slice from the input file.
Base implementation taken from:
https://www.linkedin.com/pulse/convert-netcdf4-file-geotiff-using-python-chonghua-yin
Usage:
@lukas-h
lukas-h / license-badges.md
Last active April 21, 2024 09:35
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@max-mapper
max-mapper / readme.md
Last active January 28, 2024 18:11
How-to: Write a node module with voxel.js

Writing node modules with voxel.js

This is a short guide that will teach you the workflows that have been figured out by the voxel.js community for writing node modules + sharing them on NPM and Github. It is assumed that you have a basic understanding of JavaScript, github and the command line (if not you can check out an introduction to git and the command line or learn JS basics from JavaScript for Cats)

The voxel-tower repository on github contains all the example code from this guide.

Table of contents

@isao
isao / funcsimple.js
Created December 4, 2012 00:08
minimal cli func test with shelljs
#!/usr/bin/env node
var assert = require('assert'),
shell = require('shelljs'),
path = require('path'),
BASEDIR = path.resolve(__dirname, '../') + '/',
NEWSAPP = BASEDIR + 'examples/newsboxes/';
@glenrobertson
glenrobertson / TileLayer.GeoJSON.js
Created September 15, 2012 00:02
GeoJSON Leaflet Tile Layer
/*
GeoJSON layer with mouse hover events to properties for each feature
Requires JQuery to handle the AJAX requests
Currently only supports FeatureCollections
Features must have ID's, so they can be deduplicated across tiles (not rendered twice).
*/
/*
Control that shows HTML content for a point on hover
*/