Build a Redis-like in-memory database.
Implement run_commands(commands), where each command is an array of strings. Support SET key value [EX seconds], GET key, DEL key..., EXPIRE key seconds, TTL key, INCR key, and ADVANCE seconds. Return outputs for GET, DEL, EXPIRE, TTL, and INCR; SET and ADVANCE produce no output. Expired keys must behave as absent. Use virtual time beginning at zero so expiration is deterministic.
Inputs are valid, values are strings unless used by INCR, and INCR applies only to integer values.
def run_commands(commands):