Saravanan666/pypi-org huggingface dataset:
Package: clusopt-core
ClusOpt CoreThis package is used byClusOptfor
it's CPU intensive tasks, but it can be easily imported in any python data stream clustering project,
it is coded mainly in C/C++ with bindings for python, and features:CluStream (based on MOA implementation)StreamKM++ (wrapped around the original paper authors implementation)Distance Matrix computation (in place implementation using boost threads)Silhouette score (custom in place implementation inspired by BIRCH clustering vector)Prerequisitespython >= 3.6pipboost-threadgcc >= 6boost-threadcan be installed in Debian based systems with :aptinstalllibboost-thread-devUsageSeeexamplesfolder for more.CluStream online clusteringfromclusopt_core.clusterimportCluStreamfromsklearn.datasetsimportmake_blobsimportnumpyasnpimportmatplotlib.pyplotaspltk=32dataset,_=make_blobs(n_samples=64000,centers=k,random_state=42,cluster_std=0.1)model=CluStream(m=k*10,# no microclustersh=64000,# horizont=2,# radius factor)chunks=np.split(dataset,len(dataset)/4000)model.init_offline(chunks.pop(0),seed=42)forchunkinchunks:model.partial_fit(chunk)clusters,_=model.get_macro_clusters(k,seed=42)plt.scatter(*dataset.T,marker=",",label="datapoints")plt.scatter(*model.get_partial_cluster_centers().T,marker=".",label="microclusters")plt.scatter(*clusters.T,marker="x",label="macro clusters",color="black")plt.legend()plt.show()output:BenchmarksSome functions in clusopt_core are faster than scikit learn implementations, see  thebenchmarkfolder for more info.SilhouetteEach bar have a tuple of (no_samples,dimension,no_groups), so independently of those 3 factors, clusopt implementation is faster.Distance MatrixEach bar shows the dataset dimension, so clusopt_core implemetation is faster when the dataset dimension is small (<~150), even when using 4 processes in scikit-learn.InstallationYou can install it directly from pypi withpipinstallclusopt-coreor you can clone this repo and install from the directorypipinstall./clusopt_coreAcknowledgmentsThanks to:Marcel R. Ackermann et al.for the StreamKM++ algorithm -linkThe university of Waikatofor the MOA framework -link
Package: cluspro-api
Python library and associated scripts for submiting jobs and
downloading results from ClusPro.InstallationEnsure you havepip, then run:pipinstall--usercluspro_apior[sudo]pipinstallcluspro_apisudois only needed if you are installing globally. If--useroption is used, binaries
will be in$HOME/.local/bin. We recommend use of Anaconda (https://www.continuum.io).UsageSubmitting JobsTo submit a docking job to ClusPro:cluspro_submit--receptor<pathtoreceptorpdbfile>--ligand<pathtoligandpdbfile>This will prompt you for your username and API secret, which can be found on the API tab
after logging into ClusPro. These will be stored in a.clusprorcfile in your home
directory.Options:$cluspro_submit--helpUsage:cluspro_submit[OPTIONS]Jobsareexpectedtobeinoneoffour"modes":dockingwithaprovidedligandPDBIDorPDBfile,dockinginmultimermode(using--multimer),orpeptidedocking(using--pepmotand--pepseq).Ifusingmultimermodeadd--multimerandspecifydimerortrimer(ex.--multimerdimeror--multimertrimer).Ifusingpeptidemodesupplyboththepeptidemotifandsequence(ex.--pepmotKXRRL--pepseqKGRRL).Ifusingdimerclassificationmodeadd--dcmodeandprovidethechain(s)thatdefinethepotentialdimerinterface(ex.--rec-chainsand--lig-chains).Mixingoptionsfromthesefourmodesisnotsupportedandwillresultinanerrormessage.Options:--usernameTEXT--secretTEXT--coeffsPATHCoefficientsfile[Advanced]--rotationsPATHRotationsfile[Advanced]-j,--jobnameTEXTWilldefaulttojobnumber-a,--antibodymodeUseAntibodymode[Advanced]-o,--othersmodeUseOthersmode[Advanced]--receptorPATHUploadaPDBfile--ligandPATHUploadaPDBfile--recpdbTEXT4-letterPDBcode--ligpdbTEXT4-letterPDBcode--pepmotTEXTPeptidemotif--pepseqTEXTPeptidesequence--pepexclusionTEXTListofPDBidstoexcludefrommotifsearch--rec-chainsTEXTChainstouse,forexample"A B"(indoublequotes)--lig-chainsTEXTChainstouse,forexample"A B"(indoublequotes)--rec-maskPATHReceptormask[Advanced]--lig-maskPATHLigandmask[Advanced]--rec-attractionPATHReceptorattraction[Advanced]--lig-attractionPATHLigandattraction[Advanced]--rec-dsspRemoveunstructuredterminalresiduesinreceptor[Advanced]--lig-dsspRemoveunstructuredterminalresiduesinligand[Advanced]--restraintsPATHUploadrestraintsfile[Advanced]--saxs-filePATHUploadSAXSprofile[Advanced]--masknoncdrAutomaticallymasknon-CDRregion,Antibodymodeonly[Advanced]--multimers[dimer|trimer]Multimermode[Advanced]--dcmodeUseDimerClassificationmode--helpShowthismessageandexitIf you write a script which submits the jobs in a loop, please submit no more than 50 jobs
per batch (and then wait until these jobs finish before submitting more). Please pause for
5-10 seconds between job submissions within each batch.Runningcluspro_submitwill print out the cluspro job id, which you should record and use
later to download your job results.Downloading ResultsTo download results from a finished job:cluspro_download<jobid>You can download multiple jobs at once:cluspro_download<jobid1><jobid2><jobid3>...The results will be saved in the directory from which you ran the command.
Package: clustaar.webhook
clustaar.webhookclustaar.webhookis a framework to build webhooks for theclustaar platform.More documentation is available for building webhooks onhttps://developers.clustaar.comExampleHere is a webhook that will trigger anhandlerfunction each times it receives aconversation.step_reachedevent.fromclustaar.webhookimportWebhook,eventsfromclustaar.schemas.modelsimportStepReachedResponse,ConversationSessiondefhandler(request,response,notification):session=ConversationSession(values={"name":"John"})returnStepReachedResponse(actions=[],session=session)app=Webhook()app.on(events.CONVERSATION_STEP_REACHED,handler)RoutingEventRouting is achieved by specifying an event name to theon()method while configuring your webhook :app.on(events.CONVERSATION_STEP_REACHED,handler)FiltersIf you want to add some condition to route events based on the request received you can use filters.In this example,handlerwill receive the requests only when the event is of typeevents.CONVERSATION_STEP_REACHEDand the value of the JSON keydata.step.idequals"507f191e810c19729de860ea":fromclustaar.webhook.filtersimportJSONKeyEqualsapp.on(events.CONVERSATION_STEP_REACHED,handler,filter=JSONKeyEquals("data.step.id","507f191e810c19729de860ea"))JSONKeyEqualsValidates that a JSON key equals an expected value.data={"user":{"id":1}}filter=JSONKeyEquals("user.id",1)assertfilter(data)data["user"]["id"]=2assertnotfilter(data)JSONKeyInValidates that a key is present in a defined set of values.data={"user":{"id":1}}filter=JSONKeyIn("user.id",[1,2])assertfilter(data)data["user"]["id"]=2assertfilter(data)data["user"]["id"]=3assertnotfilter(data)JSONKeyExistsValidates that a JSON key is present.data={"user":{"id":1}}filter=JSONKeyExists("user.id")assertfilter(data)deldata["user"]["id"]assertnotfilter(data)StepIDValidates that thedata.step.idcorrespond to the expected id.data={"data":{"step":{"id":"507f191e810c19729de860ea"}}}filter=StepID("507f191e810c19729de860ea")assertfilter(data)deldata["data"]["step"]["id"]assertnotfilter(data)If you pass a list of step IDs to theStepIDfilter it will validate the thedata.step.idis present in the list.SecurityRequest signatureIf you want to validate the signature of the requests sent by clustaar, you need to provide a private key.This private key must be set in your bot's webhook configuration.app=Webhook(private_key="XXXXXXXXXX")AuthenticationIf you want to add some authentication to your application you can pass the HTTP basic authentication credentials that you defined in your webhook's configuration.app=Webhook(auth_username="XXXXXXXXXX",auth_password="YYYYYYYYY")
Package: clustar
ClustarRelease: 1.2.1Date: June 27, 2021OverviewA python package for processing and analyzing protostars/protoplanetary disks
in astronomical data in Flexible Image Transport System (FITS) images.These files contain grayscale images represented as two-dimensional arrays,
with each pixel containing the intensity values, and headers containing the
telescope observational parameters.Clustar simplifies and expediates the identification pipeline of FITS files
by automating the preprocessing, grouping, and fitting for a large amount of
FITS files.RequirementsClustar 1.2.1 requiresGEOS >= 3.3Shapely >= 1.7.1Both of these dependencies are available onhttps://anaconda.org/conda-forge.conda install -c conda-forge geos
conda install -c conda-forge shapelyInstallationClustar is available onPyPIand can be installed usingpip:pip install clustarSingular UsageDetect celestial objects in a singular FITS image by creating aClustarDataobject.from clustar.core import ClustarData

# Create the 'ClustarData' object by specifying the path to FITS file.
cd = ClustarData(path='~/data/example.fits', threshold=0.025)

# Visualize the detected groups.
cd.identify()

# Access individual 'Group' objects.
cd.groupsMultiple UsageDetect celestial objects in a directory containing multiple FITS images by
creating aClustarobject.from clustar.search import Clustar

# Setup 'Clustar' object.
cs = Clustar(radius_factor=0.95, threshold=0.025)

# Execute pipeline on directory containing FITS files.
cs.run(directory='~/data/')

# Access individual 'ClustarData' objects.
cs.data

# Check which FITS files raised an error.
cs.errors

# Inspect 'ClustarData' variables for all groups in each FITS file.
cs.display(category='all')Modulesbase.pyInternal module for testing clustar modules.core.pyContains theClustarDataclass, which is responsible for executing
the entire project pipeline for detecting groups in a single FITS image.denoise.pyClustar module for denoising-related methods.fit.pyClustar module for fitting-related methods.graph.pyGeneral module for graphing-related methods.group.pyClustar module for grouping-related methods.search.pyContains theClustarhierarchical class, which is responsible for
transforming all available FITS images in a specified directory into their
respectiveClustarDataobjects.NotesVisithttps://clustar.github.io/for additional information.
Package: cluster
DESCRIPTIONpython-cluster is a “simple” package that allows to create several groups
(clusters) of objects from a list. It’s meant to be flexible and able to
cluster any object. To ensure this kind of flexibility, you need not only to
supply the list of objects, but also a function that calculates the similarity
between two of those objects. For simple datatypes, like integers, this can be
as simple as a subtraction, but more complex calculations are possible. Right
now, it is possible to generate the clusters using a hierarchical clustering
and the popular K-Means algorithm. For the hierarchical algorithm there are
different “linkage” (single, complete, average and uclus) methods available.Algorithms are based on the document found athttp://www.elet.polimi.it/upload/matteucc/Clustering/tutorial_html/NoteThe above site is no longer avaialble, but you can still view it in the
internet archive at:https://web.archive.org/web/20070912040206/http://home.dei.polimi.it//matteucc/Clustering/tutorial_html/USAGEA simple python program could look like this:>>> from cluster import HierarchicalClustering
>>> data = [12,34,23,32,46,96,13]
>>> cl = HierarchicalClustering(data, lambda x,y: abs(x-y))
>>> cl.getlevel(10)     # get clusters of items closer than 10
[96, 46, [12, 13, 23, 34, 32]]
>>> cl.getlevel(5)      # get clusters of items closer than 5
[96, 46, [12, 13], 23, [34, 32]]Note, that when you retrieve a set of clusters, it immediately starts the
clustering process, which is quite complex. If you intend to create clusters
from a large dataset, consider doing that in a separate thread.For K-Means clustering it would look like this:>>> from cluster import KMeansClustering
>>> cl = KMeansClustering([(1,1), (2,1), (5,3), ...])
>>> clusters = cl.getclusters(2)The parameter passed to getclusters is the count of clusters generated.
Package: cluster-challenge
cluster_challengeComparison of cluster algorithm performances on cosmoDC2 and DC2 datasetsDeveloped for the DC2 project:https://portal.lsstdesc.org/DESCPub/app/PB/show_project?pid=248Common framework for the analysis of cosmoDC2, redMaPPer, WaZP and AMICO catalogsUsing CLEVAR packageFor CLEVAR installation: pip install -e clevar  (after python setup.py install --user)DESC environmentCreate a DESC conda environment (to be done only once)source /pbs/throng/lsst/software/desc/common/miniconda/setup_current_python.shconda create --clone desc -p desc_july_2022_v0conda activate desc_july_2022_v0conda install mysql-connector-python -c conda-forgeSetup (to be done every time you log in)source /pbs/throng/lsst/software/desc/common/miniconda/setup_current_python.shconda activate desc_july_2022_v0
Package: clustercheck
clustercheckCheck a cluster before it goes live.Usage:clustercheck -c my.configExample of config:dns_map:
    www.blah.com: kube.aws.longthing.com
    www.bar.com: 12.34.56.7

plugin:
    - lib: myplugin.py
      name: MyCheck

checks:
    - url: "wss://dev-site.example.io"
      plugin: MyCheck
    - url: "wss://prod-site.example.io"
      plugin: MyCheck
    - url: "https://prod-site.example.io"
      expect: 
        contains: some-string
      args:
        verify: FalseThis will run 3 checks, 2 of them will re-use the same plugin (MyCheck), and the 3rd, will just hit the url with requests() lib.Example of plugin:class MyCheck(clustercheck.Plugin):
    def check(self, url, args):
        return TrueArgs are "anything in the args yml".   They are not checked, so plugins must verify these values.Check Execution- dns map is applied first, it monkey-patches the socket library
- dns map is not inherited by subprocesses, it is python in-process only
- each check is executed in order
- if a plugin is not specified, the url must be valid
- plugsin can be named as "module.name" or as "/path/to/file.py"Generic checks- urls are checked for status 200, unless expect: status: is changes.
- websockets are only checked for a ping
- args, if any, are passed to the `requests.request()` or `websocket.create_connection()` calls directly
- default "method" for requests is "GET"Output format- output is recorded internally as (PASS/FAIL, time, message, check_config)
- default output format is: "{ok} [{time}] {message} {config.url}"
- passing results are not output unless --verbose is set
Package: clusterclienttest
Client for compute nodes to communicate via REST API with master server.
This is for test purposes. The master server should be setup withansible django stack.
The django project to test against isdjangotest.FeaturesAuthentication via OAuth2.Sends a request to the REST APISends logs via to Graylog via TCPHistory0.1.1 (2015-07-18)First Release on PyPi0.2.0 (2015-07-28)Use GELFTCPHandler
Package: cluster-coords
Cluster CoordinatesGiven a longitude, and latitude, cluster_coords will create a new latitude and longitude randomly placing it anywhere between 5 and 25 meters from the original longitude and latitude. This is helpful when adding points to a map, you don't want to add a point directly on top of another point, so this module helps you create a cluster.fromcluster_coordsimportRandomCoordlongitude=-82.562800latitude=27.488960coords=RandomCoord(longitude,latitude).randomize_coords()new_lat=coords.latnew_lng=coords.lngInstallationpip install cluster_coords[sonnyparlin@localhostcluster_coords]$pythonPython3.9.1(default,Jan202021,00:00:00)[GCC10.2.120201125(RedHat10.2.1-9)]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>fromcluster_coordsimportRandomCoord>>>coords=RandomCoord(-82.562800,27.488960).randomize_coords()>>>coords.lng-82.56268860928326>>>coords.lat27.489076780986935Code borrowed from Stack Exchange answer:here, answer byhaakon-d.This project is open source and is locatedhere.
Package: clustercron
Clustercronis cronjob wrapper that tries to ensure that a script gets run
only once, on one host from a pool of nodes of a specified loadbalancer.Clustercronselect amasterfrom all nodes and will run the cronjob only
on that node.Free software: ISC licenseDocumentation:https://clustercron.readthedocs.org/en/latest/FeaturesSupported load balancers (till now):AWS Elastic Load Balancing (ELB)AWS Elastic Load Balancing v2 (ALB)
Package: cluster-funk
cluster_funkAn opinionated framework for running big data jobsFor usage pleaseclick hereIf you'd like to work on this tool please read the rest of this readme to get set up with a development environment.ContributeInstallation$ pip install -r requirements.txt

$ pip install setup.pyDevelopmentThis project includes a number of helpers in theMakefileto streamline common development tasks.Environment SetupThe following demonstrates setting up and working with a development environment:### create a virtualenv for development

$ make virtualenv

$ source env/bin/activate


### run cluster_funk cli application

$ cluster_funk --help


### run pytest / coverage

$ make test
Package: clusterfutures
This module provides a Pythonconcurrent.futuresexecutor that lets you run
functions on remote systems in yourHTCondororSlurmcluster. Stop worrying
about writing job files, scattering/gathering, and serialization—this module
does it all for you.It uses thecloudpicklelibrary to allow (most) closures to be used
transparently, so you’re not limited to “pure” functions.Installation:pip install clusterfuturesUsage:importcfutdefsquare(n):returnn*nwithcfut.SlurmExecutor()asexecutor:forresultinexecutor.map(square,[5,7,11]):print(result)Seeslurm_example.pyandcondor_example.pyfor further examples.
The easiest way to get started is to
ignore the fact that futures are being used at all and just use the providedmapfunction, which behaves likeitertools.imapbut transparently
distributes your work across the cluster.Goals & designclusterfuturesis a simple wrapper to run Python functions in batch jobs on
an HPC cluster. Each future corresponds to one batch job. The functions
that you run through clusterfutures should normally run for at least a few
seconds each: running smaller functions will be inefficient because of the
overhead of launching jobs and moving data.Functions, parameters and return values are sent by creating files; this assumes
that the control process and the worker nodes have a shared filesystem.
This mechanism is convenient for relatively small amounts of data; it’s probably
not the best way to transfer large amounts of data to & from workers.
Package: clusterfuzz
ClusterFuzzThis directory contains the source of ClusterFuzz.Building and testing libClusterFuzzRun./build.shto build the pip package.For testing, use a fresh Python 3 virtualenv, and install the package by runningpip install dist/*.whl.Then,$cdtests
$python-munittestPublishingIncrement the version field insetup.py, then run./build.shto build the
pip package. TODO: Tie pip package version to ClusterFuzz version once it's
stable.Per
[https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives],
to publish the pip package,$python3-mpipinstall--user--upgradetwine
$python3-mtwineuploaddist/*
Package: clustergrammer2-core
clustergrammer2_coreCore functionality for Cthe Clustergrammer2 widgetFree software: MIT licenseDocumentation:https://clustergrammer2-core.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-07-21)First release on PyPI.0.2.0 (2021-07-21)Second release on PyPI.
Package: clustering-benchmarks
A Framework for Benchmarking Clustering AlgorithmsMaintained/edited/authored byMarek Gagolewski.This project aims to:aggregate, polish, and standardise the existing clustering benchmark
batteriesreferred to across the machine learning and data mining
literature,introducenew datasetsof different dimensionalities,
sizes, and cluster types,propose aconsistent methodologyfor evaluating clustering algorithms.Seehttps://clustering-benchmarks.gagolewski.com/for a detailed description.How to cite:
Gagolewski M., A framework for benchmarking clustering algorithms,SoftwareX20, 2022, 101270,https://clustering-benchmarks.gagolewski.com,
DOI:10.1016/j.softx.2022.101270.
Package: clustering-coefficient
Clustering CoefficientThis script allows to compute Watts & Strogatz's clustering coefficient of nodes in a graph $G = (V, E)$. It is defined as the edge density of the graph induced from neighbors of a node, relatively to a clique of comparable size. More precisely, given a node $u \in V$, denoting its set of neighbors as $N_G(u)$, the clustering coefficient of $u$ is equal to:$C_G(u) = \frac{|E(N_G(u))|}{d(d-1)/2}$where $d = |N_G(u)|$ is the degree of node $u$ (its number $|N_G(u)|$ of neighbors).Installing and using the pluginThe library relies ontulip-python, a python binding of theC++ Graph Visualization framework Tulip. Tulip also comes as a GUI.Several libraries need to be installed prior to using the plugin, that can for instance be installed runningpoetry install --no-root. The specific dependencies are listed as part of thepyproject.tomlfile. A simple test script can optionally be run.The plugin itself is typically used as:# assuming a graph as already been defined
params = tlp.getDefaultPluginParameters('Clustering Coefficient', graph)
clustering = graph.getDoubleProperty('clustering coeff')
params['result'] = clustering
graph.applyDoubleAlgorithm('Broker score', clustering, params)Alternatively, the plugin may be used within the Tulip GUI after the script has been loaded and ran.
Package: clustering-geodata-cubes
fair-software.nlrecommendationsBadges1. Code repository2. License3. Community Registry4. Enable Citation5. ChecklistOther best practicesContinuous integrationDocumentationCGC: Clustering Geo-Data CubesThe Clustering Geo-Data Cubes (CGC) package focuses on the needs of geospatial data scientists who require tools to make sense of multi-dimensional data cubes. It provides the functionality to performco-clusterandtri-clusteranalyses on both local and distributed systems.InstallationTo install CGC, do:pip install clustering-geodata-cubesAlternatively, you can clone this repository and install it usingpip:git clone https://github.com/phenology/cgc.git
cd cgc
pip install .In order to run tests (including coverage) install thedevpackage version:git clone https://github.com/phenology/cgc.git
cd cgc
pip install .[dev]
pytest -vDocumentationThe project’s full API documentation can be foundonline. Including:Co-clusteringTri-clusteringK-means refinementUtility FunctionsExamples of CGC applications on real geo-spatial data:Co-clustering applicationTri-clustering applicationTutorialThe tutorial of CGC can be foundhere.ContributingIf you want to contribute to the development of cgc, have a look at thecontribution guidelines.LicenseCopyright (c) 2020-2023,Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.CreditsThe code has been developed as a collaborative effort between theITC, University of Twenteandthe Netherlands eScience Centerwithin the generalization of the projectHigh spatial resolution phenological modelling at continental scales.This package was created withCookiecutterand theNLeSC/python-template.
Package: clusterking-physics
DescriptionThis package contains kinematic distributions that can be
clustered by theClusterKinG package.Installationclusterkingcan be installed/upgraded with thepython package installer:pip3install--user--upgradeclusterking_physicsFor the latest development version type:gitclonehttps://github.com/clusterking/clusterking_physics/cdclusterking_physicspip3install--user--editable.DevelopmentSimilar to that of the ClusterKinG package, seethe ClusterKinG documentation.