Saravanan666/pypi-org huggingface dataset:
Package: gxscalc
GxscalcThis is a Python package for speed-based calculation of F-ZERO GX.RequirementsThis package requires pandas and matplotlib.
Also, speed data files created bymy AviUtl pluginare required as input.InstallationGxscalc is available on PyPI:$ python -m pip install gxscalcUsagefromgxscalcimportmtpmtp('./sample/sa70_on.txt','./sample/sa70_off.txt')#=> (1224.2514114466828, -2.465287050388536)gxscalc.mtp(on, off, *, std=5, rng=10, return_figure=False, with_frames=True)Calculate the approximated MT point from two speed data files of deceleration.
The accuracy compared toNaegleria's spreadsheetis within about 3 km/h.on: str | pandas.DataFrameFile path or DataFrame of speed data for deceleration while going on the accelerator.off: str | pandas.DataFrameFile path or DataFrame of speed data for deceleration while going off the accelerator.std: numericStandard deviation of gaussian window for moving average.rng: numericValues farther thanstd*rngwill not be used for moving average.return_figure: booleanIf this is true, mtp() returns figure of speed vs moving averaged acceleration graph as optional output.with_frames: booleanSet this false ifonandoffdon't have the frame column.returns: (float, float, [matplotlib.figure.Figure, matplotlib.axes.Axes])Returns the tuple of (MT point [km/h], Acceleration at MT point [km/h/f]). Ifreturn_figureisTrue, returns (MT point, Acceleration at MT point,Figureof the graph,Axesof the graph) instead. If no cross points are detected from the inputs, it returns (None,None) or (None,None,Figure,Axes) since the MT point can not be calculated.gxscalc.distance(file, fps=60)Calculate the approximated travelled distance of given speed data file via trapezoidal rule.
The unit of input speed is km/h and the unit of output length is m.file: str | pandas.DataFrameFile path or DataFrame of speed data to be calculated.fps: numericThe reciprocal of time between the adjacent speed values, in seconds.with_frames: booleanSet this false iffiledoesn't have the frame column.returns: floatReturns the travelled distance in meter.NoticeThe input speed data files are assumed to be created bymy AviUtl plugin.
The files should include frame numbers and separators should be spaces (default settings of the plugin).
'./sample/sa70_on.txt' and './sample/sa70_off.txt' are sample input files, which are data of Space Angler at 70%.If you have speed-only text file, call functions withwith_frames=False.
If you need some modification before calling gxscalc functions, you can send DataFrame objects instead of file paths of the speed data.ContributingBug reports and pull requests are welcome on GitHub athttps://github.com/cycloawaodorin/gxscalc.
Package: gy
Yet another .gitignore magician in your command line.☤ QuickstartGenerate .gitignore for certain language, e.g. Lua:$ gy generate luaMultiple languages, e.g. Python, Java, Lisp:$ gy generate python java lispTo update archive folder, simply run:$ gy updateList all supported languages:$ gy ls☤ InstallationYou can install “gy” via pip fromPyPI:$ pip install gy☤ Usage$ gy --help
Usage: gy [OPTIONS] COMMAND [ARGS]...

Yet another .gitignore magician in your command line.

Options:
  --help  Show this message and exit.

Commands:
  generate  generate .gitignore file
  ls        list all supported languages
  update    update archive folder
