aws login コマンドを初めて使ってみたが、これであればアクセスキーを作らなくていいので良さそうだなと思った。 https://dev.classmethod.jp/articles/aws-cli-aws-login/
SAMを試す (論文メモはこちら - nagataka/Read-a-Paper#55) SAM3を使うにはHugging Faceのレポジトリ上からアクセスリクエストが必要そうなので、一旦SAM2で実験。
| def construct_index(docs): | |
| term_dict = {} | |
| postings = {} | |
| for id, doc in docs.items(): | |
| terms = list(set(doc.lower().split())) | |
| for term in terms: | |
| term_count = term_dict.get(term, 0) | |
| term_posting = postings.get(term, None) |
aws login コマンドを初めて使ってみたが、これであればアクセスキーを作らなくていいので良さそうだなと思った。 https://dev.classmethod.jp/articles/aws-cli-aws-login/
SAMを試す (論文メモはこちら - nagataka/Read-a-Paper#55) SAM3を使うにはHugging Faceのレポジトリ上からアクセスリクエストが必要そうなので、一旦SAM2で実験。
たまに色々と忘れるので便利な資料をメモ
| # OpenAI gym custom environment mimicking Blocking Maze | |
| # See Sutton and Barto "Reinforcement Learning an Introduction" | |
| # Example 8.2: Blocking Maze | |
| from enum import Enum | |
| import sys | |
| import copy | |
| import gym | |
| from gym import error, spaces, utils | |
| from gym.utils import seeding |
| { | |
| "python.formatting.provider": "black", | |
| "python.linting.pylintEnabled": false, | |
| "python.linting.flake8Enabled": true, | |
| "python.linting.flake8Args": [ | |
| "--ignore=E501,W503" | |
| ], | |
| "python.sortImports.args": [ | |
| "-m 3" | |
| ], |
| import random | |
| import numpy as np | |
| np.random.seed(0) | |
| def kerri(p, b): | |
| """https://en.wikipedia.org/wiki/Kelly_criterion | |
| """ | |
| return (p*(b+1)-1 )/b | |
| N = 300 |
| import gym | |
| import ray | |
| from ray.rllib.agents.ppo import PPOTrainer, DEFAULT_CONFIG | |
| import pprint as pp | |
| #tune.run(PPOTrainer, config={"env": "Breakout-v0", "use_pytorch": True}) | |
| ray.init(num_gpus=1, ignore_reinit_error=True, log_to_driver=False) | |
| # https://github.com/ray-project/ray/blob/master/rllib/agents/ppo/ppo.py#L15 |
| #!/bin/bash | |
| set -eu | |
| ### Incoming WebHooks URL | |
| WEBHOOKURL="https://hooks.slack.com/services/FILL_YOUR_WEBHOOKURL" | |
| ### channel | |
| CHANNEL=${CHANNEL:-"#notifications"} |
The repository is organized as follows:
src : Contains the source codes for all .... The source code is written in Python and it takes advantage of Numpy and Matplotlib. In order to run a simulation you have to use the file run_xxxx.py.
tools: In this folder you can find some tools for.... With yyy.py you can reproduce the figures found in ().
data: Here are saved all the results once you run a simulation.
params: Here you can find all the configuration files containing all the parameters (for each experiments).