Saravanan666/pypi-org huggingface dataset:
Package: pysungrow
pysungrow - Python interface to Sungrow invertersThis Python package provides abstractions over the Modbus protocol used by inverters of the brand Sungrow.FeaturesBoth getting and setting dataFully asyncFully typedSupports most forms of Modbus (TCP, UDP, TLS and Serial)(Theoretically) supports most Sungrow inverters, both string and hybridHigh test coverageSupported invertersTested:SH10RTIn theory:SG60KTL, SG60KU, SG33KTL-M, SG36KTL-M, SG40KTL-M, SG50KTL-M, SG60KTL-M, SG60KU-M, SG49K5J, SG8KTL-M, SG10KTL-M, SG12KTL-M, SG80KTL, SG80KTL-M, SG80HV, SG125HV, SH5K-20, SH3K6, SH4K6, SH5K-V13, SH5K-30, SH3K6-30, SH4K6-30, SH5.0RS, SH3.6RS, SH4.6RS, SH6.0RS, SH8.0RT, SH6.0RT, SH5.0RTDo you have an inverter that's not been tested yet? Please follow the instructions underGetting startedincluding running thegetcommand, and report the result in anew issue.Getting startedInstall usingpip:pipinstallpysungrowSee below for usaging from Python. Also comes with a simple command line interface:pysungrow [-p PORT] [-s SLAVE] [HOST] identify
pysungrow [-p PORT] [-s SLAVE] [HOST] get [-k KEY]
pysungrow [-p PORT] [-s SLAVE] [HOST] set [KEY] [VALUE]It is recommended to start using these commands to verify that you can connect to your inverter successfully.UsageGetting data from the inverterfrompysungrowimportidentify,SungrowClientfrompymodbus.clientimportAsyncModbusTcpClientasyncdefexample_get():modbus_client=AsyncModbusTcpClient("192.168.1.228")# first we need to identify the model of inverter...serial_number,device,output_type=awaitidentify(modbus_client)# ...then we can create a client...client=SungrowClient(modbus_client,device,output_type)# ...using which we can get datareturnawaitclient.get("total_dc_power")Note that the first call toclient.getwill fetch all variables defined for your model of inverter. You can limit this by first manually triggering a fetch usingawait client.refresh(["total_dc_power"]).Controlling the inverterfrompysungrowimportidentify,SungrowClientfrompysungrow.definitions.variables.hybridimportChargeDischargeCommandfrompymodbus.clientimportAsyncModbusTcpClientasyncdefexample_set():modbus_client=AsyncModbusTcpClient("192.168.1.228")# first we need to identify the model of inverter...serial_number,device,output_type=awaitidentify(modbus_client)# ...then we can create a client...client=SungrowClient(modbus_client,device,output_type)# ...using which we can control the inverterawaitclient.set("charge_discharge_command",ChargeDischargeCommand.CHARGE)ContributingContributions are always welcome!For code contributions please make sure that all automated checks pass. The easiest way to do this is using these commands:pre-commitrun--all-files
pytestAcknowledgementsThere are a few other similar projects available (however neither of them fit my needs):SungrowInverterby @mvandersteenHomeAssistant Modbus mappingsby @mkaisersungrow-websocketby @wallentoLicenseMIT
Package: pysunsky
Simple SDK for use the Open API’s of sunsky-online.comFull documentation at:https://www.sunsky-online.com/base/doc!view.do?code=openapiInstallationYou can add in yourrequirements.txt:pysunsky==1.0or you can link the github:git+https://github.com/progressify/pysunskyUsageCreate a file namedconfig.ini[SUNSKY]
key = examplekey123@something
secret = examplesecret123Replace the sample data with your sunsky credential.If theconfig.inifile is located in the same directory of your
script you can call the class directly:open_api_service = OpenApiService()
url_products = "http://www.sunsky-api.com/openapi/product!search.do"
parameters = {'gmtModifiedStart': '10/31/2012'}
result = open_api_service.call(url_products, parameters)Otherwise you can specify a custom (relative or absolute) path:open_api_service = OpenApiService(config_path='./path-of-your-config-file/')
url_products = "http://www.sunsky-api.com/openapi/product!search.do"
parameters = {'gmtModifiedStart': '10/31/2012'}
result = open_api_service.call(url_products, parameters)
Package: pysunspec-read
This file is part of PySunsSpec-ReaderPySunSpec-Read 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.PySunSpec-Read 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 PySunSpec-Read.  If not, see <https://www.gnu.org/licenses/>.TODO - this is a work in-progress, I usually end up overengineering my solar readers for some reason.
At least this one is a bit simpler than the last one...
Package: pysunspec-to-pvoutput
This file is part of PySunSpec-to-PVOutputPySunSpec-to-PVOutput 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.PySunSpec-to-PVOutput 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 PySunSpec-to-PVOutput.  If not, see <https://www.gnu.org/licenses/>.
Package: pysuper
to me on Liberapay.Master:Latest 0.2 release:Super -- Information for users and developersSuperis able to rapidly search of 3D structural databases. Given a query fragment,Supersearches through a database of 3D structures for the query
within a tolerence threshold (measured by RMSD).ReleasesCurrent stable version: 0.2Curret development version: 0.3DependenciesThere are a few dependencies required to build and run Super:python2 (https://www.python.org/) script is used to pre-process PDB text datafiles into an efficient binary database formatprody (http://prody.csb.pitt.edu/) is used to parse PDB filescheck (https://libcheck.github.io/check/) is used for unit testing and can be disabled by passing --disable-check to the configure script.lcov is used for code coverage. It is not necessary by default, but passing --enable-code-coverage to the configure script will search for the lcov program.Compile./configure--prefix=${HOME}/some/install/pathI say ${HOME} so that I don't have to install as superuser. I often use --prefix=${HOME}/installmake&&makeinstallRunning Superin ${prefix}/bin directory:
$ LD_LIBRARY_PATH=../lib ./super [OPTIONS...] ${pdb_path}/pdb.dbOptions listing from ./super --help:
Usage: super [OPTION...] DATABASE
super -- A 3D protein pattern search program.

  -c, --thread-count=COUNT   Concurrently process the database with COUNT
                             threads of control
  -d, --defaults             Keep default arguments.
  -g, --disable-gershgorin   Disable use of gershgorin circles for Jacobi
                             diagonalisation
  -l, --lowerbounds=BOUNDS   Comma separated list of lower bound checks to use
  -n, --disable-rmsd         Disable the full (Kearsley) RMSD calculation, just
                             use the LB
  -o, --output=OUTPUT        Output to OUTPUT instead of stdout
      --quiet                Produce no output
  -q, --query=QUERY          Query database
  -r, --disable-mmap         Disable use of memory mapped databases to speed up
                             calculations
  -t, --threshold=THRESHOLD  Pattern matching threshold measured in Angstrom
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.I usually run with:LD_LIBRARY_PATH=${HOME}/install/lib./super--lowerbounds=arithmetic--threshold=1.0--query=qry.dbpdb.dbOR ON Mac OSX:DYLD_LIBRARY_PATH=${HOME}/install/lib./super-t1.0-qqry.dbpdb.dbDatabasesAn up-to-date pre-processed version of the entire PDB is available for download fromhttp://lcb.infotech.monash.edu.au/super/pdb.dbTo generate a query:pythonpdb_pp.py--query[YOURPDBFRAGMENTFILE].pdb--outputmyquery.qryTo generate a searchable database from a directory containing PDB files (pdb/):pythonpdb_pp.py-opdb.dbpdb/
Package: pysupercluster
A fast Python 3 module for geospatial point clustering.This is a port ofhttps://github.com/mapbox/superclusterto C++, conveniently
wrapped in a Python module. Initial benchmarks show it to be an order of
magnitude (10x) faster than the original JavaScript implementation.Installing pysuperclusterThe easiest way to install pysupercluster is to use pip:pip install pysuperclusterUsing pysupercluster>>>importnumpy>>>importpysupercluster>>>points=numpy.array([...(2.3522,48.8566),# paris...(-0.1278,51.5074),# london...(-0.0077,51.4826),# greenwhich...])>>>index=pysupercluster.SuperCluster(...points,...min_zoom=0,...max_zoom=16,...radius=40,...extent=512)>>>clusters=index.getClusters(...top_left=(-180,90),...bottom_right=(180,-90),...zoom=4)[
    {'id': 0, 'count': 1, 'expansion_zoom': None, 'latitude': 48.8566, 'longitude': 2.3522},
    {'id': 3, 'count': 2, 'expansion_zoom': 8, 'latitude': 51.49500168658321, 'longitude': -0.06774999999998421}
]
Package: pySuperfish
PySuperfishPython tools for Poisson Superfish calculationshttps://laacg.lanl.govNative WindowsDownload and install Poisson Supefish from:https://laacg.lanl.govDockerPublic (you must provide the executables)https://github.com/hhslepicka/docker-poisson-superfish-nobin(Private)https://github.com/hhslepicka/docker-poisson-superfishdockerpullhhslepicka/poisson-superfish:latestShifter (NERSC)shifterimg--user$USERpullhhslepicka/poisson-superfish:latestSingularitysingularitypull--docker-logindocker://hhslepicka/poisson-superfish:latestmacOS setupSuperfish runs on macOS and Linux using docker.Add/var/folders/to Docker's File Sharing list.
Package: pysupla
PySuplaA simplistic (and incomplete!) wrapper forSupla's OpenAPI, used mainly forHomeAssistantintegration.I'm in no way affiliated with Supla and Zamel: I love their devices, but prefer to use all my Smart Home devices from one app.See tests directory for usage examples.Currently, there are only integration tests: to run them, you have to export the following environmental variables:SUPLA_SERVER - an address of Supla's cloud server you want to test against (ex. srv1.supla.org, or (better) your own test instance).SUPLA_PERSONAL_ACCESS_TOKEN - a personal access token you can gethere(if you use Supla's server of course). PySupla currently does not support OAuth2.SUPLA_SHUTTER_ID - an ID of a shutter type device to test against (this is what I'm mainly using Supla for).Contributors welcome!
Package: pysupladevice
Python SUPLA device libraryA python library allowing you to write a script that acts as a SUPLA device, such as a sensor or a
light switch.Can be installed from PyPi usingpip install pysupladeviceCurrently supports the following kinds of channel:Relay/switchTemperature sensorHumidity sensorNote: I am not affiliated with SUPLA or Zamel -- this is not an "official" library.
Package: pysupuesto
PysupuestoModulo de python que permite descargar información presupuestaria dePresupuesto Abierto. El sitio contiene diversa información presupuestaria desde el ejercicio 1995 a la actualidad.La motivación para programar este modulo fue la necesidad de contar, de forma sencilla, con series temporales de información presupuestaria. El 'Sitio del ciudadano' permite descargar año por año, pero no una base con una serie temporal que incluya varios ejercicios.Pysupuesto, medianteget_datadescarga, por el momento, información de crédito y su ejecución, y de recursos. De periodicidad anual, mensual y diaria (según el periodo).Tambien, utilizandoget_docs, muestra los recursos (en términos de información) disponibles para cada año, por si es necesario descargar manualmente información complementaria.RequerimientosPython 3.8beautifulsoup4=>4.10.0bs4=>0.0.1pandas=>1.3.3Modo de usoInstalaciónpip install pysupuestoImportimport pysupuestoSintaxis GET_DATAdf = pysupuesto.get_data('tipo', 'periodicidad', ejercicio inicio, ejercicio cierre)Donde:tipo: Por el momento, sólo toma dos valoresrecursos: Devuelve los recursos presupeustarios.credito: Devuelve la ejecución presupuestaria.periodicidad: Dependiendo el año, puede ser:a: Anual (desde 1995 a 2021)m: Mensual (desde 1995 a 2021)d: Diaria (desde 2017 a 2021)ejercicio inicio: Ejercicio desde el cual se quiere descargar la informaciónejercicio cierre: Hasta el ejercicio hasta el cual se quiere descargar información. Puede omitirse para sólo descargar 'ejercicio inicio'.La información es descargada a un dataframe (llamadodfen el ejemplo).EjemplosCrédito y ejecuciónDescargar la información del crédito presupuestario y su ejecución del ejercicio 2018, con periodicidad diaria:df = pysupuesto.get_data('credito','d', 2018)Descargar la información del crédito presupuestario y su ejecución desde el ejercicio 1995 al 2021, con periodicidad anual:df = pysupuesto.get_data('credito','a', 1995,2021)RecursosDescargar la información de recursos presupuestarios del ejercicio 1997, con periodicidad mensual:df = pysupuesto.get_data('recursos','m', 1997)Descargar la información de recursos presupuestarios desde el ejercicio 2001 al ejercicio 2005, con periodicidad anual:df = pysupuesto.get_data('recursos','a', 2001, 2005)Sintaxis GET_DOCSpysupuesto.get_docs(ejercicio)Devuelve un print con todos los archivos disponibles para ese ejercicio.ToDo:Empaquetar y compartir enpypipara que esté disponible mediantepip installMejorar el sistema de logs.Intentar analizar toda la información disponible (para eso creeget_docs) para expandir el modulo y poner a disposición mayor cantidad descargas.Version 0.2.2:Change url for downloading data from years 1995-2018
Package: pysupwsdpocket
PySupWSDPocketJust a Python Version of SupWSD Pocket: A software suite for SUPervised Word Sense Disambiguation.Suport langugaeen, fr, de, it, es.Suport Modelthe model to be used in the disambiguation process: SEMCOR (English only), SEMCOR_OMSTI (English only), TRAIN_O_MATIC.If you don't specify the model, the program will load the default one:semcor_omstifor English,train_o_maticfor other languages.Installingpip install pysupwsdpocket

or

pip install pysupwsdpocket -UInstall Model LanguageDownloadthe templates to the path:/home/your_user/pysupwsdpocket_modelsGuide Startexample.pyfrompysupwsdpocketimportPySupWSDPocketsentence='The human brain is quite proficient at word-sense disambiguation.'nlp=PySupWSDPocket(lang='en',model='semcor_omsti')doc=nlp.wsd(raw_text=sentence)print(doc)Running CLIsentencethe sentence to be analyzed.datasetthe path of the file containing the sentences to be analyzed (one sentence per line).pysupwsd -wsd <sentence|dataset> <lang> <model>pysupwsdpocket-wsd'The human brain is quite proficient at word-sense disambiguation.'ensemcor_omstiCreditsSupWSD Site OficialSupWSD Github OficialSimone PapandreaAlessandro Raganato
Package: pysure
pysureSurrogate residuals for cumulative link and general regression models in PythonCalculates surrogate residuals for a statsmodels.miscmodels.ordinal_model.OrderedModel using the method described inDungang and Zhang
(2017)and implemented for R onCRAN.Usage:model=OrderedModel.from_formula("y ~ 1 + log_x",test_data,distr='logit')results=modf_logit.fit(method='bfgs')get_sur_resid(model,results)
Package: pySURF
Spatial Uncertainty Research FrameworkWhat isSURF?SURFis a Python package for performing spatial uncertainty analysis uisng random fields and machine leaning.DocumentationOnline documentationMore details in paper:here.How to citeCharles Wang. (2019, September 28). NHERI-SimCenter/SURF: v0.2.0 (Version v0.2.0). Zenodo.http://doi.org/10.5281/zenodo.3463676LicenseSURFis distributed under the BSD 3-Clause license.AcknowledgementThis material is based upon work supported by theNational Science Foundationunder Grant No. 1612843. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.
Package: pysurfex
Python API to SURFEX (pysurfex)An API in python to the external surface model SURFEX.Prepare input and namelists to a SURFEX binaryCreate atmospheric forcing for offline SURFEX runsRead SURFEX outputQuality control of observations with titanlibOptimal interpolation with gridppMonitor the observations usageSee online documentation inhttps://metno.github.io/pysurfex/Installation of pregenerated packages from pypi (pip)All releases will trigger an autmomatic pre-built package on pypi which can be installed by pippip3installpysurfexUser installation:pip3installpysurfex--userRun pysurfex from pre-built containerReleases also trigger an update of the pysurfex container in the github container registry. Below is an example to run pgd without any arguments.podmanrun-itghcr.io/metno/pysurfex:latestpoetryrunpgdInstallation on debian based Linux systemInstall the required pacakges (some might be obsolete if the pip packages contain the needed depedencies):sudoapt-getupdatesudoapt-getinstall-ylibudunits2-devlibproj-devlibeccodes0libeccodes-devlibnetcdf-devnetcdf-binca-certificatesThe following depencies are needed. Install the non-standard ones e.g. with pip or your system installation system.General dependencies (from pypi)numpypyprojpyyamltomlf90nmlTo read NetCDF files:NetCDF4cfunitsTo read grib files:eccodesfrom ECMWFhttps://software.ecmwf.int/wiki/display/ECC/Releasesinstalled with ENABLE_PYTHON=ONTo plot:matplotlibTo get observations from frost.met.no API:requestsFor Quality control of observationstitanlibFor optimal interpolation and observation operatorsgridppFor testing:pytestInstall pysurfexDownload the source code, then installpysurfexby executing the following inside the extracted
folder:poetryinstallThis will installpysurfexin a poetry environment and this environment can be activated interactively by:poetryshellorRun pysurfex client applicationspoetryrun[command]# e.g.poetryrunpython# will run python inside the pysurfex poetry environmentRun pysurfex client applicationsimportsysfrompysurfex.cliimportparse_args_surfex_binary,run_surfex_binaryargv=sys.argv[1:]kwargs=parse_args_surfex_binary(argv,"pgd")run_surfex_binary("pgd",**kwargs)ExamplesSeehttps://metno.github.io/pysurfex/#examples
Package: pysurfline
pysurflineGet the surf forecastfor any spot listed onSurfline.Quickly get the forecast data as apandas Dataframeand plot surf forecast withmatplotlibto visualize the conditions of your favorite surf spot.Surf(surf min, surf max)Wind(speed, direction)Swell(height, period, direction)Tide(height, direction)sunlightTimes(sunrise, sunset)DistributionBuildsTestsDocumentationInstallationInstall withpippip install pysurflineExampleGet the surf forecasts for a givenSpotIdand get data as a pandas Dataframe. Control forecast timespan withdaysandintervalHours.Go to full example.importpysurflinespotId="5842041f4e65fad6a7708cfd"spotforecasts=pysurfline.get_spot_forecasts(spotId,days=2,intervalHours=3,)df=spotforecasts.get_dataframe()Visualize the surf report for a givenSpotId.Go to full example.importpysurflinespotId="5842041f4e65fad6a7708cfd"spotforecasts=pysurfline.get_spot_forecasts(spotId)pysurfline.plot_surf_report(spotforecasts,barLabels=True,)DocumentationThe documentation can be foundhere.DisclaimerThis package isnot officialandnot affiliated with Surfline in any way.API responses may change at any timeand the developement of this package may not be able to keep up with those changes.If you find any issues,please open an issueor submit apull request.
Package: pysurprisal
SurprisalAn implementation of surprisal in Python.InstallationpipinstallsurprisalUsagefrompysurprisalimportSurprisaltext="..."# calculate surprisal for each word in the textdata=Surprisal(text)surprisals=data.calculate_surprisals()# get the top 10 most surprising wordstop_k=data.get_top_k(10)# print dictionary of all surprisals# key = word, value = surprisalprint(surprisals.surprisals)ContributorscapjamesgLicenseThis project is licensed under anMIT license.
Package: pysurreal
pysurrealCommunity-created Python connector and ORM for SurrealDB.InstallationRaw Python:python3-mpipinstallpysurrealPoetry:poetryaddpysurrealBasic UsagefromasyncioimportrunfrompysurrealimportClientasyncdefmain()->None:asyncwithClient("http://localhost:8000","namespace","database","root","root")asclient:result=awaitclient.raw_query("""CREATE example:123 SETname = 'example',list = ['a', 'b', 'c'];""")ifresult.errorisnotNone:print(result.error.information)returnprint(result.response)run(main())LicenseThis project is licensed under the MIT License. See theLICENSEfile for more information.ContributingThank you for your interest in contributing to pysurreal! Please see theContributing Guidelinesfor more information about contributing.
Package: pysurrealdb
PySurrealDBAn unofficial library to connect to SurrealDB.Minimal dependencies, easy to use.Getting StartedIf you don't already have it, installSurrealDBLinux:$curl-sSfhttps://install.surrealdb.com|sh# then$surrealstart--usertest--passtestInstall PySurrealDBpip install pysurrealdbExamplesimportpysurrealdbassurrealconn=surreal.connect(user='test',password='test')conn.create('person',{'name':'Mike'})conn.query('select * from person')You can specify additional connection info either in the connect call, or in a config file.importpysurrealdbassurrealconn=surreal.connect(host='surreal.com',port=8000,user='user',password='pass',database='db',namespace='ns')Both http and websocket are supported. Specify which to use with the client keyword.conn=surreal.connect(client='websocket')# Websocket was added and made the default as of version 0.3. Try http if you run into issues, and please report any bugs you find!Optional Config file:# use a configured connection.conn=surreal.connection('default')# Requires pysurrealdb.json file. Place it in your root directory, or specify the file location with the env variable 'PYSURREALDB_CONFIG'.Examplepysurrealdb.json:{"connections":{"default":{"host":"localhost","port":8000,"user":"test","password":"test""database":"test","namespace":"test","client":"http",}}}# when using a config file, you do not even need to connect, you can access most functions directly:importpysurrealdbassurrealsurreal.query('select * from test')# uses the last connection from connect() or the default connection if connect() has not been called.Query BuilderYou can write queries using Laravel and Orator style syntax:importpysurrealdbassurrealconn=surreal.connection()# setup dataconn.drop('person')conn.insert('person',[{'name':'Mike','age':31},{'name':'Mr P'}])# query builder examplesfirst_person=conn.table('person').where('name','Mike').first()adults=conn.table('person').where('age','>=',18).order_by('age','desc').limit(10).get()MethodsSome of the basic methods available:query(sql)get(table,id='')insert(table,data)create(table,data)update(table,data)upsert(table,data)delete(table,id)drop(table)relate(noun,verb,noun2,data={})# Most methods accept a table or table:id as the main arguement. The data is also checked for an ID when relevant.This project is a work in progress. Questions and feedback are welcome! Please create an issue or use the gitter chat link at the top. Thanks!