Saravanan666/pypi-org huggingface dataset:
Package: paraparser
Parameters is design for large program with massive parameters. It
supports integer, float, bool, string and enumerate(enum) types. Array
is supported for bool, integer and float. For enum type, customized
value can be set as well. Data type is protected. And load/dump of
parameters/config is available.Get instanceYou can get an emptry instance, or load from dict/filename/filehandlerparams=paraparser.Parameters()params=paraparser.Parameters(paramters_dict)params=paraparser.Parameters(parameter_json)Load config/parametersAfter the parameter instance is generated, you can load from a dict/file
as well.params.LOAD_CONFIG(config_file)params.LOAD_PARAMETERS(parameters_file)You can check parameters.json.sample & config.json.sample for details of
parameters/config.update/remove keyKey can be updated/removed, val can be set/reset>>>params.UPDATE_KEY('test_key','int',default=0)>>>params{"test_key":0}>>>params.test_key=1>>>params{"test_key":1}>>>params.test_key1>>>params.REMOVE_KEY('test_key')>>>params.RESET_KEY('test_key')>>>params{"test_key":0}Special TypesArrayAn integer/float/bool array could be initiate with>>>params.UPDATE_KEY('test_key','int',isArray=True,length=10,default=0)>>>params{"test_key":"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"}>>>params.UPDATE_KEY('test_key','float',isArray=True,length=6,default=0)>>>params{"test_key":"[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"}EnumerateWe highly improved enum type>>>params.UPDATE_KEY('test_key','enum',enumItems=['x1','x2','x3'],default='x1')>>>params{"test_key":"x1"}>>>params.test_keykeytest_key:x1enums:['x1','x2','x3']You can customize enuemrate enumerate values with enumVals, which is
really useful when cooperating with old programs.>>>params.UPDATE_KEY('test_key','enum',enumItems=['x1','x2','x3'],enumVals=['-1','2','5'],default='x1')>>>params{"test_key":"x1"}>>>print(params.DUMP_OUTPUT())test_key=-1Type ProtectionType is protected within paraparser, e.g.>>>params.UPDATE_KEY('test_key','enum',enumItems=['x1','x2','x3'],enumVals=['-1','2','5'],default='x1')>>>params{"test_key":"x1"}>>>params.test_key='x22'AssertionError:ParametersErrror:key"test_key"isaenum,items:['x1','x2','x3']And the same for other types.OutputA beautiful output is available with the instance or use the print
function>>>print(params){"string":"STRINGSING","int":1,"float":1.1,"enum":"1","floatArray":[2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0],"runType":"geometry_converge","ialgo":"method1"}You could also dump the config with DUMP_CONFIG(), or dump the
parameters with DUMP_PARAMETERS() to standard output or to a
file/handler>>>params.DUMP_CONFIG(){'test_key':{'key':'test_key','type':'float','enumItems':None,'enumVals':None,'isArray':True,'length':6,'default':0.0,'comments':'','reference':''}}>>>params.DUMP_PARAMETERS(){'__keys_config':{'test_key':{'key':'test_key','type':'float','enumItems':None,'enumVals':None,'isArray':True,'length':6,'default':0.0,'comments':'','reference':''}},'__keys_values':{'test_key':[0.0,0.0,0.0,0.0,0.0,0.0]}}>>>params.DUMP_CONFIG('config.json')>>>params.DUMP_PARAMETERS('parameters.json')Have Fun!
Package: paraphrase-googletranslate
paraphrase_googletranslateDescriptionParaphrasing via google translateInstallpipinstallparaphrase_googletranslate# orpip3installparaphrase_googletranslateUsagefromparaphrase_googletranslateimportParaphraseroriginal='Canvas Print Art size:12inchx12inch(30cmx30cm)x2panels Framed Ready to Hang. Brand: Amoy Art. Canvas print is already perfectly stretched over wooden frame and also hooks have been mounted on each panel,which easily to hang out of box.A perfect wall decorations paintings for living room, bedroom, kitchen, office, Hotel, dining room, office, bathroom, bar etc. HD pictures photo printed on canvas with vivid color on high quality canvas,A perfect gift for your relatives and friends. Packed in Carton Box.100% satisfied guarantee. Shop with confidence!'phraser=Paraphraser()rephrased=phraser.paraphrase(original,secondary_language='es')print(rephrased)rephrased=phraser.paraphrase(rephrased,secondary_language='de')print(rephrased)rephrased=phraser.paraphrase(rephrased,secondary_language='fr')print('\n\n\n')print(original)print(rephrased)Dependenciesgoogle-trans-new
Package: paraphrase-metrics
paraphrase-metricsMetrics for better understanding of Paraphrasespip install paraphrase-metricsAboutA python package containing implementations of word position deviation (WPD) and lexical deviation (LD) proposed in "Towards Better Characterization of Paraphrases" (ACL 2022).For a simple demo, please seedemo.ipynb.PaperThe full code associated with the ACL 2022 paper "Towards Better Characterization of Paraphrases" can be found in the./paper/folder.
Package: paraphraser
ParaphraserThis is a python library which generates list of sentences with similar contextual meaning as given input sentence.InstallationRun the following snippet to install the library in your system$pipinstallparaphraserUsagefromparaphraserimportparaphrase# Generate list of sentences with similar contextual meaningsentences=paraphrase(input_sentence)Developing ParaphraserTo install paraphraser along with the tools you need to develop and run tests, run the following in command in your system:$pipinstall-e.[dev]
Package: paraplot
paraplotParameter retrieval and plottingFeaturesFully typed with annotations and checked with mypy,PEP561 compatibleAdd yours!InstallationpipinstallparaplotExampleShowcase how your project can be used:fromparaplot.exampleimportsome_functionprint(some_function(3,4))# => 7LicenseMITCreditsThis project was generated withwemake-python-package. Current template version is:69435b231f7f398474073ac6dd14868dd3edf2c1. See what isupdatedsince then.
Package: parapply
ParapplyA simple drop-in replacement for parallelized pandasapply()on large Series / DataFrames, usingjoblib. Works by dividing the Series / DataFrame into multiple chunks and runningapplyconcurrently. As a rule of thumb, useparapplyonly if you have 10 million rows and above (see benchmark below).Install by runningpip install parapply. Requiresjoblib,numpy, andpandas(obviously!)Simple UsageSeries:parapply(srs, fun)instead ofsrs.apply(fun)DataFrames:parapply(df, fun, axis)instead ofdf.apply(fun, axis)For more fine grain control:
+n_jobsto decide number of concurrent jobs,
+n_chunksfor number of chunks to split the Series / DataFrameExamples:import pandas as pd
import numpy as np
from parapply import parapply

# Series example
np.random.seed(0)
srs = pd.Series(np.random.random(size=(5, )))
pd_apply_result = srs.apply(lambda x: x ** 2)
parapply_result = parapply(srs, lambda x: x ** 2)
print(pd_apply_result)

# 0    0.301196
# 1    0.511496
# 2    0.363324
# 3    0.296898
# 4    0.179483
# dtype: float64

print(parapply_result)

# 0    0.301196
# 1    0.511496
# 2    0.363324
# 3    0.296898
# 4    0.179483
# dtype: float64

# DataFrame example with axis = 1
np.random.seed(1)
df = pd.DataFrame(data={
    'a': np.random.random(size=(5, )),
    'b': np.random.random(size=(5, )),
    'c': np.random.random(size=(5, )),
})

pd_apply_result = df.apply(sum, axis=1)
parapply_result = parapply(df, sum, axis=1)
print(pd_apply_result)

# 0    0.928555
# 1    1.591804
# 2    0.550127
# 3    1.577217
# 4    0.712960
# dtype: float64

print(parapply_result)

# 0    0.928555
# 1    1.591804
# 2    0.550127
# 3    1.577217
# 4    0.712960
# dtype: float64Refer to docstrings for more information.Quick and dirty benchmarksRan a quick and dirty benchmark to compare time taken to applylambda x:x ** 2to Series of varying length using pandasapplyandparapplyon multiplen_jobssettings:This semilog plot above shows that significant runtime differences between pandasapplyandparapplyshow up at 10 million data points and onwards.AcknowledgementsThanks to @aaronlhe for introducing me to the world of unit tests!
Package: paraproc
OverviewParaproc is a simple library that helps you easily parallelize your computation
(over independent chunks of data) across multiple processes in Python, especially
when you want to mix callings to external command line programs and hand brew
Python functions together in your data processing pipeline.Under the hood, it combines subprocess and multiprocessing, and uses a process pool
to schedule the jobs. It also provides a numpy.ndarray interface to access
shared-memory across multiple processes.Paraproc supports both Python 2 and 3, with numpy as the only external dependency.
It is contained in only one Python file, so it can be easily copied into your project.
(The copyright and license notice must be retained.)Code snippets that demonstrate the basic usage of the library can be found later
in this documentation, and in the demo_*.py files.Bugs can be reported tohttps://github.com/herrlich10/paraproc.
The code can also be found there.Quick startsExecute commands in parallelYou can run both Python codes and command line programs in parallel:importosimportparaprocdefmy_job():print(os.getpid())pc=paraproc.PooledCaller()forkinrange(5):pc.check_call(my_job)forkinrange(5):pc.check_call('echo $$',shell=True)# For linux/macpc.wait()Thepc.check_call()method will return immediatedly. The actual execution of
the queued commands are delayed until you callpc.wait().Use shared-memoryYou can load large data in shared-memory, and read or write them
as a normal numpy array from multiple processes:importnumpyasnpimportparaprocdefslow_operation(k,x):x.acquire()x[:100000,:]+=1# Write accessres=np.mean(x)# Read accessx.release()print('#{0}: mean ={1}'.format(k,res))a=paraproc.SharedMemoryArray.from_array(np.random.rand(1000000,500))# About 4 GBpc=paraproc.PooledCaller()forkinrange(pc.pool_size):pc.check_call(slow_operation,k,a)pc.wait()The data inais shared in memory across all children processes and
never copied even with write accesses.
Package: parapy
parapyAn automatic handling of parameter passing to python programsUsageImport the script. Then in the top of your own document, define a list of tuples of all your parameters of the form ('name', 'prefix'/position, type), and then call the library usingparams.params(Your_Parameters). This will return a dictionary of all the parameters of the form {'name' : value}.The library supports prefixed parameters (i.e. whatever comes after '-i'), boolean parameters (i.e. if '-a' is passed) and positional parameters (i.e. the second parameter without a prefix).Currently supported types are str, int, float and bool. Multi-word parametersmustbe enclosed in quotes.Exampleimport params

parameters = [('output', '-o', str),   # A string parameter with prefix '-o'
              ('amount', '-n', int),   # An integer parameter with prefix '-n'
              ('verbose', '-v', bool), # A boolean parameter with name '-v'
              ('eggs', '-e', float),   # A float parameter with prefix '-e'
              ('input', 0, str),       # A string parameter position 0
              ('spam', 1, int),        # An integer parameter position 1
              ('message', '-m', str)]  # A string parameter with prefix '-m'


p = (params.params(parameters))

print(p)Then calling the program with the parameters as such:python program.py -v gov_secrets.db -o elvis.mp3 4 -n 10 -m "Listen to this cool track!", will result in the following output:{'output': 'elvis.mp3',
 'amount': 10,
 'verbose': True,
 'eggs': None,
 'input': 'gov_secrets.db',
 'spam': 4,
 'message': 'Listen to this cool track!'}TODOAdd default values
Package: parareq
parareqReliable Parallel OpenAI API Request Processing with Rate Limiting. This is a basically a packaged version of thecode from the OpenAI Cookbook here.Installation$pipinstallparareqUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licenseparareqwas created by Matt Gibson. It is licensed under the terms of the MIT license.Creditsparareqwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pararius
parariusPython library to get information about houses frompararius.nl.DISCLAIMER: this is not an official API and doesn't use one. The script is provided as is (see the LICENSE) and for personal usage only. Please, contact the pararius team (Real Estate Classifieds BV) if you need a stable API for extensive or commercial usage.Installationpython3-mpipinstallparariusUsageimportparariussearch_url='https://www.pararius.nl/koopwoningen/nederland/bestaande-bouw/huis'urls=pararius.get_urls(search_url)forurlinurls:info=pararius.get_info(url)print(info)Output example (anonymized, just in case):{'@context':'http://schema.org/','@id':'https://www.pararius.nl/huis-te-koop/schiedam/.../...','@type':['House','Product'],'address':{'@type':'PostalAddress','addressLocality':'Schiedam','addressRegion':'...','postalCode':'...','streetAddress':'...'},'description':'...','floorSize':{'@type':'QuantitativeValue','unitText':'MTK','value':115},'image':'https://casco-media-prod.global.ssl.fastly.net/...','name':'...','numberOfRooms':[{'@type':'QuantitativeValue','unitText':'kamer','value':4,}],'offers':{'@type':'Offer','availability':'http://schema.org/LimitedAvailability','businessFunction':'sell','image':'...','price':'290000.00','priceCurrency':'EUR','url':'https://www.pararius.nl/huis-te-koop/schiedam/...','validFrom':'2021-06-02',},}
Package: parasect
Welcome toParasect, a utility for manipulating parameter sets for autopilots!FeaturesParasecthas two-fold capabilities:Compare two parameter sets and highlighting their differences.Parsing from user-defined content and generating new parameter sets, ready for loading into an autopilot.List of currently supported autopilots:ArdupilotPX4RequirementsParasectis a pure-Python project. Its requirements are managed by thePoetrydependency manager.
When you installParasectviapipits requirements will also be installed automatically.CurrentlyParasecthas been tested:in Continuous Integration servers forUbuntu Linux,Windowsmanually inUbuntu Linux.InstallationYou can installParasectviapipfromPyPI:$pipinstallparasectIf you don’t care about usingParasectas a library and are only interested in
command-line use, you can also usepipx, that provides better isolation from
the rest of the system:$pipxinstallparasectUsageParasectis primarily used as a command-line program.
In its simplest form, two parameter files can be compared via:$parasectcompare<FILE_1><FILE_2>The usage for building parameter sets is more involved.
Please see theCommand-line Referencefor details.Additionally, it exposes a minimal API, enabling automated operations.
This is described in theAPI Reference.It is strongly recommended that you read theConceptsthatParasectemploys, if you plan to make full use of it.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Parasectis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was sponsored byAvy B.V., a UAV company in Amsterdam.This project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.The project logo was created byCynthia de Vries.
Package: parashell
parashellMake portable shell-like scripts in Python!InstallationIf you want to……use this tool in your project 💻You might simply install it with pip:pip install parashellIf you usePoetry, then run:poetry add parashell…contribute toparashell🚀Happy to accept contributions![!Note]
If you use Windows, it is highly recommended to complete the installation in the way presented below throughWSL2.First,install Poetry.Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them.pipx install poetryIf you encounter any problems, refer tothe official documentationfor the most up-to-date installation instructions.Be sure to have Python 3.8 installed—if you usepyenv, simply run:pyenv install 3.8Then, run:git clone https://github.com/bswck/parashell path/to/parashell
cd path/to/parashell
poetry env use $(cat .python-version)
poetry install
poetry shell
pre-commit install --hook-type pre-commit --hook-type pre-pushLegal info© Copyright by Bartosz Sławecki (@bswck).This software is licensed under theMIT License.
Package: parasol
Parasol is a Framework for Parametric Model Investigation.See the Code at:https://github.com/sonofeft/ParaSolSee the Docs at:http://parasol.readthedocs.org/en/latest/See PyPI page at:https://pypi.python.org/pypi/parasolSee Original 2009 code at:http://pyparasol.sourceforge.net/overview.htmlParasol enables easy optimization, sensitivity study, and visualization.
The math model can be as big or as small as desired.Output is generated in plain text, HTML, and (On Windows) native Microsoft Suite files (Excel, Word and PowerPoint).A problem is defined by input and output parameters.
Results are presented in a manner that conveys insight into system trends and characteristics.
The process of performing an analysis results in an ample assortment of graphs, charts, and images that display system sensitivities, variations, and characteristics.
Barriers to creating these displays have been reduced to single commands in order to facilitate their use.Parasol has been designed to run best under Microsoft Windows, but also runs under Linux.TODO… Add support for Libreoffice and OpenOffice on both Linux and Windows
Package: parasol-nlp
Parasol TokenizerParasol tokenizes hangul after decomposition.
한글 자음,모음을 분해하여 토큰화합니다.Original text: 고가도로에 삐져나온 초록잎 아마 이 도시에서 유일히 적응 못한 낭만일 거야Decomposed text: ㄱㅗㄱㅏㄷㅗㄹㅗㅇㅔ ㅃㅣㅈㅕㄴㅏㅇㅗㄴ ㅊㅗㄹㅗㄱㅇㅣㅍ ㅇㅏㅁㅏ ㅇㅣ ㄷㅗㅅㅣㅇㅔㅅㅓ ㅇㅠㅇㅣㄹㅎㅣ ㅈㅓㄱㅇㅡㅇ ㅁㅗㅅㅎㅏㄴ ㄴㅏㅇㅁㅏㄴㅇㅣㄹ ㄱㅓㅇㅑTokens: ▁ㄱㅗㄱㅏ / ㄷㅗㄹㅗ / ㅇㅔ / ▁ㅃㅣ / ㅈㅕㄴ / ㅏㅇㅗㄴ / ▁ㅊ / ㅗㄹ / ㅗㄱ / ㅇㅣ / ㅍ / ▁ㅇㅏㅁㅏ / ▁ㅇㅣ / ▁ㄷㅗㅅㅣ / ㅇㅔㅅㅓ / ▁ㅇㅠㅇㅣㄹ / ㅎㅣ / ▁ㅈㅓㄱㅇㅡㅇ / ▁ㅁㅗㅅㅎㅏㄴ / ▁ㄴㅏㅇㅁㅏㄴ / ㅇㅣㄹ / ▁ㄱㅓㅇㅑComposed tokens: ▁고가 / 도로 / 에 / ▁삐 / 젼 / ㅏ온 / ▁ㅊ / ㅗㄹ / ㅗㄱ / 이 / ㅍ / ▁아마 / ▁이 / ▁도시 / 에서 / ▁유일 / 히 / ▁적응 / ▁못한 / ▁낭만 / 일 / ▁거야Installationpip install parasol-nlpExperimentThe figure shows the results of the perplexity comparison experiment.with decompositionis tokenized with charactor decomposition andno decompositionis just tokenized.
Experiment source code ishere.UsageTokenizerUseSentencePiece's BPE model as tokenizer andhgtkfor decomposition.fromparasolimportTokenizer# tokenize after decompositiont1=Tokenizer(decompose=True)# tokenize without decompositiont2=Tokenizer(decompose=False)then>>>t1.tokenize("고가도로에 삐져나온 초록잎 아마 이 도시에서 유일히 적응 못한 낭만일 거야")['▁고가','도로','에','▁삐','젼','ㅏ온','▁ㅊ','ㅗ록','잎','▁아마','▁이','▁도시','에서','▁유일','히','▁적응','▁못한','▁낭만','일','▁거야']>>>t2.tokenize("고가도로에 삐져나온 초록잎 아마 이 도시에서 유일히 적응 못한 낭만일 거야")['▁고가','도로','에','▁삐','져','나온','▁초록','잎','▁아마','▁이','▁도시','에서','▁유일','히','▁적응','▁못한','▁낭만','일','▁거야']# Output as vocabulary id>>>t1.tokenize("고가도로에 삐져나온 초록잎 아마 이 도시에서 유일히 적응 못한 낭만일 거야",as_id=True)[17687,2135,36,8351,3904,3842,52,12256,27398,3469,30,6105,160,3767,198,8953,2345,13164,89,6872]ComposerHangul jamo composerfromparasolimportComposerc=Composer()then>>>c.compose("ㄷㅏㄹㅇㅣ ㄱㅣㅇㅜㄴ ㅂㅏㅁ ㅍㅓㄹㅓㄴㅂㅣㅊㅇㅣ ㅅㅡㅁㅕㄷㅡㄴ ㄱㅗㄹㅁㅗㄱㅇㅡㄹ ㄱㅓㄹㅇㅓㄱㅏㄷㅓㄴ ㄱㅣㄹㅇㅔ")'달이 기운 밤 퍼런빛이 스며든 골목을 걸어가던 길에'but it is not perfect, like..>>>c.compose("ㅎㅐㅇㅇㅜㄴㅇㅡㄹ ㅂㅣㄹㅇㅓㅇㅛㅎㅎ")'행운을 빌어욯ㅎ'which of original text is행운을 빌어요ㅎㅎ
Package: parasolr
parasolris a lightweight python library forApache Solrindexing,
searching and schema management with optionalDjangointegration.
It includes a Solr client (parasolr.solr.SolrClient). When used with
Django, it provides management commands for updating your Solr schema
configuration and indexing content.Tested against Python 3.9-3.11, Solr 8.6 and 9.2, and Django 3.2-4.0 and without Django.InstallationInstall released version from pypi:pip install parasolrTo install an unreleased version from GitHub:pip install git+https://github.com/Princeton-CDH/parasolr@develop#egg=parasolrTo use with Django:AddparasolrtoINSTALLED_APPSConfigureSOLR_CONNECTIONSin your django settings:SOLR_CONNECTIONS = {
    'default': {
    'URL': 'http://localhost:8983/solr/',
    'COLLECTION': 'name',
    # Any configSet in SOLR_ROOT/server/solr/configsets.
    #   The default configset name is "_default" as of Solr 7.
    #   For Solr 6, "basic_configs" is the default.
    'CONFIGSET': '_default'
    }
}Define aSolrSchemawith fields and field types for your project.Runsolr_schemamanage command to configure your schema; it will
prompt to create the Solr core if it does not exist.NoteTheSolrSchemamust be imported somewhere for it to be
found automatically.Development instructionsThis git repository uses git flow branching conventions.Initial setup and installation:Recommmended: create and activate a Python 3.6 virtualenv:python3 -m venv parasolr
source parasolr/bin/activateInstall the package with its dependencies as well as development
dependencies:pip install -e .
pip install -e '.[dev]'Install pre-commit hooksInstall configured pre-commit hooks (currentlyblackandisort):pre-commit installStyling was instituted in version 0.8; as a result,git blamemay not reflect the true author of a given line. In order to see a more accurategit blameexecute the following command:git blame <FILE> –ignore-revs-file .git-blame-ignore-revsOr configure your git to always ignore the black revision commit:git config blame.ignoreRevsFile .git-blame-ignore-revsUnit testingUnit tests are written withpytestbut use some Django
test classes for compatibility with Django test suites. Running the tests
requires a minimal settings file for Django-required configurations.Copy sample test settings and add a secret key:cp ci/testsettings.py testsettings.py
python -c "import uuid; print('\nSECRET_KEY = \'%s\'' % uuid.uuid4())" >> testsettings.pyBy default, parasolr expects Solr 8. If running tests with an earlier
version of Solr, either explicitly changeMAJOR_SOLR_VERSIONin your
localtestsettings.pyor set the environment variable:export SOLR_VERSION=x.x.xTo run the test, either use the configured setup.py test command:python setup.py testOr install test requirements in and use pytest directly:pip install -e '.[test]'
pytestLicenseparasolris distributed under the Apache 2.0 License.©2019 Trustees of Princeton University.  Permission granted via
Princeton Docket #20-3619 for distribution online under a standard Open Source
license.  Ownership rights transferred to Rebecca Koeser provided software
is distributed online via open source.