Saravanan666/pypi-org huggingface dataset:
Package: battlemetrics
Battlemetrics API WrapperThis repository allows users to quickly and easily pull data from the Battlemetrics API. Removing a lot of the guesswork when reading the API.AlternativesJavascriptFor the javascript equivalent, visit this repository:https://github.com/cubiquitous/battlemetrics-jsDisclaimerPlease note that I am an individual member of the community and not affiliated with Battlemetrics. The resources provided here are developed to facilitate the usage of the Battlemetrics API but come with no official endorsement or sponsorship from Battlemetrics.It's important to understand that any actions you take using these resources are solely your responsibility. I am not liable for any damage or consequences that may occur to your server or account. Please exercise caution and ensure that you follow best practices when using the API.Getting StartedTo begin using the Battlemetrics API, make sure you have RCON access and an API token. If you don't have an API token yet, you can obtain one by visiting theBattlemetrics developers page.InstallationClone or Install this repo:Clone this repositorygitclonehttps://github.com/Gnomeslayer/battlemetrics.gitPip installpipinstallbattlemetricsInstall the required dependenciesor you can do:pipinstall-rrequirements.txtImport theBattlemetricsclass into your project.frombattlemetricsimportBattlemetricsUsageRefer to example file for examples.
Here's an example of how to use the Battlemetrics API wrapper:# Instantiate the API wrapper with your tokenbmapi=battlemetrics("Your token here")# Retrieve player informationplayer=asyncio.run(bmapi.player.search(12345))# Print the player informationprint(player)Make sure to replace"Your API token here"with your actual API token obtained from the Battlemetrics developers page.ResourcesFor more details on the Battlemetrics API and its capabilities, refer to the officialBattlemetrics API.ContributingIf you find any issues or have suggestions for improvement, please feel free to submit a pull request or open an issue in theissue tracker. I welcome contributions from the community!ContactYou can contact me on Discord, simply add me: gnomeslayer
or, you can join the officialBattlemetrics discordand @gnomeslayer there.SuportThis repository will ALWAYS be free and hopefully regularly updated, but if you want to support me, you can do soHere
Package: battlemetrics-scrapper
this package allow you to scrap the advertised server on battlemetrics.it return the number of server up, down and dead in each country and the number of player connected to thoses serversto use it :from battlemetrics_scrapper import battlemetrics_scrapperfrom iso3166 import countriesfor country in countries: # iterarate over all the country ISO codeprint(battlemetrics_scrapper.battlemetrics.get_latest_gameserverstat_country(country))alternatively you can use it from the commandline by calling battlemetrics_scrapper
Package: battlemuffin
Python Implementation of Blizzard’s Web APIBattleMuffin officially supports Python 3.6-3.8.RequirementsThis package requires client credentials from Blizzard.You can find out more about how to generate these credentials for your project at theBlizzard Developer Portal.Quick SetupSome easy examples to get you started!frombattlemuffin.clients.warcraft_clientimportWarcraftClientclient=newWarcraftClient("CLIENT_ID","CLIENT_SECRET")response=client.get_achievement_categories_index()It is possible to specify a region, using its default localefrombattlemuffin.clients.warcraft_clientimportWarcraftClientfrombattlemuffin.config.region_configimportRegionclient=newWarcraftClient("CLIENT_ID","CLIENT_SECRET",Region.eu)response=client.get_achievement_categories_index()It is also possible to specify both the region and localefrombattlemuffin.clients.warcraft_clientimportWarcraftClientfrombattlemuffin.config.region_configimportRegion,Localeclient=WarcraftClient(client_id,client_secret,Region.eu,Locale.es_ES)response=client.get_achievement_categories_index()InstallationTo install the latest stable release, you can usepip(orpipenv):$ pip install -U battlemuffinImplemented EndpointsWorld of Warcraft (Retail):Game Data:NameAchievement Categories IndexAchievement CategoryAchievements IndexAchievementAchievement MediaAuctionsAzerite Essences IndexAzerite EssenceAzerite Essence MediaConnected Realms IndexConnected RealmCreature Families IndexCreature FamilyCreature Types IndexCreature TypeCreatureCreature Display MediaCreature Family MediaGuild Crest Components IndexGuild Crest Border MediaGuild Crest Emblem MediaItem Classes IndexItem ClassItem Sets IndexItem SetItem SubclassItemItem MediaJournal Expansions IndexJournal ExpansionJournal Encounters IndexJournal EncounterJournal Instances IndexJournal InstanceJournal Instance MediaMounts IndexMountMythic Keystone Affixes IndexMythic Keystone AffixMythic Keystone Affixe MediaMythic Keystone Dungeons IndexMythic Keystone DungeonMythic Keystone IndexMythic Keystone Periods IndexMythic Keystone PeriodMythic Keystone Seasons IndexMythic Keystone SeasonMythic Keystone Leaderboards IndexMythic Keystone LeaderboardMythic Raid LeaderboardPets IndexPetPlayable Classes IndexPlayable ClassPlayable Class MediaPvP Talent SlotsPlayable Races IndexPlayable RacePlayable Specializations IndexPlayable SpecializationPlayable Specialization MediaPower Types IndexPower TypeProfessions IndexProfessionProfession MediaProfession Skill TierRecipeRecipe MediaPvP Seasons IndexPvP SeasonPvP Leaderboards IndexPvP LeaderboardPvP Rewards IndexPvP Tiers IndexPvP TierPvP Tier MediaQuests IndexQuestQuest Categories IndexQuest CategoryQuest Areas IndexQuest AreaQuest Types IndexQuest TypeRealms IndexRealmRegions IndexRegionReputation Factions IndexReputation FactionReputation Tiers IndexReputation TiersSpellSpell MediaTalents IndexTalentPvP Talents IndexPvP TalentTitles IndexTitleWoW Token Index
Package: battlenet
Python Library for Blizzard’s Community Platform APIMajor featuresPythonicUnicode normalizationLazyloading and eagerloadingEventlet supportMaking a connectionGlobal connection settings can be setup so that objects can make connections implicitly.from battlenet import Connection

