Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree
Parameters: | |
CanaryName: | |
Type: String | |
Default: my-canary | |
MaxLength: 21 | |
Resources: | |
CloudWatchSyntheticsRole: | |
Type: AWS::IAM::Role | |
Properties: |
objects = $(wildcard *.in) | |
outputs = $(objects:.in=.txt) | |
sync-targets = $(objects:%.in=sync-%) | |
upgrade-targets = $(objects:%.in=upgrade-%) | |
.PHONY: all check clean $(sync-targets) $(upgrade-targets) | |
all: $(outputs) | |
%.txt: %.in |
from dataclasses import dataclass | |
from field import FieldElement, PrimeGaloisField | |
@dataclass | |
class EllipticCurve: | |
a: int | |
b: int |
Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree
Do I want to die on this hill?
Am I including everyone?
from typing import Tuple | |
import pyasn1.codec.der.encoder | |
import pyasn1.type.univ | |
import base64 | |
import rsa | |
def private_key_pem(n: int, e: int, d: int, p: int, q: int, dP: int, dQ: int, qInv: int) -> str: | |
'''Create a private key PEM file |
with separators as ( values (' '), (','), ('-'), ('.') ), | |
source (s) as ( select " Will, thought and action." ), | |
bag (q) as ( -- POSITIONS OF ALL SEPARATORS | |
with dim (len) as ( select length(s) from source ), | |
ndx (n) as ( | |
select 1 union all select n+1 from ndx, dim where n < len | |
) select 0 --> PSEUDO SEPARATOR IN FRONT OF SOURCE STRING | |
union all select n from ndx, source where substr(s, n, 1) in separators | |
union all select len+1 from dim --> PSEUDO SEPARATOR AT BOTTOM | |
), |
The problem: we have a data table in which one of the columns contains a text string that is meant to be multiple values separated by a delimiter (e.g. a comma). For example, the LAPD crime incidents data has a column named MO Codes
(short for modus operandi). Every incident may have several MO's -- for example, a particular RESISTING ARREST
incident may have a MO Codes
value of 1212 0416
, which corresponds, respectively, to: LA Police Officer
and Hit-Hit w/ weapon
:
 | |
## and spits out a Open Network Configuration file which can be imported in to ChromeOS. | |
# Open Network Configuration specs can be found here | |
## https://chromium.googlesource.com/chromium/src/+/master/components/onc/docs/onc_spec.md | |
# Original credit goes to Steve Woodrow (https://github.com/woodrow) |
# Credit to John Creecy | |
# Original can be found at https://gist.github.com/zugdud/f5453af2c827eba38bb036b19e10b371 | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 |