Saravanan666/pypi-org huggingface dataset:
Package: gym-hearts
# Gym HeartsThis is an experimental library for hearts poker game and reinforment learning.I implement the library and run it at ubuntu and mac by python3.If you encounter any problem, feel free to create new issue on this project :smile:# Implemented Rules1. All heart cards ( 2♥, 3♥, …., Q♥, K♥, A♥ ) cost 1 score2. Q♠ costs 13 score3. This trick’s looser will be next trick’s first player4. Shooting the moon# Installation```shpip3 install gym-hearts```# Hello World```pythonimport gymfrom gymhearts import env as hearts_envfrom gymhearts import strategyclass HelloStrategy(strategy.IStrategy):def move(self, observation):action = observation['valid_hand_cards'][0]return actionenv = hearts_env.HeartsEnv()env.enable_shooting_the_moon()env.add_player(HelloStrategy())env.add_player(HelloStrategy())env.add_player(HelloStrategy())env.add_player(HelloStrategy())env.start()env.render()observation = env.get_observation()done = Falsewhile not done:action = env.move()observation, reward, done, info = env.step(action)env.render()```# Observation```json{"trick": 12,"round": 9,"number_of_players": 4,"scores": [50, 104, 40, 40],"playing_cards": [69634, 2102541, 541447],"playing_ids": [3, 0, 1],"hand_cards": [529159],"current_player_id": 2,"valid_hand_cards": [529159],"number_of_hand_cards_for_all_players": [0, 0, 1, 0]}```# Render```sh--------GAME-------round: 9trick: 11-------PLAYER------player 0[7♠]score: 50player 1[5♦]score: 104player 2[5♠] [T♠]score: 40player 3[2♠]score: 40--------BOARD-------[9♠] [3♦] [] [8♦]--------------------```
Package: gym-ignition
gym-ignitionDescriptiongym-ignitionis a framework to createreproducible robotics environmentsfor reinforcement learning research.It is based on theScenarIOproject which provides the low-level APIs to interface with the Ignition Gazebo simulator.
By default, RL environments share a lot of boilerplate code, e.g. for initializing the simulator or structuring the classes
to expose thegym.Envinterface.
Gym-ignition provides theTaskandRuntimeabstractions that help you focusing on the development of the decision-making logic rather than engineering.
It includesrandomizersto simplify the implementation of domain randomization
of models, physics, and tasks.
Gym-ignition also provides powerful dynamics algorithms compatible with both fixed-base and floating-based robots by
exploitingrobotology/idyntreeand exposinghigh-level functionalities.Gym-ignition does not provide out-of-the-box environments ready to be used.
Rather, its aim is simplifying and streamlining their development.
Nonetheless, for illustrative purpose, it includes canonical examples in thegym_ignition_environmentspackage.Visit thewebsitefor more information about the project.InstallationFirst, follow the installation instructions ofScenarIO.pip install gym-ignition, preferably in avirtual environment.ContributingYou can visit our community forum hosted inGitHub Discussions.
Even without coding skills, replying user's questions is a great way of contributing.
If you use gym-ignition in your application and want to show it off, visit theShow and tellsection!
You can advertise there your environments created with gym-ignition.Pull requests are welcome.For major changes, please open adiscussionfirst to propose what you would like to change.Citation@INPROCEEDINGS{ferigo2020gymignition,title={Gym-Ignition: Reproducible Robotic Simulations for Reinforcement Learning},author={D. {Ferigo} and S. {Traversaro} and G. {Metta} and D. {Pucci}},booktitle={2020 IEEE/SICE International Symposium on System Integration (SII)},year={2020},pages={885-890},doi={10.1109/SII46433.2020.9025951}}LicenseLGPL v2.1or any later version.Disclaimer:Gym-ignition is an independent project and is not related by any means to OpenAI and Open Robotics.
Package: gym-ignition-models
gym-ignition-modelsRobot models forgym-ignitionThese models have been mainly tuned and tested to work inIgnition Gazebo.InstallationThis repository can be installed with thepippackage manager as follows:# From PyPI (release versions)pip3installgym-ignition-models# From PyPI (pre-release versions)pip3install--pregym-ignition-models# From the repositorypip3installgit+https://github.com/robotology/gym-ignition-models.gitOnly GNU/Linux distributions are currently supported.ConfigurationStandalone usageIf you use Ignition Gazebo, you need to specify where the models and their dependent resources are located in the filesystem.
The simulator reads theIGN_GAZEBO_RESOURCE_PATHenvironment variable.Execute the following commands from outside the directory where you cloned this repository to temporarily configure your environment:PKG_DIR=$(python-c"import gym_ignition_models, inspect, os; print(os.path.dirname(inspect.getfile(gym_ignition_models)))")exportIGN_GAZEBO_RESOURCE_PATH=$PKG_DIR:$IGN_GAZEBO_RESOURCE_PATHIf you want to make this change persistent, add the lines above to your~/.bashrc.Note:waiting anupstream fix, you also need to add
toIGN_GAZEBO_RESOURCE_PATHall the directories containing model's meshes.Note:Alternatively, instead of usingIGN_GAZEBO_RESOURCE_PATH, you can useSDF_PATHfor the models andIGN_FILE_PATHfor the meshes.Python usageThe environment variables are automatically exported when the package is imported.
If your application imports also thescenariopackage, make sure to importgym_ignition_modelsfirst.UsageYou can use these models either with the standalone Ignition Gazebo simulator, or find and import them in your Python code.
Here below a Python example of the utility functions provided by the package:importgym_ignition_modelsasmprint(f"Models have been installed in:{m.get_models_path()}")print(f"Available robots:{m.get_robot_names()}")print()print("Model files:")forrobot_nameinm.get_robot_names():print(f"{robot_name}:{m.get_model_file(robot_name)}")The package also includes aget_model_resourcefunction that provides string, URDF, or SDF descriptions of the supported models.
It converts the descriptions internally, if needed.Supported modelsRobot NameScreenshotground_planecartpolependulumiCubGazeboV2_5iCubGazeboSimpleCollisionsV2_5pandacharacterLicenseLGPL v2.1or any later version.
Package: gym-janggi
Gym JanggiGym Janggiprovides an reinforcement learning environment for Korean chess calledJanggi. As anOpenAI Gymenvironment, this package can be used for reinforcement learning algorithms, such as AlphaZero.DocumentationCheck out theGitHub Pagefor Gym environment documentation.Getting StartedUsing the Gym Enviornment in Your PackageInstall package via pip:pip install gym-janggiImport in your Python module:import gymimport gym_janggiMake a Gym environment instance:gym.make("gym_janggi/Janggi-v0")Check out theDocumentationsection for more details.Testing FunctionalityGym Janggiis originally designed to be imported by other packages and provide a Gym environemnt for Janggi, but if you want to check if the package itself is working, you can follow these steps:Clone the repository:git clone https://github.com/sungho-cho/gym-janggi.gitInstall the module:pip install -e .Runplay.py, which generates a game with a series of random moves:python gym_janggi/play.pyIf you see the UI window and moves being played, the package is working!ReleasesCheck out thePyPi Packagefor releases.LicenseThis package is licensed under theGNU General Public License v3.0.
Package: gym-jass
Copyright (c) 2018 Joel NiklausPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Description: # gym-jassThis is a gym environment for the Schieber variant of the Swiss Card Game Jass.# Brief description
The jass server (pyschieber) is requesting a card from the player which invokes the choose_card method in the jass client. But in the gym environment, the rl algorithm wants to initiate control by invoking the step function. So when the rl player wants to make a step, he provides an action. This action can only be processed when the jass server is waiting for input, aka when he requested a card. Then the card is sent to the jass server. The jass server computes the stich with the other players and then sends the current state back to the client (aka the observation). This observation is returned from the step function of the gym environment.Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Package: gym-karmedbandits
gym-karmedbanditsA simple gym environment implementing thek-armed banditsproblem as described in chapter-2 inReinforcement Learning: An Introduction, Richard S. Sutton & Andrew G. Barto.Installationgitclonegit@github.com:NoblesseCoder/gym-karmedbandits.gitcdgym-karmedbandits
pipinstall-e.orpipinstallgym-karmedbandits==0.0.3
Package: gym-lartpc
LARTPC GameWhat is thisThis repository is contains an game-like environment made from LARTPC detector readouts.
The goal here is to move a window (eg. 3x3 pixels on image),
and use the input from the window to categorise each pixel.
Another way to put this task is; you have to redraw a grey image (each pixel has singular float value e.g. [0.7]),
into a colorful image (one of three colors e.g. [0,1,0] or [1,0,0] or [0,0,1]), by steering quadratic brush (e.g. 5x5 pixels)
which has the same position on source image, as well as on canvas.examplebot.py:There are three types of windows here:source - an image that we have to base final categories upon, each pixel has a single float value (if y=f(x) then this is x)target - an image that we are trying to recreate, based on source  (and this is y)result - the actual game map (sort of like empty canvas), this where the result of categorisation is savedOn the bottom row you can see entire maps/environments/images of the game,
on the top row, you can see what is visible to the agent in the game (so window of pixels).DependanciesThis repository should work on any python 3.7.
The best approach is to create new virtual environment.Installationgitclonehttps://github.com/mmajewsk/lartpc_gamecdlartpc_game
pipinstall-rrequirements.txtPre-running stepsGetting the data** This library needs to read data processed from lartpc, which you have to download and process by yourself **
Followreadme in downloading_datato do all of the steps.Setting up pathAssuming that you are inlartpc_gamefolder do:export PYTHONPATH=$(pwd)This will addlartpc_gameto your python.Runningbot.pyThis is a very simple bot-actor, that will move by trying to explore new (non-empty) pixels.
It will also output a random category to the canvas/result map.e.g.python examples/bot.py ../../assets/dumpHelp (you cane use-hto see that message)usage: bot.py [-h] [--viz-off] data_path

