alias: SCE Tariff (Winter) description: "" trigger:
- platform: time at: "08:00:00" variables: tariff: superoffpeak
- platform: time at: "16:00:00"
alias: SCE Tariff (Winter) description: "" trigger:
# Mastodon OAuth 2.0 API authentication | |
# Ryan Finnie <[email protected]> | |
# When you create an application through the Development section of Mastodon, | |
# it gives you three items: client key, client secret and access token (the | |
# latter which can be regenerated in the UI). You can use the access token | |
# directly, sending the header "Authorization: Bearer ${ACCESS_TOKEN}" with | |
# API requests, or you may initiate an OAuth 2.0 workflow to generate a | |
# per-session token. |
#!/usr/bin/env python3 | |
import os | |
import pathlib | |
import random | |
import subprocess | |
import sys | |
import tempfile | |
import yaml |
#!/usr/bin/env python3 | |
import datetime | |
from pathlib import Path | |
import re | |
import sys | |
import types | |
import xml.etree.ElementTree as ET | |
from natsort import natsorted |
The following fonts are used:
#!/usr/bin/env python3 | |
import random | |
from xkcdpass.xkcd_password import choose_words, generate_wordlist | |
segments = [ | |
x.capitalize() | |
for x in choose_words(generate_wordlist(min_length=5, max_length=9), 2) |
import yaml | |
class YamlEdit: | |
def __init__(self, filename): | |
self.filename = filename | |
def __enter__(self): | |
with open(self.filename) as f: | |
self.yaml_obj = yaml.safe_load(f) |
8 RANDOMIZE | |
14 LET X=INT(RND(X)*39)+1 | |
18 LET Y=INT(RND(X)*24)+1 | |
30 PRINT "MISS CLEO HAS PUT EMAD IN A MINDJAIL," | |
47 PRINT "WHICH IS A PRISON FOR YOUR MIND." | |
60 PRINT "IT IS YOUR JOB TO GET HIM OUT!" | |
69 PRINT "" | |
85 IF Y = 1 GOTO 594 | |
104 IF Y = 25 GOTO 612 | |
111 IF X = 1 GOTO 637 |
{ | |
"platforms" : [ | |
{ | |
"platform_id" : 1, | |
"platform_name" : "Linux" | |
}, | |
{ | |
"platform_id" : 2, | |
"platform_name" : "DOS" | |
}, |
#!/usr/bin/env python | |
"""A centralized abstraction layer for logging via facilities. | |
log = LogObj() | |
log.nothing = Nolog() | |
log.debug = File(file='debuglog.txt', flags='w', bufsize=0, longlog=1) | |
log.info = File(sys.stdout) | |
log.info.deps.append('debug') | |
log.error = Syslog(LOG_LOCAL5|LOG_ERR) |