Saravanan666/pypi-org huggingface dataset:
Package: testaroonie
testaroonieThis is a Python package that facilitates testing with abstract scenarios. Utilizing PyTest, it offers extra utilities to streamline the creation and execution of abstract tests.InstallationYou can install thetestarooniemodule via pip:pipinstalltestaroonieOr directly from the source:UsageBelow is a usage example of thetestaroonie:fromtestaroonieimportcreate_test,execute_testtest=create_test(name="Test 1",scenario=[...])execute_test(test)This example creates an abstract test and then executes it.DocumentationThetestarooniemodule provides the following classes and functions:create_test(name: str = 'Test', scenario: list = [...])Generates an abstract test scenario with the provided name and details.execute_test(test: any)Executes the given abstract test scenario.validate_test(test: any) -> boolVerifies if the given object is a valid test scenario.calculate_test_results(test: any) -> dictCalculates the results of a given abstract test scenario.compare_test_results(test1: any, test2: any) -> boolCompares two test scenarios and returns True if their results are equivalent, False otherwise.... and many more!Please refer to the source code for the complete list of classes and functions provided by the module, as well as their detailed documentation.ContributingContributions are welcome! Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc.ContactIf you have any questions, feel free to reach out to us atpartners@abstractendeavors.com.LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.Authorsputkoff - main developerThis README file was last updated on May 29, 2023.
Package: testasposepdfcloud
Aspose.PDF for Cloud is a REST API for creating and editing PDF files. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.Pdf for Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.Pdf for Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.
Package: testAUC
testAUCOfficial implementation of the tools discussed inThe curious case of the test set AUROCIt is a set of tools designed for better evaluation ofBinary Classificationtasks in ML and AI.
Specifically dealing with the expected performance of the model onnew data.Quick startpip install testAUCFor and all-in-one view of the toolset, use the dashboad() function:fromtestAUCimportfaux_normal_predictions,dashboard# Simulate a model, evaluated on a Validation set and a Test set:y_true_val,y_score_val=faux_normal_predictions(neg_mu=0.3,pos_mu=0.8,seed=2023)y_true_tst,y_score_tst=faux_normal_predictions(std=0.5,neg_mu=0.4,pos_mu=0.9,seed=2023)# All in one Dashboard to evaluate the Validation vs. Test sets performancedashboard(y_true_val,y_score_val,y_true_tst,y_score_tst)roc_drift, val_tst_colored_roc_curve, colored_roc_curve,dashboard
noise_robustness, bias_robustness, plot_noise_robustness, plot_bias_robustness
plot_wasserstein_distance_matrix, plot_predictions_histMini-documentation of functions:dashboard() -> An All-In-One dashboard to evaluate the test performance (good place to start!)roc_drift() -> Calculate the ROC drift from validation to test setsnoise_robustness() -> Calculate the robustness of the predictions to normal noiseplot_noise_robustness() -> uses the noise_robustness to generate a plotbias_robustness() -> Calculate the robustness of the predictions to bias between the classesplot_bias_robustness() -> uses the bias_robustness to generate a plotplot_wasserstein_distance_matrix() -> See paper to understand the importance of the matrixcolored_roc_curve() ->  Plot an ROC curve that is color coded by thresholdval_tst_colored_roc_curve() -> Same colored ROC curve but for both val&tst sets (sharing color limits!)faux_normal_predictions() -> A small utility function to create fake model predictionsplot_predictions_hist() -> Plot a histogram of predictions for the Positive and Negative classes
Package: testax
testax provides runtime assertions for JAX through the testing interface familiar to NumPy users.>>> import jax
>>> from jax import numpy as jnp
>>> import testax
>>>
>>> def safe_log(x):
...     testax.assert_array_less(0, x)
...     return jnp.log(x)
>>>
>>> safe_log(jnp.arange(2))
Traceback (most recent call last):
    ...
