Saravanan666/pypi-org huggingface dataset:
Package: pxdgen
PxdGenPxdGen is a tool which uses Clang to convert C/C++ header files to Cython pxd files. It has two modes of operation: single-file mode and directory mode. Single file mode is well suited for C/C++ libraries that consolodate all definitions into a single header, while directory mode is better suited for large projects with many independent headers. There are some examples which use PxdGen on C/C++ libraries in the tests folder.Installationpip install pxdgenRequirementsClang- The version of libclang.(dll/so/dylib) on your system should match the version of the Python bindings to Clang. If it is not found by the standard library search path on your system, PxdGen allows you to point it to the library with -L.Bugs/LimitationsExperimental C++ supportUsagepxdgen [-h] [-o OUTPUT] [-p RELPATH] [-r] [-x LANGUAGE] [-I INCLUDE] [-L LIBS] [-v] [-f FLAGS] header

A tool that converts C/C++ headers to pxd files

positional arguments:
  header                Path to C/C++ header file or project directory to parse

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Path to output file or directory (defaults to stdout)
  -p RELPATH, --relpath RELPATH
                        Relative path to parse from (defaults to pwd)
  -r, --recursive       Include declarations from all nested headers
  -x LANGUAGE, --language LANGUAGE
                        Force Clang to use the specified language for interpretation
  -I INCLUDE, --include INCLUDE
                        Add a directory to Clang's include path
  -L LIBS, --libclang-path LIBS
                        Specify the path to a directory containing libclang and its dependencies
  -v, --verbose         Print the status of the application to stdout
  -f FLAGS, --flag FLAGS
                        Set a flag to further tune the program output
Package: pxdlib
pxdlib (Alpha 0.0.4)pxdlibis a library intended for deciphering and manipulating.pxdfiles, used by the image editorPixelmator Pro. Grab Python 3.6 or above andpip install pxdlib!Documentation exists for theAPI, and a much longer set of documentation exists for thereverse-engineeringof the.pxdformat.pxdlibcan be used for a variety of purposes. For example, if you have designed a graph, you may automagically manipulate coordinates as:frompxdlibimportPXDFileP0,T0=50,100COORDS=dict()withopen('data.csv')asf:forlineinf.readlines():name,P,T=line.strip().split(',')COORDS[name]=P0+float(P),T0+float(T)withPXDFile('graph.pxd')aspxd:forlinpxd.all_layers():ifl.nameinCOORDS:l.position=COORDS[l.name]DevelopmentAspxdlibis available on PyPI, it will be updated inproductiononly when a new version is available. The reverse-engineering document, however, will be kept up-to-date inproductionas behaviour is confirmed.Until the library is considered "done", it will not be confirmed to work on any specific Pixelmator version other than "the latest". I will considerpxdlib"done" when:raster layers are accessible in a format which is compatible with a good raster-manipulating API;vector layers are fully modifiable;text layers can be modified, at least with the common formatting capabilities;all effects and filters are documented and available;layers can be created and destroyed;and all of the above is formally tested with a specially-created document.A changelog is availablehere.
Package: px-formula
FormulaSimple formula-like expression solver.Parses formula into a reverse polish notation. Evaluates parsed to get result.Installationpipinstallpx-formulaUsageUou can calculate formulas with different operators, and function calls. But it's not a python code, that executes - only simple maths expressions.frompx_formulaimportFormula,defaultsformula=Formula(# Can change operators:operators=defaults.operators,# And available functions:functions=defaults.functions,)parsed=formula.parse('2/8+45*6+var1')# > ['2', '8', '/', '45', '6', '*', '+', 'var1', '+']# You can evaluate any formula you have/stored easily:formula.evaluate(parsed,{'var1':5})# > 275.25# Or in one shot:formula('2/8+abs(45*6)+var1',{'var1':5})# > 275.25SupportedOperators:~- Inverse!- Not**- Pow*- Multiply/- Divide//- Floor divide%- Modulo+- Plus-- Minus|- Bitwise Or&- Bitwise And^- Bitwise Xor<=- LTE>=- GTE==- Equals<- LT>- GTFunctions:abs- operator.abssin- math.sincos- math.costan- math.tanexp- math.expabs- abstrunc- Removes decimal partround- roundhypot- math.hypotall- all(True, False, True) -> Falseany- any(True, False, False) -> TrueChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[Unreleased][0.1.0]FixedIssue: Stored stack turns empty after first evaluation.[0.1.0]Initial version.
Package: pxi4jss
PxI4JSSPxI4JSS automatically generates Ising models from Petri net models forJob Shop Scheduling (JSS)Problem.OverviewBy importing a Petri net model for JSS (Single Resource Type) created byCPN Tools, our software generates an Ising (QUBO) model for the JSS problem.
After that, annealers for Ising (QUBO) models(e.g.,PyQUBO Simulated Annealier) obtains solutions.Why did we create this tool?Quantum annealing has attracted attention as a new algorithm for solving combinatorial optimization problems. To use this method, we need to formulate the target combinatorial optimization problem as energy functions called theIsing (QUBO) model.However, the formulation of the Ising model requires expertise and skills.Our objective is to develop a method that makes it easy for non-specialists to formulate Ising (QUBO) Models for their target problems with domain knowledge only.As an approach, we developed a method that first models the target problem withPetri netsand generates Ising (QUBO) models from them.Petri nets are a graphical modeling language. Therefore, we can graphically model our target optimization problems with Petri nets without formulating equations.Getting StartedInstalling%pipinstallpxi4jssUsagePlease see above figure.Create Petri nets by CPN toolsExport Petrinet as xml fileInput xml file and generate Petri net objects bycpntools4pyGenerate and solve Ising models from Petri net objects by This packageExampleExample from reading XML to solving Ising model. In detail,notebook example here.importpxi4jssimportcpntools4py# Read petrinet created by CPN Toolsxml_path='./inputs/jss_job4.xml'xml_doc=cpntools4py.read_xml(xml_path)cpn=cpntools4py.CPN(xml_doc)# To snakes objectssnakes_net=cpntools4py.to_snakes(cpn)# Generating ising model and solving itres=pxi4jss.main(snakes_net)# Solutionprint(res['solution']['energy'])# => 0.0print(res['solution']['end_time'])# => 23print(res['topology']['jobs'])# key: job, value: task# =># {0: ['t0', 't1', 't2', 't3'],#  1: ['t4', 't5', 't6', 't7'],#  2: ['t8', 't9', 't10', 't11']}Modeling a JSS instance by CPNToolsWe can model JSS instances.
The following figure shows an example with four jobs, four tasks per job, and one resource(machine) per each resource type.Petri nets and JSS MappingTransitions: TaskFires when a machine processes a task and stops firing when it finishes.The firing time is set for each task asprocessing time.Place: Representation of system state and required resources.It is divided intotask placeandresource place.Task place: with a place tokenPlace token: Job processing statusNo need to configure in this package.Resource place: with a resource place tokenResource place token: Machine actually usedPrerequisitesPython :: 3.xWe have already confirmed the operation of version3.7.
Other versions are also expected to work, but we have not been able to confirm.VersioningWe use pypi for versioning. For the versions available, see the tags on this repository.Running the tests%python3-munittestReferenceshttps://pyqubo.readthedocs.io/en/latest/https://github.com/fpom/snakeshttps://pypi.org/project/cpntools4py/ContributingWelcome!LicenseThe source code is licensed MIT.
Package: pxinteract
PXinteractExecute and Interact With Programme or Commands using PythonPXinteract.py

Interact with subprocess send stdin in a list and receives stdout & stderr.

USAGE example,

from PXinteract import interact
op=interact(cmd,inp_list=[],stream=1)inp_list will be sent in STDIN one by onestream can be 1 , 2 or 31 is for STDOUT2 is for STDERR3 is for [STDOUT,STDERR]
Package: pxm
PythonXlsxManger由于工作中偶尔需要编写一些表格数据处理脚本，而其中大部分代码都是重复的，所以为了更好的开发效率，我决定将日常表格管理脚本中用到的基础功能集合起来并使用开源都方式共享，同时也希望有更多人能够一起完善。简介PythonXlsxManger Gitee项目（Python Linux基础模块:pxm）是使用Python3基于现有openpyxl模块编写的表格读写基础模块，实现常用功能。
在模块设计上，借鉴了Shell语言管道的特性,可一步步截取列、行数据(Cut开头的函数)特色使用全中文注释，即使小白也能轻松上手完全开源、永久免费使用方法安装具体可以访问Pypi项目地址https://pypi.org/project/pxmpip3install--upgradepxm-ihttps://pypi.tuna.tsinghua.edu.cn/simpleDemo读取#!/usr/bin/env python3# -*- encoding: utf-8 -*-"""@File    :   demo.py@Time    :   2023-02-17 23:36@Author  :   坐公交也用券@Version :   1.0@Contact :   faith01238@hotmail.com@Homepage : https://liumou.site@Desc    :   当前文件作用"""fromColorInfo3importColorLoggerfrompxmimportReadclassDemo:def__init__(self,filename="xls/demo.xlsx"):""":param filename:"""self.filename=filenameself.logger=ColorLogger(class_name=self.__class__.__name__)self.r=Read(filename=self.filename)# 读取文件self.r.Set(sheet_index=1)# 设置Sheet索引值1（也就是第二个Sheet)self.r.GetAll()# 获取所有数据defall(self):ifself.r.Err:self.logger.error("读取失败: ",r.Err)else:self.logger.info("数据读取成功")print(self.r.DataR)defline(self):data=self.r.CutLine(0)# 截取第一行并获取最终结果print("第一行的数据: ",data.DataR)defstart(self):self.all()self.line()self.info()definfo(self):print(f"当前工作簿数据总列数:{self.r.InfoCols}")print(f"当前工作簿数据总行数:{self.r.InfoRows}")print(f"当前工作簿索引值:{self.r.InfoSheet}")print(f"当前工作簿名称:{self.r.InfoSheetName}")if__name__=="__main__":d=Demo()d.start()效果2023-02-2111:17:14demo.pyline:33-Class:DemoFunction:all-INFO:数据读取成功[['专业','人数'],['网络',3],['安全',3]]第一行的数据:['专业','人数']当前工作簿数据总列数:2当前工作簿数据总行数:3当前工作簿索引值:1当前工作簿名称:Sheet2问题反馈点击链接加入QQ群聊【坐公交也用券】
Package: pxmcmc
Python ProxMCMCInstallationAvailable onpypipipinstallpxmcmcIf installing from source it recommended to usepoetrygitclonehttps://github.com/auggiemarignier/pxmcmccdpxmcmc
poetryinstallsource<ENVIRONMENT_LOCATION>/bin/activate
pytestDocumentationFull documentation available onreadthedocs.ExamplesExamples of how to use this code with sample data are found in theexperimentsdirectory.
Please start with theearthtopographyexample, which will quickly run something to get you going!cdexperiments/earthtopography
pythonmain.py--infileETOPO1_Ice_hpx_256.fits
pythonplot.pymyula_synthesis_<timestamp>.hdf5.Thephasevelandweaklensingexamples replicate the work shownin this paper.ContributingContributions to the package are encouraged! If you wish to contribute, are experiencing problems with the code or need further support, please open anissueto start a discussion.  Changes will be integrated via pull requests.CITATIONIf you use this package in your work please cite the following papersMarignier (2023) PxMCMC: A Python package for proximal Markov Chain Monte Carlo, Journal of Open Source Software, 0(0), 5582.https://doi.org/10.xxxxxxMarignier et al., Posterior sampling for inverse imaging problems on the sphere in seismology and cosmology, RAS Techniques and Instruments, Volume 2, Issue 1, January 2023, Pages 20–32,https://doi.org/10.1093/rasti/rzac010
Package: pxml
A python library and command-line tool to “prettify” and colorize XML.
It also provides a unittest.TestCase mixin that adds theassertXmlEqualmethod and, on difference, shows a “pretty” diff.Installation$pipinstallpxmlOn the Command-Line$echo'<root><node attr="value">foo</node></root>'|pxml<?xmlversion="1.0"encoding="UTF-8"?><root><nodeattr="value">foo</node></root>And add some color:As a Python Moduleimportpxml,sixsrc=six.StringIO('<root><node attr="value">foo</node></root>')out=six.StringIO()pxml.prettify(src,out)assert(out.getvalue()=='''\<?xml version="1.0" encoding="UTF-8"?>
<root>
  <node attr="value">foo</node>
</root>
''')Unit TestingThepxml.XmlTestMixinclass adds theassertXmlEqualmethod to the
subclass which allows easy semantic comparison that two XML structures
are equivalent. It does so by ignoring ignorable whitespace, attribute
order, quote types, and other differences that are byte-level
differences when serialized, but don’t actually represent semantic
differences. When differences are detected, displays the XML
differences in “prettified” XML for easier comparison.importunittest,pxmlclassMyTestCase(unittest.TestCase,pxml.XmlTestMixin):deftest_equivalent_xml(self):src='<root  ><node a="1" b="0"/></root>'chk='<root><node   b="0" a="1"  /></root  >'self.assertXmlEqual(src,chk)deftest_different_xml(self):src='<root  ><node a="1" b="0"/></root>'chk='<root><node   b="1" a="0"  /></root  >'self.assertXmlEqual(src,chk)# this fails the test and produces the following error message:#   AssertionError: [truncated]... != [truncated]...#     <?xml version="1.0" encoding="UTF-8"?>#     <root>#   -   <node a="1" b="0"/>#   +   <node a="0" b="1"/>#     </root>
Package: pxm-liuyi778-Stable
PythonXlsxManger由于工作中偶尔需要编写一些表格数据处理脚本，而其中大部分代码都是重复的，所以为了更好的开发效率，我决定将日常表格管理脚本中用到的基础功能集合起来并使用开源都方式共享，同时也希望有更多人能够一起完善。简介PythonXlsxManger Gitee项目（Python Linux基础模块:pxm）是使用Python3基于现有openpyxl模块编写的表格读写基础模块，实现常用功能。
在模块设计上，借鉴了Shell语言管道的特性,可一步步截取列、行数据(Cut开头的函数)特色使用全中文注释，即使小白也能轻松上手完全开源、永久免费使用方法安装具体可以访问Pypi项目地址https://pypi.org/project/pxmpip3install--upgradepxm-liuyi778-StableDemo读取#!/usr/bin/env python3# -*- encoding: utf-8 -*-"""@File    :   demo.py@Time    :   2023-02-17 23:36@Author  :   坐公交也用券@Version :   1.0@Contact :   faith01238@hotmail.com@Homepage : https://liumou.site@Desc    :   当前文件作用"""fromColorInfoimportColorLoggerfrompxm_liuyi778_StableimportReadclassDemo:def__init__(self,filename="xls/demo.xlsx"):""":param filename:"""self.filename=filenameself.logger=ColorLogger(class_name=self.__class__.__name__)self.r=Read(filename=self.filename)# 读取文件self.r.Set(sheet_index=1)# 设置Sheet索引值1（也就是第二个Sheet)self.r.GetAll()# 获取所有数据defall(self):ifself.r.Err:self.logger.error("读取失败: ",r.Err)else:self.logger.info("数据读取成功")print(self.r.DataR)defline(self):data=self.r.CutLine(0)# 截取第一行并获取最终结果print("第一行的数据: ",data.DataR)defstart(self):self.all()self.line()self.info()definfo(self):print(f"当前工作簿数据总列数:{self.r.InfoCols}")print(f"当前工作簿数据总行数:{self.r.InfoRows}")print(f"当前工作簿索引值:{self.r.InfoSheet}")print(f"当前工作簿名称:{self.r.InfoSheetName}")if__name__=="__main__":d=Demo()d.start()效果2023-02-2111:17:14demo.pyline:33-Class:DemoFunction:all-INFO:数据读取成功[['专业','人数'],['网络',3],['安全',3]]第一行的数据:['专业','人数']当前工作簿数据总列数:2当前工作簿数据总行数:3当前工作簿索引值:1当前工作簿名称:Sheet2问题反馈点击链接加入QQ群聊【坐公交也用券】
Package: pxolly
pxolly API WrapperУстановкаpipinstall-Upxollyилиpipinstall-Uhttps://github.com/lordralinc/pxolly_api/archive/master.zipПолучение токенаN/AИспользованиеfrompxollyimportPxollyAPIapi=PxollyAPI("access_token")api.acc.get_info()api.make_request("method",{"foo":"bar"})awaitapi.make_request_async("method",{"foo":"bar"})МетодыN/A
Package: pxpowershell
pxpowershellThis module lets you interact with a Powershell Prompt from Python.   It is intended to provide similar functionality to "pxssh" or "redexpect" but for Powershell.Why not subprocess? Subprocess does something different.  It executes a single process and captures the output. pxpowershell lets you enstantiate a powershell process and then interact with it.  Variables are saved form command to command.  Functions defined in one command can be called later and so forth.Usagex = pxpowershell()
    x.start_process()
    x.run("$a = 10000")
    print(x.run("$a + 1"))
    result = x.run("get-process")
    print(result)
    x.stop_process()InstallingI recommending setuping up a virtual machine (although not required)c:\> py -m venv \path\to\new\venv\folder
