Skip to content

Instantly share code, notes, and snippets.

Avatar
🐰

Julian Carpenter julian-carpenter

🐰
View GitHub Profile
@FedeMiorelli
FedeMiorelli / turbo_colormap_mpl.py
Last active May 5, 2021
Turbo Colormap for Matplotlib
View turbo_colormap_mpl.py
# -*- coding: utf-8 -*-
"""
Created on 2019-08-22 09:37:36
@author: fmiorell
"""
# This script registers the "turbo" colormap to matplotlib, and the reversed version as "turbo_r"
# Reference: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html
@danijar
danijar / blog_tensorflow_sequence_classification.py
Last active May 31, 2021
TensorFlow Sequence Classification
View blog_tensorflow_sequence_classification.py
# Example for my blog post at:
# https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@agramfort
agramfort / lasso_ista_fista.py
Created Jan 31, 2016
Lasso with ISTA and FISTA
View lasso_ista_fista.py
#!/usr/bin/env python
#
# Solve LASSO regression problem with ISTA and FISTA
# iterative solvers.
# Author : Alexandre Gramfort, first.last@telecom-paristech.fr
# License BSD
import time
from math import sqrt
@dave-andersen
dave-andersen / kmeans.py
Last active Mar 7, 2021
k-means in Tensorflow
View kmeans.py
import tensorflow as tf
import numpy as np
import time
N=10000
K=4
MAX_ITERS = 1000
start = time.time()