Package: gyakuhonyaku
gyakuhonyaku-module逆翻訳で面白い文を生成するものです。参考ラムダ技術部：【逆翻訳】支離滅裂な文章を効率的に生成するhttps://youtu.be/HBG4eHf5HxMpip install googletrans==4.0.0-rc1
Package: gyb
# gybA pip-installable version of Apple's gyb python-based templating tool. To install:pip install gybFor help (assuming that the pip installed binaries path is in your `PATH`):gyb -hTo use:gyb file.ext.gyb -o file.extFor details, see this great [blog post](https://nshipster.com/swift-gyb/).## Summary (from `gyb -h`)A GYB template consists of the following elements:- Literal text which is inserted directly into the output- `%%` or `$$` in literal text, which insert literal '%' and '$' symbols respectively.- Substitutions of the form `${<python-expression>}`. The Python expression is converted to a string and the result is inserted into the output.- Python code delimited by `%{...}%`. Typically used to inject definitions (functions, classes, variable bindings) into the evaluation context of the template. Common indentation is stripped, so you can add as much indentation to the beginning of this code as you like- Lines beginning with optional whitespace followed by a single '%' and Python code. %-lines allow you to nest other constructs inside them. To close a level of nesting, use the `%end` construct.- Lines beginning with optional whitespace and followed by a single '%' and the token "end", which close open constructs in %-lines.## Some examplesCreate implementations of all the math operators:```% for op,f in zip('+-*/', 'add sub mul div'.split()):public static func ${op}  (lhs:Self, rhs:Self  ) -> Self { return lhs.${f}( rhs) }% end```Define a variable:```%{ types = ('Float', 'Double') }%```
Package: gybe
GybeTranspile Kubernetes manifests with your simple values.yaml files using python type-hints.
Gybe is a simple, declarative, and more pythonic alternative tohelmthat makes it easier to develop modest kubernetes deployments.ReqiurementsPython 3.7+Gybe usespydanticfor type-hint
validation andclickfor the CLI.Installpip install gybeExampleCreate a simplevalues.yamlfile:image:python:3.9command:-python--m-http.serverCreate achart.pyfile:fromtypingimportListfromgybe.favorites.kubernetesimportPod,PodSpec,Containerimportgybedefcreate_standard_container(image:str,command:List[str]):returnContainer(image=image,command=command,name='standard-server')@gybe.transpilerdeftwo_pods(image:str,command:List[str],port:int=8080)->gybe.Manifest:pod_spec=PodSpec(containers=[create_standard_container(image=image,command=command)],ports=[dict(port=port)])return[Pod(kind='Pod',apiVersion='v1',metadata=dict(name='pod-1'),spec=pod_spec,),Pod(kind='Pod',apiVersion='v1',metadata=dict(name='pod-2'),spec=pod_spec,),]if__name__=='__main__':two_pods()Now run your transpiler with your values file:pythonchart.pyvalues.yamlapiVersion:v1kind:Podmetadata:name:pod-1spec:containers:-command:-python--m-http.serverimage:python:3.9name:standard-server---apiVersion:v1kind:Podmetadata:name:pod-2spec:containers:-command:-python--m-http.serverimage:python:3.9name:standard-serverIf you're feeling lucky, you can pipe that intokubectl:pythonchart.pyvalues.yaml|kubectlapply-f-pod/pod-1 created
pod/pod-2 createdkubectlgetpodsNAME    READY   STATUS    RESTARTS   AGE
pod-1   1/1     Running   0          5s
pod-2   1/1     Running   0          5spythonchart.pyvalues.yaml|kubectldelete-f-pod "pod-1" deleted
pod "pod-2" deleted
Package: gydo.py
gydo.pyA Python Library for interacting with Discord's APITable of ContentsExampleOthersContributingExampleimportgydoclient=gydo.Client("TOKEN")For now, It only logs the Information of your bot, and logs it in. After gydo.py Logs in to your bot, you should see your bot online. It also should log/print something to your console if someone chats to a server, and your bot is in it.Othersgydo.pyis currently on it's beta stages, so expect it to have some bugs, or if something is incomplete.Report bugs on ourGithub RepositoryContributingTo contribute on gydo.py you can make pull request on ourGithub Repository...and Thanks for contributing!
Package: gy-erp-sdk-core
# gy-erp-sdk-core## Introduction
针对管易云erp系统，相关接口对接，单独打成一个三方包，方便使用。## Method
- 订单查询（gy.erp.trade.get）
- 订单新增（gy.erp.trade.add）
- 订单退款状态修改（gy.erp.trade.refund.update）## Remark
* 目前根据业务需求，只需要trade和item，所以只加入了这两个，有需求后面在加。## Require
* python version 3.0 and greater
Package: gyg-reader
GygReaderA tool for suppliers on the the GetYourGuide platform to retrieve booking details.
Ideal to automize the processing of GetYourGuide bookings.What it doesUnfortunatly GetYourGuide does not provide webhooks or an API for suppliers to retrieve details from bookings. This can be a problem if GetYourGuide orders need to be processed automatically or registered in your own application/backend.However an email is sent to the supplier for each booking with the GetYourGuide booking number in the subject. Using services like Zapier or inbound email parsing of Mailgun or SendGrid a webhook can be send to an endpoint retrieving the subject of the GetYourGuide booking email.
After parsing the GetYourGuide order number from the subject theGygReadercan be used to retrieve the order details and further process the information.
For example in Django retrieving the GetYourGuide order number from a SendGrid webhook can look like this:def endpoint_for_webhook(request):
  subject = request.data["subject"]
  re.search('(GYG)(\d+)',subject).group(0)How to install and useTo install run:pip install gyg_readerExample use:from gyg_reader import GygReader


