I hereby claim:
- I am harrycutts on github.
- I am hc (https://keybase.io/hc) on keybase.
- I have a public key whose fingerprint is 14C4 E347 399F 4D1F 9668 9CF6 4E44 A55E 80BB 7ECE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
echo "Choose the program to run:" | |
cd robot-sim | |
select FILENAME in *.py; | |
do | |
echo "Running $FILENAME ($REPLY):" | |
echo "---" | |
echo |
In Python: A Whirlwind Tour, you learnt to use Python in quite an abstract environment. In this worksheet, we'll build on that knowledge in an applied setting: that of programming a robot. For now, this robot will be in a simulator, but the code you will write for it will be very similar to the code for your real robot.
On your desktop on the lab machine, you should find a folder named 'robot-sim', with another folder and a couple of Python programs inside. This is the simulator directory. When you place programs in the folder and follow the steps below, your program will be run in the simulator.
fn list-syscalls [file]{ | |
cat $file | eawk [f syscall @rest]{ if (str:has-suffix $syscall ':') { put $syscall[:-1] } } | |
} | |
fn find-dups [list]{ | |
map = [&] | |
for item $list { | |
if (has-key $map $item) { | |
put $item | |
} |