Saravanan666/pypi-org huggingface dataset:
Package: psoco
Particle Swarm Optimization Constraint Optimization SolverArgumentsNameTypeDefault Valueparticle_sizeint2000max_iterint1000sol_sizeint7fitnessfunctionnullconstraintsa list of functionsnullUsageTransform constraints, it becomes:Note: In order to faster search optimal solutions, please initialize solutions with specific low and high.importpsocoimportmathdefobjective(x):'''create objectives based on inputs x as 2D array'''return(x[:,0]-2)**2+(x[:,1]-1)**2defconstraints1(x):'''create constraint1 based on inputs x as 2D array'''returnx[:,0]-2*x[:,1]+1defconstraints2(x):'''create constraint2 based on inputs x as 2D array'''return-(x[:,0]-2*x[:,1]+1)defconstraints3(x):'''create constraint3 based on inputs x as 2D array'''returnx[:,0]**2/4.+x[:,1]**2-1defnew_penalty_func(k):'''Easy Problem can use \sqrt{k}'''returnmath.sqrt(k)constraints=[constraints1,constraints2,constraints3]num_runs=10# random parameters lead to variations, so run several time to get meanfor_inrange(num_runs):pso=psoco.PSOCO(sol_size=2,fitness=objective,constraints=constraints)pso.h=new_penalty_funcpso.init_Population(low=0,high=1)# x并集的上下限，默认为0和1pso.solve()# best solutionsx=pso.gbest.reshape((1,-1))ReferenceParticle Swarm Optimization Method for
Constrained Optimization Problems
Package: psod
Pseudo-supervised outlier detectionA highly performant alternative to purely unsupervised approaches.PSOD uses supervised methods to identify outliers in unsupervised contexts. It offers higher accuracy for outliers
with top scores than other models while keeping comparable performance on the whole dataset.The usage is simple.1.) Install the package:pipinstallpsod2.) Import the package:frompsod.outlier_detection.psodimportPSOD3.) Instantiate the class:iso_class=PSOD()The class has multiple arguments that can be passed. If older labels exist these could be used
for hyperparameter tuning.4.) Recommended: Normalize the data. PSOD offers preprocessing functions. It can downcast all
columns to reduce memory footprint massively (up to 75%). It can also scale the data. For
convenience both steps can be called together using:frompsod.preprocessing.full_preprocessingimportauto_preprocessscaled=auto_preprocess(treatment_data)However they can also be called individually on demand.5.) Fit and predict:full_res=iso_class.fit_predict(scaled,return_class=True)6.) Predict on new data:full_res=iso_class.predict(scaled,return_class=True,use_trained_stats=True)The param use_trained_stats is a boolean indicating of conversion from outlier scores to outlier class
shall make use of mean and std of prediction errors obtained during training shall be used.
If False prediction errors of the provided dataset will be treated as new distribution
with new mean and std as classification thresholds.Classes and outlier scores can always be accessed from the class instance via:iso_class.scores# getting the outlier scoresiso_class.outlier_classes# get the classesMany parameters can be optimized. Detailed descriptions on parameters can be found using:help(iso_class)By printing class instance current settings can be observed:print(iso_class)The repo contains example notebooks. Please note that example notebooks do not always contain the newest version.
The file psod.py is always the most updated one.See the full articleRelease History1.3.0Widen dependencies for all libraries to support higher versions.1.2.1Make typing import compatible to Python 3.71.2.0Added use_trained_stats to predict functionAdded doc strings to main functionsFixed a bug where PSOD tried to drop categorical data in the absence of categorical data1.1.0Add correlation based feature selection1.0.0Some bug fixesAdded yeo-johnson to numerical transformation options and changed the parameter name and typeAdded preprocessing functionality (scaling and memory footprint reduction)Added warnings to flag risky input paramsChanged default of numerical preprocessing to None (previously logarithmic)Suppressed Pandas Future and CopySettings warningsEnhanced Readme0.0.4First version with bare capabilitiesMetaCreator: Thomas Meißner –LinkedInPSOD GitHub repository
Package: pson
Python library to make querying JSON-like structures easy!With the explosion of APIs returning JSON the use of JSON like structures (i.e what you get if you take JSON and run it through JSON.loads()) querying these types of structures is a common need.Most people either manually traverse the structures or write their own querying logic, this library aims to solve that need by providing a general purpose querying utils. It uses the dot notation to traverse structures in a similar fashion to document databases such as MongoDB.ExamplesTo demonstrate by example with the following JSON:json={'header':{'title':'Hello World','year':2014},'body':{'translations':[{'language':'french','translation':'bonjour'},{'language':'german','translation':'guten tag'}]}}Traditional (pre-pson) approach:>>>json['header']['title']'Hello World'New pson approach:>>>frompsonimportpathqueryaspq>>>pq(json,'header.title')'Hello World'Some more pson examples:>>>frompsonimportpathqueryaspq>>>pq(json,'header.title')'Hello World'

