Saravanan666/pypi-org huggingface dataset:
Package: ptlibs
PTLIBSSupport library for penterepToolsInstallationpip install ptlibsVersion History- 1.0.6
    - JSON improvements inside ptjsonlib module
- 1.0.5
    - Added tldparser module
    - Added cli module
    - Updated add_property function (ptjsonlib)
    - Updated WebPage definitions (ptpathtypedetector)
    - Other improvements & fixes
- 1.0.4
    - JSON changes
- 1.0.3
    - Updated ptjsonlibs, pathtypedetector
- 1.0.2
    - added ptthreads exception printing
    - added ptprint docker support
    - added ptprinthelper terminal size windows fix
- 1.0.1
    - added missing requests-toolbelt dependency
- 1.0.0
    - Cookie redirect fix
- 0.1.3
    - ptpathtypedetector - get_type() method tweaks
    - arraylock - new ThreadSafeArray class
    - added windows support (for tools that do not use functions that depend on fcntl, termios libraries)
- 0.1.2
    - Unification with type hints changes
- 0.1.1
    - Cached requests are now saved into /tmp/pentereptools/
    - Updated load_url_from_web_or_temp function
    - Requests are now being saved along with parsed request and response objects as a string
    - Other small changes to make ptscripts work properly
- 0.0.7 - 0.1.0
    - Unification with ptthreads
    - Added type hints
    - ptmisclib split into multiple classes
    - Implemented parsing of url to nodes
- 0.0.5 - 0.0.6
    - Implemented new printing method
    - New 'WARNING' definition added to ptdefs
- 0.0.4
    - removed 3rd party ipaddress module dependency
- 0.0.3
    - Replaced some characters in ptdefs
    - Added new methods to ptmisclib
- 0.0.1 - 0.0.2
    - Alpha releasesLicenseCopyright (c) 2024 Penterep Security s.r.o.ptlibs 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 3 of the License, or
