Skip to content

Instantly share code, notes, and snippets.

View Guitaricet's full-sized avatar
💭
Statuses at GitHub? Really?

Vlad Lialin Guitaricet

💭
Statuses at GitHub? Really?
  • UMass Lowell
  • Lowell, MA
View GitHub Profile
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active December 5, 2023 10:26
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
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
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
@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

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active May 17, 2024 09:02
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@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>"