Saravanan666/pypi-org huggingface dataset:
Package: pyopenweather
pyopenweatherpyopenweather is a lightweight asynchronous Python wrapper for theOpenWeatherMap Current Weather Data APIBadgesInstallationUse the package managerpipto install pyopenweather.pipinstallpyopenweatherUsageAPI KeyOpenWeatherMap APIs require an API key to provide valid responses. Please obtain an API key on theOpenWeatherMap website.Environment Variablespyopenweather will search for the following environment variables when theWeatherclass is instantiated:OPENWEATHER_API_KEYLATITUDELONGITUDEOPENWEATHER_API_KEYIf you set the API key and the environment variableOPENWEATHER_API_KEYthe library will use it on instantiation, otherwise the API key can be passed in as theapi_keyparameter.LATITUDEIf you set theLATITUDEenvironment variable, the library will use it on instantiation, otherwise the latitude can be passed in as thelatparameter.LONGITUDEIf you set theLONGITUDEenvironment variable, the library will use it on instantiation, otherwise the longitude can be passed in as thelongparameter.ExamplesWith Environment Variablesfrompyopenweather.weatherimportWeatherweather=Weather()weather.longitude# returns longitudeweather.latitude# returns latitudeweather.temperature# returns temperatureweather.pressure# returns temperatuireWithout Environment Variablesfrompyopenweather.weatherimportWeatherweather=Weather(lat=37.34,long=-121.89,api_key='abcdef123456')weather.longitude# returns longitudeweather.latitude# returns latitudeweather.temperature# returns temperatureweather.pressure# returns temperatuireContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: pyopenxr
pyopenxrUnofficial python bindings for theOpenXR SDKto access VR and AR devicespyopenxr is a python developer SDK with features for device tracking and rapid virtual reality prototyping using the headset-agnostic OpenXR API.Installing pyopenxrpip install pyopenxrUsing pyopenxrimportxr# Query the available VR/AR extensionsavailable=xr.enumerate_instance_extension_properties()# Replace with whatever extensions are required for your# particular application...required=[xr.KHR_OPENGL_ENABLE_EXTENSION_NAME,]forpropinrequired:assertpropinavailableStudy the complete workinghello_xr.pyexample athttps://github.com/cmbruns/pyopenxr_examplesPythonic naming conventions in pyopenxrsymbolPython exampleC examplefunctionxr.create_instance(...)xrCreateInstance(...)constantxr.MAX_SYSTEM_NAME_SIZEXR_MAX_SYSTEM_NAME_SIZEstruct namexr.ExtensionPropertiesXrExtensionPropertiestype aliasxr.VersionXrVersionenum typexr.FormFactorxrFormFactorenum valuexr.FormFactor.HEAD_MOUNTED_DISPLAYXR_FORM_FACTOR_HEAD_MOUNTED_DISPLAYhandlexr.InstanceXrInstance
Package: pyopera
PyOPERATheOPERAapp was developed by the NIH to run Quantitative structure–activity/property relationship (QSAR/QSPR) models. QSAR models provide a way to predict chemical toxicology without the need of animal models (Madden et al., 2020). The NIH project spun offa repo of OPERA modelsusing MATLAB, this project uses the output of the NIH OPERA open-source project and converts it to a full Python package that is as usable as possible by Python developers.This project is under active development, full documentation can be foundhere.ReferencesMadden, J. C., Enoch, S. J., Paini, A., & Cronin, M. T. (2020). A Review of In Silico Tools as Alternatives to Animal Testing: Principles, Resources and Applications. Alternatives to Laboratory Animals, 48(4), 146–172.https://doi.org/10.1177/0261192920965977
Package: pyoperaciones
Este es un ejemplo simple para calcular en Python los nÃºmeros primos entre 1 y n, donde n es un parÃ¡metro de la funciÃ³n.Tendremos que importar nuestra funciÃ³n e introducir el valor n que se solicitarÃ¡ al compilar dicha funciÃ³n.
This 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.
Package: pyoperacionesmonzon
En este paquete tenemos tres funciones:
sumaEnteros(m,n), el cual recibe dos parÃ¡metros enteros y devuelve la la suma de ellos.
restaEnteros(n,m), el cual recibe dos parÃ¡metros enteros y devuelve el resultado de restar el segundo entero al primer entero.
primos(n), que devuelve los primos que se encuentran entre 1 y n
GNU GPLv3
Package: pyoperators
PyOperatorsThe PyOperators package defines operators and solvers for high-performance computing. These operators are multi-dimensional functions with optimised and controlled memory management. If linear, they behave like matrices with a sparse storage footprint.Documentaionhttps://pchanial.github.io/pyoperatorsInstallationpipinstallpyoperators[fft,wavelets]On some platforms, it might be more convenient to install pyfftw through Conda beforehand to use theFFTOperator:condainstallpyfftwFor MPI communication, an MPI library needs to be installed, for example on Ubuntu:sudoaptinstalllibopenmpi-dev
pipinstallpyoperators[fft,wavelets,mpi]Getting startedTo define an operator, one needs to define a direct function
which will replace the usual matrix-vector operation:>>>deff(x,out):...out[...]=2*xThen, you can instantiate anOperator:>>>A=pyoperators.Operator(direct=f,flags='symmetric')An alternative way to define an operator is to define a subclass:>>>frompyoperatorsimportflags,Operator...@flags.symmetric...classMyOperator(Operator):...defdirect(x,out):...out[...]=2*x......A=MyOperator()This operator does not have an explicit shape, it can handle inputs of any shape:>>>A(np.ones(5))array([2.,2.,2.,2.,2.])>>>A(np.ones((2,3)))array([[2.,2.,2.],[2.,2.,2.]])By setting thesymmetricflag, we ensure that A's transpose is A:>>>A.TisATrueFor non-explicit shape operators, we get the corresponding dense matrix by specifying the input shape:>>>A.todense(shapein=2)array([[2,0],[0,2]])Operators do not have to be linear. Many operators are alreadypredefined, such as theDiagonalOperator, theFFTOperatoror the nonlinearClipOperator.The previousAmatrix could be defined more easily like this:>>>frompyoperatorsimportI>>>A=2*IwhereIis the identity operator with no explicit shape.Operators can be combined together by addition, element-wise multiplication or composition. Note that the operator*stands for matrix multiplication if the two operators are linear, or for element-wise multiplication otherwise:>>>frompyoperatorsimportI,DiagonalOperator>>>B=2*I+DiagonalOperator(range(3))>>>B.todense()array([[2,0,0],[0,3,0],[0,0,4]])Algebraic rules can easily be attached to operators. They are used to simplify expressions to speed up their execution. TheBOperator has been reduced to:>>>BDiagonalOperator(array([2,...,4],dtype=int64),broadcast='disabled',dtype=int64,shapein=3,shapeout=3)Many simplifications are available. For instance:>>>frompyoperatorsimportOperator>>>C=Operator(flags='idempotent,linear')>>>C*CisCTrue>>>D=Operator(flags='involutary')>>>D(D)IdentityOperator()Requirementspython 3.8Optional requirements:PyWavelets: wavelet transformspyfftw: Fast Fourier transformsmpi4py: For MPI communication
Package: pyoperon
pyoperonpyoperonis the python bindings library ofOperon, a modern C++ framework for symbolic regression developed byHeal-Researchat the University of Applied Sciences Upper Austria.A scikit-learn regressor is also available:frompyoperon.sklearnimportSymbolicRegressorTheexamplesfolder contains sample code for using either the Python bindings directly or thepyoperon.sklearnmodule.InstallationThe easiest way to installpyoperonis withpip:pip install pyoperonNote that the pyoperon python module links against the shared python interpreter library (libpython.so), so it's important that this library is in the path (e.g.,LD_LIBRARY_PATHon linux).Another way to getpyoperonis via thenix package manager. Nix can be installed on other Linux distributions in a few easy steps:Install nixand enable flake support in~/.config/nix/nix.conf:experimental-features = nix-command flakesInstallpyoperon:nix develop github:heal-research/pyoperon --no-write-lock-fileUpon completion of the last command, the$PYTHONPATHwill be updated andpyoperonwill pe available for use. Note that as opposed to PyPI releases, the nix flake will always build the latest development version from github.Alternatively, one can also clonehttps://github.com/heal-research/pyoperon.gitand runnix developfrom within the cloned path.ContributingSee theCONTRIBUTINGdocument.
Package: pyoploverz
PyOpLoverz💓Unofficial wrapper from oploverz.in, this will get detail and stream about animeLanguageEnglish|indonesiaInstallingUsing clonegit clone https://github.com/dyseo/PyOpLoverzcd PyOpLoverzpython3 setup.py installFrom pypipip install pyoploverzExamplefrompyoploverzimportOpzApiquery="naruto"page=1ex_url="https://www.oploverz.in/boruto-naruto-next-generations-90-subtitle-indonesia/"api=OpzApi(return_as="rpc")#change 'return_as' to 'dict' if you want result as dictSearch anime with queryprint(api.search_anime(query=query,page=page))Get detail from url animeprint(api.detail_anime(urls=url))Get lasted updateprint(api.lasted_anime(page=page))Get all data from one pageprint(api.multi_detail(query=query,page=page))#NOTE: i recommend this method only using dict for returning.#rpc style make it hard for parsingTested at 19:30 Fri 4,2019 Search method using rpc styleAuthorDyseo/Alnyz
Package: pyopml
PyOPMLPython package meant to read, manipulate and writeOPML 2.0files.DocumentationEverything you need to know is locatedhere.ChangelogSeehere.DevelopmentGetting source code, installing the package as well as its dev packages:Clone the repositoryFrom the root directory, run:pip install -e .[dev]on Linux orpip install -e ".[dev]"on WindowsRunning tests:From the root directory, runpytest. They will automatically be all discovered and ran.Building docs:From thedocsdirectory, runmake.bat htmlon Windows ormake htmlon Linux.Publishing the package:From the root directory, runpython setup.py upload. This will create a git tag and publish on PyPI.
Package: pyopnsense
You can see the full rendered docs at:http://pyopnsense.readthedocs.io/en/latest/A python API client for the OPNsense API. This provides a python interface for
interacting with the OPNsense API.Installationpyopnsense is available via pypi so all you need to do is run:pip install -U pyopnsenseto get the latest pyopnsense release on your system. If you need to use a
development version of pyopnsense you can clone the repo and install it locally
with:git clone https://github.com/mtreinish/pyopnsense && pip install -e pyopnsensewhich will install pyopnsense in your python environment in editable mode for
development.UsageTo use pyopnsense you need a couple pieces of information, the API key and the
API secret. Both can be created/found from the OPNsense web UI by navigating
to:System->Access->UsersunderAPI keys.More information on this can be found in the OPNsense documentation:https://docs.opnsense.org/development/how-tos/api.htmlOnce you have the API key and API secret you can use pyopnsense to interact
with your OPNsense installation. You can do this by passing your credentials
to a client class. For example:frompyopnsenseimportdiagnosticsapi_key='XXXXXX'api_secret='XXXXXXXXXXXXXXX'opnsense_url='http://192.168.1.1/api'timeout=5netinsight_client=diagnostics.NetworkInsightClient(api_key,api_secret,opnsense_url,timeout)print(netinsight_client.get_interfaces())which will print a dictionary mapping physical devices to their interface label.This same formula can be used to access each individual API endpoint you need
to access. The basic structure of the library is setup to roughly mirror the
endpoint tree of the OPNsense API. Each client module maps to the base endpoint
and then there is a client class in those modules for the next level up off
that.You can find more detail on how to use the clients in the API reference
documentation found here:http://pyopnsense.readthedocs.io/en/latest/api.html
Package: pyopossum3
The package provides an object-oriented access interface to theoPOSSUM3raw database tables.InstallationThe simplest way to install the package is viaeasy_installorpip:$ easy_install pyopossum3DependenciesSQLAlchemyPyMySQLor any otherSQLAlchemy-compatible MySQL connector.UsageA usage example is the following:>>> from pyopossum3 import Opossum
>>> o = Opossum("mysql+pymysql://opossum_r:@opossum.cmmt.ubc.ca/oPOSSUM3_human")
>>> o.ConservedTfbs.query.first().gene
>>> o.ExternalGeneId.query.filter(o.ExternalGeneId.external_id.in_(['TSPAN6'])).filter(o.ExternalGeneId.gene.has(chr='X')).first().gene
... etc ...The second line creates a connection to the oPOSSUM server, and the third/fourth query theconserved_tfbssandexternal_gene_idstables using SQLAlchemy syntax.Naturally, for heavy analyses, you are suggested to set up your own copy of the database.
Seeherefor instructions on how to download the data.You can get a feeling for the structure of the database by running the following:>>> for cls in o.all_orm_classes:
>>>    print cls.query.first()The main table you should probably care about isConservedTfbs, which contains matches in the vicinity of each gene, annotated with match score and conservation level.An example using theucscgenomepackage to verify that TFBS sequences are indeed correct:>>> c = o.ConservedTfbs.query.filter(o.ConservedTfbs.strand==1).first()
>>> c.gene.chr, c.absolute_start, c.absolute_end, c.seq
('X', 99890235L, 99890253L, 'AGAAACATTGCATACTGC')
>>> from ucscgenome import Genome
>>> g = Genome('hg19')
>>> g['chrX'][99890235:99890253]
'AGAAACATTGCATACTGC'NoteThe author of this package is not associated with the creators and maintainers of the oPOSSUM3 tool.See alsoReport issues and submit fixes at Github:https://github.com/konstantint/pyopossum3
Package: pyoppleio
This library (and its accompanying cli tool) is used to interface with
opple mobile-control lights.Supported DevicesAll opple light with WIFI support (mobile control)InstallpipinstallpyoppleioAPI ReferenceclassOppleLightDeviceproperty:is_onlinee[True|False] Readonlypower_on[True|False] Read/Writebrightness[10-255] Read/Writecolor_temperature[2700-6500] Read/Writemethod:init(ip)update()Demo:frompyoppleio.OppleLightDeviceimportOppleLightDevicelight=OppleLightDevice('192.168.0.222')ifnotlight.is_online:print('light is offline')elifnotlight.power_on:light.power_on=Trueelse:light.brightness=255CLI Commandsearch lightsoppleiosearchget one light's statusoppleioget-a[lightipaddress]turn on of turn off one lightoppleioset-a[deviceipaddress]-pon
oppleioset-a[deviceipaddress]-poffset light's brightness and color temperatureoppleioset-a[deviceipaddress]-b200-c4200
Package: pyoppleio-legacy
StatementThis is a fork repo fromjedmeng/python-oppleio, since the origin author isnot activefor a long time.I'm not a skilled python programmer, and I know nothing about reverse engineering the protocol. What I'm doing now is just to make this library continue working with the newer version of home-assistant.Please don't upgrade the firmware of your Opple lights, and I'm not going to development this library to communicate with the newer firmwares.I'll keep on maintain this repo as long as I still have Opple light's in my home.You can read the OLD_README.md for more information.Why there's a "legacy" term in the library name?As far as I know, this library don't suppport newer version of Opple light's WiFi firmware, so this is just for old models, that why I add legacy to this library.
But this repo is a continue support of the original repo though.
Package: pyops
pyops: OpenSearch made pythonically easyOpenSearch python client.Examples:>>>importpyops>>>client=pyops.Client(description_xml_url="https://example.org")# simple search>>>raw_results=client.search()# authenticated search>>>raw_results=client.search(auth=('username','password'))# advanced search>>>raw_results=client.search(params={"{eop:instrument?}":{"value":"SAR"}})# results filtering>>>raw_results=client.search()>>>entry_fields=client.get_available_fields()>>>filtered_results=client.filter_entries([{>>>"tag":"{http://www.w3.org/2005/Atom}id",>>>"name":"id">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}title",>>>"name":"title">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}summary",>>>"name":"summary">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}published",>>>"name":"published">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}updated",>>>"name":"updated">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}link",>>>"name":"link",>>>"rel":"enclosure">>>}])TODOAPIs (search, ...)documentation[HOW TO] DEPLOYUpdatepyops.__version__.py# create packagespython3setup.pysdistbdist_wheel# upload on test.pypitwineupload--repository-urlhttps://test.pypi.org/legacy/dist/*# test installpython3-mpipinstall--index-urlhttps://test.pypi.org/simple/pyops# upload on pypitwineuploaddist/*CHANGELOGv0.0.2 (2019-07-16):Added: authentication managementBugfix: removed unused parameters from search (added regex)Tests: added test_authentication (description_xml_url and authentication params not committed)Issue #1: included tests in packaging
Package: py-ops
☤ 说明这是一款基于``pytest``封装，同时支持``关键字``和``BDD``，测试数据分离，面向编程，轻量级的，对上层自动化应用友好的基础测试框架。其主要核心功能：支持关键字定义支持关键字组装测试数据透传该框架的主要特点：基于``pytest``框架开发，支持原生插件同时具备``关键字``和``BDD``框架的特点无二次学习成本(Python|json)天然支持``测试数据分离``与传递对上层应用提供友好的封装接口支持脚本``Debug``调试代码量少(7个文件500行代码)☤ 环境安装pipinstallpy-ops或者使用下面命令安装最新版：pipinstallgit+https://github.com/five3/pyops.git☤ 快速开始使用该框架非常的方便，基本没有学习成本。安装完成之后，在任意目录执行如下命令创建一个测试项目：pyopsstartprojecttest1命令执行完成之后，会在当前目录创建一个[test1]目录，具体的目录结构如下：|-test1|--ah_ext|--__init__.py|--demo.json接着在测试项目根目录(test1)执行如下命令运行测试：pyopsrun该命令默认会执行当前目录先全部的json用例文件，如果你希望只执行部分的json用例，则可以指定特定的文件名：pyopsrundemo.jsomdemo2.json在执行完run命令后会在当前目录生成多个文件，具体的文件如下：|-test1|--ah_ext|--__init__.py|--demo.json|--demo.py|--pytest.ini|--report.html|--std.log其中demo.py是由json文件生成的同名用例文件，这个是执行测试流程中的产物，也是执行测试的真正入口点。
report.html是测试报告，std.log则是测试的详细日志，pytest.ini自动生成的pytest配置文件。如果你希望单独生成一个py用例文件，可以使用下面的命令：pyopsmakedemo.jsonjson文件中还可以对case配置disable字段，为true时则不会执行，不填时默认为false。
如果希望强制运行disable为true的用例，可以使用forcerun命令。pyopsforcerun当然，你也可以通过原生的pytest命令来执行，前提是已经通过make、run命令生成了py文件。比如：pytestdemo.py::test_cls_name::test_case_name-s-v--force_run--pytest_reportreport.html其中-s、-v是pytest原生的参数，–force_run是pyops插件参数，–pytest_report则是PyTestReport插件参数。☤ 框架设计结构☤ 自动生成用例说明自动生成的demo.json测试用例内容如下：{"name":"TestDemo","desc":".....background......","tag":"smoking_test","setup_class":[],"teardown_class":[],"setup":[],"teardown":[],"cases":{"test_add":{"desc":"","tags":[],"data":{"x":2,"y":3,"expect":5},"flow":["调用add"],"check":["检查add"]}}}自动生成的``ah_ext.__init__.py``文件内容如下：importloggingfrompyops.decoratorimport(make_check,make_flow,alias)logger=logging.getLogger()defadd(x,y):print('add')returnx+y@alias('调用add')@make_flowdefcall_add(data):"""
        data: 即json配置文件中的case节点下对应data字典对象
    """data['actual']=add(data['x'],data['y'])@alias('检查add')@make_checkdefcheck_add(data):"""
        data: 即json配置文件中的case节点下对应data字典对象
    """returndata['actual']==data['expect']
Package: pyopslib
OpslibOpslib is a Python infrastructure-as-code framework which offers powerful abstractions to make deployment straightforward and fun.Installing$pipinstall-UpyopslibA Simple Example# stack.pyfromopslibimportSshHost,Stackfromopslib.ansibleimportAnsibleActionfromopslib.terraformimportTerraformProviderstack=Stack(__name__)stack.hetzner=TerraformProvider(name="hcloud",source="hetznercloud/hcloud",version="~> 1.38.2",)stack.server=stack.hetzner.resource(type="hcloud_server",args=dict(name="opslib-example",server_type="cx11",image="debian-11",location="hel1",ssh_keys=["my-key"],),output=["ipv4_address"],)stack.vm=SshHost(hostname=stack.server.output["ipv4_address"],username="root",)stack.install_docker=AnsibleAction(host=stack.vm,module="ansible.builtin.shell",args=dict(cmd="curl -s https://get.docker.com | bash",creates="/opt/bin/docker",),)Deploy the stack. It's called-because it's the top levelStackobject:exportHCLOUD_TOKEN="..."# https://docs.hetzner.com/cloud/api/getting-started/generating-api-tokenopslib-deployNow we can interact with the VPS host, which we namedvmabove:opslib vm run 'set -x; whoami; uptime'
opslib vm run docker run --rm hello-worldFinally, we tear down the stack:opslib-destroyFeaturesOpslib does its best to enable readable code so you can reason about your stack. This means making use ofdescriptors,typingand other Python language features where it makes sense.Defining componentsDefine the stack in terms ofnested componentswith typedprops.Extensible cli: any component in the stack can be referenced directly and maydefine its own commands.Batteries includedTerraform: invoke any provider from the Terraform Registry.Ansible: invoke any module from Ansible Collections.Places: native modeling of local/remote hosts, files, directories and shell commands.A handful of specific integrations (e.g. systemd, restic).I plan to spin them off into a library of reusable components.Operations modelMost actions boil down to invokingsubprocess commandsor HTTP requests. All actions returnResults, which are understood by the reporting layer.Many components, after being successfully deployed, are skipped on subsequent deployments, unless their props change, or are manually refreshed to account for remote state changes.Commandsmay track deployment of other components (e.g. configuration files) and only get re-run when needed.Lazy variables, that wrap values which are available after another component is deployed, get evaluated when they are needed.LinksDocumentation:https://pyopslib.readthedocs.ioExamples:https://github.com/mgax/opslib/tree/main/examplesDiscord:https://discord.gg/TbaFKfusS6
Package: pyopstools
Python DevOps ToolsDescriptionA collection of DevOps CLI tools written in PythonAvailable toolsapitester- A simple API tester where the requests are configured in a JSON file (seeconfiguration.sample.jsonsample configuration)encodings- File encoding converterSetupInstallvenvmodulepip3.9installvirtualenvCreate environment# cd project_pathpython3.9-mvenvenvActivate environmentWindows.\env\Scripts\Activate.ps1Linuxsourceenv/bin/activateUpgradepippython-mpipinstall--upgradepipDeactivate environmentdeactivateInstall tool from sourceFor developmentpython-mpipinstall--editable.For usage onlypython-mpipinstall.Publish to PyPi.orgPrerequisitepython-mpipinstallbuildtwineBuildpython-mbuildChecktwinecheckdist/*Uploadtwineuploaddist/*