jax._src.checkify.JaxRuntimeError:
Arrays are not less-ordered
<BLANKLINE>
Mismatched elements: 1 / 2 (50%)
Max absolute difference: 1
Max relative difference: 1
 x: Array(0, dtype=int32, weak_type=True)
 y: Array([0, 1], dtype=int32)testax assertions arejit-able, although errors need to be functionalized to conform to JAX’s requirement that functions are pure and do not have side effects (see thecheckifyguidefor details). In short, acheckify-d function returns a tuple(error, value). The first element is an error thatmayhave occurred, and the second is the return value of the original function.>>> jitted = jax.jit(safe_log)
>>> checkified = testax.checkify(jitted)
>>> error, y = checkified(jnp.arange(2))
>>> error.throw()
Traceback (most recent call last):
    ...
jax._src.checkify.JaxRuntimeError:
Arrays are not less-ordered
<BLANKLINE>
Mismatched elements: 1 / 2 (50%)
Max absolute difference: 1
Max relative difference: 1
 x: Array(0, dtype=int32, weak_type=True)
 y: Array([0, 1], dtype=int32)
>>> y
Array([-inf,   0.], dtype=float32)Installationtestax is pip-installable and can be installed by runningpipinstalltestaxInterfacetestax mirrors thetestinginterface familiar to NumPy users, such asassert_allclose.
Package: test-base-package
test_base_package自动化测试基础包，其中包括ui自动化和api接口自动化部分（暂未集成），由于test_base_package基础包集成了当前自动化测试的一些主流第三方库 ，测试人员可以通过test_base_package基础包快速的搭建自己的自动化测试框架。一、安装pipinstalltest-base-package二、使用示例1、test_base_package 基础集成cli命令testpkg，可以使用testpkg命令进行初始化测试项目，测试模块详细命令请使用testpkg -h 查看。2、命令详情positional arguments:
  project_name          项目名称为必填项
  {1,2}                 测试用例类型: 1、ui自动化测试。 2、api自动化测试。

options:
  -h, --help            show this help message and exit
  --case_name CASE_NAME
                        测试用例模块为选填项3、初始化项目命令testpkgproject_name14、初始化项目结构├─project_name
    ├─cases
    │      __init__.py
    │
    ├─logs
    ├─pages
    │   __init__.py
    │
    ├─screenshots
    ├─__init__.py
    ├─config.py
    ├─conftest.py
    ├─pytest.ini
    ├─requirements.txt
    ├─runner.py
