Saravanan666/pypi-org huggingface dataset:
Package: openpyexcel
Introductionopenpyexcel is a fork of openpyxl that has some additional improvements, most notably the ability to write formula values.openpyexcel is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.It was born from lack of existing library to read/write natively from Python
the Office Open XML format.All kudos to the PHPExcel team as openpyexcel was initially based on PHPExcel.SecurityBy default openpyexcel does not guard against quadratic blowup or billion laughs
xml attacks. To guard against these attacks install defusedxml.Mailing ListThe user list can be found onhttp://groups.google.com/group/openpyxl-usersSample code:from openpyexcel import Workbook
wb = Workbook()

# grab the active worksheet
ws = wb.active

# Data can be assigned directly to cells
ws['A1'] = 42

# Rows can also be appended
ws.append([1, 2, 3])

# Python types will automatically be converted
import datetime
ws['A2'] = datetime.datetime.now()

# Save the file
wb.save("sample.xlsx")DocumentationThe documentation is at:https://openpyxl.readthedocs.ioinstallation methodscode examplesinstructions for contributingRelease notes:https://openpyxl.readthedocs.io/en/stable/changes.html
Package: openpy-fx-tools-dss
OpenPy-fx-tools-DSSPython functions for extracting, executing routines, etc. from projects modeled in OpenDSSInstallWith pippip install openpy-fx-tools-dssHow to useFirst, in the IDE (Integrated Development Environment) of preference, we import the library:importopenpy_fx_tools_dssasfx_dssExamplesThe library has IEEE example circuits (Table 1), which can be found in the OpenDSS installation files.
For the example files the classexamples_lib()is called:Table 1.Sample testsNameOptionDSS filesxlsx file13BusIEEE1xx37BusIEEE2xx123BusIEEE3xxtest=fx_dss.examples_lib()To use the .DSS files:DSS_path = test.load_examples_DSS()To use .xlsx file:xlsx_path = test.load_examples_xlsx()OpenDSS to xlsx and vice versaThe functions that generate OpenDSS scripts to a .xlsx file and vice versa are inside thexlsx_DSS_xlsx()class and are called in the following way:xlsx = fx_dss.xlsx_DSS_xlsx()Template xlsxAn .xlsx template with the OpenDSS elements is created by calling thecreate_template_xlsxfunction as follows:xlsx.create_template_xlsx(path_save:str=None,prj_name:str='default',elem_list:list=[],all_elem:bool=True)xlsx to OpenDSSThe circuit data is entered in the .xlsx template. Each sheet of the template corresponds to the elements that are modeled in OpenDSS. When generating the OpenDSS scripts, only the cells that are not empty are considered.
For this purpose, thexlsx_to_OpenDSSfunction is called as follows:xlsx.xlsx_to_OpenDSS(xlsx_path=xlsx_path['xlsx_path'],path_save=xlsx_path['path_save'],prj_name=DSS_path['prj_name'])Important:Do not alter the names of the sheets, and columns, since the element will not be taken into account.The form of data entry must coincide with the OpenDSS specifications.OpenDSS to xlsxFrom an OpenDSS file, the xlsx template can be generated. For this purpose, theOpenDSS_to_xlsxfunction is used as follows:xlsx.OpenDSS_to_xlsx(DSS_path=DSS_path['DSS_path'],path_save=DSS_path['path_save'],prj_name=DSS_path['prj_name'])LicenseLicense: CC BY-NC-SA 4.0This work has a licenseCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Package: open-py-ml
A simple ML library.class Brain:"""A brain. An Artificial intelligence (AI)'s data and runner.Data: First argument in __init__(), Data is for the training data key/valuesThreshold: Second argument in __init(), Threshold is for the percentage of which the AI findsThat the data is simular enough to the input string of which it is acceptedNOTE: This only works with strings now."""def __init__(self, data: dict or None, threshold: float):"""Initializes a new brain."""def forward(self, data: str) -> str:"""Gives a string for the Artificial intelligence (AI) to process."""As you can see, This is just the way the brain is organized.You can only just use this, and you would have A good time.But for quickly loading the brain. By quicklyI mean without having to load the file yourself with "open()"You can actually just use load(filename, threshold), and save(ai, threshold).Note that load and save just save with json.
Package: openpyscad
OpenPySCADPython library to generateOpenSCADsource code. This library provides intuitive interface when you handle 3D data.
OpenPySCAD supports python3(3.5+).InstallpipinstallopenpyscadHow to useWrite python code as follows:importopenpyscadasopsc1=ops.Cube([10,20,10])c2=ops.Cube([20,10,10])(c1+c2).write("sample.scad")Generated code will be written in the "sample.scad".For automatic reload and preview, you need to turn on "Design > Automatic Reload and Preview" in OpenSCADunion(){cube([10,20,10]);cube([20,10,10]);};Generated code examples3D ShapesPython:Sphere(r=10,_fn=100)Cube([10,10,10])Cylinder(h=10,r=10)p=Polyhedron(points=[[10,10,0],[10,-10,0],[-10,-10,0],[-10,10,0],[0,0,10]],faces=[[0,1,4],[1,2,4],[2,3,4],[3,0,4],[1,0,3],[2,1,3]])Generated OpenSCAD code:sphere(r=10,$fn=100);cube(size=[10,10,10]);cylinder(h=10,r=10);polyhedron(points=[[10,10,0],[10,-10,0],[-10,-10,0],[-10,10,0],[0,0,10]],faces=[[0,1,4],[1,2,4],[2,3,4],[3,0,4],[1,0,3],[2,1,3]]);Boolean OperationsPython:# UnionCube([20,10,10])+Cube([10,20,10])# You can also write like thisu=Union()u.append(Cube[20,10,10])u.append(Cube[10,20,10])# DifferenceCube([20,10,10])-Cube([10,20,10])# You can also write like thisi=Difference()i.append(Cube[20,10,10])i.append(Cube[10,20,10])# IntersectionCube([20,10,10])&Cube([10,20,10])# You can also write like thisi=Intersection()i.append(Cube[20,10,10])i.append(Cube[10,20,10])Generated OpenSCAD code:// Unionunion(){cube([20,10,10])cube([10,20,10])};// Differencedifference(){cube([20,10,10]);cube([10,20,10]);};// Intersectionintersection(){cube([20,10,10]);cube([10,20,10]);};TransformationsPython:# TranslateCube([20,10,10]).translate([10,10,10])# RotateCube([20,10,10]).rotate([0,0,45])# ScaleCube([20,10,10]).scale([2,1,1])# ResizeCube([20,10,10]).resize([2,1,1])# MirrorCube([20,10,10]).mirror([1,1,1])# ColorCube([20,10,10]).color("Red")# OffsetCircle(10).offset(10)Generated OpenSCAD code:// Translatetranslate(v=[10,10,10]){cube([20,10,10]);};// Rotaterotate(v=[0,0,45]){cube([20,10,10]);};// Scalescale(v=[2,1,1]){cube([20,10,10]);};// Resizeresize(newsize=[2,1,1]){cube(size=[20,10,10]);};// Mirrormirror([1,1,1]){cube(size=[20,10,10]);};// Colorcolor("Red"){cube(size=[20,10,10]);};// Offsetoffset(r=10){circle(r=10);};ModifiersOpenPySCAD providesmodifiersinterfaces ("*", "!", "#" and "%").Python:c1=Cube(10)c1.disable()# add "*" characterc1.show_only()# add "!" characterc1.is_debug()# add "#" characterc1.is_transparent()# add "&" characterInterested in contribution?Please readCONTRIBUTING.md.
Package: open-python
openDescriptionOpen a file, directory, or URI using the OS's default application for
that object type. Optionally, you can specify an application to use.This is a proxy for the following commands:OSX: "open"
Windows: "start"Linux/Other: "xdg-open"This is a python port of the node.js module:https://github.com/pwnall/node-openImportimportopen_pythonUsageopen google.com in the user's default browser:open_python.start("https://google.com/")you can specify the program to use:open_python.start("https://google.com/","firefox")use in command line$python-mopen_pythonhttps://google.com/LicenseCopyright (c) 2013 skratchdotLicensed under the MIT license.Contributorsskratchdot
panda2134
Package: openpyxl
Introductionopenpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.It was born from lack of existing library to read/write natively from Python
the Office Open XML format.All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel.SecurityBy default openpyxl does not guard against quadratic blowup or billion laughs
xml attacks. To guard against these attacks install defusedxml.Mailing ListThe user list can be found onhttp://groups.google.com/group/openpyxl-usersSample code:from openpyxl import Workbook
wb = Workbook()

