Saravanan666/pypi-org huggingface dataset:
Package: paramagpy
Paramagpy.. image::https://zenodo.org/badge/130321289.svg:target:https://zenodo.org/badge/latestdoi/130321289paramagpy is a python module for calculating paramagnetic effects in NMR spectra of proteins. This currently includes fitting of paramagnetic susceptibility tensors to experimental data associated with pseudocontact shifts (PCS) residual dipolar couplings (RDC), paramagnetic relaxation enhancements (PRE) and cross-correlated relaxation (CCR). A GUI allows easy viewing of data and seamless transition between PCS/RDC/PRE/CCR calculations... figure:: paramagpy/icon.png
:align: center*Please, not the eyes!* - Canberra cyclistFeaturesSupport for PDB protein structures with modelsCombined SVD gridsearch and gradient descent algorithms for solving PCS tensorsOptional fitting of reference offset parameter for PCS datasetsSupport for Residual Anisotropic Chemical Shielding (RACS) and Residual Anisotropic Dipolar Shielding (RADS) corrections to PCSLanthanide parameter templates availablePlotting of correlation between experiment/calculated valuesPlotting of tensor isosurfaces compatible with PyMolQ-factor calculationsError analysis of tensor fit quality by Monte-Carlo or Bootstrap methodsOptimisation of multiple PCS/PRE/CCR datasets to a common positionUnique tensor representation compatible with Numbat (program)Fitting of RDC tensor by SVD algorithmPRE calculations by Solomon and Curie spin mechanismsSpectral power density tensor fitting for anisotropic dipolar PREsCSA cross-correlation correction to PRE calculationsDipole-dipole/Curie spin cross-correlated relaxation calculationsFitting of tensor parameters to PRE/CCR dataMacro scripts for integration with CCPNMR and SparkyDocumentationhttps://henryorton.github.io/paramagpy/Citing paramagpyParamagpy is published in Magnetic Resonancehttps://doi.org/10.5194/mr-1-1-2020
Package: paramak
ParamakParamak python package allows rapid production of 3D CAD models and neutronics
models of fusion reactors. The purpose of Paramak is to provide geometry for
parametric studies. Paramak can create geometry in standard CAD formats such as
STP, STL, BRep, HTML and DAGMC h5m.:point_right:Documentation:point_right:Video presentation:point_right:Installation:point_right:Publication:point_right:Docker images:point_right: Examples with Neutronics1,2,3
Package: paraman
paramanRequirementsPython 3.6.7+(Optional)AWS CLIfor deploying a CloudFormation templateInstallation$pipinstallparamanDockerTODO: Update DockerHub pipelinedockerrun--rm-itunfor19/paramanFeaturesGet SSM Parameters by path, output:.parameters.jsonand.parameters_types.jsonGenerate SSM parameters to CloudFormation templates, according to Get SSM Parameters, output:.merged.yamlDeploy CloudFormation template.merged.yaml, output: CloudFormation Stack in AWSPut SSM Parameters values in AWS, according to Get SSM Parameters, output:SSM Parameters with a dummy value "empty" in AWSUsageUsage: paraman [OPTIONS] COMMAND [ARGS]...

  Examples:

  paraman --parameters-region eu-west-1 parameter-get              
  --prefix-to-replace /my-app/development/                         
  --exclude-paths "/accounts/,/google_credentials/,/cookie_secret"

  paraman cloudformation-create                                    
  --prefix-to-replace /my-app/development/                         
  --replace-prefix-with /my-app/test/

  aws cloudformation deploy                                        
  --region us-east-1                                               
  --template-file .merged.yaml                                     
  --stack-name test-virginia

  paraman --parameters-region us-east-1 parameter-put              
  --prefix-to-replace /my-app/dev/                                 
  --replace-prefix-with /my-app/test/                              
  --overwrite=true

Options:
  -ci, --ci                Use this flag to avoid confirmation prompts
  -dev, --local-dev        Use this flag for local tests with localstack
  -u, --endpoint-url TEXT  Set a custom AWS endpoint_url
  --help                   Show this message and exit.

Commands:
  cloudformation-create  Alias: cc Gets SSM Parameters from AWS or from the...
  parameter-get          Alias: pg Gets `parameters_region` and...
  parameter-put          Alias: pp Gets `parameters_region` and...
  version                Print the installed versionContributingReport issues/questions/feature requests on theIssuessection.Pull requests are welcome! Ideally, create a feature branch and issue for every single change you make. These are the steps:Fork this repoCreate your feature branch from master (git checkout -b my-new-feature)Install from source$gitclonehttps://github.com/${GITHUB_OWNER}/paraman.git&&cdparaman...$pipinstall--upgradepip...$python-mvenv./ENV$../ENV/bin/activate...$(ENV)pipinstall--editable....# Done! Now when you run 'paraman' it will get automatically updated when you modify the codeAdd the code of your new featureTest - make sure all commands work properly (TODO: add tests)Commit your remarkable changes (git commit -am 'Added new feature')Push to the branch (git push --set-up-stream origin my-new-feature)Create a new Pull Request and tell us about your changesAuthorsCreated and maintained byMeir Gabay
Package: paramaterial
AboutA Python package for parameterizing materials test data. Given a set of experimental measurements, Paramaterial can be
used to determine material properties and constitutive model parameters.Source Code:https://github.com/dan-slater/paramaterialDocumentation:https://dan-slater.github.io/paramaterial/PyPI:https://pypi.org/project/paramaterial/Examples:https://github.com/dan-slater/paramaterial-examplesThe package was designed to help improve the quality and quantity of data available for materials modeling and
simulation. It is hoped that using Paramaterial will help improve repeatability and reproducibility of materials test
data analyses, and help to reduce the time and effort required to perform such analyses.InstallationpipinstallparamaterialUsagePlease see theAPI referencefor details on the toolkit's
functions and classes.Usage examples are available in theexamples repository.
These examples can be downloaded using thedownload_examplefunction:# Download the basic usage example to the current directoryfromparamaterialimportdownload_exampledownload_example('dan_msc_basic_usage_0.1.0')# Other examples are also currently available:# download_example('dan_msc_cs1_0.1.0')# download_example('dan_msc_cs2_0.1.0')# download_example('dan_msc_cs3_0.1.0')# download_example('dan_msc_cs4_0.1.0')The examples include datasets, notebooks, and other assets that showcase the functionality and capabilities of the Paramaterial library. These examples can be downloaded and run locally, providing an interactive way to explore and learn about the library.
For more details see the documentation for thedownload_examplefunction atreference/example.OverviewParamaterial is an open-source Python package for parameterising materials test
data. Paramaterial provides functionality for the repeatable processing of mechanical test results,
such as stress-strain data from a tensile test. An example of various stages of data processing that
might be performed using the toolkit is shown in the figure below.Paramaterial is also useful for generating a table of parameters from raw data, as illustrated below. Various data analysis techniques can then be applied to this table of parameters.ContributingPlease go to the GitHub repository and submit an issue or pull request.LicenseParamaterial is licensed under the MIT license.
Package: paramBundle
The documentation has not been created yet - sorry - you will have to make do with the following example code for now:defexampleFct(aaa,bbb,**kwargs):""":param aaa: just a dummy.:param bbb: just a dummy.:return: 'None'.An example function for using 'ParamBundle' to automatically select,check (for completeness and correct types) and bundle keyword argumentsinto an instance of an enhanced dictionary class, which also and inparticular mirrors items to attributes and attributes to itemsautomatically."""try:### determine the mandatory as well as the optional parameters and belonging parameter types ###### and extract, check and bundle the belonging parts of 'kwargs' into 'args'.args=ParamBundle()args.registerMandatories(ccc=int,ddd=float)args.registerOptionals(eee=(int,float,type(None)),fff=None)args.update(kwargs)ifargs.isComplete()==False:print(">>>>>>>>>> MANDATORY PARAMETERS INCOMPLETE <<<<<<<<<<")exceptExceptionasee:print("Error in exampleFct: function called with wrong arguments (%s)!"%ee)Furthermore you should try out:python paramBundle.py --testand have a look at the output! Last but not least the code of the belonging selftest() function and the functions called from there can provide some insights.Further infomations and links can be found on my homepagehttps://www.blackward.deHave Fun!
Package: paramctl
paramctlA Python library to match positional parameters based on a json fileWhen integrated properly to your script, you should be able to trigger actions like this:script.py action object extra_parameter_1 extra_parameter_nHow does it workYou will need a Json file to define the accepted actions and objectsThe Json file should look like this:{"action1":
      { "object_a": {
        "help": "Description for what action1 does to object_a",
        "action": "the_name_of_your_function_for_action1_on_object_a"
        },
        "object_b": {
        "help": "Description for what action1 does to object_b",
        "action": "the_name_of_your_function_for_action1_on_object_b"
        }
      },
     "action2":
      { "object_a": {
        "help": "Description for what action2 does to object_a",
        "action": "the_name_of_your_function_for_action2_on_object_a"
        },
        "object_y": {
        "help": "Description for what action2 does to object_y",
        "action": "the_name_of_your_function_for_action2_on_object_y"
        }
      }
  }
}On your python code (e.g.: myscript.py) add the following:import paramctl

