Skip to content

Commit

Permalink
Change standart to standard
Browse files Browse the repository at this point in the history
  • Loading branch information
punchagan committed Dec 2, 2023
1 parent dfc865a commit 8e1a625
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions asciinema_automation/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def cli(argv=None):
)
parser.add_argument(
"-sd",
"--standart-deviation",
"--standard-deviation",
type=int,
default=60,
help="standart deviation for gaussian used to generate time between key strokes",
help="standard deviation for gaussian used to generate time between key strokes",
)
parser.add_argument(
"-t",
Expand Down Expand Up @@ -70,7 +70,7 @@ def cli(argv=None):
delay = args.delay
wait = args.wait
asciinema_arguments = args.asciinema_arguments
standart_deviation = args.standart_deviation
standard_deviation = args.standard_deviation
loglevel = args.loglevel
timeout = args.timeout

Expand All @@ -87,7 +87,7 @@ def cli(argv=None):
asciinema_arguments,
wait,
delay,
standart_deviation,
standard_deviation,
timeout,
)

Expand Down
12 changes: 6 additions & 6 deletions asciinema_automation/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ def run(self, script):
for send_character, receive_character in zip(
self.send_value, self.receive_value
):
if script.standart_deviation is None:
if script.standard_deviation is None:
time.sleep(script.delay)
else:
time.sleep(abs(random.gauss(script.delay, script.standart_deviation)))
time.sleep(abs(random.gauss(script.delay, script.standard_deviation)))
script.process.send(str(send_character))
script.process.expect(str(receive_character))

# End instruction
if script.standart_deviation is None:
if script.standard_deviation is None:
time.sleep(script.delay)
else:
time.sleep(abs(random.gauss(script.delay, script.standart_deviation)))
time.sleep(abs(random.gauss(script.delay, script.standard_deviation)))


class SendCharacterInstruction(Instruction):
Expand Down Expand Up @@ -129,10 +129,10 @@ def run(self, script):
super().run(script)
logger.debug("Send %s arrow %i times", self.send, self.num)
for _ in range(self.num):
if script.standart_deviation is None:
if script.standard_deviation is None:
time.sleep(script.delay)
else:
time.sleep(abs(random.gauss(script.delay, script.standart_deviation)))
time.sleep(abs(random.gauss(script.delay, script.standard_deviation)))
if self.enter:
script.process.sendline(self.mapping[self.send])
else:
Expand Down
4 changes: 2 additions & 2 deletions asciinema_automation/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
asciinema_arguments: str,
wait,
delay,
standart_deviation,
standard_deviation,
timeout,
):
# Set members from arguments
Expand All @@ -58,7 +58,7 @@ def __init__(
self.asciinema_arguments = asciinema_arguments
self.delay = delay / 1000.0
self.wait = wait / 1000.0
self.standart_deviation = standart_deviation / 1000.0
self.standard_deviation = standard_deviation / 1000.0

# Default values for data members
self.expected = "\n"
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# delay instructions change the time (or mean of gaussian if standart deviation is given) between key strokes
# delay instructions change the time (or mean of gaussian if standard deviation is given) between key strokes
#$ delay 50

echo "Hello world"
Expand Down

0 comments on commit 8e1a625

Please sign in to comment.