Skip to content

Instantly share code, notes, and snippets.

View idoshamun's full-sized avatar

Ido Shamun idoshamun

View GitHub Profile
@Scarygami
Scarygami / with-debounce
Last active December 8, 2017 20:03
Polymer debounce sample
Polymer({
is: 'with-debounce',
properties: {
property1: {
type: String,
observer: '_doSomething'
},
property2: {
type: String,
observer: '_doSomething'
@thomasvamos
thomasvamos / plot_confusion_matrix.py
Created October 19, 2013 11:31
Python code snippet to plot a greyscale confusion matrix. Its tailored to a project I did, but you get the idea.
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import random
def main():
true_labels = [random.randint(1, 10) for i in range(100)]
predicted_labels = [random.randint(1, 10) for i in range(100)]
plot = getConfusionMatrixPlot(true_labels, predicted_labels)
plot.show()