This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import pyautogui | |
import sys | |
import time | |
def wide_awake(seconds): | |
try: | |
print("Starting to keep awake. Use ctrl + C to exit.") | |
print("Simulating ctrl key press every {} seconds".format(seconds)) | |
print("Start time: " + str(datetime.datetime.now())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Place your snippets for ocaml here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="searchBar"> | |
<input type="text" name="search" placeholder="" size="1"> | |
</div> | |
<!-- You don't need this --> | |
<div class="--debug"> | |
<h3 style="color: white;font-family: 'Roboto'"> var Filter : <span id="filter"></span></h3> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gym | |
import time | |
env = gym.make("CartPole-v1") | |
observation = env.reset() | |
for _ in range(10000): | |
env.render() | |
action = env.action_space.sample() # your agent here (this takes random actions) | |
observation, reward, done, info = env.step(action) | |
time.sleep(0.02) | |
if done: |