Saravanan666/pypi-org huggingface dataset:
Package: polysearch
polysearchThis library provides a collection of state space search algorithms designed to solve problems defined by theStateSpaceProbleminterface. The library includes both blind and informed search algorithms, making it versatile for various problem-solving scenarios.InstallationYou can install this software using pip:pip install -U polysearchYou can install the latest version of the code directly from GitHub:pip install -U git+https://github.com/chaseburton/polysearch@mainImportant LinksSource code:https://github.com/chaseburton/polysearchDocumentation:http://polysearch.readthedocs.orgStructureThe library is structured as a package containing several search algorithms. Each algorithm utilizes a standard interface, allowing users to easily switch between algorithms when solving a problem. To demonstrate the usage of these algorithms, three example problems are provided, which can be run usingblind_search.pyandinformed_search.py.AlgorithmsThe library includes the following algorithms:A Star Search (A*)Best-First Search (BestFS)Branch And Bound (B&B)Breadth-First Search (BFS)Depth-First Search (DFS)Hill Climbing (HC)Iterative Deepening (ID)Uniform Cost Search (UCS)UsageTo use the library, first, create a class for your problem that inherits from theStateSpaceProbleminterface. This interface requires you to define the following methods:initial_state(): Returns the initial state of the problem.goal_check(state): Checks if the given state is a goal state. Allows for problems with multiple or unknown goal states.operators(): Returns the list of operators applicable to the problem.apply_operator(operator, state): Applies the given operator to the state and returns the resulting state.cost(state1, state2): Returns the cost of transitioning from state1 to state2.solution(state): Returns the solution for the problem given the goal state.After defining your problem, you can use any of the algorithms from the library by importing the desired algorithm and passing your problem instance to it. If needed, you can also provide a heuristic function for informed search algorithms like Best-First Search and A* Search.Example# algorithmsfrompolysearch.algorithmsimport*frompolysearch.algorithmsimporta_star_searchfrompolysearch.algorithmsimportbest_first_searchfrompolysearch.algorithmsimportbranch_and_bound_searchfrompolysearch.algorithmsimportbreadth_first_searchfrompolysearch.algorithmsimportdepth_first_searchfrompolysearch.algorithmsimporthill_climbing_searchfrompolysearch.algorithmsimportiterative_deepening_searchfrompolysearch.algorithmsimportuniform_cost_search# existing problemsfrompolysearch.problemsimport*frompolysearch.problems.mazeimportMazeProblemfrompolysearch.problems.missionaries_and_cannibalsimportMissionariesAndCannibalsProblemfrompolysearch.problems.n_queensimportNQueensProblem# example problemfromyour_problemimportYourProblemproblem=YourProblem()solution=a_star_search(problem,heuristic=your_heuristic_function)
Package: polyspace-report2excel
polyspace-report2excelpolyspace-report2excel is a python module which adds the possibility
to read a polyspace report and export misra or run-time results in
an excel file for easier analyse.Package installationpip install polyspace-report2excelUsageExport polyspace data in an HTML report or RTF report then run export-all.py, you can use--help.Script was made for polyspace 2018 but you can run it with polyspace 2014
by adding--poly14argument.By default it export all tables to excel and generate one file per Polyspace chapter.
Use arguments to filter what you need.:warning: by converting RTF file you must precise --runtime or --misraUsage example with the pip packagep2e input.html output-folder/

p2e input.rtf ouput-folder/ --runtimeUsage example by cloning the repositoryIf you don't want to install the packagepolyspace-report2excel, first install the dependencies.pip install .Then, you can run:python src/p2e/main.py input.html ouput-folder/

