Skip to content

Instantly share code, notes, and snippets.

View chriddyp's full-sized avatar

Chris Parmer chriddyp

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/base-min.css">
def files_list(request):
import requests
import json
from requests.auth import HTTPBasicAuth
from django.shortcuts import redirect, render
auth = HTTPBasicAuth('chris', '')
headers = {'Plotly-Client-Platform': 'api', 'Content-Type': 'application/json'}
r = requests.get('https://api.plot.ly/v2/files/chris:-1', headers=headers, auth=auth)
files = json.loads(r.content)['results']
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 10 columns, instead of 8. in line 3.
ADMM1/KT3X_E(K3)-E(K2) in mEh,ADMM1/KT3X_E(X3)-E(X2) in mEh,ADMM2/KT3X_E(K3)-E(K2) in mEh,ADMM2/KT3X_E(X3)-E(X2) in mEh,ADMMS/KT3X_E(K3)-E(K2) in mEh,ADMMS/KT3X_E(X3)-E(X2) in mEh,ADMMP/KT3X_E(K3)-E(K2) in mEh,ADMMP/KT3X_E(X3)-E(X2) in mEh,ADMMQ/KT3X_E(K3)-E(K2) in mEh,ADMMQ/KT3X_E(X3)-E(X2) in mEh
-2.063944090200031667e-02,-1.527530928602871541e-02,-2.350229131699954621e-02,-1.730346064224086433e-02,-1.299814230650042646e-02,-7.575249338358958084e-03,-1.258992710650019831e-02,-7.579832841161149304e-03,-1.713534917010051117e-02,-7.488525461130990379e-03
-1.400849560110017933e-02,-1.007437244540021481e-02,-1.653075110459845121e-02,-1.184897210799995548e-02,-6.964476910800598830e-03,-3.013700741700375829e-03,-6.587306434900241925e-03,-3.015897679699008904e-03,-1.071848679699982654e-02,-2.965464014200946963e-03
-1.085015092640162493e-02,-7.714702440781096016e-03,-1.305302143469866394e-02,-9.263288497550092870e-03,-4.389883566398466996e-03,-1.261130370229679443e-03,-4.058138390700349873e-03,-1.268247083720197566e
@chriddyp
chriddyp / plotly make_subplots examples.ipynb
Created February 18, 2015 03:48
Several examples of how to make small multiples and subplots with Plotly and the `make_subplots` function
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chriddyp
chriddyp / Custom datetime ranges with plotly.ipynb
Created February 16, 2015 02:52
Custom datetime ranges with Plotly
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.