Skip to content

Instantly share code, notes, and snippets.

View sugatoray's full-sized avatar
🎯
Focusing

Sugato Ray sugatoray

🎯
Focusing
View GitHub Profile
@sugatoray
sugatoray / vscode_ssh_with_proxy.md
Last active October 25, 2021 02:32
SSH Tips and Tricks
@sugatoray
sugatoray / latex-open-in-overleaf-badge-example.md
Last active July 22, 2024 20:05
Open LaTeX in Overleaf directly from GitHub

overleaf-badge-image

Example badge: open-in-overleaf

[Overleaf][#overleaf] is an online service that allows you to create/edit/collaborate on LaTeX documents. For details on how the badge must be used, see the Example below.

  • Sample badge: Open in Overleaf
@MarcSkovMadsen
MarcSkovMadsen / holoviz_linked_brushing.py
Last active October 23, 2024 09:30
Linked brushing with HoloViz
# pip install panel==0.12.4 bokeh==2.4.0 holoviews==1.14.6 hvplot==0.7.3 shapely==1.7.1
# panel serve holoviz_linked_brushing.py --autoreload --show
import hvplot.pandas
import holoviews as hv
import panel as pn
from bokeh.sampledata.iris import flowers
pn.extension(sizing_mode="stretch_width")
hv.extension("bokeh")
@sugatoray
sugatoray / article_installing_tensorflow-gpu_using_conda.md
Last active May 19, 2023 14:21
Installing Tensorflow GPU + CuDNN + CudaToolkit with Conda

Install Tensorflow-GPU with Conda

I would suggest you to use conda (Ananconda/Miniconda) to create a separate environment and install tensorflow-gpu, cudnn and cudatoolkit. Miniconda has a much smaller footprint than Anaconda. I would suggest you to install Miniconda if you do not have conda already.

Quick Installtion

@thomwolf
thomwolf / loading_wikipedia.py
Last active January 12, 2025 13:34
Load full English Wikipedia dataset in HuggingFace nlp library
import os; import psutil; import timeit
from datasets import load_dataset
mem_before = psutil.Process(os.getpid()).memory_info().rss >> 20
wiki = load_dataset("wikipedia", "20200501.en", split='train')
mem_after = psutil.Process(os.getpid()).memory_info().rss >> 20
print(f"RAM memory used: {(mem_after - mem_before)} MB")
s = """batch_size = 1000
for i in range(0, len(wiki), batch_size):
@tuffacton
tuffacton / streamlit_colab.ipynb
Last active March 7, 2024 05:47
Colaboratory Notebook that hosts a streamlit app and creates an ngrok https tunnel for access.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iridiumcao
iridiumcao / check_git_branch_exists.sh
Created March 22, 2020 13:57
How to check if a git branch exists in the local/remote repository?
# Local:
# https://stackoverflow.com/questions/21151178/shell-script-to-check-if-specified-git-branch-exists
# test if the branch is in the local repository.
# return 1 if the branch exists in the local, or 0 if not.
function is_in_local() {
local branch=${1}
local existed_in_local=$(git branch --list ${branch})
if [[ -z ${existed_in_local} ]]; then
echo 0
@sugatoray
sugatoray / kaggle_import_dataset_public.ipynb
Last active May 25, 2022 18:47
Kaggle_Import_Dataset_public.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@althonos
althonos / setup.cfg
Last active August 12, 2025 17:32
A `setup.cfg` template for my Python projects
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email = martin.larralde@embl.de
url = https://github.com/althonos/{name}
description = {description}
long_description = file: README.md
@0livare
0livare / .gitconfig
Last active November 17, 2025 05:16
My git alias list. Running 'git alias' will pretty-print these commands to the terminal.
# Some options that may or may not be applicable to you
[user]
name = Zach Olivare
email = zach@olivare.net
[push]
default = upstream
[core]
autocrlf = input # Force replacing CRLF line endings with LF
ignorecase = false
# editor = code --wait