gygreader = GygReader("your@email.com", "your_password")
booking = gygreader.get_booking("GYG11111111")Where GYG11111111 is a GetYourGuide booking number, which can be retrieved like in the example above from the email subject.bookingcontains following dictionary:{'customer_email': 'die@hard.com',
 'customer_name': 'John Mcclane',
 'customer_phone': '+1 202-456-1111',
 'Tour in NYC',
 'amount': '1'}The full response containing the full booking data can be access following:gygreader.response.json()Requirementsrequestslxml
Package: gym-2048
This package implements the classic grid game 2048
for OpenAI gym environment.Installpipinstallgym-2048Environment(s)The package currently contains two environmentsTiny2048-v0: A2 x 2grid game.2048-v0: The standard4 x 4grid game.AttributesObservation: All observations aren x nnumpy arrays
representing the grid. The array is0for empty locations
and numbered2, 4, 8, ...wherever the tiles are placed.Actions: There are four actions defined by integers.LEFT = 0UP = 1RIGHT = 2DOWN = 3Reward: Reward is the total score obtained by merging any
potential tiles for a given action. Score obtained by merging
two tiles is simply the sum of values of those two tiles.RenderingCurrently only basic print rendering (mode='human') is supported.
Graphic rendering support is coming soon.UsageHere is a sample rollout of the game which follows the same API as
OpenAIgym.Env.importgym_2048importgymif__name__=='__main__':env=gym.make('2048-v0')env.seed(42)env.reset()env.render()done=Falsemoves=0whilenotdone:action=env.np_random.choice(range(4),1).item()next_state,reward,done,info=env.step(action)moves+=1print('Next Action: "{}"\n\nReward:{}'.format(gym_2048.Base2048Env.ACTION_STRING[action],reward))env.render()print('\nTotal Moves:{}'.format(moves))NOTE: Top levelimport gym_2048is needed to ensure registration withGym.
Package: gym-2048-extended
This package implements the classic grid game 2048
for OpenAI gym environment.Summarizing my changes to the repoActivated Geek Gym 2048:changed the requirements.txt to be more flexibleadded the methodis_action_possibleadded different reward schemesadded the render modedictaddedgame.pya PyGame that uses the GymEnvironment from this repoInstallPippipinstallgym-2048-extendedFrom cloned repositorypythonsetup.pyinstallEnvironment(s)The package currently contains two environmentsTiny2048-v0: A2 x 2grid game.2048-v0: The standard4 x 4grid game.I only checked the4 x 4grid game, the other one might not work.AttributesObservation: All observations aren x nnumpy arrays
representing the grid. The array is0for empty locations
and numbered2, 4, 8, ...wherever the tiles are placed.Actions: There are four actions defined by integers.LEFT = 0UP = 1RIGHT = 2DOWN = 3Reward: Reward is the total score obtained by merging any
potential tiles for a given action. Score obtained by merging
two tiles is simply the sum of values of those two tiles.RenderingCurrently 2 rendering modes are implementedbasic print rendering (mode='human')dict rendering (mode='dict') returns a dictionary with the board stateUsagePyGame Interactive Demogame.pyprovides a PyGame implementation of the game.
Use the arrow keys to play,qandncan be used to quit the game or restart it.The game serves as a demo, the different reward schemes and step function can be explored.pythongym_2048/game.pyBasic DemoHere is a sample rollout of the game which follows the same API as
OpenAIgym.Env.importgym_2048importgymif__name__=='__main__':env=gym.make('2048-extended-v2')env.seed(42)env.reset()env.render()done=Falsemoves=0whilenotdone:action=env.np_random.choice(range(4),1).item()next_state,reward,done,_,info=env.step(action)moves+=1print('Next Action: "{}"\n\nReward:{}'.format(gym_2048.Base2048Env.ACTION_STRING[action],reward))env.render()print('\nTotal Moves:{}'.format(moves))NOTE: Top levelimport gym_2048is needed to ensure registration withGym.
Package: gym-adserver
gym-adservergym-adserveris anOpenAI Gymenvironment for reinforcement learning-based online advertising algorithms.gym-adserveris now one of theofficial OpenAI environments.TheAdServerenvironment implements a typicalmulti-armed bandit scenariowhere anad serveragent must select the best advertisement (ad) to be displayed in a web page.Each time an ad is selected, it is counted as oneimpression. A displayed ad can be clicked (reward =1) or not (reward =0), depending on the interest of the user The agent must maximize the overallclick-through rate.OpenAI Environment AttributesAttributeValueNotesAction SpaceDiscrete(n)n is the number of ads to choose fromObservation SpaceBox(0, +inf, (2, n))Number of impressions and clicks for each adActions[0...n]Index of the selected adRewards0, 11 = clicked, 0 = not clickedRender Modes'human'Displays the agent's performance graphicallyInstallationYou can download the source code and install the dependencies with:gitclonehttps://github.com/falox/gym-adservercdgym-adserver
pipinstall-e.Alternatively, you can installgym-adserveras apip package:pipinstallgym-adserverBasic UsageYou can test the environment by running one of the built-in agents:pythongym_adserver/agents/ucb1_agent.py--num_ads10--impressions10000Or comparing multiple agents (defined in compare_agents.py):pythongym_adserver/wrappers/compare_agents.py--num_ads10--impressions10000The environent will generate 10 (num_ads) ads with different performance rates and the agent, without prior knowledge, will learn to select the most performant ones. The simulation will last 10000 iterations (impressions).A window will open and show the agent's performance and the environment's state:The overall CTR increases over time as the agent learns what the best actions are.During the initialization, the environment assigns to each ad a "Probability" to be clicked. Such a probability is known by the environment only and will be used to draw the rewards during the simulation. The "Actual CTR" is the CTR actually occurred during the simulation: with time, it approximates the probability.The effective agent will give most impressions to the most performant ads.Built-in AgentsThegym_adserver/agentsdirectory contains a collection of agents implementing the following strategies:Randomepsilon-GreedySoftmaxUCB1Each agent has different parameters to adjust and optimize its performance.You can use the built-in agents as a starting point to implement your own algorithm.Unit TestsYou can run the unit test for the environment with:pytest-vNext StepsExtend AdServer with the concepts ofbudgetandbidExtend AdServer to change the ad performance over time (currently the CTR is constant)ImplementQ-learningagentsImplement a meta-agent that exploits multiple sub-agents with different algorithmsImplement epsilon-Greedy variants
Package: gym-algorithmic
gym-algorithmicEnvironmentsAlgorithmic EnvironmentsCopy-v0DuplicatedInput-v0RepeatCopy-v0Reverse-v0ReversedAddition-v0ReversedAddition3-v0Documentation credit:https://github.com/openai/gym/pull/2334Usage$ pip install gym-algorithmic

