Saravanan666/pypi-org huggingface dataset:
Package: fastavro
fastavroBecause the Apache Pythonavropackage is written in pure Python, it is
relatively slow. In one test case, it takes about 14 seconds to iterate through
a file of 10,000 records. By comparison, the JAVAavroSDK reads the same file in
1.9 seconds.Thefastavrolibrary was written to offer performance comparable to the Java
library. With regular CPython,fastavrouses C extensions which allow it to
iterate the same 10,000 record file in 1.7 seconds. With PyPy, this drops to 1.5
seconds (to be fair, the JAVA benchmark is doing some extra JSON
encoding/decoding).fastavrosupports the following Python versions:Python 3.8Python 3.9Python 3.10Python 3.11Python 3.12PyPy3Supported FeaturesFile WriterFile Reader (iterating via records or blocks)Schemaless WriterSchemaless ReaderJSON WriterJSON ReaderCodecs (Snappy, Deflate, Zstandard, Bzip2, LZ4, XZ)Schema resolutionAliasesLogical TypesParsing schemas into the canonical formSchema fingerprintingMissing FeaturesAnything involving Avro's RPC featuresDocumentationDocumentation is available athttp://fastavro.readthedocs.io/en/latest/Installingfastavrois available both onPyPIpip install fastavroand onconda-forgecondachannel.conda install -c conda-forge fastavroContributingBugs and new feature requests typically start as GitHub issues where they can be discussed. I try to resolve these as time affords, but PRs are welcome from all.Get approval from discussing on the GitHub issue before opening the pull requestTests must be passing for pull request to be consideredDeveloper requirements can be installed withpip install -r developer_requirements.txt.
If those are installed, you can run the tests with./run-tests.sh. If you have trouble
installing those dependencies, you can rundocker build .to run the tests inside
a Docker container. This won't test on all versions of Python or on PyPy, so it's possible
to still get CI failures after making a pull request, but we can work through those errors
if/when they happen..run-tests.shonly covers the Cython tests. In order to test the
pure Python implementation, comment outpython setup.py build_ext --inplaceand re-run.NOTE: Some tests might fail when running the tests locally. An example of this
is this codec tests. If the supporting codec library is not available, the test
will fail. These failures can be ignored since the tests will on pull requests
and will be run in the correct environments with the correct dependencies set up.ReleasingWe release both toPyPIand toconda-forge.We assume you havetwineinstalled and that you've created your own
fork offastavro-feedstock.Make sure the tests passRunmake tagWait for all artifacts to be built and published the the Github releaseRunmake publishThe conda-forge PR should get created and merged automaticallyChangesSee theChangeLogContactProject Home
Package: fastavro-codecs
===============fastavro-codecs===============.. image:: https://img.shields.io/pypi/v/fastavro-codecs.svg        :target: https://pypi.python.org/pypi/fastavro-codecs.. image:: https://img.shields.io/pypi/pyversions/fastavro-codecs.svg        :target: https://pypi.python.org/pypi/fastavro-codecs.. image:: https://readthedocs.org/projects/fastavro-codecs/badge/?version=latest        :target: https://readthedocs.org/projects/fastavro-codecs/?badge=latest        :alt: Documentation Status.. image:: https://img.shields.io/travis/rolando/fastavro-codecs.svg        :target: https://travis-ci.org/rolando/fastavro-codecs.. image:: https://codecov.io/github/rolando/fastavro-codecs/coverage.svg?branch=master    :alt: Coverage Status    :target: https://codecov.io/github/rolando/fastavro-codecs.. image:: https://landscape.io/github/rolando/fastavro-codecs/master/landscape.svg?style=flat    :target: https://landscape.io/github/rolando/fastavro-codecs/master    :alt: Code Quality Status.. image:: https://requires.io/github/rolando/fastavro-codecs/requirements.svg?branch=master    :alt: Requirements Status    :target: https://requires.io/github/rolando/fastavro-codecs/requirements/?branch=masterFastavro codecs.* Free software: MIT license* Documentation: https://fastavro-codecs.readthedocs.org.* Python versions: 2.7, 3.4+Features--------FIXMEAvailable codecs::apt-get install libsnappy-dev liblzo2-devCommand line wrapper... code::   $ python -m fastavro_codecs --codecs  brotli  deflate  lz4  lzma  lzo  null  snappy  xz  zstdQuickstart----------FIXMECredits-------This package was created with Cookiecutter_ and the `rolando/cookiecutter-pypackage`_ project template... _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`rolando/cookiecutter-pypackage`: https://github.com/rolando/cookiecutter-pypackage=======History=======0.1.0-dev (unreleased)----------------------* First release on PyPI.
Package: fastax
fastaxOverviewfastax is a Deep Learning Library built on top of Google'sJAXthat tries to
facilitate doing research by providing a combination of JAX's versatility with implementations of
the most used neural networks layers and utilities.More concrete information and namingfastax is both a combination of fastai and JAX and fastai and stax:It is built on top of JAX and most of its original code comes from its Neural Network mini-library staxOne of the long term goals of this library is implementing Jeremy Howard's fastai course"Deep Learning From the Foundations"For more information visithttps://github.com/joaogui1/fastax
Package: fastbase
FastbaseDEV MESSAGE: Fastbase is currently still in development and in its current state is unfit for production. Check
back again for updates.Role-based Access Contral (RBAC) via Firebaseidtokenauthententication using FastAPI and SQLModel.Documentation:https://enchance.github.io/fastbase/class/fastbase/InstallationpipinstallfastbaseorpoetryaddfastbaseOverviewFastbase assumes a headless setup using a frontend such as React, Angular, etc.API Endpoints:Managed by FastAPIAuthentication:Managed by Firebase AuthAuthorization:Managed by FastbaseDatabase ORM:SQLModelFastbase processAuthentication happens in the frontend (JS) using the official Firebase JS package. Anidtokenwill be
generated if successful.Insert this token in yourAuthorizationheader (Bearer <idtoken>) when hitting restricted APIs.Upon reaching the server theidtokenis verified.EndpointsTo followDependenciesTo followSample Codemodels.pyYour requiredUsermodel. Optional models includeTaxonomyModandOptionModwhich should be extended if you want
to use them. Add any additional fields you need.fromfastbase.modelsimportUserMod,TaxonomyMod,OptionMod# RequiredclassUser(UserMod,table=True):__tablename__='auth_user'# Add any fields and methods you need# OptionalclassTaxonomy(TaxonomyMod,table=True):__tablename__='app_taxonomy'# Add any fields and methods you need# OptionalclassOption(OptionMod,table=True):__tablename__='app_option'# Add any fields and methods you needmain.pyInitialize Fastbasefromsqlalchemy.ext.asyncioimportcreate_async_enginefromfastapiimportFastAPIfromfastbaseimportFastbasefromcontextlibimportasynccontextmanagerfrom.modelsimportUser# .env fileDATABASE_URL='postgresql+asyncpg://user:password@localhost:5432/dbname'# DB engineengine=create_async_engine(DATABASE_URL,echo=True,pool_size=10)@asynccontextmanagerasyncdeflifespan(_:FastAPI):"""Insert in lifespan events on start: https://fastapi.tiangolo.com/advanced/events/"""fbase=Fastbase()fbase.initialize(engine=engine,user_model=User)print('RUNNING')yieldprint('STOPPED')
Package: fastbay
Official docs for FastBay.InstallationTo useFastBay, first install it using pip:pip install fastbayUsageFirstly you need to import FastBay to your project. To do so, use:from fastbay import fbayNOTEPlease be careful as sometimes you will need to provide the whole name of a torrent.Example:WRONG: charlie and the chocoRIGHT: charlie and the chocolate factoryLet's see how to get a torrent title.from fastbay import fbay