# grab the active worksheet
ws = wb.active

# Data can be assigned directly to cells
ws['A1'] = 42

# Rows can also be appended
ws.append([1, 2, 3])

# Python types will automatically be converted
import datetime
ws['A2'] = datetime.datetime.now()

# Save the file
wb.save("sample.xlsx")DocumentationThe documentation is at:https://openpyxl.readthedocs.ioinstallation methodscode examplesinstructions for contributingRelease notes:https://openpyxl.readthedocs.io/en/stable/changes.html
Package: openpyxl-autofill
Installation via pippip install openpyxl_autofillUsagefrom openpyxl import load_workbook
import openpyxl_autofill
openpyxl_autofill.enable_all()
wb = load_workbook(...)
ws = wb.active
ws.insert_rows(...)
...Extensions for openpyxlsortSorts the cells within the given range.insertInsert rows and insert cols. Auto adjust merged cells, formulas and tables.deleteDelete rows and delete cols. Auto adjust merged cells, formulas and tables.
Package: openpyxl-dictreader
openpyxl-dictreaderDescriptionA module that maps the information in each row in anopenpyxlworksheet to a dict whose keys are given by the optional fieldnames parameter, similar to Python's nativecsv.DictReader.Installingpipinstallopenpyxl-dictreaderExamplesInput:importopenpyxl_dictreaderreader=openpyxl_dictreader.DictReader("names.xlsx","Sheet1")forrowinreader:print(row["First Name"],row["Last Name"])Output:Boris Johnson
Donald Trump
Mark Rutteload_workbook keyword argumentsThe openpyxl load_workbook method takes several optional keyword arguments. These can be passed into the openpyxl_dictreader.DictReader constructor as keyword arguments:reader=openpyxl_dictreader.DictReader("names.xlsx","Sheet1",read_only=False,keep_vba=False,data_only=False,keep_links=True)Acknowledgementsopenpyxlcsv
Package: openpyxl-image-loader
Openpyxl Image LoaderOpenpyxl wrapper that gets images from cellsRequirementsopenpyxlUsagefromopenpyxlimportload_workbookfromopenpyxl_image_loaderimportSheetImageLoader# Load your workbook and sheet as you want, for examplewb=load_workbook('path_to_file.xlsx')sheet=wb['required_sheet']# Put your sheet in the loaderimage_loader=SheetImageLoader(sheet)# And get image from specified cellimage=image_loader.get('A3')# Image now is a Pillow image, so you can do the followingimage.show()# Ask if there's an image in a cellifimage_loader.image_in('A4):print("Got it!")
Package: openpyxl-stubs
openpyxl-stubsAdd types foropenpyxlfor mypy.Installation$ pip install openpyxl-stubsUsageMypy will automatically use the type annotations in this package, once it is
installed. You just need to annotate your code:fromtypingimportOptionalfromflask_httpauthimportHTTPAuth,Authorizationdeffoo(bar:HTTPAuth)->Optional[Authorization]:returnbar.get_auth()For general hints how to use type annotations, please readType Annotations in Python 3.8
Package: openpyxl-templates
Welcome to openpyxl-templates!Openpyxl-templates is an extention toopenpyxlwhich simplifies reading and writing excelfiles by formalizing their structure into templates. The package has two main components:TheTemplatedWorkbookwhich describe the excel fileTheTemplatedSheetswhich describe the individual sheets within the fileThe package is build for developers to be able to implement their own templates but also provides one useful templated sheet. TheTableSheetwhich makes it significantly easier to read and write data from excel data tabels such as this one:The TableSheet provides an easy way of defining columns and handles both styling and conversion to and from excel. See quickstart for a demo.Githubhttps://github.com/SverkerSbrg/openpyxl-templatesDocumentationhttp://openpyxl-templates.readthedocs.io/en/latest/pypihttps://pypi.python.org/pypi/openpyxl-templatesopenpyxlhttps://openpyxl.readthedocs.io/en/default/If you have any questions or ideas regarding the package feel free to reach out to me via GitHub.WarningThis package is still in beta. The api may still be subject to change and the documentation is patchy.
Package: openpyxl-templates310
Welcome to openpyxl-templates!Openpyxl-templates is an extention toopenpyxlwhich simplifies reading and writing excelfiles by formalizing their structure into templates. The package has two main components:TheTemplatedWorkbookwhich describe the excel fileTheTemplatedSheetswhich describe the individual sheets within the fileThe package is build for developers to be able to implement their own templates but also provides one useful templated sheet. TheTableSheetwhich makes it significantly easier to read and write data from excel data tabels such as this one:The TableSheet provides an easy way of defining columns and handles both styling and conversion to and from excel. See quickstart for a demo.Githubhttps://github.com/SverkerSbrg/openpyxl-templatesDocumentationhttp://openpyxl-templates.readthedocs.io/en/latest/pypihttps://pypi.python.org/pypi/openpyxl-templatesopenpyxlhttps://openpyxl.readthedocs.io/en/default/If you have any questions or ideas regarding the package feel free to reach out to me via GitHub.WarningThis package is still in beta. The api may still be subject to change and the documentation is patchy.
Package: openpyxl-utilities
Openpyxl_utilitiesThis project consists of a library with functionalities to work with the popular module openpyxl (mainly used to read and write xlsx and xls files from Python) more efficiently. It was kickstarted when I found out openpyxl package does not includes sorting fucntionalities to create xlsx files already sorted (the only option available was to set a sorting button to sort the rows inside Microsoft Excel, not creating the file already sorted).PrerequisitesThis script is written in Python 3.6 using the following non-standard modules:openpyxl 2.5 or higherInstallingFirst, make sure you have the prerequisites installed using the following command:$pip freezeIf the list of installed modules does not includes openpyxl==2.5 or higher, run the following command:$pip install openpyxlOnce the prerequisites are fullfiled, install the module with the following command:$pip install openpyxl_utilitiesIf no errors are given, you can already import the module as any other module. To test if everything was correctly installed, run test.py, no error should rise.$python test.pyIf you are sure everything was installed correctly but there were errors, feel free to open an issue and let me help you get it working. n.nList of functions (up to dated with version 1.0)list_valuesadjust_col_widthprint_sheetempty_rowmax_length_of_columntransposesort_sheet_byapply_formatcol_to_numnum_to_colAuthorsSebastiÃ¡n MatÃ­as CarreiraAcknowledgmentsFelipe Prenholato- @chronossc : For his work on openpyxl, core module of these functionsNicolÃ¡s Fusaro- @mnfusaro : For his help in QA and debugging.
Package: openqa-client
openqa_clientThis is a client for theopenQAAPI, based onrequests. It requires Python
3.6 or later.UsageHere's a simple example of reading the status of a job:from openqa_client.client import OpenQA_Client
client = OpenQA_Client(server='openqa.opensuse.org')
print(client.openqa_request('GET', 'jobs/1'))Here's an example of triggering jobs for an ISO:# This is a Fedora server.
client = OpenQA_Client(server='openqa.happyassassin.net')
params = {}
params['ISO'] = '22_Beta_TC2_server_x86_64_boot.iso'
params['DISTRI'] = 'fedora'
params['VERSION'] = '22'
params['FLAVOR'] = 'server_boot'
params['ARCH'] = 'x86_64'
params['BUILD'] = '22_Beta_TC2'
print(cl.openqa_request('POST', 'isos', params))All methods other thanGETrequire authentication. This client uses
the same configuration file format as the reference (perl) client in
openQA itself. Configuration will be read from/etc/openqa/client.confor~/.config/openqa/client.conf. A configuration file looks like this:[openqa.happyassassin.net]
key = APIKEY
secret = APISECRETYou can get the API key and secret from the web UI after logging in. Your
configuration file may include credentials for multiple servers; each
section contains the credentials for the server named in the section
title.If you create anOpenQA_Clientinstance without passing theserverargument, it will use the first server listed in the configuration file
if there is one, otherwise it will use 'localhost'. Note: this is a
difference in behaviour from the perl client, whichalwaysuses 'localhost'
unless a server name is passed.TLS/SSL connections are the default (except for localhost). You can
pass the argumentschemetoOpenQA_Clientto force the use of
unencrypted HTTP, e.g.OpenQA_Client(server='openqa.happyassassin.net', scheme='http').The API always returns JSON responses; this client's request functions
parse the response before returning it.If you need for some reason to make a request which does not fall into
theopenqa_request()method's expected pattern, you can construct arequests.Requestand pass it todo_request(), which will attach the
required headers, execute the request, and return the parsed JSON response.Theconstmodule provides several constants that are shadowed from the
upstream openQA code, including job states, results, and the 'scenario
keys'.DevelopmentYou can file pull requests atGithub.
There is an extensive test suite with CI integration. You can run the test
suite locally by runningtox. If your system has a tox version earlier
than 3.3.0, you must have thesetuptools_scmPython module installed for
this to work correctly, or else you will get errors about a missinginstall.requiresfile.LicensingThis software is available under the GPL, version 2 or any later version.
A copy is included as COPYING. Contributions submitted as pull requests are
assumed to be submitted under the same license terms unless otherwise
specified.
Package: openqaoa-azure
OpenQAOA-Azure PluginOpenQAOA is a multi-backend python library for quantum optimization using QAOA on Quantum computers and Quantum computer simulators. This package is part of a set of OpenQAOA plug-ins that lets users run QAOA computations on devices accessible through Azure cloud platform. Check out OpenQAOA websitehttps://openqaoa.entropicalabs.com/OpenQAOA is currently in OpenBeta.Please, considerjoining our discordif you want to be part of our community and participate in the OpenQAOA's development.Installation instructionsInstall via PyPIYou can install the latest version of openqaoa-azure directly from PyPi. We recommend creating a virtual environment withpython>=3.8first and then simply pip install openqaoa-azure with the following command.NOTE:Installingopenqaoa-azureinstallsopenqaoa-coreandopenqaoa-qiskitby defaultpipinstallopenqaoa-azureInstallation instructions for DevelopersOpenQAOA-Azure does not yet support developer install as a standalone package. If you wish to work in developer mode, please install the entire library. Instructions are availablehereShould you face any issue during the installation, please drop us an email atopenqaoa@entropicalabs.comor open an issue!Getting startedThe documentation for OpenQAOA can be foundhere.We also provide a set of tutorials to get you started. Among the many, perhaps you can get started with the following ones:Link Azure Quantum notebookAvailable devivesOpenQAOA-Azure serves devices through Azure cloud platform. The available devices depend on the specified credentials.Device locationDevice NameAzure QuantumQCI, Rigetti, PASQAL, Quantinuum, IONQRunning the testsTODOContributing and feedbackIf you find any bugs or errors, have feature requests, or code you would like to contribute, feel free to open an issue or send us a pull request on GitHub.We are always interested to hear about projects built with EntropicaQAOA. If you have an application you'd like to tell us about, drop us an email atopenqaoa@entropicalabs.com.
Package: openqaoa-braket
OpenQAOA-Braket PluginOpenQAOA is a multi-backend python library for quantum optimization using QAOA on Quantum computers and Quantum computer simulators. This package is part of a set of OpenQAOA plug-ins that lets users run QAOA computations on AWS Braket supported devices, and devices that support Amazon Braket circuits. Check out OpenQAOA websitehttps://openqaoa.entropicalabs.com/OpenQAOA is currently in OpenBeta.Please, considerjoining our discordif you want to be part of our community and participate in the OpenQAOA's development.Installation instructionsInstall via PyPIYou can install the latest version of openqaoa-braket directly from PyPi. We recommend creating a virtual environment withpython>=3.8first and then simply pip install openqaoa-braket with the following command.NOTE:Installingopenqaoa-braketinstallsopenqaoa-coreby defaultpipinstallopenqaoa-braketInstallation instructions for DevelopersOpenQAOA-Braket does not yet support developer install as a standalone package. If you wish to work in developer mode, please install the entire library. Instructions are availablehereShould you face any issue during the installation, please drop us an email atopenqaoa@entropicalabs.comor open an issue!Getting startedThe documentation for OpenQAOA-Braket can be foundhere.We also provide a set of tutorials to get you started. Among the many, perhaps you can get started with the following ones:Link Braket notebook to get startedAvailable devivesOpenQAOA-Braket serves devices accessible to the user through their AWS account. The available devices depend on the specified credentials.Device locationDevice NameAmazon BraketIonQ, Rigetti, OQC, and simulatorsRunning the testsTODOContributing and feedbackIf you find any bugs or errors, have feature requests, or code you would like to contribute, feel free to open an issue or send us a pull request on GitHub.We are always interested to hear about projects built with EntropicaQAOA. If you have an application you'd like to tell us about, drop us an email atopenqaoa@entropicalabs.com.