- Serving private content with signed URLs and signed cookies
- Create a key pair for a trusted key group
#!/usr/bin/env python | |
import multiprocessing | |
import random | |
import time | |
class Logger: | |
def __init__(self, num_lines, last_output_per_process, terminal_lock): | |
self.num_lines = num_lines |
from typing import List, TypeVar | |
from docutils import nodes | |
from docutils.nodes import Element | |
from sphinx import addnodes | |
from sphinx.application import Sphinx | |
from sphinx.environment.adapters.toctree import TocTree | |
import sphinx.environment.collectors.toctree as toctree_collector | |
from sphinx.transforms import SphinxContentsFilter |
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 |
# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f | |
# Changes: | |
# * Instead of overriding cd, we detect directory change. This allows the script to work | |
# for other means of cd, such as z. | |
# * Update syntax to work with new versions of fish. | |
# * Handle virtualenvs that are not located in the root of a git directory. | |
function __auto_source_venv --on-variable PWD --description "Activate/Deactivate virtualenv on directory change" | |
status --is-command-substitution; and return |
import dis | |
from dataclasses import dataclass | |
from typing import TypedDict | |
@dataclass | |
class MyDataclass: | |
field1: str | |
field2: int | |
class MyTypedDict: |
## See https://github.com/FactoryBoy/factory_boy/issues/836 | |
import inspect | |
from typing import List, get_args, get_origin | |
import factory | |
import factory.fuzzy | |
from dataclasses import dataclass, Field, MISSING, is_dataclass | |
from enum import Enum | |
from datetime import date, datetime | |
from decimal import Decimal |
import { promises } from "fs"; | |
import crypto from "crypto"; | |
import path from "path"; | |
import { print, parse } from "graphql"; | |
const plugin = { | |
name: "relay", | |
setup: build => { | |
build.onLoad({ filter: /\.tsx$/, namespace: "" }, async args => { | |
let contents = await promises.readFile(args.path, "utf8"); |
Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!
Four things needed overall:
apt install
several dependenciesSetup instructions, in order: