Skip to content

Instantly share code, notes, and snippets.

View gwerbin's full-sized avatar
💭
I might be slow to respond.

Greg Werbin gwerbin

💭
I might be slow to respond.
View GitHub Profile
@zmwangx
zmwangx / zsh-separate-stdout-stderr.zsh
Created July 15, 2015 16:20
Zsh save stdout, stderr, and return value to different variables without temp file. The following construct evaluates "$@" and saves output on stdout in the parameter stdout, output on stderr in the parameter stderr, and return value in the parameter return. The idea was based on http://stackoverflow.com/a/18086548/1944784, but this implementati…
# The following construct evaluates "$@" and saves output on stdout in the
# parameter stdout, output on stderr in the parameter stderr, and return value
# in the parameter return.
#
# The idea was based on http://stackoverflow.com/a/18086548/1944784, but this
# implementation is completely race-condition-free. The implementation was
# refined during my exchange with Mathias Fredriksson @mafredri, in
# https://github.com/mafredri/zsh-async/issues/1. See mainly
# https://github.com/mafredri/zsh-async/issues/1#issuecomment-121468958, where
# the advantage of this implementation is explained.
@dergachev
dergachev / dergachev-gists-gems.md
Last active March 23, 2026 03:02
Looking for gems buried in my old gists

Looking for gems buried in my old gists

Inspired to do some spring cleaning today, I reviewed my archived gists to see if there's anything noteworthy. I was pleasantly surprised to find a few nuggets buried amongst random error logs and git diffs.

Some of them are interesting technical guides that took hours to write, and it's a shame that they've rotted away in obscurity. Several others were picked up by google, and turns out they even got a few comments and a bunch of stars.

@equalsraf
equalsraf / NeovimCygwin.md
Last active June 22, 2024 09:35
Neovim in Cygwin

TLDR; no, libuv doesn't work in Cygwin just yet, see at the bottom.

Requirements

I tested using the master branch (9d3449852bd35c9283948186d0259c1bf73b8579 or later)

I installed the following in the cygwin setup

  • gcc-c++ make cmake pkg-config libtool
@MightyPork
MightyPork / usb_hid_keys.h
Last active March 20, 2026 10:23
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@WittmannF
WittmannF / compare-svm-kernels.py
Last active January 23, 2025 14:28
Visualization of SVM Kernels Linear, RBF, Poly and Sigmoid on Python (Adapted from: http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html)
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn.cross_validation import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.datasets import make_moons, make_circles, make_classification
from sklearn.svm import SVC
h = .02 # step size in the mesh
@justjanne
justjanne / Price Breakdown.md
Last active February 8, 2026 17:49 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@kurtbrose
kurtbrose / parsley_examples.py
Last active July 19, 2018 16:03
little parsley examples
# how to separate items in a list from separators
parsley.makeGrammar('''
a_list = ('a':it ','? -> it)*
''', {})('a,a,a').a_list()
# result is ['a', 'a', 'a']
# strict comma-delimeted items (at least one item)
parsley.makeGrammar('''
a_list = 'a':first (',' 'a')*:rest -> [first] + rest
@YohanObadia
YohanObadia / knn_impute.py
Last active January 25, 2024 14:23
Imputation of missing values with knn.
import numpy as np
import pandas as pd
from collections import defaultdict
from scipy.stats import hmean
from scipy.spatial.distance import cdist
from scipy import stats
import numbers
def weighted_hamming(data):

Using O2D to Program Duck PCBs

Special Thanks to KacKLaPPen23 and iNViSiBiLiTi for making this guide possible and being generally excellent people!

Programming Duck PCBs with O2D is a notoriously shitty experience.

Luckily with O2D 1.10 and this guide it will be less shitty!

Prerequisites

@pradyunsg
pradyunsg / proposal.md
Last active February 7, 2020 19:56
@pradyunsg's GSoC 2017 proposal

Adding Proper Dependency Resolution to pip

  • Name: Pradyun S. Gedam
  • Email: [[email protected]][mailto-email]
  • Github: [pradyunsg][github-profile]
  • University: [VIT University, Vellore, India][vit-homepage]
  • Course: Bachelor of Technology in Computer Science and Engineering
  • Course Term: 2016/17 - 2019/20 (4 Year)
  • Timezone: IST (GMT +5:30)
  • GSoC Blog RSS Feed URL: