Saravanan666/pypi-org huggingface dataset:
Package: computer-vision
Welcome to Computer Vision Pip Package DocsFor full documentation visitmkdocs.org.Modules'loadImage'as_bgr()# Loads Imge as CV2 BGR format (numpy array as of OpenCV 4)as_rgb()# Loads Image as RGB format using pillow'loadVideo'fromCamera# Loads from camera from an external sourcefromVideo# Loads from a video path into the camerafromPiCamera# Loads the video source from Pi CameraProject layoutsrc/
    loadImage.py    # Contains modules for Loading Images in differnet formats
    loadVideo.py    # Contains modules for Loading Video using different sources
    utils.py        # Contains modules for off the hand utilities such as Euclidean Distance, etc.
    networkRequests.py  # Contains modules for handling network requests such as GET, POST

mkdocs.yml    # The configuration file.
docs/
    .. index.md  # The documentation homepage.
Package: compute-service
Compute ServiceThis is a Python library to create Compute Service with REST API and task queue.UsageTo create new compute service one need to:Import packagesfrom pydantic import BaseModel
from compute_service import ComputeServiceCreate service object with selected queue type:service = ComputeService(queue='kafka')kafkaandlocalqueue types are supported.Define model for input parameters and app factory:class UserBase(BaseModel):
    title: str
    value: int

def create_app():
    return service.create_app(UserBase)Define task processing callback and task handler:def process(data):
    print(f'Got data: {data}')
    return {'ok': 'success'}

if __name__ == '__main__':
    handler = service.create_handler(process)
    handler.start()Start REST API:uvicorn 'my_service:create_app'Start task handler:python my_service.py
Package: computex-cli
cxThe ComputeX Python CLI lets you interact with ComputeX REST APIs and push images for your models to the ComputeX container registry.InstallationRequirementsPython >= 3.8Runpip install cx.Command Line InterfaceAt any time, you can utilize the--helpflag with any command or subcommand:$cx--help
Usage:cx[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:login...Logging In$cxlogin--username{username}--password{password}Building an ImageWIPPushing an ImageWIPDevelopmentTo test locally, run the following:$sourcesetup_env.sh
$python-mcxcli.cliPublishing to PyPIThe process for publishing to PyPI works as follows:Pull down themainbranch.Tag it with the current version as specified inpyproject.toml.Push that tag to the repo, which...Triggers a GitHub Action workflow (pypi.yml) that pushes it to PyPI.This can all be done simply by running the followingmakecommand:makepypi-publishAssuming you have the ability to push a tag to the repo, you'll be able to publish to PyPI.WARNING:if you do not specify a new version inpyproject.toml, the GHA workflow will fail due to an existing package being on PyPI.
Package: computing-toolbox
Computing Toolbox for PythonThis is a library aiming to help programmers to sort every day tasks easily.
This library contains:gcpsecret-manager utils to access secret valuesgcp-storage utils to check if a file exists in Google Cloud or get a list of files in a bucketjsonl class able to read and write json line file very quicklyhttp-request class able to get html files easilyasync-http-request class able to get multiple files easilyutilsdeep_get function able to get dynamically values from a dictionarysplit function able to split a given interval of size n in m partsInstallationpip install computing-toolboxUsagefromcomputing_toolbox.jsonlimportJsonl#read whole filedata0=[xforxinJsonl("/path/to/file")]#alternative to readdata1=list(Jsonl("/path/to/file"))#read 100 rows after row 20data2=[xforxinJsonl("/path/to/file",offset=20,limit=100)]#write objectsdata3=[{"name":"Newton"},{"name":"Galileo"}]Jsonl("/path/to/file","w").write(data3)If the file is located in the cloud,
you only need to configure your environmentJsonlclass will handle it for aws, gcp, etc.Jsonlcan handle.zipor.gzfiles automatically
you only need to specify the right extension in the pathInstall CLI toolspip install .AuthorPedro Mayorga.
Package: computype
This library allows you to do things like: make it look like your computer is typing(ctype), backspace text(backspace), clear the screen(clear), and wait for the user to press enter(pressenter).ctypeTo use ctype, do ctype(text, speed). Replace text with what you want to type and speed with the amount of time between each letter.backspaceBackspace works the same as ctype. backspace(text, speed).pressenterAll you have to do is type pressenter(). It waits for you to press enter!clearJust type clear() to clear the screen. Works on any system that's NT (Windows, DOS) or UNIX (macOS, Linux, Solaris, and almost every other OS) compatible.
Package: comp-validator
BIDS-validator for computational data (BEP034)This is a package for validating computational data conversion, specifically designed usingBEP034 proposal.The package was specifically designed forsim2bids app, however, you can check your own computational conversions as well.The project is very fresh and under active development. However, you can already get most of the checks.InstallationSimply run the following command to get the app up and running:pip install comp_validatorYou can either find a notebook with instructions to run the app or follow the lines below:importcomp_validatorfromcomp_validatorimportcomp_validatorcomp_validator.validate(PATH)You should specify the path to thealready convertedsimulation results. This folder should already have a BIDS structure.If you don't have the structure yet, we strongly suggest givingsim2bidsa try.IssuesSince the app is still fresh, we expect seeing some checks missing. If you do find them, please open a new issue or send an email to this address:dinarissaa@gmail.com
Package: compy
Compy: The CoMPASS Python CompanionIntroductionCompy is a Python package for easily accessing and analyzing data acquired using CAEN Multi-PArameter Spectroscopy Software (CoMPASS). Compy takes as input the CoMPASS directories where experimental data is stored and processes the settings, spectra, and data files, storing them in a CompassRun object. Compy currently can only process data saved as either .csv or .bin files. Compy enables user filtering of data by energy and/or PSD cut and easy plotting of un/filtered energy/TOF/PSD spectra.ScriptsIncluded with the compy package are several scripts for commonly desired processes, such as plotting CoMPASS spectra, manually calculating TOF from signal and reference channels, and enabling user cuts.compy-runThe compy-run script provides a quick way of reading in CoMPASS data, merging related runs, plotting spectra, and saving the CoMPASS data to a pickle file for easy access later in Python.
Package: compyc
Project descriptioncompyc is a tool for compiling Python projects into pyc binary packages.What can be done?Compile the specified project separately.Bulk compiles all projects in the specified directory.InstallingInstall and update usingpip:$ pip install compycClick supports Python 3.6 and newer.A Simple ExampleWhat does it look like? Here is an example of a simple compyc program:packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
└── tests/The projects path:/User/username/Documents/python_projects/packaging_tutorial_1
/User/username/Documents/python_projects/packageing_tutorial_2$cd/User/username/Documents/python_projects# Compile the specified project separately.$compyc-ppackaging_tutorial_1-v0.1.0
$ls
packaging_tutorial_1packaging_tutorial_1-0.1.0packaging_tutorial_2# Bulk compiles all projects in the specified directory.$compyc-v0.1.0# or$compyc-p/User/username/Documents/python_projects/-v0.1.0
$ls
packaging_tutorial_1packaging_tutorial_1-0.1.0packaging_tutorial_2packaging_tutorial_2-0.1.0A description of the parameter -p:-p is followed by a path valueWhen the path value ends with "/", the program treats the path as a directory, and each folder in the directory is treated as a separate project, and subsequent actions are iteratively compiled for each project in the directory.When the path ends without a "/", the specified path is treated as a stand-alone project.When the -p parameter is omitted, the default path value is ".", which is the current directory, and all projects under the current project are iteratively compiled.LinksProject URL:Click | The Pallets Projects
Package: compyle
Compyle allows users to execute a restricted subset of Python (almost similar
to C) on a variety of HPC platforms. Currently we support multi-core CPU
execution using Cython, and for GPU devices we use OpenCL or CUDA.Users start with code implemented in a very restricted Python syntax, this code
is then automatically transpiled, compiled and executed to run on either one CPU
core, or multiple CPU cores (viaOpenMP) or on a GPU. Compyle offers
source-to-source transpilation, making it a very convenient tool for writing HPC
libraries.Some simple yet powerful parallel utilities are provided which can allow you
to solve a remarkably large number of interesting HPC problems. Compyle also
features JIT transpilation making it easy to use.Documentation and learning material is also available in the form of:Documentation at:https://compyle.readthedocs.ioAn introduction to compyle in the context of writing a parallel molecular
dynamics simulator is in ourSciPy 2020 paper.Compyle poster presentationYou may also try Compyle online for free on aGoogle Colab notebook.While Compyle seems simple it is not a toy and is used heavily by thePySPHproject where Compyle has its origins.InstallationCompyle is itself largely pure Python but depends onnumpyand requires
eitherCythonorPyOpenCLorPyCUDAalong with the respective backends of a
C/C++ compiler, OpenCL and CUDA. If you are only going to execute code on a
CPU then all you need is Cython.You should be able to install Compyle by doing:$ pip install compyleA simple exampleHere is a very simple example:from compyle.api import Elementwise, annotate, wrap, get_config
import numpy as np

@annotate
def axpb(i, x, y, a, b):
    y[i] = a*sin(x[i]) + b

x = np.linspace(0, 1, 10000)
y = np.zeros_like(x)
a, b = 2.0, 3.0

backend = 'cython'
get_config().use_openmp = True
x, y = wrap(x, y, backend=backend)
e = Elementwise(axpb, backend=backend)
e(x, y, a, b)This will execute the elementwise operation in parallel using OpenMP with
Cython. The code is auto-generated, compiled and called for you transparently.
The first time this runs, it will take a bit of time to compile everything but
the next time, this is cached and will run much faster.If you just change thebackend = 'opencl', the same exact code will be
executed usingPyOpenCLand if you change the backend to'cuda', it will
execute via CUDA without any other changes to your code. This is obviously a
very trivial example, there are more complex examples available as well.ExamplesSome simple examples and benchmarks are available in theexamplesdirectory.You may also run these examples on theGoogle Colab notebook
Package: compysitions
CompysitionsProject OverviewPythondataclassesare used to represent data in a python object.
They support decoding some data to dict out of the box, but do not handle all types neatly nor support loading to an instance from dict.
This project provides an extensible class that will allow you to define objects the way you would in a dataclass,
but provides additional encoding and decoding support to represent these objects as data for i/o and storage purposes.Usage ExamplesThe below will show how Compysitions handles support for increasingly complex data describing transactions in a store.Built-in typesclassTransaction(Compysition):buyer_name:str=Noneitem_name:str=Noneprice:float=0.00transaction_data={"buyer_name":"John Smith","item_name":"Floral Shirt","price":20.99}transaction_obj=Transaction().from_dict(transaction_data)Setting up the development environmentThe following steps will set up linting on commit and the ability to run tests.Clone repositoryCreate a virtual environment for developmentpip install -r dev_requirements.txtpre-commit install
Package: compyss
compyssA tool built for analysing skylight polarization patterns. It aims to provide
heading information from skylight angle of polarization images.Design philosophycompyss is designed to be as flexible as possible. It's flexibility allows it to
support multiple cameras and decode methods. Once you write a decoder, it should
be available for all supported cameras. See the wiki for more information.AuthorThis package was written in conjuction with a study atQueen's
Universityat Kingston. If you use this code, please cite
our work. We have not published yet, but when we do I will link the citation
here.FeaturesLoad LI image from camera or file.Generate Stokes vector, AoLP, and DoLP from LI image.Display image information in figure.Read angle to solar meridian from AoLP image.Camera SDK supportLucid Vision Labs, Arena SDKUsageExamples are provided in the source. The general flow isimport compyss.core
from compyss.sources.file import FileSource

# create a new compass object
cmps = compyss.core.Compass(source=FileSource("path/to/file.png")
image = cmps.source.get().instrument_to_local()

image.show()Initial setuppython -m pip install compyssDependenciesGeneral dependencies are listed in the requirements.txt file and can be installed usingpython -m pip install -r requirements.txtor something similar.Camera sources require specific dependencies that do not apply globally. Using the available camera sources requires installing their interface.
For example, LUCID Vision cameras require the ArenaSDK to be installed. Seewikifor more info.Currently, the project usespolanalyserto do some image processing.FAQFor questions, open an issue or send an email to ben [dot] potter [at] queensu
[dot] ca.ProjectsIf you use this code, open a PR and add your project to this list. We also ask
you cite our paper. Seeauthor.ContributingContributions are welcome, mostly with respect to camera SDK support. If you need support for another camera SDK,
reach out to me ben [dot] potter [at] queensu [dot] ca.Potential UpdatesCreate an ImageDecoder class that standardizes decoder format. Package user should create a decoder object and pass it to the compass object similar to the ImageSource class.Fix exposure settings in arena_sdk to improve execution time of that pipeline.Support saving features to LUCID cameras via arena_sdk.py
Package: comram
READMEProject Scope:ramshare:Create data structures in shared memory based on a data structure file.
Read and write to data structure tag.
Data structure tags can be accessed system-wide.procon:producer:Creates a socket server and either connect or create shared data structure.
Consumers can connect to producer, and all data from data structure will be transferred to connected consumers periodic.consumer:Connects to producer, either creates or connects to shared data structure.
Shared data structure will be overwritten periodic, so shared data structure is read only on consumer site.dmsgDirect event based messages between producer and consumers.
Messages will be serialized with pickle before send, and de-serialized with pickle before message is returned.Data structure .xml file:<config><connection_statusLENGTH="2"TYPE="int"INIT_VALUE="0"DESCRIPTION="connection of status"></connection_status><tag_1LENGTH="10"TYPE="int"></tag_1><timestampLENGTH="20"TYPE="float"></timestamp><statusLENGTH="100"TYPE="string"></status></config>Required tags:For produced / consumed data structures, "connection_status" is required.Required members:tag_1 = reference name, used to read or write from data structure.LENGTH = tag length in bytes, minimum value is 2Optional membersTYPE = tag type,
INIT_VALUE = initial tag valueDESCRIPTION = description of tagUsage:Write to tag:fromcomramimportramsharetest=ramshare.RamShare("share_name",data_type="/path_to_structure/test_structure.xml")test.write_to_tag("tag_1",99)Read from tag:fromcomramimportramsharetest=ramshare.RamShare("share_name",data_type="/path_to_structure/test_structure.xml")tag_1=test.read_tag("tag_1")Produce data structure:fromcomramimportproconproducer=procon.Produce("share_name",data_type="/path_to_structure/test_structure.xml",ip="127.0.0.1",port=9980,send_interval=0.01)producer.start_produce()Consume data structure:fromcomramimportproconconsumer=procon.Consume("share_name","consumer_name",data_type="/path_to_structure/test_structure.xml",ip="127.0.0.1",port=9980)consumer.start_consume()dmsg usage:produce:fromcomramimportdmsgtest_producer=dmsg.Produce("127.0.0.1",9500,debug=True)test_producer.send_message("test message")test_producer.close()consume:fromcomramimportdmsgtest_consume=dmsg.Consume("test_consumer","127.0.0.1",9500)test_msg=test_consume.get_msg()test_consume.close()Known issuestag length under under 2 byte not possible
Package: comring
ComringComring is a companion tool for Paragon ERP.Building from Sourcepython3 setup.py sdist bdist_wheelOptionally, release to pypi:python3 -m twine upload dist/*InstallingInstall using pippip install comringOdoo Environments ConfigurationThe system will read Odoo servers (environments) configuration from$HOME/.config/odoopti.yamlfile:environments:live:name:Odoo Liveurl:https://odoo.pti-cosmetics.comdatabase:paragonkind:liveuser:toolboxpassword:secretpasslocal-testing:name:Local Testingurl:http://localhost:8069database:testkind:liveuser:adminpassword:1...Description for each environment configuration keys:name: Name or labelurl: Server urldatabase: Database to be usedkind: Implementation. Valid values are: live, spinoff, nbmuser: The user to be used when communicating with the serverpassword: Password for the userWeb AppDevelopment Mode with Flask Built-in ServerEnvironment VariablesThe web app uses flask as engine, these variables can be set to configure the app. You can refer to flask docs for a complete reference. This project also uses python-dotenv so you can create .env file to set env vars more easily. The three most important variables are:FLASK_RUN_HOST=0.0.0.0
FLASK_RUN_PORT=5555
FLASK_ENV=developmentRunning with Self-Signed SSL certificateTo generate a self-signed SSL certificate:openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365Add this to .env:FLASK_RUN_CERT=cert.pem
FLASK_RUN_KEY=key.pemRunning Development ServerTo run web app:flask runProduction Mode with CherryPI's WSGI ServerRun the webapp for the first time:python3-mcomring.webapp[-abind_address][-pbind_port]Wait for about 3 seconds, then press CTRL+C to stop the application. Next you will need to generate a secret key for this production server:python-c'import os; print("SECRET_KEY =", os.urandom(16))'>venv/var/comring.webapp-instance/config.pyThen run the application again. The cookie encryption will now use the generated secret key above.Performance TestingIn this example we'll use apache-util'sabtesting tool to stress test the web application.Requirementsabavailable fromapache2-utilspackagesudo apt-get install apache2-utilsRun applicationRun in development mode or production mode. You may also test remotely deployed application.Get a Sesssion CookieOpen the application in browser, then login. We will reuse the cookie used by the browser inab:Open developer toolIn the 'Application' or 'Storage' menu, search for CookiesCopy the session cookie valueRun abTo run 160 requests split into 80 concurrent users:ab -n 160 -c 80 -C session=<cookie valued copied from browser> -p benchmark/post-invoice-small.data -T 'application/x-www-form-urlencoded' http://localhost:5500/invoice/by_brandAlternative: siegeCreate.siegercfile to set server address and login credentials:SERVER_URL = http://localhost:5555
login-url = ${SERVER_URL}/auth/login POST environment=live&username=myuser&password=mypasswordAdjust url and parameters to suit your need, then run siege:siege -f benchmark/siege-local-small.txt -b -c 80 -r 2Read siege manual for more information on how to use it.
Package: com-server
COM-ServerCOM-Server is a Python library and a local web server that hosts an API locally and interacts with serial or COM ports. The Python library provides a different way of sending and receiving data from the serial port using a thread, and it also gives a set of tools that simplifies the task of manipulating data to and from the port. Additionally, the server makes it easier for other processes to communicate with the serial port.The serial communication usespyserialas its back-end and the server usesflask-restfulandFlask. Reading their documentations may help with developing with COM-Server.NOTE: COM-Server has only been tested on:Operating systems:Ubuntu 20.04 (Focal Fossa)Raspberry Pi OS 10 (Buster)Mac OS 10.15.x (Catalina)Mac OS 11.6 (Big Sur)Windows 10Python versions:Python 3.7.2Python 3.7.3Python 3.8.10Python 3.9.7Python 3.10.0Serial ports:Arduino UNOArduino NanoRecommended useCOM-Server isnotmeant to be used like a normal JSON API, even though it uses Flask and Flask-restful. If there are many different devices accessing the endpoints at the same time, data will be backed up, since the serial communication is relatively slow and things cannot be sent to the serial device at the same time.The server is recommended to be used like a socket, and it should be used as a way for another process (should be only one; COM-Server has no implemented synchronization) on one computer (could be the same computer or another one on the same network) to communicate with the serial port viapyserialand this Python program.InstallationNOTE: COM-Server only works on Python >= 3.6.Usingpip:>pipinstall-Ucom-serverFor beta releases, use the--preoption:>pipinstall--precom-serverQuickstart# launches a development server on http://0.0.0.0:8080importcom_serverconn=com_server.Connection(<baud>,"<serport>")handler=com_server.RestApiHandler(conn)com_server.Builtins(handler)handler.run_dev(host="0.0.0.0",port=8080)conn.disconnect()Replace "<serport>" and "<baud>" with the serial port and baud rate.Alternatively, you can use the command line:>com_serverrun<baud><serport>Again, replace "<serport>" and "<baud>" with the serial port and baud rate.Links:Documentation:https://com-server.readthedocs.io/en/latest/Source code:https://github.com/jonyboi396825/COM-ServerIssue tracker:https://github.com/jonyboi396825/COM-Server/issuesContributing:https://github.com/jonyboi396825/COM-Server/blob/master/CONTRIBUTING.mdChangelog:https://github.com/jonyboi396825/COM-Server/blob/master/CHANGELOG.md
Package: com.softalks.numbers
Python 101: Natural numbers writerPrints "all" the natural numbers to the consoleThe commands used to run pip and the Python interpreter (pip3andpython3) are tested to be valid on Linux Mint 21.1 (Ubuntu 22.04). Check your OS/distribution documentation if they do not work properly in your systemInstallationLast versionpip3 install https://github.com/hiebra/101-py/archive/refs/heads/main.zipSpecific versionpip3 install https://github.com/hiebra/rpdb/archive/refs/tags/v0.0.1.zipExecutionpython3 -m com.softalks.numbersRemote debugging (only for Pydev/LiClipse)Clickhereto know how to debug this code remotelyUninstallationpip3 uninstall com.softalks.numbers