Saravanan666/pypi-org huggingface dataset:
Package: fat-wheel
Fat Wheel are basically wheels which include dependencies inside whl/tar/egg distribution
similar in java we build a fat jar and run app from jar which have deps in inside the jar
Fat Wheel try to solve to problems.you just build the fat-wheel and install and run itas dist have same deps inside when built and same deps install on use siteshare code and install deps when have no internet connection(which is not a problem today ;-))Installpip install fat-wheelUsageBUILD FAT WHEELproject_root_dir_path : requiredpkg_name : required for fat wheel generationversion: optional/ default use setup.py versionfat <project_root_dir_path> --pkg_name <pkg.name> --version 1.0.0
<OR Shortcut>
fat <project_root_dir_path> -pn <pkg.name> --v 1.0.0installation of fat-wheel cmdpip install your-fat-wheelinstall-<name-in-setup>above cmd will install deps from local deps dir in your pkgbehind the scene for debuggingread fat-wheel.yaml to specify to files/folder to include <will add files/folder to include from .gitignore>it will create project copy in build dir with dir name <project-name>-v<version>-<timestamp>find fat wheel in dist/<version>/ folderfind deps folder in which contain all dowloaded deps and runner.py which install these depstake a look at updated setup.pyBuild Options available-pn PKG_NAME,
--pkg_name PKG_NAME
                      project pkg name (example|my.utils|my)
-v VERSION,
--version VERSION
                      set build version
-fb, --fat-build      create fat  source dist with all dependencies
-fw, --fat-wheel      build fat wheel with all dependencies

< --pkg_name, --version only work for fat option>

-b, --build           build source dist without dependencies
-w, --wheel           build wheel file without dependencies
-e, --egg             build egg file without dependenciesfat-wheel.yamlinclude:
  - fat_wheel
  - setup.py
  - requirements.txt
  - doc
<sub folder also included>
<not supported below options>
pkg_name: fat_wheel
version: 1.2.2
build: wheelnot supported yetcurrently only support flat-layout means root pkg in project root dirproject-root-dir
 |
 |--pkg
 |   |--__init__.py
 |   |....
 |....fat egg file able to build error in install*still in development may or may not support it*
Package: faucetml
Faucet MLFaucet ML is a Python package that enables high speed mini-batch data reading & preprocessing from BigQuery for machine learning model training.Faucet ML is designed for cases where:Datasets are too large to fit into memoryModel training requires mini-batches of data (SGD based algorithms)Features:High speed batch data reading from BigQueryAutomatic feature identification and preprocessing via. PyTorchIntegration withFeastfeature store (coming soon)Installationpip install faucetmlMore about FaucetMany training datasets are too large to fit in memory, but model training would benefit from using all of the training data. Naively issuing 1 query per mini-batch of data is unnecessarily expensive due round-trip network costs. Faucet is a library that solves these issues by:Fetching large "chunks" of data in non-blocking background threadswhere chunks are much larger than mini-batches, but still fit in memoryCaching  chunks locallyReturning mini-batches from cached chunks in O(1) timeExamplesSeeexamplesfor detailed ipython notebook examples on how to use Faucet.# initialize the client
fml = get_client(
    datastore="bigquery",
    credential_path="bq_creds.json",
    table_name="my_training_table",
    ds="2020-01-20",
    epochs=2,
    batch_size=1024
    chunk_size=1024 * 10000,
    test_split_percent=20,
)# train & test
for epoch in range(2):

    # training loop
    fml.prep_for_epoch()
    batch = fml.get_batch()
    while batch is not None:
        train(batch)
        batch = fml.get_batch()

    # evaluation loop
    fml.prep_for_eval()
    batch = fml.get_batch(eval=True)
    while batch is not None:
        test(batch)
        batch = fml.get_batch(eval=True)Future featuresSupport more data warehouses (redshift, hive, etc.)Support reading features & preprocessing specs fromFeastSuggestions for other features? Open an issue and let us know.
Package: faultdiagnosistoolbox
Fault Diagnosis Toolbox is a Python package for analysis and design of fault diagnosis systems for dynamic systems,
primarily described by differential-algebraic equations. Key features of the toolbox are extensive support for
structural analysis of large-scale dynamic models, fault isolability analysis, sensor placement analysis,
and code generation in C/C++ and Python.The toolbox is an adaptation of our Matlab toolbox that can be downloaded fromhttps://faultdiagnosistoolbox.github.iowhere you
can also finddocumentation. The latest version of the python package can always be pip-installed.For a quick introduction, see theuse casewhere an industrial
size example, an automotive engine, is analyzed, C-code for residual generators is generated, and the resulting
diagnosis system is evaluated on test-cell measurements from our engine laboratory.If you use this toolbox in your research, please cite any relevant papers of ours, see list ofreferencesfor details.The toolbox is freely available under a MIT license.
Package: faultsim
faultsimBasic combinational logic circuit fault simulationPython 3.6+ requiredExampledownload the module and importimportfaultsimassimbuild the stuck-at faults example circuit insection 1.3.2.1 of the textbook [1]X1=sim.Node("X1")X2=sim.Node("X2")X3=sim.Node("X3")NOT1=sim.NOT("NOT1")AND1=sim.AND("AND1")AND2=sim.AND("AND2")OR1=sim.OR("OR1")X1.connect(AND1.A)X2.connect(AND1.B,NOT1.A)X3.connect(AND2.B)NOT1.Q.connect(AND2.A)AND1.Q.connect(OR1.A)AND2.Q.connect(OR1.B)PI=sim.NodeList(X1,X2,X3)PO=sim.NodeList(OR1.Q)run simulation without faultPI.setbitstr('000')PI.propagate()ans=PO.getbitstr()assign fault and re-run simulationX3.stuckat=1PI.setbitstr('000')PI.propagate()ans=PO.getbitstr()Reference:[1] Wang et al. (2006). VLSI Test Principles and Architectures: Design for Testability. Elsevier Publish.
Package: faultylambdasensor
faultylambdasensorPython Package for determining the Air:Fuel Ratio, Lambda Value from the Fuel Maps and Spark Angle from the Ignition Map.IntroductionAn exhaust gas oxygen sensor, also known as lambda sensor, is a device for measuring the oxygen proportion in the exhaust gas being analyzed. The sensor is part of the emissions control system and provides data to the engine management computer. The input from the oxygen sensor is used to balance the fuel mixture. It was developed by the Robert Bosch company in the 1960's. This sensor enables the engine to run as efficiently as possible and also reduce exhaust emissions. The exhaust oxygen sensor includes a sensing portion that is exposed to the exhaust gas stream to detect residual oxygen in the exhaust gas and transmit the data to the control unit. A control unit fine-tunes the electric pulses transmitted to the fuel injectors. It includes a zirconia ceramic tube that is covered by a louvred metal shroud to protect it from breaking. A wire contacts the inner surface of the tube through a spring and an electrode bush. The inner and outer surfaces of the tube are covered with a porous platinum layer, which makes the tube act as a porous, solid electrolyte. The tube becomes a conductor at temperatures around 350°C, and detects the oxygen level in exhaust gas by creating a voltage.ApplicationsThe exhaust oxygen sensors are used in determining if the air-fuel mixture is rich or lean.Modern park-ignited combustion engines employ oxygen sensors and catalytic converters to ensure that engines burn their fuel efficiently and cleanly in order to reduce exhaust emissions.Thus, these sensors also help in reducing the amounts of both unburnt fuel and oxides of nitrogen entering the atmosphere.Since oxygen sensors are located in the exhaust stream, they do not measure the amount of air or the fuel entering the engine directly.However, when information from oxygen sensors is combined with information from other sources, it can be used to indirectly determine the air-fuel ratio.FeaturesCalculate the Air:Fuel RatioCalculate the Lambda ValueCalcuate the Spark Angle of the EngineSupportCross Platform Support for all OSExamplesInstallationpip install faultylambdasensorCalculating the Air:Fuel RatiofromfaultylambdasensorimportFLSafr=FLS.airfuelratio(load=150,rpm=1500)print(afr)Calculating the Lambda ValuefromfaultylambdasensorimportFLSl_v=FLS.lambdavalue(load=150,rpm=1500)print(l_v)Calculating the Spark AnglefromfaultylambdasensorimportFLSs_a=FLS.sparkangle(load=150,rpm=1500)print(s_a)Contributing to faultylambdasensorTodos-[x] Code Completion-[ ] Add Standard Documentation (Mk Docs)-[ ] Add Fuel Maps and Ignition Maps of All avaliable Engines-[ ] Replace the interp2d scipy function with custom one to replace the overall package sizeCode of ConductEveryone interacting in thefaultylambdasensorproject's codebases, issue trackers, anddiscussion forums is expected to follow the [PyPA Code of Conduct].LicenseMIT License
Package: fauna-easy
Fauna Easy PythonA convenient wrapper around faunadb for python that abstracts away FQL code for the database service faunadbInstallationUse the package managerpipto install fauna-easy.pipinstallfauna_easyQuickStartfromfauna_easy.base_modelimportFaunaEasyBaseModelfrompydanticimportBaseModelfromfaunadb.clientimportFaunaClientif__name__=='__main__':classNewPost(BaseModel):title:strcontent:strfauna_client=FaunaClient('YOUR_CLIENT_SECRET')Post=FaunaEasyBaseModel('posts',NewPost)create_query=Post.create({'title':'my post title','content':'my post content'})# Will not automatically create document in database. This merely creates the querycreated_documents=fauna_client.query(create_query)# creates document in databaseprint(created_documents)DocumentationStill under development :)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseApache License 2.0
Package: faust-aioeventlet
This is a fork of [aioeventlet](https://github.com/magma/deb-python-aioeventlet)
that contains some patches for more recent versions of Python used in the Magma
project. It is not maintained except for ensuring compatibility with Magma.aioeventlet implements the asyncio API (PEP 3156) on top of eventlet. It makes
possible to write asyncio code in a project currently written for eventlet.aioeventlet allows to use greenthreads in asyncio coroutines, and to use
asyncio coroutines, tasks and futures in greenthreads: seelink_future()andwrap_greenthread()functions.The main visible difference between aioeventlet and trollius is the behaviour
ofrun_forever():run_forever()blocks with trollius, whereas it runs
in a greenthread with aioeventlet. It means that aioeventlet event loop can run
in an greenthread while the Python main thread runs other greenthreads in
parallel.faust-aioeventlet documentationaioeventlet project in the Python Cheeseshop (PyPI)aioeventlet project at BitbucketCopyright/license: Open source, Apache 2.0. Enjoy!
Package: faust-avro
Faust AvroAvro codec and schema registry support for Faust.Getting StartedFirst Time SetupGetasdfInstall python:asdf install pythonGetpoetrycurl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | pythonAs with any code asking you to do this from the internet, you should really first download get-poetry.py and inspect it to make sure it doesn't do anything bad, then run the copy you inspected.Or you can justpip install poetryto stick it inside the main python install by asdf. If you switch python versions and get errors about reshimming poetry, that version of python doesn't have poetry installed.Install needed packagespoetry installActivate environmentMost directions here assume you have the poetry-created virtualenv active. Some form ofsource .venv/bin/activate(orsource .venv/bin/activate.(csh|fish)) should activate the environment for you, or you can configure your shell to auto-activate, eg:$ cat ~/.config/fish/functions/cd.fish
#!/bin/env fish

function cd -d "change directory, and activate virtualenvs, if available"
    # first and foremost, change directory
    builtin cd $argv

    # find a parent git directory
    if git rev-parse --show-toplevel >/dev/null ^/dev/null
        set gitdir (realpath (git rev-parse --show-toplevel))
    else
        set gitdir ""
    end

    # if that directory contains a virtualenv in a ".venv" directory, activate it
    if test \( -z "$VIRTUAL_ENV" -o "$VIRTUAL_ENV" != "$gitdir/.venv" \) -a -f "$gitdir/.venv/bin/activate.fish"
        source $gitdir/.venv/bin/activate.fish
    end

    # deactivate an active virtualenv if not int a git directory with an ".venv"
    if test -n "$VIRTUAL_ENV" -a "$VIRTUAL_ENV" != "$gitdir/.venv"
        deactivate
    end
endAdd pre-commit hooksInstall git pre-commit hooks viapre-commit install. These will auto-run black and isort to ensure your code is pretty no matter what editor you use. This must be done inside an activated environment.Running testspytest
Package: faust-avro-serializer
faust-avro-serializerThis repo contains an improved version of the avro serializer fromhttps://github.com/marcosschroh/python-schema-registry-client/. It expects the schema
to be stored in the record itself in order to mimic the behavior of Confluent's Avro SerDe.
It uses Faust'smetadatacapability inside theRecordclass to read the Avro schema
dynamically.ExamplefromfaustimportRecord,Schema,Streamfromfaust_avro_serializerimportFaustAvroSerializerfromschema_registry.clientimportSchemaRegistryClientimportfaustapp=faust.App('myapp',broker='kafka://localhost')my_topic_name="my-dummy-topic"classMyRecordExample(Record):_schema={"type":"record","namespace":"com.example","name":"MyRecordExample","fields":[{"name":"foo","type":"string"},{"name":"bar","type":"string"}]}foo:strbar:strclient=SchemaRegistryClient("http://my-schema-registry:8081")serializer=FaustAvroSerializer(client,my_topic_name,False)schema_with_avro=Schema(key_serializer=str,value_serializer=serializer)dummy_topic=app.topic(my_topic_name,schema=schema_with_avro)@app.agents(dummy_topic)asyncdefmy_agent(myrecord:Stream[MyRecordExample]):asyncforrecordinmyrecord:print(record.to_representation())When the serializer calls the_dumpsmethod, it searches for the__faustfield inside the
record.
If the serializer finds the field, it is resolving the class and reads the_schemafield
containing the Avro schema.
Package: faust-bootstrap
faust-bootstrapThis repository is a wrapper implementation of theFaustlibrary.
It aims at easy development of Faust applications.
It uses the same interface as our common-kafka-streams project and can be deployed using the same Helm chart and configuration options.
Thereby, you can develop your Kafka applications in Java or Python as you wish without having to deal with different deployment configurations.Getting StartedYou can install faust-bootstrap from pypi.pip install faust-bootstrapExampleHerecan you get an use case example of both libraries.
Package: faust-ctypes
Faust Ctypesinclude Faust compiled DSP into Pythona port of Marc Joliet'sFaustPyfromCFFItoCtypesIntroductionFAUSTis a programming language dedicated to sound
synthesis and audio processing. Faust-Ctypes provides a way to compile a faust
code into a dynamically linked library(DLL), which can then be called from any
Python program as a simple Python library thanks to the CTypes library.DocumentationFaust-Ctypes documentation is available online athttps://adud2.gitlab.io/faust-ctypes/
Package: faust-large-message-serializer
faust-large-message-serializerA Faust Serializer that reads and writes records from and to S3 or Azure Blob Storage transparently.This serializer is compatible with ourKafka large-message-serializer SerDefor Java.Read more about it on ourblog.Getting StartedPyPipip install faust-large-message-serializerUsageThe serializer was build to be used with other serializers. The idea is to use the"concatenation" featurethat comes with FaustimportfaustfromfaustimportRecordimportloggingfromfaust_large_message_serializerimportLargeMessageSerializer,LargeMessageSerializerConfigfromfaust.serializersimportcodecs# model.userclassUserModel(Record,serializer="s3_json"):first_name:strlast_name:strconfig=LargeMessageSerializerConfig(base_path="s3://your-bucket-name/",max_size=0,large_message_s3_region="eu-central-1",large_message_s3_access_key="access_key",large_message_s3_secret_key="secret_key")topic_name="users_s3"s3_backed_serializer=LargeMessageSerializer(topic_name,config,is_key=False)json_serializer=codecs.get_codec("json")# Here we use json as the first serializer and# then we can upload everything to the S3 buckets3_json_serializer=json_serializer|s3_backed_serializer# configlogger=logging.getLogger(__name__)codecs.register("s3_json",s3_json_serializer)app=faust.App("app_id",broker="kafka://localhost:9092")users_topic=app.topic(topic_name,value_type=UserModel)@app.agent(users_topic)asyncdefusers(users):asyncforuserinusers:logger.info("Event received in topic")logger.info(f"The user is :{user}")@app.timer(5.0,on_leader=True)asyncdefsend_users():data_user={"first_name":"bar","last_name":"foo"}user=UserModel(**data_user)awaitusers.send(value=user,value_serializer=s3_json_serializer)app.main()ContributingWe are happy if you want to contribute to this project.
If you find any bugs or have suggestions for improvements, please open an issue.
We are also happy to accept your PRs.
Just open an issue beforehand and let us know what you want to do and why.LicenseThis project is licensed under the MIT license.
Have a look at theLICENSEfor more details.
Package: faustprometheus
Faust PrometheusThis library uses sensors of Faust. Those sensors are events based. Our monitor implements that interface and hooks some actions when those events happen. That allows us to create our own prometheusCounters,GaugesandHistograms.
I created some predefined metrics, but we can expand on them in the future.InstallationTo use this library in your faust project just addfaustprometheusor install it through pip:pip install faustprometheusUsageAddPrometheusMonitorto the app as seen below:import faust
    from faustprometheus.monitor import PrometheusMonitor

    app = faust.App('example', broker='kafka://')
    app.monitor = PrometheusMonitor(app)You can also configure some global options to monitor throughPrometheusMonitorConfig,
such as 2 levels of prefixes, throughnamespaceandsubsystem. The path exposing prometheus metrics can be set throughmetricsconfig, with/metricsas default value.
I added labels to config, but are not applied to monitor due to lack of my understanding of faust sensors and prometheus.from faustprometheus.config import PrometheusMonitorConfig

    monitor_config = PrometheusMonitorConfig(
        path='/metrics',
        namespace='faust',
        subsystem='foo-app',
        labels=['v2.3', 'prod']
        )TestsLibrary is fully unit tested and can be run bypytest
Package: faust-prometheus-exporter
Faust Prometheus ExporterModule for exporting monitoring values for PrometheusFaust Prometheus Helper (GPT)FunctionalityAdds/metricsendpointGives basicPrometheus-clientmetricsGives custom user`s metricsAdds internalfaustmetricsInstallationpip install faust-prometheus-exporterQuick startimportfaustfromfaust_prometheusimportFaustPrometheusExporterapp=faust.App('app',broker='localhost:9092')# Adding the Prometheus Exporterexporter=FaustPrometheusExporter(app)# see default metricscurllocalhost:8000/metricsPlaygroundimportloggingfromrandomimportrandintimportfaustfromprometheus_clientimportCounter,Histogramfromfaust_prometheusimportFaustPrometheusExporterlogger=logging.getLogger('app')# Prometheus custom metricsprometheus_counter_topic_1_messages=Counter('topic_1_messages','Count of messages successfully processed from topic_1')prometheus_histogram_size_messages=Histogram('size_messages','Histogram about messages size')app=faust.App('faust_prometheus',broker='localhost:9092',)# Adding the Prometheus Exporterexporter=FaustPrometheusExporter(app)topic_1=app.topic('topic_1')@app.agent(topic_1)asyncdefagent_topic_1(messages:faust.Stream[str]):asyncformessageinmessages:logger.info(f'Received topic_1 message:{message}')prometheus_counter_topic_1_messages.inc()prometheus_histogram_size_messages.observe(len(message))@app.timer(interval=1.0)asyncdefexample_sender(app):awaittopic_1.send(value='Nisi lorem ullamco veniam elit'*randint(1,10))if__name__=='__main__':app.main()ContributeIssue Tracker:https://gitlab.com/rocshers/python/faust-prometheus/-/issuesSource Code:https://gitlab.com/rocshers/python/faust-prometheusBefore adding changes:makeinstall-devAfter changes:makeformattest
Package: faust-pydantic-validate
Dillingerfaust-pydantic-validate is a small decorator to validate post data.Installationpip install faust-pydantic-validateUsagefrom pydantic import BaseModel
from faust.types.web import Request, Response
from faust.web import View
from faust_pydantic_validate.wrappers import takes_pydantic

app = faust.App(
    'foo',
    broker='kafka://localhost:9092',
)


class FooBar(BaseModel):
    foobar: int


@app.page('/build/')
class Builder(View):

    @takes_pydantic(FooBar, include_schema=True)
    async def post(self, request: Request, validated_object: BaseModel, **kwargs: Any) -> Response:
        return self.json(value=validated_object.dict())Request data{
    "foobar": 1
}Response data{
    "foobar": 1
}Request data{
    "foobar": "foo"
}Response data (include_schema=True)"errors": [
        {
            "loc": [
                "foobar"
            ],
            "msg": "value is not a valid integer",
            "type": "type_error.integer"
        }
    ],
    "schema": {
        "title": "FooBar",
        "type": "object",
        "properties": {
            "foobar": {
                "title": "Foobar",
                "type": "integer"
            }
        },
        "required": [
            "foobar"
        ]
    }
}Response data (include_schema=False){
    "errors": [
        {
            "loc": [
                "foobar"
            ],
            "msg": "value is not a valid integer",
            "type": "type_error.integer"
        }
    ]
}
Package: faust-s3-backed-serializer
faust-s3-backed-serializerA Faust Serializer that reads and writes records from and to S3 transparently.This serializer is compatible with ourKafka S3-backed SerDefor Java.Read more about it on ourblog.Getting StartedPyPipip install faust-s3-backed-serializerUsageThe serializer was build to be used with other serializers. The idea is to use the"concatenation" featurethat comes with FaustimportfaustfromfaustimportRecordimportloggingfromfaust_s3_backed_serializerimportS3BackedSerializerfromfaust.serializersimportcodecs# model.userclassUserModel(Record,serializer="s3_json"):first_name:strlast_name:str# Declare the serializerscredentials={# you can also leave the fields empty# in order to use the default AWS credential chain's3backed.access.key':'access_key','s3backed.secret.key':'secret_key'}topic_name="users_s3"s3_backed_serializer=S3BackedSerializer(output_topic=topic_name,base_path="s3://your-bucket-name/",region_name="eu-central-1",s3_credentials=credentials,max_size=0,is_key=False)json_serializer=codecs.get_codec("json")# Here we use json as the first serializer and# then we can upload everything to the S3 buckets3_json_serializer=json_serializer|s3_backed_serializer# configlogger=logging.getLogger(__name__)codecs.register("s3_json",s3_json_serializer)app=faust.App("app_id",broker="kafka://localhost:9092")users_topic=app.topic(topic_name,value_type=UserModel)@app.agent(users_topic)asyncdefusers(users):asyncforuserinusers:logger.info("Event received in topic")logger.info(f"The user is :{user}")@app.timer(5.0,on_leader=True)asyncdefsend_users():data_user={"first_name":"bar","last_name":"foo"}user=UserModel(**data_user)awaitusers.send(value=user,value_serializer=s3_json_serializer)app.main()ContributingWe are happy if you want to contribute to this project.
If you find any bugs or have suggestions for improvements, please open an issue.
We are also happy to accept your PRs.
Just open an issue beforehand and let us know what you want to do and why.LicenseThis project is licensed under the MIT license.
Have a look at theLICENSEfor more details.