python src/p2e/main.py input.rtf ouput-folder/ --runtimeArguments--misrawill export misra report only.--runtimewill export run-time report only (ignored if--misra).-ywill force overwrite if output files already exist.--poly14will read report from polyspace 2014--csvwill export data in CSV instead of xlsxCreate you own export scriptYou can also create you own script if needed. WithHTMLReaderyou can
extract all tables from report to python variables, do some operations
and finally write to excel withexportxlsx. You can useexport-all.pyas example or see docstrings insideHTMLReaderorexportxlsx.
Package: polysplit
polysplitA lightweight library for splitting polygons into regions based on proximity of points.OverviewMap quantization is the procedure of dividing a continuous map into a number of discrete regions. The simplest approach that has been used for hundreds of years is to overlap the map with a square grid. However, this approach ignores the geographical features of the map, making it suboptimal for certain applications. With this project, I would like to propose a novel algorithm that organically divides any given map into regions based on the relative travel time between different areas.In its simple form, the proposed algorithm could be applied to a map (a polygon) with intraversible obstacles (holes). It works in 2 stages. In the first stage, the map is overlayed with a fine grid of $N$ points. Then, we calculate the shortest path (around the obstacles) betweeen every pair of points and construct the $N \times N$ distance matrix. In the second stage, we apply the k-medoids algorithm to the set of points, using the matrix from stage I as a distance function, and retrieve a set of $M$ centers. Finally, we construct a Voronoi graph around the centers, creating the regions.Installationpip install polysplitSample usageimportpolysplitfromshapely.geometryimportPolygon# Create a polygon with a holeouter_coords=[(0,0),(0,1),(1,1),(1,0)]hole_coords=[(0.4,0.4),(0.4,0.6),(0.6,0.6),(0.6,0.4)]polygon=Polygon(outer_coords,[hole_coords])# Split the polygonregions=polysplit.polysplit_main(polygon,k=5,num_points=100,plot=True)print(regions)DocumentationYou can find the most up-to-date documentationhere.
Package: polysquare-setuptools-lint
This module provides a lint command to run several well-known python
static analysis tools, including prospector, flake8, pyroma and pylint.Status| Travis CI (Ubuntu) | AppVeyor (Windows) | Coverage | PyPI |
Licence |
|——————–|——————–|———-|——|———|
|`|Travis| <http://travis-ci.org/polysquare/polysquare-setuptools-lint>`_|`|AppVeyor| <https://ci.appveyor.com/project/smspillaz/polysquare-setuptools-lint-7r9ws>`_|`|Coveralls| <http://coveralls.io/polysquare/polysquare-setuptools-lint>`_|`|PyPIVersion| <https://pypi.python.org/pypi/polysquare-setuptools-lint>`_`|PyPIPythons| <https://pypi.python.org/pypi/polysquare-setuptools-lint>`_|`|License| <http://github.com/polysquare/polysquare-setuptools-lint>`_|UsageOptions for 'PolysquareLintCommand' command:
  --suppress-codes   Error codes to suppress
  --exclusions       Glob expressions of files to exclude
  --stamp-directory  Where to store stamps of completed jobsPass--exclude=PAT1,PAT2to exclude glob-expression patterns PAT1
