Saravanan666/pypi-org huggingface dataset:
Package: chess_py
BoardLicensechess_py is available under the MIT license. See theLICENSEfile for more info. Copyright © 2016 Aubhro Sengupta. All rights
reserved.Talk @Pygotham 2016I gave a talk at PyGotham 2016 on this library. Abstract can be foundhere.IntroductionChess_py is an open source chess library written in Python designed to
aid in the creation of chess engines. Handles the chess so you can focus
on the engine.InstallationTo use as a immediately start up a game between two human players in the
console, navigate inside the root directory of the package and run
main.py.pythonmain.pyTo install packagepip(Recommended)pipinstallchess_pyOr manuallypythonsetup.pyinstallDocumentationView complete technical documentationhere.Great! How do you use it? (An Example)Chess_py has the capability of creating games between players, either
human, or AIimportchess_pyfromchess_pyimportGame,Human,color""" Creates a Game with 2 humans.
When run, this will open the console,"""new_game=Game(Human(color.white),Human(color.black))""" After game is completed, outcome will be stored in result.
The integer result will be one of three values.
white wins - 0, black wins - 1, draw - 0.5 """result=new_game.play()To build a chess engine on with chess_py, inherit Player and implement
generate_move()importchess_pyfromchess_pyimportGame,Human,color# Engine which plays the move with the highest immediate material advantageclassMyEngine(chess_py.Player):def__init__(self,input_color):# Creates piece value scheme to specify value of each piece.self.piece_values=chess_py.PieceValues.init_manual(PAWN_VALUE=1,KNIGHT_VALUE=3,BISHOP_VALUE=3,ROOK_VALUE=5,QUEEN_VALUE=9)# Super call tosuper(chess_py.Player,self).__init__(input_color)defgenerate_move(self,position):# position parameter is an object of type Board# Finds all possible moves I can play.moves=position.all_possible_moves(self.color)# Initalizes best move and advantage after it has been played to dummy values.best_move=Nonebest_move_advantage=-99# Loops through possible movesformoveinmoves:""" advantage_as_result(move, piece_values) finds numerical advantage
        as specified by piece value scheme above. Returns negative values for
        positions of disadvantage. Returns +/-99 for checkmate. """advantage=position.advantage_as_result(move,self.piece_values)# If this move is better than best move, it is the best move.ifadvantage>=best_move_advantage:best_move=movebest_move_advantage=advantagereturnbest_move# If file is run as script, a Game is set up between My_engine and Human and result is printed.if__name__=="__main__":new_game=Game(MyEngine(color.white),Human(color.black))# white wins - 0, black wins - 1, draw - 0.5print("Result: ",new_game.play())
Package: chessql
ContentsDescriptionInstallation InstructionsDescriptionThis package provides a parser for Chess Query Language (‘CQL’_).The ‘documentation’_ for CQL version 6.0.4 as found in first half of 2020 was used as a reference.This package does not implement an evaluator to find games in a ‘PGN’_ file which match a query.  An evaluator is implemented inChessTab.Installation InstructionsThis package is available on PyPI so can be installed by typingpython -m pip install –user chessqlat the command prompt.SeePythonandpipdocumentation for alternatives and platform-specific points.
Package: chessratings
ChessratingsA python implementation of official chess rating systems, as used by organizations such as the US Chess Federation (USCF) to rate player strength.Currently available modules are:US Chess Federation (ELO):http://www.glicko.net/ratings/rating.system.pdfInstallationAvailable in PyPi.pip install chessratingsUsageTo use the chessratings package, import your module of choice into your python script:from chessratings import uscf_eloThere are a few important concepts to know when using this package: Players and Tournaments.A Player is a rated entity that can participate in a game/match against other Players. Players are initiated with, at minimum, the following information:id: an identifier such as a namerating: their most recent rating, if knownAdditional optional arguments may vary by module and can be found in the source code.example_player_1 = uscf_elo.Player(id='player_1', rating=1600)
example_player_2 = uscf_elo.Player(id='player_2', rating=1500)A Tournament is a match or series of matches between two or more players. As per the official specifications, player ratings are updated after a Tournament is concluded.A Tournament requires two arguments:players: a list of participating Player entitiestournament_results: a summary of tournament resultsThe tournament_results must be provided in the following format:[ 
    [ ( player_1_id, player_2_id ), winner_id ],
    [ ( ... ) ],
]If the match was a draw, winner_id can be set to null (or any value other than one of the two player IDs). Here's an example:players = [example_player_1, example_player_2]
tournament_results =    [
                            [ ( 'player_1', 'player_2' ), 'player_2'],
                            [ ( 'player_1' ,'player_2' ), 'player_1'],
                            [ ( 'player_1', 'player_2' ), np.nan ]
                        ]
tournament = uscf_elo.Tournament(players, tournament_results)Running the tournaments will update player ratings, and optionally output summarized information about the tournament results.tournament_results = tournament.run()
print(tournament_results)Tournament results are presented as:
player id, tournament date, tournament number, number of tournament games, number of wins, number of draws, number of losses, updated rating[
    ['player_1', datetime.date(2021, 5, 20), 1, 3, 1, 1, 1, 1584.0954259202883],
    ['player_2', datetime.date(2021, 5, 20), 1, 3, 1, 1, 1, 1517.178456181353]
]ContributingIf you would like to help develop this package, along with the tools you need to develop and run tests, run the following in your virtualenv:$pipinstall-e.[dev]
Package: chess-term
Chess TerminalPlay chess in your terminalInstallationpip install chess-termFor computer play you need the stockfish engine installedsudo apt install stockfishorbrew install stockfishUsageUsage: chess-term [OPTIONS]

Options:

  -w, --white [human|computer]    Who is playing as white? (default=human)
  -b, --black [human|computer]    Who is playing as white? (default=human)
  -u, --user-interface [text|curses]
                                  Which user interface? (default=text)
  --help                          Show this message and exit.
Package: chesstools
Speaks proper FEN, SAN, and long algebraic notation. Supports standard chess and chess960 (Fischer-random). Handles move validation and checkmate/ stalemate/ repetition/ 50-move-rule checking. Features server-side timekeeping with optional latency compensation. The compact minimax AI framework utilizes alpha-beta pruning and transposition tables under the hood. This enables the developer to produce a modern custom bot by simply overriding AI.evaluate. Additionally, chesstools.book provides an intuitive interface for building opening book databases for use in conjunction with an ai.
Package: chess-tuning-tools
A collection of tools for local and distributed tuning of chess engines.Free software: Apache Software License 2.0Documentation:https://chess-tuning-tools.readthedocs.io.FeaturesOptimization of chess engines using state-of-the-artBayesian optimization.Support for automatic visualization of the optimization landscape.Scoring matches using a Bayesian-pentanomial model for paired openings.Quick StartIn order to be able to start the tuning, first create a python
environment (at least Python 3.7) and install chess-tuning-tools by typing:pip install chess-tuning-toolsFurthermore, you need to havecutechess-cliin the path. The tuner will use it to run matches.To execute the local tuner, simply run:tune local -c tuning_config.jsonTake a look at theusage instructionsand theexample configurationsto
learn how to set up thetuning_config.jsonfile.Installation on WindowsTo get chess-tuning-tools to work on Windows, the easiest way is to install
theMinicondadistribution.
Then, create a new environment and install chess-tuning-tools:conda create -n myenv python=3.9 scikit-learn=0.23
activate myenv
pip install chess-tuning-tools
Package: chesstutor-Ceasar
Improve your chess skills by playing human-computer chess on the command line.The program will use a chess engine to calculate the top three moves in the
current position, and display them to the player in a random order without
revealing the scores. The player attempts to choose the best move. Then program
reveals the score and chooses the best move for black.Set upInstall the stockfish chess engine (Mac OS):brew install stockfishCreate the environment:virtualenv env
source env/bin/activate
pip install -r requirements.txtThen play:python chesstutor.py
Package: chess-under-1000-lines
IntroductionPerformanceUsingpython3 -m cProfile -o prof.txt tree.py -hfor profiling andsnakeviz prof.txtto
visualize.Perft(3) initial positionsrnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1(8902
positions, reference time 0.05 withpython-chess:- 1.25 s (first)
- 0.79 s (moving`get_positions_attacking_pieces` to optimizer initialization and update, not when checking if moveis legal) - 0.70 removing np.array from list of moves (does not make a lot of sense)TODO:- [X] Include tests for perft in different positions
- [ ] Utils if there is a mismatch in positions
- [ ] Improve performance
- [ ] Improve overall code quality (clarity, choose right data structure for the job)
- [ ] Automate release with github action to pip
- [ ] Explore pypy
Package: chessx
python-chessxA chess XAI programIntroductionDependenciesFeaturesTests1. Introductionpython-chessx is an explainable chess AI that generates commentary for positions/moves in a game of chess.2. DependenciesPython3 -Download and Install Python3. You can also use your system's package manager to install the latest stable version of python3.For dev work, run the following commands (preferrably in a virtual environment):pipinstall-e.3. FeaturesProvides a utility to generate explanations from a FEN representation of a chess position.Piece Square Tablesimportchessx.heuristicasheuristicimportchesspsqt_fen='rn2kb1r/pp2qppp/2p2n2/4p1B1/2B1P3/1QN5/PPP2PPP/R3K2R b KQkq - 1 9'psqt_util=heuristic.PSQT(psqt_fen)# generate list of explanationsexp_list=psqt_util.get_explanations()# print explanationsprint('PSQT Explanations:')forexpinexp_list:print(exp)Trapped Piecestp_fen='r5k1/p4p1p/2p3pb/2N1n2n/1p2PP2/1B2B1PP/PP4K1/3R4 b - - 0 24'tp_util=heuristic.TrappedPieces(tp_fen)# generate list of explanationsexp_list=tp_util.get_explanations()# print explanationsprint('Trapped Pieces Explanations:')forexpinexp_list:print(exp)Pinned Piecespin_fen='1rk5/8/4n3/5B2/1N6/8/8/1Q1K4 b - - 0 1'pin_util=heuristic.PinnedPieces(pin_fen)# generate list of explanationsexp_list=pin_util.get_explanations()# print explanationsprint('PinnedPieces Explanations:')forexinexp_list:print(ex)print()3. TestsThe following command to runs unit tests on the project:pytest
Package: chessy
chessyA simple chess engine.This is a learning project. It is much slower than other production-ready engines and may have bugs, but
feel free to contribute if you wish to.FeaturesMinimal UCI support.Lichess integration (seethis repository).Getting startedCreate a venv withpython -m venv .venv. The exact Python required version can be found atpyproject.toml.Installpoetryand run$ poetry installto install dependencies.Run it with$ poetry run chessyor manually with$ .venv/bin/activatefollowed by$ python -m chessy.core.If you are trying to debug some problem, you can use the--debug(-dfor short) flag to increase log level:$ poetry run chessy -d.Planned featuresShort term:Improve move evaluation and search.Be able to process at least depth 8 within a reasonable time.Quiescence search (as soon as we get some performance improvements - not right now because it will slow down things too much).Long term:Advanced UCI supportAdapt playstyle according towtimeandbtime.Ponder.Report more info (e.g.seldepth).Maybe support customization options.Development utilsIf you're using VSCode, we have a.vscodewith recommended extensions / settings,
and launch profiles.Alternatively, usetools/format_lint_test.bashto run all available lints.
Check the script source code if you want to run any of these lints separately.Licensechessy is licensed under the GNU Affero General Public License, either version 3 or any later versions
at your choice. SeeLICENSE.txtfor more details.
Package: chest
A dictionary that spills to disk.Chest acts likes a dictionary but it can write its contents to disk.  This is
useful in the following two occasions:Chest can hold datasets that are larger than memoryChest persists and so can be saved and loaded for later useRelated ProjectsThe standard libraryshelveis an alternative out-of-core dictionary.Chestoffers the following benefits overshelve:Chest supports any hashable key (not just strings)Chest supports pluggable serialization and file saving schemesAlternatively one might consider a traditional key-value store database likeRedis.Shoveis another excellent alternative with support for a variety of stores.How it worksChest stores data in two locationsAn in-memory dictionaryOn the filesystem in a directory owned by the chestAs a user adds contents to the chest the in-memory dictionary fills up.  When
a chest stores more data in memory than desired (seeavailable_memory=keyword argument) it writes the larger contents of the chest to disk as pickle
files (the choice ofpickleis configurable).  When a user asks for a value
chest checks the in-memory store, then checks on-disk and loads the value into
memory if necessary, pushing other values to disk.Chest is a simple project.  It was intended to provide a simple interface to
assist in the storage and retrieval of numpy arrays.  However it’s design and
implementation are agnostic to this case and so could be used in a variety of
other situations.With minimal work chest could be extended to serve as a communication point
between multiple processes.Known FailingsChest was designed to hold a moderate amount of largish numpy arrays.  It
doesn’t handle the very many small key-value pairs usecase (though could with
small effort).  In particular chest has the following deficienciesChest is not multi-process safe.  We should institute a file lock at least
around the.keysfile.Chest does not support mutation of variables on disk.LICENSENew BSD. SeeLicenseInstallchestis available throughconda:conda install chestchestis on the Python Package Index (PyPI):pip install chestExample>>>fromchestimportChest>>>c=Chest()>>># Acts like a normal dictionary>>>c['x']=[1,2,3]>>>c['x'][1,2,3]>>># Data persists to local files>>>c.flush()>>>importos>>>os.listdir(c.path)['.keys','x']>>># These files hold pickled results>>>importpickle>>>pickle.load(open(c.key_to_filename('x')))[1,2,3]>>># Though one normally accesses these files with chest itself>>>c2=Chest(path=c.path)>>>c2.keys()['x']>>>c2['x'][1,2,3]>>># Chest is configurable, so one can use json, etc. instead of pickle>>>importjson>>>c=Chest(path='my-chest',dump=json.dump,load=json.load)>>>c['x']=[1,2,3]>>>c.flush()>>>json.load(open(c.key_to_filename('x')))[1,2,3]DependenciesChestsupports Python 2.6+ and Python 3.2+ with a common codebase.It currently depends on theheapdictlibrary.It is a light weight dependency.
Package: chestnut
AboutThis package provides a framework to develop portable APIs. Supported platforms: Azure Functions, AWS Lambda, GPC, Flask.Installpip install chestnutHow to useWrite functions to handle your API operations using the packagechestnut.httprequest/response classes. The decorator@middlewarewill convert requests/responses from/to the current platform, which is defined in the environment variableCHESTNUT_MIDDLEWARE. It supports both functions and coroutines.from chestnut.http import Request, Response
from chestnut import middleware


@middleware
def handler(req: Request) -> Response:
	message = "Hello {} !".format(
		req.query_params.get("name", "anonymous")
	)
	return Response(status=200, body=message)Unit testpip install -r requirements.txt -r test-requirements.txt
python -m pytest tests/ --cov=chestnut
Package: chest-simulator-package
chest_simulatorDescription.
A simple prize chest simulator. With 4 different fictitious awards, where the rarer ones have less chance of being drawn. The higher the league entered, the greater the chances for rarer prizes. Both the league and the quantity of chests must be informed by the user.InstalationUse the package managerpipto install chest_simulator_packagepipinstallchest_simulator_packageAuthorHenrique SKLicenseMIT
Package: chevah-compat
Chevah OS Compatibility Layer.Depends on:pam - for pam authenticaitonarpy - for loading libraries on AIX.Unified interface for working with operating system accounts on Unix
and Windows, see IOSUsers.Support for staring Unix daemon and installing and starting Windows services.Importing this module on Windows will populate the sys.argv with Unicode
values.Unified interface for working with operating system file systems provides:Unicodeallow impersonated filesystem accessallow chrooted filesystem accesssingle internal path separator: always ‘/’.listing root folder. On Windows ‘/’ will list all
available drives. ‘/c/’ will list c:\ content.setting/getting filesystem node owner/groups.open file in various modes: read-only, write-only, append,
Package: chevah-keycert
SSH Keys and SSL key/csr/certificates handling.The functions are designed to integrate with command line tools but also with
other user interfaces (for example from a web based control panel).It depends on these C modules:pyCryptopyOpenSSLIt provides the following functionalities:Generate SSL key and self signed SSL certificate signed with SHA1.Generate SSL key and CSR. Signed with SHA256 or fall back to SHA1.Generate RSA/DSA keys.Convert OpenSSH, SSH.com, Putty, LSH.Populate an argparser subparser with command line options.The SSH key handling was forked from Twisted code, but project no longer
depends on Twisted.MIT License.Release is done automatically for each tag, using Travis-CI.
Package: cheval
cheval: Simple Configurations with Zero Redundancychevalis a lightweight package that allows you to configure your classes with minimum
boilerplate. Configurations are easy to understand, quick to write, and intuitive to work with.RequirementsPython 3.6+InstallationThe recommended installation method is pip-installing into a virtual environment:$python-mpipinstallgit+ssh://git@github.com/rpeloff/cheval.gitTODO(rpeloff): update once we have fully moved to PyPichevalby ExampleTODO(rpeloff): populate README with concrete examplesLicenseThis project is licensed under the terms of theApache License 2.0license.Citing chevalIf you use Cheval in your research please use the following BibTeX entry:@Misc{Eloff2022cheval,author={Ryan Eloff},title={cheval},howpublished={Github},year={2022},url={https://github.com/rpeloff/cheval}}
Package: chevette
Version 0.1.0ChevetteChevette is a static blog engine written in Python. It presently only supports version 3.5 and up.
There are currently no plans to add compatibility to previous versions although efforts from other contributors are most welcome.Note: the project is currently an alpha release.There are still tests that need to be performed so certain functionality might not be fully stable.InstallationInstallation is fairly straightforward. Make sure you have eitherpiporpipenvinstalled on your system and run the following command:pipinstallchevette# or if you are using pipenvpipenvinstallchevetteBasic UsageInstalling chevette will give you access to a command line utility to help you with your needs.Create a blogIt's a simple as executingchevettenew<path/to/your/project/directory>This will generate a basic boilerplate project for your site (Including template files).Build the blogTo build your blog (ie: convert all your markdown posts to html):Navigate to the project directory (if you're not already there)cd/path/to/your/project/directoryRun thebuildcommandchevettebuildThis will generate all the necessary html files (including pages and other assets) and place them in a directory calledpublicwithin the project directory.Launch a serverChevette comes with a very simple http server to help you track the changes you make to your blog.In a new terminal session, navigate to thepublicfolder inside of your project directory (see the previous section)cd/path/to/your/project/directory/publicRun theservecommandchevetteserveA server will be launched which will be accessible atlocalhost:9310RoadmapAs I've mentioned in the beginning of this README, chevette is still in its infancy and is very much a work in progress. There are many features I would like to implement, including the following:Code syntax highlighting in postsA drafts / unpublished mechanismBetter logging, error messagesMore robust testsAdd more options to the CLI commandsVarious performance tweakingsApublishcommand as can be seen in projects like hyde or hugoTidying up the codebaseCompilation of css and javascript assetsmany more as we think of themIssues and contributingIf you come across this project and you either feel inclined to add your contribution or simply want to report a bug, the best way to so is through github issues.
Package: chevir-kartalol
English to Azerbaijani(Arabic Script) Translator (Arabic Script)This package provides an easy-to-use interface for translating text from English to Azerbaijani using Arabic script. Built withPyTorch, it leverages advanced neural network models for accurate and fast translations.FeaturesHigh-quality translation from English to Azerbaijani (Arabic Script).Simple and intuitive API.Lightweight and fast.InstallationInstall the package using pip:pip install chevir-kartalol==0.1Requirements
List your package requirements, but typically:Python >= 3.9
Torch >= 2.0.0
torchtext==0.6.0
spacy** 1- Note: You need to update spacy as follows:1- download tokenizer that we created for azb from the following link:
    - https://drive.google.com/file/d/1m6nQ13WIBW3pXGaLnLndd-6PYwExvUe8/view?usp=sharing

2- move azb and lex_attrs.py folder into:
    - venv/lib/python3.10/site-packages/spacy/lang/2- Note: if you have GPU make sure that you have done cuda setting correctly.To use the translator, follow these steps:from chevir_kartalol.evaluation import Dilmanc

# Initialize the translator (make sure to adjust parameters as needed)
translator = Dilmanc()

# Translate text
translated_text = translator.chevir("Your English text here")
print(translated_text)LicenseThis project is licensed under the Apache-2.0 License - see the LICENSE file for details.SupportFor support and queries, raise an issue in the GitHub repository or contact the maintainers directly.