Skip to content

Instantly share code, notes, and snippets.

View rs9899's full-sized avatar
:dependabot:
Moving around

Rupesh rs9899

:dependabot:
Moving around
View GitHub Profile
sudo apt install zsh
## This needs sudo password, so if not available, add a command "zsh" at the end of your .bashrc file
chsh -s /usr/local/bin/zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
@rs9899
rs9899 / Gdrive-download.sh
Created June 5, 2020 06:55
Downloading files from google drive using terminal
pip install gdown
#file_id can be obtained by right-clicking the download button on the file page on drive
file_id=1C9b5GZI0QfDlgKhJfxui5CbzDTsVkLiG
gdown https://drive.google.com/uc?id=${file_id}
# this works. Tested on June 2020
@rs9899
rs9899 / cmd_help.txt
Last active July 24, 2020 15:17
Import Windows command
### Mostly for personal usage but can help others too
# nvidia-smi
& 'C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe'
# watch nvidia-smi
while (1) {clear;& 'C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe'; sleep 5}
# some good substitutes for bash command
mv --> move
@rs9899
rs9899 / jupyter_start.sh
Last active June 2, 2020 12:21
Jupyter notebook starter code
jupyter notebook --generate-config
jupyter notebook password
vi ~/.jupyter/jupyter_notebook_config.py
# # Set ip to '*' to bind on all interfaces (ips) for the public server
# c.NotebookApp.allow_origin = '*'
# c.NotebookApp.ip = '0.0.0.0'
# c.NotebookApp.open_browser = False
@rs9899
rs9899 / git_start.sh
Created May 29, 2020 08:19
Git Starter Code
git config --global user.name "Rupesh"
git config --global user.email "rupesh95903@gmail.com"
git config --global color.ui true
git config --global core.editor vim
git config --global credential.helper store # only on your private machines
@rs9899
rs9899 / model.py
Created May 28, 2020 07:30
Making a custom keras architecture
import numpy as np
import os
import numpy as np
import tensorflow as tf
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
def model(pretrained_weights = None,input_size = (224,224,3), outchannel = 25, dropout_p = 0.25):
inputTensor = tf.keras.Input(IMG_SHAPE)
## Feature extractor network