Saravanan666/pypi-org huggingface dataset:
Package: pysurvival
PySurvival is an open source python package for Survival Analysis modeling - the modeling concept used to analyze or predict when an event is likely to happen. It is built upon the most commonly used machine learning packages such NumPy, SciPy and PyTorch.Check out the documentation athttps://www.pysurvival.io—PySurvival provides a very easy way to navigate between theoretical knowledge on Survival Analysis and detailed tutorials on how to conduct a full analysis, build and use a model. Indeed, the package contains:10+ models ranging from the Cox Proportional Hazard model, the Neural Multi-Task Logistic Regression to Random Survival ForestSummaries of the theory behind each model as well as API descriptions and examples.Tutorials displaying in great details how to perform exploratory data analysis, survival modeling, cross-validation and prediction, for churn modeling and credit risk to name a few.Performance metrics to assess the models’ abilities like c-index or brier scoreSimple ways to load and save models… and more !—PySurvival is compatible with Python 2.7-3.7.
Package: pysustrans
pysustransA set ofDataAnalyticsTools inpythonA package that allows performing common statitical analysis on transportation related data.Documentation:Modules documentation can be found onpysustrans githubInstallation:pysustrans can be installed directly usingpip:pip install pysustransPython RequirePython>=3.8Dependencies:numpy,pandas,scipy,matplotlib,seabornContributions:Contributions, bugfixes and suggestions are welcomed.
Package: pysut
Python class for efficient handling of supply and use tables (SUTs)Created on Mon Jun 30 17:21:28 2014@author: stefan pauliuk and Guillaume Majeau-Bettez, NTNU Trondheim, Norway <br>
with contributions from <br>
Konstantin Stadler, NTNU, Trondheim, Norway<br>
Chris Mutel, PSI, Villingen, CH <br><b>Dependencies:</b> <br>
numpy >= 1.9<br>
scipy >= 0.14<br><br>
<b>Tutorial:</b><br>https://github.com/cmutel/pySUT/blob/master/Doc/pySUT_Documentation.ipynb<br>
<b>Documenation of all methods and functions:</b><br>http://htmlpreview.github.com/?https://github.com/stefanpauliuk/pySUT/blob/master/Doc/pysut.html<br><b> Below, a quick installation guide and a link to the tutorial are provided:</b><br><br><b>a) Installation as package:</b> <br>
Pull package via git pull or download as .zip file and unpack. Choose a convenient location (Here: ‘C:MyPythonPackages'). Then open a console, change to the directory ../pySUT-master/, and install the package from the command line: <br>
> python setup.py installThis makes the package available to Python. At any other place in a system with the same python installation, pydsm is now ready to be imported simply by <br>
> import pysutThis setup also allows us to run the unit test: <br>> import unittest> import pysut> import pysut.tests> unittest.main(pysut.tests, verbosity=2)Or, to run a specific test> unittest.main(pydsm.tests.test_allocations_constructs, verbosity=2)<br>
<b>b) Manual installation, by modifying the python path</b><br>
Pull package via git pull or download as .zip file and unpack. Choose a convenient location (Here: ‘C:MyPythonPackages'). Then include in your code the following lines <br>
> import sys> sys.path.append(‘C:\MyPythonPackages\pySUT-master\pydsm')> from pysut import SupplyUseTable
Package: pysutils
Introductionpysutils is a library to hold common tools for the pys* library family:pysmvtpysapppysformQuestions & CommentsPlease visit:http://groups.google.com/group/pyslibsCurrent StatusThe code stays pretty stable, but the API is likely to change in the future.Thepysutils tipis installable viaeasy_installwitheasy_installpysutils==dev
Package: pysv
pysvis a lightweight Python library that allows functional models
to be written in Python and then executed inside standard SystemVerilog
simulators, via DPI.Documentation ishere.Core Featurespysv is designed to be versatile and can be used directly or as a
library in other hardware generator frameworks. It offers the following
features:C/C++ and SystemVerilog binding code generationForeign modules, e.g.numpyortensorflow.Python functionsPython classesNumpy array view of SV open arrayPlatform-independent compilationSupported SimulatorsTheoretically any simulator that supports SystemVerilog DPI semantics
should work. Here is a list of simulators that have been tested:Cadence® Xcelium™Synopsys VCS®Mentor Questa®Vivado® SimulatorVerilatorDependenciespysv leveragespybind11to execute arbitrary Python code. As a
result, here is a list of dependenciescmake 3.4 or newerAny C++ compiler that supports C++11:Clang/LLVM 3.3 or newer (for Apple Xcode’s clang, this is 5.0.0 or
newer)GCC 4.8 or newerPython 3.6 or newerUsage ExampleHere is a simple example to show a Python class that usesnumpyfor
computation.importnumpyasnpfrompysvimportsv,compile_lib,DataType,generate_sv_bindingclassArray:def__init__(self):# constructor without any extra argument is exported to SV directlyself.__array=[]@sv()defadd_element(self,i):self.__array.append(i)@sv()defmin(self):# call the numpy functionreturnnp.min(self.__array)@sv(return_type=DataType.Bit)defexists(self,value):returnself.__exists(value)def__exists(self,value):# this function is not exposed to SystemVerilogreturnvalueinself.__value# compile the code into a shared library for DPI to load# build the lib inside the ./build folder# lib_path is the path to the shared library filelib_path=compile_lib([Array],cwd="build")# generate SV bindingsgenerate_sv_binding([Array],filename="array_pkg.sv",pkg_name="demo")Now we can use the class directly with the SystemVerilog binding:// import Arrayimportdemo::*;Arraya=new();a.add_element(1);assert(a.exists(1));assert(!a.exists(2));// numpy under the hood!assert(a.min()==1);To use an array as a function argument, useDataType.IntArray.
As the name indicates, pysv currently only supportint32_tarrays of any
dimension. More data types supports will be worked on in the future.
Here is an example of how to use it in Python:@sv(a=DataType.IntArray)defset_value(a):print(a)a[2]=42It is implemented viapy::memoryview, which offers a mutable view of a raw
array of any dimension.pysvassumes row-major ordering of the underlying
multi-dimensional array. To use multi-dimensional array, useDataType.IntArray[n], wherenis the number of dimension, e.g.DataType.IntArray[2]creates a 2-D array. Note that due to the usage
of Pythonmemoryview, only numpy style indexing is supported, e.g.a[1, 2]. To see more details, please check out theCPython discussion.
If you don’t need to modify the underlying array, you can usenumpyto
convert the data to a numpy array for further processing.
Package: pysvap
DetailsIn processing...Copyright 2021 SHUBH VASHISHT and AMAN PRIYADARSHIPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pysvgexport
PySVGExportSVGExport for PythonIdea fromsvgexportusing for nodejsInstall via pippip3installpysvgexportUsage1. Command-line# See instructionsvgexport-h# Export command examplesvgexport-fSVG_FILE_PATH-sSCALE-oOUT_PUT_PNG2. Inside a Python projectfrompysvgexportimportSVGExportsvg_data='''<svg xmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xhtml" width="235.6875px"height="112.37257096319047px"viewBox="0 0 235.6875 112.37257096319047"><defs><path d="M 29.050328462552656,81.24213909012583 A 120.43422075282764120.43422075282764 0&#10;0  1 206.63717153744733,81.24213909012583 Z"id="svg-text" /></defs><text><textPath xmlns:xlink="http://www.w3.org/1999/xhtml"xlink:href="#svg-text" lengthAdjust="spacing"fill="#1ebb6a" method="stretch"textLength="199.6875" spacing="auto"xml:space="preserve"style="font-size: 30px;letter-spacing: 0px;font-family: &quot;Aclonica.ttf&quot;;">LALALALA text</textPath></text></svg>'''capture_options={"scale":20}output_options={"omitBackground":True}svg_exporter=SVGExport(svg_data=svg_data,capture_options=capture_options,output_options=output_options)image=svg_exporter.execute()
Package: py-svg-hush
py-svg-hushpy-svg-hush is a Python package for sanitizing SVG files using thesvg-hushRust library.Installationpy-svg-hush requires Python 3.7 or later. You can install it using pip:pipinstallpy_svg_hushUsagefrompy_svg_hushimportfilter_svgsvg_bytes=b"""<svg xmlns="http://www.w3.org/2000/svg"><script>alert('Malicious script')</script></svg>"""keep_data_url_mime_types={"image":["jpeg","png","gif"],}sanitized_svg=filter_svg(svg_bytes,keep_data_url_mime_types)filter_svgThefilter_svgfunction sanitizes SVG data by removing potentially malicious elements and attributes, as well as restricting the allowed MIME types of data: URLs in the SVG. It is a simple wrapper around the underlying Rust function.Parameterssvg (bytes): The SVG data to be filtered.keep_data_url_mime_types (Optional[Dict[str, List[str]]]): A dictionary that maps MIME types to lists of allowed subtypes for data: URLs in the SVG. If a data: URL's MIME type and subtype are not in the dictionary it will be dropped. If this parameter is None, all data: URLs are dropped.Returns(bytes): The sanitized SVG data.RaisesValueError: If there is an error processing the SVG data.TypeError: If any of the arguments are of the wrong type.DevelopmentTo set up a development environment for py-svg-hush, you can use the following steps:Clone the repository:gitclonegit@github.com:jams2/py-svg-hush.gitInstall development dependencies:pipinstall.[dev,testing]Build the Rust library, resulting in a Python module:maturindevelopRun tests:pytest
Package: pysvglib
pysvglibA Python-based SVG graphics library for programmatically generating SVG diagrams
from basic shapes.ExampleImport the libraryimportsvgCreate a "root" SVG object and define the view box.  Keyword arguments define
other parameters that will be passed to the fundamentalsvgnode.root=svg.RootSvg((-25,-25,50,50),width='50%',height='50%')Add style definitions that will affect the entire graphic.  Keyword arguments
become css style parameters.root.add_style(svg.Style('.glass',fill='#bbf7f4',fill_opacity=0.5))root.add_style(svg.Style('.outline',stroke='black'))Add child nodes and groups of nodes.  These can be rectangles, circles, complex
paths, etc.root.append_child(svg.Rectangle(p1=(-10,-15),p2=(30,85),fill='#cccccc',stroke='none'))mygroup=svg.Group(id='mygroup')mygroup.append_child(svg.Rectangle(center=(0,0),width=5,height=10).append_class('glass'))mygroup.append_child(svg.Rectangle(center=(3,2),width=10,height=5).append_class('glass'))root.append_child(mygroup)path=svg.Path((6.7,-10),stroke_width=0.2,fill='none')path.line_to((0,20),relative=True).h_line(-2,relative=True)\.arc_to((12.9,12.9),0,False,True,(0,-20),relative=True)\.close()path.append_class('outline')root.append_child(path)Apply transformations to nodes and groups.mygroup.rotate(37,center=(4,7))mygroup.translate((2,-4))path.skew_x(10)Output the SVG markup as a string.print(root)Which results in:<svgheight="100%"viewBox="-25 -25 50 50"width="100%"xmlns="http://www.w3.org/2000/svg"><style>.glass{fill:#bbf7f4;fill-opacity:0.5;}</style><gid="mygroup"><rectfill="#cccccc"height="100"stroke="none"width="100"x="-50"y="-50"/><rectclass="glass"height="10"width="5"x="-2.5"y="-5.0"/></g><pathd="M 6.7 -10 l 0 20 h -2 a 12.9 12.9 0 0 1 0 -20 Z"fill="none"stroke-width="0.2"/></svg>...or output it to a file:root.write('my_picture.svg')which results in:DevelopmentUsepipenvfor local environment management.
After cloning the repository:$cd<project-repo>
$pipenvinstall-e.[dev]$pipenvshellRun tests by just executingpytestat the root of the local virtual
environment.  Likewise enforce code style by runningpycodestyle .from the
root of the local virtual environment.To package and release, from within the virtual environment:$pythonsetup.pysdistbdist_wheelSee alsothis page.
Package: pysvg-py3
pysvg-py3pysvg-py3 is a Python 3 portage of popular librarypysvg.I am not the original author
of the library.The original code has been duplicated, then lib2to3 has been used with default parameters to update the code
for Python 3. Original code were also patched to run well on Python 3. See :PR #4, related to issue #3 (thanks to @virresh)The resulting library is available on PypiNote: the root module has name 'pysvg' to silently replace the original version on Python 3 environments. For that
reason, you should remove the original package before installing this one.pip uninstall pysvg
pip install pysvg-py3
Package: pysvm
PySVM : A NumPy implementation of SVM based on SMO algorithm实现LIBSVM中的SVM算法，对标sklearn中的SVM模块LinearSVCKernelSVCNuSVCLinearSVRKernelSVRNuSVROneClassSVM2021.11.05 : 加入了高斯核函数的RFF方法。2022.01.27 : 通过向量化运算对算法进行提速，加入性能对比。2022.01.28 : 加入缓存机制，解决大数据下Q矩阵的缓存问题，参考https://welts.xyz/2022/01/28/cache/。2022.01.30 : 删除Solver类，设计针对特定问题的SMO算法。2022.02.01 : 修改SVR算法中的错误。2022.05.27 : 重构代码，将SMO算法求解和SVM解耦，更容易解读。主要算法Python(NumPy)实现SMO算法，也就是和的优化算法，从而实现支持向量机分类、回归以及异常检测。Framework我们实现了线性SVM，核SVM，用于分类，回归和异常检测:graph 
	PySVM --> LinearSVM
	PySVM --> KernelSVM
	PySVM --> NuSVM
	LinearSVM --> LinearSVC
	LinearSVM --> LinearSVR
	KernelSVM --> KernelSVC
	KernelSVM --> KernelSVR
	KernelSVM --> OneClassSVM
	NuSVM --> NuSVC
	NuSVM --> NuSVR设计框架：graph BT
	cache(LRU Cache) --> Solver
	Solver --> LinearSVM
	LinearSVM --> KernelSVM
	Kernel --> KernelSVM
	RFF --> Kernel
	mc(sklearn.multiclass) --> LinearSVM
	mc --> NuSVM
	NuSolver --> NuSVM
	Kernel --> NuSVM
	cache --> NuSolver其中RFF表示随机傅里叶特征，LRU Cache缓存机制用于处理极大数据的场景。Installpipinstallpysvm或源码安装gitclonehttps://github.com/Kaslanarian/PySVMcdPySVM
pythonsetup.pyinstall运行一个简单例子>>>fromsklearn.datasetsimportload_iris>>>frompysvmimportLinearSVC>>>X,y=load_iris(return_X_y=True)>>>X=(X-X.mean(0))/X.std(0)# 标准化>>>clf=LinearSVC().fit(X,y)# 训练模型>>>clf.score(X,y)# 准确率0.94Examples在tests中，有5个例子，分别是：dataset_classify.py, 使用三种SVM对sklearn自带数据集分类（默认参数、选取20%数据作为测试数据、数据经过标准化）：AccuracyIrisWineBreast CancerDigitsLinear SVC94.737%97.778%96.503%95.556%Kernel SVC97.368%97.778%96.503%98.222%NuSVC97.368%97.778%92.308%92.222%dataset_regression.py, 使用三种SVM对sklearn自带数据集回归（默认参数、选取20%数据作为测试数据、数据经过标准化）：R2 scoreBostonDiabetesLinear SVR0.65700.4537Kernel SVR0.69920.1756NuSVR0.68000.1459visual_classify.py，分别用LinearSVC和KernelSVC对人工构造的二分类数据集进行分类，画出分类结果图像和决策函数值图像：visual_regression.py用三种SVR拟合三种不同的数据：线性数据，二次函数和三角函数：visual_outlier.py用OneClassSVM进行异常检测：ReferenceChang, Chih-Chung, and Chih-Jen Lin. "LIBSVM: a library for support vector machines." ACM transactions on intelligent systems and technology (TIST) 2.3 (2011): 1-27.https://github.com/Kaslanarian/libsvm-sc-reading: 阅读LibSVM源码的知识整理与思考.
Package: pySVModel
An abstract language model of SystemVerilog (incl. Verilog) written in Python.Main GoalsThis package provides a unified abstract language model for SystemVerilog (incl. Verilog).
Projects reading from source files can derive own classes and implement additional logic to create a concrete language
model for their tools.Projects consuming pre-processed System Verilog data (parsed, analyzed or elaborated) can build higher level features
and services on such a model, while supporting multiple frontends.Use CasespySVModel GeneratorsSee#11: Interfacing Surelog/UHDMTBDpySVModel ConsumersElectronic Design Automation Abstraction (EDA²)TBDExamplesList all Modules with Parameters and PortsTBDContributorsPatrick Lehmann(Maintainer)Unai Martinez-Corraland more...LicenseThis Python package (source code) licensed underApache License 2.0.The accompanying documentation is licensed underCreative Commons - Attribution 4.0 (CC-BY 4.0).SPDX-License-Identifier: Apache-2.0
Package: pysvn
pysvnThis is a Python package that can operatesvn, providelog,diff,numstatoperation.InstallBinary installers for the latest released version are available at thePypi.python -m pip install --upgrade pysvnUsageInitinitialize the client oncwdimportpysvnclient=pysvn.Client(cwd=os.getcwd(),stdout=subprocess.PIPE)logShow the log messages for a set of revision(s) and/or path(s)..client.log(decoding='utf8')diffDisplay local changes or differences between two revisions or pathsclient.diff(start_version,end_version=None,decoding='utf8',cache=False)numstatShows number of added and deleted lines in decimal notation and pathnameclient.numstat(start_version,end_version=None,decoding='utf8',cache=False)LicenseBSD
Package: py-sv-parser
py-sv-parserThis is a simple set of bindings for the wonderfulsv-parserlibrary. Bindings are
written in Rust using PyO3 to provide the Python interface.Currently it only supports the "standard" parsing function and operations on
the tree that function generates. It currently iterates over the provided
tree and generates a new tree with all of the data copied out, so it's quite
a bit less performant than pure native Rust, but all the functionality is
there.The intent is to support 100% ofsv-parser, and eventually map to the
native library's Rust iterators directly for better performance.Installationpip install .I have not yet tested on a machine without the Rust toolchain installed,
so you may have to install that first if you're getting build errors.DocumentationThe Rust docs aren't particularly helpful, as PyO3 consumes the doc comments
and all structure before it gets to rustdoc, so don't bother building those.
To get some API documentation, install and usepdoc3. You must have built
and installed the py_sv_parser package.pip install pdoc3
pdoc3 --html py_sv_parser
Package: pysvt
pysvtAboutA simple test case runner in Python that uses TOML configurations and decorator syntax.Installationpip install pysvtUsageFunctionPythonfrompysvtimporttest@test("<path_to_TOML_file>")deffunction(arg1:int,arg2:int)->int:returnarg1+arg2TOMLname=["One and Two","Two and Three"]metadata=["Add to 3","Add to 5"]i=[[1,2],[2,3]]o=[3,5]or[[cases]]name="One and Two"i=[1,2]o=3metadata="Add to 3"[[cases]]name="Two and Three"i=[2,3]o=5metadata="Add to 5"Input key can be either of - i, in, input, inputsOutput key can be either of - o, out, output, outputsClass (if you want to test instance methods)Pythonfrompysvtimporttest# Specify the name of the method as the second argument@test("<path_to_TOML_file>","function")classSolution:deffunction(self,arg1:int,arg2:int)->int:returnarg1+arg2TOMLname=["One and Two","Two and Three"]metadata=["Add to 3","Add to 5"]init=[]# Has to be specified, indicates class constructor argumentsi=[[1,2],[2,3]]o=[3,5]or[[cases]]name="One and Two"i=[1,2]o=3metadata="Add to 3"init=[]# Has to be specified, indicates class constructor arguments[[cases]]name="Two and Three"i=[2,3]o=5metadata="Add to 5"init=[]Input key can be either of - i, in, input, inputsOutput key can be either of - o, out, output, outputs
Package: pySW
pySWA Wrapper around Solidworks VBA API for Automating Geometry Modifications for Python-based Optimization and Design Space ExplorationpySW is simply a Python wrapper around Solidworks built-in VBA API for automated modifications to Solidworks assemblies and parts.The primary purpose of pySW is optimization studies, Design Space Exploration studies, etc. Many good libraries offer a framework for single and multi-objective optimization, likepymoo,openMDAOandpyOptwritten in Python itself. Design space can be explored using libraries likepyDOE. Apart from these, the famousScipylibrary provides functions for minimizing (or maximizing) objective functions, possibly subject to constraints.In many cases, the optimization or the space exploration problem is not straightforward that it cannot be expressed as an equation or a set of equations. Some problems require some communication links between various software. For example, consider the optimization of a winglet of a commercial aircraft. This problem requires modifying and saving geometry using a CAD program, using a CAE program for analyzing and saving results of the analysis, and a third program/code to act as a link between CAD and CAE code as well as perform the tasks of optimization or space exploration. The first task can be performed using pySW and the third task using the libraries mentioned above.Note: Solidworks is proprietary software of 3DS Systems. If you have access to Solidworks, pySW will make your life much easier if you want to optimize using Solidworks.
As an option, FreeCAD is an open-source primarily CAD program written completely in Python. It also as modules for CFD using OpenFOAM and FEM analyses.It currently cannot modify or create sketches.pySW version 1.4 onwards includes a feature to extract dimensions and tolerances from a SolidWorks drawing (.SLDDRW) document.InstallationYou can install pySW from pip from the command prompt by running:pipinstallpySWDependencies:pywin32NumpypandasYou can install the dependencies by running the following commands in the command prompt. If you have installed the open-source Anaconda distribution for Python, please check if the libaries are already installed.pipinstallpywin32
pipinstallnumpy
pipinstallpandasLicenseGNU Lesser General Public License v3
Package: py-swagger-ui
py_swagger_uiThis package contains the static files for swagger-ui as a python package.Basic configuration options are templated with the Jinja2 templating language.This package is intended to be webserver-agnostic, so it only includes the
static files, and some very basic configuration.Getting StartedYou can import the swagger_ui_path from the py_swagger_ui package like so:frompy_swagger_uiimportswagger_ui_pathYou can easily serve up this directory as all static files to get the default
swagger-ui distribution. Here’s an example in flask:frompy_swagger_uiimportswagger_ui_pathfromflaskimportFlask,Blueprint,send_from_directory,render_templateswagger_bp=Blueprint('swagger_ui',__name__,static_url_path='',static_folder=swagger_ui_path,template_folder=swagger_ui_path)app=Flask(__name__,static_url_path='')app.register_blueprint(swagger_bp,url_prefix='/ui')if__name__=="__main__":app.run()You may wish to override some of the configuration variables. Included
is a jinaj2 templated file where you can modify these parameters.
You can add another route to render this template with your
desired configuration like so:SWAGGER_UI_CONFIG={"openapi_spec_url":"https://petstore.swagger.io/v2/swagger.json"}@swagger_bp.route('/')defswagger_ui_index():returnrender_template('index.j2',**SWAGGER_UI_CONFIG)Have a look atexample.pyfor a complete server for the Flask webserver.LicenseSince this is just repackaging swagger-ui releases, the license comes from
the swagger ui project (https://github.com/swagger-api/swagger-ui).All vendored code is published under the Apache 2.0 License.