import gym
import gym_algorithmic

gym.make("Copy-v0")CitationThis repository contains the algorithmic environments previously present in OpenAI Gym prior to Gym version 0.19.0.
These environments were introduced in the paperLearning Simple Algorithms from Examples@inproceedings{Zaremba2016LearningSA,
  title={Learning Simple Algorithms from Examples},
  author={Wojciech Zaremba and Tomas Mikolov and Armand Joulin and R. Fergus},
  booktitle={ICML},
  year={2016}
}
Package: gymbag
Gymbag is a Python 3 library for easy, efficient, single-file storage ofOpenAI Gymreinforcement learning environment data. It stores observations, actions, and rewards in portable, compressedHDF5files.  You can easily playback
the data for training or testing, or read it in for analysis.Gymbag automatically appends to existing files, so you can easily accumulate all your training data in one place.
You can also store multiple data sets from separate experiments or environments in the same file, along with
descriptions to keep them straight.  You can store arbitrary metadata with each step (in theinfodict).
Gymbag does not store rendered output (movies).  It’s also easy to add other storage formats.Recording# Wrap env with HDF5 recorder, specifying filenameenv=record_hdf5(gym.make('CartPole-v0'),'cartpole.h5')forepisodeinrange(2):env.reset()done=Falsewhilenotdone:obs,reward,done,info=env.step(env.action_space.sample())ReadingReading the data back is just as easy:forepisodeinHDF5Reader('cartpole.h5'):fortime,obs,action,reward,done,infoinepisode:print(time,obs,action,reward,done,info)1500617412.784789 [ 0.03698143  0.01418633  0.01207788  0.00391994] 0.0 nan False None
1500617412.78494 [ 0.03726516 -0.18110673  0.01215627  0.30038899] 0.0 1.0 False None
1500617412.784968 [ 0.03364302  0.01383986  0.01816405  0.01156456] 1.0 1.0 False None
1500617412.784994 [ 0.03391982  0.20869666  0.01839535 -0.27533251] 1.0 1.0 False None
1500617412.785022 [ 0.03809375  0.01331716  0.0128887   0.02309511] 0.0 1.0 False None
...Playbackenv=PlaybackEnv(HDF5Reader('cartpole.h5'))whilenotenv.played_out:env.reset()done=Falsewhilenotdone:obs,reward,done,info=env.step(env.action_space.sample())print(obs,reward,done,info)PerformanceTypically wrapping an environment with Gymbag results in less than a 2X slowdown.
Here is a comparison togym_recording(which dumps data as uncompressed binary blobs):EnvironmentTime (s)Space (MB)unwrappedgym_recordinggymbag.hdf5gym_recordinggymbag.hdf5Cartpole-v00.38 (1X)0.63  (1.7X)0.64 (1.7X)1.6  (3.2X)0.5  (1X)Breakout-v01.72 (1X)2.20  (1.3X)3.34 (1.9X)223  (74X)3  (1X)ExtrasAlso comes with tools for recording to memory, generating test data, comparing data between runs, converting saved data formats, and more.DocumentationGitLab RepoDocumentation:Examples|APIGymbag is open-source licensed under the LGPL 3.0.
Package: gym-banana
This repository contains a PIP package which is an OpenAI environment for
simulating an enironment in which bananas get sold.InstallationInstall theOpenAI gym.Then install this package viapip install -e .Usageimport gym
import gym_banana