params = paramctl.ParameterMap("parametermap.json")
try:
    print(globals()[function[0]](function[1:]))
except KeyError:
    print("No function available like " + " ".join(function[:])), finally, create the functions defined on the Json (under "action") like this:def get_nodes(*argv):
    ......and manage the arguments as you please.
Package: paramdb
ParamDBPython package for storing and retrieving experiment parameters.InstallationInstall the latest version of ParamDB using pip:pip install -U paramdbTo install along withAstropyfor support for storing scalarastropy.units.Quantityobjects in the database, ParamDB can be installed with theastropyextra:pip install -U "paramdb[astropy]"UsageParamDB has two main components:Parameter Data: Base classes that are used to defined the structure and
functionality of parameter data.Database: A database object that commits and loads parameter data to a persistent
file.See theapi referencefor more information.
Package: paramdec
Paramdec is a convenient way to create parametrized decorators.UsageCreate your parametrized decorator:>>> from paramdec import paramdec
>>> @paramdec
... def my_dec(func, foo=42, bar=None):
...     def wrapper(*func_args, **func_kwargs):
...         # Process foo and bar
...         return func(*func_args, **func_kwargs)
...     return wrapperUse it with parameters:>>> @my_dec(bar="bar")
>>> def func(): passOr without parameters:>>> @my_dec()
>>> def func(): passOr even without parentheses:>>> @my_dec
>>> def func(): passAlso, consider usingfunctools.wrapsfor your decorators.LimitationsNo positional args supported.The rationale behind this is the fact that I have not found any pythonic way to
make a decorator differentiate between a function to be decorated and a
callback. So if you pass a single callable positional argument to a
parametrized decorator, it will mistakenly decide that it was called not as a
factory but as a casual decorator.
Package: parameter
ParameterGet and check HTTP parameters like use ORM.Imaging you have a lot parameters to get and check, and also you need to pass those
parameters to a function. You will write a lot code to do this, this made code bloat
and ugly. So this libary let you get and check HTTP parameters like use ORM:You define the parameters in a class, and then use the instance of the class to pass
to a function and something else.InstallationUse pip to install:$pipinstallparameterDocumentation
Package: parameter-checks
For more info, pleasevisit the GitHub page of this project.Basic exampleimportparameter_checksaspc@pc.hints.cleanup# be left with only type-annotations@pc.hints.enforce# enforce the lambda but not the typesdefdiv(a:int,b:pc.annotations.Checks[int,lambdab:b!=0]):returna/bdiv(1,1)# returns 1.0div(1,0)# raises ValueErrorAs can be seen in this example, this package provides a new type-annotation:pc.annotations.Checks(it also providespc.annotations.Hooks, see below).
Using@pc.hints.enforceon a function
will enforce the checks given to those annotations (but not the types).@pc.hints.cleanupwould produce thediv.__annotations__of{"a": int, "b": int}in the example above.Complex exampleimportparameter_checksaspcdefdecision_boundary(fct,parameter,parameter_name,typehint):iftype(parameter)isnottypehint:err_str=f"In function{fct}, parameter{parameter_name}={parameter}"\f"is not of type{typehint}!"raiseTypeError(err_str)return3+4*parameter-parameter**2@pc.hints.enforcedefclassify(x:pc.annotations.Hooks[float,decision_boundary],additional_offset:pc.annotations.Checks[float,lambdab:0<=b<=100]=0.)->bool:return(x+additional_offset)>=0if__name__=='__main__':assertclassify(1.)isTrue# 6.assertclassify(2.)isTrue# 7.assertclassify(5.)isFalse# -2.assertclassify(5.,2.)isTrue# 0.classify("not a float!")# raises TypeErrorclassify(1.,-1.)# raises ValueErrorFor additional comments on this example (and much more),visit the GitHub page of this project.
Package: parameter-decorators
parameter-decoratorsHandy decorators for converting parametersInstallationInstall the last released version usingpip:python3-mpipinstall-Uparameter-decoratorsOr install the latest version from sources:gitclonegit@github.com:matan1008/parameter-decorators.gitcdparameter-decorators
python3-mpipinstall-U-e.UsageThe package contains several handy decorators, lets give an example withstr_to_path:fromparameter_decoratorsimportstr_to_path@str_to_path('input_file')defget_parent(input_file):returninput_file.parent# Will print "/usr/bin"print(get_parent('/usr/bin/python'))
Package: parameter-expansion
POSIX Parameter ExpansionThis is an experiment to create a Python library to enablePOSIX parameter expansionfrom a string.Obvious Test Cases>>>fromparameter_expansionimportexpand>>>foo='abc/123-def.ghi'>>># Bland Expansion>>>expand('abc $foo abc')'abc abc/123-def.ghi abc'>>>expand('abc${foo}abc')'abcabc/123-def.ghiabc'>>>>>># Default Value Expansion>>>expand('-${foo:-bar}-')'-abc/123-def.ghi-'>>>expand('-${bar:-bar}-')'-bar-'Default Value Expansion>>>foo='abc/123-def.ghi'>>>expand('abc $foo abc')'abc abc/123-def.ghi abc'>>>expand('abc${foo}abc')'abcabc/123-def.ghiabc'
Package: parameter-expansion-patched
POSIX Parameter ExpansionThis is an experimental Python library to enablePOSIX parameter expansionin a string.
It supports also a subset ofBash parameter expansion.Note that this is a fork from upstream to support proper release on PyPI.This repohttps://github.com/nexB/parameter_expansion_patchedis released athttps://pypi.org/project/parameter-expansion-patched/on PyPI.Upstream is less active lately athttps://github.com/kojiromike/parameter-expansion/Why not spawning a shell directly for this?One reason is that it may be security risk. Another reason is to
support lightweight analysis or evaluation of shell parameters with
few system dependencies and outside of a running shell.For instance this use inscancode-toolkitas part of a lightweight
shell script parser to extract and expand parameters found in some
build scripts.Which expansions are supported?All the standard shell expansions are supported, including some level
of nested expansion, as long as this is not too complex or ambiguous.
In addition, we support Bash substrings and string replacement.
There is an extensive test suite listingall supported substitionsHow does this work?Theexpand()function accepts a string and a dictionary of variables
(otherwise it uses the current environmnent variables). The string is
parsed with a custom parser and interpreted to perform the various
expansion procedures using these variables.Obvious Test Cases>>>fromparameter_expansionimportexpand>>>foo='abc/123-def.ghi'>>># Bland Expansion>>>expand('abc $foo abc')'abc abc/123-def.ghi abc'>>>expand('abc${foo}abc')'abcabc/123-def.ghiabc'>>>>>># Default Value Expansion>>>expand('-${foo:-bar}-')'-abc/123-def.ghi-'>>>expand('-${bar:-bar}-')'-bar-'Default Value Expansion>>>foo='abc/123-def.ghi'>>>expand('abc $foo abc')'abc abc/123-def.ghi abc'>>>expand('abc${foo}abc')'abcabc/123-def.ghiabc'Any other library doing similar thing?https://github.com/sayanarijit/expandvarshas similar features yet does not cover all the expansions that this library supports (such as %, # and nested variables).https://github.com/sloria/environs
Package: parameterized-mortgage
Parameterized MortgageA package to provide an easily vizualizable mortgage class, built on the Holoviz Param and Panel packages.InstallationInstall the package using pip:pip install parameterized_mortgageImport the Mortgage class:from parameterized_mortgage import MortgageDemoThe package includes a demo dashboard application to show how the Mortgage class can be embedded in visualizations using holoviz panel. See the code inparameterized_mortgage.dashboardto see how this is achieved.To run the demo on your own machine, install the package usingpipx(install pipx if necessary):pipx install git+https://github.com/JonathanMair/parameterized_mortgage.gitThe run the following command:dashboardThe panel app will launch and should open automatically in a browser. It will look like this:UsageMortgage class constructor and user-set parametersThe Mortgage constructor takes 3 named parameters:principal (float): amount initially borrowedrate (float): annual interest rate expressed as a %term (int): mortgage term in yearse.g.:mortgage = Mortgage(principal=300000, rate=4.5, term=20)These three parameters can be re-set at any time and all other members will be recalculated automatically as a result.e.g.:mortgage.rate = 3.8Other class membersMortgage.monthly_payment: A float representing the value of monthly repayments without roundingMortgage.get_monthly_payment(): Returns the monthly repayment as a string, formatted to 2 decimal placesMortgage.repayment_schedule(): Returns a pandas DataFrame containing the full repayment schedule or amortization tableMortgage.annual_summary(): Returns a pandas DataFrame containing the repayment schedule summarized by yearMortgage.lifetime_summary(): Returns a pandas DataFrame containing the repayment schedule summarized over the whole lifetime of the mortgageMortgage.custom_widgets(): Returns dictionary detailing customised widgets for a panel.Param object that will allow the user-set parameters to be incorporated easily in a dashboardMortgage.amortization_chart(): Returns a plot of the outstanding loan over timeMortgage.chart_interest_vs_capital(): Returns a plot of the interest and capital components of monthly payments over timeContributingContributions are welcome!LicenseThis project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.DisclaimerThis software makes calculations that could be relevant to investment decisions, but it is provided without warranty. Users' attention is drawn to the relevant paragraphs of the licence.Change log0.1.5: updated README.md0.1.4: added script entrypoint0.1.3: movedmain.py with demo cli to moduledashboard0.1.2: fixed error in param.depends declarations in Mortgage
Package: parameterizedtestcase
Parameterized tests for Python’s unittest moduleThis was inspired by theparameterized tests
featureinpy.test. I had been using py.test for the
particular test that motivated this, but my colleague had some
reservations about using py.test and all I really needed was the
parameterized tests so I whipped this up with a bit of metaclass
hackery.Example usagefromparameterizedtestcaseimportParameterizedTestCaseclassMyTests(ParameterizedTestCase):@ParameterizedTestCase.parameterize(("input","expected_output"),[("2+4",6),("3+5",8),("6*9",54),])deftest_eval(self,input,expected_output):self.assertEqual(eval(input),expected_output)Result of running this:~/dev/git-repos/python_unittest_parameterized_test_case$ python -m unittest -v tests
test_eval_input_2+4_expected_output_6 (tests.MyTests) ... ok
test_eval_input_3+5_expected_output_8 (tests.MyTests) ... ok
test_eval_input_6*9_expected_output_54 (tests.MyTests) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.001s

OKSupported Python versionsPython 2.5Python 2.6Python 2.7Python 3.1Python 3.2Python 3.3PyPy 1.9Jython 2.5or saystox:~/dev/git-repos/python_unittest_parameterized_test_case$ tox
...
  py25: commands succeeded
  py26: commands succeeded
  py27: commands succeeded
  py31: commands succeeded
  py32: commands succeeded
  py33: commands succeeded
  jython: commands succeeded
  pypy: commands succeeded
  congratulations :)You also can check thelatest Travis CI results, but
Travis doesn’t build all of the above platforms.IssuesSend your bug reports and feature requests tohttps://github.com/msabramo/python_unittest_parameterized_test_case/issues