fbay = fbay('poirot')
print(fbay.title())As you can see here, we are firstly importing fastbay and after that on line 3, we are providing the name of the torrent.Now let's have a look on how to get the download link for our torrent.from fastbay import fbay

fbay = fbay('poirot')
print(fbay.link())Final step is to get some info about the file we are going to download. To get that, we will use:from fastbay import fbay

fbay = fbay('poirot')
print(fbay.info())Now let's get this all by simply using:from fastbay import fbay

fbay = fbay('poirot')
print(fbay.title())
print(fbay.link())
print(fbay.info())
Package: fastbencode
fastbencodefastbencode is an implementation of the bencode serialization format originally
used by BitTorrent.The package includes both a pure-Python version and an optional C extension
based on Cython.  Both provide the same functionality, but the C extension
provides significantly better performance.Example:>>> from fastbencode import bencode, bdecode
>>> bencode([1, 2, b'a', {b'd': 3}])
b'li1ei2e1:ad1:di3eee'
>>> bdecode(bencode([1, 2, b'a', {b'd': 3}]))
[1, 2, b'a', {b'd': 3}]Licensefastbencode is available under the GNU GPL, version 2 or later.CopyrightOriginal Pure-Python bencoder (c) Petru PalerCython version and modifications (c) Canonical LtdSplit out from Bazaar/Breezy by Jelmer Vernooĳ
Package: fast-bencode
✨ fast-bencode ✨The cython version of bencodeforked frombencodeto support latest version of pythonextra cython extension to speeduptypingwith mypy checkUsagefrompprintimportpprintfrombencodeimportbdecode,bencodewithopen("test.torrent","rb")asf:data=f.read()raw=bdecode(data)pprint(raw)assertbencode(raw)==dataThere are alias functionloadsforbdecodeanddumpsforbencodebuildgitclonehttps://github.com/synodriver/fast-bencode.gitcdfast-bencode
pythonsetup.pybuild_ext-i
Package: fastbet
fastbetfromIPython.displayimportHTMLimportpandasaspdfromfastbet.config.mongoimportmongo_initfromfastbet.datastructure.data_extractorimportdata_aggregatorfromfastbet.environmentimportBettingEnvInstallpipinstallfastbetConfigIn order to connect to themongodatabase we require some connection
parameters defined intomlformat and should be read when the library
is loaded. The package will look first under/secrets/config.tomlor
in the environment variableBETTING_ENV_CONFIG. An example ofconfigfile is provided with the package and will be used by default. It is the
user’s responsibility to make sure this file is saved at the right
location if you want to use your own.Let’s start by registering the connection to the mongo database:mongo_init(db_host="public_atlas")Simplified betting environmentThe punter starts with$N(N>0) in his Bank account and can use them
to place bets on severalfootballgames.He is offered the option to bet on the 3 main markets:1X2(home/draw/away),Asian handicapandTotal(Over/Under)(we focus on
the even line) and is only allowed to place asmall,medium, orbigstake onone and only oneof the 7 possible selectionshome team win,away team win, ordraw(1X2case) orhomeoraway(Asian handicapandTotal) or skip the betting opportunity.
At each step, the punter is presented with some information about a game
and the associated betting opportunities. If he decides to bet, he
receives arewardthat could bepositive(profit) ornegative(loss of his stake). His balance is then updated accordingly and he
moves to the next step i.e next game. An episode ends when the punter
goes bankrupt (Balance <= 0) or if no more betting opportunities are
available.Load gamesfixtures=data_aggregator(limit=10)Init environmentenv=BettingEnv(fixtures)max_steps_limit=fixtures.shape[0]Playing random choices# Init RL env.env.reset()# Init done Flag to False.done=False# Init loop counter.i=0# Stops when it is done or when we have bet on all provided games.whilenotdoneandi<max_steps_limit:# Make a step.obs,reward,done,info=env.step(env.action_space.sample())# Increment counter.i=i+1Playing Medium Stake on Home Team Win (1X2)# Init RL env.env.reset()# Init done Flag to False.done=False# Init loop counter.i=0# Stops when it is done or when we have bet on all provided games.whilenotdoneandi<max_steps_limit:# Make a step.obs,reward,done,info=env.step(2)# Increment counter.i=i+1
Package: fastbill
Super thin Python wrapper for Fastbill’s HTTP API developed bySTYLIGHT.Latest release:fastbill 0.7.3Bugfix release. In the case of an successful HTTP response without a valid
JSON structure the wrapper would crash.Tests which would catch this bug were not run due to test misconfiguration.
This is fixed as well.fastbill 0.7.2Add configurable timeout to all API calls. The default timeout is 1 minute.This could lead to unexpected timeout exceptions, you’ll need to handle.fastbill 0.7.1Bugfix release for name parameter.fastbill 0.7.0Warning: This release has a bug. The ‘name’ parameter will break on str
types on Python2. Use 0.7.1 instead.Potentially breaking change: Restructure fastbill module into package
with each component having it’s own module. Your imports may break.fastbill 0.6.1Added mock library to setup.pyfastbill 0.6.0Breaking change: Don’t throw a KeyError, but rather an AttributeError on FastbillResponse.currency propertyAdd pre- and post-request callbacksfastbill 0.5.2Added NOK to CURRENCIES dict.fastbill 0.5.1Support pickling ofFastbillResponseobjects. The link to the API connection
will not be pickled though. API credentials will also not be pickled.fastbill 0.5.0Introducenameparameter to better distinguishFastbillWrapperinstances.fastbill 0.4.3Bugfix release.Calls to potential special methods like __unicode__ would lead to an
erroneous Fastbill API call.fastbill 0.4.2Improved debug logging.Deprecated `FastbillHttpError` Execption.Now onlyFastbillResponseErrorwill be raised.FastbillResponseErrorwill inherit fromFastbillHttpErrorfor the time being, but catchingFastbillHttpErroris deprecated. UseFastbillResponseErrorinstead.Improved testcase to check for failing API calls as well.fastbill 0.4.1Experimental:ImprovedFastbillResponseto allow ORM like object
traversals. Use with caution.Added propertycurrencywhich looks up the proper ISO 4217 currency
abbreviation when a CURRENCY_CODE integer is present in the response. AnAttributeErrorwill be raised when it’s not present.Limitations:only supports JSON payloadsdoesn’t (overly) check for consistency of responsesdoesn’t convert date strings to datetime objectsDependencies:requestssix (for Python 2/3 compatibility)Installation:pip install fastbillUsage:fromfastbillimportFastbillWrapper# Construct the api client for Fastbill's automatic APIclient=FastbillWrapper('fastbill_user','fastbill_key')# You can also specify a service_url, in case you need Fastbill's core API instead:core_client=FastbillWrapper('fastbill_user','fastbill_key',service_url='endpoint_url')# Make requests, e.g. service customer.createclient.customer_create(data={})# Search for customer, subscriptions, etc...forcustomerinclient.customer_get(filter={'city':'Munich'}):printcustomer# But you can also see the full resultresult=client.customer_get(filter={'city':'Munich'})printresult.keys()# Will give you 'CUSTOMERS'
Package: fastblocks
FastBlocksFastBlocks is an asynchronous web application, inspired by FastApi
and based on Starlette, flavoured for rapid delivery of server-side
rendered HTMX/Jinja template blocks.FeaturesAsynchronous Component BaseAsynchronousJinja template loaders, environment&template renderingIntegrated asynchronousJinja PartialsandJinja FragmentsHTMX supportClient-side Redis cachingPydantic v2 / SQLModel supportDependency injectionGetting StartedAcknowledgementsLicenseBSD-3-Clause
Package: fastBloomFilter
Simple and fast pythonic bloomfilterFrom wikipedia: "A Bloom filter is a space-efficient probabilistic data structure, conceived by Burton Howard Bloom in 1970, that is used to test whether an element is a member of a set. False positive matches are possible, but false negatives are not – in other words, a query returns either "possibly in set" or "definitely not in set". Elements can be added to the set, but not removed (though this can be addressed with a "counting" filter); the more elements that are added to the set, the larger the probability of false positives."This filter supports:- Saving, reloading, compressed bloomfilter file lrzip like
        for compression: lz4>lzo>zlib>bz2>lzma
        for decompression: lzma>bz2>zlib>lzo>lz4
