Skip to content

Instantly share code, notes, and snippets.

View petermchale's full-sized avatar

Peter McHale petermchale

View GitHub Profile
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 10, 2024 18:47
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@rnowling
rnowling / likelihood_ratio_test.py
Last active April 1, 2023 16:28
Likelihood-Ratio Test with scikit-learn and scipy
"""
Copyright 2017 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@ajschumacher
ajschumacher / README.md
Last active May 5, 2024 16:11 — forked from mbostock/.block
Interactive D3 view of sklearn decision tree
@karpathy
karpathy / min-char-rnn.py
Last active May 22, 2024 08:28
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@brentp
brentp / lift.sh
Created March 30, 2011 14:59
liftOver shell script.
# usage ./lift.sh input input.version output.version "FLAGS"
#
# e.g: lift.sh Homo_sapiens.GRCh37.61.gtf hg19 hg18 -gff
# will map hg19 features to hg18 coordinates.
if [ -z $3 ]
then
echo "usage: lift Homo_sapiens.GRCh37.61.gtf hg19 hg18 -gff"
exit 1
fi