Runs a simple bot showcasing the game. e.g. usage bot.py ../../assets/dump
bot.py ../../assets/dump --viz-off

positional arguments:
  data_path   Path to the data generated from lartpc

optional arguments:
  -h, --help  show this help message and exit
  --viz-off   Run without visualisation/opencv (helpful for debug)If you have problem exiting the visualisation:
first do ctrl-c in your terminal, than press space on the visualisationDocumentationThe best documentation is to follow thebot.pyexample,
to figure out how it works,
or to follow my solution with reinforcement learning.ResourcesDeep learn physics websiteMy use case with Reinforcement Learning
Package: gym-mage
MAGE: Multi-Agent Grid EnvironmentIntroductionMAGE is a grid-based environment with obstacles (walls) and agents. The agents can move in one of the four cardinal directions. If they try to move over an obstacle or out of the grid bounds, they stay in place. Each agent has a unique color and a goal state of the same color. The environment is episodic, i.e. the episode ends when all agents reach their goals.To initialise the grid, the user must decide where to put the walls on the grid. This can bee done by either selecting an existing map or by passing a custom map. To load an existing map, the name of the map must be passed to theobstacle_mapargument. Available pre-existing map names are "4x4" and "8x8". Conversely, to load custom map, the user must provide a map correctly formatted to theobstacle_mapargument. The obstacle map must be passed as a list of strings, where each string denotes a row of the grid and it is composed by a sequence of 0s and 1s, where 0 denotes a free cell and 1 denotes a wall cell. An example of a 4x4 map is the following:["0000","0101","0001","1000"]The user must also decide the number of agents and their starting and goal positions on the grid. This can be done by passing two lists of tuples, namelystarts_xyandgoals_xy, where each tuple is a pair of coordinates (x, y) representing the agent starting/goal position.Currently, the user must also define the color of each agent. This can be done by passing a list of strings, where each string is a color name. The available color names are: red, green, blue, purple, yellow, grey and black. This requirement will be removed in the future and the color will be assigned automatically.The user can also decide whether the agents disappear when they reach their goal. This can be done by passing a boolean value todisappear_on_goal. Ifdisappear_on_goalis True, the agent disappears when it reaches its goal, otherwise the agent remains on the grid after it reaches its goal. This feature is currently not implemented and will be added in future versions.Note that, currently no reward mechanism is implemented in the environment but it will be introduced soon.InstallationCurrently, only editable installation is supported:gitclonehttps://github.com/damat-le/mage.gitcdmage
pipinstall-e.Getting StartedAn example illustrating how to use MAGE is available in theexample.pyscript.CitationPlease use this bibtex if you want to cite this repository in your publications:@misc{mage,
  author ={Leo D'Amato},
  title ={Multi-Agent Grid Environment},
  year ={2022},
  publisher ={GitHub},
  journal ={GitHub repository},
  howpublished ={\url{https://github.com/damat-le/mage}},}DisclaimerThe project is under development. In the future releases, the following features will be added:add reward mechanism for RL tasksadd gym/PettingZoo integrationadd the random generation of mapsadd the disappear-on-goal featureprepare the project to be uploaded on PyPI
Package: gym-maze-trustycoder83
gym-mazeA simple 2d maze environment for Open AI Gym, where the agent needs to finds its way from the top left corner to the bottom right corner.Action spaceThe agent may only choose to go up, down, left, or right ("N", "S", "W", "E"). If the way is blocked, it will remain at the same the location.Observation spaceThe observation space is the (x, y) coordinate of the agent. The top left cell is (0, 0).RewardA reward of 1 is given when the agent reaches the goal. For every step in the maze, the agent recieves a reward of -0.1/(number of cells).End conditionThe maze is reset when the agent reaches the goal.Maze VersionsPre-generated mazes5 cells x 5 cells:MazeEnvSample5x510 cells x 10 cells:MazeEnvSample10x1025 cells x 25 cells:MazeEnvSample25x2550 cells x 50 cells:MazeEnvSample50x50100 cells x 100 cells:MazeEnvSample100x100Randomly generated mazes5 cells x 5 cells:MazeEnvRandom5x510 cells x 10 cells:MazeEnvRandom10x1025 cells x 25 cells:MazeEnvRandom25x2550 cells x 50 cells:MazeEnvRandom50x50100 cells x 100 cells:MazeEnvRandom100x100RequirementsYou need Python3.6or3.7to run the script. After this, install the package.python setup.py installAnother way to install the package is by using test.pypi.org.pip install gym-maze-trustycoder83
Package: gym-minecraft-pygame
gym-minecraft-pygameOpenaAI Gym Minecraft-like environment implemented with PygameLinksGitHub:https://github.com/whitemech/gym-minecraft-pygamePyPI:https://pypi.org/project/gym-minecraft-pygame/Documentation:https://whitemech.github.io/gym-minecraft-pygameChangelog:https://whitemech.github.io/gym-minecraft-pygame/history/Issue Tracker:https://github.com/whitemech/gym-minecraft-pygame/issuesDownload:https://pypi.org/project/gym-minecraft-pygame/#filesInstallInstall withpip:pip install gym-minecraft-pygameOr, install from source:git clone https://github.com/whitemech/gym-minecraft-pygame.git
cd gym-minecraft-pygame
pip install .Developmentclone the repo:gitclonehttps://github.com/whitemech/gym-minecraft-pygame.gitcdgym-minecraft-pygameCreate/activate the virtual environment:pipenvshell--python=python3.7Install development dependencies:pipenvinstall--devTestsRun the tests withtox:toxCreditsThe code is largely inspired byRLGames
Package: gym-minesweeper
Gym MinesweeperGym Minesweeper is an environment for OpenAI Gym simulating a minesweeper game.Installationcdgym-minesweeper
pipinstall-e.Runningimportgymimportgym_minesweeperenv=gym.make("Minesweeper-v0")# 16x16 map with 40 minesenv.reset()done=Falsewhilenotdone:env.render()action=env.action_space.sample()obs,reward,done,info=env.step(action)env.close()
Package: gymnasdicts
gymnasdictsquery json dictsFree software: Apache Software License 2.0Documentation:https://gymnasdicts.readthedocs.io.Featuresgymnasdictsis a lightweight library for querying json compatible nested-dictionaries in Python.This package exposes one class with three functions that can be chained together so that they
follow a sql-like convention.QueryQueryis the entry point for the library, it is the data-type that
is acted on and returned by all other methods.selectselectidentifies and names the nested-keys in the json-objects to be used.
The first argument is the json object to be queried.
The remaining arguments are in the keyword-arg form where:the values are a restricted jsonpath, where no filtering is allowed.the keys are user-defined variables to which the values above are assigned.wherewherefilters the results of select by value. Its arguments are lambda functions
where the argument names correspond to the variables defined inselect.intointodefines the shape of the output. Its only argument is lambda function
where the argument names correspond to the variables defined inselect.examplefromgymnasdictsimportselectpayload={"sales":[{"id":1,"number":34,"date":"2020-01-04"},{"id":2,"number":12,"date":"2020-02-05"},{"id":3,"number":-4,"date":"2020-03-06"},],"prices":[{"id":1,"cost":{"value":0.98,"denomination":"pounds"}},{"id":2,"cost":{"value":34,"denomination":"pence"}},{"id":3,"cost":{"value":1.02,"denomination":"pounds"}},],"accounting":[{"denomination":"pounds","multiplier":1,},{"denomination":"pence","multiplier":0.01,}]}q=Query(payload)a=q.select(sales_id="$.sales[:].id",number="$.sales[:].number",price_id="$.prices[:].id",cost="$.prices[:].cost[:].value",denom_1="$.prices[:].cost[:].denomination",denom_2="$.accounting[:].denomination",multiplier="$.accounting[:].multiplier")w=s.where(lambdasales_id,price_id:sales_id==price_id,lambdanumber:number>0,lambdadenom_1,denom_2:denom_1==denom_2)i=w.into(lambdanumber,cost,multiplier:number*cost*multiplier)assertsum(i)==37.4FAQWhat about joins?selectis effectively a cartesian join on all supplied jsonpaths,
i.e.Query({...}).select(x="$Tbl[:].a",y="$Tbl[:].b",z="$Tbl[:].c")is equivalent toselectA.aasx,B.basy,C.caszfromTblasA,TblasB,TblasCso thatwherecan be used to do the job ofon.This is hideous, what about memory?!Generators take care of this.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Thanks tokclaureliefor useful discussion re: the relationship between select/where and keys/values.History0.1.0 (2020-07-28)First release on PyPI.
Package: gymnasium-notices
Gymnasium NoticesThis repository hosts notices for Gym that may be displayed on import on internet connected systems, in order to give notices if versions have major reproducibility issues, are very old and need to be upgraded (e.g. there's been issues with researchers using 4 year old versions of Gymnasium for no reason), or other similar issues. If you're using a current version of Gym and nothing extraordinary happens, you'll never see a message from this, but I want start including the option to prevent future issues. By pulling the error messages from a public git repository, there's absolute transparency and versioning in the process.
Package: gymnasium-quadruped
gymnasium-quadrupedGymnasium environment for training quadruped legged robotsGithub repository:https://github.com/dtch1997/gymnasium-quadruped/Documentationhttps://dtch1997.github.io/gymnasium-quadruped/Getting startedInstall the environment and the pre-commit hooks withmakeinstallLearningThis repository contains a simple PPO implementation inlearning/ppo.py, adapted fromCleanRL. This serves to benchmark the environment.Seelearning/README.mdfor details.ContributingWe welcome contributions; please refer to theguidelinesRepository initiated withfpgmaas/cookiecutter-poetry.
Package: gymnast
Gymnast: It’s not AcrobatPDF parser written in Python 3 (backport to 2.7 in the works). This was
designed to provide a Pythonic interface to access (and, eventually,
write) Adobe PDF files. Some of attributes have non-Pythonic
capitalization, but that is to match the underlying structure of the PDF
document (doing otherwise would get very confusing).UsageimportiofromgymnastimportPdfDocumentfromgymnast.rendererimportPdfBaseRendererclassPdfSimpleRenderer(PdfBaseRenderer):"""Simple renderer example that just extracts text with no processing"""def__init__(self,page):super().__init__(page)self._text=io.StringIO()def_render_text(self,text,new_state):self._text.write(self.active_font.decode_string(text))def_return(self):returnself._text.getvalue()fname='/path/to/file.pdf'pdf=PdfDocument(fname).parse()text=SimpleRenderer(pdf.Pages[-3]).render()TODO (in no particular order)Features and functionality[x] Rewrite the parser and document class to lazy-load the document
based on the xrefs table[x] Complete the base page renderer[ ] Page Rendering[x] Getting theBaseRendererclass working[x] Implement a proof of concept extractor that just dumps strings[ ] Get a bit fancier, assigning textblocks to lines and such[ ] Handle page numbering more fully[ ] Add a method toPdfDocumentto get a page by number[ ] Add propreties toPdfPagefor the page number (both as anintand a formattedstraccording toPdfDocument.Root.PageLabels['Nums'])[ ] Backport to Python 2.7 (about 80% done or so)[ ] Font stuff[x] Carve thePdfFontclass into an abstractPdfBaseFontand aPdfType1Fontimplementation[x]PdfFont.__new__will pick the correct subclass based on
the font’s Subtype element[x] PdfBasefFont class will also have an abstract method for the
glyph space to text space transformation[ ] Add subcless for Type3 fonts[x] Add subcless for TrueType fonts[ ] Add subcless for composite fonts[x] Add legacy support for the 14 standard fonts[ ] Font-to-unicode CMAPs[ ] Implement the remainingStreamFilters (will probably have
the image ones return aPIL.Image)[ ]RunLengthDecode[ ]CCITTFaxDecode[ ]JBIG2Decode[ ]DCTDecode[ ]JPXDecode[ ]Crypt[ ] Implement remaining object types[ ]ObjStm[x]XRef[ ]Filespec[ ]EmbeddedFile[ ]CollectionItem/CollectionSubitem[ ]XObject[ ] Handle document encryption[ ] Start on graphics stuff (maybe)[ ] Interactive forms (AcroForms)Administrative[ ] Write tests for existing code[x] Come up with a better name[ ] Document everything much, much better internally[ ] Package it up neatly and pypi it[ ] Write some proper documentation