- Stats
- Entropy analysis
- Internal and external hashing of data.
- raw filter mergingInstalling:sudo pip install fastbloomfilterExternal creating of the bloom filter file:python mkbloom.py /tmp/filter.blfImporting:from fastBloomFilter import bloom
bf = bloom.BloomFilter(filename='/tmp/filter.blf')Adding data to it:bf.add('30000')
bf.add('1230213')
bf.add('1')Adding data and at the same time querying it:print(bf.update('1')) # True
print(bf.update('1')) # True
print(bf.update('2')) # False
print(bf.update('2')) # TruePrinting stats:bf.stat()Or:bf.info()Querying data:print(bf.query('1')) # True
print(bf.query('1230213')) # True
print(bf.query('12')) # FalseContributons:
    Are welcome!
Package: fastbm25
InstallationThe easiest way to install this package is through pip, usingpip install fastbm25fastbm25The fast bm25 algorithm for text match optimized by reverted index. So the complexity will be no more than O(N(log N)).（利用倒排索引加速的bm25文本匹配算法，从一堆数据中寻找最相似的文本）usagefind top k similar sentences from corpus; Note you should tokenize text and use stop words in advancefrom fastbm25 import fastbm25

corpus = [
    "How are you !",
    "Hello Jack! Nice to meet you!",
    "I am from China, I like math."
]
tokenized_corpus = [doc.lower().split(" ") for doc in corpus]
model = fastbm25(tokenized_corpus)
query = "where are you from".lower().split()
result = model.top_k_sentence(query,k=1)
print(result)The result is list of tuple like[('I am from China, I like math.', 2, -0.06000000000000001)]For some language like Chinese that doesn't need tokenization. you can use this examplefrom fastbm25 import fastbm25