Connection.setup(public_key='your public key', private_key='your private key')You can also create connections explicitly.from battlenet import Connection

connection = Connection(public_key='your public key', private_key='your private key')Fetching a specific realmfrom battlenet import Realm

# If a global connection was setup
realm = Realm(battlenet.UNITED_STATES, 'Nazjatar')

# Using a specific connection
realm = connection.get_realm(battlenet.UNITED_STATES, 'Nazjatar')

print realm.name
# => Nazjatar

print realm.is_online()
# => true

print realm.type
# => PVPFetching all realmsfor realm in connection.get_all_realms():
    print realmFetching a characterfrom battlenet import Character

# If a global connection was setup
character = Character(battlenet.UNITED_STATES, 'Nazjatar', 'Vishnevskiy', fields=[Character.GUILD])

# Using a specific connection
character = connection.get_character(battlenet.UNITED_STATES, 'Nazjatar', 'Vishnevskiy', fields=[Character.GUILD])

print character.name
# => Vishnevskiy

print character.guild.name
# => ExcellenceFetching a guildfrom battlenet import Character

# If a global connection was setup
guild = Guild(battlenet.UNITED_STATES, 'Nazjatar', 'Excellence')

# Using a specific connection
guild = connection.get_guild(battlenet.UNITED_STATES, 'Nazjatar', 'Excellence')

print guild.name
# => Vishnevskiy

leader = guild.get_leader()
print leader.name
# => ClíMore ExamplesRead the unit tests inside the tests directory.
Package: battleofai
Battle of AI - Python libraryObject-oriented easy2use solution for interacting withhttps://battleofai.net/'s API.A short summary of the basic features.Configure your client easily.frombattleofaiimportClientclient=Client(credentials=('username','password'))# if you want to export your configclient.config.from_python_file('config.py')# or use jsonclient.config.from_json_file('config.json')Play games automatically.frombattleofaiimportClient,Coreclient=Client()# specify credentials@client.callback()defturn(board,symbol):forx_pos,columnsinenumerate(board):fory_pos,fieldinenumerate(columns):iffield=='#':# if position is freereturnx_pos,y_pos# set my stoneclient.play(Core)Play games manually.frombattleofaiimportClient,Core,GameStateimporttimeclient=Client()# specify credentialsdefturn(board,symbol):forx_pos,columnsinenumerate(board):fory_pos,fieldinenumerate(columns):iffield=='#':# if position is freereturnx_pos,y_pos# set my stonegame=Core.create_game()client.login()my_match=Core(callback=turn)my_match.join_game(client,game)# then eithermy_match.play()# or even something like thisplaying=Truewhileplaying:game.update()ifnotgame.state==GameState.STARTED:breakifmy_match.is_active:resp=my_match.make_turn()ifresp.status_code==200and'false'inresp.text:playing=Falsetime.sleep(5)Manage games.frombattleofaiimportGame,GameState,Coremy_game=Game.get(game_id=100)print(my_game.players)open_games=Game.list(game_state=GameState.WAITING)new_game=Game.create(Core.__game_name__)
Package: battlepy
BattlepyBattlepy is a battle log generator.  Battlepy will create a player stats and enemy stats (PVP) and register the
stats in a csv. We can train some IA algorithms and predict if the generated player can battle (without die) or avoid
the enemy. The player and enemies stats are created using same "mechanics" of the rpg games.This is for my initial researches in Data Science. This is in alpha stage and for academic learning only.Version 1.0.1-betaThis initial release just works as intended. Run a predetermined quantity of battles and log in a csv.TODO for version 1.1Docs.Add freeze option to generate same stats for enemy/player.Able to tun from command line.Add a more complex mechanism, like block, critical, speed and etc.Add more weapons and armor items.
Package: battleschool
Development environment provisioning using ansible (http://docs.ansible.com),
ala boxen (http://boxen.github.com/) which uses puppet (http://puppetlabs.com/puppet/what-is-puppet) and
kitchenplan (https://github.com/kitchenplan/kitchenplan) which uses chef (http://docs.opscode.com/)
Built on and for macs, but should be usable on Linux
Package: battleship-py
Battleship 🛥️Simple Battleship game in Python.This is a simple implementation with dynamic grid support (defaults to 10x10).ChallengeCreate an application to allow a single human player to play a one-sided game of Battleships against ships placed by the computer.The program should create a 10x10 grid, and place a number of ships on the grid at random with the following sizes:1x Battleship (5 squares)2x Destroyers (4 squares)The player enters coordinates of the form “A5”, where "A" is the column and "5" is the row, to specify a square to target. Shots result in hits, misses or sinks. The game ends when all ships are sunk.Runpip3installbattleship-py
python3-mbattleshipCommandsNameDescriptionHELPPrints an help message about the commands.QUITQuits the Battleship game.DESTROYDestroys the game by shooting all the vessels.PRINTPrints the current state of the game to console.EMOJIPrints the emoji version of the state.(X)(Y)Shoots the target at coordinate (eg: A5).Build Automation
Package: battleships-pkg-epratt
ECM1400-Battleships-CourseworkIntroductionThis is the repository for the ECM1400 Battleships Coursework. The aim of this project is to create a Battleships game
in Python. The game will have multiple ways to play, either in a console or with a web interface.PrerequisitesPython 3.11InstallationClone the repositoryRUNpip install -r requirements.txtGetting StartedFor Simple GameRUNpython game_engine.py -cFor Command Line Game against AIEDITplacement.jsonto change where your ships will be placedFormat of {"Ship_Name": ["X_coord", "Y_coord", "direction either v or h"]}RUNpython mp_game_engine.py -cFor Web Game against AIRUNpython main.pyThen go tohttps://127.0.0.1/placementin your browserTestingRUNpytestDeveloper DocumentationAccessing LogsLogs for the games are stored inbattleships.logSphinx/AutodocTo access the sphinx autodoc documentation, opendocs/build/html/index.htmlin your browser or
visithttps://edguardia.github.io/ECM1400-Battleships-Coursework/Config Documentationconfig.yamlcontains the configuration for the game. This includes the board sizeTo edit the board size, change theboard_sizevariable inconfig.yamlto an integer preferably less than 20You can also change level of logging here by settinglogging_levelto one ofDEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSETTo edit the number or length of battleships add or edit new rows inbattleships.txtwith the formatname_of_ship, length_of_shipDetailsAuthorsEdward PrattLicenceGPL-3.0Sourcehttps://github.com/Edguardia/ECM1400-Battleships-CourseworkDocumentationhttps://edguardia.github.io/ECM1400-Battleships-CourseworkSelf AssessmentComplete Featurescomponents.py tasksSimple PlacementRandom PlacementCustom Placementgame_engine.py tasksmp_game_engine.py tasksmain.py (FLASK) tasksLogging tasksCode StylingProject DeliverySphinx DocumentationHosting on GitHubhttps://github.com/Edguardia/ECM1400-Battleships-Courseworkhttps://edguardia.github.io/ECM1400-Battleships-CourseworkInput ValidationPartially Complete FeaturesDifficulty LevelsAI has been slightly improved to stop it hitting the same squared twiceTestingMost of the testing has been writtenNot all custom functions have written testsConfig FilesConfig files have been implemented but not for all features user could chooseIncomplete FeaturesMulti-Player Interface
Package: battleship-tui
Battleship TUIBattleship TUI is an implementation of the popular paper-and-pen Battleship game for
your terminal. You can play against the AI or a real player via the Internet,
customize game options and appearance, keep track of your achievements, and more.FeaturesSingleplayer modeMultiplayer mode (via Internet)Customizable game rulesGame statisticsPlanned featuresCustomizable UIRanking systemAccount managementBetter CLIRequirementsA terminal (Windows PowerShell is fine too, see below)Python 3.10 or higher[!NOTE]
If you're on Windows,make sureto installthe newer Windows Terminal.
The older Windows PowerShell can't properly display some symbols.InstallationThe recommended way to install and update the game is viapipx(especially if you don't know anything about
virtual environments).pipxinstallbattleship-tui[client]battleship-tuiis merely a Python package and is distributed via PyPI. You can
install it viapiptoo, but make sure it installs into a venv so that you're not
messing with the system interpreter.# Linux example.python-mvenvvenv&&sourcevenv/bin/activate
pipinstallbattleship-tui[client]PlayOnce the game is installed you can use thebattleshipcommand to run it. This
command will launch the user interface and present you with the main menu.Play via CLIYou can launch the game via CLI subcommands too, especially if you want to skip some
in-game menus.For example, if your favorite game mode is singleplayer, salvo variant, you can
quickly get into battle by runningbattleship play single --salvo.Runbattleship play --helpto discover available options.MultiplayerYou can play Battleship TUI with your friends or colleagues via the Internet. ChooseMultiplayeroption in the main menu to do this.Game accountYou may sign up for a multiplayer account or try multiplayer with guest access.To sign up, runbattleship account signup. You'll be prompted with your email,
desired nickname, and a password. Your nickname will be displayed in-game. It should
contain 7 to 20 characters and be unique. Your password should contain at least 9
characters.[!NOTE]
Guests given an autogenerated nickname, their game statistics isn't saved. Guest
access will work until you log off.ScreenshotsExpand to see more screenshotsMain menuGame summaryStarting a multiplayer sessionList of game sessions to join
Package: battlesnake-builder
battlesnake-builderEasily build a battlesnake in pythonInstallation$pipinstallbattlesnake_builderRequirementspython >= 3.10Flask >= 2.0.2ExamplesBasic snake that always moves upfrombattlesnake_builderimportBattleSnakemy_snake=BattleSnake()@my_snake.on_movedefmove(data,_store):return"up"my_snake.run()More advanced snake that looks for foodfrombattlesnake_builderimportBattleSnakemy_snake=BattleSnake()@my_snake.on_movedefmove(data,_store):me=data.youclosest_food=data.board.closest_food(me)ifclosest_food.y>me.head.y:return"up"elifclosest_food.y<me.head.y:return"down"ifclosest_food.x>me.head.x:return"right"return"left"my_snake.run()Snake with static configfrombattlesnake_builderimportBattleSnake,Configmy_snake=BattleSnake(Config(apiversion="0.1"))Orfrombattlesnake_builderimportBattleSnakemy_snake=BattleSnake({"apiversion":"0.1"})Snake with dynamic configfrombattlesnake_builderimportBattleSnakeimportrandommy_snake=BattleSnake()@my_snake.on_configdefconfig():tails=["default","curled"]return{"tail":random.choice(tails)}my_snake.run()You can also mix a static and dynamic config. If you overwrite an existing value, the newer one is getting adapted.Shout something@my_snake.on_movedefmove(_data,_store):return{"move":"up","shout":"WHY ARE WE SHOUTING"}Snake that stores data across eventsfrombattlesnake_builderimportBattleSnakemy_snake=BattleSnake()@my_snake.on_startdefstart(data,store):store["snake_amount"]=len(data.board.snakes)@my_snake.on_movedefend(data,store):shout="Everyone is alive"iflen(data.board.snakes)<store["snake_amount"]:shout="Some snake died!"return{"move":"up","shout":shout}my_snake.run()All featuresfrombattlesnake_builderimportBattleSnake,Config,Datamy_snake=BattleSnake(Config(tail="curly"))@my_snake.on_configdefconfig():return{"head":"default"}@my_snake.on_startdefstart(data:Data,store:dict):store["start_snake_size"]=len(data.board.snakes)@my_snake.on_movedefmove(data:Data,store:dict):shout="Everything is fine"ifstore["start_snake_size"]!=len(data.board.snakes):shout="Oh no! Someone lost :("formin["up","down","left","right"]:ifdata.board.is_move_safe(data.you,m):return{"move":m,"shout":shout}return{"move":"up","shout":shout}@my_snake.on_enddefend(data:Data,store:dict):end_snake_size=len(data.board.snakes)print(f"Out of{store['start_snake_size']}Snakes, only{end_snake_size}survived")my_snake.run()
Package: bauble
what is Bauble (classic)At its heart Bauble is a framework for creating database
applications.  In its distributed form Bauble is an application to
manage plant records and specifically living collections.  It is
used among others by Belize Botanic Gardens to manage their live
collections.  Included by default is RBG Kew’s Family and Genera
list from Vascular Plant Families and Genera compiled by
R. K. Brummitt and published by the Royal Botanic Gardens, Kew in
1992 used by permission from RBG Kew.All code contained as part of the Bauble package is licenced under
the GNU GPLv2+.Terms and NamesThis file describes ‘bauble.classic’, a standalone
application. ‘bauble.classic’ was formerly known just as as
‘Bauble’. currently ‘Bauble’ is the name of an organization on github,
enclosing ‘bauble.classic’, ‘bauble.webapp’ and ‘bauble.api’.the two new projects ‘bauble.webapp’ and ‘bauble.api’ are what you would
fork/download if you want to participate to the development of a web-based
version of ‘Bauble’.‘bauble.classic’ is what you would install if you want to start using
‘Bauble’ straight away.The database structure of both ‘bauble.classic’ and the pair
‘bauble.webapp/bauble.api’ is similar so any data you would insert using
‘bauble.classic’ will be available once you install a running version of
‘bauble.webapp/bauble.api’.Requirementsbauble.classic requires the following packages to run.Python (travis-ci checks Bauble against Python 2.6 and 2.7)SQLAlchemy (>= 0.6.0, at least up to 1.0.3)pygtk (>= 2.12, at least up to 2.24)PyGObject (>= 2.11.1, at least up to 2.28.6)lxml (>= 2.0)each of the following database connectors is optional, but at least one is needed:pysqlite >= 2.3.2psycopg2 >= 2.0.5mysql-python >= 1.2.1To use the formatter plugin you will also need to install an
XSL->PDF renderer. For a free renderer check out Apache FOP
(>=.92beta) athttp://xmlgraphics.apache.org/fop/Further infoThe complete documentation for bauble.classic is to be found athttp://bauble.readthedocs.org. It includes detailed and up-to-date
installation procedures for different platforms, troubleshooting,
and a very thorough user manual.For any kind of question, you can open an issuehere on github, or if you feel more comfortable with it, you can start a thread onour google group.
Package: baudot
Baudot is a Python library for encoding and decoding 5-bit stateful encoding.This library is named afterJean-Maurice-Émile Baudot(1845-1903), the French
engineer who invented this code. TheBaudot codewas the first practical and
widely used binary character encoding, and is an ancestor of the ASCII code we
are familiar with today.This library accomplishes two tasks (and their inverse):reading 5-bit codes from custom input formats,converting 5-bit codes to unicode characters.This library provides support for several common encodings, as well as support
for reading tape-like files and hexadecimal data.Please keep in mind that this project is very young, and that its API is most
likely ill-designed at this point. Suggestions are welcome!
Package: bauhaus
Bauhausbauhausis a Python package for spinning up propositional logic encodings from object-oriented Python code.FeaturesCreate propositional variables from Python classesBuild naive SAT encoding constraints from propositional variablesAt most oneAt least oneExactly oneAt most KImplies allCompile constraints into a theory in conjunctive or negation normal formWithpython-nnf, submit a theory to a SAT solverTheory introspectionInstallationInstallbauhausby runningpipinstallbauhausHow is it used?Create Encoding objects that you intend to compile to an SAT. Encoding objects will store your model's propositional variables and constraints on the fly.frombauhausimportEncoding,proposition,constrainte=Encoding()Create propositional variables by decorating class definitions with@proposition.@proposition(e)# Each instance of A is stored as a propositionclassA(object):passCreate constraints by decorating classes, methods, or invoking the constraint methods.# Each instance of A implies the right side@constraint.implies_all(e,right=['hello'])# At most two of the A instances are true@constraint.at_most_k(e,2)@proposition(e)classA(object):def__init__(self,val):self.val=valdef__repr__(self):returnf"A.{self.val}"# Each instance of A implies the result of the method@constraint.implies_all(e)defmethod(self):returnself.val# At most one of the inputs is true.constraint.add_at_most_one(e,A,A.method,Var('B'))Compile your theory into conjunctive or negation normal form (note: the theory is truncated),objects=[A(val)forvalinrange(1,4)]theory=e.compile()>>And({And({Or({Var(3),~Var(A.3)}),Or({Var(1),~Var(A.1)}),...And({Or({~Var(A.1),~Var(A.2),~Var(A.3)})})})And view the origin of each constraint, from the propositional object to the final constraint.
(Note: the introspection is truncated)e.introspect()>>constraint.at_most_k:function=Ak=2:(~Var(A.3),~Var(A.1))=>Or({~Var(A.1),~Var(A.2),~Var(A.3)})(~Var(A.3),~Var(A.2))=>Or({~Var(A.1),~Var(A.2),~Var(A.3)})(~Var(A.1),~Var(A.2))=>Or({~Var(A.1),~Var(A.2),~Var(A.3)})Finalat_most_k:And({Or({~Var(A.1),~Var(A.2),~Var(A.3)})})......ContributeHead over to ourcode of conductand get a feel for the
library by reading ourarchitecture designanddocumentation.Issue Tracker:https://github.com/QuMuLab/bauhaus/issuesSource Code:https://github.com/QuMuLab/bauhausJoin us!http://mulab.ai/SupportIf you are having issues, please let us know.
Reach out to us atkarishma.daga@queensu.caor by creating a GitHub issue.LicenseThe project is licensed under the MIT license for the Queen's Mu LabCiting This Workbauhauswas created by Karishma Daga under mentorship of Christian Muise at Queen's University, Kingston.