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
"""Example Google style docstrings. | |
This module demonstrates documentation as specified by the `Google Python | |
Style Guide <http://google.github.io/styleguide/pyguide.html>`_. | |
Docstrings may extend over multiple lines. Sections are created | |
with a section header and a colon followed by a block of indented text. | |
Example: | |
Examples can be given using either the ``Example`` or ``Examples`` | |
sections. Sections support any reStructuredText formatting, including |
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
Show hidden characters
{ | |
"markdownItPlugins": [ | |
["markdown-it-texmath"] | |
], | |
"config": { | |
"MD013": false | |
} | |
} |
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
#!/bin/bash | |
# git-cleanup-repo | |
# | |
# Adapted by Jannis Mainczyk <[email protected]> | |
# - support different default branches | |
# - add output per step | |
# Adapted by Rob Miller <[email protected]> | |
# Original by Yorick Sijsling | |
default_branch=${1:-master} | |
read -p "Continue with default branch '${default_branch}' (y/N)? " |
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
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
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
Python 6 hrs 26 mins █████████████▋░░░░░░░ 65.0% | |
TeX 1 hr 18 mins ██▊░░░░░░░░░░░░░░░░░░ 13.3% | |
XML 40 mins █▍░░░░░░░░░░░░░░░░░░░ 6.8% | |
CSS 31 mins █░░░░░░░░░░░░░░░░░░░░ 5.3% | |
Other 23 mins ▊░░░░░░░░░░░░░░░░░░░░ 3.9% |
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
#!/usr/bin/env python3 | |
def load_gist(gist_id): | |
"""translate Gist ID to URL""" | |
from json import load | |
from urllib.request import urlopen | |
gist_api = urlopen("https://api.github.com/gists/" + gist_id) |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import json | |
class CompactJSONEncoder(json.JSONEncoder): | |
"""A JSON Encoder that puts small containers on single lines.""" | |
CONTAINER_TYPES = (list, tuple, dict) |