code
stringlengths
3
6.57k
copy_root_project(version)
hello_msg()
print(msg)
symlinks(e.g., `julia`, `julia-1`)
default_install_dir()
os.path.abspath(install_dir)
default_symlink_dir()
os.path.normpath(os.path.abspath(symlink_dir)
current_system()
current_architecture()
str(version)
if (version or str(version)
os.environ.get("JILL_UPSTREAM", None)
current_libc()
hello_msg()
install_dir.replace("\\\\", "\\")
strip('\'"')
query_yes_no(question)
verify_upstream(upstream)
version(>= 0.6.0)
raise(ValueError(msg)
is_installed(version)
print(f"julia {version} already installed.")
print(f"{color.BOLD}----- Download Julia -----{color.END}")
package_path.endswith(".dmg")
package_path.endswith(".tar.gz")
package_path.endswith(".exe")
print(f"{color.RED}Unsupported file format for {package_path}{color.END}.")
print(f"{color.BOLD}----- Install Julia -----{color.END}")
installer(package_path, install_dir, symlink_dir, version, upgrade)
print(f"{color.BOLD}----- Post Installation -----{color.END}")
print("remove downloaded files...")
print(f"remove {package_path}")
os.remove(package_path)
os.path.exists(gpg_signature_file)
print(f"remove {gpg_signature_file}")
os.remove(gpg_signature_file)
print(f"{color.GREEN}Done!{color.END}")
get_instances_list()
np.array(WinMasks)
reshape((-1,9)
SingleAgentTicTacToeEnv(object)
__init__(self)
np.zeros((9,)
spaces.Discrete(self.NActions)
np.ones((self.NActions,)
spaces.Box(-high, high, dtype=np.float32)
reset(self)
self.observation(self.Side)
np.array([1,1,0,0,1,0,0,0,0], dtype=np.float32)
observation(self, side)
step(self, action)
self.BoardHistory.append(self.Board.reshape((3,3)
copy()
np.sum(masked)
np.all(self.Board != 0)
self.observation(self.Side)
np.asarray(self.Board==0, dtype=np.float32)
render(self)
len(history)
in (0,1,2)
join(".xo"[int(c)
lines.append(line)
int(last_move)
lines.append(sep + " " + outcome)
print("\n".join(lines)
show_board(board)
board.reshape((3,3)
int(x)
out.append(line)
out.append(sep)
join(out)
Agent(object)
__init__(self, side)
reset(self)
action(self, reward, observation, available_actions)
print(f"{self.Sign}: action:", reward, observation, available_actions)
enumerate(available_actions)
random.choice(choices)
reward(self, r)
print(f"{self.Sign}: reward: {r}")
done(self, r, last_observation)
print(f"===== {self.Sign} won")
print(f"===== {self.Sign} lost")
print("===== draw")
Callback(object)
end_turn(self, agents, data)
print(show_board(data["board"])
end_episode(self, agents, data)
print("--- game over ---")
print(env.show_history(data["board_history"])
Agent(0)
Agent(1)
TicTacToeEnv()
env.run([x_agent, y_agent], [Callback])
N1(C(c2c(cc3c(c2)
c4cc(c(c(c4)
C(=O)
N1(C(c2c(cc(cc2)
c3ccc(cc3)