Saravanan666/pypi-org huggingface dataset:
Package: inferpy
InferPy: Deep Probabilistic Modeling Made EasyInferPy is a high-level API for deep probabilistic modeling written in Python and
capable of running on top of Tensorflow. InferPy's API is strongly inspired by Keras and it has
a focus on enabling flexible data processing,
easy-to-code probabilistic modeling, scalable inference, and robust model validation.Use InferPy if you need a probabilistic programming language that:Allows easy and fast prototyping of hierarchical probabilistic models with a simple and user-friendly
API inspired by Keras.Automatically creates computational efficient batched models without the need to deal with complex
tensor operations
and theoretical concepts.Run seamlessly on CPU and GPU by relying on Tensorflow, without having to learn how to use Tensorflow.Defines probabilistic models with complex probabilistic constructs containing deep neural networks.InferPy is to Edward what Keras is to TensorflowInferPy's aim is to be to Edward what Keras is to Tensorflow. Edward is
a general purpose probabilistic programing language, like Tensorflow is
a general computational engine. But this generality comes a at price.
Edward's API is verbose and is based on distributions over Tensor
objects, which are n-dimensional arrays with complex semantics
operations. Probability distributions over Tensors are powerful
abstractions but it is not easy to operate with them. InferPy's API is
no so general like Edward's API but still covers a wide range of
powerful and widely used probabilistic models, which can contain complex
probability constructs containing deep neural networks.For more details about InferPy, check the onlinedocumentation.
Package: inferrd
InferrdInferrd is a hosting platform for TensorFlow.AuthenticationIn order to use this library you need to get a api token frominferrd.comAuthenticate with theinferrd.authmethod:importinferrdinferrd.auth('<token>')Deploying TensorFlowFirst, create a model oninferrd.comand select the kind of instance you want. Then simple callinferrd.deploy_tf:importinferrd# this only needs to be done onceinferrd.auth('<token>')# deploy TFinferrd.deploy_tf(tf_model,'<name of the model>')Fetching predictionsInferrd allows us to pull predictions back into your notebook by usinginferrd.get_requests:importinferrd# this only needs to be done onceinferrd.auth('<token>')# get the requestsrequests=inferrd.get_requests('<name of the model>',limit=100,page=0,includeFailures=False)
Package: infer-schema
Infer schemaInfer JSON schema from CSV files.InstallationThe script can be installed via pippipinstallinfer-schemaCurrently, infer-schema is a single Python 3 script without any external
dependencies, so you can download it to somewhere in your PATH and make it
executable:curlhttps://raw.githubusercontent.com/abhidg/infer-schema/main/infer_schema.py-oinfer-schema
chmod+xinfer-schema
./infer-schemafileUsageSeeinfer-schema(1)(from a local clone, useman ./infer-schema.1)For the Python library interface, see below.ExamplesWith a data file likedate,count
2023-11-20,10
2023-11-21,23Running infer-schema will produce a JSON Schema that the CSV conforms to:{"$schema":"https://json-schema.org/draft-07/schema","description":"Description of data.csv","properties":{"count":{"description":"Description for column count","maximum":23,"minimum":10,"type":"integer"},"date":{"description":"Description for column date","format":"date","type":"string"}},"required":["date","count"],"title":"JSON Schema for data.csv"}Python libraryThe same result can be obtained using the Python module:frominfer_schemaimportinfer_schemaschema=infer_schema("data.csv")print(schema)Parametersinfer_schema(file: Union[Path,str],
enum_threshold:int= 10,
enum_fields: List[str] = [],
bound_types: Set[DType] = {"integer", "number"},
explicit_nulls:bool= False)HereDTypeis one ofnumber,integerorstring.file(Pathorstr): CSV fileenum_threshold(int, default = 10): Threshold of number of
unique values in column below which the field is typed enumenum_fields(List[str], default = []): Forces a certain field to be
classed as an enum, useful for including fields that do not meetenum-thresholdcriteriabound_types(Set[DType], default ={"integer", "number"}): Types for
which bounds should be encoded into the schema, default is numbers, for which
minimum / maximum are determined. For strings minLength and maxLength are
determined. Set toNoneto disable bound detectionexplicit_nulls(bool, default = False): By default, fields that have
null and another type are typed as non-required with the non-null type.
Another interpretation is to assume the field will be present and allow it to
dual-typed with null.Returns: JSON Schema as a dictionaryDevelopmentInstall pre-commit to setup ruff linting and formatting.To generate the man page,scdocis required:scdoc<infer-schema.1.scd>infer-schema.1
Package: infer_types
infer-typesA CLI tool to automatically add type annotations into Python code.The main scenario for using the tool is to help you with annotating a big and old codebase. It won't solve the task for you 100% but will definitely help you tremendously, because many of the functions in the real world have quite simple return types that are easy to infer automatically.Features:100% automated, get a bunch of type annotations with no effort.100% static, all types are inferred without running the code.A lot of heuristics and smart inference.Actively usestypeshedto find annotations for unannotated dependencies.ExampleLet's say, you have the following method:classDatabase:defusers_count(self):returnlen(self.users)Sincelenalways returnsint,infer-typesis able to infer the return type of the method. So, after running the tool, the code will look like this:classDatabase:defusers_count(self)->int:returnlen(self.users)Installationpython3-mpipinstallinfer-typesUsagepython3-minfer_types./example/The tool will add new import statements that can be duplicated and are located not at the top of the file. To fix it, runisort:python3-misort./example/The infer-types tool uses the new fancy syntax for type annotations introduced in Python 3.10. So, instead ofOptional[str]it will emitstr | None. If your code is supposed to run on an older version of Python, addfrom __future__ import annotationsat the beginning of each file. It will solve the issue and also make startup of your app faster. You can also do that with isort:python3-misort--add-import'from __future__ import annotations'./example/Seeawesome-python-typingfor more tools to help you with annotating your code.How it worksMost of heuristics live inastypespackage. Check it out learn more about the main inference logic.If the same method is defined in a base class, copy the type annotations from there.If there are no return statements returning a value, the return type isNone.If there is ayieldstatement, the return type istyping.Iterator.In some cases, the return type can be guessed from the function name. For example,is_openfunction is assumed to returnboolbecause it starts withis_.You can run only a specific heuristic using the--onlyflag.
Package: infi-azure
Azure PackageIntroductioninfi_azure is a comprehensive package that aims to simplify Azure operations by encapsulating core functionalities into
three classes: AzureStorageAccount, AzureContainer, and AzureBlob. Additionally, it includes utility functions like
azcopy to streamline the process of Azure actions.InstallationInstall the package via pipenv:pipenv install infi_azureFeaturesAzureStorageAccount: This class facilitates seamless interaction with Azure Storage Accountsby providing methods for connection, retrieving account details, checking account existence, and accessingthe Blob Service Client.AzureContainer: This class provides features for seamless interaction with Azure Storage Blob containers,including retrieving directories, generating Shared Access Signatures (SAS) tokens and URLs, checking container existenceand deleting blobs within a specified directory.AzureBlob: This class facilitates interactions with individual blobs within an Azure Storage Container,offering functionalities such as downloading blob content as bytes, checking blob existence,verifying if a directory is empty, creating an empty directory, and counting the number of blobs within a specified directory.azcopy_action: This function utilizes AzCopy to copy the contents of a source folder to a specified destinationcontainer in Azure Blob Storage.Usage ExampleAzureStorageAccountfrom azure_storage_account import AzureStorageAccount

# Replace 'your_connection_string_here' with your actual connection string
connection_string = "your_connection_string_here"

storage_account = AzureStorageAccount(connection_string)

# Check if the account exists
if storage_account.is_account_exist():
    print("Azure Storage Account exists.")
else:
    print("Azure Storage Account does not exist.")AzureContainerfrom azure_storage_account import AzureContainer

# Replace 'your_connection_string_here' with your actual connection string
connection_string = "your_connection_string_here"

# Replace 'your_container_name' with your actual container name
container_name = "your_container_name"

container = AzureContainer(connection_string, container_name)

# print all directories in container
print(container.get_all_blobs_in_container())AzureBlobfrom azure_storage_account import AzureBlob

# Replace 'your_connection_string_here' with your actual connection string
connection_string = "your_connection_string_here"

# Replace 'your_container_name' with your actual container name
container_name = "your_container_name"

# Replace 'your_blob_name' with your actual blob name
blob_name = "your_blob_name"

blob = AzureBlob(connection_string, container_name, blob_name)

# create empty directory
blob.create_empty_directory()Azcopyfrom azure_storage_account import azcopy_action

# Replace the parameters with your actual parameters
source = "your_source_container_url"
dest = "your_destination_container_url"
azcopy_path = "your_azcopy_path"
azcopy_action(azcopy_path, source, dest)
Package: infi.bunch
Bunch is a dictionary that supports attribute-style access, a la JavaScript.>>> b = Bunch()
>>> b.hello = 'world'
>>> b.hello
'world'
>>> b['hello'] += "!"
>>> b.hello
'world!'
>>> b.foo = Bunch(lol=True)
>>> b.foo.lol
True
>>> b.foo is b['foo']
TrueDictionary MethodsA Bunch is a subclass ofdict; it supports all the methods adictdoes:>>> b.keys()
['foo', 'hello']Includingupdate():>>> b.update({ 'ponies': 'are pretty!' }, hello=42)
>>> print repr(b)
Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!')As well as iteration:>>> [ (k,b[k]) for k in b ]
[('ponies', 'are pretty!'), ('foo', Bunch(lol=True)), ('hello', 42)]And “splats”:>>> "The {knights} who say {ni}!".format(**Bunch(knights='lolcats', ni='can haz'))
'The lolcats who say can haz!'SerializationBunches happily and transparently serialize to JSON and YAML.>>> b = Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!')
>>> import json
>>> json.dumps(b)
'{"ponies": "are pretty!", "foo": {"lol": true}, "hello": 42}'If JSON support is present (jsonorsimplejson),Bunchwill have atoJSON()method which returns the object as a JSON string.If you havePyYAMLinstalled, Bunch attempts to register itself with the various YAML Representers so that Bunches can be transparently dumped and loaded.>>> b = Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!')
>>> import yaml
>>> yaml.dump(b)
'!bunch.Bunch\nfoo: !bunch.Bunch {lol: true}\nhello: 42\nponies: are pretty!\n'
>>> yaml.safe_dump(b)
'foo: {lol: true}\nhello: 42\nponies: are pretty!\n'In addition, Bunch instances will have atoYAML()method that returns the YAML string usingyaml.safe_dump(). This method also replaces__str__if present, as I find it far more readable. You can revert back to Python’s default use of__repr__with a simple assignment:Bunch.__str__ = Bunch.__repr__. The Bunch class will also have a static methodBunch.fromYAML(), which loads a Bunch out of a YAML string.Finally, Bunch converts easily and recursively to (unbunchify(),Bunch.toDict()) and from (bunchify(),Bunch.fromDict()) a normaldict, making it easy to cleanly serialize them in other formats.MiscellaneousIt is safe toimport *from this module. You’ll get:Bunch,bunchify, andunbunchify.Ample doctests:$ python -m bunch.test
$ python -m bunch.test -v | tail -n22
1 items had no tests:
    bunch.fromYAML
16 items passed all tests:
   8 tests in bunch
  13 tests in bunch.Bunch
   7 tests in bunch.Bunch.__contains__
   4 tests in bunch.Bunch.__delattr__
   7 tests in bunch.Bunch.__getattr__
   3 tests in bunch.Bunch.__repr__
   5 tests in bunch.Bunch.__setattr__
   2 tests in bunch.Bunch.fromDict
   2 tests in bunch.Bunch.toDict
   5 tests in bunch.bunchify
   2 tests in bunch.from_yaml
   3 tests in bunch.toJSON
   6 tests in bunch.toYAML
   3 tests in bunch.to_yaml
   3 tests in bunch.to_yaml_safe
   4 tests in bunch.unbunchify
77 tests in 17 items.
77 passed and 0 failed.
Test passed.FeedbackOpen a ticket / fork the project onGitHub, or send me an email atdsc@less.ly.
Package: infi.conf
Overviewinfi.conf is a generic mechanism for storing, loading and manipulating configuration.UsageBasicsGiven a file like this:>>> f = open("/tmp/my_file.cfg", "w")
>>> _ = f.write("""
... CONFIG = {
...    "a" : {
...       "b" : 2,
...    }
... }""")
>>> f.close()Obtaining a configuration object is done via:>>> from infi.conf import Config
>>> c = Config.from_filename("/tmp/my_file.cfg")
>>> c.root.a.b
2Loading From Other SourcesYou can also load from string:>>> c = Config.from_string("CONFIG = {'a' : 2}")
>>> c.root.a
2Updating PathsSetting paths is done by settings items:>>> c['a'] = 3
>>> c.root.a
3Setting paths that didn’t exist before is not allowed, unless you assign a config object:>>> c['b'] = 3 #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
 ...
CannotSetValue: Cannot set key 'b'

>>> c['b'] = Config(2)
>>> c.root.b
2Assigning can also be done via therootproxy:>>> c.root.a = 3
>>> c.root.a
3Backing Up/RestoringWhenever you want to preserve the configuration prior to a change and restore it later, you can do it withbackup()andrestore(). They work like a stack, so they push and pop states:>>> c = Config({"value":2})
>>> c['value']
2
>>> c.backup()
>>> c['value'] = 3
>>> c['value']
3
>>> c.backup()
>>> c['value'] = 4
>>> c['value']
4
>>> c.restore()
>>> c['value']
3
>>> c.restore()
>>> c['value']
2UtilitiesPath AssignmentIt is possible to assign to a config via path assignment, e.g:>>> c = Config(dict(a=dict(b=dict(c=3))))
>>> from infi.conf.utils import assign_path
>>> assign_path(c, "a.b.c", 4)
>>> c.root.a.b.c
4Expression Path AssignmentIn some cases you would like to receive strings like this:a.b.c=2And make sense of them in the context of the configuration. This might be because they originate from command line, overlay files, or whatever other source comes to mind.infi.conf’s utilities provide a function for this:>>> from infi.conf.utils import assign_path_expression
>>> assign_path_expression(c, "a.b.c=2")
>>> c.root.a.b.c
'2'Note that in this method, types are always strings. If your leaf already has a value, thededuce_typeflag can be used to deduce the type from the current value:>>> c['a']['b']['c'] = 3
>>> assign_path_expression(c, 'a.b.c=666', deduce_type=True)
>>> c.root.a.b.c
666
Package: infi-const
**# Const PackageIntroductioninfi_const is a package that have the const to navad project.InstallationInstall the package via pipenv:pipenv install infi_constFeaturesconst urlconst utilsmore infoconst in the package:EMAIL_LIST_NAVADEMAIL_TEST_LISTRABBIT QUEUESTGV_API_URLAZCOPY_API_URLSKYLINE_SERVICE_URL
Package: infi-email
Email PackageIntroductioninfi_email is a package that send email.InstallationInstall the package via pipenv:pipenv install infi_emailFeaturessend_email function can send email from one email to others.Usage Examplesend_emailfrom infi_email import send_email

# Replace all variables to the variables you need

from_email: str = "from email here"
email_password: str = "your email password"

mails: list[str] = ["to email here"]
subject: str = "your subject"
message: str = "your message"

