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 argparse | |
import re | |
import subprocess | |
import shlex | |
import itertools | |
# this will be used for SUBJECT_CATEGORIES | |
def insensitive(pattern): | |
"""Return a case-insensitive regex pattern.""" |
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
# Witch Hazel Hypercolor ZSH Theme | |
# | |
# https://witchhazel.thea.codes/ | |
# https://twitter.com/ZoeIsNowOoze/status/1418271734327820289 | |
# | |
# 1. Create a file ~/.oh-my-zsh/custom/themes/witchhazelhypercolor.zsh-theme | |
# | |
# 2. Set the name of the theme to load in the ~/.zshrc configuration, for example: | |
# | |
# ZSH_THEME="witchhazelhypercolor" |
What you are looking for is Shadow I.T..
Dark IT, Rogue IT, and Stealth IT all mean Shadow IT.
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 inspect | |
def interpret(src): | |
"""Compile and execute provided code as if it was local to the caller""" | |
# get a decent name | |
try: | |
name = __file__ | |
except NameError: | |
name = __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
from functools import wraps | |
from typing import get_type_hints | |
class InputError(Exception): | |
pass | |
def make_error_message(arg_name, arg_type, expected_type): | |
return f"{arg_name} value has type {arg_type} - must be {expected_type}" |
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 inc(n): | |
"""increments n by one""" | |
return n + 1 | |
def square(n): | |
"""squares n""" | |
return n ** 2 |
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 datetime as dt | |
import logging | |
import sys | |
from playhouse.dataset import DataSet # this can be any DB ;) | |
params = 'timestamp name level pathname lineno msg args exc_info func sinfo'.split(' ') | |
db = DataSet('sqlite:///db.sqlite') |
- https://github.com/workshopper/javascripting
- https://github.com/workshopper/learnyounode
- https://github.com/workshopper/levelmeup
- https://github.com/workshopper/stream-adventure
- https://github.com/workshopper/how-to-npm
- https://github.com/workshopper/goingnative
- https://github.com/workshopper/regex-adventure
- https://github.com/workshopper/browserify-adventure
NewerOlder