Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@pvbhanuteja
pvbhanuteja / README.md
Created May 25, 2020 11:31 — forked from hxtree/README.md
Linux Screen

Linux Screens

Linux screens are great for running background tasks and are especially helpful when running a long process on a remote server due to SSH timelimits.

Start a new screen

screen

(Run commands for tasks)

Detach from a screen

@pvbhanuteja
pvbhanuteja / tmux-cheatsheet.markdown
Created May 25, 2020 11:31 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pvbhanuteja
pvbhanuteja / gist:0bbb95dd9a1d18c50fae4e97a7133f03
Created May 28, 2020 02:11
linux command to download a drive file
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
@pvbhanuteja
pvbhanuteja / regex_snippets
Created July 26, 2020 09:22
regex_snippets
. - Any Character Except New Line
\d - Digit (0-9)
\D - Not a Digit (0-9)
\w - Word Character (a-z, A-Z, 0-9, _)
\W - Not a Word Character
\s - Whitespace (space, tab, newline)
\S - Not Whitespace (space, tab, newline)
\b - Word Boundary
\B - Not a Word Boundary
@pvbhanuteja
pvbhanuteja / email_domains
Created July 26, 2020 09:53
top 100 email domains
gmail.com
yahoo.com
hotmail.com
aol.com
hotmail.co.uk
hotmail.fr
msn.com
yahoo.fr
wanadoo.fr
orange.fr
@pvbhanuteja
pvbhanuteja / Imports
Created August 4, 2020 19:52
seq2seq attention model
import tensorflow as tf
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from sklearn.model_selection import train_test_split
import unicodedata
import re
import numpy as np
import os
# Download the file
path_to_zip = tf.keras.utils.get_file(
'spa-eng.zip', origin='http://storage.googleapis.com/download.tensorflow.org/data/spa-eng.zip',
extract=True)
path_to_file = os.path.dirname(path_to_zip)+"/spa-eng/spa.txt"
# Converts the unicode file to ascii
def unicode_to_ascii(s):
return ''.join(c for c in unicodedata.normalize('NFD', s)
@pvbhanuteja
pvbhanuteja / Docker install and basics
Last active June 24, 2021 14:54
Docker install and basics
https://docs.docker.com/engine/install/ubuntu/
sudo chmod 666 /var/run/docker.sock
https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue
[tool.poetry]
name = "swapping-autoencoder-pytorch"
version = "0.1.0"
description = ""
authors = ["Bhanu <*@gmail.com>"]
[tool.poetry.dependencies]
python = "3.6.14"
torch = {url = "https://download.pytorch.org/whl/cpu/torch-1.9.0%2Bcpu-cp38-cp38-linux_x86_64.whl"}
torchvision = {url = "https://download.pytorch.org/whl/cpu/torchvision-0.10.0%2Bcpu-cp36-cp36m-linux_x86_64.whl"}