Package: testbeam_analysis
A simple analysis of pixel-sensor data from testbeams. All steps of a full analysis are included in one file in < 1500 lines of Python code. If you you want to do simple straight line fits without a Kalman filter or you want to understand the basics of telescope reconstruction this code might help. If you want to have something fancy to account for thick devices in combination with low energetic beams use e.g. EUTelescope. Depending on the setup a resolution that is only ~ 15% worse can be archieved with this code. For a quick first impression check the example plots in the wiki and run the examples.
Package: testbedutils
# README #This is a general usage FRF tool package developed by spicer bak, and david young.  It holds general use python tools for processing wave, model, and geoprocessing data around the FRF.### What is this repository for? ###This repo houses a bunch of useful tools, primarly developed as part of the Coastal model Test bed, but are useful in processing data around the FRFversion 0.5there is no setup.py file at this point.### Contribution guidelines ###
Contributions are welcome from visiting scientists or others in the community.everything is pretty manual right now, talk to spicer Bak about contributionsspicer.bak@usace.army.mil
Package: test-bench-control
Package for controlling our test bench with:Raspberry Pi 4B (Raspberry Pi OS 64-bit)Nema 23 stepper motor with TB6600 Driver2 IMX477 Raspberry Pi Cameras and Arducam 4x Multiplexer V2.2How to install and setup:pip install test_bench_controlin config.txt change 'camera_auto_detect=1' to 'camera_auto_detect=0'in config.txt add 'dtoverlay=camera-mux-4port,cam0-imx477,cam1-imx477'How to use:from test_bench_control import camera,motormotor.rotate(degree=-8.6,slope=0.2,rpm_max=200)
camera.take_picture(0,"road/to/pic","my_pic.jpg")
Package: testbench-tuna
Testbench TunaPersonal testbench where I try out things.Python app, not meant to be used as a library.Web application usingFastAPIFor testingpytestis used.Release Management withRelease Please. Focused on
simple manual release process with the option add custom info to a release and
the changelog before performing a release. Balance between full automation
with something like semantic-release and manual release creation via the
GitHub UI.Pre-commit stuff. Code coverage with CodeCov. Poetry....Random links and references:https://github.com/google-github-actions/release-please-actionhttps://github.com/googleapis/release-please
Package: testbin
Testbin is a library of Python modules and scripts built to help with software
testing.The primary guiding principles are:A testbin module must be useful to at least its author.Assume the purpose of a testbin module is to test another application,
service, API, etc.A testbin module may have broken-by-design functionality.Provide excellent documentation along with the module.The name testbin is a play on the worddustbin. Just like a trash
can or a dustbin is a receptable, testbin
contains things that are smelly but very much wanted. It doesn’t hurt that a
bin directory in UNIX-world contains executable binaries, just as tesbin has
executable modules and scripts.There are a lot of requirements for these modules and scripts which can
result in a bloated environment to run them in. The purpose is not to run
all these modules or scripts in the same environments. Instead, the idea is
to take what you need, incorporate into your own code, and go from there.Feel free to use the code under the terms of the MIT license.
Package: test-bitcode-alt
This repo is a pure python implementation forintbitset.InstallationRequirementsPython 3.8 or laterpipinstallbitcodeDocumentationbitcode is a fallback library for intbitset, so theintbitsetclass and its methods
have same names and parameters.Below listed are the implemented classes and methods.ClassesintbitsetMethods for Automaton classaddclearcopydifferencedifference_updatediscardisdisjointissupersetissubsetremovestrbitssymmetric_differencesymmetric_difference_updatetolistunionunion_updateintersectionintersection_update__and____eq____contains____len____iter____hash____str__For documentation please refer to:https://intbitset.readthedocs.io/en/latest/
Package: test-bmi
BMI 計算器這是一個簡單的命令列 BMI 計算器，它可以通過使用者輸入自己的體重和身高來計算出其 BMI 值。
如何使用使用者可以在命令列中運行該腳本，並傳遞 --weight 和 --height 兩個參數。例如：shellpython bmi_calculator.py --weight 65 --height 170將會輸出：shell您的 BMI 值為 22.49參數說明--weight：使用者的體重，單位為公斤。
--height：使用者的身高，單位為公分。函數說明
calculate_bmi(weight, height)這是一個計算 BMI 值的函數。它接受兩個參數，即使用者的體重和身高，並返回其 BMI 值。
參數weight：使用者的體重，單位為公斤。
height：使用者的身高，單位為公分。返回值返回使用者的 BMI 值。
main()這是該腳本的主函數，它使用 argparse 模塊來解析命令列參數，並調用 calculate_bmi() 函數來計算 BMI 值，最終將其輸出到命令列中。
備註該腳本運行時需要 Python 3.6 或以上版本。
如果使用者未傳遞 --weight 或 --height 參數，腳本將會報錯。
該腳本是一個非常簡單的 BMI 計算器，不包含任何錯誤處理或邊界檢查功能。
Package: testbolt
BOLT API SecuritySecure Your API.InstallationCurrently BOLT's Python Agent supports 2 servers:DjangoFlaskIt can be installed frompypiby running :pipinstalltestboltConfigurationDjangoOnce installed, Bolt's middleware can be added by modifying middlewares list (in the projectssettings.py) like so:MIDDLEWARE=[...,"bolt.django.BoltDjango",]and configuring aBOLT_CONFIGattribute in the projectssettings.pylike this :BOLT_CONFIG={"API_KEY":"<YOUR_BOLT_API_KEY>","BOLT_HOST":"<YOUR_BOLT_COLLECTOR_URL>"}BOLT_CONFIGcan take an optional key-value pair representing the max number of workers for communicating with Bolt.FlaskOnce installed, Bolt middleware can be added simply like:fromflaskimportFlask...frombolt.flaskimportBoltFlaskapp=Flask(__name__)BoltFlask(app,"<YOUR_BOLT_COLLECTOR_URL>","<YOUR_BOLT_API_KEY>")The Flask Middleware takes the flask app, Bolt collector url, and the Bolt API Key as parameters. As an optional
parameter, a named value can be passed for max number of workers for communicating with Bolt.BoltFlask(app,"<YOUR_BOLT_COLLECTOR_URL>","<YOUR_BOLT_API_KEY>",workers="<WORKER-COUNT>")
Package: testbook
testbooktestbookis a unit testing framework extension for testing code in Jupyter Notebooks.Previous attempts at unit testing notebooks involved writing the tests in the notebook itself.
However, testbook will allow for unit tests to be run against notebooks in separate test files,
hence treating .ipynb files as .py files.testbook helps you set upconventional unit tests for your Jupyter Notebooks.Here is an example of a unit test written using testbookConsider the following code cell in a Jupyter Notebook:deffunc(a,b):returna+bYou would write a unit test usingtestbookin a Python file as follows:fromtestbookimporttestbook@testbook('/path/to/notebook.ipynb',execute=True)deftest_func(tb):func=tb.get("func")assertfunc(1,2)==3Installingtestbookpip install testbookNOTE: This does not install any kernels for running your notebooks. You'll need to install in the same way you do for running the notebooks normally. Usually this is done withpip install ipykernelAlternatively if you want all the same dev dependencies and the ipython kernel you can install these dependencies with:pip install testbook[dev]DocumentationSeereadthedocsfor more in-depth details.Development GuideReadCONTRIBUTING.mdfor guidelines on how to setup a local development environment and make code changes back to testbook.
Package: test-bootstrap
use origin cmdfirst, install ansible:pip install ansiblesecond, edit two hosts file at your machine,one is /etc/hosts,here is a content example:10.131.0.1 agent01.starwhale.com
 10.131.0.2 agent02.starwhale.com storage.starwhale.com controller.starwhale.com
 10.131.0.3 agent03.starwhale.com
 10.131.0.4 agent04.starwhale.comanother one is $PWD/hosts,here is a content example:[controller]
 controller.starwhale.com 
 [storage] 
 storage.starwhale.com
 [agent]
 agent01.starwhale.com
 agent02.starwhale.com
 agent03.starwhale.com
 agent04.starwhale.com
 ...then, exec:ansible-playbook bootstrap.yaml -i hosts --user ${sudoer} --checkfinally, exec:ansible-playbook bootstrap.yaml -i hosts --user {sudoer}use make cmdmake installedit the hosts file at your machine,the same with above examplemake check {sudoer}make play {sudoer}pip upload tutorialshttps://packaging.python.org/en/latest/tutorials/packaging-projects/https://pip.pypa.io/en/stable/reference/build-system/
