Saravanan666/pypi-org huggingface dataset:
Package: py-perl5
PyPerl5PyPerl5 is a C-API based binding of perl5.Supported python versions are 2.7 or 3.6 or higher.InstallationThis package required python and perl development packages.$pipinstallpy-perl5UsageStartup Perl VM and execute script# -*- coding:utf8 -*-importperl5script=r"""use 5.10.0;use utf8;sub method {my $arg = shift;say $arg;return "perl method called with $arg";}"""defsome_func():vm=perl5.VM()vm.eval(script)ret=vm.call("method","hello perl")print(ret)vm.close()defopen_vm_use_context_manager():withperl5.VM()asvm:vm.eval(script)ret=vm.call("method","hello perl")print(ret)Load perl script file or package# -*- coding:utf8 -*-importperl5defcall_method_in_external():withperl5.VM()asvm:vm.require("sample1.pl")ret=vm.call("method","hello perl")print(ret)vm.use("Data::Dumper")dumper=vm.eval('sub {print Data::Dumper->Dump([@_])}')# type: CodeRefProxydumper({"test":1})vm.call_method("Data::Dumper","Dump",[[{"test":1}]])Object controlPyPerl5 can control to Perl package through the proxy object.# -*- coding:utf8 -*-importperl5fromperl5.vmimportProxy,CodeRefProxySCRIPT="""package Px::Testing;sub new {my $cls = shift;return bless{}, $cls;}sub method {my $self = shift;return @_;}1;"""defobject_control():withperl5.VM()asvm:vm.eval(SCRIPT)# Create new instanceo=vm.package("Px::Testing").new()assertisinstance(o,Proxy)# Create other new instanceo2=vm.package("Px::Testing").new()asserto!=o2method=o.methodassertisinstance(method,CodeRefProxy)assertmethod==o.method# Method call use code ref proxyret=method(1)assertret==1ret=o.method(2)assertret==2Python object access from PerlAlso, control to Python object from Perl code through the proxy object too.importperl5PROXY_SCRIPT="""use 5.10.0;use PyPerl5::Proxy qw/ py_get_object /;use PyPerl5::Boolean qw/ true false /;sub use_python_class {my $class = py_get_object("__main__.ProxyTestClass");say "Proxy object" if $class->isa("PyPerl5::Proxy");# Initialize python class and call methodmy $o = $class->new("Init python class");say $o->attr1;say $o->attr1("Set data");say $o->attr1;}sub use_python_func {my $f = py_get_object("__main__.proxy_func");my $ret = $f->(1, 2);say "Result: $ret, equal: ", $ret == true;$ret = $f->(true, true);say "Result: $ret, equal: ", $ret == true;}"""classProxyTestClass(object):def__init__(self,attr1):self._attr1=attr1defattr1(self,data=None):ifdataisNone:returnself._attr1self._attr1=datadefproxy_func(arg1,arg2):returnarg1==arg2defpython_func_call():withperl5.VM()asvm:vm.eval(PROXY_SCRIPT)vm.call("use_python_class")vm.call("use_python_func")TypeMapperPyPerl5 has a customizable type-mapping system.Default mapping list:a large int or long type map to Math::BigIntcomplex type map to Math::Complexfile object map to IO::Filedatetime map to DateTime or Time::PieceBoolean type map to PyPerl5::BooleanDetect PyPerl5 environIf you hope to detect a PyPerl5 environment, so you can use the 'PyPerl5::Util::run_under_python' method.importperl5script=r"""use 5.10.0;use PyPerl5::Util qw/ run_under_python /;sub check {say "called from python" if run_under_python;}"""defcheck_python_env():withperl5.VM()asvm:vm.eval(script)vm.call("check")
Package: pyperlin
pyperlinGPU accelerated Perlin Noise in pythonLimitation: resolutions needs to divide shapeUsing pytoch as the array backend makes the GPU acceleration trivial. Also it uses batch sampling to better use parallelization.By playing with the parameters of Perlin noise, it is possible to create different textures. (code at the bottom)InstallationpipinstallpyperlinUsageimporttorchfrompyperlinimportFractalPerlin2Dshape=(32,256,256)#for batch size = 32 and noises' shape = (256,256)resolutions=[(2**i,2**i)foriinrange(1,7)]#for lacunarity = 2.0factors=[.5**iforiinrange(6)]#for persistence = 0.5g_cuda=torch.Generator(device='cuda')#for GPU accelerationfp=FractalPerlin2D(shape,resolutions,factors,generator=g_cuda)noise=fp()#samplingBenchmarksCPU: Intel(R) Core(TM) i7-6850K CPU @ 3.60GHzGPU: Nvidia Titan XPAlgorithms(1,256,256);1octaves(1,256,256);6octaves(32,256,256);6octaves(32,1024,1024);8octavesnoise.pnoise273.8 ms86.3 ms2.85 s48 spyperlin.FractalPerlin2D (cpu)1.15 ms11.5 ms377 ms8.49 spyperlin.FractalPerlin2D (gpu)481 µs2.84 ms16.8 ms121 msMore ExamplesimporttorchfrompyperlinimportFractalPerlin2Dimportmatplotlib.pyplotaspltshape=(1,1024,1024)#for batch size = 1 and noises' shape = (1024,1024)factors=[.5**iforiinrange(8)]#for persistence = 0.5g_cuda=torch.Generator(device='cuda')#for GPU accelerationclouds_resolutions=[(2**i,2**i)foriinrange(1,7)]#for lacunarity = 2.0clouds_factors=[.5**iforiinrange(6)]#for persistence = 0.5clouds=FractalPerlin2D(shape,clouds_resolutions,clouds_factors,generator=g_cuda)().cpu().numpy()[0]fire_resolutions=[(2**i,4**i)foriinrange(1,4)]#for lacunarity = 2.0 and 4.0fire_factors=[.5**iforiinrange(3)]#for persistence = 0.5fire=FractalPerlin2D(shape,fire_resolutions,fire_factors,generator=g_cuda)().cpu().numpy()[0]fig=plt.figure(figsize=(10,5))ax1=fig.add_subplot(121)ax1.set_axis_off()ax1.set_title('Clouds')ax1.imshow(clouds,vmax=1.2,cmap=plt.get_cmap('Blues'))ax2=fig.add_subplot(122)ax2.set_axis_off()ax2.set_title('Fire')ax2.imshow(fire,vmax=.3,cmap=plt.get_cmap('YlOrBr'))fig.show()
Package: pypermacc
pypermaccPython3 wrapper for the perma.cc API (partial implementation, pull requests welcome)InstallationInstall from pypi :pip install pypermaccInstall from the source code :git clone https://github.com/Te-k/pypermacc.git
cd pypermaa
pip install .UsageWithout private key:frompypermaccimportPermaccperm=Permacc()# Download public archivesarchives=p.public_archives()# Get detail on the first onedetails=p.archive_detail(archives['objects'][0]['guid'])# Download warc filewarc=p.archive_download(archives['object'][0]['guid'])With a private keyfrompypermaccimportPermaccperm=Permacc(KEY)# Save a webpagesaved=pp.archive_create('https://perma.cc/')# InceptionLicenseThis code is publised under the MIT license
Package: pypermod
pypermodThis python package provides various tools to predict energy expenditure and recovery dynamics of an athlete. The
namepypermodstands forPython Performance Modeling.More details on the purpose of this package can be found in our manuscriptA hydraulic model outperforms work-balance
models for predicting recovery kinetics from intermittent exercise. You can find the preprint
onarXiv.You may also want to check our detailed video presentation
atSTARS. Or the more recent presentation at theSFU Sports Analytics Seminar.If you make use of this project, we would be grateful if you star the repository and/or cite our preprint.@misc{weigend2021hydraulic,
      title={A hydraulic model outperforms work-balance models for predicting recovery kinetics from intermittent exercise}, 
      author={Fabian C. Weigend and David C. Clarke and Oliver Obst and Jason Siegler},
      year={2021},
      eprint={2108.04510},
      archivePrefix={arXiv},
      primaryClass={cs.OH}
}SetupIf you aim to use the package for your own analysis you may want to install it viapip3 install pypermodwithout the
need for a manual download.If you aim to work on the source code you may clone theGitHub_repository. You
can install the files from the repository by runningpip3 install -e <path_to_project_root>.UsagePlease see the scripts in theexample_scriptsfolder of ourGitHub_repositoryfor example applications. Each subdirectory has
its own README.md with instructions. Available examples areRecovery StudyVO2 Study
Package: pyperp
PyPerpA python SDK for Perpetual Protocol.InstallationFrom PyPi:pip install pyperpDocumentationThe complete documentation is availablehereExample CodeThis example code is written to demonstrate simple trading on Optimism Kovan.Create an ApiProvider objectfrom eth_account import Account
from pyperp.providers import OptimismKovanProvider

