Saravanan666/pypi-org huggingface dataset:
Package: pynullpkg
python-test-packageA package to be used for testing pip and package management.IntroductionThis package provides a simple module that can be easily installed and uninstalled.UsageInstallpip install pynullpkgpip install --user pynullpkgImport>>> import pynullpkgpython -c 'import pynullpkg'Uninstallpip uninstall pynullpkg
Package: pynumaflow
Python SDK for NumaflowThis SDK provides the interface for writingUDFsandUDSinksin Python.InstallationInstall the package using pip.pipinstallpynumaflowBuild locallyThis project usesPoetryfor dependency management and packaging.
To build the package locally, run the following command from the root of the project.makesetupTo run unit tests:maketestTo format code style using black and ruff:makelintSetuppre-commithooks:pre-commitinstallImplement a User Defined Function (UDF)Mapfrompynumaflow.mapperimportMessages,Message,Datum,Mapperdefmy_handler(keys:list[str],datum:Datum)->Messages:val=datum.value_=datum.event_time_=datum.watermarkreturnMessages(Message(value=val,keys=keys))if__name__=="__main__":grpc_server=Mapper(handler=my_handler)grpc_server.start()SourceTransformer - Map with event time assignment capabilityIn addition to the regular Map function, SourceTransformer supports assigning a new event time to the message.
SourceTransformer is only supported at source vertex to enable (a) early data filtering and (b) watermark assignment by extracting new event time from the message payload.fromdatetimeimportdatetimefrompynumaflow.sourcetransformerimportMessages,Message,Datum,SourceTransformerdeftransform_handler(keys:list[str],datum:Datum)->Messages:val=datum.valuenew_event_time=datetime.now()_=datum.watermarkmessage_t_s=Messages(Message(val,event_time=new_event_time,keys=keys))returnmessage_t_sif__name__=="__main__":grpc_server=SourceTransformer(handler=transform_handler)grpc_server.start()ReduceimportaiorunfromtypingimportIterator,Listfrompynumaflow.reducerimportMessages,Message,Datum,Metadata,AsyncReducerasyncdefmy_handler(keys:List[str],datums:Iterator[Datum],md:Metadata)->Messages:interval_window=md.interval_windowcounter=0asyncfor_indatums:counter+=1msg=(f"counter:{counter}interval_window_start:{interval_window.start}"f"interval_window_end:{interval_window.end}")returnMessages(Message(str.encode(msg),keys))if__name__=="__main__":grpc_server=AsyncReducer(handler=my_handler)aiorun.run(grpc_server.start())Sample ImageA sample UDFDockerfileis provided
underexamples.Implement a User Defined Sink (UDSink)fromtypingimportIteratorfrompynumaflow.sinkerimportDatum,Responses,Response,Sinkerdefmy_handler(datums:Iterator[Datum])->Responses:responses=Responses()formsgindatums:print("User Defined Sink",msg.value.decode("utf-8"))responses.append(Response.as_success(msg.id))returnresponsesif__name__=="__main__":grpc_server=Sinker(my_handler)grpc_server.start()Sample ImageA sample UDSinkDockerfileis provided
underexamples.
Package: pynumato
PynumatoPynumato allows to control relay modules (ON or OFF states).
This module is only compatible with the Numato series1-2-4-8 Channels USB Solid State Relay Module, listed in the following link :<https://numato.com/?s=Channel+USB+Solid+State+Relay+Module>.RequirementThe module requires the minimum configuration :Windows7 64-bitsLinux 64-bitsPython3.7How to use itThe command line to drive relays are :python3 -m pynumato.pynumato --cmd=<string to drive relays> --relays=<Number of relays> --port=<port> --baudrate=<baudrate>Parameters are :the number of relays to drive (default is 1)the port (default is /dev/ttyUSB1)the baudrate (default is 921600)the command to drive relaysA relay can receive two types of orders (OFF or ON). The order in the module is encoding by an ASCII character such as :"c": close the relay (OFF state)"o": open the relay (ON state)"x": do not change the current state of the relayIn an example, if we have :4 available relays : 0, 1, 2 and 3baudrate is 921600port is COM27To turn on all relays, string command isooooand the command line is :python3 -m pynumato.pynumato --cmd="oooo" --relays=2 --port="COM27" --baudrate=921600To turn off all relays, string command isccccand the command line is :python3 -m pynumato.pynumato --cmd="cccc" --relays=2 --port="COM27" --baudrate=921600To turn on the relay 0, and it does not matter about other ones, string command isoxxxand the command line is :python3 -m pynumato.pynumato --cmd="oxxx" --relays=2 --port="COM27" --baudrate=921600To turn on the relays 1 and 3, and it does not matter about other ones, string command isxoxoand the command line is :python3 -m pynumato.pynumato --cmd="xoxo" --relays=2 --port="COM27" --baudrate=921600
Package: pynumbat
PyNumbatPyNumbatis a Python project generator. Easy to install and easy to use.Files and folders to be created in the initial setup:root/
│
├── env/
├── app/
│   ├── config.py
│   ├── __init__.py
│   ├── __main__.py
│
├── tests/
│   ├── test.py
│
├── README.md
├── .gitignore
├── requirements.txt
└── main.pyCommandsWith a couple flags you can create a basic and functional setup for your python projects.The first flag, and the most important, is -p. With this flag is possible define where the project will be created.pynumbat-p<Path>If the flag is not defined, the project will be created in te current path.If a previous python setup exists, you can overwrite it. This action will delete all files and folders previously existing.pynumbat-p<Path>-ftrueOptional, you can ommit the virtual env folder.pynumbat-p<Path>-ftrue-vfalseNote: by defaultPynumbattakes the current version of Python to create the virtual environment.In the next release you can select the version you want.
Package: pynumeral
# Pynumeral![](https://img.shields.io/badge/python-3.6-brightgreen.svg) ![](https://img.shields.io/badge/python-3.7-brightgreen.svg) ![](https://img.shields.io/badge/code%20style-black-000000.svg) [![Build Status](https://travis-ci.org/optimdata/pynumeral.svg?branch=master)](https://travis-ci.org/optimdata/pynumeral)pynumeralis a python implementation of number formatting using [numeraljs format](http://numeraljs.com/#format). This project was motivated when we had to render numbers backend-side (which is written in python) while keep using formats defined by users. It has been coded regardless of the javascript implementation. It has been tested on a fairly large amount of formats but there are not any guarantees that it covers all the cases. Since unit testing is pretty simple, contributions are more than welcome.It only provides a simple apipynumeral.format(value, format).License: [MIT license](https://github.com/optimdata/pynumeral/blob/master/LICENSE)Source:https://github.com/optimdata/pynumeralIssues:https://github.com/optimdata/pynumeral/issues## History### 0.1.0 (2019-11-15)First release on PyPI.
Package: pynumeric
Overviewpynumeric is a Python package to readMSC Radar Numeric
data.InstallationThe easiest way to install pynumeric is via the Pythonpiputility:pipinstallpynumericRequirementsPython 3. Works with Python 2.7virtualenvDependenciesDependencies are listed inrequirements.txt.
Dependencies are automatically installed during pynumeric installation.Installing pynumeric# setup virtualenvvirtualenv--system-site-packages-ppython3pynumericcdpynumericsourcebin/activate# clone codebase and installgitclonehttps://github.com/ECCC-MSC/pynumeric.gitcdpynumericpythonsetup.pybuildpythonsetup.pyinstallRunning# helppynumeric--help# get pynumeric versionpynumeric--version# get pynumeric GDAL versionpynumeric--gdal-version# report on a single numeric filepynumericreport-f</path/to/numeric_file># add verbose mode (ERROR, WARNING, INFO, DEBUG)pynumericreport-f</path/to/numeric_file>--verbosity=DEBUG# export a numeric file to GeoTIFFpynumericexport-f</path/to/numeric_file>-ofoo.tif-ofGTiff# export a numeric file to NetCDFpynumericexport-f</path/to/numeric_file>-ofoo.tif-ofNetCDFUsing the APIfrompynumericimportNumeric# read Numeric datawithopen('/path/to/file')asff:n=Numeric(ff)forkey,valueinn.metadata:print(key,value)print(n.metadata)print(n.data)print(len(n.data))# get the spatial extentprint(n.get_spatial_extent())# get the data extentprint(n.get_data_extent())# read Numeric data using convenience functions# parse files=load('/path/to/numeric_file.dat')# returns Numeric object# parse data stringwithopen('/path/to/numeric_file.dat')asff:numeric_string=ff.read()s=loads(numeric_string)# returns Numeric object# export to GeoTIFF# Supported are any of the supported GDAL# Raster Format Codes (http://www.gdal.org/formats_list.html)s.to_grid('myfile.tif','GTiff')# creates myfile.tif on diskDevelopmentpipinstallrequirements-dev.txtRunning Tests# install dev requirementspipinstall-rrequirements-dev.txt# run tests like this:pythonpynumeric/tests/run_tests.py# or this:pythonsetup.pytest# measure code coverage like thiscoveragerun--source=pynumeric-munittestpynumeric.tests.run_testscoveragereport-m# or this:pythonsetup.pycoverageReleasingpythonsetup.pysdistbdist_wheel--universaltwineuploaddist/*Code ConventionsPEP8Checking Code for PEP8find.-typef-name"*.py"|xargsflake8Bugs and IssuesAll bugs, enhancements and issues are managed onGitHub.ContactTom Kralidis
Package: pynuoadmin
ContentsRequirementsInstallationExampleResourcesLicenseThis package enables the nuoadmin client management of a NuoDB database
without the need to install the full NuoDB product distribution on a
client machine.RequirementsPython – one of the following:CPython>= 3.6 or == 2.7NuoDB – one of the following:NuoDB>= 4.0If you haven’t done so already, and plan to use pynuoadmin with the NuoDB
Community Edition, visitDownload and Install NuoDB.InstallationThe last stable release is available on PyPI and can be installed withpip:$ pip install 'pynuoadmin[completion]'
$ eval "$(register-python-argcomplete nuocmd)"We recommend installing using the “completion” module, to enable command
line argument completion.Alternatively (e.g. ifpipis not available), a tarball can bedownloaded from PyPIand
installed with setuptools:$ tar xzf pynuoadmin-*.tar.gz
$ cd nuodb-pynuoadmin*
$ python setup.py installThe tar file and folder nuodb-pynuoadmin* can be safely removed after
installation.ExampleRun the following command to confirm the pynuoadmin package is installed
properly:$ nuocmd show domainResourcesNuoDB Documentation:https://doc.nuodb.com/LicensePynuoadmin is licensed under aBSD 3-Clause License.
Package: pynuodb
ContentsRequirementsInstallationExampleResourcesLicenseThis package contains the community driven pure-PythonNuoDBclient library
that provides a standardPEP 249SQL API. This is a community driven driver
with limited support and testing from NuoDB.RequirementsPython – one of the following:CPython>= 2.7NuoDB – one of the following:NuoDB>= 2.0.4If you don’t have a NuoDB domain available you can create one using the Docker
image on DockerHub.  SeeQuick Start Guides / Docker.InstallationThe current stable release is available on PyPI and can be installed withpip:$ pip install pynuodbAlternatively (e.g. ifpipis not available), a tarball can be downloaded
from GitHub and installed with Setuptools:$ curl -L https://github.com/nuodb/nuodb-python/archive/master.tar.gz | tar xz
$ cd nuodb-python*
$ python setup.py install
# The folder nuodb-python* can be safely removed now.ExampleHere is an example using thePEP 249API that creates some tables, inserts
some data, runs a query, and cleans up after itself:importpynuodboptions={"schema":"test"}connect_kw_args={'database':"test",'host':"localhost",'user':"dba",'password':"dba",'options':options}connection=pynuodb.connect(**connect_kw_args)cursor=connection.cursor()try:stmt_drop="DROP TABLE IF EXISTS names"cursor.execute(stmt_drop)stmt_create="""
    CREATE TABLE names (
        id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
        name VARCHAR(30) DEFAULT '' NOT NULL,
        age INTEGER DEFAULT 0
    )"""cursor.execute(stmt_create)names=(('Greg',17,),('Marsha',16,),('Jan',14,))stmt_insert="INSERT INTO names (name, age) VALUES (?, ?)"cursor.executemany(stmt_insert,names)connection.commit()age_limit=15stmt_select="SELECT id, name FROM names where age > ? ORDER BY id"cursor.execute(stmt_select,(age_limit,))print("Results:")forrowincursor.fetchall():print("%d|%s"%(row[0],row[1]))finally:cursor.execute(stmt_drop)cursor.close()connection.close()For further information on getting started with NuoDB, please refer to theDocumentation.ResourcesDB-API 2.0:https://www.python.org/dev/peps/pep-0249/NuoDB Documentation:https://doc.nuodb.com/nuodb/latest/introduction-to-nuodb/LicensePyNuoDB is licensed under aBSD 3-Clause License.
Package: pynuodbmonitor
[NuoDB](http://www.nuodb.com) Monitoring Tools===========* Verified to work on CentOS 6.4 and Ubuntu 12.04These tools require you have the NuoDB REST API (also known as the nuoautoconsole) running in your domain and accessible from your host.To start the nuoautoconsole on Linux:* Edit the configuration file at /opt/nuodb/etc/nuodb-rest-api.yml* Ensure that the username and password are correct for your domain and that the "broker" entry is pointed to a broker in your domain* Start the API by issuing `service nuoautoconsole start` as the superuserUnless changed in the configuration file the API will attempt to listen on port 8888 of all addresses on the machine.For tool usage information:`nuotop -h``nuomonitor -h`
Package: pynurex
NurexNuclear Reaction Cross Section calculator.
Nurex is a library for Glauber Model nuclear reaction caclulation. The library is written in C++ and Python binding are available.InstallationGet the copy and type:> mkdir build
> cd build
> cmake ../
> makecmake optionscompile options, enable or disable with cmake:cmake ../ -D[OPTION]available options:THREADS - enable/disable multi-threading support, default ONPYTHON_MODULE - enable/disable building of the python bindigs, pybind11 library required to build the module, default OFFTESTS - build tests, default OFFEXAMPLES - build examples, default OFFAPPS - build nurex applications, ie command line nurex appGSL_INTEGRATION - use adaptive integration from the gsl library instead of built in, default OFFGSL_INTERPOLATION - use spline interpolation from the gsl library, default OFFie:cmake -DTHREADS=OFF -DPYTHON_NUREX=ON -DEXAMPLES=ON ../after the compilation the libraries and headers must be either installed system-wide by make install.
(The default install path can be change, ie: cmake -DCMAKE_INSTALL_PREFIX=/opt/nurex)Or alternatively the library can be installed in any directory and variables PATH, LD_LIBRARY_PATH and later include directories must be set accordingly.
This can be done sourcing the init.sh file, which is generated in the build directory:source init.shTutorialTutorialHow ToHow to
Package: pynuspell
About PyNuspellPyNuspellis a set of Python 3.x bindings for Nuspell spellchecking C++
library.About NuspellNuspell is a fast and safe spelling checker software program. It is designed
for languages with rich morphology and complex word compounding.
Nuspell is written in modern C++ and it supports Hunspell dictionaries.Main features of Nuspell spelling checker:Provides software library and command-line tool.Suggests high-quality spelling corrections.Backward compatibility with Hunspell dictionary file format.Up to 3 times faster than Hunspell.Full Unicode support backed by ICU.Twofold affix stripping (for agglutinative languages, like Azeri,
Basque, Estonian, Finnish, Hungarian, Turkish, etc.).Supports complex compounds (for example, Hungarian, German and Dutch).Supports advanced features, for example: special casing rules
(Turkish dotted i or German sharp s), conditional affixes, circumfixes,
fogemorphemes, forbidden words, pseudoroots and homonyms.Free and open source software. Licensed under GNU LGPL v3 or later.See more details athttps://nuspell.github.io/andhttps://github.com/nuspell/nuspellInstalling using pipYou can install this package using pip:pip install pynuspellTo download dictionaries, please refer tohttps://github.com/nuspell/nuspell/wiki/Dictionaries-and-ContactsInstalling from sourceRequirements:Python 3.6 or laterGitC++ compiler with cmakeOpen a terminal and run the following commands:# Clone repository
git clone --recurse-submodules https://github.com/scherzocrk/pynuspell.git
cd pynuspell

# Install vcpkg (Windows)
.\extern\vcpkg\bootstrap-vcpkg.bat
set VCPKG_ROOT=.\extern\vcpkg

# Install vcpkg (Linux/MacOS)
.\extern\vcpkg\bootstrap-vcpkg.sh
export VCPKG_ROOT=.\extern\vcpkg

# Install nuspell
.\extern\vcpkg\vcpkg install nuspell

# Build and install pynuspell
python setup.py install

# You can generate stub files for IntelliSense using:
pip install pybind11-stubgen
pybind11-stubgen --no-setup-py pynuspell

# You can run somes tests using:
pip install pytest
pytest tests/tests.pyUsage>>>importpynuspell>>>nuspell_dict=pynuspell.load_from_path('en-US')# path to where en_US.aff and en_US.dic are found>>>nuspell_dict.spell('spookie')False>>>nuspell_dict.suggest('spookie')['spookier','spook']>>>nuspell_dict.spell('spookier')TrueNext StepsAdd more bindings to existing featuresKeep up to date with new releases of NuspellAnyone is more than welcome to contribute to this packageContact information:Author: Renan SantosE-mail:renan.engmec@gmail.comAcknowledgmentsSpecial thanks to Nuspell and PyBind11 developersLicensePyNuspell is licensed under the LGPL version 3 or later, see LICENSE for more
information.
Package: pynut3
(DEPRECATED) pynut3(aka python-nut3)This is a Python3 library to allow communication with NUT (Network UPS Tools) Uninterruptible Power Supply servers followingRFC-9271Note: This is an unofficial project, and is in no way supported or endorsed by theNetwork UPS Tools developers.RequirementsDevelopment of this package is done in Python 3.11. The package is considered forwards compatible probably upto Python 3.12 and possibly also beyond. Backwards compatibility is not guaranteed on versions prior to 3.9; if it works on Python 3.8 or before consider yourself lucky.Python versions that are end-of-lifeare not supported.InstallationOn Linux systemspynut3requires telnet to be installed. If it is not available on your system you'll need to install it first.sudoaptinstalltelnetOn macOStelnetis not needed;ncwill be used automatically.
Then install using:python-mpipinstallpynut3This software was not tested on systems other than Linux (Debian) and macOS. If you have access to another OS, feel free to contribute improvements for support.UsageSeedemo/upsdemo.pyfor a usage example.Please note that this module has completely and intentionally broken backwards compatibility with (previous) versions of pynut3.AcknowledgementsBased on various NUT Client related Python scripts, written by David Goncalves
asPyNUT, and released under GPL v3.
Later overhauled by rshipp with Python3 modifications by hordurk, george2 and mezz64.
Others will have contributed along the way. I was not able to reliably find their names.Further updates are by me (Mausy5043) and based/inspired on prior work from timurlenk07, StSAV012, rshipp & Rojer-X86.LicenseThe GPL v3 license continues to apply. SeeLICENSE.
Package: pynut-API
py2nut - Laurent TupinIt provides various functions to simplify the users life.InstallationYou can install the package fromPyPI:python -m pip install pynut-APIThe package is supported on Python 3.7 and above.How to useYou can call a function as this example:$ ----------------------------------------------------
>>> from pyNutApi import nutDate
>>> nutDate.today()This is the libraries I am using with the package$ ----------------------------------------------------
>>> beautifulsoup4==4.7.1
>>> pandas==1.1.3
>>> selenium==3.141.0To use nutApi / Selenium Functionnalities:#----------------------------------------------------
# To use Chrome Driver
#  Go to chromedriver.chromium.org || https://sites.google.com/a/chromium.org/chromedriver/downloads
#  Chose an older version (like the 92 as of August 2021)
#  download and UnZip the folder
#  Move it to Users/local/bin
#   or C:\ProgramData\Anaconda3\Library\bin (Windows)
#   or ...\AppData\Local\Programs\Python\Python39
#----------------------------------------------------DocumentationTemporary documentation for nutApi :from pyNutApi import nutApi as Api
    
1. Class

inst_getAPI = Api.C_API_simple( (str_uid, str_pwd) )
inst_getAPI.api_connect_json( url )
inst_getAPI.api_returnDataFrame( l_url_keyword = ['data', 'price'] )
df_data = inst_getAPI.df_return
""" The class inherit from C_API 
        allows the user to read an URL and get back a dataframe from JSON format
    Is decorated to be a singleton"""END
Package: pynut-DB
pynut - Laurent TupinIt provides various functions to simplify the users life.InstallationYou can install the package fromPyPI:python -m pip install pynut-DBThe package is supported on Python 3.7 and above.How to useYou can call a function as this example:$ ----------------------------------------------------
>>> from pyNutTools import nutDate
>>> nutDate.today()This is the libraries I am using with the package$ ----------------------------------------------------
>>> pyodbc==4.0.32DocumentationTemporary documentation for nutDb :from pyNutDB import nutDb as db

1. Lite Db

db_lite = db.c_db_lite(r'\db_param.db')
db_lite.connect()
df_UID = db_lite.getDataframe("SELECT * FROM tbl_Table")
db_lite.closeConnection()
""" This class allows you to manage simple lite database"""

2. SQL Server (pyodbc)

dbServer =  db.c_db_withLog()
# df_UID will be a dataframe of connexion: Server, Database, UID, Password
dbServer.dataframeCredentials(df_UID)

# Request with a dataframe as a return
db.db_SelectReq("SELECT top 10 * FROM tbl_Table")
print(dbServer.df_result)

# OR EXEC a stored procedure    
db.db_EXEC('EXEC Stored_Procedure')END
Package: pynut-Email
pynut - Laurent TupinIt provides various functions to simplify the users life.InstallationYou can install the package fromPyPI:python -m pip install pynut-EmailThe package is supported on Python 3.7 and above.How to useYou can call a function as this example:$ ----------------------------------------------------
>>> from pyNutTools import nutDate
>>> nutDate.today()This is the libraries I am using with the package$ ----------------------------------------------------
>>> exchangelib==4.7.2DocumentationTemporary documentation for nutEmail :DESIGN PATTERN: BUILDER for OUTLOOK / EXCHANGELIB
Allow you to manage all relating to Emails with few lines of code

from pyNut import nutEmail as email

1. Send an email with OUTLOOK

o_builder_emailSend =   email.c_Outlook_send(**dic_param)
o_otlk_Director =       email.c_otlk_Director(o_builder_emailSend)
o_otlk_Director.SendMail()
bl_success = o_otlk_Director._builder.bl_success
    OR
bl_success = email.fBl_SendMail_desPatt(**dic_param)

WHERE 

dic_param = dict(bl_draft = True, l_pathAttach=['path1_fileToEnclose'], str_message = 'Hello',
                 str_from='', str_to='', str_cc='', str_bcc='',str_subject='Subject')    

2. Download files from Received Email on Outlook

o_builder_emailDwld =   email.c_Outlook_dwld(**dic_param)
inst_Director =    email.c_otlk_Director(o_builder_emailDwld)
inst_Director.Download_fMail()

WHERE 

dic_param = dict(str_outAcctName = 'laurent@gmail.com', str_inbox = 'Inbox', l_folders = [],
                 str_subject = 'Sujet', str_to = '', str_cc = '', str_folder = 'PathForSaveFile',
                 str_File_startW = 'file_', str_File_endW = '_01.csv')

3. Download files from Received Email with Excahngelib (not on Outlook)

o_builder_emailDwld = 	email.c_Webmail_dwld(**dic_param)
inst_Director =  	    email.c_otlk_Director(o_builder_emailDwld)
inst_Director.Download_fMail()

WHERE 

dic_param = dict(str_outAcctName = 'laurent@gmail.com', str_pwd = '*****', str_inbox = 'Inbox', l_folders = [],
                 str_subject = 'Sujet', str_to = '', str_cc = '', str_folder = 'PathForSaveFile',
                 str_File_startW = 'file_', str_File_endW = '_01.csv')END