send_email(from_email, email_password, mails, subject, message)
Package: infi-logger
infinity-elastic-logsThis project is a Python logging library that integrates with Elasticsearch for centralized logging. It provides a simple and convenient way to send logs to Elasticsearch with different log levels.InstallationThe binary installation fileattached to this repository should be taken,
Attach to the project where it will be used
and install with:pipinstallpath_to_this_project/dist/infi_logger-1.0-py3-none-any.whlAlternatively, you can move in cmd to this project and just write inpipinstall.Replace path_to_this_project with the path where the file is located in your project.UsageTo use the logging library, follow these steps:Import theElasticLoggerclass:frominfi_loggerimportElasticLoggerCreate an instance of the ElasticLogger class, providing a service name, host, cert_fingerprint, name and password:HOST="${Ip:Port}"CERT_FINGERPRINT="${fingerprint}"NAME="${Username}"PASSWORD="${Password}"INDEX="${IndexName}"# Replace with the index you want to work with# logger = ElasticLogger("my-service")logger=ElasticLogger("elastic-service",HOST,CERT_FINGERPRINT,NAME,PASSWORD,INDEX)Alternatively, you can create an instance of the ElasticLogger class that will not connect Elastic, providing a service name only:logger=ElasticLogger("my-service")Use the different log levels to send logs:logger.debug("This is a debug log")logger.info("This is an info log")logger.warning("This is a warning log")logger.error("This is an error log")logger.critical("This is a critical log")ConfigurationElasticsearch ConnectionThe ElasticsearchConnection class handles the connection to Elasticsearch. Ensure that the environment variables mentioned above are correctly set before running the project. The connect_elasticsearch method establishes a connection to Elasticsearch using the provided credentials. If the connection fails, an exception will be raised.Log FormatThe logs sent to Elasticsearch have the following format:{"timestamp":"<current_timestamp>","message":"<log_message>","level":"<log_level>","service":"<service_name>"}Environment VariablesYou can set the location of log files in case Elastic failed/not connected by setting global environment of "LOG_FILE".
If not chosen, it will default to "logs/log.log" in your current directory
Package: infima-client
infima_clientA client library for accessing Infima. It will manage the HTTP REST requests for you.System requirementsThe infima_client requires Python 3.7+. It is multi-platform, and the goal is to make
it work equally well on Windows, Linux and OSX.InstallationThe library is published in PyPi.pipinstallinfima_clientUsageContactSupportfor an access token.frominfima_clientimportInfimaClienttoken="..."client=InfimaClient(token=token)client.demo()Alternatively, the token can be configured with theINFIMA_TOKENenvironment variable.More InformationSee theDocsfor more information.ContactSupportif you have any questions.
Package: infi-multi-db
infi-multiDBDescription of your library goes here.Installationpipinstallinfi_multi_dbUsageHere is a simple example of usagefrominfi_multi_dbimportMultiDB# Replace these values with your actual PostgreSQL connection parametersconnection_params={"dbname":"test","user":"postgres","password":"1234","host":"localhost","port":5432,}# Instantiate the InfiMultyDB with PostgreSQL as the database typemulti_db=MultiDB(db_type="postgresql",connection_params=connection_params)# Start the connectionmulti_db.start_connection()# Example: Create a tabletable_name="example_table"columns=[("id","SERIAL"),("name","VARCHAR(255)"),("age","INTEGER")]multi_db.create_table(table_name,columns)# Example: Insert a record into the tablerecord_data={"name":"John Doe","age":30}multi_db.create_record(table_name,record_data)# Example: Read records from the tablequery="age > 25"records=multi_db.read_records(table_name,query)print("Records:",records)records=multi_db.read_records(table_name,query,["age"])print("Records:",records)# Example: Update a record in the tablerecord_id_to_update=1# Replace with the actual record IDnew_data={"age":31}multi_db.update_record(table_name,record_id_to_update,new_data)# Example: Read records after updaterecords_after_update=multi_db.read_records(table_name,query)print("Records after update:",records_after_update)# Example: Delete the tablemulti_db.delete_table(table_name)# Stop the connectionmulti_db.stop_connection()Alternatively, you can import DB classes directly and use them. For example:frominfi_multi_dbimportPostgreSQL# Replace these values with your actual PostgreSQL connection parametersconnection_params={"dbname":"test","user":"postgres","password":"1234","host":"localhost","port":5432,}# Instantiate the InfiMultyDB with PostgreSQL as the database typepost_db=PostgreSQL(connection_params=connection_params)# Start the connectionpost_db.start_connection()# Example: Create a tabletable_name="example_table"columns=[("id","SERIAL"),("name","VARCHAR(255)"),("age","INTEGER")]post_db.create_table(table_name,columns)# Example: Insert a record into the tablerecord_data={"name":"John Doe","age":30}post_db.create_record(table_name,record_data)# Example: Read records from the tablequery="age > 25"records=post_db.read_records(table_name,query)print("Records:",records)records=post_db.read_records(table_name,query,["age"])print("Records:",records)# Example: Update a record in the tablerecord_id_to_update=1# Replace with the actual record IDnew_data={"age":31}post_db.update_record(table_name,record_id_to_update,new_data)# Example: Read records after updaterecords_after_update=post_db.read_records(table_name,query)print("Records after update:",records_after_update)# Example: Delete the tablepost_db.delete_table(table_name)# Stop the connectionpost_db.stop_connection()
Package: infinilint
InfinilintInfinilint is a configurable lint runner. The base yaml configuration includes
many common linters and a new linter is added with 3 or 4 lines of yaml. The
linters are Docker images and are run in parallel to maximize feedback and make
it practical to run continuously during development and as a stage in CI.RequirementsInfinilint depends on Docker. Install the latest version for your platform.InstallingClone this repo and run:pip install infinilintUsageTo see the configured linters:infinilint --listTo run a single linter:infinilint rubocopRun all enabled linters:infinilintWatch a folder continuously and run linters on any changes:infinilint --watchConfigurationIn the root of your repository, create a .infinilint.yml file. This file will
be combined with the base.yml in application folder. To enabled linters, create
a file that looks like:linters:
    rubocop:
        enabled: true
    yamllint:
        enabled: trueTo add a linter not configured in the base.yml, create entries using the
base.yml as a model.Additional root values you can set in your config:timeout: maximum number of seconds the tool is allowed to run
proxy: address of a local docker registry to pull the images from instead of dockerhub
Package: infinite
DescriptionSome of theitertoolsoperations do not work on infinite generators,
this package is the beginning of the work to port some of the iterator
concepts to the infinity.infiniteis compatible with both python2 and python3.InstallationThe package has been uploaded toPyPI, so you can
install the package using pip:pip install infiniteUsageFor example if we want to iterate all the pairs of natural numbers:fromitertoolsimportcountfrominfiniteimportproductforx,yinproduct(count(0),count(0)):print(x,y)if(x,y)==(3,3):break
Package: infinite-campus
Infinite-Campus-APIDescriptionThis project is an API for Infinite Campus. It is designed to be easy to use and understand. With this API, you can retrieve student's grades, courses and assignments and more with ease!NoteI cannot guarantee that this will work for every school district or even individual accounts. I am only able to test this with the one school district and the select number of accounts I have access to. If you encounter a problem with this package, create a new issue and I will attempt to review it.