Saravanan666/pypi-org huggingface dataset:
Package: pyansilove
Python Ansilovepyansilove is a port of thelibansilovelibrary to convert ANSi and artscene related file formats into PNG images.Free software: BSD-2-Clause licenseFeaturesThe following formats are supported:.ANS - ANSi (ANSI escape sequences: ANSI X3.64 standard)TODOPort support of formats:.PCB - PCBoard Bulletin Board System (BBS) own file format.BIN - Binary format (raw memory copy of text mode video memory).ADF - Artworx format, supporting custom character sets and palettes.IDF - iCE Draw format, supporting custom character sets and palettes.TND - TundraDraw format, supporting 24-bit color mode.XB - The eXtended Binary XBin format, supporting custom character sets and palettesDocumentationUsagefrompathlibimportPathfrompyansilove.ansiloveimportAnsiLovefrompyansilove.schemasimportAnsiLoveOptions,AnsiLoveRenderingMode# https://16colo.rs/pack/break_05/h7-lark.nfoAnsiLove.ansi(Path('nfo.nfo'),Path('nfo.png'),options=AnsiLoveOptions(# truecolor=True,# diz=True,# dos=True,# mode=AnsiLoveRenderingMode.TRANSPARENT))# https://16colo.rs/pack/fire-36/US-TREMR.ANSAnsiLove.ansi(Path('US-TREMR.ANS'),Path('US-TREMR.png'),options=AnsiLoveOptions(# diz=True,# dos=True,bits=9,scale_factor=2,# mode=AnsiLoveRenderingMode.TRANSPARENT,))Licensepyansilove is released under the BSD 2-Clause license. See the file LICENSE for details.CreditsOriginal code written bylibansilovePort to python byBakasuraHistory1.4.1 (2023-06-03)First release on PyPI.
Package: pyansys-docker
Docker SDK for PythonA Python library for the Docker Engine API. It lets you do anything thedockercommand does, but from within Python apps – run containers, manage containers, manage Swarms, etc.InstallationThe latest stable versionis available on PyPI. Either adddockerto yourrequirements.txtfile or install with pip:pip install dockerIf you are intending to connect to a docker host via TLS, adddocker[tls]to your requirements instead, or install with pip:pip install docker[tls]UsageConnect to Docker using the default socket or the configuration in your environment:importdockerclient=docker.from_env()You can run containers:>>>client.containers.run("ubuntu:latest","echo hello world")'hello world\n'You can run containers in the background:>>>client.containers.run("bfirsh/reticulate-splines",detach=True)<Container'45e6d2de7c54'>You can manage containers:>>>client.containers.list()[<Container'45e6d2de7c54'>,<Container'db18e4f20eaa'>,...]>>>container=client.containers.get('45e6d2de7c54')>>>container.attrs['Config']['Image']"bfirsh/reticulate-splines">>>container.logs()"Reticulating spline 1...\n">>>container.stop()You can stream logs:>>>forlineincontainer.logs(stream=True):...print(line.strip())Reticulatingspline2...Reticulatingspline3......You can manage images:>>>client.images.pull('nginx')<Image'nginx'>>>>client.images.list()[<Image'ubuntu'>,<Image'nginx'>,...]Read the full documentationto see everything you can do.
Package: pyansys-tools-versioning
Utilities for backwards and forwards server support.How to installAt least two installation modes are provided: user and developer.For usersIn order to install PyAnsys Tools Versioning, make sure you
have the latest version ofpip. To do so, run:python-mpipinstall-UpipThen, you can simply execute:python-mpipinstallpyansys-tools-versioningFor developersInstalling PyAnsys Tools Versioning in developer mode allows
you to modify the source and enhance it.Before contributing to the project, please refer to thePyAnsys Developer’s guide. You will
need to follow these steps:Start by cloning this repository:gitclonehttps://github.com/ansys/pyansys-tools-versioningCreate a fresh-clean Python environment and activate it:# Create a virtual environmentpython-mvenv.venv# Activate it in a POSIX systemsource.venv/bin/activate# Activate it in Windows CMD environment.venv\Scripts\activate.bat# Activate it in Windows Powershell.venv\Scripts\Activate.ps1Make sure you have the latest required build system and doc, testing, and CI tools:python-mpipinstall-Upipflittoxpython-mpipinstall-rrequirements/requirements_build.txtpython-mpipinstall-rrequirements/requirements_doc.txtpython-mpipinstall-rrequirements/requirements_tests.txtInstall the project in editable mode:python-mpipinstall--editablepyansys-tools-versioningFinally, verify your development installation by running:toxHow to testingThis project takes advantage oftox. This tool allows to automate common
development tasks (similar to Makefile) but it is oriented towards Python
development.Using toxAs Makefile has rules,toxhas environments. In fact, the tool creates its
own virtual environment so anything being tested is isolated from the project in
order to guarantee project’s integrity. The following environments commands are provided:tox -e style: will check for coding style quality.tox -e py: checks for unit tests.tox -e py-coverage: checks for unit testing and code coverage.tox -e doc: checks for documentation building process.Raw testingIf required, you can always call the style commands (black,isort,flake8…) or unit testing ones (pytest) from the command line. However,
this does not guarantee that your project is being tested in an isolated
environment, which is the reason why tools liketoxexist.A note on pre-commitThe style checks take advantage ofpre-commit. Developers are not forced but
encouraged to install this tool via:python-mpipinstallpre-commit&&pre-commitinstallDocumentationFor building documentation, you can either run the usual rules provided in theSphinxMakefile, such us:make-Cdoc/html&&your_browser_namedoc/html/index.htmlHowever, the recommended way of checking documentation integrity is using:tox-edoc&&your_browser_name.tox/doc_out/index.htmlDistributingIf you would like to create either source or wheel files, start by installing
the building requirements and then executing the build module:python-mpipinstall-rrequirements/requirements_build.txtpython-mbuildpython-mtwinecheckdist/*
Package: pyant
PyAntPyAnt is a standardization for implementing radar gain pattern in Python. Nothing more, nothing less.Getting startedTo installpipinstallpyantor for the nightly buildgitclonegit@github.com:danielk333/pyant.gitcdpyantgitcheckoutdeveloppipinstall.Alternatively, if you are following updates closely you can install usingpip install -e .so that in the future agit pullwill update the library.Then get started by looking at the examples gallery and API in the Documentation.ExamplePlot the gain pattern of a dish radar modeled using the Cassegrain model.importmatplotlib.pyplotaspltimportpyantant=pyant.Cassegrain(azimuth=0,elevation=90.0,frequency=930e6,I0=10**4.81,a0=23.0,a1=40.0,degrees=True,)pyant.plotting.gain_heatmap(ant,resolution=301,min_elevation=80.0)plt.show()
Package: pyAntiSSRF
pyAntiSSRFanti ssrf by hijack requestssupports py2 & py3installpip install pyAntiSSRFusageimportpyAntiSSRFpyAntiSSRF.patchRequests()importrequests# custom requests usagerequests.get("http://10.10.10.10/")# patch requests by hijack requests.sessions.Session.request, default disablerequests.get("http://10.10.10.10/",anti_ssrf=False)# raise Exceptionrequests.get("http://10.10.10.10/",anti_ssrf=True)
Package: pyants
antsAllow you to create you own custom decentralize job management system.installpipinstallpyantsHow it works?The library provides you with interface to add assign and do jobs in an decentralized environment.
For example to create your own node just override some methods:nodefromtypingimportListfromantsimportBaseNode,JobclassMyNode(BaseNode):defadd_jobs(self)->List[Job]:return[]# List of jobs to run (the nodes can create duplicate jobs and the lib will manage that)defassign_to_jobs(self,pending_jobs:List[Job])->List[Job]:# You can choose which jobs to assign your self toreturn[]# List of jobs to assign your self todefdo_jobs(self,my_assigned_jobs:List[Job]):# this list do not have to match the list you returned from the assign_to_jobs method,# the library will manage the job distribution to the nodes.# loop over your assigned jobs and complete themforassigned_jobinmy_assigned_jobs:# do your job# after you complete a job, report it with job.set_result({'status': 'OK'})passdefcompleted_jobs(self,done_jobs:List[Job]):# Here you can be updated about the jobs that has done by all the nodes# you can store it and use it in your business logic# For example do not create a operational check for some server if it bin checked recentlypasscommunicationThe communication class expose tow methods:pullbroadcastThe 'pull' method should return list of state objects from other nodesThe 'broadcast' method should transfer your state to other nodesThe library implemented for you a simple p2p socket server communication for decentralized networkingfromants.communications.socketserverimportSocketCommunicationcommunication=SocketCommunication(host=...,port=...,pull_interval=...,bootstrap_nodes=...)ExampleDecentralized monitor example.$>gitclonehttps://github.com/hvuhsg/ants.git
$>cdants/examples/monitor
$>python3-mvenvvenv
$>.venv/bin/activate
$>pipinstall-rrequirements.txt
$>pipinstall../../.
$>pythonrun.py
Package: pyanxdns
ANX API ClientThis is an unofficial pythonic implementation ofANX's API, described hereAPI documentationImportant informationPLEASE DON'T USE EARLIER VERSIONS THEN 0.2.5 SINCE IT INCLUDED A BAD DEPENDENCYDocumentationThis is alpha state software, and I haven't bothered with documentation yet.Command line clientusage: main.py [-h] [-k APIKEY] [-d DOMAIN] [-v]
               {get,g,add,a,update,u,delete,d,del} ...

optional arguments:
  -h, --help            show this help message and exit
  -k APIKEY, --apikey APIKEY
                        API key used in request header
  -d DOMAIN, --domain DOMAIN
                        Domain name
  -v, --verbose         Verbose

Actions:
  {get,g,add,a,update,u,delete,d,del}
                        Action to perform
    get (g)             Get records
    add (a)             Add record
    update (u)          Update record
    delete (d, del)     Delete recordClient requires two parameters APIKEY and DOMAIN. These can be provided as ENV or arguments in the call.export ANXDNS_APIKEY=keygoeshere
export ANXDNS_DOMAIN=domain.seor./bin/anxdnsclient -d domain.se --apikey keygoeshereExamplesGet all records./bin/anxdnsclient -d domain.se --apikey keygoeshere getGet records by name./bin/anxdnsapi get -n www.domain.se -d domain.se --apikey keygoeshereGet TXT records by txt./bin/anxdnsapi get -t txtrecord -d domain.se --apikey keygoeshereTODOUpdate of namesTest casesChangelogVersion 0.2Released 10nd August 2019Initial release
Package: pyanywhere
pyanywhereThis is a wrapper for the PythonAnywhere API that is currently in alpha stage of development. Here is an example showing how it works:frompyanywhere.usersimportUseruser=User('username',token='XXXXXXXX')# Print names of all consolesforconsoleinuser.get_consoles():print(console.name)LinksGitHub:https://github.com/dullbananas/pyanywhereDocumentation:https://pyanywhere.readthedocs.io/en/latest/
Package: pyaoa
pyaoa - Automatic Angle-of-Attack AnalysisAutomatic pre- and postprocessing of external aerodynamic simulations of arbitrary numbers of objects to analyze at different angles-of-attack $\alpha$ in your preferred CFD solver.InstallationpipinstallpyaoaExamplesClone the repository which includes the examples:gitclonehttps://github.com/inflowencer/pyaoa.git~/Four examples are provided in theexamplesdirectory.Subsonic NACA0012in SU2Transonic RAE2822in OpenFOAMSubsonic Selig S1210in FluentHigh-lift airfoil variationsin SU2UserguideSee theQuickstart.
Package: pyaoaddons
pyaoaddonsPowered by Albion Online AddonsAPI referencesubscribeArgs: Callable[dict]Registers callback which is going to be called on each game eventinitializeInitialize logging and packet sniffing.After invocation library starts to listen to game packets.Note: logs are placed inaoaddons.logfileReturnsInitializationResultitem_category_mappingDictionary containing human readable category names for coded items.E.g{"T6_POTION_HEAL":"potion"}localization_mappingDictionary containing human readable names for coded items.E.g{"T8_ARTEFACT_2H_CURSEDSTAFF_MORGANA":"Elder's Bloodforged Catalyst"}Available game events are visiblehereLatest messages decoding recipe can be foundhere
Package: pyaodbc
Library for asynchronous connection and execution of queries to the database via ODBC driverSoftware requirementsInstall ODBC Driver for your DBMSOn the example of MS SQL:linkFor support the async mode on Windows, the version of the driver must support asynchronous executionInstall necessary packages/librariesOn GNU/Linux:g++>=4:8.3.0-1python3-dev=<python_version>python3-pipunixodbc-dev>=2.3.7The example for Debian:aptinstall-yg++python3-devpython3-pipunixodbc-devOn Windows:Microsoft Visual C++ compiler version>=14The Windows SDK version>=8ODBC Lib version>=3.81 (It must be included in SDK)Installation PyAODBCFrom pypi.orgpip install pyaodbcFrom sourcegitclonehttps://github.com/SergioMorelo/pyaodbc.gitcdpyaodbc
python3setup.pyinstallQuick Guideimportasyncioimportosimportpyaodbcasyncdefexample():dsn="DRIVER={ODBC Driver 18 for SQL Server};"\f"SERVER={os.environ.get('SERVER_ADDRESS')};"\f"DATABASE={os.environ.get('DB_NAME')};"\f"UID={os.environ.get('USER_NAME')};"\f"PWD={{{os.environ.get('USER_PASSWORD')}}};"\"TrustServerCertificate=yes;"asyncwithpyaodbc.connect(dsn)asconn:withconn.cursor()ascur:query="""select ExampleField = 'Hello World'where 1 = ?"""awaitcur.execute(query,(1,))rows=cur.fetchall()returnrowsif__name__=='__main__':result=asyncio.run(example())print(result)There's the attribute for control CPU Usage (e.g. for Kubernetes, if your CPU value less than 1) and blocking I/O:importpyaodbcpyaodbc._rate=0.5# default 1.0# Than smaller the value, then more operations will be performed by CPU during iterations# The attribute value will apply to all connections and cursors created with itasyncdefexample():dsn='...'asyncwithpyaodbc.connect(dsn)asconn:withconn.cursor()ascur:...Additional informationAdditional information on the py-library interface is insidepyaodbc.pyi
Package: pyaoi
PyAoI (Python Algorithms on Iterables)This project provides convenient functions to process iterables, it is inspired by
thealgorithm headerfrom the C++ standard template library (STL for
short).Installationpip install pyaoiHow to useAll functions live in thepyaoinamespace, you can import it withimport pyaoiand then call the functions
like this:pyaio.all_of()Implemented functionsThe following list shows planned functions and whether they are implemented yet. Feel free to make a PR for a listed
function's implementation. This list is subject to change at any time.Click to expand!Non-modifying sequence operationsall_ofany_ofnone_offor_eachfor_each_ncountcount_ifmismatchfindfind_iffind_endfind_first_ofadjacent_findsearchsearch_ncopy_replacecopy_replace_ifcopy_replace_if_notcopy_exceptcopy_except_ifcopy_except_if_notModifying sequence operationsfillfill_ntransformtransform_nrotate_copyshift_leftshift_rightrandom_shuffleshufflesampleuniqueunique_copyPartitioning operationsis_partitionedpartitionpartition_copystable_partitionpartition_pointSorting operationsis_sortedis_sorted_untilpartial_sortpartial_sort_copystable_sortnth_elementBinary search operations (on sorted ranges)lower_boundupper_boundbinary_searchequal_rangeOther operations on sorted rangesmergeimplace_mergeSet operations (on sorted ranges)includesset_differenceset_intersectionset_symmetric_differenceset_unionHeap operationsis_heapis_heap_untilmake_heappush_heappop_heapsort_heapMinimum/maximum operationsmax_indexmin_indexminmaxminmax_indexclampComparison operationslexicographical_comparelexicographical_compare_threewayPermutation operationsis_permutationnext_permutationprev_permutationContributingFirst of all, thanks a lot for your contribution, any form of contribution is very welcome and appropriated!Please familiarise yourself with this project'scode of conductandcontribution guidelines.Getting helpRead the docsGet in touch with other contributors
atgitterIf you think you found a bug, or documentation could be improved, please open an issueLicenseCopyright (C) 2020-2021Jonas MuehlmannThe project is licensed under the terms of the MIT license, you can view ithere.
Package: pyaon
Pyaon - Python Wrapper for the Aon C++ libraryThis is a Python package that provides a wrapper for the AON C++ library. It
allows users to access the functionality of the C++ library from Python code.The AON library is a fast and efficient library that provides a set of
algorithms for analyzing and manipulating data. The Python wrapper provides a
convenient interface for Python developers who want to use the AON library in
their projects.InstallationThe AON Python Wrapper can be installed via pip:pipinstallpyaonUsageTo use the AON Python Wrapper in your Python code, start by importing the
module:importaon...From here, you can use the functions provided by theAON library. The Python wrapper provides an
interface for all of the functions in the AON library, so consult the AON
documentation for details on how to use the individual functions.ContributingIf you find a bug or have an idea for a new feature, please open an issue in the
GitHub repository. Pull requests are also welcome.LicenseThis package is licensed under the MIT License. See the LICENSE file for
details.
Package: pyaoponto-password
:space_invader: AboutThis code defines a function called "gerar_senha_forte" that generates a strong password. The function takes an optional argument called "tamanho" which specifies the length of the password (default is 6 characters).Inside the function, it first checks if the specified length is less than 6. If it is, it prints a message and returns None.If the length is 6 or greater, it creates a string variable called "caracteres" which contains all the possible characters for the password. This includes uppercase letters, lowercase letters, digits, and punctuation.Next, it creates an empty list called "senha" and appends one random character from each category (uppercase, lowercase, digit, punctuation) to the list.After that, it enters a for loop that repeats for (tamanho - 4) iterations. In each iteration, it appends a random character from the "caracteres" string to the "senha" list.Once the loop is complete, it shuffles the order of the characters in the "senha" list using a cryptographic secure random number generator.Finally, it joins all the characters in the "senha" list into a single string and returns it as the generated strong password.:wrench: RequirementsThe following Python libraries are required:secretsstring:runner:  Usage$ python .\strong_password\generator.pyThis will execute the code and generate a strong password.:raising_hand: ContributionAll contributions are welcome! Please open an issue or submit a pull request.
Package: pyap
Pyap is an MIT Licensed text processing library, written in Python, for
detecting and parsing addresses. Currently it supports US 🇺🇸, Canadian 🇨🇦 and British 🇬🇧 addresses.>>>importpyap>>>test_address="""
    Lorem ipsum
    225 E. John Carpenter Freeway,
    Suite 1500 Irving, Texas 75062
    Dorem sit amet
    """>>>addresses=pyap.parse(test_address,country='US')>>>foraddressinaddresses:# shows found addressprint(address)# shows address partsprint(address.as_dict())...InstallationTo install Pyap, simply:$pipinstallpyapAboutThis library has been created because i couldn’t find any reliable and
opensource solution for detecting addresses on web pages when writing my
web crawler. Currently available solutions have drawbacks when it comes
to using them to process really large amounts of data fast. You’ll
either have to buy some proprietary software; use third-party
pay-per-use services or use address detecting which is slow and
unsuitable for real-time processing.Pyap is an alternative to all these methods. It is really fast because
it is based on using regular expressions and it allows to find addresses
in text in real time with low error rates.Future workAdd rules for parsing FR addresses…Typical workflowPyap should be used as a first thing when you need to detect an address
inside a text when you don’t know for sure whether the text contains
addresses or not.To achieve the most accuracy Pyap results could be reverified using
geocoding process.LimitationsBecause Pyap is based on regular expressions it provides fast results.
This is also a limitation because regexps intentionally do not use too
much context to detect an address.In other words in order to detect US address, the library doesn’t
use any list of US cities or a list of typical street names. It
looks for a pattern which is most likely to be an address.For example the string below would be detected as a valid address:
“1 SPIRITUAL HEALER DR SHARIF NSAMBU SPECIALISING IN”It happens because this string has all the components of a valid
address: street number “1”, street name “SPIRITUAL HEALER” followed
by a street identifier “DR” (Drive), city “SHARIF NSAMBU SPECIALISING”
and a state name abbreviation “IN” (Indiana).The good news is that the above mentioned errors arequite rare.
Package: pyapa
A Python module for checking APA style in writing.This module provides an abstraction class, mostly composed of regular
expressions. This project does not aim to cover the entire APA style
guide, but it does attempt to cover several common errors with style.To make errors easier to visually locate, 5 characters of context are
sometimes given, depending on the detected error.InstallationClone this repository and run:make installor install from Pypi:pip3 install pyapaInformationPypi:https://pypi.python.org/pypi/pyapa/Github:https://github.com/keeferrourke/pyapaContact:https://krourke.org/contactLicense: ISC Licensepyapa.ApaCheck object classThis class documents regular expressions to match style errors.Thepyapa.ApaCheck.match()method generates an array of ApaMatch objects
and stores them in theApaCheck.Matcheslist for easy access.pyapa.ApaMatch object classThis class contains the following members:ApaMatch.feedbacka unicode string intended to hold a brief
explanation of an associated errorApaMatch.seea URL string intended to hold an external reference to an APA
Style guideApaMatch.endthe position of the character in a text which marks
the end of the target character spanApaMatch.startthe position of the character in a text which marks
the beginning of the target character spanApaMatch.targetthe matching string that contains an errorApaMatch.suggestionsa list of suggested replacement strings; at
this time, the list is only ever one element longThere are also two helper functions to make printing these objects easy:ApaMatch.print()prints the object to stdoutApaMatch.sprint()builds a string containing information about the objectExample usageFrom the interpreter:>>> from pyapa import pyapa
>>> a = pyapa.ApaCheck()
>>> text = u'Papaya are delicious fruit, it was concluded (Author, et al. 2017).'
>>> a.match(text)
[<pyapa.pyapa.ApaMatch object at 0x000000000000>]
>>> len(a.Matches)
1
>>> a.Matches[0].print()
Match from 46 to 65 for:
Target: Author, et al. 2017
Feedback: Do not put a comma before 'et al.'
Suggestion: Author et al. 2017Calling the module itself:python3 -m pyapa -i input.txt
python3 -m pyapa -h
Usage:
pyapa [-h] [--version] [-o OUTPUT_FILE] -i INPUT_FILE