I hereby claim:
- I am glasnt on github.
- I am glasnt_ (https://keybase.io/glasnt_) on keybase.
- I have a public key whose fingerprint is F026 9B50 5233 B0C9 8D1E 037C CA63 6DA6 7DA9 A6F6
To claim this, I am signing this object:
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 |
I hereby claim:
To claim this, I am signing this object:
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'); | |
} |
""" | |
My first application | |
""" | |
import toga | |
from toga.style import Pack | |
from toga.style.pack import COLUMN, ROW | |
class HelloWorld(toga.App): | |
def startup(self): |
# Based on : https://groups.google.com/d/msg/sage-devel/1lIJ961gV_w/y-2uqPCyzUMJ | |
import os | |
def ncpus(): | |
#for Linux, Unix and MacOS | |
if hasattr(os, "sysconf"): | |
if "SC_NPROCESSORS_ONLN" in os.sysconf_names: | |
#Linux and Unix | |
ncpus = os.sysconf("SC_NPROCESSORS_ONLN") | |
if isinstance(ncpus, int) and ncpus > 0: | |
return ncpus |
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 |
web: ./main.py |