Skip to content

Instantly share code, notes, and snippets.

View EliasGit2017's full-sized avatar
I may be slow to respond.

ElBe2049 EliasGit2017

I may be slow to respond.
View GitHub Profile
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()))
@EliasGit2017
EliasGit2017 / ocaml_snips.json
Created August 26, 2022 15:13
Snippets for vscode Ocaml
{
// 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');",
@EliasGit2017
EliasGit2017 / index.html
Created October 22, 2021 14:46
Tag search bar
<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>
@EliasGit2017
EliasGit2017 / OpenAI_gym_tests.py
Last active August 17, 2020 00:07
little note on gym
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: