Saravanan666/pypi-org huggingface dataset:
Package: partifact
partifactpartifact is a tool to help with configuring and authenticating CodeArtifact as a repository forPoetryandpip.AWS CLIoffers functionality to configure CodeArtifact for pip.
This tool offers the following improvements over the CLI:Poetry support.Assuming an AWS role to get the token. This is handy in automated pipelines, which may have the access key and secret key as environment variables,
but want to install packages from CodeArtifact on a different account.Configuration persisted in a config file, making the tool more convenient to use than the CLI with the options it requires to be passed in from the command line.How to use it?Install partifact from pypi using pip the usual way:pipinstallpartifactIt's best to do this globally, rather than inside the virtualenv.Before you can use partifact, the Poetry source repository needs to beconfiguredinpyproject.toml.[[tool.poetry.source]]name="my-repo"url="https://{code_artifact_domain}-{aws_account}.d.codeartifact.{aws_region}.amazonaws.com/pypi/{code_artifact_repository}/simple/"default=true# if this should be the default repository to install fromIf you are publishing to the repository, the/simple/suffix is not required at the end.Once Poetry is configured, you can use the partifact command to authenticate:partifactloginmy-repoNOTE: Make sure your run the command from the directory where yourpyproject.tomlis!Optionally, you can pass in an AWS profile and/or AWS role to use
for CodeArtifact token generation.partifactloginmyrepo--profilemyprofile
partifactloginmyrepo--rolemyroleIf you would also like to configureglobal.index-urlin thepipconfig,
you can do so through the--configure-pipflag.partifactloginmyrepo--profilemyprofile--configure-pipKnown issuesTheCodeArtifacttoken seems to exceed the maximum length allowed in Windows Credential Manager, resulting
in a misleading(1783, 'CredWrite', 'The stub received bad data.')error. The library has been tested on macOS.
Package: partiql
partiql-pyAn implementation of PartiQL written in RustDocumentInstallationpip install partiqlpoetry add partiqlUsageimport partiql as pq

data = {
    "SHELL": "/bin/bash",
    "NAME": "my machine name",
    "PWD": "/home/fuyutarow/partiql-rs",
    "LOGNAME": "fuyutarow",
    "HOME": "/home/fuyutarow",
    "LANG": "C.UTF-8",
    "USER": "fuyutarow",
    "HOSTTYPE": "x86_64",
    "_": "/usr/bin/env",
}
dl = pq.DataLake(data)
dl = dl.query("SELECT NAME, LOGNAME")
output = dl.to("json")
expected = """[{"NAME":"my machine name","LOGNAME":"fuyutarow"}]"""
assert output == expectedTestmakers test:pyFamiliycontentlangpackagepqCLI (brew, scoop)partiql-rsRust (cargo)https://crates.io/crates/partiql-rspartiql-jsJavaScript (npm)https://www.npmjs.com/package/partiql-jspartiql-pyPython (pip)https://pypi.org/project/partiql
Package: partis
Readme for partisUtilities for defining and validating schemas for YAML/JSON compatible data, and
for configuring and running programs/workflows using the domain specific
Nano Workflow Language (NWL).InstallationCompatible with Python >= 3.6, pip >= 18.1.For full install of core API, docs, runtime utilities, and GUI application:python3make_dists.pypip3install--find-links./distpartisTo install only a particular set of sub-component(s), such as the nwl command-line runner:pip3install--find-links./distpartis-pyprojpip3install--find-links./distpartis-utilspip3install--find-links./distpartis-schemapip3install--find-links./distpartis-nwlNote that unless distributions have already been generated and made available to
pip, these must be done in the above order.Building the DocumentationThedocfolder is made as a runnable python module to conveniently
build documentation.
By default, html documentation will be generated in abuilddirectory.pip3install--find-links./dist'.[doc]'python-mdocNoteAny changes to source-code will not be reflected until the package is rebuilt.Running the TestsThetestfolder is made as a runnable python module to conveniently
run automated test suite.To test the GUI, Xvfb must also be installed on the system to create
a virtual display in order to run the Qt application without displaying windows.
If Xvfb is not found those tests will be skipped.To test multiple versions of python, they must all be discoverable within thePATHenvironment variable.
The tests configured for versions of python that cannot be found will be skipped.
For example, if the python installations are being managed with the Environment
Modules convention:moduleloadpython/3.6.2moduleloadpython/3.7.0moduleloadpython/3.8.0moduleloadpython/3.9.0It is highly recommended to install package and dependencies within a virtual
environment to isolate the effects of any changes it may cause.pipinstall--find-links./dist'.[test]'python-mtestDevelopmentpre-commitBefore committing any changes to this repo, please install pre-commit and hooks.pipinstallpre-commitpre-commitinstallpre-commitrun--all-filesA convenience scriptrunme.pyis placed in the root directory to perform this action,
and needs to be run only once.NoteThepre-commitprogram is installed as a Python package.
If a virtual environment is used during development, ensure thatpre-commitis installed in the environment active at the time of any commit.
Package: partisan_dislocation
Partisan DislocationThis package implements the partisan dislocation measure fromPartisan Dislocation: A Precinct-Level Measure ofRepresentation and Gerrymandering by Deford, Eubank, & Rodden.It takes as input a GeoDataframe of polygons with columns containing vote counts for both political parties for each polygon. it includes three functions which, when used sequentially, will return a GeoDataframe of representative voter point along with associated dislocation scores for each point.In addition, therepository for this packagealso include the shapefiles of US precincts and their vote totals from the 2008 presidential election used in Deford, Eubank, Rodden. these can be found in the folder "2008_presidential_precinct_data." It also includes CSV containing all of the underlying data behind Figure 10 from the Partisan Dislocation paper in the folder "figure_10_csv". Note that to download this data, you will have to first installgit-lfsbefore cloning the repository.The three functions provided by the package are:random_points_in_polygon: takes a polygon GeoDataframe with the number of votes cast democrats and republicans in each polygon and returns a GeoDataframe off of representative voter points.calculate_voter_knn: takes a voter point GeoDataframe and returns a voter point GeoDataframe with voter knn scores.calculate_dislocation: takes a voter point GeoDataframe with knn scores and a GeoDataframe with electoral district polygons and returns voter dislocation scores.TutorialDemonstration of how the package can be used can be found indislocation_tutorial.ipynb.InstallationThis package can be easily installed usingpip:pip install partisan_dislocationDislocation MapsThis repository also includes partisan dislocation maps --- analogous to those inDeford, Eubank, Rodden--- for all states and legislative levels. Those can be found in thepartisan_dislocation_mapsfolder.Development NotesTo run test suite, set working directory to top level and runpython -m unittest partisan_dislocation/tests/test_partisan_dislocation.py(after ensuring pip-installed version of package not in current environment).To build package: install flit, and from root directory runflit build.To install locally, build then runflit install.To create new release, build, update version in__init__.py, then runflit publish.
Package: partis-basis
CLI utility for using Singularity container as virtual environment (requires singularity to already be installed).$ basis --help
Usage: basis [OPTIONS] [CMD]...

Options:
  -i, --image TEXT
  -a, --app TEXT    {bash, fish, jupyter, code}
  -b, --basis PATH
  -w, --work PATH
  -c, --cwd PATH
  --help            Show this message and exit.The first time it is run it will download a pre-build Singularity image.
You must also tell it where to create the basis directory on the first run, which
will become a virtual home inside the container.$basis-b./.basis
image:library://kcdodd/basis/ubuntu-22.04-basis:0.0.1app:fish
basis:/path/to/cwd/.basiswork:/cwd:/path/to/cwdcmd:
Enteringcontainer...
INFO:Usingcachedimage
Loadingpython/3.11.0/gcc-systemLoadingrequirement:gcc/system/default
Creatingenvironment:/basis/envs/default
Creatingmodulefile/basis/mods/environment/default
Loadingenvironment:/basis/envs/default
Savedmodulesto/basis/envs/default/modules
gcc/system/defaultpython/3.11.0/gcc-systemenvironment/default
Loadingenvironment:/basis/envs/default
Welcometofish,thefriendlyinteractiveshell
Typehelpforinstructionsonhowtousefish
>?ok|10:43:13|0ms
>[S]user@hostname|(default)|/work/path/to/cwd
>$echo$HOME/basis
>?ok|10:55:36|0ms
>[S]user@hostname|(default)|/work/path/to/cwd
>$whichpython
/basis/envs/default/bin/python
>?ok|10:59:06|6ms
>[S]user@hostname|(default)|/work/path/to/cwd
>$exit...ExitedcontainerSafely delete basis directory to start over.rm -r ./.basis
Package: partition
partition```partiton` is a Python algorithm library which provides efficient algorithms for thenumber partition problem. You can also use it from shell command. These algorithms have many applications. One typical one is forparallel software testing. Currently, the following three algorithms are supported:greedy algorithm, which is a benchmark algorithm with simple logindifferencing algorithm, a.k.a. Karmarkar–Karp(KK) algorithmdynamic programming(DP) algorithm, which is optimal for scenarios where the size of integers is not too largeInstallUse pip:pipinstallpartitionFrom source code:pythonsetup.pydevelopHow to usecommand line usageGet help:partition-hQuery version:partition--versionAvailable options:usage:partition[-h][--numbersNUMBERS][--grouplenGROUPLEN][--algorithm{greedy,kk,dp}][--version]optionalarguments:-h,--helpshowthishelpmessageandexit--numbersNUMBERSintegernumberstobepartitioned,seperatedbycomma--grouplenGROUPLENlengthofgroupstoholdthepartitionedintegernumbers,defaultis2--algorithm{greedy,kk,dp}selectpartitionalgorithms,availableoptionsaregreedy,kkanddp--versionprintversionFor example:root@foo:~#partition--numbers1,2,3,4,5--grouplen2--algorithmgreedy
Partition1,2,3,4,5into2groups,usingalgorithm:greedy
Group:0,numbers:[5,2,1]Group:1,numbers:[4,3]Mingroupsum:7,Maxgroupsum:8,difference:1Group(s)withminsum:[4,3]Group(s)withmaxsum:[5,2,1]([[5,2,1],[4,3]],1)python library usageIn[1]:importpartitionIn[2]:partition.partition.__version__Out[2]:'0.1.0'In[3]:partition.greedy.greedy([1,2,3,4,5],2)Out[3]:[[5,2,1],[4,3]]In[4]:partition.kk.kk([1,2,3,4,5],2)Out[5]:[[5,3],[1,2,4]]LisenseMITMaintenanceThis tool is developed byslxiao. You are welcome to raise anyissuesabout the tool.
Package: partitioner
## SynopsisThis is the Python partitioner project. The partitioner module performs advanced NLP tasks essentially equivalent to tokenization (e.g., splitting texts into words), with generalizations into multiword expressions (MWE) segmentation. A definition for those unfamiliar with MWEs:“A group of tokens in a sentence that cohere more strongly than ordinary syntactic combinations.”Thus, partitioner may be used to split texts “phrases” of one or more words.## Code ExampleTo load the module, run:>>> from partitioner.tools import partitionerSince the module comes with no data, running informed partitions will require acquiring the training data, which may be acquired by engaging the.download()method:>>> pa = partitioner()>>> pa.download()Note that the above will require responding to a prompt.Additionally, since high-perfornace versions of the partitioner utilize the nltk package’sPerceptronTagger()function, consider running:>>> import nltk>>> nltk.download()and download all nltk data.Once the training data has been downloaded, the following will load all English data sets. This requires significant memory resources, but results in a high-performance model:>>> pa = partitioner(language = “en”, doPOS = True, doLFD = True, maxgap = 8, q = {“type”: 0.74, “POS”: 0.71})>>> pa.partition(“How could something like this simply pop up out of the blue?”)[‘How’, ‘ ‘, ‘could’, ‘ ‘, ‘something’, ‘ ‘, ‘like’, ‘ ‘, ‘this’, ‘ ‘, ‘simply’, ‘ ‘, ‘pop up’, ‘ ‘, ‘out of the blue’, ‘?’]The memory overhead comes from an English Wikipedia data set. While bulky, this data set provides a huge number of named entities. To load from a specific English source, use:>>> pa = partitioner(language=”en”, source=”wiktionary”)or one of the other data sets. To view all of the available datasets, check out:>>> pa.datasetsTo load all sets from a specific language (assuming data has been added beyond the starter data, which comes from Wikipedia), use:>>> pa = partitioner(language=”es”, source=””)## MotivationThe original goal of the partitioner project was to create a fast, efficient, and general algorithm that segments texts into the smallest-possible meaningful units, which we refer to as phrases. This essentially coincides with the NLP task for comprehensive MWE segmentation segmentation. Reference for this modules function may be found in the following article:https://arxiv.org/pdf/1608.02025.pdf## InstallationUsing pip from the command line:>>> pip install partitionerAlternatively, if using git from a command line first clone the repository:>>> git clonehttps://github.com/jakerylandwilliams/partitioner.gitthen navigate the repository’s main directory and run:>>> sudo python setup.py install## ContributorsJake Ryland Williams and Andy Reagan## LicenseApache
Package: partition-igraph
Graph Partition and MeasuresPython3 code implementing 11 graph-aware measures (gam) for comparing graph partitions as well as a stable ensemble-based graph partition algorithm (ecg). This verion works with the igraph package. A version for networkx is also available: partition-networkx.Graph aware measures (gam)The measures are respectively:'rand': the RAND index'jaccard': the Jaccard index'mn': pairwise similarity normalized with the mean function'gmn': pairwise similarity normalized with the geometric mean function'min': pairwise similarity normalized with the minimum function'max': pairwise similarity normalized with the maximum functionEach measure can be adjusted (recommended) or not, except for 'jaccard'.
Details can be found in:Valérie Poulin and François Théberge, "Comparing Graph Clusterings: Set partition measures vs. Graph-aware measures",https://arxiv.org/abs/1806.11494.Ensemble clustering for graphs (ecg)This is a good, stable graph partitioning algorithm. Details for ecg can be found in:Valérie Poulin and François Théberge, "Ensemble clustering for graphs: comparisons and applications", Appl Netw Sci 4, 51 (2019).https://doi.org/10.1007/s41109-019-0162-zExampleWe need to import the supplied Python file partition_igraph.import numpy as np
import igraph as ig
import partition_igraphNext, let's build a graph with communities.P=np.full((10,10),.025)np.fill_diagonal(P,.1)## 1000 nodes, 10 communitiesg=ig.Graph.Preference(n=1000,type_dist=list(np.repeat(.1,10)),pref_matrix=P.tolist(),attribute='class')## the 'ground-truth' communitiestc={k:vfork,vinenumerate(g.vs['class'])}Run Louvain and ecg:ml=g.community_multilevel()ec=g.community_ecg(ens_size=32)Finally, we show a few examples of measures we can compute with gam:## for 'gam' partition are either 'igraph.clustering.VertexClustering' or 'dict'print('Adjusted Graph-Aware Rand Index for Louvain:',g.gam(ml,tc))print('Adjusted Graph-Aware Rand Index for ECG:',g.gam(ec,tc))print('\nJaccard Graph-Aware for Louvain:',g.gam(ml,tc,method="jaccard",adjusted=False))print('Jaccard Graph-Aware for ECG:',g.gam(ec,tc,method="jaccard",adjusted=False))
Package: partition-networkx
Graph Partition and MeasuresPython3 code implementing 11 graph-aware measures (gam) for comparing graph partitions as well as a stable ensemble-based graph partition algorithm (ecg) all for networkx.Graph aware measures (gam)The measures are respectively:'rand': the RAND index'jaccard': the Jaccard index'mn': pairwise similarity normalized with the mean function'gmn': pairwise similarity normalized with the geometric mean function'min': pairwise similarity normalized with the minimum function'max': pairwise similarity normalized with the maximum functionEach measure can be adjusted (recommended) or not, except for 'jaccard'.
Details can be found in:Valérie Poulin and François Théberge, "Comparing Graph Clusterings: Set partition measures vs. Graph-aware measures",https://arxiv.org/abs/1806.11494.Ensemble clustering for graphs (ecg)This is a good, stable graph partitioning algorithm. Details for ecg can be found in:Valérie Poulin and François Théberge, "Ensemble clustering for graphs: comparisons and applications", Appl Netw Sci 4, 51 (2019).https://doi.org/10.1007/s41109-019-0162-zExampleFirst, we need to import the supplied Python file partition_networkx.importnetworkxasnximportcommunity## this is the python-louvain package which can be pip installedimportpartition_networkximportnumpyasnpNext, let's build a graph with communities (dense subgraphs):# Graph generation with 10 communities of size 100commSize=100numComm=10G=nx.generators.planted_partition_graph(l=numComm,k=commSize,p_in=0.1,p_out=0.02)## store groud truth communities as 'iterables of sets of vertices'true_comm=[set(list(range(commSize*i,commSize*(i+1))))foriinrange(numComm)]run Louvain and ecg:ml=community.best_partition(G)ec=community.ecg(G,ens_size=32)We show a few examples of measures we can compute with gam:# for 'gam' partition are either iterables of sets of vertices or 'dict'print("Adjusted Graph-Aware Rand Index for Louvain:",G.gam(true_comm,ml))print("Adjusted Graph-Aware Rand Index for ecg:",G.gam(true_comm,ec.partition))print("\nJaccard Graph-Aware for Louvain:",G.gam(true_comm,ml,method="jaccard",adjusted=False))print("Jaccard Graph-Aware for ecg:",G.gam(true_comm,ec.partition,method="jaccard",adjusted=False))Next, we compare with some non graph-aware measure (the adjusted Rand index); note that a different format is required for this function, so we build a dictionary for the partitions.## adjusted RAND index requires iterables over the vertices:fromsklearn.metricsimportadjusted_rand_scoreasARItc={val:idxforidx,partinenumerate(true_comm)forvalinpart}## compute ARIprint("Adjusted non-Graph-Aware Rand Index for Louvain:",ARI(list(tc.values()),list(ml.values())))print("Adjusted non-Graph-Aware Rand Index for ecg:",ARI(list(tc.values()),list(ec.partition.values())))
Package: partitionpy
partition packageThis is a collection of several algorithms to solvePARTITION.The package offers two heuristics:thenaive greedy heuristictheKarmakar-Karp heuristicor Largest Differencing Method (LDM)
and a complete algorithm,theComplete Karmarkar-Karp algorithm.The latter is also available in a more efficientversionfor some instances.Resources on the partition problemThe implementation stem from a project during my master's degree.
The resulting thesis isavailable, feel free to read especially the sections 1 to 3.
From the references, I would like to recommend the following publications in particular:R. E. Korf. A complete anytime algorithm for number partitioning. Artif. Intell., 106(2):
181–203, dec 1998. ISSN 0004-3702.doi:10.1016/S0004-3702(98)00086-1.B. Hayes. Computing science: The easiest hard problem. American Scientist, 90(2):113–117,
2002. ISSN 00030996. URLhttp://www.jstor.org/stable/27857621.S. Mertens. The easiest hard problem: number partitioning. In Computational
Complexity and Statistical Physics. Oxford University Press, 12 2005. ISBN 9780195177374.doi:10.1093/oso/9780195177374.003.0012.Installation and usageRunpip install partitionpyto install.Example code:import partitionpy

partitionpy.karmarkar_karp([4,5,6,7,8])
partitionpy.naive_greedy([4,5,6,7,8])
partitionpy.complete_karmarkar_karp([4,5,6,7,8])
partitionpy.kernelized_complete_karmarkar_karp([4,5,6,7,8])
partitionpy.complete_greedy([4,5,6,7,8])AlternativesThis is by far not the only package for PARTITION. You may want to check outnumberpartitioningandprtpyas well.
Package: partitions
partitionsIn number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers.For example, the partitions of 5:54+13+1+12+1+1+11+1+1+1+12+2+13+2Setup and runpip3installpartitionsTo run on the command-line:$partitions111110+19+1+18+1+1+17+1+1+1+1...You can also use this in code:frompartitionsimportpartitionslist(partitions(5))# returns [(5,), (4, 1), (3, 1, 1), (2, 1, 1, 1), (1, 1, 1, 1, 1), (2, 2, 1), (3, 2)]
Package: partitiontypes
DescriptionProvides values to identify the partition type within a master boot record.Installationpip install partitiontypesUsageFrom command line:python -m partitiontypes [--value VALUE] [--update]OptionShortTypeDefaultDescription--value-vString-The id to be investigated as one byte hex (hex values need to be uppercase)--update-uFlag-Updates the current list of partition idsProgrammatically:frompartitiontypes.PartitionTypesimportPartitionTypesp=PartitionTypes()result=p.getIds("07")# Result:# [#     PartitionId(id=07, description= OS/2 IFS (e.g., HPFS)),#     PartitionId(id=07, description= Windows NT NTFS),#     PartitionId(id=07, description= exFAT),#     PartitionId(id=07, description= Advanced Unix),#     PartitionId(id=07, description= QNX2.x pre-1988)# ]ExampleThe package includes a list of IDs per default. If you want to have the newest version use the following command:python -m partitiontypes --update################################################################################