corpus = [
    "张三考上了清华",
    "李四考上了北大",
    "我烤上了地瓜.",
    "我们都有光明的未来."
]
model = fastbm25(corpus)
query = "我考上了大学"
result = model.top_k_sentence(query,k=1)
print(result)[('李四考上了北大', 1, 1.21)]find document pair similarity  between document a and document bNote that a and b don't need to be included in the reference corpus;from fastbm25 import fastbm25
corpus = [
    "How are you !",
    "Hello Jack! Nice to meet you!",
    "I am from China, I like math."
]
tokenized_corpus = [doc.lower().split(" ") for doc in corpus]
model = fastbm25(tokenized_corpus)
document_a = "where are you from".lower().split()
document_b = "where are you".lower().split()

result = model.similarity_bm25(document_a,document_b)
print(result)1.944187075527278
Package: fast-boltzmann
Welcome tofast_boltzmannfast_boltzmannis a Python package developed for the fast computation of the Boltzmann Entropy (also known as configurational entropy) for a two-dimensional numerical or nominal data array. This package focuses on streamlining the sliding window-based computation procedure to achieve lightweight, fast, and user-friendly calculations. It does this by utilizing matrix calculations and vectorized functions.InstallationYou can easily install this package usingpip:pipinstallfast_boltzmannDependenciesnumpy (>= 1.20.0)Example usageCalculate the Boltzmann Entropy of the first band and the average of all bands in a multi-spectral Landsat raster image.>>>importfast_boltzmannasfb>>>fromosgeoimportgdal>>>img_array=gdal.Open('./example/example_multispectral_image.tif').ReadAsArray()>>>img_array.shape# Check whether the data array has 2 dims.(6,500,500)# The data array has 3 dims. Extracting each band is required.>>>img_array.dtype# Check whether the datatype is integer.dtype('uint16')# The datatype is non-negative integer that meets the requirement.>>>b1=img_array[0,:,:]# Take the first band as an example.>>>b1_bnu=fb.BoltzNumerical(b1)>>>BE_b1=b1_bnu.get_boltzmann_numerical()# resampling-based method, relative BE, normlize to all pixels>>>round(BE_b1,4)8.6047>>>res_list=[fb.BoltzNumerical(img_array[i,:,:]).get_boltzmann_numerical()foriinrange(img_array.shape[0])]>>>res_list# Store BE values for all bands in a list[8.60467561853229,9.03175324743007,9.853283840481888,9.992600722500507,10.293043710639683,10.09777221607461]>>>BE_img_average=sum(res_list)/img_array.shape[0]# Calculate the average BE value of the image>>>round(BE_img_average,4)9.6455LimitationCurrently, onlynon-negative integerarrays can be used to calculate the Boltzmann Entropy. If your data range is between 0-1, you may consider multiplying the data array by 10 or 100 and taking it to integer, or extending it to an integer range of 0-255. If you are fairly certain that the array can besafelyconverted to the integer, please usedata=data.astype(‘int’).For the aggregation-based method, there may be dangling pixels that cannot be covered by the 2*2 window/chunk. The input data array may lose some features as these pixels are removed in the computation.Please refer to the references listed below for more information.ReferencesGao, P., Zhang, H., & Li, Z. (2017). A hierarchy-based solution to calculate the configurational entropy of landscape gradients. Landscape ecology, 32(6), 1133-1146.Gao, P., & Li, Z. (2019a). Aggregation-based method for computing absolute Boltzmann entropy of landscape gradient with full thermodynamic consistency. Landscape Ecology, 34(8), 1837-1847.Gao, P., & Li, Z. (2019b). Computation of the Boltzmann entropy of a landscape: A review and a generalization. Landscape Ecology, 34(9), 2183-2196.
Package: fastbook-questions
fastbook-questionsA tiny script to extract the end-of-chapter fastbook questions to their own notebooks.This file will become your README and also the index of your documentation.Installpip install git+fastbook_questionsHow to useCallfastbook_extractfrom the command line to extract all the questions to their own notebooks with cells for your answers.Optional Arguments:fastbook_extract src_path dst_path collate
Package: fastbooru
fastbooru[anon@computer~]$fastbooru--help

