This file contains 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
{ | |
"allowCDN": "awaiting-decision", | |
"requirejsCDN": "https://cdn.jsdelivr.net/npm/", | |
"urls": [], | |
"showIconInLauncher": true, | |
"plugins": [ | |
"import {\n JupyterFrontEnd,\n JupyterFrontEndPlugin,\n} from \'@jupyterlab/application\';\nimport { ITranslator, nullTranslator } from \'@jupyterlab/translation\';\nimport { FileEditor, IEditorTracker } from \'@jupyterlab/fileeditor\';\nimport { Notebook, INotebookTracker } from \'@jupyterlab/notebook\';\nimport { ICommandPalette } from \'@jupyterlab/apputils\'\n\n/**\n * This is an example hello world plugin.\n * Open Command Palette with Ctrl+Shift+C\n * (Command+Shift+C on Mac) and select\n * \"Load Current File as Extension\"\n */\nnamespace CommandIDs {\n export const toggleComment = \'codemirror:toggle-comment\';\n}\n\n\nfunction toggleNotebook(widget: Notebook) {\n const cell = widget.content.activeCell;\n if (cell?.model.type !== \'code\') {\n return;\n }\n\n const editor = cell.editor as CodeMirrorEditor;\n edi |
This file contains 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
import { | |
JupyterFrontEnd, | |
JupyterFrontEndPlugin, | |
} from '@jupyterlab/application'; | |
import { ITranslator, nullTranslator } from '@jupyterlab/translation'; | |
import { FileEditor, IEditorTracker } from '@jupyterlab/fileeditor'; | |
import { Notebook, INotebookTracker } from '@jupyterlab/notebook'; | |
import { ICommandPalette } from '@jupyterlab/apputils' | |
/** |
This file contains 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
import pathlib | |
import json | |
docs_path = pathlib.Path("docs") | |
output_path = docs_path / "_build" / "linkcheck" / "output.json" | |
with output_path.open() as f: | |
data = [json.loads(l) for l in f] | |
for record in data: |
This file contains 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
import jax | |
from jax import numpy as jnp | |
class RegularArray: | |
def __init__(self, content, size): | |
self.content = content | |
self.size = size | |
def __len__(self): |
This file contains 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
def validate_items(items): | |
state = validator_wait_for_array | |
for item in prepared: | |
next_state = state(item) | |
if next_state is not None: | |
state = next_state | |
return tuple(prepared) | |
def validator_reject_array(item): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 sphinx.transforms import SphinxTransform | |
import sphinx.environment.collectors.toctree as toctree_collector | |
from sphinx import addnodes | |
from docutils import nodes | |
from typing import Any, Dict, List, Set, Tuple, Type, TypeVar, cast | |
from docutils import nodes | |
from docutils.nodes import Element, Node |
This file contains 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
import requests | |
import pathlib | |
import os | |
import re | |
from sphinx.util import logging | |
logger = logging.getLogger(__name__) | |
def emoji_to_identifier(emoji): |
This file contains 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
% Support emoji | |
\usepackage{fontspec} | |
\newfontfamily{\emojifont}{Noto Emoji} | |
\usepackage[Latin, Greek, Dingbats, TransportAndMapSymbols, MiscellaneousSymbolsAndPictographs]{ucharclasses} | |
\setTransitionsFor{MiscellaneousSymbolsAndPictographs}{\begingroup\emojifont}{\endgroup} | |
\setTransitionsFor{TransportAndMapSymbols}{\begingroup\emojifont}{\endgroup} | |
\setTransitionsFor{Dingbats}{\begingroup\emojifont}{\endgroup} |
This file contains 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
// ==UserScript== | |
// @name Hide Adverts | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.amazon.co.jp/* | |
// @match https://smile.amazon.co.uk/* | |
// @match https://www.amazon.co.uk/* | |
// @match https://smile.amazon.com/* |