Saravanan666/pypi-org huggingface dataset:
Package: conftrak
conftrakconftrakis a light-weight beamline configuration and parameters storage and tracker.Based on NSLS-II [Amostra](https://github.com/NSLS-II/amostra).Quick start:` python startup.py--mongo-host=localhost--mongo-port=27017--database=conftrak--service-port=7771--timezone=US/Eastern`Badges:
[![CircleCI](https://circleci.com/gh/hhslepicka/conftrak.svg?style=svg)](https://circleci.com/gh/hhslepicka/conftrak)
[![Build Status](https://travis-ci.org/hhslepicka/conftrak.svg?branch=master)](https://travis-ci.org/hhslepicka/conftrak)
[![codecov](https://codecov.io/gh/hhslepicka/conftrak/branch/master/graph/badge.svg)](https://codecov.io/gh/hhslepicka/conftrak)
[![Coverage Status](https://coveralls.io/repos/github/hhslepicka/conftrak/badge.svg?branch=master)](https://coveralls.io/github/hhslepicka/conftrak?branch=master)
[![Code Health](https://landscape.io/github/hhslepicka/conftrak/master/landscape.svg?style=flat)](https://landscape.io/github/hhslepicka/conftrak/master)
Package: confu
ConfuConfiguration validation and generationNote PyPI package renamedAll current releases will use the nameconfu. Please change any package requirements and imports fromcfutoconfuDocumentationhttps://20c.github.io/confu/LicenseCopyright 2016-2024 20C, LLCLicensed under the Apache License, Version 2.0 (the "License");
you may not use this software except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: con-fu
Helpers for using these infrastructure tools:troposphereaws cfnansibledev$gitclonegit@github.com:bninja/confu.git$cdconfu$mkvirtualenvconfu(confu)$pipinstall-e.[tests](confu)$py.testtests/--cov=confuinstall$pipinstallcon-fusettingsRead and merged from theseinifiles:~/.confu.cfg.confu.cfgand these environment variables:CONFU_PROFILECONFU_REGIONCONFU_LOGTo see what they are:$confucfg{"atlas":{"source_dir":"infras/global/atlas"},"aws":{"default_region":"us-west-1","regions":["us-west-1"]},"cfn":{"bucket_format":"{profile}-confu-cfn-{region}","bucket_key":"vault","parameters":{"ConfName":"infra-vault","ConfSource":"{profile}-confu-pkg","InfraSilo":"vault","KeyName":"ai-gazelle","LogArchiveBucket":"{profile}-confu-log"},"stack_name_format":"{Prefix}-{AppEnv}-{random}","stack_tags":{"infra-silo":"vault"}},"pkg":{"bucket_format":"{profile}-{region}-confu-pkg","default_includes":["group_vars/","host_vars/","roles/","/ansible.cfg","!*/ansible.cfg","*.yml","!.project","!*.git","!*.pyc","!*.pyo","!*.git*","!*.travis.yml","!*.md","!Vagrantfile","!*/test/","!test.yml"],"includes":["infras/","!infras/global/mq.yml","!infras/global/site.yml","!infras/global/.confu.cfg","!infras/global/inventories/","!infras/global/formations/","!infras/global/roles/","inventories/","ops/"],"name":"{source.dir_name}","source_dir":"./","stage_dir":"/tmp/confu/{package.name}-{package.version}","version":"{source.git_version}"},"profile":"julius","region":"us-west-1"}shellSource completion and functions like:$source<(confushellenv;confushellcomplete)or use in all shells like:$(confushellenv;confushellcomplete)>~/confu.sh$cat>>~/.bashrc<<EOF

. ~/confu.sh
EOFconfueShell function for managingconfuenvironments which are just these environment variables:CONFU_PROFILECONFU_REGIONCONFU_LOGlike this:$confueCONFUE_NAME=CONFU_PROFILE=CONFU_REGION=CONFU_LOG=$confuejj-us-w1$confue-pjulius-rus-west-1-li$confueCONFUE_NAME=jj-us-w1CONFU_PROFILE=juliusCONFU_REGION=us-west-1CONFU_LOG=i$confueoff$confueCONFUE_NAME=CONFU_PROFILE=CONFU_REGION=CONFU_LOG=$confuelsjj-us-w1
Package: confucius
ConfuciusA simpler, clearer approach to configuration.Quick StartfromconfuciusimportBaseConfigclassConfig(BaseConfig)HOST='127.0.0.1'PORT:int=8000DEBUG:bool=FalsefrommyappimportServerfromconfigimportConfigserver=Server(Config.HOST,Config.PORT)$pythonapp.py-Startingserver:127.0.0.1:8000$PORT=80pythonapp.py-Startingserver:127.0.0.1:80$DEBUG=ypythonapp.py-Startingdebugserver:127.0.0.1:80TypesAnyANGRY_SNAKE_CASEattributes of aBaseConfigsub-class will be
intercepted by the meta-class, and checked for in the environment usingos.getenv.Their type will be determined by their annotation in the class, or fall back tostr.Methods will automatically behave like aproperty, with access toself.Handling of type casting can be overridden [as it is for bool] by adding it to
the__types__dict:classConfig(BaseConfig):__types__={json:lambdav:json.loads(v)ifisinstance(v,str)elsev,}LOGGING:json={'version':1...}All types defined on parentConfigclasses will be merged with this dict.InheritanceClasses, as usual, inherit from their parents.  If the type of an attribute is
changed, it will raise anAssertionError.MethodsMethod in all-caps will be invoked, and can accessselfas usual:classConfig(BaseConfig):DB_ENGINE='postgresql'DB_HOST='localhost'DB_PORT:int=5432DB_USER='test_user'DB_PASS='secret'DB_NAME='test-db'defCONNECTION_STRING(self):returnf'{self.DB_ENGINE}://{self.DB_USER}:{self.DB_PASS}@{self.DB_HOST}/{self.DB_NAME}'Using in DjangoIn yoursettings.py, put your settings class (or classes), then use the following code to select one to use:importosMODE=os.getenv('DJANGO_MODE','Local')globals().update(globals()[f'{MODE.title()}Settings'].as_dict())With Python 3.7In Python 3.7, a new feature was added which allowed you to define__getattr__for a module (SeePEP 562<https://www.python.org/dev/peps/pep-0562/>).TheBaseConfigmetaclass provides amodule_getattr_factoryfactory method
to provide a__getattr__that will look up theConfigobject.fromconfuciusimportBaseConfigclassConfig(BaseConfig):DB_HOST='localhost'DB_PORT=5432__getattr__=Config.module_getattr_factory()After importing this module, attempts to access attributes will resolve
normally and, if they’re not found, call__getattr__, just like on an object.
Package: confumatrix
Confusion matrix tool.Further information:http://en.wikipedia.org/wiki/Binary_classificationhttp://en.wikipedia.org/wiki/Sensitivity_and_specificityInstalationFrom source code:python setup.py installFrom pypi:pip intall confumatrixUsage>>> from confumatrix import ConfuMatrix
>>> cm = ConfuMatrix(a=10, b=1, c=10, d=3)
>>> cm.accuracy()
0.5416666666666666
>>> cm.precision()
0.9090909090909091
>>> cm.recall()
0.5
>>> cm.specificity()
0.75
>>> cm.sensitivity()
0.5
>>> cm.f1()
0.6451612903225806
>>> print cm
=========================
Confusion Matrix:

    10  1
    10  3

Accuracy: 0.541666666667
Recall: 0.5
Precision: 0.909090909091
Specificity: 0.75
F-measure: 0.645161290323
=========================binary_classification.pyLoad a yaml file with results of a binary classfication and prints Confusion matrix for that results.Input file format:# Languages that can be detected
types: [en, es, pt, it, de]
umbral: 0.5
sample:
  - result:
      en: 0.1
      es: 0.2
      pt: 0.3
      it: 0.6666  #hit! ( 0.6666 > 0.5 )
      de: 0.3
    expected: de
  - result:
      en: 0.2
      es: 0.99 # hit
      pt: 0.98 # hit
      it: 0.4
      de: 0.3
    expected: es
Package: confuse
Confuseis a configuration library for Python that usesYAML. It takes
care of defaults, overrides, type checking, command-line integration,
environment variable support, human-readable errors, and standard OS-specific
locations.What It DoesHere’s what Confuse brings to the table:Anutterly sensible APIresembling dictionary-and-list structures
but providingtransparent validationwithout lots of boilerplate
code. Typeconfig['num_goats'].get(int)to get the configured
number of goats and ensure that it’s an integer.Combine configuration data frommultiple sources. Usinglayering, Confuse allows user-specific configuration to seamlessly
override system-wide configuration, which in turn overrides built-in
defaults. An in-packageconfig_default.yamlcan be used to
provide bottom-layer defaults using the same syntax that users will
see. A runtime overlay allows the program to programmatically
override and add configuration values.Look for configuration files inplatform-specific paths. Like$XDG_CONFIG_HOMEor~/.configon Unix; “Application Support” on
macOS;%APPDATA%on Windows. Your program gets its own
directory, which you can use to store additional data. You can
transparently create this directory on demand if, for example, you
need to initialize the configuration file on first run. And an
environment variable can be used to override the directory’s
location.Integration withcommand-line argumentsviaargparseoroptparsefrom the standard library. Use argparse’s declarative API to allow
command-line options to override configured defaults.Include configuration values fromenvironment variables. Values undergo
automatic type conversion, and nested dicts and lists are supported.InstallationConfuse is available onPyPIand can be installed
usingpip:pipinstallconfuseUsing ConfuseConfuse’s documentationdescribes its API in detail.CreditsConfuse was made to powerbeets.
Like beets, it is available under theMIT license.
Package: confuse-jinja
Confuse - Jinja VariablesSimple Ansible-style variable parsing for Confuse config files using Jinja2.Installpipinstallconfuse_jinjaUsageimportconfuse_jinjaconfuse_jinja.enable()# now you can use jinja2 templates inside your keysconfig=confuse.Configuration('asdf',read=False)config.set({'asdf':{'blah':'asdf{{ C.other.thing }}'},'nested':'{{ C.asdf }}','other':{'thing':456}})assertconfig['asdf']['blah'].get()=='asdf456'assertconfig['nested'].get()=={'blah':'asdf456'}How it worksfor any config values that are a string, render it as a jinja2 templatetry to parse rendered string as python using ast functions graciously pulled from ansible's source codeif a valid python object (list, dict, etc.) can be parsed from the string the object will be returned, otherwise it will return as a string.TODO:test in a yaml file (possible syntax errors)enable on a config-by-config object basis instead of globally.would need to replaceConfigView.__getitem__for a single Configwould require usingself.Subviewinstead of globalSubview
Package: confusion-metrics
# David’s helpful metrics libraryThere are many different ways to evaluate a confusion matrix.
This helpful module implements a large number of themq1q2q3q4q5q6q7dpoweragfmarkednessbcrbergmagmopreqtanimotorocspecificityfpratefnrateprecisionnegativepvplrnlryoudenaccuracyfscoref2measurefmeasuref0_5measurepowerlogpowerbajic_kchisquarectgyuleYyuleQivesgibbsacpaccgdip1gdip2gdip3hammingjaccardThe original impelmentation was in Perl around 2005 and I appear to have not
noted many of the references. My apologies.Details of the calcualtion are in the docstring. This module should be used as follows:from metrics import MetricsMetrics.list_metrics() # lists method namesMetrics.list_metrics(verbose=True) # gives a dictionary with the docstringMetrics.measure(method, tp=TP, fp=FP, tn=TN, fn=FN) # for True Positive, False Negative etc.You probably want to wrap this  withtry .. exceptas it will show an error if inappropriate data is given.
Themeasuremethod will convert counts to proportional data.Don’t forget toMetrics.cite(method)which will give a list of citations, if available. If you wish to add to the citations then submit a pull request.I’d like to expand the help text in due course for each metric.Further information on many of the metrics and their behaviour can be found at  (Tharwat, Applied Computing and Informatics (2018),https://doi.org/10.1016/j.aci.2018.08.003)[https://doi.org/10.1016/j.aci.2018.08.003][Find this on BitBucket](https://bitbucket.org/davidmam/metrics.git)q1
q2
q3
q4
q5
q6
q7
dpower
agf
markedness
bcr
ber
gm
agm
op
req
tanimoto
roc
specificity
fprate
fnrate
precision
negativepv
plr
nlr
youden
accuracy
fscore
f2measure
fmeasure
f0_5measure
power
logpower
bajic_k
chisquare
ctg
yuleY
yuleQ
ivesgibbs
acp
acc
gdip1
gdip2
gdip3
hamming
jaccard
Package: confusion-test
confusion-test- Test Package for Dependency Confusion VulnerabilityBackgroundSince you found this package, you might have already read about the so-called
dependency confusion vulnerability. If you have no idea what I am talking
about, first readthis.The pip team is still discussing if this could and/or should be fixed within
pip itself or whether this is somebody else's problem.Whatever the outcome of this discussion might be, you might want to mitigate
this vulnerabilitynow. Two tools (basically proxies which filter/route
requests to repositories) have been proposed:devpisimpleindexWhat's the use ofconfusion-test?Whatever you use as a mitigation, you might wonder if it actually works, i.e.,
if you have package A in you private repository and someone else uploads
package A to PyPI using a higher version number, will you actuallynotinstall the package from PyPI.You can useconfusion-testfor testing your mitigation. It is tiny and does
not have any dependencies (as version 1.x) or functionality.How to use itManually download the latest 1.x version ofconfusion-testfromPyPI.Do not download
a 666.x version!Upload this file to your private repository. Here is how you would do it
withtwine:twine upload -r YOUR_PRIVATE_REPO confusion-test-1.*.tar.gzIncludeconfusion-testin your dependencieswithout a version.When you now install your dependencies, pip will try to installconfusion-testwith the highest version it can find:If pip installs version 1.x from you local repository, all is fine.If pip installs version 666.x from PyPI, the parent process (most likely
pip) is being killed which should bring the installation process and your
build pipeline to a grinding halt.
Package: confutil
Configuration utility to ease navigation of local and system configurationsInstallationFrom the project root directory:$ python setup.py installOr install with pip:$ pip install confutilUsageExample:from confutil import Config
conf = Config('spam')
password = conf['password']That will pull the first password value from a search through this sequence:./.spam.conf./.spam.cfg~/.spam.conf~/.spam.cfg~/.config/.spam.conf~/.config/.spam.cfg~/.config/spam/config.conf~/.config/spam/config.cfg~/.config/spam/config/etc/.spam.conf/etc/.spam.cfg/etc/spam/config.conf/etc/spam/config.cfg/etc/spam/configTo write out a loaded configuration:from confutil import Config
c = Config('myapp')
c.write('output_path.cfg')To print a derived configuration from the current directory, run:$ confutil $PROJECT_NAMETo output it to a new file, run:$ confutil $PROJECT_NAME -o output_path.cfgRelease Notes0.1.3:Addget_in(key)andget_as(key, type=str)0.0.1:Project created
Package: confutilPPP
confutilPPP1.安装pip install confutilPPP2.导入并使用import confutilPPP

def test():
    # _object : dict, 包含配置对象
    # _filename : str, 配置文件名 默认为 config
    # return : dict, 配置字典
    # 首次当前位置生成 *.yml 文件，之后直接读取
    # *.yaml也可用
    CONFIG = {
        'test': 'test'
    }
    conf = confutilPPP.check_config(_object=CONFIG, _filename='config')
    print(conf)
Package: confyaml
confyamlPython package to deal with configuration files in YAMLUsagefromconfyamlimportConfig# Assumes you have a file called config.yamlconfig=Config()# But you can also pass the path of other yaml fileother_config=Config("other_config.yaml")# Parameters can be accessed in three different ways:print(config.a)print(config["a"])print(config.get("a"))# If the parameter does not exist, AttributeError will be raised# Parameters can be set in three different ways:config.a="b"config.set("a","c")config["a"]="e"# You can save your changes to the yaml file# If you pass an extra argument, it will save the yaml file on that pathconfig.save("new_config.yaml")TestsUnittests available on the "test" folder. You can run them using this:python-munittesttests.test1.GetSetSaveTestpython-munittesttests.test1.SanityTestReferencesThis Stack Overflow answerhelped me to figure
out how to transform the YAML file into a object accessible with dot (.) operatorThis blog posthelped me on merging the yaml file
with the Config object
Package: confygure
confygure: A simple YAML based configuration library for PythonInstall❯pipinstallconfygureUsageThe library loads aconfig.ymlfrom the current directory by default.Given theconfig.yml:test:some valueYou can useconfygurelike this:>>>fromconfygureimportconfig>>>config('test')'some value'If you want typing, you can get typed results like this:>>>fromconfygureimportconfig_t,config_rt>>>config_t(str,'test')# config_t ensures the return value is a str'some value'>>>config_t(str,'nonexist')# config_t allows empty valuesNone>>>config_rt(str,'nonexist')# config_rt requires a valueKeyError:"Missing configuration key ('nonexist',)"In short, you can access configuration using the following methods:config(...): Anyconfig_t(T, ...): T | Noneconfig_rt(T, ...): TYou can use thesetup()method to specify the location of the configuration
file and if the log level of the root logger should be configured:Given the configuration fileexample.yml:test:some valuelogger:loglevel:DEBUGTo load this custom configuration file and set the location of the log level
config, use something like this:>>>fromconfygureimportsetup,config>>>setup(files=['./example.yml','~/example.yml'],...logger=['logger','loglevel'])>>>config()INFO:root:Updatedconfigurationfrom./example01.ymlINFO:root:LoglevelsettoDEBUG{'test':'some value','logger':{'loglevel':'DEBUG'}}This will actually check if a local file./example.ymlexists and fall back
to~/example.ymlfrom your home directory.
Package: confyml
confymlProject to allow easy application of config to python methods and functions.The package allows the user to provide keyword arguments to any decorated function/method. If keyword arguments are
passed to the function/method directly in the code this will overwrite any configured behaviour. By having this, one can
easily support configurability in applications without the need for code changes
or unwieldy config classes that also require code change to alter.installInstall like any other python package, from pypipipinstallconfymlusageAt the definition of classes, methods and functions, importconfymland apply the decorator to allow the function to
become configurable.# example_module.pyfromconfymlimportconfymlconfig=confyml.get_config()classExampleClass:@config.applydef__init__(self,kwarg=None):self.kwarg=kwarg@config.applydefexample_method(self,arg1,kwarg_2=None):returnarg1,self.kwarg,kwarg_2@config.apply()defexample_function(arg2,kwarg_3=None):returnarg2,kwarg_3Create ayamlfile to hold the definition. Default mode forconfymlismcf: modules, classes and functions; where
the yaml file has a structure like the one below.# example.yamlexample_module:ExampleClass:kwarg:'class_kwarg'example_method:kwarg_2:'method_kwarg'example_function:kwarg_3:'function_kwarg'In the calling script, the application that uses the classes and functions, set the config file to follow.# main.pyfromconfymlimportconfymlimportexample_moduleconfyml.set_config('example.yaml')e=example_module.ExampleClass()print(e.example_method('arg1'))print(example_module.example_function('arg2'))$ python main.py
arg1 class_kwarg method_kwarg
arg2 function_kwargThe use should be one config per application.Keyword arguments provided to the function/method directly will overwrite the config file's behaviour.# main.pyfromconfymlimportconfymlimportexample_moduleconfyml.set_config('example.yaml')e=example_module.ExampleClass(kwarg='direct_kwarg')print(e.example_method('arg1'))print(example_module.example_function('arg2','direct_func_kwarg'))$ python main.py
arg1 direct_kwarg method_kwarg
arg2 direct_func_kwargmodesThe config can also be provided with amodeargument,# main.pyfromconfymlimportconfymlconfyml.set_config('<yaml_filepath>',mode='<mode>')to set the level
of the config. By default the mode ismcf, which supports a yaml structure ofmodule:Class:<defined_kwargs>method:<defined_kwargs>function:<defined_kwargs>modecf- classes and methods and/or functionsClass:<defined_kwargs>method:<defined_kwargs>function:<defined_kwargs>modemf- modules and functionsmodule:function:<defined_kwargs>and finally modef- functions onlyfunction:<defined_kwargs>Use the mode that best suits your application.
Package: conga-office
conga_officePython library thought to active "conga-office" in order to appear online to your employer while grabbing a coffee or  having creativity sessions.InstallationYou can install the package using pippip install conga-officeUsageMoving mouse's pointerImport the modulefrom conga_office.tools import activate_conga_officeThen run any of the available modes:Move mouse pointer from right to left for 10 seconds:activate_conga_office(duration=10, pattern='linear')oractivate_conga_office(duration=10)Move mouse pointer in diamond shape for 20 seconds:activate_conga_office(duration=20, pattern='diamond')Move mouse pointer in circles for 5 seconds:activate_conga_office(duration=5, pattern='circular')Move mouse pointer in randomly for 10 seconds:activate_conga_office(duration=10, pattern='random')To move faster or slower setspeed='turbo'orspeed='slow'respectively. E.G.activate_conga_office(duration=10, pattern='diamond', speed='turbo')Sending corporate jargon via Teams (Windows)This is a function only available for Windows 10 users who use Microsoft Teams. If you want yo send
10 messages at intervals of 2 seconds (it is recommended at least 2 seconds of interval between messages)
to a contact whose id isa_name.a_surnamethen apply the following code:from conga_office.tools import send_bs_via_teams
send_bs_via_teams(
  contact_id = 'a_name.a_username', 
  number_of_bs_statements = 5, 
  intervals_in_secs=2)Sending corporate jargon via Slack (macOS)This is a function only available for macOS users who use Slack. If you want yo send
10 messages at intervals of 2 seconds (it is recommended at least 2 seconds of interval between messages)
to a contact whose fortunate name is Elvis Presley then apply the following code:from conga_office.tools import send_bs_via_slack
send_bs_via_slack(
  contact_id = 'Elvis Presley', 
  number_of_bs_statements = 5, 
  intervals_in_secs=2)Future endeavorsCreate flamboyant Power Point presentations.Build internal colloquial bs generator.
Package: congas
# Copy number genotyping jointly from scRNA and scATAC sequencingA set of Pyro models and functions to infer CNA from scRNA-seq and scATAC-seq data.
It comes with a companion [R package](https://github.com/caravagnalab/rcongas) that works as an interface and provides preprocessing, simulation and visualization routines.Currently providing:A mixture model on segments where CNV are modelled as Categorical random variable (LatentCategorical)<!–Coming soon:
- A linear model in the emission that can account for known covariates
- The equivalent of MixtureGaussian but with CNVs as Categorical random variable
- A model on genes (all the other models assume a division in segments)
–>
To install:$ pip install congas<!–
To run a simple analysis on the example data`python import congas as cn from congas.models import MixtureGaussian data_dict = cn.simulation_data params, loss = cn.run_analysis(data_dict,MixtureGaussian, steps=200, lr=0.05) `[Full Documentation](https://annealpyro.readthedocs.io/en/latest/)
–>