Skip to content

Instantly share code, notes, and snippets.

View nathanin's full-sized avatar
coffee

Nathan Ing nathanin

coffee
View GitHub Profile
@michaelchughes
michaelchughes / README.md
Last active April 7, 2024 09:48
Fixes for GLIBC errors when installing tensorflow or pytorch on older Red Hat or CentOS cluster environments

Goal

Install working tensorflow or pytorch via standard conda environment workflow.

Basic Setup : Install pytorch in a fresh conda environment

The recommended conda-based install process works smoothly:

$ # Create a fresh environment
@wckdouglas
wckdouglas / README.md
Last active May 14, 2023 16:44
Running deseq2 in python

I have reused the code enough to make a package out of it.

The python package is deposited at Github. with an example in Jupyter notebook.

⚠️ this gist is out-of-date, please see the diffexpr package for a maintained version of the code

@batzner
batzner / tensorflow_rename_variables.py
Last active May 25, 2023 06:15
Small python script to rename variables in a TensorFlow checkpoint
import sys, getopt
import tensorflow as tf
usage_str = 'python tensorflow_rename_variables.py --checkpoint_dir=path/to/dir/ ' \
'--replace_from=substr --replace_to=substr --add_prefix=abc --dry_run'
def rename(checkpoint_dir, replace_from, replace_to, add_prefix, dry_run):
checkpoint = tf.train.get_checkpoint_state(checkpoint_dir)
@dgleich
dgleich / matlabmail.m
Last active June 12, 2023 12:23
A function to send an email from a gmail account in matlab
function recipient = matlabmail(recipient, message, subject, sender, psswd)
% MATLABMAIL Send an email from a predefined gmail account.
%
% MATLABMAIL( recipient, message, subject )
%
% sends the character string stored in 'message' with subjectline 'subject'
% to the address in 'recipient'.
% This requires that the sending address is a GMAIL email account.
%
% MATLABMAIL( recipient, message, subject, sender, passwd )