Skip to content

Instantly share code, notes, and snippets.


Ricardo Guerrero Gómez-Olmedo ricgu8086

View GitHub Profile

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:


  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
geohot /
Last active Mar 17, 2021
RANSAC polyfit. Fit polynomials with RANSAC in Python
def ransac_polyfit(x, y, order=3, n=20, k=100, t=0.1, d=100, f=0.8):
# Thanks
# n – minimum number of data points required to fit the model
# k – maximum number of iterations allowed in the algorithm
# t – threshold value to determine when a data point fits a model
# d – number of close data points required to assert that a model fits well to data
# f – fraction of close data points required
besterr = np.inf
mjdietzx /
Last active Feb 23, 2021
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
# install CUDA Toolkit v8.0
# instructions from (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
cburgdorf /
Last active Nov 18, 2020
Comparing XOR between tensorflow and keras
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
training_data = np.array([[0,0],[0,1],[1,0],[1,1]], "float32")
target_data = np.array([[0],[1],[1],[0]], "float32")
model = Sequential()
model.add(Dense(32, input_dim=2, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
mitchwongho / Docker
Last active Oct 10, 2021
Docker 'run' command to start an interactive BaSH session
View Docker
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone

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

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream