Saravanan666/pypi-org huggingface dataset:
Package: pytest-yls
pytest-ylsPytest plugin adding primitives for E2E/integration tests.Public fixtures:yls_prepareyls_prepare_with_settingsTo interact with the tested YLS useContextobtained by calling the fixture.
For more information about theContextclass checkoutplugin.py.Example test# Add yls_prepare fixturedeftest_completion_basic(yls_prepare):# Prepare the tested file# <$> marks the cursor positioncontents="""rule test {condition:<$>}"""# Initialize the testing context by calling the fixturecontext=yls_prepare(contents)# You can now simulate requests on the context# In this case we trigger the code completionresponse=context.send_request(methods.COMPLETION,types.CompletionParams(textDocument=types.TextDocumentIdentifier(uri=context.opened_file.as_uri()),position=context.get_cursor_position(),),)# Assert the response how you wantassertresponseformodulein["cuckoo","elf","pe","time"]:assertany(moduleinitem["label"]foriteminresponse["items"]),f"{module=}is not in response"For more inspiration check outyls/tests.LicenseCopyright (c) 2022 Avast Software, licensed under the MIT license. See theLICENSEfile
for more details.
Package: pytest-yuk
pytest-yukA pytest plugin that allows you to visualize tests you are not proud of, using 🤢 for pass, 🤮 for fail.Installation$pipinstallpytest-yukUsageMark tests with@pytest.mark.yuk:importpytest@pytest.mark.yukdeftest_pass():assert1==1@pytest.mark.yukdeftest_fail():assert1==2deftest_pass_unmarked():assert1==1deftest_fail_unmarked():assert1==2Then run with--yuk:$pytest--yuk--tb=notest_yuk.py=========================testsessionstarts==========================collected4itemstest_yuk.py🤢🤮.F[100%]=====================2failed,2passedin0.02s======================Or--yuk -v:$pytest--yuk-v--tb=notest_yuk.py=========================testsessionstarts==========================collected4itemstest_yuk.py::test_passPASSED🤢[25%]test_yuk.py::test_failFAILED🤮[50%]test_yuk.py::test_pass_unmarkedPASSED[75%]test_yuk.py::test_fail_unmarkedFAILED[100%]=====================2failed,2passedin0.02s======================No output changes are made without the--yukflag:$pytest--tb=notest_yuk.py=========================testsessionstarts==========================collected4itemstest_yuk.py.F.F[100%]=====================2failed,2passedin0.02s======================Similar projectThis plugin was inspired by these other fine plugins:pytest-emojipytest-pooOther pytest plugins fromokken:pytest-check:  Allows multiple failures per test.pytest-srcpaths: A plugin to help pytest find the code you want to test, by adding specified paths tosys.path.
Package: pytest-zeebe
pytest-zeebePytest fixtures for testing Camunda 8 processes in Python using a Zeebe test engine.🚀 What does it do?This package provides a set of fixtures to set up Zeebe process tests for Python in no time:automatically spins up a stripped-down Zeebe engine per file/module (same as used byzeebe-process-test)resets engine state before every testinjects a ZeebeTestClient to drive the process(optionally) injects a ZeebeTestEngine to await idle state or access raw zeebe recordsprovides rich assertions for the process instance (goal: equal to zeebe-process-test BpmnAssertions)Installpip install pytest-zeebeExample UsageThe engine is reset before every test, so you can create a fixture to deploy your process automatically:@pytest.fixture(autouse=True)defdeploy(zeebe_test_client:ZeebeTestClient):zeebe_test_client.deploy_process("test.bpmn")With the process deployed, you can start it, complete tasks and make assertions as usual:deftest(zeebe_test_client:ZeebeTestClient):# givenvariables={"var":"A"}# when# -> startprocess_instance=zeebe_test_client.create_process_instance("TestProcess",variables=variables)# -> complete Task Azeebe_test_client.complete_task("taskA")assert_that(process_instance).is_waiting_at_elements("TaskC")# -> complete Task Czeebe_test_client.complete_task("taskC",variables={"resultC":True})# thenassert_that(process_instance)\.is_completed()\.has_passed_elements_in_order("StartEvent_1","TaskA","TaskC","EndEvent_1")\.has_variable_with_value("var","A")\.has_variable_with_value("resultC",True)\.has_no_incidents()Known IssuesThis package ships with its own grpc zeebe client. Due to the inner workings of protobuf, this will lead to an unresolvable conflict if you also import code from another library that also registers protobuf descriptors for the zeebe gateway protocol (like pyzeebe). This is no issue if you test the process by itself or - for integration tests - start your app in a dedicated process.LicenseThis library is developed underSponsors and Customers
Package: pytest-zigzag
pytest-zigzagExtend py.test for RPC OpenStack testing.Quick Start GuideYou can install “pytest-zigzag” viapipfromPyPI$ pip install pytest-zigzagOr you can install “pytest-zigzag” viapipfrom disk (assumes you’re in the root of the repo):$ pip install -e .UsageOnce installed the plug-in will automatically be loaded by allpy.testtest runs executed in the Python environment
in which thepytest-zigzagwas installed.FeaturesJUnitXML RPC Specific PropertiesIf a user executespy.testtests with the--junitxmland with this plug-in installed, the resulting XML log file
will contain a test suite properties element. The properties element will contain information gathered about the test
run fetched from the local environment.ConfigurationYou can supply a json config to this plugin containing a dictionary. Each key / value will become a property name and
value on the test suite node of the resulting xml. There is one required config: pytest_zigzag_env_vars.
This should be a json object where the keys are the environment variable names to be collected, if you set
value to a string that value will be used.  If the value is null it will be pulled from the environment.The location of the config file can be specified in two ways:In a pytest ini file:[pytest]
pytest-zigzag-config=/path/to/config/fileExplicitly on the command line:pytest /path/to/test_test.py --pytest-zigzag-config=/path/to/config/fileAny property defined in the config file can be overriden by creating an environment variable of the same name. see thisconfig_property_overrides.mdContributingSeeCONTRIBUTING.rstfor more details on developing for the “pytest-zigzag” project.Release ProcessSeerelease_process.rstfor information on the release process for ‘pytest-zigzag’CreditsThisPytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.History
Package: pytest-zulip
pytest-zulipPytest report plugin forZulipAllow to send notification on Zulip chat product.installationpip install pytest-zulipConfigure via env varZULIP_URL="https://x.zulipchat.com/api/v1/messages"
ZULIP_BOT_EMAIL_ADDRESS="bot@x.zulipchat.com"
ZULIP_BOT_API_KEY="API_KEY"
ZULIP_TOPIC="TOPIC"
ZULIP_STREAM="STREAM"Optional:ZULIP_ELLIPSIS_CHAR="…"
ZULIP_ONLY_ON_FAILED=1Add option to send messagepytest --notify-zulipModify content via hookdef pytest_zulip_create_content(session: Session, exitstatus: Union[int, ExitCode]) -> str:
    reporter = session.config.pluginmanager.get_plugin('terminalreporter')
    return str(reporter.stats.get('passed', []))DevChange versioneditpytest_zulip/__init__.pycommitgit commit -m "v0.1.0"taggit tag v0.1.0Build packagepython setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
Package: pytetgen
This is a python interface to tetgen, a powerful and fast mesh generator (http://wias-berlin.de/software/tetgen/)This package includes the tetgen source, v.1.5, and provides (so far) minimal bindings to be able to generate meshes in python. The basic interface follows (and can be used to replace) that ofscipy.spatial.Delaunay.2D points triangulation with consistent API is provided throughtriangle.Basic Usage>>> import pytetgen
>>> import numpy as np
>>> points = np.random.random(4*3).reshape(4,3)
>>> tri = pytetgen.Delaunay(points)
>>> np.sort(tri.simplices)
array([[0, 1, 2, 3]], dtype=int32)Comparison withscipy.spatial.Delaunay()tetgen (and this project) are distributed under the terms of the GNU Affero General Public License (https://www.gnu.org/licenses/agpl-3.0.en.html), that can be found in the file LICENSE.txt. Quoting the preamble of the license:“A secondary benefit of defending all users’ freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate.[…]  However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.”ReferencesA technical paper about TetGen is available at
Hang Si. 2015. “TetGen, a Delaunay-Based Quality Tetrahedral Mesh Generator”. ACM Trans. on Mathematical Software. 41 (2), Article 11 (February 2015), 36 pages. DOI=10.1145/2629697http://doi.acm.org/10.1145/2629697I guess the author would be glad if you cite him, if you use this wrapper.See AlsoYou might also want to have a look at:Pymeshhttps://github.com/qnzhou/PyMesh(pymesh2 on the Python Package Index)Pyvista/tetgenhttps://github.com/pyvista/tetgen/
Package: pyteuf
pyteuf is a package for time-frequency analysis in Python.InstallInstall the current release withpip:pip install pyteufFor additional details, see doc/install.rst.UsageSee thedocumentation.BugsPlease report any bugs that you find through thepyteuf GitLab project.You can also fork the repository and create a merge request.Source codeThe source code of pyteuf is available via itsGitLab project.You can clone the git repository of the project using the command:git clone git@gitlab.lis-lab.fr:skmad-suite/pyteuf.gitCopyright © 2017-2018Laboratoire d’Informatique et SystèmesUniversité d’Aix-MarseilleCentre National de la Recherche ScientifiqueUniversité de ToulonContributorsRonan HamonValentin EmiyaFlorent JailletLicenseReleased under the GNU General Public License version 3 or later
(seeLICENSE.txt).
Package: pytex2svg
pytex2svgA simple command line tool written in Python to convert TeX equations to SVG. Input can be read fromstdin, provided directly as command line argument, or read from a file.Installationpip install pytex2svgDependenciesmatplotlibUsageusage: pytex2svg [-h] [-o OUTFILE] [-v] [input]

converts a TeX string to an SVG file

positional arguments:
  input                 The TeX equation or file to be converted to svg,
                        defaults to stdin

optional arguments:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        Path or name of the output file, defaults to
                        "equation.svg". If more than one equation is provided,
                        the output files are numbered.
  -v, --verbose         Enable verbose outputExamples:# from stdinecho"\log_{2}10 \approx 3.322"|pytex2svg-owhybinary.svg# as command line argumentpytex2svg"\log_{2}10 \approx 3.322"-owhybinary.svg# from a filepytex2svgexamples/integral.tex-owhybinary.svg
Package: pyTexecom
pytexecomThis project is an attempt to create a python libary for communicating with Texecom Premier Elite Alarms Panels. The plugin is designed to be connected to COM port 2 on the panel with the following configurationMode: Crestron
Speed: 19200
Data Bits: 8
Stop Bits: 1
Parity: NoneThe alarm panel communicates with the libary on every state change. The libary implements a callback for devices so they can be notifed of changes.
Package: pytexexam
pytexexamA simple library for writing and printing exam in Python.About this branchThis branch includes the source code of the upcoming pytexexam version (3.0)Objective: Redesign package to generalize exam generation process and include more question types instead of MCQ only in pytexexam 2.x
The project is not complete yet.Install from github, using pip (for testing only)pipinstallgit+https://github.com/vungocbinh2009/pytexexam.git@pytexexam_3.x#egg=pytexexamHow to usefrompytexexam.componentimportText,MultipartQuestion,OpenQuestion,ComponentGroup,MultipleChoiceQuestion,QuestionPartfrompytexexam.latex_utilimporttwo_column_headerfrompytexexamimportExamGenerator,ExamFileType# Create an exam generator objectexam=ExamGenerator()# Then, you can create "component" to add to your exam.# Create a text component to use as header.header=Text(two_column_header("Left column","Right column"))# Create a multiple choice question and shuffle answer.q1=MultipleChoiceQuestion(question="This is a multiple choice question",answers=["Answer 1","Answer 2","Answer 3","Answer 4"],true_answer="AB",num_column=4,solution="Multiple choice question solution")q1.shuffle_content()# Create a question with multi part whose can shuffle it partq2=MultipartQuestion(question_stem="Answer all the question below",prompts=[QuestionPart("Question part 1","Answer 1","Solution 1"),QuestionPart("Question part 2","Answer 2","Solution 2"),QuestionPart("Question part 3","Answer 3","Solution 3"),QuestionPart("Question part 4","Answer 4","Solution 4"),],num_column=2)q2.shuffle_content()# Create a open questionq3=OpenQuestion(question="This is an open question",answer="This is open question answer",solution="This is open question answer")# Create text to split each part of the test.text=Text(r"\section{{An exam section}}")# You can subclass "Component" from pytexexam.component# to create your own question type.# Create a question group to add all component together, add to exam generatorq_group=ComponentGroup([header,q1,text,q2,q3])exam.add_component(q_group)# Add preamble.exam.add_preamble_array([r"\usepackage[utf8]{vietnam}"])# Generate examexam.generate_exam("exam1",ExamFileType.PDF)Contribution.Contribution are welcome. Create a pull request.Buy me a coffee.If you find this project useful, you can buy me coffee through Buy me a coffeeLicenseApache License, Version 2.0
Package: pytexit
pytexitConvert a Python expression to a LaTeX formulaDocumentationhttps://pytexit.readthedocs.ioInstallpytexitis on PyPi:pip install pytexitUsepytexitfeatures thepy2tex,for2texfor2pyfunctions.In a Terminal, usepy2tex:py2tex 'x = 2*sqrt(2*pi*k*T_e/m_e)*(DeltaE/(k*T_e))**2*a_0**2'In a Python console, usepy2tex:from pytexit import py2tex
py2tex('x = 2*sqrt(2*pi*k*T_e/m_e)*(DeltaE/(k*T_e))**2*a_0**2')returns the corresponding LaTeX formula (to re-use in papers):$$x=2\\sqrt{\\frac{2\\pi k T_e}{m_e}} \\left(\\frac{\\Delta E}{k T_e}\\right)^2 a_0^2$$and (in ipython console only) prints the equation:ReferencesInitial work from Geoff Reedy on StackOverflow:https://stackoverflow.com/a/3874621/5622825. Kudos.Similar projects:https://github.com/iogf/lax: "A pythonic way of writting
latex."https://github.com/JelteF/PyLaTeX: "A Python library for
creating LaTeX files"sympy can also write LaTeX output.
Package: pytexreport
pytexreportDocumentation:https://nkalis.github.io/pytexreportSource Code:https://github.com/nkalis/pytexreportPyPI:https://pypi.org/project/pytexreport/A short description of the projectInstallationpipinstallpytexreportDevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-filesThis project was generated using thewolt-python-package-cookiecuttertemplate.
Package: py-text
A suite text tools for pythonInstallationThe lastest stable is py-text-1.2.tar.gzpythonsetup.pyinstallGetting Startawk demo for py-text:fromtextimportawkdata=['root:x:0:0:root:/root:/bin/bash','daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin','bin:x:2:2:bin:/bin:/usr/sbin/nologin']resut=awk.awk(data,None,':',[0,4,5])printresult[['root','root','/root'],['daemon','daemon','/usr/sbin'],['bin','bin','/bin']]string_utils demo for py-text:fromtextimportstring_utilprint'substring_before : '+string_utils.substring_before('one world one dream','one dream').strip()+'\n'print'abbreviate : '+string_utils.abbreviate('abcdef',3,3)+'\n'print'count_matches : '+string_utils.count_matches('one world one dream','one')+'\n'substring_before:oneworldabbreviate:abc***count_matches:2regex_utils demo for py-text:fromtextimportregex_utilprint'check_line : '+regex_utils.check_line('.*(\d+.\d+.\d+.\d+)','MyIP is 192.168.199.4')+'\n'print'parse_line : '+str(regex_utils.parse_line('name=(\S+), type=(\S+)','name=ASA5505, type=Firewall)) + '\n'check_line:Trueparse_line:['ASA5505','Firewall']DocumentationFull documentation is hosted on [HERE]().
Sources are available in thedocs/directory.Licensepy-text is licensed under the Apache License, Version 2.0. See LICENSE for full license text
Package: pytextable
pytextablecreates well-formatted latex tables with booktabs support in pure python.pytextableis highly-configurable, you decide how your table should look.pytextableis small, fast and requires nothing butpython>=3.6.Quick Start GuideInstallpip install pytextableImportimportpytextableCreate a latex table from your data :)pytextable.write(data,"table.tex")Exampleimportpytextable# This is usually your 2d numpy array or any sequence of sequencesDATA=[[1.2346,1,1.2346],[1.2346,1.2346,1.2346],[1.2346,1.2346,1.2346]]>>>pytextable.tostring(DATA,fmt=".3f",header=("first","second","third"),caption="My fancy pytextable",label="tab:pytextable",)r"""
\begin{table}
    \centering
    \caption{My fancy pytextable}
    \label{tab:pytextable}
    \begin{tabular}{ccc}
        \toprule
        first & second & third \\
        \midrule
        1.235 & 1.000 & 1.235 \\
        1.235 & 1.235 & 1.235 \\
        1.235 & 1.235 & 1.235 \\
        \bottomrule
    \end{tabular}
\end{table}
"""# To write to file use pytextable.write(DATA, filename)>>>pytextable.write(DATA,"table.tex",fmt=".3f",...)LinksRead the full documentation.View the changelog.LicenseThis program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
Package: py-text-clock
A clock made of wordsUsage:py-clock[OPTIONS]Options:-s,--showShowthecurrenttime-m,--matrixShowtimeasmatrix-d,--debugRunindebugmode-h,--helpShowthismessageandexit.py-clock can print the current time in words format.For example: if the time is 13:50, it printsI TLI SA S T HT E NA C F I F T E E N D C OT W E N T Y X F I V E WT H I R T Y F T E N O SM I N U T E SET OU RP A S T O R U F O U R TS E V E N X T W E L V EN I N E D I V E CT W OE I G H T F E L E V E NS I X T H R E E O N E GT E N S E Z O’ C L O C K
Package: pytextcon
pytextconpytextcon is a lightweight, simple package designed to make basic changes to the text color, text emphasis, and background color of print statements to the console simple.Getting StartedDownload pytextcon:pip install pytextconUsageUse an f-string to include text formatting to print statements. Formatting will continue
until cleared. UseRESETto end all formatting. UseDEFAULTto clear text color only.Example:importpytextcontext=pytextcon.ForText()print(f"{text.BOLD}{text.BLUE}Some text that will be bold and blue.{text.DEFAULT}\Some other text that will be bold but not blue")print(f"{text.UNDERLINE}{text.BLUE}Some text that will be bold, underlined, and blue.\{text.RESET}Some other text that will not be bold, underlined or blue")Formatting OptionsBasic Colors:BLACK,
RED,
GREEN,
YELLOW,
BLUE,
MAGENTA,
CYAN,
WHITEBright Colors:BLACK_BR,
RED_BR,
GREEN_BR,
YELLOW_BR,
BLUE_BR,
MAGENTA_BR,
CYAN_BR,
WHITE_BRBasic Color Backgrounds:BLACK_BG,
RED_BG,
GREEN_BG,
YELLOW_BG,
BLUE_BG,
MAGENTA_BG,
CYAN_BG,
WHITE_BGBright Color Backgrounds:BLACK_BRBG,
RED_BRBG,
GREEN_BRBG,
YELLOW_BRBG,
BLUE_BRBG,
MAGENTA_BRBG,
CYAN_BRBG,
WHITE_BRBGEmphasis:BOLD,
DIM,
ITALIC,
UNDERLINE,
UNDERLINE2,
BLINK,
STRIKEClear:DEFAULT,
RESET
Package: py-text-data-clean
This package cleans the text data such as removal of HTML tags, URLs, NLTK Stopwords, numbers, punctuations.FeaturesRemove URLsRemove HTML TagsRemove NLTK StopwordsRemove NumbersRemove PunctuationsRemove Additional SpacesChanges to Lower CaseInstallationIn the code notebook like IPYNB use the below command\!pip install py-text-data-cleanIf installing from Anaconda Prompt of CMD Terminal, use the below command\pip install py-text-data-cleanNote:Check if the package version is upgraded. If the version is not upgraded, please upgrade it.

 # To check the version, run the below code
 !pip show py-text-data-clean

 # To upgrade the package, run the below code
 !pip install py-text-data-clean -UUsageInput:- List of text data - Example: ["Is the   time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]Output:- ['time noon', 'python link']Code to clean text with a single function:# Import the library
from pytextdataclean import textclean as tc
input_text_list = ["Is the   time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]
result = tc.text_clean(data=input_text_list)
print(result)Code to use each available features:# Pass the list of text

# Example list:
input_text_list = ["Is the   time 12 Noon now, isn't it?", "It is a python link: https://pypi.org/"]

# Import the library
from pytextdataclean import textclean as tc

# To remove html tags
tc.remove_html_tags(data=input_text_list)

# To remove NLTK stop words
tc.remove_nltk_stopwords(data=input_text_list)

# To remove URLs
tc.remove_url(data=input_text_list)

# To remove punctuations
tc.remove_punctuation(data=input_text_list)

# To remove numerical digits
tc.remove_digits(data=input_text_list)

# To remove foreign languages
tc.remove_foreign_languages(data=input_text_list)

# To remove spaces
tc.remove_spaces(data=input_text_list)