Skip to content

Instantly share code, notes, and snippets.

View Guitaricet's full-sized avatar

Vlad Lialin Guitaricet

View GitHub Profile
@st3v
st3v / ssh-host-color
Last active May 20, 2024 03:28
Automatically set background color in iTerm depending on ssh host
#!/bin/bash
#
# ssh into a machine and automatically set the background
# color of Mac OS X Terminal depending on the hostname.
#
# Installation:
# 1. Save this script to /usr/local/bin/ssh-host-color
# 2. chmod 755 /usr/local/bin/ssh-host-color
# 3. alias ssh=/usr/local/bin/ssh-host-color
# 4. export PRODUCTION_HOST="<hostname_production_server>"
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active May 7, 2025 16:40
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@0xnurl
0xnurl / openfst_python_on_macos.md
Last active October 23, 2021 17:35
Installing OpenFST Native Python Extension on MacOS

Installing OpenFst Native Python Extension on MacOS

Starting from version 1.5, OpenFst has offered a native Python module, making the use of external wrappers like PyFst unnecessary. This has been greatly helpful since PyFst doesn't support Python 3.

1. Install OpenFst

from random import random, choice
def noise_generator(string, noise_level, chars):
noised = ""
for c in string:
if random() > noise_level:
noised += c
if random() < noise_level:
noised += choice(chars)
return noised
import tensorflow as tf
from tensorflow.contrib.rnn import RNNCell
from tensorflow.contrib.rnn import LSTMStateTuple
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import array_ops
from tensorflow.python.ops.rnn_cell_impl import _linear
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import nn_ops
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active July 21, 2025 06:42
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb