Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am a-rodin on github.
  • I am arodin (https://keybase.io/arodin) on keybase.
  • I have a public key whose fingerprint is 412F 4C3A 4940 AEDB 63D6 F3F1 6B4C 4D06 8810 5351

To claim this, I am signing this object:

View A hack for showing LaTeX formulas in GitHub markdown.md

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

View A better (she|hash)bang for your shell scripts.md

A shebang/hashbang is the first line of an executable script that starts with #!.

Example for an executable shell script:

#!/bin/sh

And here is what I propose to use instead:

@a-rodin
a-rodin / robinson.ipynb
Last active Jul 6, 2020
Example of Recurrent Highway Networks (https://arxiv.org/abs/1607.03474) with PyTorch
View robinson.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View notebook-progress-pytorch.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View curly.sh
# Colorize and format curl output using pygments and json
# The idea is taken from http://benw.me/posts/colourized-pretty-printed-json-with-curl/
# Dependencies: `npm i -g json && pip install pygments` and w3m text browser from your dist repository.
# Usage: run `source curly.sh`, then use `curly` as plain curl
# It is even possible to even do `alias curl=curly` and use it as a replacement to plain curl.
function curly {
$(which curl) --silent --show-error -i "$@" | (
IFS=$'\n'
PROCESSOR="cat"
View ubuntu-mbp-hardware.yml
# Ansible role for setting up hardware drivers for Macbook Pro 13" (Early 2015) in Ubuntu 16.04 LTS
# License: GPLv3
# Usage:
# - clone this gist with git
# - go to the gist directory
# - run command `sudo apt-get install ansible && ansible-playbook ubuntu-mbp-hardware.yml`
- name: Setup Macbook hardware
hosts: localhost
become_user: root
@a-rodin
a-rodin / deep-regressor.py
Last active Mar 21, 2016
TensorFlow Deep Regressor with sklearn-complatible interface
View deep-regressor.py
import numpy as np
import tensorflow as tf
class DeepRegressor:
def __init__(self, batch_size = None, max_iter = 2001, random_state=0, verbose=False, opt_step = 0.05, C = 0.0):
self.set_params(dict(
batch_size = batch_size,
max_iter = max_iter,
random_state = random_state,
verbose = verbose,
View nginx-custom-build.sh
#!/bin/bash
# Author: Alexander Rodin <rodin.alexander@gmail.com>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
@a-rodin
a-rodin / unsharp.md
Last active Nov 9, 2015
Unsharp mask params relations in pupular softare
View unsharp.md

Unsharp mask params relations in pupular softare

There is correspondence between Unsharp Mask parameters names and scales in widely used graphics software.

Parameter Adobe Photoshop ImageMagick GIMP
Radius 1x 1x 2.5x
Amount 100x 1x 1x
Threshold 1x 1x 1x
You can’t perform that action at this time.