You can memorize these two rules, and everything will be merry and well.
When you see
>>> EXPR
you can think of this as doing exactly the following (for the purposes of 61A):
#!/bin/bash | |
# Usage: | |
# SERVER=LINK_TO_YOUR_SERVER ./downgrade.sh | |
REMARKABLE_UPDATE="/usr/share/remarkable/update.conf" | |
REMARKABLE_UPDATE_BKUP="/tmp/update_bkup.conf" | |
# Copy Remarkable update file | |
cp $REMARKABLE_UPDATE $REMARKABLE_UPDATE_BKUP |
Okpy is an autograderused in Berkeley's CS61A course. There is a built-in velocity limiter that prevents students from checking their work too often, which would end up with counterproductive behavior (ie. changing every line and rerunning the autograder, hoping they stumble upon the mistake). I looked into the velocity limitation implementation, and reverse engineered it.
My initial workaround to this problem was to use the linux command sleep
which would sleep for a given number of seconds and then run a command. (The full command was sleep 60s && python3 ok
.) This worked in that I didn't have to keep running the autograder to see the time remaining, but I still had the 1 minute lock nonetheless. I wanted to find a better way.
My first thought that there could be a better way came when a student had a problem regarding ok (he had nearly infinite remaining time — a weird bug). An instructor suggested to remove a file on his local ma
Berkeley's Okpy is an autograder that grades students' code. A student can use it as many times as he/she wants, but there's a catch: the student must wait for one minute before the next try. This was really annoying to deal with, because sometimes it would just be a typo or a missed parentheses. Thus, we as students naturally wanted to get around it somehow.
My initial workaround to this problem was to use the linux command sleep
which would sleep for a given number of seconds and then run a command. (The full command was sleep 60s && python3 ok
. This worked in that I didn't have to keep running the autograder to see the time remaining, but I still had the 1 minute lock nonetheless. I wanted to find a better way.
My first thought that there could be a better way came when a student had a problem regarding ok (he had nearly infinite remaining time — a weird bugj). An instructor suggested to remove a
public class main { | |
public static void main (String [] args){ | |
Robot robot; | |
robot = new Robot(new int[]{1,1,2,2}, 1, true); | |
checkEquals(robot.clearHall(), 9, 5); | |
robot = new Robot(new int[]{1,1,2,2}, 1, false); | |
checkEquals(robot.clearHall(), 8, 8); | |
robot = new Robot(new int[]{1,1,1,1}, 0, true); |