Skip to content

Instantly share code, notes, and snippets.

Avatar
🏛️
University Life

Sayantan Das ucalyptus

🏛️
University Life
View GitHub Profile
View mofo.sh
# Install Conda
# Refer: https://linuxize.com/post/how-to-install-anaconda-on-ubuntu-18-04/
MINICONDA_INSTALLER_SCRIPT=Miniconda3-4.5.4-Linux-x86_64.sh
MINICONDA_PREFIX=/usr/local
wget https://repo.continuum.io/miniconda/$MINICONDA_INSTALLER_SCRIPT
chmod +x $MINICONDA_INSTALLER_SCRIPT
./$MINICONDA_INSTALLER_SCRIPT -b -f -p $MINICONDA_PREFIX
View shelltask.sh
cp /content/models/* /content/newmodels/
rm /content/plots/roc/*.h5
rm /content/models/*.h5
zip -r $1.zip /content/plots/ /content/results/ /content/scores/ /content/models/
rm -rf /content/plots/ /content/results/ /content/scores/ /content/models/
mkdir /content/plots/ /content/results/ /content/scores/ /content/models/
View gist.py
loss_tracker = Mean(name="loss")
import skimage
from skimage.measure import shannon_entropy
import tensorflow as tf
def shannon(arr):
ee = []
bands = arr.shape[-1]
for i in range(0,bands):
@ucalyptus
ucalyptus / hcgd.py
Created Jun 19, 2020
Hiblert Constrained Gradient Descent
View hcgd.py
!wget https://raw.githubusercontent.com/KordingLab/hilbert-constrained-gradient-descent/master/hcgd.py
from hcgd import HCAdam, HCGD
optimizer = HCAdam(model.parameters(), lr=0.01,
fcn_change_limiter=1.0, inner_lr=0.05, n_corrections=5, # HC params
betas=(0.9, 0.999), eps=1e-08, amsgrad=False) # adam params
View fromage-adder.txt
!wget https://raw.githubusercontent.com/jxbz/fromage/master/fromage.py
from fromage import Fromage
optimizer = Fromage(danet_model.parameters(), lr=0.01, p_bound=None)
@ucalyptus
ucalyptus / skearn-random-forest-example.ipynb
Created Jun 10, 2020
skearn-random-forest-example.ipynb
View skearn-random-forest-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.