Skip to content

Instantly share code, notes, and snippets.

View gutzbenj's full-sized avatar
🌈
think of your environment

Benjamin gutzbenj

🌈
think of your environment
View GitHub Profile
@amotl
amotl / example_era5_planetary.py
Created February 27, 2023 21:36
Lazily access ECMWF's ERA5 data via xarray from Planetary Computer's SpatioTemporal Asset Catalog (STAC) API. The data is physically stored in Zarr format on Azure Blob Filesystem (ABFS).
"""
About
=====
Lazily access ECMWF's ERA5 data via xarray from Planetary Computer's
SpatioTemporal Asset Catalog (STAC) API. The data is physically stored in Zarr
format on Azure Blob Filesystem (ABFS).
Setup
=====
@ML-engineer
ML-engineer / duckdb_bq_storage_api.py
Created July 4, 2022 22:08
Read BQ table to DuckDB directly from storage read api
import duckdb
from google.cloud import bigquery
bqclient = bigquery.Client()
table = bigquery.TableReference.from_string(
"bigquery-public-data.utility_us.country_code_iso"
)
rows = bqclient.list_rows(table)
country_code_iso = rows.to_arrow(create_bqstorage_client=True)
cursor = duckdb.connect()
@yokawasa
yokawasa / ghcr.md
Last active May 2, 2024 14:27
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mulle-nat
mulle-nat / Cherry-Tastatur.keylayout
Created September 27, 2019 14:29
Cherry Stream 3.0 für Mac OS Keyboard Layout
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<keyboard group="0" id="4712" name="Cherry-Tastatur, Deutsch" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="ANSI" modifiers="Modifiers"/>
<layout first="18" last="18" mapSet="JIS" modifiers="Modifiers"/>
<layout first="21" last="23" mapSet="JIS" modifiers="Modifiers"/>
<layout first="30" last="30" mapSet="JIS" modifiers="Modifiers"/>
<layout first="33" last="33" mapSet="JIS" modifiers="Modifiers"/>
<layout first="36" last="36" mapSet="JIS" modifiers="Modifiers"/>
@hydrosquall
hydrosquall / index.md
Last active January 8, 2022 19:35
Building Inclusive Code Review Culture
@cbandy
cbandy / .gcloudignore
Last active November 13, 2023 10:17
Ignore everything except allowed files in .gcloudignore
# Ignore everything
/[!.]*
/.?*
# Except the Cloud Function files we want to deploy
!/package.json
!/index.js
!/lib/**
#!include:.gitignore
@heyalexej
heyalexej / pytz-time-zones.py
Created November 16, 2016 09:14
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@olih
olih / jq-cheetsheet.md
Last active May 2, 2024 00:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@cspanring
cspanring / pip-install-gdal.md
Last active October 18, 2023 07:56
Installing GDAL in a Python virtual environment

Installing GDAL in a Python virtual environment

Get gdal development libraries:

$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev

Create and activate a virtual environment: