Saravanan666/pypi-org huggingface dataset:
Package: testpythonalex
Cohere Python SDKThis package provides functionality developed to simplify interfacing with theCohere APIin Python 3.DocumentationSee theAPI's documentation.InstallationThe package can be installed withpip:pipinstall--upgradecohereInstall from source:pythonsetup.pyinstallRequirementsPython 3.6+Quick StartTo use this library, you must have an API key and specify it as a string when creating thecohere.Clientobject. API keys can be created through theplatform. This is a basic example of the creating the client and using thegenerateendpoint.importcohere# initialize the Cohere Client with an API Keyco=cohere.Client('YOUR_API_KEY')# generate a prediction for a promptprediction=co.generate(model='large',prompt='co:here',max_tokens=10)# print the predicted textprint('prediction:{}'.format(prediction.generations[0].text))VersioningTo use the SDK with a specific API version, you can specify it when creating the Cohere Client:importcohereco=cohere.Client('YOUR_API_KEY','2021-11-08')EndpointsFor a full breakdown of endpoints and arguments, please consult theCohere Docs.Cohere EndpointFunction/generateco.generate()/choose-bestco.choose_best()/embedco.embed()/likelihoodco.likelihood()ModelsTo view an up-to-date list of available models please consult the models section in theplatform. To get started try outlargefor Generate, Choose Best, and Likelihood orsmallfor Embed.ResponsesAll of the endpoint functions will return a Cohere object corresponding to the endpoint (e.g. for generation, it would beGeneration). The responses can be found as instance variables of the object (e.g. generation would beGeneration.text). The names of these instance variables and a detailed breakdown of the response body can be found in theCohere Docs. Printing the Cohere response object itself will display an organized view of the instance variables.ExceptionsUnsuccessful API calls from the SDK will raise an exception. Please see the documentation's page onerrorsfor more information about what the errors mean.
Package: test-pytorch-gpu
Utility ScriptDescriptionThis script is to test pytorch + GPU installation on any new machine.
It will check if GPU is available and run a 10 epoch training on CIFAR10 dataset.Installrun commandpip install test-pytorch-gpuUserun commandrun_cifarMIT LicenseCopyright (c) 2021, Alexey DemyanchukPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: test-QSCOUT-gatemodels
QSCOUT Gate ModelsTheQuantum Scientific Computing Open User Testbed
(QSCOUT)is a five-year DOE program to build a
quantum testbed based on trapped ions that is available to the research
community. As an open platform, it will not only provide full specifications
and control for the realization of all high level quantum and classical
processes, it will also enable researchers to investigate, alter, and optimize
the internals of the testbed and test more advanced implementations of quantum
operations.This Python package allowsJaqalPaqto understand the native gate set used by QSCOUT hardware.  In particular,
it allows JaqalPaq to emulate Jaqal programs targeting QSCOUT hardware.InstallationThe QSCOUT Gate Models package is available onGitLab.
Use the package managerpipto install it.pipinstallqscout-gatemodelspyGSTiis used to perform forward simulations, and
is a recommended dependency.pipinstallpygstiLicenseApache 2.0Questions?For help and support, please contactqscout@sandia.gov.
Package: testqsctl
qsctl is intended to be an advanced command line tool for QingStor, it provides
powerful unix-like commands to let you manage QingStor resources just like files
on local machine. Unix-like commands contains: cp, ls, mb, mv, rm, rb, and sync.
All of them support batch processing.Installationvirtualenv:$ pip install qsctlSystem-Wide:$ sudo pip install qsctlOn Windows systems, run it in a command-prompt window with administrator
privileges, and leave out sudo.Getting StartedTo use qsctl, there must be a configuration file to configure your ownqy_access_key_id,qy_secret_access_key, andzone, for example:qy_access_key_id: 'QINGCLOUDACCESSKEYID'
qy_secret_access_key: 'QINGCLOUDSECRETACCESSKEYEXAMPLE'
zone: 'pek3a'The configuration file is~/.qingcloud/config.yamlby default, it also
can be specified by the option-c/path/to/config.Available CommandsCommands supported by qsctl are listed below:lsList qingstor keys under a prefix or all qingstor buckets.cpCopy local file(s) to qingstor or qingstor key(s) to local.mbCreate a qingstor bucket.rbDelete an empty qingstor bucket or forcibly delete nonempty qingstor bucket.mvMove local file(s) to qingstor or qingstor keys(s) to local.rmDelete a qingstor key or keys under a prefix.syncSync between local directory and qingstor prefix.ExamplesList keys in bucket <mybucket> by running:$ qsctl ls qs://mybucket
Directory                          test/
2016-04-03 11:16:04     4 Bytes    test1.txt
2016-04-03 11:16:04     4 Bytes    test2.txtSync from qingstor prefix to local directory:$ qsctl sync qs://mybucket3/test/ test/
File 'test/README.md' written
File 'test/commands.py' writtenSee the detailed usage and more examples with ‘qsctl help’ or ‘qsctl <command> help’.
Package: test-qt5-cef
version: 1.1.7

