Skip to content

Instantly share code, notes, and snippets.

View jsta's full-sized avatar
🐧
...

Jemma Stachelek jsta

🐧
...
View GitHub Profile
[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@jsta
jsta / xkb_jsta.sh
Last active November 20, 2023 04:23
setxkbmap
setxkbmap us -variant colemak_dh
setxkbmap us
man xkeyboard-config
setxkbmap -query
# git clone [email protected]:DreymaR/BigBagKbdTrixXKB.git
./install-dreymar-xmod.sh -s -i ~/test2 -n
setxkbmap -I /home/jemma/test/BigBagKbdTrixXKB/xkb-data_xmod/xkb -model pc105awide -layout us(cmk_ed_us) -option misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu -v 9
@jsta
jsta / .pylintrc
Last active August 7, 2023 15:26
A pylint default file
[BASIC]
# mark pdb commands as bad-names
bad-names=a,
alias,
args,
b,
break,
bt,
@jsta
jsta / environment.yml
Last active July 18, 2022 15:04
A minimal conda env for jupyter
name: jupyenv
channels:
- conda-forge
dependencies:
- pandas
- pytest
- black
- jupyterlab
- jupytext
@jsta
jsta / common_favorite_crs.md
Created February 1, 2022 18:11
List of common (favorite) CRS codes
  • 4326: lat-lon
  • 3857: gmaps, OSM, Pseudo-Mercator
@jsta
jsta / merge_webmp4.py
Last active December 22, 2021 21:32
merge .webm (Audio) file and a .mp4 (Video) file
# https://stackoverflow.com/a/35939357/3362993
import os
import glob
import subprocess
flist = sorted(glob.glob("*.webm") + glob.glob("*.mp4"))
pairs_index = [(x, x + 2) for x in range(0, len(flist), 2)]
flist_pairs = [flist[pairs_index[i][0]:pairs_index[i][1]] for i in range(0, int(len(flist)/2))]
@jsta
jsta / choropleth.js
Created December 17, 2021 16:53
Plot a featureCollection as a choropleth in Google Earth Engine (GEE)
// bottom-left, top-right
var aoi = ee.Geometry.Rectangle(43.1, 13, 47, 30);
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')
.filterBounds(aoi);
var ecoregions_img = ecoregions
.filter(ee.Filter.notNull(['SHAPE_AREA']))
.reduceToImage({
properties: ['SHAPE_AREA'],
@jsta
jsta / usa-conus_pygmt.py
Created December 15, 2021 22:01
Plot USA CONUS using pygmt - Generic Mapping Tools
import pygmt
fig = pygmt.Figure()
fig.coast(region="-122/23/-65/48r", frame=False, land="#666666", water="skyblue", projection="A-100/30/4.5i")
# fig.show()
fig.savefig("usa.pdf")
@jsta
jsta / write_gif.R
Created December 10, 2021 15:57
Use rstats magick to convert a png series to gif
library(magick)
image_write_gif(image_join(lapply(list.files("path/to/folder", pattern = "png",
include.dirs = TRUE, full.names = TRUE), image_read)), "output.gif", delay = 4.5)