Skip to content

Instantly share code, notes, and snippets.

@Mistobaan
Mistobaan / tensorflow_confusion_metrics.py
Created March 3, 2016 22:25
Confusion Metrics written in tensorflow format
# from https://cloud.google.com/solutions/machine-learning-with-financial-time-series-data
def tf_confusion_metrics(model, actual_classes, session, feed_dict):
predictions = tf.argmax(model, 1)
actuals = tf.argmax(actual_classes, 1)
ones_like_actuals = tf.ones_like(actuals)
zeros_like_actuals = tf.zeros_like(actuals)
ones_like_predictions = tf.ones_like(predictions)
zeros_like_predictions = tf.zeros_like(predictions)
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@ahmedlhanafy
ahmedlhanafy / android.md
Last active January 31, 2024 10:46 — forked from geekygecko/android.md
Android Cheat Sheet

Android Cheat Sheet

Developer tips

Ripple Effect

android:clickable="true"
android:background="?attr/selectableItemBackground"

or

@AMKohn
AMKohn / post.md
Last active May 8, 2024 18:36
How to Write a 12 Essay in Just 10 Days - by AcademicHacker
@joyrexus
joyrexus / README.md
Created May 6, 2014 21:06
Priority queue (with delete by label)

A simple priority queue implementation with O(n log n) sorting. The underlying data structure is a binary heap.

This implementation uses a binary heap where each node is less than or equal to its children. Nodes can be anything as long as they're comparable.

Like all priority queues, this implementation efficiently retrieves the minimum element (by comparative value) in the queue. You can also insert elements and delete elements if they are "labeled". (See examples below.)

Usage

# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'