Saravanan666/pypi-org huggingface dataset:
Package: gym-buy-high-sell-low
Gym Buy High Sell LowGym Buy High Sell Low isan OpenAI Gym simulated stock market environment that allows training agents to do favorable trades on a hypothetical stock market. Please, don't use this for serious purposes. The goal for this project is personal learning. I feel trying to beat the stock market is a rite of passage when you're getting into reinforcement learning.Obviously, "buy high, sell low" is an attempt at humour and a horrible way to do trading.PrerequisitesPython >= 3.7 (tested with latest 3.7, 3.8 and 3.9)Getting startedInstall the package either from Pypi or from the repository.pipistallgym-buy-high-sell-lowTo install from the repository, follow these steps:Linux and macOS:gitclonehttps://github.com/tjkemp/gym-buy-high-sell-low# create and enter a Python environment here before proceedingpipinstallrequirements/requirements.txt
pipinstall-e.After installing the package to create an instance of the environment first import bothgym_bhsland OpenAI'sgympackage:>>>importgym_bhsl>>>importgym>>>env=gym.make('BuyHighSellLow-v0')The environment instance implements the usual OpenAI Gym environment methods.To see the observation space and the action space of the environment, use theenv.observation_spaceandenv.action_spaceproperties:>>>env.observation_spaceTuple(Box(0.0,100.0,(1,),float32),Box(0.0,100.0,(90,),float32))>>>env.action_spaceDiscrete(3)The observation space is a tuple of twoBoxobjects, one for the price of the bought stock (or0.0if no stock is owned. The second object is the price history for the last 90 days (timesteps).The action space is a discrete space of size 3. Integer0means hold/wait,1means buy,2means sell.render()prints out the current state of the environment in a simplified human readable format.>env.reset()>env.render()0.90davg:9.2247davg:8.857.Nostocks.Currentprice8.192.>env.action(1);env.render()# Buy stocks1.90davg:9.2127davg:8.742.Boughtat8.802.Currentprice8.946.>env.action(0);env.render()# Hold2.90davg:9.1857davg:8.684.Boughtat8.802.Currentprice9.918.>env.action(2);env.render()# Sell stocks3.90davg:9.1857davg:8.684.Soldwithaprofitof0.166%.Currentprice10.264.The reward is the profit/loss made from the last trade in percentage. Sell actions are executed on the next timesteps price. You can only buy and hold one stock at a time.The simulationThe stock market is simulated as an Ornstein-Uhlenbeck process. The process is a random walk with a constant mean and a constant standard deviation. At the start of a new task (or atreset()) the process is initialized with 90 timesteps of random stock price and the price is updated after each timestep.Authortjkemp
Package: gym-cache
gym-cacheOpenAI based Gym environments for training RL caching agentinstall it:pip install gym-cacheimport it like this:import gymgym.make('gym_cache:Cache-v0')observation space has following variables:six tokens (integers)file size [kB]how full is the cache at that momentThere are two discrete action environments (Cache-v0andCache-large-v0) and one continuous action environment (Cache-continuous-v0).Data extractions and preprocessingThis is a two step procedure:extract raw datadata/extract_data.py- change PQ, date rangeprocess raw datadata/process_data.py- tokenizes filenames, generates unique fileIDs, sorts by access time.Processed data should be copied to the directory where actor runs.
It is a parque file (.pa) with one dataframe:index - access time (sorted)six tokens derived from the filename ('1', '2', '3', '4', '5', '6')filesize ('kB')unique file identifier ('fID')Rewardsalways negative and correspond to cost to get the file - if it was cached it will be smallerfiles are cached irrespectively from what action actor performed for the filecleanup: environment memorizes actions. on cleanup it first deletes files judged not to be needed again (action 0 in discrete environments or smaller values in continues environment). If multiple files have the same action value, LRU one is removed first.Possible technical implementation in XCache serverThere are additional containers in the pod.environment containerrecieves gstream pfc, and disk inforecalculates new state, reward, tokenizes recieved gstream info.memorizes last state, actors actions for each filetriggers cleanup at lower HWM then xcache itself. Loops through memorized paths and removes ones least probably needed.redis db - used by environment container to store actor responsesactor containerMiscaleniousTo change environments:clone github repositorymake changesinstall locally:python -m pip install --user -e .orpython setup.py bdist_wheel
python -m pip install dist\gym_cache-1.0.1-py3-none-any.whlto upload to pypi repositorycreate %USER%.pypirc file first.python setup.py bdist_wheel
python -m twine upload dist*
Package: gym-cap32
OpenAI Gym’s documentationInstallationFirst install OpenAI Gym :$pip3install--no-cache-dir--upgradegymThen install the AmLE :$pip3install--no-cache-dir--upgradeamle-pyFinally instal the amle environment for OpenAi Gym :$pip3install--no-cache-dir--upgradegym-cap32ExamplesYou can run two different examples with the two given games. To run them make sure to have installed everything required above. Then in Examples/ :$python3<example-file>
Package: gym-cap32bis
OpenAI Gym EnvsOpenAI Gym's documentation <https://github.com/openai/gym/blob/master/docs/creating-environments.md>_InstallationFirst install OpenAI Gym :.. code-block:: console$ pip3 install --no-cache-dir --upgrade gymThen install the AmLE :.. code-block:: console$ pip3 install --no-cache-dir --upgrade amle-pyFinally instal the amle environment for OpenAi Gym :.. code-block:: console$ pip3 install --no-cache-dir --upgrade gym-cap32ExamplesYou can run two different examples with the two given games. To run them make sure to have installed everything required above. Then in Examples/ :.. code-block:: console$ python3 <example-file>
Package: gym-cap32v2
OpenAI Gym EnvsOpenAI Gym's documentation <https://github.com/openai/gym/blob/master/docs/creating-environments.md>_InstallationFirst install OpenAI Gym :.. code-block:: console$ pip3 install --no-cache-dir --upgrade gymThen install the AmLE :.. code-block:: console$ pip3 install --no-cache-dir --upgrade amle-pyFinally instal the amle environment for OpenAi Gym :.. code-block:: console$ pip3 install --no-cache-dir --upgrade gym-cap32ExamplesYou can run two different examples with the two given games. To run them make sure to have installed everything required above. Then in Examples/ :.. code-block:: console$ python3 <example-file>
Package: gym-cartpole-swingup
gym-cartpole-swingupA simple, continuous-control environment for OpenAI GymInstallationpipinstallgym-cartpole-swingupUsage example# coding: utf-8importgymimportgym_cartpole_swingup# Could be one of:# CartPoleSwingUp-v0, CartPoleSwingUp-v1# If you have PyTorch installed:# TorchCartPoleSwingUp-v0, TorchCartPoleSwingUp-v1env=gym.make("CartPoleSwingUp-v0")done=Falsewhilenotdone:action=env.action_space.sample()obs,rew,done,info=env.step(action)env.render()
Package: gym-cas
GYM CASHjælpepakke til at bruge Python som CAS (Computational Algebra System) i gymnasiet.Installationpip install gym-casellerpy -m pip install gym-casCheatsheetI nedenstående afsnit antages det atgym_casførst importeres således:fromgym_casimport*B1. Tal- og bogstavregningexpand(udtryk)factor(udtryk)B2. Ligninger og ulighedersolve(udtryk)solve([udtryk1,udtryk2])nsolve(udtryk,start)Bemærk at den nemmeste måde at brugesolveiSymPyer ved at omforme sin ligning så en af siderne er lig 0. Hvis man fx vil løse ligningenx/2 = 10så kan det skrivessolve(x/2-10).B3. Geometri og trigonometriSin(vinkel)Cos(vinkel)Tan(vinkel)aSin(forhold)aCos(forhold)aTan(forhold)B4. Analytisk plangeometriplot_list(X_list,Y_list,is_point=True)plot(funktion)plot_implicit(udtryk,xlim=(x_min,x_max),ylim=(y_min,y_max))plot_geometry(Geometriskobjekt)Flere grafer i en afbildningp1=plot(udtryk1)p2=plot(udtryk2)p=p1+p2p.show()B5. Vektorera=Matrix([x,y])a.dot(b)plot_vector(vektor)plot_vector(start,vektor)plot_vector([vektor1,vektor2,...])B6. Deskriptiv StatistikUgrupperetmax(data)min(data)mean(data)median(data)var(data,ddof)std(data,ddof)kvartiler(data)percentile(data,procenter)frekvenstabel(data)boxplot(data)plot_sum(data)Grupperetgroup_mean(data,grupper)group_percentile(data,grupper,procenter)group_var(data,grupper,ddof)group_std(data,grupper,ddof)frekvenstabel(data,grupper)boxplot(data,grupper)plot_sum(data,grupper)plot_hist(data,grupper)B8. Funktionerdeff(x):returnfunktionsudtrykf(3)deff(x):returnPiecewise((funktion1,betingelse1),(funktion2,betingelse2))plot(funktion,yscale="log")plot(funktion,(variabel,start,stop),xscale="log",yscale="log")regression_poly(X,Y,grad)regression_power(X,Y)regression_exp(X,Y)B9. Differentialregninglimit(udtryk,variabel,grænse,retning)diff(funktion)defdf(xi):returndiff(funktion).subs(variabel,xi)B10. Integralregningintegrate(udtryk)integrate(udtryk,(variabel,start,slut))A1. Vektorer i rummeta=Matrix([1,2,3])a.cross(b)plot3d_list(X,Y,is_point=True)plot_vector(a)plot3d_line(a+t*r)plot3d_plane(a+s*r1+t*r2)plot3d_implicit(ligning,backend=PB)# Kræver Plotly eller K3DA4. Differentialligningerf=Function('f')dsolve(ode)plot_ode(ode,f,(x,start,stop),(f,start,stop))A5. Diskret MatematikX=[udregningforxinrange(start,slut)]X=[startbetingelse]foriinrange(start,slut):X.append(rekursionsligning)
Package: gym-chrome-dino
# gym-chrome-dinoAn OpenAI Gym environment for Chrome Dino / T-Rex Runner GameThis environment utilizes[a forked version](https://github.com/elvisyjlin/t-rex-runner)of _Chrome Dino_, also called _T-Rex Runner_,extracted from chromium offline error page.See [here](https://github.com/wayou/t-rex-runner).## InstallationYou can install `gym-chrome-dino` from PyPI by either```bashpip install gym-chrome-dino```or```bashgit clone https://github.com/elvisyjlin/gym-chrome-dino.gitcd gym-chrome-dinopip install -e .```## UsageYou can get started as follows:```pythonimport gymimport gym_chrome_dinoenv = gym.make('ChromeDino-v0')```To create a headless (without opening browser) environment```pythonenv = gym.make('ChromeDinoNoBrowser-v0')```### Observations, Actions and Rewards* The observation is a RGB numpy array with shape of (150, 600, 3).* The available actions are 0: _do nothing_, 1: _jump_, and 2: _duck_.* A positive reward 0.01 is given when the dinosaur is alive; a negative penalty -1.0 is given when the dinosaur hits an obstable, which might be a cactus or a bird.For the DeepMind DQN recipe, where we give 4-stacked resized grayscaled frames (80, 160, 4) to the agent, we provide a wrapping method `make_dino()`. It also comes with a timer wrapper, which reports the interval between `env.step()`.```pythonfrom gym_chrome_dino.wrappers import make_dinoenv = make_dino(env, timer=True, frame_stack=True)```### DinoGameAn instance of `DinoGame` is created when the environment is made. There are some useful methods for fine control of the training environment. The `DineGame` can be accessed as follows:```pythonenv.unwrapped.game````DinoGame` provides a `get_score()` method to get the score of current game.```pythonscore = env.unwrapped.game.get_score()```By default, the acceleration of the game is set to zero. If you want to restore the original acceleration value, please do `set_acceleration(True)`. On the other hand, `set_acceleration(False)` sets the value to zero.```pythonenv.unwrapped.game.set_acceleration(True)```## ExampleHere is a simple example to use `gym-chrome-dino`.```pythonimport gymimport gym_chrome_dinofrom gym_chrome_dino.utils.wrappers import make_dinoenv = gym.make('ChromeDino-v0')env = make_dino(env, timer=True, frame_stack=True)done = Truewhile True:if done:env.reset()action = env.action_space.sample()observation, reward, done, info = env.step(action)```## WebDriver`gym-chrome-dino` runs the game on [chromedriver](http://chromedriver.chromium.org) via `selenium` because it is a proper way to monitor and to play _Chrome Dino_. As a result, the latest chromedriver executable file will be downloaded to the current working directory where your program is.
Package: gym-collision-avoidance
gym-collision-avoidanceUpdates:2023-04-28:Updated to be compatible with Python 3.10 and tensorflow 2. Corresponding v0.0.3 available on pypi as well, if you do not intend to modify the source code (python -m pip install gym-collision-avoidance)This is the code associated with the following publications:Journal Version:M. Everett, Y. Chen, and J. P. How, "Collision Avoidance in Pedestrian-Rich Environments with Deep Reinforcement Learning", IEEE Access Vol. 9, 2021, pp. 10357-10377.10.1109/ACCESS.2021.3050338,Arxiv PDFConference Version:M. Everett, Y. Chen, and J. P. How, "Motion Planning Among Dynamic, Decision-Making Agents with Deep Reinforcement Learning", IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2018.Arxiv PDF,Link to VideoThis repo also contains the trained policy for the SA-CADRL paper (referred to as CADRL here) from the proceeding paper: Y. Chen, M. Everett, M. Liu, and J. P. How. “Socially Aware Motion Planning with Deep Reinforcement Learning.” IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). Vancouver, BC, Canada, Sept. 2017.Arxiv PDFIf you're looking to train our GA3C-CADRL policy, please seethis repoinstead.About the CodePlease seethe documentation!If you find this code useful, please consider citing:@inproceedings{Everett18_IROS,
  address = {Madrid, Spain},
  author = {Everett, Michael and Chen, Yu Fan and How, Jonathan P.},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  date-modified = {2018-10-03 06:18:08 -0400},
  month = sep,
  title = {Motion Planning Among Dynamic, Decision-Making Agents with Deep Reinforcement Learning},
  year = {2018},
  url = {https://arxiv.org/pdf/1805.01956.pdf},
  bdsk-url-1 = {https://arxiv.org/pdf/1805.01956.pdf}
}or@article{everett2021collision,
  title={Collision avoidance in pedestrian-rich environments with deep reinforcement learning},
  author={Everett, Michael and Chen, Yu Fan and How, Jonathan P},
  journal={IEEE Access},
  volume={9},
  pages={10357--10377},
  year={2021},
  publisher={IEEE}
}
Package: gym-contin
Gym-style APIThe domain features a continuos state and a dicrete action space.The environment initializes:cross-sectional dataset with variables X_a, X_s, Y and N observations;logit model fitted on the dataset, retrieving parameters \theta_0, \theta_1, \theta_2;The agent:sees a patient (sample observation);predict his risk of admission \rho, using initialized parametersif \rho < 1/2:do not intervene on X_a, which stays the sameelse:sample an action a in [0,1]compute g(a, X_a) = newX_aintervene on X_a by updating it to newX_agive reward equal to average risk of admission, using predicted Y, initial parameters and sampled values(shouldn't I fit a new logit-link? parameters are now diff?)To installgit clonehttps://github.com/claudia-viaro/gym-contin.gitcd gym-contin!pip install gym-continimport gymimport gym_continenv =gym.make('contin-v0')To change versionchange version to, e.g., 1.0.7 from setup.py filegit clonehttps://github.com/claudia-viaro/gym-contin.gitcd gym-continpython setup.py sdist bdist_wheeltwine check dist/*twine upload --repository-urlhttps://upload.pypi.org/legacy/dist/*
Package: gym-craftingworld
Gym CraftingworldThis is a (work-in-progress) gym package for a 2D crafting environment.
This environment is based off one first described inPlan Arithmetic: Compositional Plan Vectors for Multi-Task Control, published in NeurIPS 2019, and the mechanics are adapted from the corresponding code atcode.You can read the documentationhere.Environment descriptionThis environment consists of a two-dimensional top-down, grid-based world consisting of 4x4 pixel cells.
The environment contains seven object types of object:Tree,Rock,Logs,Wheat,Bread,Hammer, andAxe.Different objects are represented by differently coloured 4x4 blocks, while the agent is represented by a 2x2 white pixel block centered within the 4x4 cell.The agent's actions are descrete and consist of six possible choices:Up,Down,Left,Right,PickUp, andDrop.Logs, hammers, and axes can be picked up by agent.
Trees and rocks block the agent's movement.When an agent picks up an object, its block changes to a square block with 2x1 white pixels on top and 2x1 pixels below in the color of the object.The environment consists of nine skills:ChopTree-- The agent is required to be holding anAxeand on a cell with aTreetoChopTreeand turn it intoLogs.BuildHouse-- The agent is required to be holding aHammerand on a cell with someLogstoBuildHouse.MakeBread-- The agent is required to be holding anAxeand on a cell with someWheattoMakeBreadand createBread.EatBread-- The agent is required to be on a cell withBreadtoEatBread.BreakRock-- The agent is required to be holding aHammerand on a cell with aRocktoBreakRock.GoToHouse-- The agent is required to be on a cell with aHousetoGoToHouse.MoveAxe-- The agent is required toPickUpanAxeanddropit in another cell.MoveHammer-- The agent is required toPickUpaHammeranddropit in another cell.MoveLogs-- The agent is required toPickUpsomeLogsanddropit in another cell.A task is defined by a list of skills. For example, [ChopTree,BuildHouse].The quantities and positions of each object are randomly selected at each reset, which occurs between episodes.RenderingTo store each episode as a gif, callenv.allow_gif_storage(), which will store each episode in the/renders/subdirectory.
Package: gym-crypto
gym-cryptoOpenAI Gym compatible environment for crypto-currency trading.
The environment allows to change the currency the bot trades, the granularity of trading
and starting capital of the agent. More configurability to come in the future.Observation SpaceThe observation space is a tuple structured as follows:(OCHLV, Current Capital, Weight of the capital invested)OCHLV represents Open, Close, High, Low prices and Volume respectively. So the total capital invested into
a coin at any time is:(Current Capital)*(Weight of the capital invested)Action SpaceAction space is a single scalar between -1 and 1, which represents the percentage of the capital
that the agent has invested into the currency at the last time step.-1 representing a full short position and 1 representing a full long position.RewardsThe reward is defined as the total amount of capital that has been gained/lost for that time-step.
This number includes the return on the investment as well as the transaction costs.UsageIn order to train the agent, the enviroment first has to be configured. This example shows how to handle the
training and testing of the agents:importgymfromgym_cryptoimportconfigsenv=gym.make("gym-crypto-v0")env.configure_env(**configs.DEFAULT_CONFIG)### Train an agent on the environmenttest_config=configs.DEFAULT_CONFIG.update({'start_date':'2019-01-01','end_date':'2019-06-01'})env.configure_env(**test_config)done=Falseobservation=env.reset()whilenotdone:action=agent.predict(observation)observation,_,done,_=env.step(action)returns,weights=env.render()To get some results from the agent, aenv.render()needs to be called, which will return
the capital returns as the first variable and weight allocation as the second variable. More detailed
results will be coming in the future.DataTo futher inspect the data two methods can be called from thedata_utilsmodule.fromgym_crypto.data_utils.data_utilsimport*currencies=get_avaliable_currencies()full_data=read_data('BTC')All data was obtained from the Bitfinex API.
Package: gym-dart
gym-dartOpenAI Gymenvironments forDARTanddartpy:warning:Warning:gym-dartis under heavy development. See the open issues ongym-dartfor insight into the current state of the project. Please report any issues you encounter on the appropriate repository. We will usedevelopbranch (instead ofmaster) as the default branch without worrying about the commit history until the API becomes stable.EnvironmentsDartCartPole-v0DartParticle-v0DartReacher-v0InstallationOpenAI GymUsingpip$python3-mpipinstall-UgymBuild from source$gitclonehttps://github.com/openai/gym$cdgym$python3-mpipinstall-e.dartpy$sudoapt-add-repositoryppa:dartsim/ppa$sudoaptupdate$suaoaptinstallpython3-dartpygym-dart$gitclonehttps://github.com/dartsim/gym-dart$cdgym-dart$python3-mpipinstall-e.Licensegym-dartis licensed under a BSD license. SeeLICENSEfor more information.
Package: gym-deepmindlab
Gym wrapper for DeepMind Lab environmentsGym implementation of connector to Deepmind labGetting StartedInstall the newest package by running:pip install gym_deepmindlabIn your project:import gym
import gym_deepmindlab

env = gym.make('DeepmindLabSeekavoidArena01-v0')

# Use the environment
observation = env.reset()Suppoted EnvironmentsThis is the list of supported environments:DeepmindLabLtChasm-v0DeepmindLabLtHallwaySlope-v0DeepmindLabLtHorseshoeColor-v0DeepmindLabLtSpaceBounceHard-v0DeepmindLabNavMazeRandomGoal01-v0DeepmindLabNavMazeRandomGoal02-v0DeepmindLabNavMazeRandomGoal03-v0DeepmindLabNavMazeStatic01-v0DeepmindLabNavMazeStatic02-v0DeepmindLabSeekavoidArena01-v0DeepmindLabStairwayToMelon-v0ArgumentsYou can specify the screen size when creating a new environment:import gym
import gym_deepmindlab

env = gym.make('DeepmindLabSeekavoidArena01-v0', width = 224, height = 224)

# Use the environment
observation = env.reset()ThanksThanks tohttps://github.com/deepmind/labfor such a great work.
Package: gym-delta-robot-trampoline
Gym Delta Robot TrampolineAuthors: Rico Ruotong Jia(ruotongjia2020@u.northwestern.edu), Yipeng PanThe trampoline bounces a ball using a delta arm trained by DDPG! We also have included a PyBullet + OpenAI Gym environment of a Delta_Arm.Minimum System RequirementPython 3.6LinksGithubhttps://github.com/RicoJia/gym-delta-robot-trampolinePypihttps://pypi.org/project/gym-delta-robot-trampoline/InstallInstall withpip:pip3 install gym_delta_robot_trampolineOr, install from source:git clone https://github.com/RicoJia/gym-delta-robot-trampoline
cd gym-delta-robot-trampoline
pip install .UsageTo see the environment, in the root of the package on Githubhttps://github.com/RicoJia/gym-delta-robot-trampolineDownloadmain.pypython3 main.pyYou can interact with the environment by clicking and dragging, but note that our simulation is running much
faster than real time, so you might not see the ball falling to the ground before the episode ends, or
you might see a higher reward than expected due to small vibrations in our mouse dragging motion.