Skip to content

Instantly share code, notes, and snippets.

View gavargas22's full-sized avatar
🐲

Guillermo Vargas gavargas22

🐲
View GitHub Profile
@gavargas22
gavargas22 / heatmap_example.py
Created October 9, 2019 19:50 — forked from teechap/heatmap_example.py
How to make a heatmap from data stored in Python lists
'''
Most heatmap tutorials I found online use pyplot.pcolormesh with random sets of
data from Numpy; I just needed to plot x, y, z values stored in lists--without
all the Numpy mumbo jumbo. Here I have code to plot intensity on a 2D array, and
I only use Numpy where I need to (pcolormesh expects Numpy arrays as inputs).
'''
import matplotlib.pyplot as plt
import numpy as np
#here's our data to plot, all normal Python lists
@gavargas22
gavargas22 / Component.jsx
Created August 8, 2018 16:00 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();