Skip to content

Instantly share code, notes, and snippets.

View ashiklom's full-sized avatar

Alexey Shiklomanov ashiklom

View GitHub Profile
@ajelenak
ajelenak / h5-to-zarr.py
Last active March 1, 2023 16:04
Python code to extract HDF5 chunk locations and add them to Zarr metadata.
# Requirements:
# HDF5 library version 1.10.5 or later
# h5py version 3.0 or later
# pip install git+https://github.com/HDFGroup/zarr-python.git@hdf5
import logging
from urllib.parse import urlparse, urlunparse
import numpy as np
import h5py
import zarr
@robkooper
robkooper / .env
Last active February 21, 2019 15:17
Running PEcAn in docker swarm
# This file will override the configation options in the docker-compose
# file. Copy this file to the same folder as docker-compose as .env
# ----------------------------------------------------------------------
# GENERAL CONFIGURATION
# ----------------------------------------------------------------------
# Folder to store all data
DATA_DIR=/home/kooper/pecan
@ashiklom
ashiklom / config.xml
Last active January 22, 2019 23:08
Example ED parameter file
<?xml version="1.0"?>
<!DOCTYPE config SYSTEM "ed.dtd">
<config>
<pft>
<num>9</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
@pesterhazy
pesterhazy / ripgrep-in-emacs.md
Last active March 21, 2024 18:25
Using ripgrep in Emacs using helm-ag (Spacemacs)

Why

Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.

How

@inventionate
inventionate / install-r.sh
Last active August 31, 2023 18:27
Install R with OpenBLAS via Homebrew
# Stat Installation
# XCode CLT
xcode-select --install
# Update Homebrew
brew update
# Check for broken dependencies and/or outdated packages
brew doctor
@ShingoFukuyama
ShingoFukuyama / org-table-convert-on-the-spot
Created December 10, 2013 07:47
Convert Emacs org style table to csv/tsv/html/etc on the spot, instead of creating a new file.
(defun org-table-convert-on-the-spot (&optional format)
(interactive)
(unless (org-at-table-p) (user-error "No table at point"))
(org-table-align) ;; make sure we have everything we need
(let* ((beg (org-table-begin))
(end (org-table-end))
(txt (buffer-substring-no-properties beg end))
(formats '("orgtbl-to-tsv" "orgtbl-to-csv"
"orgtbl-to-latex" "orgtbl-to-html"
"orgtbl-to-generic" "orgtbl-to-texinfo"