env = gym.make('Banana-v0')Seehttps://github.com/matthiasplappert/keras-rl/tree/master/examplesfor some
examples.The EnvironmentImagine you are selling bananas. One at a time. And the bananas get bad pretty
quickly. Let's say in 3 days. The probability that I will sell the banana
is given by$$p(x) = (1+e)/(1. + e^(x+1))$$where x-1 is my profit. This x-1 is my reward. If I don't sell the
banana, the agent gets a reward of -1 (the price of the banana).
Package: gym-bandits
Gym BanditsA multi-armed bandits environment for OpenAI gym.Installation instructionsRequirements: gym and numpypip install gym-banditsUsageimport gym
import gym_bandits

env = gym.make('MultiArmedBandits-v0') # 10-armed bandit
env = gym.make('MultiArmedBandits-v0', nr_arms=15) # 15-armed bandit
Package: gym-blocksudoku
OverviewThe BlockSudoku environment is for use withOpenAI Gym. Yoiu can find more details about the implementation fromthis webpage.Block Sudoku is a game arranged like a traditional Sudoku board, and each "round", you place 3 tetris-like blocks on the board. They can be anywhere on the board as long as they don't collide with an existing piece on the board. An example is below:But unlike Tetris, you cannot rotate the blocks. You gain points by clearing the blocks off the board. You can clear blocks either filling up a row, column, or one of the 3x3 squares. All of the following arrangements below are valid for clearing a line or block of blocks.The game ends when you cannot place all three of the blocks you were given that round such as being left with the T-block on the board below :States / ActionsComing soon!InstallationInstalling from PyPIpip install gym-blocksudokuInstalling from Sourcegit clone https://github.com/drakeor/gym-blocksudoku
cd gym-blocksudoku
pip install -e .
Package: gym-breakout-pygame
gym-breakout-pygameGym Breakout environment using Pygame.InstallInstall withpip:pip3 install gym_breakout_pygameOr, install from source:git clone https://github.com/whitemech/gym-breakout-pygame.git
cd gym-breakout-pygame
pip install .Developmentclone the repo:git clone https://github.com/whitemech/gym-breakout-pygame.git
  cd gym-breakout-pygameCreate/activate the virtual environment (using Poetry):poetry shell
  poetry installRun a short demo:python gym_breakout_pygame --random --recordCheck for an.mp4file invideos/. You should get:Enable fire:python gym_breakout_pygame --fireTestsTo run tests:toxTo run only the code tests:tox -e py3.10To run only the linters:tox -e flake8tox -e mypytox -e black-checktox -e isort-checkPlease look at thetox.inifile for the full list of supported commands.DocsTo build the docs:mkdocs buildTo view documentation in a browser:mkdocs serveand then go tohttp://localhost:8000Licensegym-breakout-pygame is released under the GNU General Public License v3.0 or later (GPLv3+).Copyright 2019-2022 Marco Favorito, Luca IocchiAuthorsMarco FavoritoLuca IocchiThe code is largely inspired byRLGames