and PAT2 from the list of files to be linted.Pass--suppress-codes=CODE1,CODE2to suppress reported codes
globally.All linter errors can be suppressed inline by usingsuppress(CODE1,CODE2)as either a comment at the end of the line
producing the error or the line directly above it.
Package: polyssifier
PolyssifierPolyssifier runs a multitude of machine learning models on data. It reports scores, confusion matrices, predictions, and plots the scores ranked by classifier performance.InstallationpipinstallpolyssifierHow to useFor classificationfrompolyssifierimportpoly# Load datadata=np.load("/path/to/data.npy")label=np.load("/path/to/labels.npy")# Run analysisreport=poly(data,label,n_folds=8)# Plot resultsreport.plot_scores()report.plot_features(ntop=10)For Regressionfrompolyssifierimportpolyr# Load datadata=np.load("/path/to/data.npy")target=np.load("/path/to/target.npy")# Run analysisreport=polyr(data,target,n_folds=8)# Plot resultsreport.plot_scores()report.plot_features(ntop=10)In the terminalpolydata.npylabel.npy--concurrency10RequirementsSklearnNumpyPandasFeaturesCross validated scores.Report f1 score (scoring='f1') or ROC (scoring='auc') for classificationReport MSE or R^2 for regressionFeature ranking for compatible models (Logistic Regression, Linear SVM, Random Forest)Parallel processing.Control the number of threads with 'concurrency'.We recommend setting concurrency to half the number of Cores in your system.Saves trained models for future use in case of server malfunction.Set project_name for identifying a experiment.Activate feature selection step settingfeature_selection=TrueAutomatically scales your data with scale=TrueExample: onsample/example.ipynbIt includes the following classifiers:Multilayer PerceptronNearest NeighborsLinear SVMRBF SVMDecision TreeRandom ForestLogistic RegressionNaive BayesVoting Classifierand the following regressors:Linear RegressionBayesian RidgePassiveAggressiveRegressorGaussianProcessRegressorRidgeLassoLarsLassoLarsOrthogonalMatchingPursuitElasticNetYou can exclude some of this models by providing a list of names as follows:frompolyssifierimportpolyreport=poly(data,label,n_folds=8,exclude=['Multilayer Perceptron'])
Package: polystar
A C++ library for polygon and polyhedron operations.
Wrapped for use in python usingpybind11.DependenciesTetGenA modified version ofTetGenis used to create
refined tetrahedral meshes in bounding polyhedra.The modified version is included as part of this repository.InstallationInstall viapip, e.g.,python -m pip install polystarThis repository can be installed locally viapython -m pip install .
# or 
python setup.py installAlternatively, the python module, C++ library, andcatch2based tests can be built directly usingcmake.
Package: polyswarm
Polyswarm Customer CLIA CLI tool for interacting with the PolySwarm Customer APIs.Supports Python 2.7 and greater.InstallationFrom PyPI:pip install polyswarmFrom source:python setup.py installIf you want yara validation (optional):pip install -e .[yara]If you get an error about a missing package namedwheel, that means your version of pip or setuptools is too old.
You need pip >= 19.0 and setuptools >= 40.8.0.
To update pip, runpip install -U pip.
To update setuptools, runpip install -U setuptoolsUsageCommand line clientSee thePolyswarm Customer CLI documentationfor usage guidance.Using as a packageThepolyswarm-clipackage is built on top of thepolyswarm-apipackage, and it includes
a set of higher-level methods that facilitates the usage of parallelism when making requests
to the api. We provide a classPolyswarmthat extends fromPolyswarmAPIand includes
these methods. For example:frompolyswarm.polyswarmimportPolyswarmapi=Polyswarm('my-api-key')results=api.search_hashes(['e182cdfd5e7463d11f5e7bc49b4377ab25e58b9ff04266df3c34e6261c7b0df9','d80a1e42791d17cbce8d053afccd1dae7fb9f615676cb81a3a1699e86c344cb8','275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f'])forresultinresults:print(result.id)Each hash lookup is done in a different thread using aThreadPoolExecutorand results are yielded
as they come in in the same order as in the input. All functionality that is available in the command
line tool is also available for developers through this class.Automated TestsTo run automated tests suite (unit and integration):pip install -r requirements.txt
pytestTo check current coverage by tests:pytest --cov=polyswarm tests/Questions? Problems?File a ticket or email us atinfo@polyswarm.io.
Package: polyswarm-api
polyswarm-apiAn interface to the PolySwarm Customer APIs.
For an easy-to-use CLI tool, or as an example of how to use these APIs, please seepolyswarm-cliSupports Python 2.7 and greater.InstallationFrom PyPI:pip install polyswarm-apiFrom source:python3 setup.py installIf you get an error about a missing package namedwheel, that means your version of pip or setuptools is too old.
You need pip >= 19.0 and setuptools >= 40.8.0.
To update pip, runpip install -U pip.
To update setuptools, runpip install -U setuptoolsUsageSee thepolyswarm-api documentationfor usage guidance.API ReferenceSee thepolyswarm-api referencefor API References.Questions? Problems?File a ticket or email us atinfo@polyswarm.io.
Package: polyswarm-artifact
PolySwarm ArtifactPython package for mapping artifact types to the ArtifactType enum in the BountyRegistry contract.Supports python3 >=3.5.2 and >=3.6.5.Versions in this schemaEverything in here is meant to be a part of an evolving schema.
No versions, but all changes are additions only.Use non-null and required carefullySince we cannot remove fields, when a field is no longer useful, it needs to be nullable.
Unfortunately we cannot add nullable at a later date, as that would invalidate new schemas when being read by an oldWe can easily remove required fields, but we cannot add more.
Doing so would invalidated old schemas.Schema objectSchema objects possess the following methods and attributes:dict()returns a dictionary of the model's fields and valuesjson()returns a JSON string representation dict()copy()returns a deep copy of the modelparse_obj()a utility for loading any object into a model with error handling if the object is not a dictionaryparse_raw()a utility for loading strings of numerous formatsparse_file()like parse_raw() but for filesfrom_orm()loads data into a model from an arbitrary classschema()returns a dictionary representing the model as JSON Schemaschema_json()returns a JSON string representation of schema()construct()a class method for creating models without running validation__fields_set__Set of names of fields which were set when the model instance was initialised__fields__a dictionary of the model's fields__config__the configuration class for the model
Package: polyswarm-client
PolySwarm Client LibraryOverviewFor the convenience of those who wish to join the PolySwarm marketplace, this is
a client library to simplify interacting with a polyswarmd instance from your Python code.It includes:abstract classes for ambassador, arbiter, and microengine implementationsexemplar ambassador, arbiter, and microengine implementationshelper classesFor important changes releases, see theRelease History.InstallationYou need python3 >= 3.6.5 and pip >= 20.0.
Then use pip to install polyswarm-client.pipinstallpolyswarm-clientDocumentationWe have extensive documentation on how to use this package available inour docs.For DevelopersRunning TestsInstall all app dependencies:pipinstall-rrequirements.txtInstall all test dependencies:pipinstall-rrequirements-test.txtRun all tests:pytestUpdating VCR cassettesRunpolyswarmd-fastby following the instructions in the project'sREADME.mdfile.Delete the cassette files.Re-run all tests
Package: polysynth
Polysynth Python SDKThe official Python client forPolysynth.Documentation is availablehere.Getting StartedThis library attempts to present a clean interface to Polysynth, but in order to use it to its full potential, you must familiarize yourself with the official Polysynth documentation:InstallationQuoting PricesMaking TradesManaging CollateralsRatiosInstallationYou can install the latest release from PyPI, or install the latest commit directly from git:Install the latest release from PyPI:pip install polysynthInstall from git:pip install git+https://github.com/kryptolabs/polysynth-python.gitClone and install with poetry:git clone https://github.com/kryptolabs/polysynth-python.git
cd polysynth-python
poetry installQuoting Pricesinput_priceReturns the amount of ETH you get for 1 USDPclient.input_price("ETH-USDC", "BUY", 1)output_priceReturns the amount of USDP you need to pay to get 1000 ETHclient.output_price("ETH-USDC", “BUY”, 1000)Making Tradesopen_positionOpen a long position against 1000 USDP worth ETH with a leverage of 1x and slippage  tolerance of 0%client.open_position("ETH-USDC", “BUY”, 1000, 1, 0)close_positionCloses a trader’s all positions for ETH with zero slippage toleranceclient.close_position("ETH-USDC", 0)Managing Collateralsadd_collateralAdd 1000 USDP worth collateral in ETH AMMclient.add_collateral("ETH-USDC", 1000)remove_collateralRemove 500 USDP worth collateral from ETH AMMclient.remove_collateral("ETH-USDC", 500)Ratiosfluctuation_limit_ratioGet fluctuation limit ratio of ETH marketclient.fluctuation_limit_ratio("ETH-USDC")trade_limit_ratioGet trade limit ratio of ETH marketclient.trade_limit_ratio("ETH-USDC")collateral_ratioGet collateral ratio of ETH marketclient.collateral_ratio("ETH-USDC")fee_ratioGet fee ratio of the platformclient.fee_ratio()init_collateral_ratioGet initial collateral ratio of the platformclient.init_collateral_ratio()liquidation_fee_ratioGet liquidation fee ratio of the platformclient.liquidation_fee_ratio()maintenance_collateral_ratioGet maintenance collateral ratio of the platformclient.maintenance_collateral_ratio()partial_liquidation_ratioGet partial liquidation ratio of the platformclient.partial_liquidation_ratio()TestingTo run the full test suite, in the project directory set thePROVIDERenv variable to a  provider, and run:poetry install
export PROVIDER= # URL of provider, e.g. https://mainnet.infura.io/v3/...
poetry shell
poetry run pytestPublish to pipTo build and publish the package to pip,run:poetry shell
poetry build
poetry publishAuthorsArpit SinghParitosh Gupta
Package: polytest
# polymatica-pythonПервым шагом необходимо импортировать модуль бизнес-логики командой`from polymatica import business_scenarios as sc`Далее нужно нициализировать класс бизнес-логики.
Если импользуется механизм беспарольной авторизации, то password указывать не нужно.`sc =sc.BusinessLogic(login="your_login",password="your_password"url="basepoly serverurl")`Скрипты запускаются при помощи команды функций, лежащих в файле business_scenarios.pyФункции в модуле business_scenarios можно посмотреть при помощи стандартной функции Python: dir()Аргументы функций, их смысл, а также прочую docstring-документацию модуля и функций можно посмотреть при помощи стандартной функции Python: help()В модуле business_scenarios есть функции execute_olap_command() и execute_manager_command().
execute_olap_command() должна запускать все команды модуля Olap,
execute_manager_command() должна запускать все команды модуля Manager.# нагрузочное тестирование и тестирование производительности
Первым шагом положить файл`pick_metrics.py`(папка`performance_testing`) на сервер, который будет нагружаться.
На сервере сделать файл исполняемым командой`chmod a+x pick_metrics.py`.
После чего запустить файл командой`./pick_metrics.py60`, где`60`-
количество минут, в течение которых скрипт будет собирать метрики (% загрузки CPU и RAM).
Последний шаг можно также сделать с локальной машины.Локально:В папке`performance_testing`отредактировать файл`config.ini`.Для пользователей Linux: запустить файл`performance_master.sh`(для Windows:`performance_master.sh`),
который запустит locust,
запустит скрипт`pick_metrics.py`,
запустит скрипты, которые будут с периодичностью 10 секунд забирать отчеты с сервера и строить по ним график.В браузере запустить веб-морду locust`http://localhost:8089/`.
В веб-морде указать количество пользователей для нагрузочного тестирования,
количество новых пользователей/сек и хост.Во время нагрузочного тестирования весь поток вывода и поток ошибок пишется в`/polymatica/logs/performance_tests.log`Change Log0.0.1 (01/12/2020)First Release0.0.2 (01/12/2020)Fix unicode letters
Package: polytiles
A script to get tiles from mapnik. Area can be defined by bbox, polygon
or an OSM polygon; tiles can be served in image files or mbtiles. Run
the script without parameters to see command line help.RequirementsMapnik andpython-shapelypackage. Optional dependencies arepython-psycopg2andsqlite3.Author and licenseWritten by Ilya Zverev, based ongenerate_tiles_multiprocess.py,
licensed WTFPL.
Package: polytomic
Polytomic Python LibraryThe Polytomic Python Library provides convenient access to the Polytomic API from applications written in Python.Installationpipinstall--upgradepolytomicUsagefrompolytomic.clientimportPolytomicclient=Polytomic(polytomic_version="YOUR_POLYTOMIC_VERSION",token="YOUR_TOKEN",)Async Clientfrompolytomic.clientimportAsyncPolytomicclient=AsyncPolytomic(polytomic_version="YOUR_POLYTOMIC_VERSION",token="YOUR_TOKEN",)Beta StatusThis SDK is in beta, and there may be breaking changes between versions without a major
version update. Therefore, we recommend pinning the package version to a specific version.
This way, you can install the same version each time without breaking changes.ContributingWhile we value open-source contributions to this SDK, this library is generated programmatically.
Additions made directly to this library would have to be moved over to our generation code,
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
an issue first to discuss with us!On the other hand, contributions to the README are always very welcome!
Package: polytope
This is the source repository forpolytope, a toolbox for geometric
operations on polytopes in any dimension.  Documentation is available in
the directorydoc/and also athttps://tulip-control.github.io/polytope/The directoryexamples/contains examples.InstallationFromPyPI:pip install polytopeFrom source:pip install .DependenciesRequired:numpy,scipy,networkx.
Optionally, ifcvxoptis installed and
linked toGLPK,
thenpolytopewill prefer GLPK,
because it is faster thanscipy.
For more details, seerequirements.txt.Contact and supportAsk for help on thetulip-control-users mailing listFor release announcements, join thetulip-control-announce mailing listBug reports and feature requests should be made athttps://github.com/tulip-control/polytope/issuesPlease check for prior discussion and reports before opening a new issue.LicensePolytope is licensed under the 3-clause BSD license.  The full statement is
provided in the file namedLICENSE.AcknowledgmentPolytope was part of theTemporal Logic Planning Toolbox (TuLiP)before growing to become an independent package.
It originates from changesets 7bb73a9f725572db454a0a5e4957da84bc778f65 and
3178c570ee1ef06eb8ace033f205f51743ac54c6 ofTuLiP.
Package: polyvalid
polyvalidpolyvalidis a Rust library for validating package names, usernames, namespace names, and app names. The library provides a single source of truth for validating the names with the following rules:Start with an alphabet characterHave one or more alphanumeric characters,_or-End with an alphanumeric characterAdditionally, the library checks if the name contains--since it can break URL rules.The library can be used from Python and JS through the provided bindings.Using the libraryThe library can be used from rust, python or javascript. The following describes how to use it from all three languages.Rustcargoaddpolyvalidusepolyvalid;letname:String="polyvalid";assert!(polyvalid::is_app_name_valid(name));Pythonpipaddpolyvalidimportpolyvalidname="polyvalid"polyvalid.is_app_name_valid(name)# returns TrueJavascriptnpmipolyvalidimport"polyvalid";name="polyvalid";polyvalid.is_valid_name(name);// returns trueNext stepsAdd CI to autopublish to wapm, pypi, npmAdd tests for python and JS versions of the libraryAdd wrapper around the python library (to improve usability)ContributingContributions are welcome! If you'd like to contribute topolyvalid, please follow these steps:Fork the repo and create a new branch for your changes.Make your changes, write tests, and ensure that the tests pass.Submit a pull request to thepolyvalidrepo.Wait for feedback or approval from the maintainers.