sth tips(mac):
1, cefpython3== version 57.0, python version to use the version 3.7, 3.7 version is not supported.
cefpython3==66.0. If the mac os version is less than 11(big sur), you need to enable the external_message_pump parameter. Otherwise, the page cannot respond to the event loop properly.
3, cefpython3==66.0 version, if the native html select tag element appears in the page, after clicking will produce a flash back phenomenon.
4. For mac os packaging, use the pyinstaller package tool (pyinstaller version is 4.3).Version: 1.1.8 / 1.1.9

sth tips:
1. When the embedded page is cross-domain, the request request is blocked through CEF
2. WebRequestClient OnDownloadData() accepted byte as the data type, but actually received string as the data type. Write to byte before buffering; otherwise, the output parameter is not fully displayed
Package: testr3454
This package contains asetuptoolscommand for uploadingSphinxdocumentation to thePython Package Index(PyPI) at the dedicated URL
packages.python.org.Theupload_sphinxcommandupload_sphinxwill create the necessary zip file out of an arbitrary
documentation directory and posts it to the correct URL.It’s also loosely based on Sphinx’ own setuptools commandbuild_sphinxwhich allows to easily build documentation from the command line.Theupload_sphinxcommand has the following options:--repository(-r):
url of repository [default:http://pypi.python.org/pypi]--show-response:
display full response text from server--upload-dir:
directory to uploadExampleAssuming there is anExamplepackage with Sphinx documentation to be
uploaded tohttp://packages.python.org, with the following structure:Example/
|-- example.py
|-- setup.cfg
|-- setup.py
|-- docs
|   |-- build
|   |   `-- html
|   |-- conf.py
|   |-- index.txt
|   `-- tips_tricks.txtAs with any other setuptools based command, you can define useful defaults in
the setup.cfg of your Python package. The following snippet shows how to set
the option defaults of thebuild_sphinxandupload_sphinxsetup.py
commands:[build_sphinx]
source-dir = docs/
build-dir  = docs/build
all_files  = 1

[upload_sphinx]
upload-dir = docs/build/htmlTo build and upload the Sphinx documentation you are now able to run:$ python setup.py build_sphinx
$ python setup.py upload_sphinxAlternatively, you can of course just pass the appropriate options directly
to the commands:$ python setup.py build_sphinx --source-dir=docs/ --build-dir=docs/build --all-files
$ python setup.y upload_sphinx --upload-dir=docs/build/html
Package: testrail-api
Testrail ApiThis is a Python wrapper of the TestRail API according
tothe official documentationInstallInstall using pip withpipinstalltestrail-apiSupport environment variablesTESTRAIL_URL=https://example.testrail.com/
TESTRAIL_EMAIL=example@mail.com
TESTRAIL_PASSWORD=passwordExamplefromdatetimeimportdatetimefromtestrail_apiimportTestRailAPIapi=TestRailAPI("https://example.testrail.com/","example@mail.com","password")# if use environment variables# api = TestRailAPI()new_milestone=api.milestones.add_milestone(project_id=1,name="New milestone",start_on=datetime.now())my_test_run=api.runs.add_run(project_id=1,suite_id=2,name="My test run",include_all=True,milestone_id=new_milestone["id"])result=api.results.add_result_for_case(run_id=my_test_run["id"],case_id=5,status_id=1,comment="Pass",version="1")attach="screenshots/attach.jpg"api.attachments.add_attachment_to_result(result["id"],attach)api.runs.close_run(my_test_run["id"])api.milestones.update_milestone(new_milestone["id"],is_completed=True)Custom response handlerfromdatetimeimportdatetimeimportsimplejsonfromtestrail_apiimportTestRailAPIdefmy_handler(response):ifresponse.ok:returnsimplejson.loads(response.text)return'Error'api=TestRailAPI("https://example.testrail.com/","example@mail.com","password",response_handler=my_handler)new_milestone=api.milestones.add_milestone(project_id=1,name="New milestone",start_on=datetime.now())ContributingContributions are very welcome.Getting startedpython 3.11pipenv 2022.12.19+Clone the repositorygitclonehttps://github.com/tolstislon/testrail-api.gitcdtestrail-apiInstall dev dependenciespipenvinstall--dev
pipenvshellRun the blackpipenvrunblackRun the flake8pipenvrunflake8Run the testspipenvruntests
Package: testrail-data
Testrail Data: a handy Testrail data analysis toolWhat is it?This is a wrapper ofTestrail ApiwithpandasDataFrame extended. Especially when you are working on huge data-set, say years of results, this is a handly library.Installationpipinstalltestrail-dataMain FeaturesTransform pulled data into DataFrame object, covering:CaseCase FieldsCase TypeMilestonePlanPriorityResultsRunSectionsSuiteStatusesTemplateTestComplete pull withauto-offsetcapability to walk through all pagination, avalaible to:RunResultPlanMeta data filling option to all IDs in:CaseTestResult (not in this version)Retry pulling whenConnectionErroroccurred in:Resultsget_results_for_runExample usage with DataFramefromtestrail_dataimportTestRailAPIapi=TestRailAPI("https://example.testrail.com/","example@mail.com","password")# if use environment variables# TESTRAIL_URL=https://example.testrail.com/# TESTRAIL_EMAIL=example@mail.com# TESTRAIL_PASSWORD=password# api = TestRailAPI()# if you having a big project with more than 250 runs,# this method would help you too pull them down in single call.df_run=api.runs.to_dataframe(project_id=1)df_run.info()# Pulling all Run by Plandf_run=api.runs.dataframe_from_plan(plan_id=3)Example usage with Meta data# continue ...fromtestrail_dataimportTestRailAPIapi=TestRailAPI()df_case=api.cases.to_dataframe(project_id=1,suite_id=2,with_meta=True)# Additional name-columns created base on# section_id, template_id, type_id, priority_id, suite_id# all custom_columns are replaced with meta data.Example query all results from multiple runsfromtestrail_dataimportTestRailAPIapi=TestRailAPI()run_ids=[1,2,3,4]df_run=api.results.dataframe_from_runs(*run_ids)
Package: testrail-data-model
TestRail Data ModelThis package provides an object-oriented representation of TestRail data using
Pythondata classes. This object structure facilitates the development
of tools which programmatically interact with a TestRail service.This wraps thetolstislon/testrail-apiproject, which in turn wraps theofficial TestRail API spec.Examplefromtestrail_apiimportTestRailAPIfromtestrail_data_model.builderimportTestRailAPIObjectBuilderfromtestrail_data_model.adapterimportTestRailAPIAdapterfromtestrail_data_model.modelimportTestRailSection,TestRailCase,TestRailSuite# From testrail-api client libraryapi_client=TestRailAPI(url="https://testrail-instance.com",email="email@email.org",password="password")# Performs API requests and tracks statsadapter=TestRailAPIAdapter(api_client=api_client)# For building the TestRail dataclass object hierarchies (e.g. TestRailSuite)builder=TestRailAPIObjectBuilder(adapter=adapter)# Construct a TestRailSuite object linked to its associated TestRailSection and TestRailCase objectssuite:TestRailSuite=builder.build_suite(project_id=1,suite_id=1)# Display the TestRailSuite object structureforsection_id,sectioninsuite.sections.items():assertisinstance(section,TestRailSection)print("Section",section_id,section.path)forcase_id,caseinsection.cases.items():assertisinstance(case,TestRailCase)print("Case",case_id,case.title)# Show the number of API requests madeprint(adapter.stats)AuthorsElliot WeiserRob WhitlockRong Zheng
Package: testrail-yak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Description: Getting Started:To use the TestRail API via TestRailYak, install the package either by downloading the source and running$ python setup.py installor by using pip$ pip install testrail_yakPlatform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Package: test-random1
RandomTableslittle module that helps to create tables for a specified schema with random contentHow to useTo create a random table you can specify a schema upfront and then call the classfrom randomtables import DataSetGenerator

# define schema
schema = [
    {"type": float}, 
    {"type": int},
    {"type": str, "split": False},
    {"type": str, "split": True, "names": True}
]

# initialize the schema
dfg = DataSetGenerator()

# generate a pandas dataframe
data = dfg.generate(
    schema = schema,
)
Package: test-random2
RandomTableslittle module that helps to create tables for a specified schema with random contentHow to useTo create a random table you can specify a schema upfront and then call the classfrom randomtables import DataSetGenerator

# define schema
schema = [
    {"type": float}, 
    {"type": int},
    {"type": str, "split": False},
    {"type": str, "split": True, "names": True}
]

# initialize the schema
dfg = DataSetGenerator()

# generate a pandas dataframe
data = dfg.generate(
    schema = schema,
)
Package: test-reader-AlexisDougherty
Real Python Feed ReaderThe Real Python Feed Reader is a basicweb feedreader that can download the latest Real Python tutorials from theReal Python feed.For more information see the tutorialHow to Publish an Open-Source Python Package to PyPIon Real Python.InstallationYou can install the Real Python Feed Reader fromPyPI:pip install realpython-readerThe reader is supported on Python 2.7, as well as Python 3.4 and above.How to useThe Real Python Feed Reader is a command line application, namedrealpython. To see a list of thelatest Real Python tutorialssimply call the program:$ realpython
The latest tutorials from Real Python (https://realpython.com/)
 0 How to Publish an Open-Source Python Package to PyPI
 1 Python "while" Loops (Indefinite Iteration)
 2 Writing Comments in Python (Guide)
 3 Setting Up Python for Machine Learning on Windows
 4 Python Community Interview With Michael Kennedy
 5 Practical Text Classification With Python and Keras
 6 Getting Started With Testing in Python
 7 Python, Boto3, and AWS S3: Demystified
 8 Python's range() Function (Guide)
 9 Python Community Interview With Mike Grouchy
10 How to Round Numbers in Python
11 Building and Documenting Python REST APIs With Flask and Connexion – Part 2
12 Splitting, Concatenating, and Joining Strings in Python
13 Image Segmentation Using Color Spaces in OpenCV + Python
14 Python Community Interview With Mahdi Yusuf
15 Absolute vs Relative Imports in Python
16 Top 10 Must-Watch PyCon Talks
17 Logging in Python
18 The Best Python Books
19 Conditional Statements in PythonTo read one particular tutorial, call the program with the numerical ID of the tutorial as a parameter:$ realpython 0
# How to Publish an Open-Source Python Package to PyPI

Python is famous for coming with batteries included. Sophisticated
capabilities are available in the standard library. You can find modules for
working with sockets, parsing CSV, JSON, and XML files, and working with
files and file paths.

However great the packages included with Python are, there are many
fantastic projects available outside the standard library. These are most
often hosted at the Python Packaging Index (PyPI), historically known as the
Cheese Shop. At PyPI, you can find everything from Hello World to advanced
deep learning libraries.

[... The full text of the article ...]You can also call the Real Python Feed Reader in your own Python code, by importing from thereaderpackage:>>> from reader import feed
>>> feed.get_titles()
['How to Publish an Open-Source Python Package to PyPI', ...]
Package: test-release-rts-py
redistimeseries-pyredistimeseries-py is a package that gives developers easy access to RedisTimeSeries module. The package extendsredis-py's interface with RedisTimeSeries's API.Installation$ pip install redistimeseriesAPIThe complete documentation of RedisTimeSeries's commands can be found atRedisTimeSeries's website.Usage example#Simpleexamplefromredistimeseries.clientimportClientrts=Client()rts.create('test',labels={'Time':'Series'})rts.add('test',1,1.12)rts.add('test',2,1.12)rts.get('test')rts.incrby('test',1)rts.range('test',0,-1)rts.range('test',0,-1,aggregation_type='avg',bucket_size_msec=10)rts.range('test',0,-1,aggregation_type='sum',bucket_size_msec=10)rts.info('test').__dict__#Examplewithrulesrts.create('source',retention_msecs=40)rts.create('sumRule')rts.create('avgRule')rts.createrule('source','sumRule','sum',20)rts.createrule('source','avgRule','avg',15)rts.add('source','*',1)rts.add('source','*',2)rts.add('source','*',3)rts.get('sumRule')rts.get('avgRule')rts.info('sumRule').__dict__LicenseBSD 3-Clause
Package: test-report-diff
A script to get the diff of 2 test reports. Helps with triaging/investigating large test reportsFree software: MIT licenseDocumentation:https://test-report-diff.readthedocs.ioUsagepipinstalltest_report_difftest_report_diff--helpFeaturesCompare 2 test reports and get a detailed diff reportRoadmapAdd support for more test report formatsMake formatting/output formats more customizable by replacing formatter classes with templatesCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: testreporter
dj-testreporterpip install testreporterA thin wrapper around the default DjangoDiscoverRunnerwhich can generate pretty reports from your testsUsageOnce offpython manage.py test --testrunner=testreporter.runner.BDDTestRunnerAlways use itsettings.pyTEST_RUNNER='testreporter.runners.BDDTestRunner'Example output:* ************
* TEST SUMMARY
* ************
* -
* ---------------------
* MYPROJECT.TESTS.TEST_MODELS
* ---------------------
*
*  SomeModelTestCase:
*  ---------------------
*   ✓ a test that passes
*   ✗ a test that failsIt will also create a filespec.txt. You can commit that to version control and then you have automatic release notes in the diff for your pull request.
Package: test-report-processor
This repository is a JSON parser for test reports. It imports a test report generated by pytest (cucumber JSON file). Then is parses the cucumber JSON to any desired JSON report.When output to Paessler is selected, the new JSON is send to a paessler sensor through a GET request.
The Paessler sensor’s are displayed on a Paessler dashboard for DevOps purposes.RequirementsjsonrequestUsageWhen using the test report parser, the required input is a test report JSON file. The output can be any of the mentioned outputs.Input- Cucumber test report (JSON file)Output- Paessler JSONImporting the packageImport the package by including the following code::from test_report_processor.test_report_processor import ReportParserStarting a new parserStart the parser by creating a new ReportParser class:report_parser =ReportParser("/path/cucumber.json","paessler", "duration")Input parameters for ReportParser classCreating a new ReportParser class requires 3 parameters:Location of the “cucumber.json” file (string)Desired parser output (string), options:“paessler” for paessler dashboardSensor type (string), options:“duration” - test durations of scenario’s and steps in milliseconds“status” - test status of scenario’s and steps in “pass” or “fail”DebuggingAfter creating a ReportParser class, you can view the parsed json with this variable:report_parser.paessler_jsonA URL will also be generated which points to the Paessler sensor id where the result will be displayed. View the Paessler URL with this variable:report_parser.paessler_url
Package: testrepository
OverviewThis project provides a database of test results which can be used as part of
developer workflow to ensure/check things like:No commits without having had a test failure, test fixed cycle.No commits without new tests being added.What tests have failed since the last commit (to run just a subset).What tests are currently failing and need work.Test results are inserted using subunit (and thus anything that can output
subunit or be converted into a subunit stream can be accepted).A mailing list for discussion, usage and development is athttps://launchpad.net/~testrepository-dev- all are welcome to join. Some folk
hang out on #testrepository on irc.freenode.net.CI for the project is athttp://build.robertcollins.net/job/testrepository-default/.LicensingTest Repository is under BSD / Apache 2.0 licences. See the file COPYING in the source for details.Quick StartCreate a config file::$ touch .testr.confCreate a repository::$ testr initLoad a test run into the repository::$ testr load < testrunQuery the repository::$ testr stats
$ testr last
$ testr failingDelete a repository::$ rm -rf .testrepositoryDocumentationMore detailed documentation including design and implementation details, a
user manual, and guidelines for development of Test Repository itself can be
found athttps://testrepository.readthedocs.org/en/latest, or in the source
tree at doc/ (run make -C doc html).