This is a fork of [laobubu's Pico HTTP server][laobubu-gist]. The only change is a fix to the POST payload reading code.
- include header
httpd.h - write your route method, handling requests.
- call
serve_forever("12913")to start serving on port 12913
| 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 | |
| } |
I hereby claim:
To claim this, I am signing this object:
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.
| #!/bin/bash | |
| echo "Choose the program to run:" | |
| cd robot-sim | |
| select FILENAME in *.py; | |
| do | |
| echo "Running $FILENAME ($REPLY):" | |
| echo "---" | |
| echo |