# as you'd expect it can return sub-structures>>>pq(json,'body'){'translations': [{'translation': 'bonjour', 'language': 'french'}, {'translation': 'guten tag', 'language': 'german'}]}

# and arrays>>>pq(json,'body.translations')[{'translation': 'bonjour', 'language': 'french'}, {'translation': 'guten tag', 'language': 'german'}]

# you can query into arrays using numerical indicies>>>pq(json,'body.translations.0.language')'french'

# you can also not specify an index and get back an array where the rest of the query
# is applied to every element in the array>>>pq(json,'body.translations.language')['french', 'german']How does it handle missing values ?>>>frompsonimportpathqueryaspq# by default it returns None rather than throwing an exception>>>pq(json,'header.author')None

# you can over-ride what it returns though>>>pq(json,'header.author',missing="Unknown")'Unknown'

# which is useful for situations like where you're building strings and don't want to deal
# with lots of KeyError exceptions>>>pq(json,'header.title')+' by '+pq(json,'header.author',missing="Unknown")'Hello World by Unknown'InstallationTBDAuthorsBuilt by Imran Ghory (@imranghory). Released under the MIT Licence. Contributions welcome via Github.
Package: psopt
PSOptA particle swarm optimizer for combinatorial optimizationProject Informationpsoptis released under theMIT,
its documentation lives atRead the Docs,
the code onGitHub,
and the latest release onPyPI.If you'd like to contribute topsoptyou're most welcome. We've created alittle guideto get you started!InstallationPython version supportOfficially Python 3.6 and aboveInstalling from PyPIPSOpt can be installed via pip fromPyPIpip install psoptInstalling from sourceClone the repository via:git clone https://github.com/artur-deluca/psopt/ --depth=1Activate your virtual environment and run:python setup.py install#oralternativelypip install -e .If you wish to install the development dependencies, run:python setup.py build#oralternativelypip install -e.[all]Running the test suiteTo run the tests written for psopt, make sure you havepytestinstalled in your venv.
Additionally, if you wish to run coverage analysis as well, make sure to havepytest-covinstalled as well.#tosimplyexecutethetestsrun:pytest#toruncoverageaswellrun:pytest --cov=psopt#oralternatively:make test
Package: ps-optimize
ps-optThis Python package provides a tool for hyperparameter tuning and feature selection in machine learning models using Particle Swarm Optimization (PSO) techniques. The package includes a vanilla PSO for feature selection, a vanilla PSO for hyperparameter tuning, and two different PSO variants for machine learning hyperparameter tuning.FeaturesVanilla PSO for Feature Selection: This feature uses the standard PSO algorithm to select the most optimal features for a given machine learning model. The algorithm works by searching the feature space and identifying a subset of features that maximizes the performance of the model.Vanilla PSO for Hyperparameter Tuning: This feature uses the standard PSO algorithm to tune the hyperparameters of a given machine learning model. The algorithm works by searching the hyperparameter space and identifying a set of parameters that maximize the performance of the model.PSO Variants for Hyperparameter Tuning: This package includes two different PSO variants for hyperparameter tuning. These variants offer different search strategies and can provide better results depending on the specific characteristics of the problem.Cross-Validation: The package uses cross-validation in the hyperparameter tuning process to avoid overfitting and to ensure that the tuned parameters generalize well to unseen data.Example UsageThe following is a basic example of how to use this package:InstallationInstall it using pip:pip install ps-optimizeHyperparameters Tuningimport pandas as pd
from sklearn.datasets import make_classification
from ps_opt.hyperparameters_tuning import ParticleSwarmSearchCV
from ps_opt.search_space_characteristics import Categorical, Real, Integer
from sklearn.linear_model import LogisticRegression


X, y = make_classification()
X = pd.DataFrame(X)
y = pd.Series(y)

search_space = {
    "penalty": Categorical("l1", "l2", "elasticnet", None),
    "max_iter": Integer(10, 20, "exponential"),
    "tol": Real(.0001, .1, "uniform"),
    "solver": Categorical('lbfgs', 'liblinear', 'newton-cg', 'sag', 'saga')
}

