Saravanan666/pypi-org huggingface dataset:
Package: betaMixPy
betaMixPyThe betaMixPy package is used to find edges in gene networks using co-expression data. The betaMixPy method is built on the insightful results of Frankl and Maehara (1990) who showed that two random vectors are approximately perpendicular with high probability, if the dimension of the space is sufficiently large. The pair-wise correlations between pairs of predictors are equal to the cosine of the angles between the pairs. From these angles we compute $z_j=\sin^2(\theta)$ and fit a mixture of two beta distributions to the $z_j$'s. For pairs of random vectors (the null set) the distribution of $z_j$ is Beta((N-1)/2, 1/2), where N is the sample size. The nonnull set is assumed to follow a Beta(a,b) distribution, and using the EM algorithm we estimate a,b, and the proportion, p0, of the null set of pairs. The betaMix function determines a threshold which will control the error rate given by the user. Any $z_j$ below that threshold corresponds to a significantly correlated pair of predictors (an edge in the graphical model.)The input to the program is a normalized expression matrix, with predictors/genes (nodes) in the rows, and samples in the columns.With a large number of predictors, P, the estimation may be slow, so it is recommended to set the parameter subsamplesize to something smaller than choose(P,2). The minimum allowed by the program is 20,000. Using anything smaller will cause betaMixPy to fit the model to all choose(P,2) pairs.If the N samples can be assumed to be indepndent, set the parameter ind to True (the default). If it is set to False, the null set follows a Beta((nu-1)/2, 1/2) distribution and nu (the effective sample size) is estimated from the data in the EM algorithm.To install the package, runpip3 install betaMixPyAdditional documentation and examples are available in the doc, code and data folders onGitHub
Package: betapert
This package provides thePERT(also known as beta-PERT) distribution.Both the PERT distribution and its generalization, the modified PERT distribution, are provided.The distributions work exactly like SciPy continuous probability distributions. They are subclasses ofrv_continuous.Installation# or `poetry add betapert`pipinstallbetapertUsagefrombetapertimportpert,mpert# Define the distribution:dist=pert(10,30,90)# Or, using keyword arguments:dist=pert(mini=10,mode=30,maxi=90)# Call standard SciPy methods:dist.pdf(50)dist.cdf(50)dist.mean()dist.rvs(size=10)# Or, you can directly use the methods on this object:pert.pdf(50,mini=10,mode=30,maxi=90)pert.cdf(50,mini=10,mode=30,maxi=90)pert.mean(mini=10,mode=30,maxi=90)pert.rvs(mini=10,mode=30,maxi=90,size=10)# The modified PERT distribution is also available.# A PERT distribution corresponds to `lambd=4`.# Note that you cannot call `mpert` without specifying `lambd`# (`pert` and `mpert` must have different signatures since SciPy does# not support optional shape parameters).mdist=mpert(10,30,90,lambd=2)# Values of `lambd<4` have the effect of flattening the density curve#       6%                 >  1.5%assert(1-mdist.cdf(80))>(1-dist.cdf(80))TestsA thorough test suite is included.❯ pytest
=============== 250 passed in 3.52s ===============
tests/test_frozen.py 
tests/test_generalization.py
tests/test_mpert_parametrized.py
tests/test_special_cases.py
Package: betapy
betapyInferface object for bdata. Performs all calculations and moves all data fields to the top level. For a list of accessible data fields see object representation (callrepr(betapy_obj)or simply call your object in the interpreter).betapy also calculates all asymmetry values and places the results in top level numpy arrays. To re-calculate asymmetries usebetapy.set_asym()which takes as input the same asbdata.asym(). For a list of options print the docstring withprint(betapy.set_asym.__doc__)
Package: betconnect
betconnectSimple python wrapper for theBetConnectapi, allowing for retriveal of data for active
betting markets and betting operations associated with those markets, seeexamplesdocsjoin betcode slack groupclient requirementsbetconnect account (client required username & password) - can be set up via thestagingandproductionwebsites.api key - the api key associated with you account. Unique per environment.personalised production url - live (production) accounts have unqiue urls associated with your account.Using the libraryimportbetconnect# create a clientclient=betconnect.APIClient(username='username',password='password',api_key='api_key',personalised_production_url='https://custom.betconnect.com/')# loginclient.account.login()# find active sportsactive_sports=client.betting.active_sports()Available endpoints:client.account- login, logout, account preferencesclient.betting- find active sports, competitions, markets. Create and find bet requests.
Package: betdaq
# betdaq
Python wrapper for Betdaq API.[Betdaq Documentation](http://api.betdaq.com/v2.0/Docs/default.aspx)# Installation` $ pip install betdaq `# Usage`python >>> from betdaq.apiclient import APIClient >>> api =APIClient('username','password') >>> sport_ids = api.marketdata.get_sports() >>> all_markets =api.marketdata.get_sports_markets([100005])`
Package: betdaq-cadenza
# betdaq
Python wrapper for Betdaq API.[Betdaq Documentation](http://api.betdaq.com/v2.0/Docs/default.aspx)# Installation` $ pip install betdaq `# Usage`python from betdaq.apiclient import APIClient api =APIClient('username','password') sport_ids = api.marketdata.get_sports() all_markets =api.marketdata.get_sports_markets([100005])`
Package: betdaq_wng
betdaqPython wrapper for Betdaq API.Betdaq DocumentationInstallationpipinstallgit+https://github.com/tavkhelidzeluka/betdaq.gitUsagefrombetdaq.apiclientimportAPIClientapi=APIClient('username','password')sport_ids=api.marketdata.get_sports()all_markets=api.marketdata.get_sports_markets([100005])
Package: betfairlightweight
betfairlightweightLightweight, super fast (uses C and Rust libraries) pythonic wrapper forBetfair API-NGallowing all betting operations (including market and order streaming) and account operations, seeexamples.docsjoin betcode slack groupCurrently tested on Python 3.8, 3.9, 3.10 and 3.11.installation$pipinstallbetfairlightweightTo use C/Rust libraries install with$pipinstallbetfairlightweight[speed]setupIn order to connect to the Betfair API you will need an App Key, SSL Certificates and a username/password.App KeyFollowtheseinstructions to get your app key, you can either use a delayed or live key.SSL certificatesFollowtheseinstructions to set up your SSL certificates. Save your .ctr and .key files to a local directory. The default directory where the library is looking for the keys is '/certs' but you can specify any other directory.Using the libraryThe library can then be used as follows:importbetfairlightweighttrading=betfairlightweight.APIClient('username','password',app_key='app_key',certs='/certs')trading.login()or the following for interactive login with no certs (not as secure)importbetfairlightweighttrading=betfairlightweight.APIClient('username','password',app_key='app_key')trading.login_interactive()event_types=trading.betting.list_event_types()[<EventTypeResult>,<EventTypeResult>,..]Following endpoints are available:trading.logintrading.login_interactivetrading.keep_alivetrading.logouttrading.bettingtrading.accounttrading.navigationtrading.scorestrading.streamingtrading.historicaltrading.in_play_servicetrading.race_cardstreamingCurrently two listeners available, below will run the base listener which prints anything it receives. Stream listener is able to hold an order stream or a market stream (one per listener). The listener can hold a cache and push market_books/order_books out via a queue.Exchange Stream APIfrombetfairlightweight.filtersimport(streaming_market_filter,streaming_market_data_filter,)betfair_socket=trading.streaming.create_stream()market_filter=streaming_market_filter(event_type_ids=['7'],country_codes=['IE'],market_types=['WIN'],)market_data_filter=streaming_market_data_filter(fields=['EX_ALL_OFFERS','EX_MARKET_DEF'],ladder_levels=3)betfair_socket.subscribe_to_markets(market_filter=market_filter,market_data_filter=market_data_filter,)betfair_socket.start()# blockinghistoric dataThe historic endpoint provides some basic abstraction for the historicdata api:Historic Data APItrading.historic.get_my_data()[{'plan':'Basic Plan','purchaseItemId':1343,'sport':'Cricket','forDate':'2017-06-01T00:00:00'}]Taking advantage of the streaming code lightweight can parse/output historical data in the same way it process streaming data allowing backtesting or with a custom listener, csv creation (seeexamples).Historic Datastream=trading.streaming.create_historical_stream(file_path='horse-racing-pro-sample',)stream.start()or use the  stream generator:stream=trading.streaming.create_historical_generator_stream(file_path='horse-racing-pro-sample',)g=stream.get_generator()formarket_booksing():print(market_books)
Package: betfairng
betfairng: A client library for Betfair API-NG==============================================.. image:: https://travis-ci.org/russgray/betfairng.svg?branch=master:target: https://travis-ci.org/russgray/betfairngBetfair API-NG is the next-gen version of the longstanding SOAP-based Betfair API v6. As of November 2014, API-NG will be the only way to programmatically access the Betfair exchange.API-NG is a REST-based design rather than SOAP, and has improved consistency and convention that make it easier to work with. betfairng makes it easier still, with pythonic naming and sensible defaults... code-block:: pycon>>> market_filter = {'eventTypeIds': [7],'marketCountries': ['GB'],'marketTypeCodes': ['WIN'],'sort': 'FIRST_TO_START','from': datetime.now().isoformat()}>>> next_race = api.list_market_catalogue(filter=market_filter, marketProjection=['RUNNER_METADATA'], maxResults=1)[0]>>> book = api.list_market_book(marketIds=['1.114185343'], priceProjection=dict(priceData=['EX_BEST_OFFERS']))betfairng also provides a backwards-compatibility layer so you can continue to use the SOAP naming conventions (e.g. placeBets instead of place_orders, getMarketPrices instead of list_market_book, etc).Installation------------From pypi::pip install betfairngAuthentication--------------Betfair API-NG requires 2-way SSL for non-interactive logins (i.e. for bots or automated tools). Instructions for creating your certificate and registering it with Betfair `can be found on Betfair's website <https://api.developer.betfair.com/services/webapps/docs/x/J4Q6>`_.Once done, simply pass the paths to the .crt and .key files to the authenticate function along with your username and password... code-block:: pycon>>> from betfairng import authenticate>>> cert = ('path/to/file.crt', 'path/to/file.key')>>> resp = authenticate(cert, username, password)>>> resp['loginStatus']u'SUCCESS'>>> resp['sessionToken']u'<some_encoded_token>'
Package: betfair-parser
betfair_parserA simple and fast betfair parser. Why you might like this library:Complete: All betfair (non-vendor) client API includedConventions: The API strictly follows pythonic naming conventionsConsistency: All data is type checked, API requests as well as responsesComfort: All betfair enums and type definitions are included, to support IDE syntax completionClear errors: API errors don't just throw cryptic codes, but contain documentation about that errorCompatible: Use it with any HTTP library you like, including async librariesCheetah fast: Thanks to the magic ofmsgspec, megabytes of input
parse in millisecondsUsagebetfair_parseris built out of API building blocks, that can be used with any HTTP client
you like. All API operations provide.headers(),.body()and a.parse_response()method.Theclientmodule
contains a sample, minimalistic client implementation. It may be used as is with anyrequests-compatible
HTTP client or serve as an example, how to integratebetfair_parserwith other HTTP clients.importrequestsfrombetfair_parserimportclientfrombetfair_parser.specimportaccounts,bettingsession=requests.Session()# or anything similar like httpx.Client()client.login(session,"username","password","app_key")client.request(session,accounts.operations.GetAccountFunds.with_params())# AccountFundsResponse(available_to_bet_balance=10000.0, exposure=0.0,# retained_commission=0.0, exposure_limit=-10000.0, discount_rate=0.0,# points_balance=10, wallet=<Wallet.UK: 'UK'>)# Request with an invalid wallet parameter:client.request(session,accounts.operations.GetAccountFunds.with_params(wallet="AUS"))# >>> AccountAPINGException: INVALID_PARAMETERS: Problem parsing the parameters,#     or a mandatory parameter was not foundclient.request(session,betting.operations.ListCurrentOrders.with_params())# CurrentOrderSummaryReport(current_orders=[], more_available=False)# Support for other countriesfrombetfair_parser.endpointsimportendpointendpoint_cfg=endpoint("ITA")# alpha-3 codeclient.login(session,"username","password","app_key",endpoints=endpoint_cfg)Seetest_live.pyfor more API call examples.ReleasingReleases are published automatically when a tag is pushed to GitHub.# Set next version numberexportRELEASE=x.x.x# Create tagsgitcommit--allow-empty-m"Release$RELEASE"gittag-a$RELEASE-m"Version$RELEASE"# Pushgitpush--tags
gitpush
Package: betfair.py
betfair.py is a Python wrapper for the Betfair APIInstallation$ pip install betfair.pyRequirementsPython >= 2.7 or >= 3.3TestingTo run tests$ py.testApplication KeysYou will need an Application Key to log in to the Betfair API. You can find
instructions for creating a key athttps://api.developer.betfair.com/services/webapps/docs/display/1smk3cen4v3lu3yomq5qye0ni/Application+KeysSSL CertificatesFor non-interactive login, you must generate a self-signed SSL certificate
and upload it to your Betfair account. Betfair.py includes tools for
simplifying this process. To create a self-signed certificate, runinvoke sslThis will generate the following files in thecertsdirectorybetfair.crt
betfair.csr
betfair.key
betfair.pemYou can write SSL certificates to another directory by passing the--nameparameterinvoke ssl --name=path/to/certs/betfairOnce you have generated the files, you can upload thebetfair.crtfile to
Betfair athttps://myaccount.betfair.com/accountdetails/mysecurity?showAPI=1.ExamplesCreate a Betfair client and log infrom betfair import Betfair
client = Betfair('app_key', 'certs/betfair.pem')
client.login('username', 'password')Refresh session tokenclient.keep_alive()Log outclient.logout()List all tennis marketsfrom betfair.models import MarketFilter
event_types = client.list_event_types(
    MarketFilter(text_query='tennis')
)
print(len(event_types))                 # 2
print(event_types[0].event_type.name)   # 'Tennis'
tennis_event_type = event_types[0]
markets = client.list_market_catalogue(
    MarketFilter(event_type_ids=[tennis_event_type.event_type.id])
)
markets[0].market_name                  # 'Djokovic Tournament Wins'AuthorJoshua Carp (jmcarp)LicenseMIT licensed. See the bundledLICENSEfile for more details
Package: betfair-python-rest
Python package of REST API managers (Betting and Accounts APIs)HOW TO INSTALLpip install betfair-python-restCreate your own class based on the one that comes
in the package, indicating the certificate information. Example:class CustomBetFairAPIManagerBetting(BetFairAPIManagerBetting):
    crt_path = os.path.join('home', 'user', 'your_project', 'client-2048.crt')
    crt_key_path = os.path.join('home', 'user', 'your_project-u', 'client-2048.key')Now you can use it like that:api_manager = CustomBetFairAPIManagerBetting(login, password, api_key, log_mode=True)
market_and_locale = MarketFilterAndLocaleForm(text_query='Soccer')
api_manager.list_event_types(request_class_object=market_and_locale)HOW TO USE (with examples)In short, the package is designed like this:managers - API-managers classesforms - Classes which describing the schemes of data inputs for every methodenums - Classes with a list of possible options for parameter values.exceptions - There is just two files: exceptions class and
enum with variables of error code from serverFile with examples of using: example.pyI should clarify a one point: API-methods in Betting branch waiting for
form classes objects, not just arguments array. This was done due to the
fact that many methods accept the same fields,
and sometimes entire sets of fields, and in order to avoid copy-paste
of attributes and docstring into dozens of models, it was decided to
make each method accept an object of the class of the corresponding form.True, this leads to the fact that the fields themselves
are scattered in dozens of classes, which can cause
discomfort when you first familiarize yourself with the package.
I tried to smooth out this flaw a little, accompanying each class with explanations.As a result, if, for example, you want to find the country by the line "land", then
you will need to use the MarketFilterAndLocaleForm class and pass arguments there.
the names are kept exactly and are only slightly adapted to the Pep8 standard, so that
you quickly understand what’s what (especially if autocompletion is included in the IDE)All forms are located in the forms folder and repeat the names
of the requests, so you can easily find them even
without auto-completion (I hope)This feature does not apply to Accounts manager: requests of this
category accept few requests, practically do not repeat among
themselves according to a set of input data. Therefore, there,
at the entrance to the methods, a familiar series
of arguments, not a form.
Package: betfair-scraper
# betfair-scraperThis library helps scraping the sportsbook games and odds from Betfair.com
Scraping is primarily implemented using robobrowser with a mix of API requestsInstallation & Usage
Python 3.8.0 or greater requiredInstall latest stable buildpip install -U betfair_scraperInstall latest development build from GitHubpip install git+https://github.com/meister245/betfair-scraper.git@development
Wiki
Package: betfairstreamer
BetfairstreamerFeaturesRun single or multiple streams simultaneously.Making use numpy arrays to access market price/size.Synchronous and asynchronous streaming.Parse historical data.Installation!! Requires >= 3.8.0Conda installation# If you already have an environment

conda activate your_environment
conda install -c anaconda python=3.8
pip install betfairstreamer==0.8.0

# If not, create an environment with python 3.8

conda create -n your_environment_name python=3.8
conda activate your_environment_name
pip install betfairstreamer==0.8.0Virtual environment installationmkdir your_project
cd your_project
python3.8 -m venv venv
source venv/bin/activate
pip install betfairstreamer==0.8.0Examplessession_token=api_client.get_session_token()soccer_subscription=create_market_subscription(event_type_ids=["1"],country_codes=["DE"],market_types=["MATCH_ODDS"],fields=["EX_MARKET_DEF","EX_LTP","EX_BEST_OFFERS_DISP"],ladder_levels=2,)order_subscription=create_order_subscription()connection_pool=BetfairConnectionPool.create_connection_pool(subscription_messages=[soccer_subscription_message,order_subscription_message],app_key=APP_KEY,session_token=session_token)forstream_updateinconnection_pool.read():print(stream_update)Jupyter notebooks available in ./examplesBenchmarkSetup: Two processes, one sending betfair stream messages , one receiving.

Hardware: I7 8550U, 16GB ram

Results: 
 * Using a market cache it can read around ~90k decoded messages/second
Package: beth
♟ Welcome tobethdocumentationbethis an open source chess AI framework. Like many, I re-discovered the game of chess by watching the Netflix showthe Queen's Gambit. As a Data Scientist, it made we want to learn and explore the beauty of the game.At first my goal was to develop algorithms to help me learn chess. But over time, it lead to developing more and more features. What you will find is my personal experiments open sourced as a chess framework. I hope this framework to be ideal for chess programmers in Python to ease the development of new algorithms and engines.This repo is under active development, many features are still experimental.
But please fill free to fork or PRInstallationYou can install the library from PyPi with:pip install bethOr clone and install from sourceFeaturesDefinition of a game environment usingpython-chessframework, with move parsing, board-to-numpy abstractions, PGN records, move replay.Playing chess in Jupyter notebooks with widgetsDifferent player abstractions:HumanPlayer(),RandomPlayer(),AIPlayer()- to play Human vs AI, Human vs Human, or AI vs AI.Connection to Stockfis engine to evaluate engine performances, available withStockfishAI()object abstractionRules-based engineTreeSearchAI()with minimax tree search, alpha beta pruning, move ordering and board heuristics (~ELO 1000)First attempt of ML engine with a LSTM Neural Network to predict next movesNext roadmap featuresIf you are interested, please drop an issue or a PR, or contact me byemail. Meanwhile the roadmap forbethis:Implementing a GUI (or connecting to an existing one) to ease experimentationELO or TrueSkill measurement for any engineImproving minimax engine speedDeveloping ML engines:Self supervised learning with TransformersReinforcement LearningRepo Structure- beth/
- data/
    - raw/
    - processed/
- docs/                             # Documentation folder and website (.md, .ipynb) using Mkdocs
- notebooks/                        # Jupyter notebooks only (.ipynb)
- tests/                            # Unitary testing using pytest
- .gitignore
- LICENSE                           # MIT License
- poetry.lock                       # Poetry lock file
- pyproject.toml                    # Configuration file to export and package the library using Poetry
Package: bethany
A command line tool to list all BUG, TODO, HACK, NOTE, and FIXME keywords in your code.⚙️ Installationpipinstallbethany🖥️ UsageYou can easily usebethanyas follows:bethany<filename>For example,bethany tests/file1 tests/file2will return:🔩 OptionsContinuous modeContinuous mode is enabled using flag-cor--continuous. Headers and separators are removed from the output in continuous mode.For example,bethany -c tests/file1 tests/file2will return:📝 LicenseDistributed under the GPLv3 License. SeeLICENSEfor more information.📬 ContactRaul Tapia-raultapia@us.es