(at your option) any later version.ptlibs 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 ptlibs.  If not, seehttps://www.gnu.org/licenses/.
Package: p-tlkc-privacy
IntroductionThis project implements the TLKC-privacy model proposed in the paperTLKC-Privacy Model for Process Mining.Python packageThe implementation has been published as a standard Python package. Use the following command to install the corresponding Python package:pipinstallp-tlkc-privacyUsagefromp_tlkc_privacy.privacyPreservingimportprivacyPreservingevent_log="running_example.xes"L=[2]C=[1]K=[1]K2=[0.1]# sensitive = ['creator']sensitive=[]T=["minutes"]cont=[]bk_type="sequence"#set, multiset, sequence, relativeprivacy_aware_log_dir="xes_results"privacy_aware_log_path="test.xes"pp=privacyPreserving(event_log,"example")result=pp.apply(T,L,K,C,K2,sensitive,cont,bk_type,privacy_aware_log_dir,privacy_aware_log_path)print(result)
Package: ptm
#path_to_mordorPackage to organization scraping based on bs4.Simple example.<!-- language: lang-py -->"""The module contains the rules of scraping."""from ptm import Frodofrom ptm.path_actions import gpagins, gpages, gresultsfrom ptm.result_actions import KeyRealtionships, gvalues, gtexts, gattrsfrom treasy import BookSearchDBfrom treasy.session import create_sessionfrom smithy.preparing import prepareRESORCE = 'http://www.labirint-bookstore.ru'START_PAGE = 'http://www.labirint-bookstore.ru/books'def result_proccessing(result_set):"""This function proccess the results."""db = BookSearchDB(create_session())result = prepare(result_set, {'name': 'labirint-bookstore', 'url': 'http://www.labirint-bookstore.ru'})print(result)description = result['description'].split('||')if len(description) > 2:result['description'] = description[2].strip()db.update_book(result)KEY_RELATIONSHIPS = KeyRealtionships({'ISBN:': 'isbn_numbers','Издательство:': 'publisher','Автор:': 'authors','Переводчик:': 'translators','Иллюстратор': 'illustrators','Серия:': 'series','Жанр:': 'genres','Год выпуска:': 'year','Тип обложки:': 'cover_format','Страниц:': 'page_number','Масса:': 'weidth','Размеры:': 'size','Иллюстратор:': 'illustrators'})RESULTS = {KEY_RELATIONSHIPS: gvalues(gtexts('div', attrs={'class': 'book-info-left'}),gtexts('div', attrs={'class': 'book-info-right'})),'description': gtexts('div', attrs={'id': 'bigcard-description'}, separator="||"),'title': gattrs('img', attrs={'class': 'img-cover-book'}, target_attribute='alt')}PATH = {gpagins(pagin_template='?page=', start_page_number=1, finish_page_number=10): {gpages('div', attrs={'class': 'books-name'}):gresults(result_proccessing, result_map=RESULTS)}}def run(rucksack):"""Run travel. This function triggers scraping."""frodo = Frodo(RESORCE, START_PAGE, PATH, rucksack)frodo.run()
Package: ptm-annotator
ptm-annotatorptmannotator is an open source cross-platform Python library to annotate and graphically analyze PTM search results.Free software: ISC licenseDocumentation:https://ptm-annotator.readthedocs.org.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-05-08)First release on PyPI.
Package: ptmcmcsampler
PTMCMCSamplerMPI enabled Parallel Tempering MCMC code written in Python.See theexamplesfor some simple use cases.For MPI support you will need A functional MPI 1.x/2.x/3.x implementation like:MPICH# macbrewinstallmpich# debiansudoaptinstallmpichOpen MPI# macbrewinstallopen-mpi# debiansudoaptinstalllibopenmpi-devTo run with MPI support you can run your script containing a sampler with:mpirun-np<numberoftemperaturechains>script.pyThis will kick offnpchains running at different temperatures. The temperature ladder and sampling schemes can be set in thePTMCMCSampler.sample()method.InstallationDevelopmentFor development clone this repo and run:makeinitsourcevenv/bin/activateVia pippipinstallptmcmcsamplerfor MPI support usepipinstallptmcmcsampler[mpi]Via condacondainstall-cconda-forgeptmcmcsamplerfor MPI support usecondainstall-cconda-forgeptmcmcsamplermpi4pyAttributionIf you make use of this code, please cite:@misc{justin_ellis_2017_1037579,
  author       = {Justin Ellis and
                  Rutger van Haasteren},
  title        = {jellis18/PTMCMCSampler: Official Release},
  month        = oct,
  year         = 2017,
  doi          = {10.5281/zenodo.1037579},
  url          = {https://doi.org/10.5281/zenodo.1037579}
}Correlation LengthIn order for the sampler to run correctly usingacorwith Python 3 kernels the GitHub version of acor needs to be installed. (Currently the PyPI version is behind the GitHub version.) It can be easily installed with:pip install git+https://github.com/dfm/acor.git@masterNote thatacoris not required to run the sampler, it simply calculates the effective chain length for output in the chain file.
Package: ptmethods
PTMETHODSHTTP methods testing toolScript retrieves methods offered by server from OPTIONS requestScript sends GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE, DEBUG, FOO headers and returns server responseScript tests CONNECT method by connecting to URL at ports 80, 443Script tests if domain can be used as a proxyInstallationpip install ptmethodsAdd to PATHIf you cannot invoke the script in your terminal, its probably because its not in your PATH. Fix it by running commands below.Add to PATH for Bashecho"export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"">>~/.bashrcsource~/.bashrcAdd to PATH for ZSHecho"export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"">>~/.zshhrcsource~/.zshhrcUsage examplesOptimally use this script against homepage, any image and sources protected by HTTP authenticationptmethods -u https://www.example.com/
ptmethods -u https://www.example.com/ -r
ptmethods -u https://www.example.com/index.php -sr -sh
ptmethods -u https://www.example.com/index.php -c PHPSESSID=abcdef
ptmethods -f URL_list.txtOptions-u   --url            <url>           Test specified URL
-f   --file           <file>          Load URLs from file
-sh  --show-headers                   Show response headers
-sr  --show-response                  Show response text
-p   --proxy          <proxy>         Set proxy (e.g. http://127.0.0.1:8080)
-T   --timeout                        Set timeout (default 10)
-c   --cookie         <cookie>        Set cookie
-ua  --user-agent     <ua>            Set User-Agent header
-H   --headers        <header:value>  Set custom header(s)
-r   --redirects                      Follow redirects (default False)
-c   --cache                          Cache requests (load from tmp in future)
-v   --version                        Show script version and exit
-h   --help                           Show this help message and exit
-j   --json                           Output in JSON formatDependenciesrequests
ptlibsVersion History1.0.1
    - Fix urllib3 error
1.0.0
    - Support for ptlibs v1.0.0
    - Code refactorization
0.0.2 - 0.0.4
    - Implemented proxy and connect tests
0.0.1 - 0.0.3
    Alpha releasesLicenseCopyright (c) 2023 Penterep Security s.r.o.ptmethods 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 3 of the License, or (at your option) any later version.ptmethods 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 ptmethods. If not, seehttps://www.gnu.org/licenses/.WarningYou are only allowed to run the tool against the websites which
you have been given permission to pentest. We do not accept any
responsibility for any damage/harm that this application causes to your
computer, or your network. Penterep is not responsible for any illegal
or malicious use of this code. Be Ethical!
Package: ptmod
ptmod: Modify PyTorch modelA Command line utility to modify serialized PyTorch model states.The definition of pytorch model fileIn the context of this text, a model file should be a serializedstate_dictobject. See for mote detail:https://pytorch.org/docs/stable/notes/serialization.html# e.g.importtorchclassBlock(torch.nn.Module):def__init__(self):super().__init__()self.layer1=torch.nn.Linear(10,10)self.layer2=torch.nn.Linear(10,10)classModel(torch.nn.Module):def__init__(self):super().__init__()self.block1=Block()self.block2=Block()model=Model()torch.save(model.state_dict(),"model.pth")Show the contents in a model fileUsageptmod-ls model.pth
# OR
ptmod "ls model.pth"Example%ptmod"ls model.pth"block1.layer1.weight
block1.layer1.bias
block1.layer2.weight
block1.layer2.bias
block2.layer1.weight
block2.layer1.bias
block2.layer2.weight
block2.layer2.bias%ptmod"ls -l model.pth"block1.layer1.weight(10,10)block1.layer1.bias(10,)block1.layer2.weight(10,10)block1.layer2.bias(10,)block2.layer1.weight(10,10)block2.layer1.bias(10,)block2.layer2.weight(10,10)block2.layer2.bias(10,)Copy parametersUsageptmod-cp model.pth:key out.pth:key2
# OR
ptmod "cp model.pth:key out.pth:key2"Example%ptmod"cp model.pth:block1 out.pth""ls out.pth"layer1.weight
layer1.bias
layer2.weight
layer2.bias%ptmod"cp model.pth:block1 out.pth:foo""ls out.pth"foo.layer1.weight
foo.layer1.bias
foo.layer2.weight
foo.layer2.biasRemove parametersUsageptmod-rm model.pth:key
# OR
ptmod "rm model.pth:key"Example%ptmod"cp model.pth out.pth""rm out.pth:block1""ls out.pth"block2.layer1.weight
block2.layer1.bias
block2.layer2.weight
block2.layer2.bias%ptmod"cp model.pth out.pth""rm out.pth:block2.layer2""ls out.pth"block2.layer1.weight
block2.layer1.bias
block1.layer1.weight
block1.layer1.bias
block1.layer2.weight
block1.layer2.biasSum/Average parametersUsageptmod-average out.pth model1.pth model2.pth ...
# OR
ptmod "average out.pth model1.pth model2.pth ...Example%ptmod"average out.pth model1.pth model2.pth"%ptmod"sum out.pth model1.pth model2.pth"
Package: ptmv
Python Terminal Media ViewerView images and videos without leaving the consoleMore info on GitHubFeaturesViewimagesform any terminalWatchvideosfrom any terminalWatchyoutubevideos from any terminal (-y,--youtube)Play videos atany fps(--fps) with soundResizeimages / videos (--width,--height)Easy to useRequirementsA terminal that supportstruecolor(list) andutf-8(most terminals should support utf-8).UsageptmvFILE[OPTIONS]Required argumentsFILEFile to display/play or youtube urlOptional arguments-y.--youtubeView youtube videos--heightSet height (setting bothwidthandheightwill ignore original aspect ratio)--widthSet width (setting bothwidthandheightwill ignore original aspect ratio)--start-timeSet start position for video.-f,--fpsSet fps (default 15 fps)-m,--muteMute audio-h,--helpDisplay help
Package: pt-name-gen
pt_name_genA Python module for generating random names in Portuguese.InstallationTo install the name_generator module, use pip:pip install pt_name_genUsageTo use pt_name_gen, import thept_name_genfunction from thept_name_genmodule and call it to generate a random name.The gender parameter should be 0 for male names or 1 for female names. If no gender parameter is specified, a random gender will be chosen.You can access these attributes using dot notation, like this:from pt_name_gen import pt_name_gen

person = pt_name_gen.generate_name(0)  # Male
print(person.full_name)  # Prints the full name of the person
print(person.email)      # Prints the email address of the personThept_name_genfunction returns aPersonobject, which has the following attributes:first_name: The first name of the person (e.g. "John").last_name: The last name of the person (e.g. "Smith").full_name: The full name of the person (e.g. "John Smith").email: The email address of the person (e.g. "johnsmith@gmail.com").gender: The gender the person (e.g. 0).Dependenciespt_name_genrequires theunidecodelibrary to remove special characters from the generated names.LicenseThept_name_genmodule is released under the MIT License.I hope this helps! Let me know if you have any questions.
Package: pt-names
PT-namesA package to handle portuguese PT names. Can generate random names and classify gender of a name.Um pacote para processar nomes portugueses (de Portugal). Consegue gerar nomes aleatórios e classificar se um nome é masculino ou feminino.Based off ofhttps://pypi.org/project/pt-name-gen/which had a few bugs and couldn't find their github repo to fork.Don't know where list of names was obtained from.
Package: pto
Easy timeouts for PythonPTO is an MIT-licensed library to make it easy to impose time limits on
the runtime of a function that doesn’t expose that functionality itself.
I was inspired by a need to prevent a scheduled job from running too
long on a platform where I was paying by the hour. Maybe you just need
to wrap a flaky network call. Either way, it’s as simple as:>>> from pto import timeout
>>> @timeout(5)
... def slow_func():
...     while True:
...         pass
...
>>> slow_func()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 2, in slow_func
  File "pto/__init__.py", line 97, in _timeout
    result = f(*args, **kwargs)
  File "<stdin>", line 3, in slow_func
  File "pto/__init__.py", line 89, in handle_timeout
    raise TimedOutException
pto.TimedOutException: u'Timed Out'InspirationI was inspired to do this byChris Wright’s recipe. I liked the
recipe, but I got tired of copying and pasting it, and I didn’t like
that the decorator didn’t preserve the signature, docstring, etc.CaveatsThis only works on Unix-like platforms. Sorry, Windows users. I’d love
to support Windows, but the secret sauce (signal.alarmfrom the std
lib) doesn’t work on Windows.This isn’t really designed to play well with threads, because only the
main thread will receive signals in Python. Anyway, if you’re using
threads, you probably have other ways to handle timeouts.If you want to put timeouts on static methods or class methods, you need
to put the timeout on the method first, and then decorate the wrapped
method with@staticmethodor@classmethod. There are examples intest_pto.py.I am pretty sure that the lib works in Python 2.4, but I don’t have an
install around to test that. If anybody wants to volunteer to verify the
lib on 2.4, please contact me.InstallationTo install PTO, simply:$ pip install ptoOr, if you absolutely must:$ easy_install ptoBut, you really shouldn’t do that.History0.0.7 (2013-03-14)Enhanced ignoresEnable setup.py testCustomize dependencies for Python 3 vs. Python 2Add Travis-CI status image to README.rst0.0.6 (2013-03-13)Add unit-testingEnable Travis-CIAdd some more caveats/gotchas to README.rstUpdate sample usageUpdate trove classifiers0.0.5 (2013-03-13)Include proper path for license in MANIFEST.in0.0.4 (2013-03-13)Embed license on PyPI page.0.0.3 (2013-03-13)First version that pip can actually install.0.0.2 (2013-03-12)First draft0.0.1 (2013-03-11)Conception
Package: ptoclockplot
What is a "clockplot?"The clockplot is designed to help visualize how subgroups of a population are arranged over time, while maintaining a metric of for the heterogeneity or purity of that subgroup.How are populations and subpopulations defined for a clockplot?This visualization was designed with biology in mind. For example, given a cell population defined by a particular CD marker, we might be want to define subpopulations by the different combinations of other markers expressed by those cells, and seewhenthose phenotypes might appear. The clockplot lets you arrange the stages or time points like hours on a clock, and then the subpopulations are "pulled" towards each time point based on their percentage component of that timepoint (this algorithm is partially inspired by tracking how the center of mass along a frequency wave moves during a Fourier transform).Essentially, the angle starting from 12 o'clock indicates how much time has passed in the experiment before a given population appeared. The population's proximity to the center of the clockplot indicates theheterogeneityof the population with respect to time. For instance, a population in the center of the plot indicates that the population is equally likely to appear at all time points of the experiment, while a population near the periphery has a stronger association to a given time point.That said, this way of visualizing data could be applied to other data driven fields as well. Consider examining how the content of different stock portfolios changes over time, or looking at which times during the year we see more action versus ciné art movies are released?Example with the includedlineardemodata, which is simulated data made by "rolling" a population bolus across a series of time points. We can then order the populations based on their angle from 12 o'clock: 2, 4, 3, 8, 9, 12, 5, 7, 6, 11, 10.Please seedemo.ipynbfor a demonstration of the usage.
Package: pton-pgk
PTON Project : City GeneratorMarius PONetTom THIL,EPITA Promo 2023This projects consists in a medieval city generator in python. The generated city depends on attributes as the number of population and its density.FeaturesGenerate a medieval city depending on the number of population and the density of the populationIt is possible to generate or not a castle, a wall and a lake in the cityThe result is stored in a.jsonfileThe user has to possibility to use a city viewerHow to useInstantiate a 'City' objectThis project can be executed with yourPycharmIDE. You have to run thecity.pyfile, located in thesrc/repository.A city object is instanciated as follows :city = City(population, density, has_walls, has_castle, has_lake)A City object has already been created incity.pywith values giving good results.  You can custom the generated cities by replacing them by your own values.There is a last'seed'parameter, none as default. 2 cities generated with the same parameters and the same seeds will be identical.Generating a.jsonfileYou can generate a.jsonfile for your 'city' object as follows :tools.json(city, 'path/to/your/file/.json')Use the city viewerTo use thecity viewer, you have to run runviewer.py. There is aviewfunction taking as parameter a.jsonfile corresponding to a generated city. By default, the fonction takestmp/city.jsonas argument.DocumentationA documentation has already been generated (indocs/_build/html/tml/index.html).However, if you want to generate it again for some reason, you must run the commandmake htmlin thedocsfolder.
Package: ptonppl
ptonppl — Princeton PeopleThis provides a Python package and a command-line tool to lookup the
campus directory of any member of the Princeton community. The package
provides a unified search function that queries the following fields:PUID,e.g.,902312554NetID,e.g.,lumbrosoAlias, when the user has defined one,e.g.,jeremie.lumbrosoEmail,e.g.,lumbroso@princeton.eduThis information is hard to come by consistently, and this tool seeks
to provide a robust interface to the information.InstallationThe package is distributed on PyPI and can be installed using the usual
tools, such aspiporpipenv:$pipinstall--userptonpplHelp Message$ ptonppl --help

Usage: ptonppl [OPTIONS] [QUERY]...

  Lookup the directory information (PUID, NetID, email, name) of any
  Princeton campus person, using whichever of LDAP, web directory or proxy
  server is available.

Options:
  -t, --type TYPE               Output type (e.g.: term, json, csv, emails).
  -u, --uniq / -nu, --not-uniq  Filter out duplicate records from the output.
  -s, --stats                   Display statistics once processing is done.
  -i, --input FILENAME          Read input from a file stream.
  -f, --fields FIELDS           Fields to keep (e.g.: 'puid,netid,email').
  --header / -nh, --no-header   Include or remove header in output.
  --version                     Show the version and exit.
  --help                        Show this message and exit.LicenseThis project is licensed under the LGPLv3 license, with the understanding
that importing a Python modular is similar in spirit to dynamically linking
against it.You can use the libraryptonpplin any project, for any purpose, as long
as you provide some acknowledgement to this original project for use of
the library.If you make improvements toptonppl, you are required to make those
changes publicly available.
Package: ptool
Skeleton project generator for various programming languagesTemplates are availablehereDeveloper notesVarious package properties are defined inptool/__init__py:__project_name____version____description__When publishing a new build of the package, ensure that__version__is incremented as appropriate.Usageusage: ptool [-h] [--version] {new,templates,values,update} ...

Skeleton project generator for various programming languages

positional arguments:
  {new,templates,values,update}
                        subcommand help
    new                 Create new project from template
    templates           List available templates
    values              List all values available to templates
    update              Update local template repository

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exitLicenceReleased underMIT License