account = Account.from_key('<PRIVATE_KEY_HERE>')
provider = OptimismKovanProvider(
  '<RPC_ENDPOINT_URL>',
  account
)Approve Vault to use USDCfrom pyperp.contracts import Vault
from pyperp.common.types import GasParams

gas_params = GasParams(
  gas=1000000,
  gas_price=100000
)

vault = Vault(provider)

receipt = vault.approve_vault_to_use_usdc(
  gas_params
)deposit USDC to vaultreceipt = vault.deposit(
  vault.usdc.address,
  10000000000,
  gas_params
)Vault.deposit() takes the following positional arguments:token: contract address of collateral tokenamount: amount of token to depositgas_params: GasParams object denoting gas paramateres.check how much collateral can be withdrawnprint(
  vault.get_free_collateral(
    account.address
  )
)withdraw from vaultreceipt = vault.withdraw(
  vault.usdc.address,
  <AMOUNT_HERE>,
  gas_params
)open a positionYou can open a position for either vBTC or vETH. In this example we will open a position for vBTCfrom pyperp.contracts import ClearingHouse
from pyperp.contracts.types import OpenPositionParams
from pyperp.commom.utils import getDeadline

clearing_house = ClearingHouse(provider)

params = OpenPositionParams(
  base_token = clearing_house.vbtc.address,
  is_base_to_quote = True,
  is_exact_input = True,
  amount = int(0.002*10**18),
  opposite_amount_bound = 0,
  deadline = getDeadline(120), #deadline is 120 secs from now
  sqrt_price_limit_x96 = 0
)

