This file contains 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 requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
import time | |
import random | |
# List of URLs to scrape | |
urls = [ | |
"https://icml.cc/virtual/2023/poster/24721", | |
"https://icml.cc/virtual/2023/poster/24944", |
This file contains 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
# start by installing xdotool | |
# sudo apt-get install xdotool | |
# then get the "Interested" coordinates as X_INT and Y_INT | |
# sleep 2; xdotool getmouselocation --shell | |
# then run the script! | |
X_INT=577; Y_INT=413; |
This file contains 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
"""Objective: Reduce action space to speed up training time | |
1st Action: No-Op, wait 1 frame to allow pictures to appears | |
2nd Action: True Action taken | |
3rd Action: Reverse action to go back at the center of the screen | |
4th Action: No-Op, to wait 1 frame to allow the cross to appears | |
""" | |
_, r_, _, _ = self.env.step(np.array([0, 0, 0, 0, 0, 0, 0], dtype=np.intc)) | |
s1, r, d, t = self.env.step(action, True) | |
r += r_ | |
if not d: |
This file contains 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
### START MULTIPROCESSING | |
######################### | |
num_processes = 32 | |
# Define an output queue | |
output = mp.Queue() | |
# Setup a list of processes that we want to run | |
processes = [mp.Process(target=episode, args=(self.env, self.local_AC, sess, rnn_state)) for i in range(num_processes)] |
This file contains 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 deepmind_lab | |
class WrapperEnv(object): | |
"""A gym-like wrapper environment for DeepMind Lab. | |
(Work in Progress) | |
Attributes: | |
env: The corresponding DeepMind Lab environment. | |
length: Maximum number of frames |
This file contains 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
#!/bin/bash | |
# | |
# This script creates a temporary directory with the structure required by | |
# setuptools to build the deepmind_lab package and generates a binary | |
# distribution in the directory specified. | |
# | |
# This should be invoked directly and not via "bazel run" since the working | |
# directory has to be the root of the build tree. | |
set -e |
This file contains 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 deepmind_lab | |
class wrapper_env(object): | |
"""A gym-like wrapper environment for DeepMind Lab. | |
Attributes: | |
env: The corresponding DeepMind Lab environment. | |
timestep: the number of frames/actions since the beginnning. | |
Args: | |
env (deepmind_lab.Lab): DeepMind Lab environment. | |
""" |