Skip to content

Instantly share code, notes, and snippets.

@vishnuexe
vishnuexe / vscode_scratchpad.md
Last active May 29, 2024 06:40
Open 2 notebooks in vs code for interactive use without cluttering the main notebook
Open terminal and type jupyter notebook in terminal and copy localhost (it will also open Jupyter in browser by default but you don't need to keep running it).
Open preffered notebook in VS Code
Click on kernels in the top right corner > Select another kernel > existing jupyter server > enter URL hit enter
Open Second notebook in VS Code
Click on kernels in the top right corner > Select another kernel > select kernel with 1st notebook name
Voila! its done!
All the local variables from the 1st notebook wil be accessible in the 2nd notebook and vice versa
@vishnuexe
vishnuexe / github_usermanual.md
Last active March 27, 2024 05:32
Github pull and push

git add .

git commit -m "message"

git push

git init

Slrum template:

#!/bin/bash
#SBATCH --job-name=myjob # create a short name for your job
#SBATCH --nodes=1 # node count
#SBATCH --ntasks=1 # total number of tasks across all nodes
#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks)
#SBATCH --mem-per-cpu=4G # memory per cpu-core (4G per cpu-core is default)
#SBATCH --time=00:05:00 # total run time limit (HH:MM:SS)

Accessing Jupyter-lab running inside docker in remote ssh server

Step1: ssh into your remote server

$ ssh username@server_ip_address

Step2: Run this in the remote server

#running docker with port assignment
#replace image:version with your docker image id
$ docker run --gpus all -it -p 8888:8888 image:version

(# Docker Manual)

Step 1 : Install Docker

#Docker Installation 

$ sudo apt-get update

$ curl https://get.docker.com | sh \