Saravanan666/pypi-org huggingface dataset:
Package: pyapacheatlas
PyApacheAtlas: A Python SDK for Azure Purview and Apache AtlasPyApacheAtlas lets you work with the Azure Purview and Apache Atlas APIs in a Pythonic way. Supporting bulk loading, custom lineage, custom type definition and more from an SDK and Excel templates / integration.The package supports programmatic interaction and an Excel template for low-code uploads.Using Excel to Accelerate Metadata UploadsBulk upload entities.Upload entities / assets for built-in or custom types.Supports adding glossary terms to entities.Supports adding classifications to entities.Supports creating relationships between entities (e.g. columns of a table).Creating custom lineage between existing entities.Defining Purview Column Mappings / Column Lineage.Bulk upload custom type definitions.Bulk upload of classification definitions (Purview Classification Rules not supported).Using the Pythonic SDK for Purview and AtlasThe PyApacheAtlas package itself supports those operations and more for the advanced user:Programmatically create Entities, Types (Entity, Relationship, etc.).Perform partial updates of an entity (for non-complex attributes like strings or integers).Extracting entities by guid or qualified name.Creating custom lineage with Process and Entity types.Working with the glossary.Uploading terms.Downloading individual or all terms.Working with classifications.Classify one entity with multiple classifications.Classify multiple entities with a single classification.Remove classification ("declassify") from an entity.Working with relationships.Able to create arbitrary relationships between entities.e.g. associating a given column with a table.Deleting types (by name) or entities (by guid).Performing "What-If" analysis to check if...Your entities are valid types.Your entities are missing required attributes.Your entities are using undefined attributes.Azure Purview's Search: query, autocomplete, suggest, browse.Authentication to Azure Purview using azure-identity and Service PrincipalAuthentication to Apache Atlas using basic authentication of username and password.
Package: pyaparat3
pyaparatHello my friends this isMr.RezooTable of contentsGeneral infoTechnologiesHelpSetupCreditsContributorsLicenseGeneral infobuild scraper to download video fromwww.aparat.comTechnologiesProject is created with:Python: 3.9.4bs4: 4.9.3requests: 2.25.1HelpIf you are considering a particular method, more modern technology Add to my
project and send merge request, I will add you in the credits and contributors
sectionSetupfirst step : create virtual environmentvirtualenv-ppython3venvsecond step : activate virtual environmentsourcevenv/bin/activatethird step : install package | library from requirements.txtpipinstall-rrequirements.txtfourth steppipinstallpyaparat3last stepfrompyaparat3.mainimportMaina=Main('url','quality')a.download()CreditsmongardContributorsMrRezooLicenseDistributed under the MIT License. Seelicensefor more information.
Package: pyap-beauhurst
Pyap is an MIT Licensed text processing library, written in Python, for
detecting and parsing addresses. Currently it supports US 🇺🇸, Canadian 🇨🇦 and British 🇬🇧 addresses.This fork is maintained by [Beauhurst](https://github.com/Beauhurst).>>>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.dict())...InstallationTo install Pyap, simply:$pipinstallpyap_beauhurstAboutThis 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: pyapes
pyapes: PYthon Awesome Partial differential Equation Solver (general purpose finite difference PDE solver)Descriptionpyapesis designed to solve various engineering problems in rectangular grid.The goal ofpyapes(should be/have) isCross-platformBoth tested on Mac and Linux (Arch)Windows support is under testingGPU acceleration in a structured grid withPyTorchUse oftorch.Tensor. User can choose eithertorch.device("cpu")ortorch.device("cuda").Generically expressed (OpenFOAM-like, human-readable formulation)InstallationWe recommend to usepoetryto manage/install all dependencies.Fromgitgitclonegit@gitlab.ethz.ch:kchung/pyapes.gitcdpyapes
poetryinstallFrompypipython3-mpipinstallpyapes# orpoetryaddpyapesDependenciesCore dependencypython >= 3.10As of 19.02.2023,torchdoes not support 3.11 properly (for the official release). Therefore, stick topython3.10.torch >= 1.10.0Dependencies from my personal projectspymyplot(plotting tools)pymytools(misc. tools including data I/O, logging, etc.)Implemented FeaturesCPU/GPU(CUDA) computation usingtorch(OpenFOAM like) generically expressed solver>>>solver.set_eq(fdm.laplacian(1.0,var)==rhs)>>>solver.solve()FDM DiscretizationsSpatial:Grad,Laplacian,DivSupports flux limiterupwindfor theDivoperatorTemporal:DdtBoundary conditions:SupportsDirichlet,Neumann,Periodic, andSymmetryDemo cases injupternotebooksExamplesCheck ourdemos filesTodosBoundary conditionsInflow/OutflowNeed different derivative order at the cell faceAdditional featuresHigh order time discretizationImmersed body BCHigher order flux limiters (quick)Testing and validationDdtclass (implementation is tested but haven't validated with practical test cases)Working on demo filesThe Poisson equationThe advection-diffusion equationThe Burgers' equationThe Navier-Stokes equation at low Reynolds numbersThe Black-Scholes equation
Package: pyapetnet
pyapetnetA convolutional neurol network (CNN) to mimick the behavior of anatomy-guided PET reconstruction in image space.AuthorsGeorg Schramm, David RigieLicenseThis project is licensed under the MIT License - see theLICENSEfile for details.Scientific PublicationDetails about pyapetnet are published inSchramm et al., "Approximating anatomically-guided PET reconstruction in image space using a convolutional neural network" ,NeuroImage Vol 224 2021.
If we you are using pyapetnet in scientific publications, we appreciate citation of this article.InstallationInstall miniconda or miniforgeInstall the mambaforge fromhereand create a new virtual environment containingpyapetnetand all dependenciesmamba create -n pyapetnet pyapetnetTesting the installationTo test the installation activate the virtual conda environmentmamba activate pyapetnetand runimportpyapetnetprint(pyapetnet.__version__)print(pyapetnet.__file__)If the installation was successful, a number of command line scripts all starting with pyapetnet* to e.g. do predictions with the included trained models from nifti and dicom input images will be available.Getting started - running your first prediction with pre-trained modelsTo run a prediction using one of included pre-trained networks andnifti images, run e.g.:pyapetnet_predict_from_nifti osem.nii t1.nii S2_osem_b10_fdg_pe2i --showUse the following to get information on the (optional) input argumentspyapetnet_predict_from_nifti -hTo get a list of available pre-trained models runpyapetnet_list_modelsTo make predictions fromdicom images, usepyapetnet_predict_from_dicom osem_dcm_dir t1_dcm_dir S2_osem_b10_fdg_pe2i --showThe source code of the prediction scripts can be found in thepyapetnetsubfolderhereandhere.Training your own modelIf you want to train your own model (from scratch or using transfer learning)
using your own data, have a look at ourtraining script.
All input parameters (e.g. data sets to use) have to be specified in a config json file (example here).
The input data sets have to be in nifti format and should be aligned already.
Package: pyapex
Create interactive html charts in python
powered by js libraryApex Chartsinstallationpip install pyapexusagefrom pyapex import  Chart

plt  =  Chart(type="candlestick")

plt.set_series([{

"data": [

[1538856000000, 6593.34, 6600, 6582.63, 6600],

[1538856900000, 6595.16, 6604.76, 6590.73, 6593.86]

]

}])

  

plt.set_xaxis({"type": 'datetime'})

plt.show()
Package: pyaphid
PyaphidDescriptionPyaphid is a static analysis tool for detecting unwanted function calls in Python code.Installation and usageInstallation:pip install pyaphidUsage:python -m pyaphid <files and/or directories to analyze>orpyaphid <files and/or directories to analyze>ConfigurationForbidden function calls can be configured via thepyproject.toml:[tool.pyaphid]forbidden=["print",# forbid print(...)"pdb.run",# forbid pdb.run(...)"werkzeug.debug.*",# forbid werkzeug.debug.DebuggedApplication(...), werkzeug.debug.get_machine_id(...), ..."datetime.datetime.now"# forbid datetime.now()]With datetime.now for example you usually want to ignore one call to it for implementing a project-wide default function. You can use# pyaphid: ignoreto ignore a line:fromdateutil.tzimporttzlocalfromdatetimeimportdatetimedefget_now():# allowedreturndatetime.now(tzlocal())# pyaphid: ignoredatetime.now()# forbiddenCLI Options-n / --names:Look-up all func calls and print their identifierAs a pre-commit hook-repo:https://github.com/jvllmr/pyaphidrev:v0.3.1hooks:-id:pyaphidLimitations# Pyaphid cannot work with star importsfromos.pathimport*dirname(".")# undetected# Pyaphid doesn't track assignmentsmy_print=printmy_print("Hello world")# undetected
Package: pyapibp
pyapibp- Python boilerplate code generator to easily start building API'sThis python script generates a folder structure along all default files for an API framework in the current directory, optionally creating a new one.Currently supported frameworks:FlaskFastAPIWork in progress:DjangoShort backstoryWhen getting started on building an API, I found myself looking up an older project, copying the folder structure along the files and their contents. Then, remembering what environment variables I should include in the .env and their defaults for a local project. All in all, it was repetitive and annoying. Then let's be honest, why spend 5 minutes doing a repetitive task every now and then if you can spend 3 hours trying to automate it. Anyway, I hope you find this tool useful, and if you did, leave a star just so I know you found this tool useful.InstallationInstallation is done using pip using the following command:pip install pyapibpUsageIn the desired folder, run the following command:$ pyapibpThat's about it, follow the instructions, choose your options and tada, you are ready to code!I will write a more detailed description of the options after adding more frameworks, flagsetc... etc..., but for now, enjoy.History0.1.0 (2021-09-10)First release on Github.0.1.1 (2021-09-15)FastAPI support added. You can now generate boilerplate code for your FastAPI project.
Package: pyapi-client
PyAPI ClientPyAPI Clientis a Python library for consuming REST APIs based onOpenAPIspecifications.WARNING:This is still a work in progress and not quite ready for production usage. Until version 1.0 is released, any new release can be expected to break backward compatibility.Quick Startfrompyapi.clientimportClientclient=Client.from_file("path/to/openapi.yaml")result=client.some_endpoint_id("path","variables","query_var"="example")
Package: pyapi-framework
pyapi FrameworkA simple python REST api framework.Requirementspython >= 3pipHow to Run pyapiNavigate to project folder and run the following to start the server:python3 main.pyDefault pyapi architecturemain.py:Includes http server where server url and port are set.routes.py:Includes methods for routes set in service_handler.py.service_handler.py:Services required for headers, routes dictionary and GET/POST/PUT/DELETE methods.
Package: pyapi-logic
This python module and tool is the implementation of a effort to enforce a logic in API endpoint and Backend logic through a single endpoint: logic.
This endpoint when provided an element id from the backend will bring back a set of critical meta data that is necessary to interact with the element using the API:
- type: The base nature of the element
- endpoints: The diverse HTTP endpoints, methods and in the case of a POST/UPDATE/PUT the template of the envelop.
This effort concentrates on making Database and API design express the logic of the user interaction by basing it on the logic endpoint.
To be compliant, an API should provide the logic element id resolver. It should express the map of how to manipulate any element in the backend.
We are encouraging the design of web apps that care about APIs to follow two stage:
Naming: Models -> Endpoints
Structuring: Fields -> Envelops
Logic: From the four steps in the two stages one will have an ease of building the logical map behind the API.
Package: pyapi-server
PyAPI ServerPyAPI Serveris a Python library for serving REST APIs based onOpenAPIspecifications. It is based onStarletteand is functionally very similar toconnexion, except that it aims to be fullyASGI-compliant.WARNING:This is still a work in progress and not quite ready for production usage. Until version 1.0 is released, any new release can be expected to break backward compatibility.Quick Startfrompyapi.serverimportApplicationfromsome.pathimportendpointsapp=Application.from_file("path/to/openapi.yaml",module=endpoints)
Package: pyapitest
pyapitestTest HTTP APIs using plain configuration in JSON.ObjectivesCreate a HTTP request testing tool that is uses tests written soley in JSON.Make configurations simple, non-repetitive and matched to parameters passed to requestsBe a tool to use within the testing framework of the users’ choice, not provide a standalone solution.StatusCurrently in development. I am building it along side writing tests for an existing application, features will be added on an as-needed basis. Specifically the use of the modules jsonschema and jmespath will be implemented after the basics are all addressed. JSON is going to be the default supported config and request/response format, but will be written so that anything that can become a dict can be used.Development/Testingpip install pytest bottle six requests cerberusYou’ll find a script for running tests, and a test HTTP server in the root of the repo.AcknowledgementsI thought the YAML configs used forpyresttestwere a clean way to write tests for API endpoints, but wanted to make a tool more easily maintained.
Package: pyapi-zabbix
|PyPi status| |PyPi version|Zabbix module for PythonInstallYou can install Zabbix modules for Python with pip:::pip install pyapi-zabbixOfficial documentation forpyapi-zabbix <https://pyapi-zabbix.readthedocs.org/en/latest/>__ExamplesZabbixAPI.. code:: python

    from pyapi_zabbix import ZabbixAPI

    # Create ZabbixAPI class instance
    zapi = ZabbixAPI(url='https://localhost/zabbix/', user='Admin', password='zabbix')

    # Get all monitored hosts
    result1 = zapi.host.get(monitored_hosts=1, output='extend')

    # Get all disabled hosts
    result2 = zapi.do_request('host.get',
                              {
                                  'filter': {'status': 1},
                                  'output': 'extend'
                              })

    # Filter results
    hostnames1 = [host['host'] for host in result1]
    hostnames2 = [host['host'] for host in result2['result']]

    # Logout from Zabbix
    zapi.user.logout()

Or use 'with' statement to logout automatically:

.. code:: python

    from pyapi_zabbix import ZabbixAPI

    # Create ZabbixAPI class instance
    with ZabbixAPI(url='https://localhost/zabbix/', user='Admin', password='zabbix') as zapi:

        # Get all monitored hosts
        result1 = zapi.host.get(monitored_hosts=1, output='extend')

Enable logging:

.. code:: python

    import sys
    import logging
    from pyapi_zabbix import ZabbixAPI

    # Create ZabbixAPI class instance
    logger = logging.getLogger("pyapi_zabbix")
    logger.setLevel(logging.DEBUG)
    handler = logging.StreamHandler(sys.stdout)
    logger.addHandler(handler)

    zapi = ZabbixAPI(url='http://localhost', user='Admin', password='zabbix')

Note that passwords and auth tokens are hidden when raw messages are logged or raised in exceptions ( but not hidden if print() is used):

.. code:: python

    ZabbixAPI.login(Admin,********)
    Call user.login method
    urllib2.Request(http://localhost/api_jsonrpc.php, {"jsonrpc": "2.0", "method": "user.login", "params": {"user": "Admin", "password": "********"}, "id": "1"})
    Response Body: {
        "jsonrpc": "2.0",
        "result": "********",
        "id": "1"
    }


ZabbixSender.. code:: pythonfrom pyapi_zabbix import ZabbixMetric, ZabbixSender

# Send metrics to zabbix trapper
packet = [
  ZabbixMetric('hostname1', 'test[cpu_usage]', 2),
  ZabbixMetric('hostname1', 'test[system_status]', "OK"),
  ZabbixMetric('hostname1', 'test[disk_io]', '0.1'),
  ZabbixMetric('hostname1', 'test[cpu_usage]', 20, 1411598020),
]

result = ZabbixSender(use_config=True).send(packet).. |PyPi status| image::https://img.shields.io/pypi/status/pyapi-zabbix.svg:target:https://pypi.python.org/pypi/pyapi-zabbix/.. |PyPi version| image::https://img.shields.io/pypi/v/pyapi-zabbix.svg:target:https://pypi.python.org/pypi/pyapi-zabbix/
Package: pyapksigner
pyapksigner can sign the apk file.$pipinstallpyapksigner$pyapksigner{APK_PATH}--default>{SIGNED_APK_PATH}$pyapksigner{APK_PATH}>[Warning]Signingwithdefaultkeystore.>[Warning]Pleasepass--key_path,--key_alias,--key_pass,--ks_passparameter,ifyouwanttouseyourkeystore>{SIGNED_APK_PATH}$pyapksigner--key_path="sample.jks"--key_alias="sample"--key_pass="sample_key"--ks_pass="sample_ks">{SIGNED_APK_PATH}
Package: pyapm
pyapmAn Aerodynamic Panel Method implemented in Python for use from Python scripts. Examples in the "./scripts" folder.JSON Definition File:{"name":"Prandtl-D2","mach":0.0,"sref":0.94064328,"cref":0.2686,"bref":3.749,"xref":0.3270,"yref":0.0,"zref":0.0,"surfaces":[{"name":"Wing","twist":0.0,"mirror":true,"cnum":16,"sections":[{"xpos":0.0,"ypos":0.0,"zpos":0.0,"chord":0.40005,"bnum":50,"bspc":"full-cosine","airfoil":"prandtl_root.dat","xoc":0.0,"zoc":0.0},{"xpos":0.83459,"ypos":1.87452,"zpos":0.08177,"chord":0.10008,"airfoil":"prandtl_tip.dat","xoc":0.0,"zoc":0.0}],"functions":[{"variable":"twist","spacing":"equal","interp":"cubic","values":[8.3274,8.5524,8.7259,8.8441,8.9030,8.8984,8.8257,8.6801,8.4565,8.1492,7.7522,7.2592,6.6634,5.9579,5.1362,4.1927,3.1253,1.9394,0.6589,-0.6417,-1.6726]}]}],"cases":[{"name":"Design Point","alpha":0.0,"speed":13.0,"density":1.145}]}Typical Python Script File "test_prandtl-d2.py":#%% Import DependenciesfromIPython.displayimportdisplay_markdownfrompyapm.classesimportPanelResult,panelsystem_from_jsonfrompyapm.output.mshimportpanelresult_to_msh#%% Create Panel Meshjsonfilepath=r'../files/Prandtl-D2.json'psys=panelsystem_from_json(jsonfilepath)psys.assemble_panels()psys.assemble_horseshoes()psys.solve_system()#%% Solve Panel Resultalpha=0.0speed=13.0rho=1.145pres=PanelResult('Design Point',psys)pres.set_density(rho=rho)pres.set_state(alpha=alpha,speed=speed)display_markdown(pres)display_markdown(pres.surface_loads)mshfilepath='../results/'+psys.name+'.msh'panelresult_to_msh(pres,mshfilepath)Mesh File Output:You can generate a Gmsh mesh file (*.msh) directly from a Python script using the following code snippet.mshfilepath='../results/'+psys.name+'.msh'panelresult_to_msh(pres,mshfilepath)This will output a mesh file to the specified location, which can then be viewed in Gmsh. The latest version of Gmsh can be downloaded at:http://gmsh.info/Use File > Open in Gmsh to open the mesh file with the pressure results.A sample of the aircraft shown in Gmsh is captured below. Consult Gmsh help to operate Gmsh.
Package: pyapns
Features:* XML-RPC Based, works with any client in any language* Native Python API with Django and Pylons support* Scalable, fast and easy to distribute behind a proxy* Based on Twisted* Multi-application and dual environment support* Simplified feedback interfacepyapns is an APNS provider that you install on your server and access through XML-RPC.To install you will need Python, Twisted_ and pyOpenSSL_. It's also recommended toinstall `python-epoll`_ for best performance (if epoll is not available, like onMac OS X, you may want to use another library, like `py-kqueue`_. If you likeeasy_install try (it should take care of the dependancies for you)::$ sudo pip install pyapnspyapns is a service that runs persistently on your machine. To start it::$ twistd -r epoll web --class=pyapns.server.APNSServer --port=7077To get started right away, use the included client::$ python>>> from pyapns import configure, provision, notify>>> configure({'HOST': 'http://localhost:7077/'})>>> provision('myapp', open('cert.pem').read(), 'sandbox')>>> notify('myapp', 'hexlified_token_str', {'aps':{'alert': 'Hello!'}})A lot more documentation and the issue tracker can be found on the `github page<http://github.com/samuraisam/pyapns>`.