STATE/EVNT | default | on_module | on_deploy | on_perform | on_fail | on_nochange | on_plan |
---|---|---|---|---|---|---|---|
metadata | ["skip", "metadata"] | ["skip", "metadata"] | ["print_H1_line", "metadata"] | ["print_EOB", "metadata"] | ["print_EOB", "metadata"] | ["print_EOB", "metadata"] | [err] |
plan | ["print_line", "plan"] | ["print_H3_line", "plan"] | [err] | [err] | [err] | [err] | ["print_EOB", "metadata"] |
STEP | description | technical implementation |
---|---|---|
#1 | an input arrives /triggers event | event_listener or iteration over file, etc. |
#2 | event identification | EVENTS table lookup (mapping function (input > event)) |
#3 | action identification | TRANSITION table lookup (mapping function event + cur_state > action) |
#4 | action is performed | case analysis > action (function call) |
#5 | state is switched | TRANSITION table lookup |
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 os | |
import sys | |
import openai | |
import pyperclip as clipboard | |
def main(prompt): | |
openai.api_key = os.environ["OPENAI_KEY"] | |
model_engine = "text-davinci-003" | |
completion = openai.Completion.create( |
MUTABLE | IMMUTABLE |
---|---|
#1 list |
~ |
#2 dict |
~ |
#3 set |
~ |
#4 byte array |
~ |
~ | #1 int |
~ | #2 float |
~ | #3 complex |
~ | #4 string |
FLAG | MEANING |
---|---|
-e | file exists |
-a | file exists (deprecated, don't use) |
-f | file is a regular file (not a directory or /dev - device file) |
-s | file is not zero size |
-d | file is a directory |
-b | file is a block device (see below) |
-c | file is a character device (see below) |
-p | file is a pipe |
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
move_count = 0 | |
def move_disk(remaining_disks, source, target): | |
global move_count | |
print(f"STEP#{move_count+1}\n" | |
f"\t~~> Disk #{remaining_disks}; {source} > {target}") | |
def count_move(): |
TYPE NAME | DESCRIPTION |
---|---|
AT_SEQUENCE_NUMBER |
Start reading from the position denoted by a specific sequence number, provided in the value StartingSequenceNumber. |
AFTER_SEQUENCE_NUMBER |
Start reading right after the position denoted by a specific sequence number, provided in the value StartingSequenceNumber. |
AT_TIMESTAMP |
Start reading from the position denoted by a specific timestamp, provided in the value Timestamp. |
TRIM_HORIZON |
Start reading at the last untrimmed record in the shard in the system, which is the OLDEST data record in the shard. |
LATEST |
Start reading just after the most recent record in the shard, so that you always read the NEWEST data record in the shard. |