receipt = clearing_house.open_position(
  params, gas_params
)get account valueprint(
  clearing_house.get_account_value(account.address)
)Close Positionfrom pyperp.contract.types import ClosePositionParams

params = ClosePositionParams(
  base_token=clearing_house.vbtc.address,
  sqrt_price_limit_x96=0,
  oppposite_amount_bound=0,
  deadline=getDeadline(120)
)

receipt = clearing_house.close_position(
  params, gas_params
)
Package: pyper-piper
PyperThePipernetworking protocol in Python.How to install?The version on pypi is the stable version, and the version on github is the development version.To get it from pypi use:pip3installpyper-piperTo install from github use:pip3installgit+https://github.com/Bigjango13/PyperIf you are making you're own changes to pyper it can be installed withpip3installpath/to/pyperHow to use?An example server and an example client can be found under theexamplesdirectory.CommonPiper specification versionThe piper specification version that pyper is currently based on can be accesesed throught thepiperSpecVersionvariables.Content typesThese content types can be used instead of the ids for content types, here they are:utf8(00)gemtext(01)ascii(02)file(10)redirect(20)notFound(22)internalError(23)specVersion(24)There are also some content types fromlibpiperfor compatibility.clientOutOfMemory(F0)clientConnectionError(F1)clientInternalError(F2)There is also one I added to handle invaid data sent from the server.clientInvalidData(F3)There is also a dictonary that can be used to translate the content types into more human friendly variants, it is calledcontentType.DebuggingThepyperDebugvariable will toggle printing the packets, it defaults to whateverPYPER_DEBUGis set to (None in most cases) but can be changed in python.ClientgetUrlRedirect(originalUrl, originalUrlPort, url)Takes the current url, the current port, and the url that the current url is telling you to redirect to.Gets the url to redirect to and returns the arguments forpyper.client.connect.getHostname(ip, port, path, args)Return the formated url.connectFromUrl(url)Returns the arguments forpyper.client.connect(excludingredirectsAllowed) from a piper url.connect(ip, port, path, options, redirectsAllowed)Connects to a piper server based on the ip, port, path, and options.IfredirectsAllowedis not equal to zero it will also automatically follow redirects and remove one fromredirectsAllowed, if it is set below zero it will always redirect.ServerPyperServer__init__(port)Creates a pyper server and binds it to the ip and port.start()Starts the server.parseRequest(path)Meant to be used as a decorator, it maps a function to a path.For example:importpyperpyperServer=pyper.server.PyperServer()@pyperServer.parseRequest("/")defindex(request):returnpyper.common.ascii,"This is the index"pyperServer.start()if the option is "*" pyper will use it as a fallback for when a page isn't found (good for making a custom 0x22 page).requestis dictionary that includesclient_addr(the address of the client),options(a dictionary of the url options), andpath(the url path).
Package: pyperplan
Pyperplanis a lightweight STRIPS planner written in Python.Please note that Pyperplan deliberately prefers clean code over fast
code. It is designed to be used as a teaching or prototyping tool. If
you use it for paper experiments, please state clearly that Pyperplan
does not offer state-of-the-art performance.It was developed during the planning practical course at
Albert-Ludwigs-Universität Freiburg during the winter term 2010/2011 and
is published under the terms of the GNU General Public License 3
(GPLv3).Pyperplan supports the following PDDL fragment: STRIPS without action
costs.RequirementsPyperplan requiresPython>= 3.6.InstallationFrom the Python package index (PyPI):pip install pyperplanFrom inside a repository clone:pip install --editable .This makes thepyperplancommand available globally or in yourvirtual
environment(recommended).UsageThepyperplanexecutable accepts two arguments: a PDDL domain file and a
PDDL problem file. Example:pyperplan benchmarks/tpp/domain.pddl benchmarks/tpp/task01.pddlThe domain file can be omitted, in which case the planner will attempt
to guess its name based on the problem file. If a plan is found, it is
stored alongside the problem file with a .soln extension.By default, the planner performs a blind breadth-first search, which
does not scale very well. Heuristic search algorithms are available. For
example, to use greedy-best-first search with the FF heuristic, runpyperplan -H hff -s gbf DOMAIN PROBLEMFor a list of available search algorithms and heuristics, runpyperplan --helpFor more information on using the planner and how to extend it to do
more fancy stuff, see thedocumentation.FAQsPDDL typesPyperplan follows the semantics that all types other than the universal
supertype object (which is mentioned as such in the PDDL 1.2 paper) need
to be explicitly introduced.ContactPyperplan is hosted on GitHub:https://github.com/aibasel/pyperplanThe original authors of Pyperplan are, in alphabetical order:Yusra AlkhazrajiMatthias FrorathMarkus GrütznerThomas LiebetrautManuela OrtliebJendrik SeippTobias SpringenbergPhilip StahlJan WülfingThe instructors of the course in which Pyperplan was created were Malte
Helmert and Robert Mattmüller.If you want to get in touch with us, please contact Robert Mattmüller or
Jendrik Seipp. Their email addresses can easily be found on the web.Citing PyperplanPlease cite Pyperplan using@Misc{alkhazraji-et-al-zenodo2020,
  author =       "Yusra Alkhazraji and Matthias Frorath and Markus Gr{\"u}tzner
                  and Malte Helmert and Thomas Liebetraut and Robert Mattm{\"u}ller
                  and Manuela Ortlieb and Jendrik Seipp and Tobias Springenberg and
                  Philip Stahl and Jan W{\"u}lfing",
  title =        "Pyperplan",
  publisher =    "Zenodo",
  year =         "2020",
  doi =          "10.5281/zenodo.3700819",
  url =          "https://doi.org/10.5281/zenodo.3700819",
  howpublished = "\url{https://doi.org/10.5281/zenodo.3700819}"
}
Package: pyperscan
pyperscanAn opinionated Python binding forHyperscanfocusing on easy of
use and safety.SeeUsageto get started andAPI Documentationfor a comprehensive
overview.LicenseLicensed under either ofApache License, Version 2.0
(LICENSE-APACHEorhttps://www.apache.org/licenses/LICENSE-2.0)MIT license
(LICENSE-MITorhttps://opensource.org/licenses/MIT)at your option.ContributionUnless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
Package: pyperseo
# SEMANTIC FUNCTIONALITIESPull the image in your local from [Dockerhub](https://hub.docker.com/repository/docker/pabloalarconm/perseo):docker pull pabloalarconm/perseo:latest<hr>##  Unique identifier generator:Milisecond timestamp for CSV spreadsheetsRun the docker by pointing your CSV files as a volume to `/app/data` It will take all CSVs from this directory and transform all of them:docker run –rm -v /path/of/your/volumes:/app/data pabloalarconm/perseo uniqidIf you dont point to any volume:docker run –rm pabloalarconm/perseo uniqid.Docker will run the default mock CSV files included in/app/datanamedtrial.csv## NT to TTL transformationRDF data transformation from N-Triples representation to TurtleRun the docker by pointing your N-Triples files as a volume to `/app/data` It will take all CSVs from this directory and transform all of them:docker run –rm -v /path/of/your/volumes:/app/data pabloalarconm/perseo 2ttl
Package: py-persian-sms
py-persian-smsپکیج پایتون برای کار با ای پی آی sms.ir .در این پکیج تنها قابلیتارسال پیامکبه وسیله ای پی آی فعال است.توسعه توسط امیرحسین نشویhow to useinstallationpip install py-persian-smsusagefrom pars_sms import Sms



api_key = "YOUR-API-KEY"

secret_key = "YOUR-SECRET-KEY"

line_number = "YOUR-LINE-NUMBER" #only required for bulk sms and sms without template



manager = Sms(api_key, secret_key, line_number)

manager.send("0912XXXXXXX",  text="سلام")
Package: pypersist
pypersistpypersist is a persistent memoisation framework for Python 3.  Persistent
memoisation is the practice of storing the output of a function permanently to a
disk or a server so that the result can be looked up automatically in the
future, avoiding any known results being recomputed unnecessarily.Installationpypersist is available from PyPI, and the latest release can be installed using,
for example:pip3 install --user pypersistAlternatively, the latest development version can be installed using Github:git clone https://github.com/mtorpey/pypersist.git
pip3 install --user ./pypersistExamplesTo use, import thepersistclass from thepypersistpackage:frompypersistimportpersistand use it as a decorator when writing a function:@persistdefdouble(x):returnx*2print(double(3))print(double(6.5))This will store the outputs of thedoublefunction in a directory calledpersist/double/, in a machine-readable format.One can specify various arguments topersist.  For example:@persist(key=lambdax,y:(x,y),hash=lambdak:'%s_to_the_power_of_%s'%k,pickle=str,unpickle=int)defpower(x,y):returnx**yprint(power(2,4))print(power(10,5))will store the outputs ofpowerin human-readable files with descriptive
filenames.Many more options are available.  See thepersistclass documentation for a
full description, orlaunch the included notebook on
Binderfor more examples.Seethis HackMDand the Issue
tracker for current plans.CitingPlease cite this package as:[Tor20]
M. Torpey,
pypersist,
Python memoisation framework,
Version X.Y (20XX),https://github.com/mtorpey/pypersist.Acknowledgementspypersist was created as part of the OpenDreamKit project:https://opendreamkit.org/This part of the project is summarised inthis report.This infrastructure is part of a project that has received funding from the
  European Union's Horizon 2020 research and innovation programme under grant
  agreement No 676541.
Package: pypersonality
pypersonalityWritten in python , Module to identify the personality type from a text given using (MBTI) Myers-Briggs Personality Type Dataset.How to use it?Install the module from pypihttps://pypi.org/project/pypersonality/pip install pypersonalityimport the modulefrom pypersonality.personality import PyPersonalityNow you have a text file source, open and read the strings ,read_File_as_list is a function which splits the text files into strings.dictlist = [{}]
data = read_file_as_list("demo_text/modi.txt")
for line in data:
    dictlist.append(p.get_personality(line))Now the dictlist list has all the results, May be we need to combine all the dicontry entriesfinal_results = {}
for dictionary in dictlist:
for key, value in dictionary.items():
if key in final_results:
final_results[key] = value + final_results[key]
else:
final_results[key] = valuethe final_results has the personality types identified with the weightage
Package: pyperspace
Pyperspace is a time series database server written purely in Python and based on an LSM tree model for storage.Pyperspace can be run either by the frontend “pyperspaced” and a configuration file, or as an embedded daemon in any Python application.  Designed for high-throughput and low-latency, Pyperspace utilizes a hybrid in-memory and on-disk storage engine that spawns subworkers to merge and compact disk contents whenever necessary and to avoid thread contention with concurrent clients reading and writing.Because Pyperspace uses an LSM tree model, files are periodically merged and may result in higher disk utilization.  Configuration can be tuned based on performance and storage preferences.
Package: pypertext
PypertextTransform a Python dictionary to HTML string.InstallRequires python 3.6+pip install pypertextUsageTherender_elementfunction taks a dictionary and returns a string.el={"tag":"div","attrs":{"class":"container",},"children":[{"tag":"h1","children":"Hello World!",},{"tag":"p","children":"This is a paragraph.",},],}expected='<div class="container"><h1>Hello World!</h1><p>This is a paragraph.</p></div>'out=render_element(el)assertout==expectedTherender_documentfunction takes a dictionary or list and returns a full HTML document as a string.el={"tag":"div","attrs":{"class":"container",},"children":[{"tag":"h1","children":"Hello World!",},],}expected='<!DOCTYPE html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/></head><body><div class="container"><h1>Hello World!</h1></div></body></html>'out=render_document(body=el)assertout==expectedTasksUse thexctask runner to execute the commands below.build-distrm -rf ./dist
python setup.py sdistcleanDelete build artifactsrm -rf dist/ pypertext.egg-info/ site/ build/
rm -rf ./pypertext/*.so
rm -rf ./pypertext/__pycache__/
rm -rf ./pypertext_sessions.dbupload-pypitwine upload --repository pypi dist/*upload-testpypitwine upload --repository testpypi dist/*install-devrm -rf ./pypertext.egg-info
python -m pip uninstall -y pypertext
python -m pip install -e .[dev]
Package: pypes
Pypes provides a framework for building component oriented architectures. It
falls under the paradigm of Flow-Based Programming in which applications are
defined as networks of “black box” processes, which exchange data across
predefined connections called ports. These black box processes can be
reconnected endlessly to form different applications without having to be
changed internally. The concept is very similar, if not identical, to that of
Unix pipes.Pypes is designed to build applications in a more data centric manner where
data flow is more prominent than control flow.For detailed information regarding Flow-Based Programming concepts please
see
J. Paul Morrison’s Book titledFlow-Based Programming.FeaturesMulti-Processor SupportMicro-Thread ArchitectureComponent BasedCross PlatformOpen SourceWeb 2.0 InterfaceRequirementsStackless Python 2.6.xUsagehttp://bitbucket.org/diji/pypes/wiki/HomeChangelog1.1.0 - Released March 4, 2010Fixes build issues due to Pylons version bump1.0.0 -Released February 14, 2010Final stable release.Merges pypesvds which is now deprecated0.1.0b2 - Released August 15, 2009Added recvall() which returns an interator over the port bufferAdded api-docsAdded examples0.1.0b1 - Released August 10, 2009Initial release