Saravanan666/pypi-org huggingface dataset:
Package: perceval-zulip
perceval-zulipPerceval backend for Zulip.RequirementsPython >= 3.7python3-requests >= 2.7grimoirelab-toolkit >= 0.3perceval >= 0.19PrerequisitesPoetryWe usePoetryfor managing the project.
You can install it followingthese steps.Installation1. PyPIPerceval Zulip backend can be installed usingpipIt is advised to use avirtual environment(.venv) $ pip install perceval-zulip2. Getting the source codeClone the repository$ git clone https://github.com/vchrombie/grimoirelab-perceval-zulip perceval-zulip
$ cd perceval-zulipInstall the required dependencies (this will also create a virtual environment)$ poetry installActivate the virtual environment$ poetry shellUsageNote:You need theemailand theapi_token(API key) from the server. You can use the user email and API key
for authentication or create a bot and use the bot email and API key.Reference:About bots (Zulip Help Center).(.venv) $ perceval zulip --help
[2021-09-20 15:57:22,523] - Sir Perceval is on his quest.
usage: perceval [-h] [--category CATEGORY] [--tag TAG] [--filter-classified] -t API_TOKEN
                [--archive-path ARCHIVE_PATH] [--no-archive] [--fetch-archive]
                [--archived-since ARCHIVED_SINCE] [--no-ssl-verify] [-o OUTFILE]
                [--json-line] -e EMAIL
                url stream

positional arguments:
  url                   Zulip chat URL
  stream                Zulip chat stream name

optional arguments:
  -h, --help            show this help message and exit

authentication arguments:
  -t API_TOKEN, --api-token API_TOKEN
                        backend authentication token / API key

zulip arguments:
  -e EMAIL, --email EMAIL
                        Zulip bot/user emailFetch messages from theimportlibstream of thePython Zulip Serverwith the
