Saravanan666/pypi-org huggingface dataset:
Package: gambit-bromine
Bromine: pythonic web testingBromine is a wrapper aroundseleniumto allow writing testing in a terse andpythonicrather thatjava-esqueway.Selenium is cool: you register browser to a hub, you ask browsers from a hub,
you use the browser, and you put it back. It works like magic.Except if you want to use https. But who needs https these days?Anyway, enough dissing well intentioned web testing systems. Let's talk bad
about bad testing system. You know what you have to do to wait for a page to
load after a get, and then check if an element is visible? The selenium docswill tell you:fromselenium.webdriver.common.byimportByfromselenium.webdriver.support.uiimportWebDriverWaitfromselenium.webdriver.supportimportexpected_conditionsasEC# ...driver.get("http://example.com")element=WebDriverWait(driver,10).until(EC.presence_of_element_located((By.ID,"myDynamicElement")))I've been kind and I've stripped some boilerplate. If you are happy about
importing three objects from 4 levels of namespaces and create a wait object
and pass a 2-element tuple to the "convenience method"selenium.webdriver.support.expected_conditions.visibility_of_element_locatedfor a thing you have to do pretty much every time you click on a link, please
stop reading here: typepip install seleniumand off you go. The following
paragraph is only for people who think the above is unsatisfactory in Python.Still reading? Sure?Well, I'll be honest: what I prefer to do is:importbrominebrowser=bromine.Browser(driver)element=browser.get("http://example.com/").wait(id='myDynamicElement')
Package: gambit-disambig
gambitgambitis an Open Source name disambiguation tool for version control systems.Download and installationgambitis purepythoncode. It has no platform-specific dependencies and thus works on all
platforms. Assuming you are usingpip, you can install latest version ofgambitby running:> pip install gambit-disambigThis also installs the necessary dependencies.gambitdepends on thepython-Levenshteinpackage to compute Levenshtein distances for edited lines of code. On sytems running Windows, automatically compiling this C based module might fail during installation. In this case, unofficial Windows binaries can be foundhere, which might help you get started.How to use gambitAfter installation, we suggest to check out ourtutorial, detailing how to get started usinggambit. We also provide detailed inline documentation serving as reference.We have published some motivating results as well as details on the disambiguation algorithm and its hyperparameters in"gambit – An Open Source Name Disambiguation Tool for Version Control Systems". An earlier version of gambit used to obtain the results shown in our paper is archived onzenodo.org.
Due to GDPR, we cannot publish the manually disambiguated ground-truth data on zenodo. However, if you require this data for research purposes or replication of our results please feel free to contact us directly.All functions ofgambithave been tested on Ubuntu, Mac OS, and Windows.How to cite gambit@misc{gote2021gambit,
      title={gambit -- An Open Source Name Disambiguation Tool for Version Control Systems}, 
      author={Christoph Gote and Christian Zingg},
      year={2021},
      eprint={2103.05666},
      archivePrefix={arXiv},
      primaryClass={cs.SE}
}LicenseThis software is licensed under the GNU Affero General Public License v3 (AGPL-3.0).
Package: gamble
gambleis a simple library that implements a collection of some
common gambling-related classesFeaturesdie, dice, d-notationcards, decks, handspoker ranks, hand comparisonUsageInstallationpipinstallgambleBasic UsageDiceimportgamble# create dice, defaults to 2 6-sided dicedice=gamble.Dice()# rolldice.roll()>>>6dice.rolls>>>1# max, mindice.max>>>12dice.min>>>2# d-notation for dice constructordice=gamble.Dice('d20+8')# max, mindice.max>>>28dice.min>>>9# partsdice.parts>>>[<d20Die>,8]# roll_manydice.roll_many(2)>>>[8,4]# max_of, min_ofdice.max_of(3)>>>(11,[7,3,11])dice.min_of(3)>>>(2,[2,9,4])Cardsimportgamble# create a deck, defaults to the standard 52 card deck, no jokers# the deck will be shuffled by default, unless you pass shuffle=Falsedeck=gamble.Deck()deck.cards_left>>>52deck.top>>><Card:7♠>deck.bottom>>><Card:9♠>deck.shuffle()# you can also pass times=(int) to shuffle more than oncecard=deck.draw()# you can also pass times=(int) to draw a list of cards>>><Card:A♠># the unicode cards icons are implemented as well!card.unicode>>>"🂡"# draw a poker hand, default size 5hand=deck.draw_hand().# you can pass size=(int) to draw a different size hand>>><Hand[5](straightflush)[A♠,2♠,3♠,4♠,5♠]>hand.rank>>>Rank(name='straight flush',value=8)# arbitrary hand, from text notationnew_hand=gamble.Hand.get("2c,3c,4c,Kc,Kh")>>><Hand[5](pair)[2♣,3♣,4♣,K♣,K♥]>new_hand.rank>>>Rank(name='pair',value=1)hand>new_hand>>>TrueTodohand equals/ge/le methodhand ranking when hands are very similar
Package: gambling
Gambling Python Package####A project to create the necessary tools for gambling, such as cards and diceAuthorCJ SteinVersion1.0.0.dev2Python VersionOnly Tested on Python 3Currently supports creation of:DiceCards
##Installation
pip install gambling
##Usage
###DiceInput for Dice:
Numbers shown are the defaultnum=1         # This is the number of dice to usesides=6       # This is the number of sides on each diceFor 5 6-sided dice for something such as Yahtzee here would be the command:from gambling import Dice
dice = Dice(num=5)For one 20 sided dice for something like D&D:from gambling import Dice
dice = Dice(sides=20)For 3 20 sided dice:from gambling import Dice
dice = Dice(num=3, sides=20)Methods for Dice:dice.roll()   # This causes the list under the Dice.values to simulate a new roll.
dice.values  # This will show the list of the values on the dice. The list is equal in length to the number of dice
# ouput example: [1, 2, 3, 4, 5]###CardsThere are two objects in the Cards package:CardDeckA Deck builds a list of Card objects.  Cards rank and suits can be called, along with value if needed for arithmetic needs such as blackjack or war.
The input needed for a card is a single letter rank as a string and a single letter suit.Some things you can get from card:from gambling import Card, Deck
AceOfSpades = Card('A','S')
TenOfHearts = Card('10','H')
TenOfHearts.rank  # This will return 10
TenOfHearts.suit  # This will return 'H'
AceOfSpades.rank  # This will return 'A'
AceOfSpades.value # This will return 14, 'J' : 11, 'Q':12, 'K':13, 'A':14Making cards by themselves isn't very useful, but making decks will be useful and you can use the Card object to get a value
There is one optional input for Deck:num = 1  #  It defaults to using one deck, but you can change that to multiple decks if needed for something like blackjackPokerDeck = Deck()
PokerDeck.order  # This returns a new deck with the cards in order
PokerDeck.shuffle()  # This shuffles the deck to randomize the order
next(PokerDeck)  # This calls the next card in the deck, the deck can be used as an iterator as such
Package: gamda
gamda: GPU-Accelerated Molecular Dynamics Analysisgamda, a python library which utilizes the CUDA-enable GPU to accelerate the analysis of molecular dynamics (MD)Dependencycupycupy is the backend of the CUDA kernels for analysisMDAnalysisMDAnalysis is used to handle the reading of MD trajectories and the selection of atomsInstallationfrom pypipip install gamdafrom giteegit clone https://gitee.com/gao_hyp_xyj_admin/gamda.git
cd gamda
pip install .Unittestgit clone https://gitee.com/gao_hyp_xyj_admin/gamda.git
cd gamda
cd unittest
python -m unittestUsageA simple exampe:# Here, we create a xyz file as an example
with open("test.xyz", "w") as f:
    f.write("3\n3\nO 1.11 2.22 3.33\nH 3.33 2.22 1.11\nH 2.22 2.22 2.22")