Partition Types by 5f0
Provides values to identify the partition type within a master boot record      

Current working directory: /path/to/partitiontypes

 Datetime: 01/01/1970 16:17:18

################################################################################

Update successful!
Number of IDs: 273

################################################################################

Execution Time: 0.583953 secIf you want to ask for a partition type:python -m partitiontypes -v 07################################################################################

Partition Types by 5f0
Provides values to identify the partition type within a master boot record      

Current working directory: /path/to/partitiontypes

 Datetime: 01/01/1970 16:17:18

################################################################################


Candidates for 07:

---> ID: 07 Type:  OS/2 IFS (e.g., HPFS)
---> ID: 07 Type:  Windows NT NTFS
---> ID: 07 Type:  exFAT
---> ID: 07 Type:  Advanced Unix
---> ID: 07 Type:  QNX2.x pre-1988 (see below under IDs 4d-4f)

################################################################################

Execution Time: 0.002954 secCreditsThe IDs are based on the list ofProf. Dr. Brouwer. Thank you for your permission to use it.You can find the originalhere.LicenseMIT
Package: partitionunity
The package provide the implementation of partition of unity method.For usage example see at:https://github.com/sandro-lancellotti/PUFor detail about implementation see R. Cavoretto, A. De Rossi, E. Perracchione, S. Lancellotti,
Software Implementation of the Partition of Unity Method, preprintCite as R. Cavoretto, A. De Rossi, E. Perracchione, S. Lancellotti,
Software Implementation of the Partition of Unity Method, preprint
Package: partmgr
partmgr - Parts management databaseHomepageGit repositoryGithub repositoryPartMgr is a lightweight SQLite based parts database that can be used to manage storages of parts (e.g. electronic components).License / CopyrightCopyright (c) 2014-2022 Michael Büsch <m@bues.ch>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.