Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
from bokeh.io import show, output_notebook
from bokeh.plotting import figure
from bokeh import events
from bokeh.models import CustomJS, ColumnDataSource
output_notebook()
import pandas as pd
time1 = pd.date_range("2018/01/01", "2018/01/05", freq="h")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(function(){
"use strict";
exports.name = "include-section";
exports.params = [
{name: "tiddler"},
{name: "title"}
];
from bokeh.embed import components
from bokeh.embed.standalone import _ModelInDocument, standalone_docs_json_and_render_items
from bokeh.embed.util import check_models_or_docs
from bokeh.models import Model
from bokeh.document import Document
def bokeh_to_json(models):
was_single_object = isinstance(models, Model) or isinstance(models, Document)
models = check_models_or_docs(models, allow_dict=True)
model_keys = None
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import math, os, pyglet, sys
from pyglet.gl import *
class World(pyglet.window.Window):
def __init__(self, scale=10, center_pos=(0, 0, -5), speed=1.0,
*args, **kwargs):
super(World, self).__init__(*args, **kwargs)
self.scale = scale
self.center_pos = center_pos
self.speed = speed
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.