Skip to content

Instantly share code, notes, and snippets.

View jackparmer's full-sized avatar
🐢

Jack Parmer jackparmer

🐢
View GitHub Profile
####################################
# diamond data bar chart
# Questions? Email [email protected]
# For more docs, see plot.ly/api
####################################
library(plotly)
py <- plotly(username='USERNAME', key='API_KEY')
@hex13
hex13 / render-promise-in-react.js
Created November 3, 2016 12:33
how to render promises in React
//License CC0 1.0: https://creativecommons.org/publicdomain/zero/1.0/
class Deferred extends React.Component {
constructor(props) {
super(props);
this.state = {
value: ''
};
}
componentDidMount() {
import numpy as np
import matplotlib.pyplot as plt
from plotly import offline as py
import plotly.tools as tls
py.init_notebook_mode()
t = np.linspace(0, 10, 1000)
plt.plot(t, np.exp(-0.5 * t) * np.cos(2*np.pi*t))
plt.xlim(0, 7)