This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datasette.database import Database | |
from datasette import hookimpl | |
from datasette.utils.asgi import Response | |
import os | |
` | |
async def reload_db(datasette): | |
spec = datasette.plugin_config('datasette-reload-db') | |
db_dir = os.listdir(spec['dir']) | |
databases = datasette.databases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openTab() { | |
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue(); | |
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>"; | |
var userInterface = HtmlService.createHtmlOutput(html); | |
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import sys | |
import random | |
from collections import deque | |
from PIL import Image | |
# THIS IS THE MAGIC VALUE THAT MAKES EVERYTHING GLITCHED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MARKDOWNS=$(wildcard *.md) | |
PDFS=$(MARKDOWNS:md=pdf) | |
all: $(PDFS) | |
clean: | |
rm -f $(PDFS) | |
%.pdf: %.md | |
pandoc -V geometry:margin=1in -V papersize:"a4paper" --toc $< -o $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<script src="https://code.shutterstock.com/rickshaw/vendor/d3.v2.js"></script> | |
<script src="https://code.shutterstock.com/rickshaw/rickshaw.min.js"></script> | |
<div id="chart"></div> | |
<script> | |
// Return an xinterp function for a given graph | |
function xinterp_on_graph(graph) { |