bot emailbot@zulipchat.comand API keyxxxx(.venv) $ perceval zulip https://python.zulipchat.com importlib -e bot@zulipchat.com -t xxxx
[2021-09-20 15:59:24,593] - Sir Perceval is on his quest.
{
...ContributingThis project follows thecontributing guidelinesof the GrimoireLab.AcknowledgmentThe backend was initially developed by@vchrombie.Adhering to the guidelines, the work is started in this external repository. But, this can be merged
(chaoss/grimoirelab-perceval/#/667) into thePercevalrepository in the future.LicenseLicensed under GNU General Public License (GPL), version 3 or later.
Package: percolation-threshold
PERCOLATION-THRESHOLDThis package was created duringcodeastro weekin the term of the group project following all the instruction given during this classes to give the basic 'SD/SE ' for astronomer in order to develop in release there 1st open source packageInstallationTo install the package, you need to execute the following command in your bash.$ pip install percolation-thresholdDocumentationYou can find the complete documentationhere.AcknowledgmentWe would like to thank the people who helped in making this modest package:Codeastro teamSimonAnd all the participantsLICENSEThis work is licensed under theMIT License
Package: perconet
OverviewTheperconetpackage provides tools to analyze the percolation properties of
periodic nets or networks. The terminology to describe such systems varies between
fields (see the sectionsfor mathematiciansandfor chemistsin the documentation).Periodic networks arise often in simulations of chemical or physical systems withperiodic boundary conditions. Since periodic nets have no actual boundaries, the
question whether they percolate must be interpreted asdoes the structure wrap around
the periodic boundary?perconetimplements a loop finder algorithm that reports the number ofindependentways in which the structure wraps around the boundary.DocumentationDocumentation is generated using Sphinx and hosted onReadTheDocs.Release StatusThis is a development release that has been extensively tested in a few contexts but
we cannot guarantee it will work as you will expect. If you get unexpected results
and suspect you found a bug, please open an issue on github.Credits and LicensePerconet was written by Chiara Raffaelli and Wouter G. Ellenbroek.
Issue reports and contributions are welcome through ourGitHub repositoryWe shareperconetunder the European Union Public License. See LICENSE file for details.
Package: percstat
percstat is used when you calculate percentage and statisticsInstallation:`Use the package manager [pip](https://pip.pypa.io/en/stable/) to install percstat.` pip install percstat `Changelogs:changelogs:v0.0.0b1~25:beta,not added statistics
v0.0.1a1~4:alpha,first release,added statistics
edited readme.mdUsage:` import percstat.percstat as p `other not means “other”! other means a,b,c,…(For example)class etchow to use:a=p.etc.dicevalue=[1,2,3,4,5,6],change a to other
b=p.etc.coinvalue=[0,1],change b to other
#class percentage
c=p.percentage.Factorial(n)  #n is integer, change c to other, returns n*(n-1)*…*2*1
d=p.percentage.nPr(n,r) #n and r is integer, change d to other,  returns Factorial(n)/Factorial(n-r)
e=p.percentage.nCr(n,r) #n and r is integer, change e to other,  returns nPr(n,r)/Factorial(r)
f=p.percentage.AnB(A,B) # A and B is list, change f to other, returns intersection of A and B
g=p.percentage.Ac(A,S) # A and S is list, change g to other, returns compliment of A in S
h=p.percentage.AUB(A,B) # A and B is list, change h to other, returns union of A and B
i=p.percentage.AEB(A,B) # A is Element , B is list, change i to other, returns true if A is in B
j=p.percentage.AcB(a,b) # A is Element that type is list, B is list, change j to other, returns true if A is in B
k=p.percentage.P(A,S) # A is Element, S is list change k to other, returns percentage pf A in S
l=p.percentage.P_BlA(A,B,S) # A and B is Element but, B must in A, S is list, change l to other, returns conditional Probability of B in A
m_=p.percentage.nPIr(n,r) #n and r is integer, change m_ to other, returns n**r
n_=p.percentage.nHr(n,r) # n and r is integer, change n_ to other, returns nCr(n+r-1,r)
o=p.percentage.AmB(A,B,S) #A and B is list, change o to other, returns difference of A and B in S(A-B)
#class statistics
p_=p.statistics.autoconfigure(n,P) #n is integer, P is float (nmore than 0 and less than 1) , change p_ to other,returns list that configured(rule:nCr(n,r)*(P**r)*((1-P)**(n-r))) 0 to n, r is another variable that don’t need to declare.
p.statistics.into_graph(li) #li is list(use autoconfigure(n,P)),print   graphs with rules.
q=p.P_cond(li,cond) # li is list(use autoconfigure(n,P)),cond is string, returns percentage based on cond(condition,ex: “a>8” means select more than 8 in graph and returns sum of these. and you can multiply these conditional sentence with “&” (ex:”a<7&a>9” means select less than 7 and more than 9 in graph and get sum.)),don’t allow like a<x<b or etc.
r_=p.statistics.E_X(li) #returns averages of autoconfigured list.
s=p.statistics.V_X(li) #returns variations of autoconfigured list.
t=p≥statistics.sigma_X(li) #returns square root of V_X(li)
u=p.statistics.convert_NXtoNZ(x,m,sigma)#
v=p.statistics.configure_N(x,m,sigma) #
w=p.statistics.autoconfigure_N(a,b,m,sigma)#returns calculated percentage based on sigma and m(same as E_X(li)) in range a and b (a<=x<=b)License:BSD licensesee (https://choosealicense.com/licenses/bsd)free to use even commercial!!
Package: percy-python-selenium
percy-selenium-pythonPercyvisual testing for Python Selenium.Installationnpm install@percy/cli:$ npm install --save-dev @percy/clipip install Percy selenium package:$ pip install percy-seleniumUsageThis is an example test using thepercy_snapshotfunction.frompercyimportpercy_snapshotbrowser=webdriver.Firefox()browser.get('http://example.com')​# take a snapshotpercy_snapshot(browser,'Python example')Running the test above normally will result in the following log:[percy] Percy is not running, disabling snapshotsWhen running withpercy exec, and your project'sPERCY_TOKEN, a new Percy build will be created and snapshots will be uploaded to your project.$ export PERCY_TOKEN=[your-project-token]
$ percy exec -- [python test command]
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Snapshot taken "Python example"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!Configurationpercy_snapshot(driver, name[, **kwargs])driver(required) - A selenium-webdriver driver instancename(required) - The snapshot name; must be unique to each snapshotAdditional snapshot options (overrides any project options) (**kwargs**):widths- An array of widths to take screenshots atmin_height- The minimum viewport height to take screenshots atpercy_css- Percy specific CSS only applied in Percy's rendering environmentrequest_headers- Headers that should be used during asset discoveryenable_javascript- Enable JavaScript in Percy's rendering environmentMigrating ConfigIf you have a previous Percy configuration file, migrate it to the newest version with theconfig:migratecommand:$ percy config:migrate
Package: perde
perde: python-wrapped serdeHeavily under construction towards 0.1.0 🎅Python wrapper aroundthe powerful Rust serialization framework.Serialization & deserialization of python data structures.Supports various types including dataclasses, generic types, enum and common built-in types.Supports various serialization formats. By design,perdecan support as many format asserdecan.Provides string case conversion of field names, skipping serialization/deserialization options, structure flattening.Precise type checking based on type hints.Very fast.InstallpipinstallperdeUsage>>>importperdeAssume you have a dataclass,>>>@dataclass...classA:...a:int...b:strTo serialize classAto JSON,>>>perde.json.dumps(A(a=10,b='x'))'{"a":10,"b":"x"}'To deserialize JSON to classA,>>>perde.json.loads_as(A,'{"a":10,"b":"x"}')A(a=10,b='x')To deserialize JSON to a dictionary,>>>perde.json.loads('{"a":10,"b":"x"}'){'a':10,'b':'x'}More formats are supported.>>>perde.yaml.dumps(A(10,"x"))'---\na: 10\nb: x'>>>perde.yaml.loads_as(A,'---\na: 10\nb: x')A(a=10,b='x')>>>perde.msgpack.dumps(A(10,"x"))b'\x82\xa1a\n\xa1b\xa1x'>>>perde.msgpack.loads_as(A,b'\x82\xa1a\n\xa1b\xa1x')A(a=10,b='x')Supported formatsJSON (perde.json)YAML (perde.yaml)MessagePack (perde.msgpack)TOML (perde.toml)CBORPickleRONBSONAvroJSON5PostcardURLEnvironment variablesAWS Parameter StoreS-expressionsD-BusFlexBufferXMLSupported typesdataclassPrimitive typesintstrfloatboolbytesbytearrayGeneric typesdict/typing.Dictlist/typing.Listset/typing.Setfrozenset/typing.FrozenSettuple/typing.Tupletyping.Optionaltyping.Uniontyping.AnyEnum typesEnumIntEnumFlagIntFlagMore built-in typesdatetime.datetimedatetime.datedatetime.timedecimal.Decimaluuid.UUIDAttributesAttributes allow to modify the way of serialization/deserialization.For example, to serialize/deserialize the field names ascamelCase,>>>@perde.attr(rename_all="camelCase")...@dataclass...classA:...foo_bar:int...bar_bar:int>>>perde.json.dumps(A(foo_bar=1,bar_bar=2))'{"fooBar":1,"barBar":2}'>>>perde.json.loads_as(A,'{"fooBar":1,"barBar":2}')A(foo_bar=1,bar_bar=2)Seethe bookfor more details.BenchmarkJSONYAMLTOMLMessagePack
Package: perdiem
PerDiemA library that allows a user to get the per diem rates for a location and calculate the per diem rates for a given period of time. It takes the data from GSA's per diem page and the computer handles the rest!UsagefromperdiemimportPerDiem# Look up the rates for Washington, DC (accept the first result)rates=PerDiem.get_rates("Washington, DC")[0]# Alternatively, look up the rates by zip code!# rates = PerDiem.get_rates("20002")[0]start_date="2024-01-01"end_date="2024-01-08"# Calculate the total costs for a triptrip=PerDiem.calculate_per_diem(rates,start_date,end_date)print(trip["total"])# 2136.5InstallpipinstallperdiemFeaturesLook up Per Diem rate by Zip CodeCompute the total (factoring first and last day travel reductions)Future?[] An API?[] A CLI?[] Export to Excel?LicenseApache 2.0
Package: perdu
PerduPython library and webapp for matching against standard industry and product classifiers. Comes with NAICS, GS1, and USEEIO built-in.InstallationInstall using pip or conda:conda -c conda-forge -c cmutel perdu-or-pip install perduDepends on:appdirsdocoptflaskpeeweerdflibrdflib-jsonldwhooshUsageAs a webapp:conda_webappAs a library:import perdu
perdu.search_useeio("plastic toy")Search basicsPerdu useswhooshas the search engine. When you first import it, Perdu will import the three built-in catalogues in around one minute.Built-in cataloguesNAICSGS1 GPCUS 2014 EEIOUploading dataCurrently, the only possibility to upload data to the web interface is via CSV, with the first column being the item name or title, and the second (optional) column being the item description. Seeperdu.test.fixturesfor examples.Adding other cataloguesSee the files inperdu.extractionfor examples on how to extract data from PDFs (NAICS), XML (GS1), and JSON (USEEIO). Each search catalogue will have its own schema, but Perdu expects these schemas to have at least the columnsname,description, andcode(see examples inperdu.searching). New catalogues will need to have suitable functions provided inperdu.webapp.search_mapping.Advanced searchingIn addition to the default search method used in the web interface, Perdu also offerssearch corrections(search_corrector_gs1,search_corrector_naics, andsearch_corrector_useeio) anddisjunction maximization(search_gs1_disjoint,search_useeio_disjoint, andsearch_naics_disjoint).
Package: perestroika
☭ perestroikaAboutInstallationUsageAboutSimple REST framework for djangoInstallationWith pip:pipinstallperestroikaUsagefromdjango.contrib.auth.modelsimportUserfromperestroika.resourceimportDjangoResourcefromperestroika.methodsimportGet,Postfromperestroika.exceptionsimportRestExceptionclassValidator:def__call__(self,item:dict)->dict:return{'username':item['username']}defreject_not_superuser(request,bundle):ifnotrequest.user.is_superuser:raiseRestException(message="Unauthorized",status_code=401)defadd_is_superuser_flag(request,bundle):foruserinbundle['items']:user['is_superuser']=TrueclassSuperUserResource(DjangoResource):# use django @cache_control kwargscache_control=dict(max_age=0,no_cache=True,no_store=True,must_revalidate=True)# allowed method GETget=Get(# base querysetqueryset=User.objects.filter(is_superuser=True),# restrict accessrequest_hooks=[reject_not_superuser],# any callableoutput_validator=Validator,)# allowed method POSTpost=Post(# restrict accessrequest_hooks=[reject_not_superuser],# process incoming datapre_query_hooks=[add_is_superuser_flag],# any callableinput_validator=Validator,)
Package: perf8
perf8THIS IS ALPHA QUALITY, UNSUPPORTED, RUN AT YOUR OWN RISKSYour Tool For Python Performance Trackingperf8is a curated list of tools to track the performance of your Python app.The project is pluggable, and ships with a few tools:cprofile - a cProfile to Dot graph generatorpyspy - a py-spy speedscope generatormemray - a memory flamegraph generatorpsutil - a psutil integrationasyncstats - stats on the asyncio eventloop usage (for async apps)InstallationUsepip:pipinstallperf8If you use thecprofileplugin, you will need to installGraphvizto
get thedotutility. See.https://graphviz.org/download/UsageRunning theperf8command against your Python module:perf8--all-c/my/python/script.py--option1Will generate a self-contained HTML report, making it suitable for
running it in automation and produce performance artifacts.You can pick specific plugins. Runperf –helpand use the ones you want.Async applicationsRunning theasyncstatsplugin requires to provide your application event loop.In order to do this, you need to instrument your application to giveperf8the loop to watch. You can use theenableanddisablecoroutines:importperf8asyncdefmy_app():awaitperf8.enable(my_loop)try:# my codeawaitrun_app()finally:awaitperf8.disable()To avoid running this code in production you can use thePERF8environment variable
to detect ifperf8is calling your app:importosif'PERF8'inos.environ:importperf8asyncwithperf8.measure():awaitrun_app()else:awaitrun_app()Screencast0.0.1 - 2023/01/06Initial release0.0.0 - 2022/11/11Don’t use it.
Package: perfbench
perfbenchAboutperfbench measures execution time of code snippets with Timeit and uses
Plotly to visualize the results.FeatureIt is possible to select measurement modes.It is possible to switch between layout sizes dynamically.It is possible to switch between axes scales dynamically.It is possible to switch between subplots dynamically.The result of the benchmark can be saved locally as a html.The result of the benchmark can be saved locally as a png.Requires
installation oforca.When not to use the function, you do not need to install orca
separately.Compatibilityperfbench works with Python 3.5 or higher.Dependenciestqdm(4.6.1 or higher.)cerberus(1.1 or higher.)plotly(3.0.0 or higher)notebook(6.0 or higher.)ipywidgets(7.2
or higher.)Installationpip install perfbenchUsagePlotting a single figure.Hereis the
demonstration.importnumpyasnpfromperfbenchimport*bm=Benchmark(datasets=[Dataset(factories=[lambdan:np.random.uniform(low=-1.,high=1.,size=n).astype(np.float64),],title='float64')],dataset_sizes=[2**nforninrange(26)],kernels=[Kernel(stmt='np.around(DATASET)',setup='import numpy as np',label='around'),Kernel(stmt='np.rint(DATASET)',setup='import numpy as np',label='rint')],xlabel='dataset sizes',title='around vs rint',)bm.run()bm.plot()plot1Plotting multiple plots on a single figure.Hereis the
demonstration.importnumpyasnpfromperfbenchimport*bm=Benchmark(datasets=[Dataset(factories=[lambdan:np.random.uniform(low=-1.,high=1.,size=n).astype(np.float16),],title='float16'),Dataset(factories=[lambdan:np.random.uniform(low=-1.,high=1.,size=n).astype(np.float32),],title='float32'),Dataset(factories=[lambdan:np.random.uniform(low=-1.,high=1.,size=n).astype(np.float64),],title='float64')],dataset_sizes=[2**nforninrange(26)],kernels=[Kernel(stmt='np.around(DATASET)',setup='import numpy as np',label='around'),Kernel(stmt='np.rint(DATASET)',setup='import numpy as np',label='rint'),],xlabel='dataset sizes',title='around vs rint',)bm.run()bm.plot()plot2plot2Switching between layout sizes.importnumpyasnpfromperfbenchimport*bm=Benchmark(datasets=[Dataset(factories=[lambdan:np.random.uniform(low=-1.,high=1.,size=n).astype(np.float64),],title='float64')],dataset_sizes=[2**nforninrange(26)],kernels=[Kernel(stmt='np.around(DATASET)',setup='import numpy as np',label='around'),Kernel(stmt='np.rint(DATASET)',setup='import numpy as np',label='rint')],xlabel='dataset sizes',title='around vs rint',layout_sizes=[LayoutSize(width=640,height=480,label='VGA'),LayoutSize(width=800,height=600,label='SVGA'),LayoutSize(width=1024,height=768,label='XGA'),LayoutSize(width=1280,height=960,label='HD 720p'),])bm.run()bm.plot()plot3Save as a html.# same as abovebm.save_as_html(filepath='/path/to/file')Save as a png.# same as abovebm.save_as_png(filepath='/path/to/file',width=1280,height=960)OtherHereare a few examples.LicenseThis software is released under the MIT License, see LICENSE.
Package: perfcount
PerfCount - a Python library used for performance testingInstall it withpip install perfcount.There are multiple decorators included for testing in the library, includingperf.perf,perfcount.perf_ns,perfcount.shouldtake, andperfcount.timeout. Theperfcount.time_this_programmodule can be imported to time the program from the time of importing theperfcount.time_this_programmodule to interpreter exit.The commandperftcountcan be used to measure execution time of a command. Ex.perfcount python script.py.
Package: perfcounters
PerfCountersEasily add performance counters to your python code.PerfCounter is a thoroughly tested library that make it easy to add counters to
any python code to measure intermediate timings and values.
Its various reporting mechanisms (pretty print, json, html, latex, markdown... )
makes it easy to analyze and report performance measurement regardless of
your workflow.Perfcounters natively support two kind of counters:TimeCounters()that are used to track timings.ValueCounters()thatr used if you want to track values.For each counter you can track intermediate values using thelap()API
if needed.Basic usageHere is a short example that demonstrate how to track time. Tracking values
looks very similarly.importrandomfromperfcountersimportTimeCounterscnts=TimeCounters()# init the counter collection.cnts.start('random')# start a timing counter called random.forxinrange(100000):int(random.random())cnts.stop('random')# stop the random countercnts.start('randint')# start a timing counter called randint.forxinrange(1000000):random.randint(0,1)cnts.stop('randint')# stop the randint counter.cnts.report(rounding=5)# report print all counter values in a nicely formated table.For more advanced usage take look at
thedemo jupyter notebook.InstallationThe easiest way to install perfcounters is via pip:pipinstall--user-Uperfcounters
Package: perfect-banner
perfect-bannerYour python project might have a cool looking
ascii art banner. But did you took into account
that some users may have a terminal open which
has a character width that is smaller than the one
of the art.Perhaps you want to create multiple banners with
different sizes so users with a smaller/bigger
terminal screen can take a look at your wonderful____                              
 |  _ \                             
 | |_) | __ _ _ __  _ __   ___ _ __ 
 |  _ < / _` | '_ \| '_ \ / _ \ '__|
 | |_) | (_| | | | | | | |  __/ |   
 |____/ \__,_|_| |_|_| |_|\___|_|Installationpip install perfect-bannerExample UsageThis example imports theartpackage fromtheartlibrary.importbannerimportartdefget_banners():forfontinart.FONT_NAMES:yieldart.text2art("python",font)choice=banner.choose(*get_banners())print(choice)You can also optionally setwidthorhighttoFalsein thechoosefunction to ignore
thewidthorheight. By defaultwidthis
set toTrueandheighttoFalse(due to
the feasibility to scroll).
Package: perfect-eval
📦 perfect-evalSafe eval moduleInstallationpipinstall-ihttps://mirrors.aliyun.com/pypi/simple/--extra-index-urlhttps://pypi.org/simple/perfect-evalExamplefromperfect_evalimporteval_expreval_expr("print('hello world')",{"print":print})# output: hello worldprint(eval_expr("now.strftime('%m-%d')",{"now":datetime.now()}))# output: 10-31print(eval_expr("a + b",{"a":123,"b":456}))# output: 579print(eval_expr("f'{a}+{b}= {a + b}'",{"a":123,"b":456}))# output: 123 + 456 = 579print(eval_expr("match(a, [(1, '11'), (2, '22'), (3, '33')], default='ooo')",{"a":1}))# output: 11print(eval_expr(r"re.sub(r'\d+', '很多', count)",{"count":'10个'}))# output: 很多个To DoBe the best version of you.More Resources[perfect-eval] on github.comOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: perfectextractor-ui
Quick startThis package provides a user interface forPerfectExtractorin the form of a Django web application.
It can be used as part of bigger app (such asTimeAlign) or stand-alone.How to install inside another Django app:Add "perfectextractor_ui" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        'widget_tweaks',
        'perfectextractor_ui,
    ]Include the perfectextractor_ui URLconf in your project urls.py like this:path('perfectextractor/', include('perfectextractor_ui.urls')),Runpython manage.py migrateto create the required models.Run your app and configure your corpora in the admin panel.How to run stand-alone:Create a python virtual environment for running perfectextractor-ui:virtualenv -ppython3 /path/to/venv/
source /path/to/venv/bin/activateInstall package and requirements:cd /path/to/perfectextractor-ui
pip install -r requirements.txt
pip install .Runpython manage.py migrateto create the required models.Start the app:python manage.py runserverConfigure your corpora in the admin panel (e.g.http://localhost:8000/admin/)