Saravanan666/pypi-org huggingface dataset:
Package: conficus
conficusis a python toml configuration wrapper.
providing some extra type coercions (e.g. str -> Path)
easier access and section inheritance.conficuspython 3.6+.InstallationInstallconficuswith pip.pipinstallconficusQuick StartBasic usage>>>>>>importconficus>>>Configurations can be loaded directly from a string variable or read via file path string or Path object:>>>config=conficus.load('/Users/mgemmill/config.ini',toml=True)>>>conficuswill also read a path from an environment variable:>>>config=conficus.load('ENV_VAR_CONFIG_PATH')>>>Easier SelectionAccessing nested sections is made easier with chained selectors:>>># regular dictionary access:...>>>config['app']['debug']True>>>>>># chained selector access:...>>>config['app.debug']TrueInheritanceInheritance pushes parent values down to any child section:# config.ini[app]debug=true[email]_inherit=0host="smtp.mailhub.com"port=2525sender="emailerdude@mailhub.com"[email.alert]to=["alert-handler@service.com"]subject="THIS IS AN ALERT"body="Alerting!"It is turned on via the inheritance option:>>>config=conficus.load("config.ini",inheritance=True)Sub-sections will now contain parent values:>>>alert_config=config["email.alert"]>>>alert_config["host"]>>>"smtp.mailhub.com">>>alert_config["subject"]>>>"THIS IS AN ALERT"Inheritence can be controled per section via the_inheritoption._inherit = 0will block the section
from inheriting parent values._inherit = 1would only allow inheritance from the sections immediate parent;_inherit = 2would allow both the immediate parent and grandparent inheritance._inheritvalues are stripped from the resulting configuration dictionary.Additional Conversion OptionsIn addition to toml’s standard type conversions,conficushas two builtin conversion options and
also allows for adding custom conversions.Conversions only work with string values.Path ConversionsThepathliboption will convert any toml string value that looks like a path to a python pathlib.Path object:>>>config=conficus.load("path = '/home/user/.dir'",pathlib=True)>>>isinstance(config["path"],Path)>>>TrueDecimal ConversionsThedecimaloption will convert any toml string value that matches\d+\.\d+to a python Decimal object:>>>config=conficus.load("number = '12.22'",decimal=True)>>>isinstance(config["number"],Decimal)>>>True
Package: confidence-interval-estimator-ML
confidence_interval_estimator_MLThis repo contains code to perform estimation of Confidence Intervals both parametric and non-parametric (a.k.a. Monte Carlo Confidence Interval or Empirical Confidence Interval estimation) for Machine Learing models.Colab DemoYou can easily try this tool in Google Colab by clicking on the following badge:Quickstart>>> import confidence_interval_estimator_ML.utils as cie
>>> # Parametric Estimation:
>>> cie.parametric_confidence_interval(confidence_level=.95, mean=model_accuracy, sample_size=sample_size, verbose=True)
Computing C.I. assuming the data follow a standard normal distribution
With 95.0% confidence the accuracy of the model is in 0.977 +/-0.023.
(0.9773132867658845, 0.02268671323411553)

>>> # Non-Parametric Estimation:
>>> test_accuracies = cie.get_accuracy_on_samples(get_classifier_instance, X, y, n_iterations=100, sample_ratio=1,
                             train_ratio=0.8, random_seed=None, sample_with_replacement=True, verbose=False) 

>>> cie.nonparametric_confidence_interval(accs, .9)
From the given data, with 90.0% confidence the accuracy of the model is in 0.959 +/-4.05.
(0.9595, 0.04050000000000009)Further DetailsYou can find further details on the usage of the tool in the code documentation or in the examples provided in the Notebook.ipynb file. If you need help, please don't hesitate to open a github issue or getting in touch.
Package: confidence-openfeature-provider
Confidence OpenFeature Python ProviderThis repo contains the OpenFeature Python flag provider forConfidence.OpenFeatureBefore starting to use the provider, it can be helpful to read through the generalOpenFeature docsand get familiar with the concepts.Adding the dependencypip installpipinstallconfidence-openfeature-provider==0.1.4requirements.txtconfidence-openfeature-provider==0.1.4pipinstallrequirements.txtCreating and using the flag providerBelow is an example for how to create a OpenFeature client using the Confidence flag provider, and then resolve
a flag with a boolean attribute. The provider is configured with an api key and a region, which will determine
where it will send the resolving requests.The flag will be applied immediately, meaning that Confidence will count the targeted user as having received the treatment.You can retrieve attributes on the flag variant using property dot notation, meaningtest-flag.boolean-keywill retrieve
the attributeboolean-keyon the flagtest-flag.You can also use only the flag nametest-flagand retrieve all values as a map withresolve_object_details().The flag's schema is validated against the requested data type, and if it doesn't match it will fall back to the default value.fromconfidence.providerimportRegionfromconfidence.providerimportConfidenceOpenFeatureProviderfromopenfeature.apiimportEvaluationContextfromopenfeatureimportapiprovider=ConfidenceOpenFeatureProvider("client_secret",Region.EU)api.set_provider(provider)open_feature_client=api.get_client()ctx=EvaluationContext(targeting_key="random",attributes={"user":{"country":"SE"}})flag_value=open_feature_client.get_boolean_value(flag_key="test-flag.boolean-key",default_value=False,evaluation_context=ctx)print(flag_value)
Package: confidence-planner
confidence-plannerTheconfidence-plannerpackage provides implementations of estimation procedures for confidence intervals
around classification accuracy in Python. The package currently features approximations for holdout, bootstrap,
cross-validation, and progressive validation experiments. For information on how to install use the package,
read on or take a look at our demonstration video below. To experiment with different estimation procedures go to the
accompanying web application athttps://prediction-confidence-planner.herokuapp.com/.Installing confidence-plannerTo install confidence-planner, just execute:pipinstallconfidence-plannerAfterwards you can importconfidence_plannerand use all its functions.Quickstartfromsklearnimportdatasets,svm,metricsfromsklearn.model_selectionimporttrain_test_splitimportconfidence_plannerascp# example datasetX,y=datasets.load_breast_cancer(return_X_y=True)X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.3,stratify=y,random_state=23)# training the classifier and calculating accuracyclf=svm.SVC(gamma=0.001)clf.fit(X_train,y_train)y_pred=clf.predict(X_test)acc=metrics.accuracy_score(y_test,y_pred)# confidence interval and sample size estimationci=cp.estimate_confidence_interval(y_test.shape[0],acc,confidence_level=0.90)sample=cp.estimate_sample_size(interval_radius=0.05,confidence_level=0.90)print(f"90% CI:{ci}")print(f"Samples needed for a 0.05 radius 90% CI:{sample}")More code examples (including cross-validation and bootstrapping) can be found in theexamplesfolder.ReferencesConfidence-planner methods belong to the field of frequentist statistics.[1] Langford, J.: Tutorial on practical prediction theory for classification.
Journal of Machine Learnining Research 6, 273–306 (2005).[2] Blum, A., Kalai, A., Langford, J.: Beating the hold-out: Bounds for k-fold and progressive cross-validation.
Proceedings of the Twelfth Annual Conference on Computational Learning Theory, COLT (1999).[3] Puth, M.T., Neuhauser, M., Ruxton, G.: On the variety of methods for calculating confidence intervals by bootstrapping.
The Journal of animal ecology 84 (2015).LicenseConfidence-planner is free and open-source software licensed under theMIT license.ContactThe best way to ask questions is via theGitHub Discussions channel.
In case you encounter usage bugs, please don't hesitate to use theGitHub's issue trackerdirectly.
Package: confident
ConfidentDocumentationConfident helps you create configuration objects from multiple sources such as files, environment variables and maps.Confident BaseConfig class is a data model that enforce validation and type hints by usingpydanticlibrary.With Confident you can manage multiple configurations depends on the environment your code is deployed.
While having lots of flexibility how to describe your config objects, Confident will provide visibility of the process
and help you expose misconfiguration as soon as possible.ExampleimportosfromconfidentimportBaseConfig# Creating your own config class by inheriting from `BaseConfig`.classMyAppConfig(BaseConfig):port:int=5000host:str='localhost'labels:list# Illustrates some environment variables.os.environ['host']='127.0.0.1'os.environ['labels']='["FOO", "BAR"]'# JSON strings can be used for more types.# Creating the config object. `BaseConfig` will load the values of the properties.config=MyAppConfig()print(config.host)# > 127.0.0.1print(config.json())# > {"port": 5000, "host": "127.0.0.1", "labels": ["FOO", "BAR"]}print(config)# > port=5000 host='127.0.0.1' labels=['FOO', 'BAR']print(config.full_fields())# > {# 'port': ConfigField(name='port', value=5000, origin_value=5000, source_name='MyAppConfig', source_type='class_default', source_location=PosixPath('~/confident/readme_example.py')),# 'host': ConfigField(name='host', value='127.0.0.1', origin_value='127.0.0.1', source_name='host', source_type='env_var', source_location='host'),# 'labels': ConfigField(name='labels', value=['FOO', 'BAR'], origin_value='["FOO", "BAR"]', source_name='labels', source_type='env_var', source_location='labels')# }Installation(.venv)$pipinstallconfidentCapabilitiesCustomized Fields LoadersBuilt-in loaders:Environment variables.Config files such as 'json' and 'yaml'.Config maps to load fields depends on the environment. (See documentation)It is possible to configure the loading priority and add your own loader classes.Full Support of Pydantic BaseSettingsConfident core functionality is based onpydanticlibrary.
That meansBaseConfigobject has all the benefits of pydantic'sBaseModelandBaseSettingsincluding type validation,object transformationand many more features.Config Loading visibilityBaseConfigobject stores details about the fields loading process and offers ways to understand the source of each loaded field.
Details about the origin value (before conversion), the location of the source and the type of loader, can all be accessed from the object.ExamplesMore examples can be found in the project'srepository.ContributingTo contribute to Confident, please make sure any new features or changes to existing functionality include test coverage.
Package: confidential-ml-utils
Confidential ML UtilitiesConfidential ML is the practice of training machine learning models without
seeing the training data. It is needed in many enterprises to satisfy the
strict compliance and privacy guarantees they provide to their customers. This
repository contains a set of utilities for confidential ML, with a special
emphasis on using PyTorch inAzure Machine Learning pipelines.⚠️DeprecationThis package has been deprecated as of May 2021.Please installpip install shrikeand useshrike.compliant_logginginstead. More details:https://github.com/Azure/shrikeUsingFor more detailed examples and API reference, see thedocs page.Minimal use case:fromconfidential_ml_utilsimportDataCategory,enable_confidential_logging,prefix_stack_traceimportlogging@prefix_stack_trace(allow_list=["FileNotFoundError","SystemExit","TypeError"])defmain():enable_confidential_logging()log=logging.getLogger(__name__)log.info("Hi there",category=DataCategory.PUBLIC)if__name__=="__main__":main()ContributingThis project welcomes contributions and suggestions. Most contributions require
you to agree to a Contributor License Agreement (CLA) declaring that you have
the right to, and actually do, grant us the rights to use your contribution.
For details, visithttps://cla.opensource.microsoft.com.When you submit a pull request, a CLA bot will automatically determine whether
you need to provide a CLA and decorate the PR appropriately (e.g., status check,
comment). Simply follow the instructions provided by the bot. You will only need
to do this once across all repos using our CLA.This project has adopted theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor
contactopencode@microsoft.comwith any
additional questions or comments.
Package: configa
Convert configuration items into Python objects.PrerequisitesTargeting Python 3 here on a Linux platform.Note:python3must exist in order for the projectMakefileto function correctly.Getting StartedGet the code:$ git clone https://github.com/loum/configa.gitBuild the virtual environment and download project dependencies:$ cd configa
$ make init APP_ENV=devRun the tests to make sure all is OK:$ source 3env/bin/activate
(venv) $ make testsBuild the DocumentationProject documentation is self contained under thedoc/sourcedirectory.  To build the documentation locally:$ make docsThe project comes with a simple web server that allows you to present the docs from within your own environment:$ cd docs/build
$ ./http_server.pyNote: The web server will block your CLI and all activity will be logged to the console.  To end serving pages, justCtrl-C.To view pages, open up a web browser and navigate tohttp:<your_server_IP>:8888
Package: configalchemy
ConfigAlchemyThe Settings and Configuration on ideal practices for app development and package building.Free software: MIT licenseDocumentation:https://configalchemy.readthedocs.io.Installation$pipenvinstallconfigalchemy✨🍰✨OnlyPython 3.6+is supported.ExamplefromconfigalchemyimportBaseConfigclassDefaultConfig(BaseConfig):NAME="test"config=DefaultConfig()config.NAME>>>'test'FeaturesBase onThe Twelve-Factor App Configuration.Configurable dynamic configuratorConfiguration-Oriented DevelopmentDefine default config value and its type which is used in your projectUse class to support inheritance to explicitly define configurable configOverride config value from multiple source withpriority supportedCallable function return valueFile (default: json)Environment VariablesProper Typecastbefore overridingGeneric Config Type Support by custom typecastLazy and Proxy Object Support.ExtensionFullApollo - A reliable configuration management systemFeatures SupportTODOIOC - Injector, SingletonHistory0.5.* (2020-12)Support SingletonMetaClassRemove unpack feature inBaseConfigby removing Mapping ClassSupport nested config for large modular purposeSupport local objectSupport generic pool objectSupport Dot Notation to updateBaseConfigobject0.4.* (2020-06)Refatory configure functionSupport property configuration0.3.* (2020-03)Add proxy and lazy module.Add find_caller to trace source of config valueRefactory ConfigMeta data structure0.2.* (2019-08)Change global variable to weak referenceRemove Lock (Prepare to implement optimistic raw lock if necessary)Improve Priority Data StructureImprove Field ValidationUse OOP to define call functionProperer validation and typecastImprove Type AnnotationsImport JSON type0.1.0 (2019-08-01)Init Project.
Package: config-bat
Introductionconfig_bat is a package helps developers easily config the app using config.json file.Getting StartedInstallation process:pip install config_batUsage:Getting config: if there is no config in config.json, return default_valuefromconfig_batimportconfigyour_config=config.get("config_key",default_value)# Get nested config data# You can get nested dict data for cases that you have many value spread out for the same master key# Example dict: two mongodb master key config, but only username is different from dev and prod# The "common" key is readed by default.# If the config apears both in "common" and other stages, the stage config will be used.nestedConfig={"common":{"mongodb":{"host":"localhost"},"development":{"mongodb":{"username":"test"}}}}host=config.get("mongodb",default_value)["host"]# Return KeyErrorhost=config.get("mongodb.host",default_value)# Return "test"The default_value is optional, if default_value is not provided, the function will return None.API references:Environment variables:The package behavior can be overrided by export these environment variables:CONFIG_PATH: the path to config file. Default: "/config/config.json".APP_STAGE: define in config.json.config.json file:The first level key is the stage of the app. You can define the config nested in those keys.The "common" key is readed by default. If the config apears both in "common" and other stages, the stage config will be used.If you want to use environmen variables, place a "$" character before you variable name.Example of config.json:{
  "common": {
    // Environmental variables
    "JWT_SECRET": "$SEC_KEY",
    "port": 8080
  },
  "development": {
   // Nested config
    "mongodb": {
      "host": "localhost",
      "user": "dev_user",
      "pass": "dev_pass"
    }
  },
  "production": {
    "mongodb": {
      "host": "your.domain",
      "user": "prod_user",
      "pass": "prod_pass"
    }
  }
}
Package: config-better
config-betterMake use of directories for configuration / data / caching better and more user-friendly!This module provides support for the XDG Base Directory specification, and OS-friendly fallbacks for Windows, Mac OS, and Linux if not otherwise specified.Usageimportos.pathimportconfigbetterc=configbetter.Config('appname')withopen(os.path.join(c.config,'config.json'))asconf:# ...Available parameters for creating aConfiginstance:force_unixallows you to force using Unix-like paths on Windows/Darwin if desired. This isn't really recommended on Windows but on Darwin it seems as though programs without a GUI usually use Unix-like configuration paths while GUI apps use the "standard" Darwin paths. By default this isFalse.Available properties ofConfig:.cache, which points to$XDG_CACHE_HOMEif available, otherwise uses a generic system equivalent..config, which points to$XDG_CONFIG_HOMEif available, otherwise uses a generic system equivalent..data, which points to$XDG_DATA_HOMEif available, otherwise uses a generic system equivalent.Additionally, the following methods are provided:.makedirs()will create the cache, config and data directories if they do not already exist, including all parent directories..rmdirs()will remove any program-specific directories that would have been created by config-better.Installationpipinstallconfig-betterDevelopingClone the repogit checkout -b some-feature-or-bugfixDo workTest withpytest(add tests to maintain coverage as best as possible)Runyapf -ir .andisort -rc .to standardize.Make a PR.
Package: configcascade
configcascade=============.. image:: https://travis-ci.org/felixcarmona/configcascade.png?branch=master:target: https://travis-ci.org/felixcarmona/configcascade.. image:: https://coveralls.io/repos/felixcarmona/configcascade/badge.png?branch=master:target: https://coveralls.io/r/felixcarmona/configcascade?branch=master.. image:: https://pypip.in/d/configcascade/badge.png:target: https://pypi.python.org/pypi/configcascade/:alt: Downloads.. image:: https://pypip.in/v/configcascade/badge.png:target: https://pypi.python.org/pypi/configcascade/:alt: Latest VersionA simple Configuration System which allows you to import and override or merge configuration parametersExample-------.. code-block:: pythonfrom configcascade import Settings, YamlFileLoaderfile_loader = YamlFileLoader()settings = Settings(file_loader, ['foo'])  # the second parameter are a the settings you which you want to merge instead of override when you importresult = settings.compile("file_a.yml")**file_a.yml:**.. code-block:: yamlimports:- file_b.yml- file_c.ymlfoo:- x- y- ztest:- a**file_b.yml:**.. code-block:: yamlfoo:- 5- 7bbbb: 8**file_c.yml:**.. code-block:: yamltest:- b**The generated result will be:**.. code-block:: yamlfoo:- x- y- z- 5- 7bbbb: 8test:- a
Package: configcat-flag-reference-validator
This tool can be used for discovering ConfigCat feature flag usages in your source code and validating them against your own ConfigCat configuration dashboard. It searches for ConfigCat SDK usage and greps the feature flag keys from the source code, then it compares them with the keys got from your ConfigCat dashboard. Manage features and change your software configuration using ConfigCat feature flags, without the need to re-deploy code. A 10 minute trainable dashboard allows even non-technical team members to manage application features. Supports A/B testing, soft launching or targeting a specific group of users first with new ideas. Deploy any time, release when confident. Open-source SDKs enable easy integration with any web, mobile or backend application.https://configcat.com
Package: configchain
ConfigChainThe key feature of ConfigChain, is the ability to dynamically create a hierarchical configuration by composition and override it through config files and the command line.Installation :pip install configchain --upgradeUsagefromconfigchainimportconfigchaincs=configchain("./tests/asset/a.yaml","./tests/asset/b.yaml",name="app-${app}",profile="profile")print(cs)...ConfigSet([('app-hello',Config([('*',ConfigSnippet([('by','tao'),('env',['ENV=${profile}','PROCESSES=32']),('at','aws'),('app','hello')])),('test',ConfigSnippet([('by','tao'),('env',['ENV=${profile}','PROCESSES=32','PROCESSES=1']),('at','docker'),('profile','test'),('app','hello')]))])),('*',Config([('*',ConfigSnippet([('by','luo'),('env',['ENV=${profile}']),('at','aws')])),('test',ConfigSnippet([('by','luo'),('env',['ENV=${profile}']),('at','docker'),('profile','test')]))]))])a.yamlby:luoenv:-ENV=${profile}at:aws---profile:testat:dockerb.yamlapp:helloby:taoenv:-PROCESSES=32---profile:testenv:-PROCESSES=1LicenseConfigChain is licensed underMIT License.
Package: configchecker
This module helps to checkconfigparser-loaded configurations.UsageInitialize description of valid configuration:schema = configchecker.ConfigSchema()Add an information of possible sections by callingschema.sectionwith section name validator and boolean flag „section required“.In every section describe possible section’s values by callingsect.value.Name/value validatorsThere are basic validators:ItemDefaultValidator— always returns trueItemStringValidator— checks if a string equals to given (probably, case-insensitive)ItemRegexValidator— checks matching a string to given regexpItemNumberValidator— checks that a string is a non-negative integerAnd validator-composers which allow to create more complex checks:ItemNotValidator,ItemAndValidator,ItemOrValidator— first-order logic on validatorsItemCountValidator— takes a validator and a function that check number of validator’s true positives (i.e. returnsTrue)Examplesimportconfigparserimportconfigcheckerasvconfig=configparser.ConfigParser()config.read_file("config")schema=v.ConfigSchema()# Section with name „REQUIRED“ will be mandatorywithschema.section("REQUIRED")ass:# It must have keys matching regexp r'item_\d+' and numeric value and nothing mores.value(v.ItemRegexValidator(r'item_\d+',value_val=v.ItemNumberValidator()).no_other()# Section with name r'OPT_\w+' (check by regexp) will be optionalwithschema.section(v.ItemRegexValidator(r'OPT_\w+'),required=False)ass:# And it may have anythingpass# Other sections will be restrictedschema.no_other()# Run checksv.ConfigSchemaValidator(schema).validate(config)Also, you can find lots of examples in tests (test_configchecker.py)AuthorSamun Victor,victor.samun@gmail.com