Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Tony Narlock tony

💭
I may be slow to respond.
View GitHub Profile
@tony
tony / INSTRUCTIONS
Created September 5, 2022 16:47
sphinx.ext.doctest issue with is_allowed_version
View INSTRUCTIONS
Run `python -m doctest example.py`
View sphinx-toctree-signature.py
# Most of this is copied from Sphinx
# Credit:
# - https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f
# - https://gist.github.com/asmeurer/5009f8845f864bd671769d10e07d1184
from typing import Generator, List, TypeVar, Union
import sphinx.environment.collectors.toctree as toctree_collector
from docutils import nodes
from docutils.nodes import Element
from sphinx import addnodes
@tony
tony / README.md
Last active August 28, 2022 16:43
sphinxcontrib-issuetracker working as of sphinx 5.1.1, includes strict mypy typings (sphinx-doc with github style linking)
View README.md
@tony
tony / develtech-cla.md
Last active January 10, 2022 17:29
develtech cla
View develtech-cla.md

develtech Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to develtech Software Foundation. ("develtech"). Except for the license granted herein to develtech and recipients of software distributed by develtech, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / social-embed-cla.md
Created January 10, 2022 17:27
social-embed contributor license agreement (CLA)
View social-embed-cla.md

social-embed Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to social-embed Software Foundation. ("social-embed"). Except for the license granted herein to social-embed and recipients of software distributed by social-embed, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / vcs-python-cla.md
Created January 10, 2022 17:26
vcs-python contributor license agreement
View vcs-python-cla.md

vcs-python Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to vcs-python Software Foundation. ("vcs-python"). Except for the license granted herein to vcs-python and recipients of software distributed by vcs-python, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / tmux-python-cla.md
Last active January 10, 2022 17:25
tmux-python cla
View tmux-python-cla.md

tmux-python Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to tmux-python Software Foundation. ("tmux-python"). Except for the license granted herein to tmux-python and recipients of software distributed by tmux-python, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.
@tony
tony / Chart.tsx
Last active March 12, 2023 15:53
plotly.js react wrapper component (TypeScript, Functional Component, react-plotly.js alternative)
View Chart.tsx
import React from "react";
import Plotly from "plotly.js/dist/plotly";
export interface ChartProps {
data?: Plotly.Data[];
layout: Partial<Plotly.Layout>;
frames?: Plotly.Frame[];
config?: Partial<Plotly.Config>;
// react-specific
style?: React.CSSProperties;
@tony
tony / pipfile-to-poetry.py
Last active December 16, 2019 15:15 — forked from sobolevn/pipfile-to-poetry.py
Formatting, check for errors for git packages
View pipfile-to-poetry.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import toml
def read_pipenv_lock():
with open('Pipfile.lock') as lock:
return json.loads(lock.read())
@tony
tony / useEventCallback.ts
Created September 9, 2019 01:30
LICENSE MIT
View useEventCallback.ts
import React from 'react'
export const useEventCallback = <T extends (...args: any[]) => any>(
callback: T,
dependencies: React.DependencyList,
) => {
const ref = React.useRef(() => {
throw new Error('Cannot call an event handler while rendering.')
})