c:\> \path\to\new\venv\folder\bin\activate.batThen pip install:c:\> py -m pip install git+https://github.com/markbaggett/pxpowershellExampleIf you used a virtual environment so the install can run properly you now have a new command line utility called "dir2iso" installed:(pxpowershell) C:\Users\User\Documents\GitHub\pxpowershell>dir2iso --help
usage: dir2iso [-h] source destination title

positional arguments:
  source       The path to the directory to turn into an ISO
  destination  The destination ISO file to create (including path).
  title        The title of the ISO.


optional arguments:
  -h, --help   show this help message and exitThis utility will create a .ISO file containing the specified directory. This is done using a demonstration script to shows how easily you can interact with Powershell. The Powershell Script that does all the real work came from @wikijm. Buy him a coffee.https://github.com/wikijm/PowerShell-AdminScripts/blob/master/Miscellaneous/New-IsoFile.ps1Here is everything the script really does:def dir2iso(src, dest, title="Created by pxpowershell"):
    pshell = pxpowershell.PxPowershell(debug=False)
    x = pshell.start_process()
    x = pshell.run(powershell_script, 10)
    x = pshell.run(f"cd {src}")
    result = pshell.run(f"New-IsoFile {src} -path {dest} -title {title} -Force", 60*60)
    result = pshell.run(f"ls {dest}")
    pshell.stop_process()
    return resultYou start the powershell process. We send in the new-isofile script, then execute it capturing the results.  Notice that each call to .run passes the command to send to powershell and a timeout to wait for the command to finish and return to the Powershell Prompt.  If no timeout is provided the default is 3 seconds.
Package: pxrd
PC-Axis reader for Pythonpxrdis a package for reading data from PX (PC-Axis) statistics files. The specifications for the format can be foundhere.The pxrd module allows for parsing of keywords and data from PX files at low level. The parser supports KEY based data as well as NO KEY data. Support formultilanguageis implemented.Instalationpip install pxrdPandas integrationThere's an additional module in the package that allows for conversion to Pandas DataFrame. It's separated to avoid direct dependency to pandas if it's not required.To read files into a Pandas DataFrame:importpxrdfrompxrd.pandasimportto_pandaspx=pxrd.read('/path/to/pxfile.px')df=to_pandas(px,categories=True,multiindex=True)When converting to Pandas there are two options:categories(default: True): if True, the resulting DataFrame uses Categorical dtype for the stub and heading columns/indexes. Else, it uses zero based indexes into the dimension values/codes.multiindex(default: False): if True, the generated DataFrame uses Pandas MultiIndex. Else is a regular DataFrame with stub and headings as columns.Command Line InterfaceThe packages installs a command line shortcut for converting PC-Axis files to CSV. It supports multilanguage PC-Axis files.$ px2csv [-h] [--languages] [--language LANGUAGE] filenameUse the--languagesoptions to obtain a list of available languages and--language LAMGUAGEto specify the selected language. If no language is specified, the default language is used.Low level usageFirst, you use read() to parse the PX-File. If you obtain the file via requests or any other mean, you can use reads() and provide the string contents of the file. Both functions return
a PxFile object you can use to query the contents of the file.PxFile.keywords()Returns a list of the keywords found in the file, excluding "DATA"PxFile.language()Returns the default language of the file, None if it's not definedPxFile.languages()Returns the list of languages available in the filePxFile.keyword(keyword, subkey=None, language=None)Returns the value of the specified keyword in the specfied language or default if None. If a keyword has a subkey you cam query it using the subkey parameterPxFile.variables(language=None)Returns the dimensions of the cube (stub + headings) in the specified language or default if NonePxFile.values(variable, language=None)Returns the values for the dimension (or variable) usign the language indicated or the default if NonePxFile.codes(variable, language=None)Returns the codes for the dimension (or variable) usign the language indicated or the default if None. If there are no codes, it returns the same values as "values()"PxFile.datum(index)Returns the value for the specified index of the cube. The index must be in the forma of a list containing the integer indexes of the values/codes of the variable.
The order of the dimensions/variables in the index is the same as returned by "variables()".
Package: pxsas
pxsasis a simple Python 3 wrapper for the
XMM-NewtonScience Analysis System (SAS).Dependenciespxsasneeds a working SASinstallation. SAS has to be initialized
before importingpxsasinto your python environment.A note about SAS 17.0.0 and aboveStarting with version 17.0.0, the SAS installation procedure creates its own python
environment for running some tasks. This is the system’s default python environment
after the initialization of SAS. You can install pxsas in this environment, but this
is extremely NOT recomended. Instead, you can redefine your PATH after SAS
initialization like this (in bash):export PATH="/path/to/my/python:$PATH"Installationpxsascan be easily installed usingpip:pip install pxsasExampleA simple example of usingpxsas:>>> import logging
>>> import os
>>> import pxsas

>>> logging.getLogger().setLevel(logging.INFO)

# Show SAS version used by pxsas
>>> pxsas.sasversion(full=True)
INFO:root:Running sasversion -v
INFO:root:sasversion (sasversion-1.3) [xmmsas_20190531_1155-18.0.0]

'18.0.0'

# Show the version of the task 'evselect'
>>> pxsas.run("evselect", "-v")

# Create a Calibration Index File for a given observation
# Raise exception if the task fails
>>> os.environ["SAS_ODF"] = "/path/to/observation/ODF"
>> pxsas.run("cifbuild", calindexset="ccf.cif")

# Create a Calibration Index File for a given observation
# Returns None if the task fails
>>> os.environ["SAS_ODF"] = "/path/to/observation/ODF"
>>> pxsas.run("cifbuild", calindexset="ccf.cif", raise_error=False)The output messages from the SAS tasks are captured through the python logging system.
The messages are included at the logging level defined bt the parameterverbosity_level.
For example:>> pxsas.run(“cifbuild”, calindexset=”ccf.cif”, verbosity_level=logging.DEBUG)will include the output messages of the task as DEBUG messages. By default the logging level
is INFO. For not capturing the messages through the logging system, useverbosity_level=0.If the task runs succesfully,pxsas.runreturns the output text as a string. By
default, if an error happens during execution, and exception is raised. If the keyword
argumentraise_erroris set to False, then no exception is raised and it just returnsNone.