psocv = ParticleSwarmSearchCV(
    search_space=search_space,
    n_particles=30,
    estimator=LogisticRegression,
    cv=5,
    scoring="accuracy",
    max_iter=10,
    n_jobs=1,
    verbosity=0
)

psocv.fit(X, y)

print(f"Best Score: {psocv.best_score_}")
print(f"Best Parameters: {psocv.best_params_}")
print(f"Best Probabilities: {psocv.best_proba_}")Feature Selectionimport pandas as pd
from sklearn.datasets import make_classification
from ps_opt.feature_selection import ParticleSwarmFeatureSelectionCV
from ps_opt.search_space_characteristics import Categorical, Real, Integer
from sklearn.linear_model import LogisticRegression


X, y = make_classification()
X = pd.DataFrame(X)
y = pd.Series(y)

psocv = ParticleSwarmFeatureSelectionCV(
    n_particles=30,
    estimator=LogisticRegression,
    cv=5,
    scoring="accuracy",
    max_iter=10,
    n_jobs=-1,
    verbosity=0
)

psocv.fit(X, y)

print(f"Best Score: {psocv.best_score_}")
print(f"Best Features: {psocv.best_features_}")
print(f"Best Probabilities: {psocv.best_proba_}")
Package: pspartition
Python bindingHow to buildThe binding usesCython.
To package the library, usepython setup.py bdist_wheel.
Install the package bypip install --user pspartition.
Below is the pre-built binary packages:Platformpy3.6py3.7WindowsTTMacOSTTLinuxTTDemo codeimportpspartition# classify the three data points shown in the above figureg=pspartion.PsPartition(3,[(0,1,1),(1,2,1),(0,2,5)])# index started from zero, similarity is 5 for vertex 0 and 2g.run()# default to use psp_i algorithm to classify themprint(g.get_critical_values())# [2,5]print(g.get_partitions())# get the result which has at least 2 categories, which is [0,1,0]ChangeLogVersion 0.2: exposePSP(C++) class, which is high customizable in python.Version 0.3: exposePyGraphPDT(C++) class, which has similar API asPyGraphbut different inner implementation.Version 0.5: exposerun_psp_iforInfoCluster.Version 0.7: change the python binding name frominfo_clustertopspartition.
Package: pspca
FeaturesTODORequirementsTODOInstallationYou can installProjective Space PCAviapipfromPyPI:$pipinstallpspcaUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Prjective Space PCAis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: pspdfutils
PDF and PostScript UtilitiesWeb site:https://github.com/rrthomas/psutilsMaintainer: Reuben Thomasrrt@sc3d.orgPSUtils is a suite of utilities for manipulating PDF and PostScript
documents. You can select and rearrange pages, including arrangement into
signatures for booklet printing, combine multple pages into a single page
for n-up printing, and resize, flip and rotate pages.PSUtils is distributed under the GNU General Public License version 3, or,
at your option, any later version; see the file COPYING. (Some of the input
files in the tests directory are not under this license; see the file
COPYRIGHT in that directory.)If you simply want to use PSUtils, you will find it in most GNU/Linux
distributions; it is available in brew for macOS and Cygwin for Windows.PostScript files should conform to the PostScript Document Structuring
Conventions (DSC); however, PSUtils intentionally does not check this, as
some programs produce non-conforming output that can be successfully
processed anyway. If PSUtils does not work for you, check whether your
software needs to be configured to produce DSC-conformant PostScript.Some old Perl scripts, which mostly fix up the output of various obsolete
programs and drivers to enable PSUtils to process it, are available in git
in theold-scriptsdirectory. They are not supported, and their use is
discouraged, unless you know you need them!InstallationThe easiest way to install PSUtils is from PyPI, the Python Package Index:pip install pspdfutils(Note the PyPI package name!)Installation from source or gitPSUtils requires Python 3.9 or later, a handful of Python libraries (listed
inpyproject.toml, and automatically installed by the build procedure),
and libpaper, which allows named paper sizes to be used and configured:libpaper:https://github.com/rrthomas/libpaperIn the source directory:python -m build(requires thebuildpackage to
be installed).Note that to use the scripts before installing them, you need to run them
as Python modules; for example:PYTHONPATH=. python -m psutils.command.psnup -2 foo.psBugsPlease send bug reports, patches and suggestions to the bug tracker or
maintainer (see the top of this file).AcknowledgementsPSUtils is written and maintained by Reuben Thomas. Version 1 was written by
Angus Duggan.psselect in modeled on Chris Torek's dviselect, as is psbook, via Angus
Duggan's dvibook; pstops is modeled on Tom Rokicki's dvidvi. psjoin was
originally written by Tom Sato.
Package: pspec
pspec=====[![Build Status](https://travis-ci.org/bfirsh/pspec.png?branch=master)](https://travis-ci.org/bfirsh/pspec)Python testing for humans, built with [Attest](http://packages.python.org/Attest/).Tests shouldn't just be for computers to check your code runs correctly. They can also be used by humans to understand what your code does.pspec tests are designed to be parsed by humans. They look a bit like this:```pythonfrom pspec import describe, assert_raisesimport randomwith describe('random'):with describe('shuffle'):def it_does_not_lose_any_elements():seq = range(10)random.shuffle(seq)seq.sort()assert seq == range(10)def it_raises_an_exception_for_an_immutable_sequence():with assert_raises(TypeError):random.shuffle((1, 2, 3))with describe('choice'):def it_picks_an_element_that_is_in_the_sequence():seq = range(10)assert random.choice(seq) in seq```(Compare with a [similar example for the built-in unittest module](http://docs.python.org/library/unittest.html#basic-example).)They are run with the `pspec` command:$ pspec random_specDevelopment install-------------------$ pip install -r requirements.txt$ python setup.py developTest suite----------$ pspec specGoals-----**Note:** pspec is still in its infancy. Don't expect it to be useful yet.Here's some stuff I want it to do:- Beautiful test reports with coloured string diffs. (Similar to [Mocha's](http://visionmedia.github.com/mocha/#string diffs))- Contexts, before/after hooks, etc.It's going to be simple, Pythonic and use minimal magic.
Package: pspec-likelihood
A small but powerful interface to generate theoretical likelihoods from ``UVPSpec`` objects.Full DocumentationRead the docs.FeaturesIngests data output fromhera_pspec: power spectra, covariance matrices and
window functions.Agnostic to theory code (i.e. run 21cmFAST or ARES or any other model)Outputs a log-likelihood to be used in parameter inference, but is sampler
agnostic.InstallationClone/download the repo andpip install ., orpip installgit+git://github.com/hera-team/pspec_likelihood.If developing:git clone https://github.com/hera-team/pspec_likelihood
cd pspec_likelihood
pip install -e .[dev]
pre-commit installQuickstartImport like this:from pspec_likelihood import DataModelInterface, GaussianTo construct a likelihood, you first need to construct theDataModelInterface,
for which you will specify the data, its covariance, a window function,
and a model both for the theory and the systematics. This class contains all the methods
required to compute the model/systematics and transform it consistently to data-space.Secondly, you need to construct aPSpecLikelihood, via one of its concrete sub-classes.
Examples of such subclasses areGaussianandGaussianLinearSystematics. The
reason these are their own class, instead of being part of theDataModelInterface,
is for the sake of modularity and extensibility. This allows different actual likelihoods
to be computed given the data, and new likelihoods to be implemented with ease.
The basic requirement of aPSpecLikelihoodsubclass is that it must implement theloglike(theory_params, sys_params)method, which goes and computes the actual
log-likelihood given a set of parameters. It has access to theDataModelInterfaceobject through itsmodelattribute. So, eg.:likelihood = Gaussian(
    model = DataModelInterface(...)
)

likelihood.loglike(theory_params, sys_params)VersioningFrom v0.1.0,pspec_likelihoodwill be using strict semantic versioning, such that increases in
themajorversion have potential API breaking changes,minorversions introduce
new features, andpatchversions fix bugs and other non-breaking internal changes.If your package depends onpspec_likelihood, set the dependent version like this:pspec_likelihood>=0.1
Package: psphost-sdk
PSPHost payment page SDKThis is a set of libraries in the Python language to ease integration of your service
with the PSPHost Payment Page.Please note that for correct SDK operating you must have at least Python 3.5.Payment flowInstallationInstall with pippipinstallpsphost-sdkGet URL for paymentfrompayment_page_sdk.gateimportGatefrompayment_page_sdk.paymentimportPaymentgate=Gate('secret')payment=Payment('402')payment.payment_id='some payment id'payment.payment_amount=1001payment.payment_currency='USD'payment_url=gate.get_purchase_payment_page_url(payment)payment_urlhere is the signed URL.Handle callback from PSPHostYou'll need to autoload this code in order to handle notifications:frompayment_page_sdk.gateimportGategate=Gate('secret')callback=gate.handle_callback(data)datais the JSON data received from payment system;callbackis the Callback object describing properties received from payment system;callbackimplements these methods:callback.get_payment_status()Get payment status.callback.get_payment()Get all payment data.callback.get_payment_id()Get payment ID in your system.
Package: pspipe
Power Spectra Generation pipeline for CD/EoR experimentspspipe is an analysis pipeline which aims to make generation of high precision power-spectra for Cosmic Dawn and Epoch of Reionization experiments as easy and reproducible as possible. pspipe is the default analysis pipeline of theLofar-EoRandNenuFARCD projects. It performs all tasks from calibrated data to final the power-spectra, including:Post-calibration flagging (usingAOflaggerandSSINS)Visibility gridding (usingWSClean)Foregrounds modeling and removal (usingGPR,GMCA, polynomial fitting)Optimal power-spectra generation (usingps_eor)Thanks to its multi-nodes concurrent processing, pspipe is also very fast at crunching hundreds of hour of calibrated data.Installationpspipe can be installed via pip:$ pip install pspipeand requires Python 3.7.0 or higher. For certain tasks, you will also needDPPPandWSCleanDocumentationPlease check thewiki page.
Package: pspipe-utils
Useful functions forPSpipe, the Simons Observatory and ACT CMB power spectrum pipeline.Installing the codeThe easiest way to install and to usepspipe_utilslikelihood isviapippipinstallpspipe_utilsIf you want to dig into the code, you’d better clone this repository to some locationgitclonehttps://github.com/simonsobs/pspipe_utils.git/where/to/cloneThen you can install thepspipe_utilssuite and its dependenciesviapipinstall-e/where/to/cloneThe-eoption allow the developer to make changes within thepspipe_utilsdirectory without
having to reinstall at every changes. If you plan to just use the utilities suite and do not develop
it, you can remove the-eoption.
Package: ps.plone.basepolicy
ps.plone.basepolicyBasic Site Policy forPropertyshelfPlone Websites.Installed Add-OnsThe following Add-Ons will be installed automatically:Products.PloneFormGencollective.contentleadimagecollective.quickuploadplone.app.themingCustom SettingsWhen installed, some Plone settings will be adjusted, like:SMTP server and portSite ‘From’ name and addressGenerate tabs for items other than foldersEnable sitemap.xml.gzEnable Dublin Core metadataOpen external links in new windowDon’t use email address as login nameMostly HarmlessChangelog0.3 (2016-01-20)Don’t set email_from_address by default.0.2 (2014-03-05)Install collective.quickupload.Remove ‘Allow sendto’ permission to disable sendto_form spams.0.1 (2014-03-05)Initial release.Added dependency to Products.PloneFormGen, collective.contentleadimage and plone.app.theming.Configure Plone email settings.Enable sitemap.xml.gz and DC metadata.
Package: ps.plone.fotorama
ps.plone.fotoramaFotorama slideshow for Plone.Mostly HarmlessChangelog4.6.4.3 (2016-11-21)Fix browserlayer errors in GS profiles.4.6.4.2 (2016-11-18)Add Plone 5 compatibility.4.6.4.1 (2016-02-10)Use plone resource urls for pngs.4.6.4 (2016-02-08)Update fotorama to 4.6.4. This release ships with a minified JS version.4.6.3 (2016-02-08)Update fotorama to 4.6.3.4.6.2.2 (2015-01-26)Don’t cook and compress JS file to avoid jQuery conflicts.4.6.2.1 (2014-11-24)Use plone resource urls for pngs.4.6.2 (2014-11-21)Initial release.
Package: ps.plone.jssor
==========================================Jssor Slider Integration (ps.plone.jssor)for propertyshelf MLS listings==========================================This Addon provides a configurable Viewlet for the Plone CMS, implementing the Jssor Image Gallery for a set of dynamic Listings of the propertyshelf MLS solution.This Addon offers a configuration panel that allows to customize the resulting Gallery in nearly every aspect and should allow the max. amount of customizations through configuration.Contributors============Developed by:--------------- Propertyshelf, Inc., development@propertyshelf.comChangelog=========0.4.1 (2015-10-07)------------------- Nothing changed yet.0.5 (2015-10-06)----------------- Nothing changed yet.0.4 (2015-10-02)----------------- order FeaturedListing as defined in its configuration0.3 (2015-07-27)----------------- add new data layouts for Listing Captions (Price + Bed + Bath , Property type + Bed + Bath + Price)- update default css, remove all dark and strong colors- set new standard setting for new Sliders- add IE 10+ support for SliderCaptions0.2.1 (2015-06-23)------------------- optimize MANIFEST.in to work with Windows OS0.2 (2015-06-08)----------------- introduce extended CaptionData0.1.1 (2015-06-03)------------------- add default css to be compatbile with vanilla-theme0.1 (2015-06-02)----------------- first release