usage:fastbooru[options]{tags}{directory}Fastestgelbooruimagedownloader.
MadebyCloud11665,undertheGNUgplv3license.
https://github.com/cloud11665/fastbooru

optionalarguments:-h,--helpshowthishelpmessageandexit-e,--explicitshowexplicitimages-n,--numberINTnumberofimages-a,--apiSTRuseacustomapikey-w,--workersINTuseacustomamountofdownloadworkersinstallationstablepipinstallfastboorulatestpipinstallgit+https://github.com/Cloud11665/fastbooru.git@master
Package: fastbootpy
FastbootpyFastbootpy is based on pyusb and using libusb1 for USB communications.InstallationpippoetryaddfastbootpypoetrypoetryaddfastbootpySupported fastboot commandsgetvardownloaduploadflasherasebootcontinuerebootExamplesAll examples of using library you can find in folder examples.Get and display all fastboot devices which are connected with pc via usb.fromfastbootpyimportFastbootManagerdefmain()->None:fastboot_devices=FastbootManager.devices()print("fastboot_devices:",fastboot_devices)if__name__=="__main__":main()Boot device into regular mode.fromfastbootpyimportFastbootDevicedefmain()->None:serial="emulator-5554"device=FastbootDevice.connect(serial)device.boot()if__name__=="__main__":main()Getvar command example.fromfastbootpyimportFastbootDevice,FastbootManagerdefmain()->None:fastboot_devices=FastbootManager.devices()serial=fastboot_devices[0]device=FastbootDevice.connect(serial)result=device.getvar("all")print("result:",result)if__name__=="__main__":main()
Package: fastbootstrap
fastbootstrapFast Python implementation of statistical bootstrapInstallationpipinstallfastbootstrapUsageimportnumpyasnpfromfastbootstrap.bootstrapimporttwo_sample_bootstrapn=10000sample_1=np.random.exponential(scale=1/0.001,size=n)sample_2=np.random.exponential(scale=1/0.00101,size=n)p_value,boot_mean,boot_conf_interval=two_sample_bootstrap(sample_1,sample_2,plot=True)Check interactive notebookhere