Skip to content

Instantly share code, notes, and snippets.

View g4brielvs's full-sized avatar

Gabriel Stefanini Vicente g4brielvs

View GitHub Profile
@g4brielvs
g4brielvs / blackmarble.R
Last active February 12, 2024 17:17
BlackMarbleR Example
library(blackmarbler)
library(geodata)
library(sf)
# Set NASA EarthData Token
bearer <- "NASA-EARTHDATA-TOKEN"
# Retrieve GADM polygon of Lebanon
roi <- gadm(country = "LBN",
level=1,
@g4brielvs
g4brielvs / blackmarble.py
Last active February 15, 2024 19:09
BlackMarblePy Example
import pandas as pd
from blackmarble.extract import bm_extract
from blackmarble.raster import bm_raster
# Set NASA EarthData Token (envvar or alternative recommended)
bearer = "<NASA-EARTHDATA-TOKEN>"
# Retrieve GADM polygon of Lebanon
roi = geopandas.read_file(
"https://geodata.ucdavis.edu/gadm/gadm4.1/json/gadm41_GHA_1.json.zip"
@g4brielvs
g4brielvs / just_intonation.py
Created February 15, 2020 07:29 — forked from endolith/readme.md
Just intonation classes for music theory experiments in Python
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 30 18:55:13 2014
Just intonation classes for music theory experiments in Python
"""
from __future__ import division, print_function
from fractions import gcd as _gcd
from fractions import Fraction
@g4brielvs
g4brielvs / cursed_starwars_data.R
Created December 10, 2019 01:28 — forked from brooke-watson/cursed_starwars_data.R
cursed_data_challenge
# ---------------------------------------
# untidy data
# ---------------------------------------
# this dataset is a sample of the kind of data that might appear in the wild,
# particularly when dealing with government data,
# particularly when trying to convert an output table or individual report
# back into a raw data format that can be analyzed.
# in these test datasets, discrete observations are spread out across multiple rows.
@g4brielvs
g4brielvs / cloudSettings
Last active July 15, 2021 06:33
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-15T06:33:49.144Z","extensionVersion":"v3.4.3"}
@g4brielvs
g4brielvs / gpg-import-and-export-instructions.md
Created December 7, 2017 19:54 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@g4brielvs
g4brielvs / Brewfile
Last active March 21, 2018 14:53
Brewfile
tap "homebrew/science"
tap "homebrew/core"
tap "homebrew/versions"
tap "homebrew/bundle"
tap "homebrew/services"
tap "caskroom/drivers"
tap "caskroom/fonts"
tap "caskroom/versions"
tap "caskroom/cask"
tap "caskroom/eid"
@g4brielvs
g4brielvs / keybase.md
Created June 4, 2016 21:20
Keybase proof of identity

Keybase proof

I hereby claim:

  • I am g4brielvs on github.
  • I am g4brielvs (https://keybase.io/g4brielvs) on keybase.
  • I have a public key ASBaVBtusSOmUlw7Cx_ALV80uHbuCltCfH3RqLe6gyFM9Qo

To claim this, I am signing this object:

atom-sync-settings
;; init.el --- Emacs configuration
;;
;; Author: Gabriel Vicente <gabrielusvicente@gmail.com>
;; URL: http://www.gabrielusvicente.com
;; Version: 1.0.0
;; This file is not part of GNU Emacs.
;; INSTALL PACKAGES
;; --------------------------------------