# Import the package
import gamda
import numpy as np

# Import the desired observable
from gamda.observable import PositionZ

# Import the disired analyzer
from gamda.analyzer import Histogrammer

# gamda.Universe is a subclass of MDAnalysis.Universe
u = gamda.Universe("test.xyz")

# Get your AtomGroup in host (CPU)
ag = u.select_atoms("element H")

# Get your AtomGroup in device (GPU)
dag = u.get_dag("atom", ag)

# Initialize your observable
z = PositionZ("z", dag, gamda.Argument("z", np.float32(0)))

# Initialize your analyzer and add it to the universe
zdf = Histogrammer("zdf", 0, 4, 4, z)
u.add_analyzer(zdf)

# Print the source code
print(u.source_code)

# Run
u.run()

# Free the memory
u.free()
del u

# Normalize the result and save
zdf.normalize()
zdf.save("test_zdf.txt")Referencecupyhttps://github.com/cupy/cupyMDAnalysisN. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. J. Comput. Chem. 32 (2011), 2319–2327. doi:10.1002/jcc.21787R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis: A Python package for the rapid analysis of molecular dynamics simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th Python in Science Conference, pages 98-105, Austin, TX, 2016. SciPy. doi:10.25080/Majora-629e541a-00e
Package: game24
A console application to play the 24 Game (see theWikipedia articlefor introduction)Installation$pipinstallgame24Or$pythonsetup.pyinstallUsagePlay the game$24gameconsoleCheck solutions for a hand of cards$24gameconsole<integer1><integer2><integer3><integer4>Check result for an expression (a simple calculator)$24gameconsole'expression'TODOAdd Python3 support.Add test cases.LicenseCopyright 2015 benhengxLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: gameai-frame
基于神经网络和遗传算法的游戏AI框架，可以用于多种游戏(大概)示例:https://github.com/Iyrian/GameAI-Frame-依赖: numpy, tkinterPython版本: Python 3.6内容说明GameRole.py : 声明了运用该AI框架的游戏所必须提供的数据和重载的函数Matrix.py, NeuroNetwork.py, Population.py : 神经网络 + 遗传算法的实现。如果不是要改进算法，可以不用管它们global_vars.py : 提供了神经网络和遗传算法的参数，将算法绑定到特定游戏时要适当修改这些参数如何将AI框架绑定到特定游戏示例中展示了如何将贪吃蛇游戏绑定到框架当然绑定不一定要知道游戏内部数据，只要有方法在GameRole.look()中获得神经网络的输入就可设定GameRole.look()的几种方法动作类游戏及从游戏画面获取信息，操作游戏角色做动作的游戏，gameai_frame也是基于这种游戏构建的。对于这种游戏，可以用角色的视野作为神经网络的输入。比如对于贪吃蛇来言，可以用从蛇头射出的八方向的射线扫描游戏场景，获得蛇的视野数组。而神经网络的输出，可以传到一个或者几个分类器(比如if…else…)从而获得游戏角色操作的输入神经网络输入的元素顺序以及对输出值的处理是随意的，因为神经网络会被训练，最终总能得到适应的结果GameRole.calculate_fitness()计算当前个体的适应度，是决定神经网络训练效果效率的重要因素。绑定游戏时，一定要选择适当的适应性函数。在选择适应性函数时，将希望出现的游戏角色表现设定较大的适应性，比如对于贪吃蛇来言，适应性与蛇吃到的食物数正相关；对于PyMario来言，适应性与Mario的得分以及Mario向右移动的距离正相关。当然，除此之外，适应性还需要一些次要因素修饰，比如个体存活时间之类棋牌策略类游戏这类游戏的规则比动作类复杂，很多时候，出于对全局的考虑，同样的情况下出牌可能不同。这时，神经网络的输入就不能只有从游戏场景获取的信息，还要增加自身的状态。神经网络输出还是由分类器转换为游戏操作输入
Package: gameanalysis
Game Analysis[![build](https://github.com/egtaonline/gameanalysis/workflows/build/badge.svg)](https://github.com/egtaonline/gameanalysis/actions)This is a collection of python libraries and scripts that manipulate empirical game data.Usage SetupThis package is hosted on pypi. Install it withpip install gameanalysis.The entry point from the command line isga.ga –helpwill document all
available options.The entry point for python isgameanalysis. See the documentation for what is
available from the python interface.DevelopingAfter cloning this repository, the includedMakefileincludes all the relevant actions to facilitate development.
Typingmakewithout targets will print out the various actions to help development.
Typemake setupto configure a virtual environment for development.RequirementsPython 3 & venvBLAS/LAPACKA fortran compilerTestingAll of the tests can be run withmake test.
Runningmake checkwill search for style compliance, andmake formatwill try to fix some in places.make docswill make the documentation.
Package: gameart
GameArtCreate printable art with the movement of your mouse.Explore the source code »View Readme·Report Bug·Request FeatureTable of ContentsGetting StartedPrerequisitesInstallationUsageEnhancementContributingLicenseContactGetting StartedGameArt is still work in progress. Currently it is possible to create a png-file with matplotlib from the recorded mouse movement using pynput. The "Art" aspect is currently missing, but I will work on that.These package versions are available:gameart: This version is targeting the end user version with the possibility to record your mouse movement, save it as a csv and draw a png based on csv input.gameart[dev]: This version has additional dev packages to be able to contribute to this project.gameart[release]: This version has additional build packages to generate a package and upload to PyPi.PrerequisitesSupported python versions: Python 3.10, 3.11, 3.12Upgrade pippipinstall--upgradepipIt is recommended to use the package inside a virtual environment.Create virtual environmentpython-mvenvenvActivate virtual environment - Linuxsourceenv/bin/activateActivate virtual environment - Windowsenv/Scripts/activateInstallationExecutable:Download latest executable from here:https://github.com/AndManGames/GameArt/releases(Windows:gameart.exe; Linux:gameart)Important: It could be that your browser and/or Windows defender is flagging the executable as malicious. This comes from pyinstaller and I am working on fixing that. You can be sure that the executables are safe!From GitHub:Clone the repogitclonehttps://github.com/AndManGames/GameArt.gitInstall gameart packages from git root pathpipinstall.From PyPi:pipinstallgameart(back to top)UsageIf you have downloaded the executable:Double clickgameartexecutable file and the GUI will open.If you have cloned from github or installed from PyPi:Start GUI from terminal/command line:gameartstart_guiUse command line interface (CLI):Start recording of your mouse movement:gameartrecordGenerate image from your mouse recording:gameartdraw--csv_file_pathpath/to/csv/fileHint:Stop the recordingby pressing theRight Mouse Button(back to top)EnhancementSee theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue.
Don't forget to give the project a star! Thanks again!For contributing please use the dev setup of this package:pipinstall.[dev](back to top)LicenseDistributed under the MIT License. SeeLICENSEfor more information.(back to top)ContactAndreas Schneider -programmerhumor22@gmail.comProject Link:https://github.com/AndManGames/GameArt(back to top)
Package: game-bot-helper
Welcome to Game Bot Helper!Hi! I like to create Bots for some of the games I play. At least some tasks which are repetitive. This includes almost all mobile games :P
After creating several bots I refined some of my techniques for that and mostly ending up with the same basic structure around the actual botting part.
Since this wrapper does not change at all, I decided to publish this Helper to remove the Boilerplate Code I used to copy&paste from a past project.HighlightsUse Threading under the hood, so you can run multiple methods or bots at onceKill-Switch: Can stop every bot action with one button (if the bot os controlling your mouse this is a lifesaver in case of misbehaviour)Easy image recognition to click or find specific parts on the screenSetupThe class you need to use is called GameBotHelper.
Before that, you should edit the config.toml file to set the screen values to match your current game screen (not your display resolution).
You can also use the change_screen(self, x1, y1, x2, y2, x_mid, y_mid) function, to do so, but this will only change those values for the current instance of the Helper of course.
You should do so in either way, because the bigger the screen, the longer the image recognition will take.FunctionalityThis Helper will start a keyboard listener, so while running you can only press the keys you defined. All other keys will be ignored.
The default Kill-Switch is the "End" key. You can change this with the change_kill_switch(self, key) function.ContributionsI made this one open-source, you can contribute on GitHub, if you find a bug or have some additional features in mind.Closing wordsI hope this little helper will help you in creating your own bots.
If you like my work, feel free tobuy me a coffee
Package: gameboy-python
Game Boy in PythonA Game Boy emulator implemented with pure Python (abbr.GBP). GBP is a very simple implement and is able to run some of the GameBoy games (e.g., Dr. Mario). GBP has also passed the blargg's CPU instruction tests.However, due to its simplicity and Python's performance bottleneck, the frame rate is usually only 3 or 4 (tested on the Apple M1 pro silicon).Feature not implemented:Cartridge MBCs.Audio.Game Boy Color / Super Game Boy functionalities.Bootstrap and so on.Usagegameboy[-h][--debug]gameromgamerom: Path to the game ROM file.-h--help: Show the help message and exit.--debug: Enable debugging mode.Referencesgbdev/pandocsgbdev/rgbdsBaekalfen/PyBoyrockytriton/LLD_gbemu
Package: gamecam-sdrabing
gamecamFilter out trail-camera images that don't contain an animal (eventually will be able to label exported images as well).MotivationWhile working for theFrancis Ecology Lab, a problem was presented to me. In 2018, there were 800,000+ remote camera images collected for a single experiment. The majority turned out to be false triggers - photos of grass and bushes swaying.Instead of going through them one by one, I developed this program. Once coded, it only took a week to generate a data table with all the images that contained animals, labeled to genus or species, and that had detection numbers corresponding to one of two common schemes. The data table can be converted into observational units of detections instead of individual images.InstallationUse the package managerpipto install gamecam.pipinstallgamecam-sdrabingUsagefromgamecamimportpyrcolateaspyr# creates data table from folderjpg_data=pyr.construct_jpg_data(pyr.input_directory())# Cam objects store all relevant metadatacam=pyr.Cam(jpg_data)help(Cam.plot)# shows quick-guide for key bindingscam.plot()# interactive plot for image filteringcam.save(pyr.input_filename())# creates a .sav file that can be loadedcam.export(pyr.input_directory())# exports images and a .csv file to folderTo-DoFinish gamecam.classipy, which will allow for rapid labeling of exported images.ContributingThis is my first project, so I have no idea what I'm doing.
If you have suggestions or tips, please tell me!LicenseMIT© Shane Drabing 2019
Package: game-core-integrations
GameCore Integrations LibraryThis is the library responsible for GameCore integrations.Async code is used whenever possible, with synchronous code being "converted" and run in the main loop thread.While closely related to GameCore needs, this library can be used on it's own to support different services.Most integrations are based on third-party open source libraries, so you may prefer to use these instead.GameCore Integrations LibraryIntegrationsIntegrationsIntegrations are what power GameCore's search, playtime queries, user libraries, etc.We have plans to support and integrate the following services:IGDBThis is our main search provider.
Developed in-house.HowLongToBeatFor playtime related information.SteamIntegration for populating user libraries with Steam games and achievements.PSNIntegration for populating user libraries with PSN games and achievements.Powered by thepsnawpPython library.Xbox LiveIntegration for populating user libraries with Xbox Live games and achievements
Package: game-coro
game_coroCoroutines for games. Write logic as a python generator, then tick it every
frame. Useyieldto pause till the next frame, or use helpers to pause a given
number of frames or seconds.This library is currently experimental: no tests, few docs.  For usage, check
out the example:example/example.pyRun the example by cloning this repository, then:python-mexample.exampleDesign, BehaviorCoroutines should not expect raised exceptions to be swallowed.Just like any other call, exceptions will crash the game.Coroutines can wrap themselves in try-finally to implement cleanup logic.Coroutines should useyield fromto delegate to another generator function.When a coroutine is stopped, generator.close()is called.  This follows
standard python rules, where aGeneratorExitis raised within the generator.When coroutine A yields to coroutine B, the return value of B is passed to A.
Any raised exception from B is raised in A.  Just like a normal call stack.When implementing a state machine, back-and-forthyield from other_state()will eventually fill up the call stack, crashing the game.  Instead,return other_state().returnwill close the current generator function, and the coroutine manager
will detect that you've returned another generator and start iterating it.
This only works when returning from your top-level generator.  If in a nested
generator call, usetrampoline():yield from trampoline(other_state())Tips and Tricksreturn(yield fromself.other())Allowsself.other()to return a value, which will be returned through
Can trampoline from it.
Package: gamedatacrunch
gdc: an API for GameDataCrunchThis repository contains Python code to download data throughGameDataCrunch API.InstallationThe code is packaged forPyPI, so that the installation consists in running:pipinstallgamedatacrunchUsageLoad dataData is locally cached todata/%Y%m%d_gamedatacrunch.jsonfor offline reuse.importgamedatacrunchasgdcdata=gdc.load()Load a list of appIDsFor a list of appIDs (int), without the matching app names:importgamedatacrunchasgdcapp_ids=gdc.load_app_ids()Retro-compatibility: Steam APIFor retro-compatibility, the output is formatted as withSteam API:importgamedatacrunchasgdcdata=gdc.load_as_steam_api()Retro-compatibility: SteamSpy APIFor retro-compatibility, the output is formatted as withSteamSpy API:importgamedatacrunchasgdcdata=gdc.load_as_steamspy_api()