Package: testbugmaker
一、安装（python版本建议3.7以上）pipinstalldubborequests二、升级包pipinstall--upgradedubborequests三、示例获取dubbo服务详情# 导入importdubborequests# 获取dubbo服务详情data=dubborequests.search('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService')获取服务下的所有方法# 导入importdubborequests# 获取dubbo服务下的所有方法data=dubborequests.list('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService')# 获取dubbo服务指定的方法data=dubborequests.list('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService','login')通过zookeeper获取服务的ip和端口, Telnet命令测试dubbo接口importdubborequestsfromdubborequestsimportConfig# 先配置zookeeper中心地址Config.zookeeper_url_list=['192.168.240.15:2181','192.168.240.15:2182','192.168.240.15:2183']invoke_data={"service_name":"cn.com.xxxxx.sso.ehr.api.dubbo.SsoEmpInfoService","method_name":"login","data":{"account":"xxxx","password":"xxxx"}}# 通过zookeeper获取服务的ip和端口, Telnet命令测试dubbo接口data=dubborequests.zk_invoke(*invoke_data)Telnet命令测试dubbo接口importdubborequestsinvoke_data={"ip":'xxxx',"port":7777,"service_name":"cn.com.xxxxx.sso.ehr.api.dubbo.SsoEmpInfoService","method_name":"login","data":{"account":"xxxx","password":"xxxx"}}# Telnet命令测试dubbo接口data=dubborequests.telnet_invoke(*invoke_data)
Package: testcanarybot
Asynchronous bot framework with perfect module library for VK API on Python 3.9 with aiohttp, asyncio and threading.importtestcanarybotbot=testcanarybot.app("token",123456)bot.start_polling()ExamplesDocumentationVK CommunityVK Author blogInstall$pip3installtestcanarybotTESTCANARYBOT STABLEVersion01.01.003ChannelSTABLEDocumentationhttps://kensoi.github.io/testcanarybot
Package: testcase
testcaseRun tabular unit tests.SupportIt has been tested withunittest.TestCase.
Basically it will work with any class that implements:assertEqual(x, y)assertRaises(t)with__enter__and__exit__handlers forwith.Exampleimportunittestimporttestcasedeffoo(x,y):returnx/yclassFooTest(unittest.TestCase):deftest_foo(self):testcase.runall(self,foo,[testcase.new(name='1 / 1 = 1',args=(1,1),expect=1),testcase.new(name='raises ZeroDivisionError',args=(1,0),raises=ZeroDivisionError),])if__name__=='__main__':unittest.main()
Package: testcase-maker
Testcase MakerCompetitive programming testcases made easy!About**NOTE:  The library is a work-in-progress, there may be breaking changes.When creating competitive programming challenges, we will also need to create testcases. These testcases may be verylarge with millions of numbers, which makes it near impossible to do manually. This library will allow you to automatethis process. It provides an intuitive API to build, generate and validate testcases.Testcase Makeraims to be:Very modular and expandable API structureFast and efficientExtensive documentation and examplesTestcase Makeris feature-packed with:Highly customisable values to suit large range of challengesSeparate constraints for subtasksExecute answer scripts in java, cpp or python to get stdoutInstallationThis lib is hosted on pypi, thus you can install this lib by typing the following line:pip install testcase-makerBasics UsageYou can get started generating testcases with just a few lines of code. Here is a simple example of generating testcaseswith N number of random integers, i.importloggingfromtestcase_maker.generatorimportTestcaseGeneratorfromtestcase_maker.valuesimportValueGroup,NamedValue,RandomInt,LoopValue,ValueReflogging.basicConfig(level=logging.INFO)values=ValueGroup()# Define the N value.values.add(NamedValue(name="N",value=RandomInt(min=50,max=1000)))values.newline()# Define the N number of integers.values.add(LoopValue(value=NamedValue(name="i",value=RandomInt(min=1,max=1000)),amount=ValueRef("N"),delimiter=" ",))# Generate stdin testcasesgenerator=TestcaseGenerator(values=values)generator.generate_stdin()Some challenges has subtasks with testcases requiring different constraints. Continuing from the previous example, hereis how you can do it withTestcase Maker.# ...replacing generator code from the simple example...# Generate stdin testcasesgenerator=TestcaseGenerator(values=values)# Reduce the range of both N and i values.easy=generator.new_subtask(no_of_testcase=2)easy.override_value(name="N",value=RandomInt(min=2,max=5))easy.override_value(name="i",value=RandomInt(min=1,max=100))# Reduce the range of N. Slightly harder but still less than default.medium=generator.new_subtask(no_of_testcase=2)medium.override_value(name="N",value=RandomInt(min=6,max=50))# Using default constraints. This will generate the largest set of testcases.hard=generator.new_subtask(no_of_testcase=2)generator=TestcaseGenerator(values=values)generator.generate_stdin()Apart from stdin, you can also generate stdout with an answer script.# ...replacing generator code from the simple example...# Generate stdin and stdout testcasesgenerator=TestcaseGenerator(values=values,answer_script="./solutions.py")generator.generate()# solution.pyN=int(input())numbers=[int(x)forxininput().split()]numbers.sort()print(" ".join([str(x)forxinnumbers]))AdvancedThere are still so many other things you can do with this library. For more advanced and detailed usage guide, please refer totheofficial documentation!LicenseThis project is license with MIT. Read full details atLICENSEfile.
Package: testcases-executor
TestCasesExecutorExecute configured groups of TestCases (subclasses ofunittest.TestCase), display human readable result in terminal, ordered by group and testcase, and generate a html file report.Install$pipinstalltestcases_executorThis also installJinja2used to generate html report.ConfigCreate a file namedtestcases.pyin the root directory of your project.Inside it, import yoursTestCasesand make a list (or tuple) namedgroupsthat is made up of tuples, each representing agroup. For example:fromyour_app.test_scriptimportTCaseOne,TCaseTwo,TCaseThree,TCaseFourgroups=[# or (('Group one','one',[TCaseThree,TCaseTwo]),# or (TCaseThree, TCaseTwo)),('Group two','two',[TCaseOne,TCaseFour]),# or (TCaseOne, TCaseFour)),]# or )Constraintsgroupsmust be alistor atuple.groups's item(group's representation) must be atuple.each tuplemust contain3 items:group's namemust be astring.argument's nameused to run all group's testcasesstring without space.unittest.TestCasesubclassesmust be alistor atuple.group and argument names,unittest.TestCasesubclassmustused once.Usage$python-mtestcases_executorThis runall tests, displayresult in terminalbefore generate, in the root directory, thehtml report filenamedtc_executor_report.html. It's possible to customize the command with following availabe arguments.Available argumentsOptions-h, --help:display help message.-o, --open:open html report in browser after test.Tests selection-group_argument_name: run allgroup's testcases's tests.-TestCaseName:(without parameter) run alltestcase's tests.-TestCaseName:(with test's names in parameter) rundesired tests.Some examples:$python-mtestcases_executor-two
$python-mtestcases_executor-one-TCaseFour-o
$python-mtestcases_executor-TCaseTwotest_one-TCaseOnetest_three
...Result's screenshotsTerminalHtml ReportIt useBootstrap4,jQueryandFontawesome icons(viastackpath cdn).Click on table's lines to see tests's infos.TestFor the same reasons that meeting your future self would cause a spacio temporal shock, testing a tester using this same tester would cause a spacio testorial shock. So above all, don't.Runtestcases_executor.tests, usingunittest:$python-munittesttestcases_executor.tests-v:+1:HtmlTestRunnerwas a great inspiration, so thank you for that.
Package: test.centrify.dmc
Centrify Delegated Machine Credential for Python LibraryDelegated Machine Credentials is the capability to trust a Windows or Linux computer to make specific API calls to privileged access service. Included in the definition are "machine scopes".  A machine scope may contain a range of PAS API endpoints that may be called by the trusted computer using the Centrify Command Line Interface. Some examples include trusting the computer to retrieve the contents of a secret, creating/reading/updating PAS objects (such as systems/accounts ETC) or reading other metadata from the PAS platform. Machine scopes may be configured at the time the computer is enrolled using cenroll or via the privileged access service platform interface (Resources → Systems → Computer → Client Profile)
Package: test-ciautobump
One line jokes for programmers (jokes as a service)InstallationInstall thepyjokesmodule with pip.See thedocumentationfor installation instructions.UsageOnce installed, simply callpyjokefrom the command line or add it to your
.bashrc file to see a joke every time you open a terminal.Use the-cflag to get jokes from a specific category. Options:-c neutral [default] (neutral geek jokes)
-c chuck (Chuck Norris geek jokes)
-c all (all jokes)You can also access the jokes in your own project by importingpyjokesand
using the functionsget_jokeandget_jokes.Documentation is available athttps://pyjok.es/ContributorsDevelopment:Ben NuttallAlex SavioBorja AyerdiOier EtxanizJokes:Luke WrenSarah BirdYash MehrotraMarc KirkwoodGregory ParkerMartin O’HanlonGraham MarkallAndreas ReinleContributingThe code is licensed under theBSD LicenceThe project source code is hosted onGitHubPlease useGitHub issuesto submit bugs and report issuesFeel free tocontributeto the codeFeel free to contribute jokes (via pull request orproposal issue)See thecontributing policyon GitHubPyjokes SocietyThis project was founded atPySS 2014and is directed by thePyjokes Society.