This file contains hidden or 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
type Axes | |
type Function | |
predicate On(Function, Axes) |
This file contains hidden or 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 | |
import re | |
from pathlib import Path | |
import yaml | |
def all_resource_classes(thing): | |
if isinstance(thing, list): |
This file contains hidden or 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 calendar | |
for year in range(10000): | |
year_string = '{:04d}'.format(year) | |
month_day = year_string[::-1] | |
month = int(month_day[0:2]) | |
day = int(month_day[2:]) | |
if 1 <= month <= 12: | |
weekday, days_in_month = calendar.monthrange(year, month) | |
if 1 <= day <= days_in_month: |
This file contains hidden or 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 bisect import bisect_right | |
positive = [] | |
negative = [] | |
# https://docs.python.org/3.7/library/bisect.html | |
def find_gt(a, x): | |
'Find leftmost value greater than x' | |
i = bisect_right(a, x) | |
if i != len(a): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.