I hereby claim:
- I am ievans3024 on github.
- I am ievans3024 (https://keybase.io/ievans3024) on keybase.
- I have a public key whose fingerprint is C621 22C2 0584 49DE EC05 3FB8 8BE5 0E82 7D89 23C3
To claim this, I am signing this object:
/* | |
* A common way of denoting sarcasm in text on the internet is to alternate upper and lower casing in the text. | |
* For example: "But I didn't do it!" might become "BuT i DiDn'T dO iT!" | |
* | |
* This adds a method to strings in JavaScript to convert them to this sarcastic format. | |
* | |
* The method returns a new string with the casing of each letter appropriately changed. | |
* The method supports letters with diacritic marks, e.g., umlauts. | |
* | |
* By default, it will start the converted string in lowercase form |
/** | |
* Enumeration of Earth's radius for a given distance unit | |
* The value can be used as the radius value in a great circle calculation | |
* @readonly | |
* @enum {number} | |
*/ | |
const enum EarthRadius { | |
FEET = 2.0925e+7, | |
KILOMETERS = 6378.0, | |
METERS = 6378000.0, |
#! /usr/bin/env python3 | |
""" | |
Module for providing behavior like the unix/linux "find" command. | |
Supports glob expressions and python regex objects. | |
""" | |
import fnmatch | |
import os | |
import os.path |
I hereby claim:
To claim this, I am signing this object:
from configparser import * | |
# copypasta from configparser source | |
# see https://github.com/python/cpython/blob/3.8/Lib/configparser.py#L357 | |
_UNSET = object() | |
class ConfigParser(ConfigParser): | |
def __init__(self, *args, sectionless=False, strip_quotes=False, **kwargs): | |
self.__sectionless = sectionless |
import curses | |
from argparse import ArgumentParser | |
from datetime import datetime | |
from time import sleep | |
ON = '\N{BLACK CIRCLE}' | |
OFF = '\N{WHITE CIRCLE}' | |
import logging | |
LOG_LEVELS = [ | |
logging.CRITICAL, | |
logging.ERROR, | |
logging.WARNING, | |
logging.INFO, | |
logging.DEBUG | |
] |
import struct | |
""" | |
An overengineered way to get what 1-based index a letter is in the roman alphabet | |
""" | |
class AlphaBytes: | |
UPPERCASE = set([struct.pack('>b', i) for i in range(65, 91)]) | |
LOWERCASE = set([struct.pack('>b', i) for i in range(97, 123)]) |
"""Proving Jeremy wrong, indentation experimentation""" | |
def four(): | |
# indented with 4 spaces | |
return 4 | |
def three(): | |
# indented with 3 spaces | |
return 3 |
""" | |
A demonstration of how to control stdout verbosity with argparse and logging. | |
Examples of running this file and its expected output: | |
$ python verbosity.py | |
CRITICAL :: A critical message. | |
$ python verbosity.py -v | |
CRITICAL :: A critical message. |