Saravanan666/pypi-org huggingface dataset:
Package: previewlink-helper
linkpreviewGet link preview in pythonGathering data from:OpenGraphmeta tagsTwitterCardmeta tagsMicrodatameta tagsJSON-LDmeta tagsHTML Generic tags (h1,p,img)URL readable partsInstallpip install linkpreviewUsageBasicfrompreviewlink_helperimportlink_previewurl="http://localhost"content="""<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><!-- ... ---><title>a title</title></head><body><!-- ... ---></body></html>"""preview=link_preview(url,content)print("title:",preview.title)print("description:",preview.description)print("image:",preview.image)print("force_title:",preview.force_title)print("absolute_image:",preview.absolute_image)print("site_name:",preview.site_name)print("favicon:",preview.favicon)print("absolute_favicon:",preview.absolute_favicon)Automatic fetch link contentfrompreviewlink_helperimportlink_previewpreview=link_preview("http://github.com/")print("title:",preview.title)print("description:",preview.description)print("image:",preview.image)print("force_title:",preview.force_title)print("absolute_image:",preview.absolute_image)print("site_name:",preview.site_name)print("favicon:",preview.favicon)print("absolute_favicon:",preview.absolute_favicon)lxmlas XML parserVery recommended for better performance.Installthelxmland use it like this:frompreviewlink_helperimportlink_previewpreview=link_preview("http://github.com/",parser="lxml")print("title:",preview.title)print("description:",preview.description)print("image:",preview.image)print("force_title:",preview.force_title)print("absolute_image:",preview.absolute_image)print("site_name:",preview.site_name)print("favicon:",preview.favicon)print("absolute_favicon:",preview.absolute_favicon)Advancedfrompreviewlink_helperimportLink,LinkPreview,LinkGrabberurl="http://github.com"grabber=LinkGrabber(initial_timeout=20,maxsize=1048576,receive_timeout=10,chunk_size=1024,)content,url=grabber.get_content(url)link=Link(url,content)preview=LinkPreview(link,parser="lxml")print("title:",preview.title)print("description:",preview.description)print("image:",preview.image)print("force_title:",preview.force_title)print("absolute_image:",preview.absolute_image)print("site_name:",preview.site_name)print("favicon:",preview.favicon)print("absolute_favicon:",preview.absolute_favicon)
Package: previsionio
Welcome to the Prevision.io Python SDKThe Prevision.io Python SDK allows to easily usePrevision.ioAPIs to train, predict and automate pipelines with sklearn-like interface.The full documentation is availablehere.Installationpip install previsionioorgit clone https://github.com/previsionio/prevision-python
cd prevision-python
python setup.py installSetupSign up for a free trialGo in the upper right corner menu to go to the API Key pagesGenerate a new master tokenSetup your client with itEnjoy creating your new models fromdocumentations
Package: prewl
PREWLPrompt Engineering Wrapper for LLMs (PREWL): A library for rapidly prototyping LLM-based applications via prompt engineering for NLU.Usageimportprewl,json# Load configuration for backend (e.g., GPT-3 credentials)prewl.configure("config.json")# Load the example promptsexamples=prewl.load_promps("prompts.json")PATTERN="""Text:{text}Sentiment:{sentiment}"""# Prompts objectsprompts=prewl.load_prompts(PATTERN,examples,output='sentiment')# Build the backend-driven model that will be usedmodel=prewl.train(prompts)# Model object# Use the model to build a prompt for the LLM, fetch the completion, and parse itnew_input="This movie was off the hook!"resp=model.infer(new_input)print("\nNew input: ",new_input)print("Prediction: ",resp)print()More examples can be found in theexamples/directory.ContributingComing soon...RequirementsSetting up virtual environmentpython-mvenv.envsource.env/bin/activateInstalling torchpipinstalltorch--extra-index-urlhttps://download.pytorch.org/whl/cu113Citing This WorkComing soon...
Package: pre-workbench
Protocol Reverse Engineering WorkbenchPRE Workbench is a software to support researchers in reverse engineering protocols
and documenting the results.
It supports various sources to import protocol traffic from, helps the
discovery process by displaying different views and heuristic-based
highlighting on data, and aids in documenting and sharing findings.InstallationFor installation instructions seedocs/install.md.Developmentmake devorpython3 setup.py build_ext --inplaceto compile pyx files in placemake packagebuilds pip packages and uploads to pypimake pyinstallerbuilds PyInstaller package (runpip install pyinstallerbefore)Runscripts\build_installer.batfrom a cmd.exe in this directory to build the setup.exe on Windows.Third PartyIconsFugue Icons,https://p.yusukekamiyamane.com/Crystal Project,https://store.kde.org/p/1002590/LibrariesPyQt5QScintillaLark ParserCythonQt-Advanced-Docking-System
Package: prex
Python Remote Execution (PREX)This is an experimental server that executes Python scripts (or any kind of
scripts, really) it receives over a websocket connection. The connection allows
a web client to launch and interact with Python programs in real-time.The main use-case scenario is to enable a client device running a web browser,
such as a smart phone or ChromeBook, to execute Python scripts in a natural
way.Please do _NOT_ run the server on your personal computer! Allowing clients to
run Python scripts from web apps is highly insecure. You have been warned!
Package: prey
prey#!/usr/bin/env preyasyncdefmain():awaitx("cat pyproject.toml | grep name")branch=awaitx("git branch --show-current")awaitx(f"dep deploy --branch={branch}")awaitx(["sleep 1; echo 1","sleep 2; echo 2","sleep 3; echo 3",])name="foo bar"awaitx(f"mkdir /tmp/${name}")A tool for writing shell scripts in Python. Inspired bygoogle/zx. This package provides a wrapper aroundasyncio.subprocess. If you're looking for a more complete solution you may want to check outzxpy.InstallpipinstallpreyDocumentationWrap your scripts in an async function calledmain:asyncdefmain():# script...It must be calledmainas the executable looks for a function calls main and calls it. This is used so commands can be asynchronous.You can add the shebang at the top of your script:#!/usr/bin/env preyand run it like so:chmod+x./script.py
./script.pyOr via thepreyexecutable:prey./script.pyWhen usingpreyvia the executable or a shebang, all of the functions (x,colorama,request, etc) are available wihtout any imports.await x("command")Asychronously executes a given string using thecreate_subprocess_shellfunction from theasyncio.subprocessmodule and returns the output.count=int(awaitx("ls -1 | wc -l"))print(f"Files count:{count}")cd("filepath")Changes the current working directory.cd("/tmp")awaitx('pwd')# outputs /tmpcolorama packageThecoloramapackage is available without importing inside scripts.print(f"{colorama.Fore.BLUE}Hello World!")request packageA wrapper around aiohttp,aiohttp-requests.requests.session.request, is available without importing inside scripts.response=awaitrequest("get","http://python.org")html=awaitresponse.text()Importing from other scriptsIt is possible to make use ofxand other functions via explicit imports:#!/usr/bin/env preyfrompreyimportxawaitx('date')Passing env variablesos.environ["FOO"]="bar"awaitx('echo $FOO')
Package: prezzemolo
Prezzemolo v0.0.4Table of ContentsIntroductionLicenseDownloadInstallationUbuntu LinuxmacOSWindows 10Other Unix-like SystemsReporting BugsContributingDeveloper DocumentationFrequently Asked QuestionsChange LogIntroductionPrezzemolo is a collection of classic data structure and algorithms that are useful in many different projects. The goal is to provide components that are robust, efficient and small (in decreasing order of importance). Each component has extensive unit testing to reduce the risk of regression. The project will grow organically as new components are needed in various projects, such as RP2 (the privacy-focused, open-source crypto tax calculator), and others.IMPORTANT DISCLAIMERS:Prezzemolo offers no guarantee of correctness (read thelicense).LicensePrezzemolo is released under the terms of Apache License Version 2.0. For more information seeLICENSEorhttp://www.apache.org/licenses/LICENSE-2.0.DownloadThe latest version of Prezzemolo can be downloaded at:https://pypi.org/project/prezzemolo/InstallationPrezzemolo has been tested on Ubuntu Linux, macOS and Windows 10 but it should work on all systems that have Python version 3.7.0 or greater.Installation on Ubuntu LinuxOpen a terminal window and enter the following commands:sudo apt-get update
sudo apt-get install python3 python3-pipThen install Prezzemolo:pip install prezzemoloInstallation on macOSFirst make sureHomebrewis installed, then open a terminal window and enter the following commands:brew update
brew install python3Then install Prezzemolo:pip install prezzemoloInstallation on Windows 10First make surePython3.7 or greater is installed (in the Python installer window be sure to click on "Add Python to PATH"), then open a PowerShell window and enter the following:pip install prezzemoloInstallation on Other Unix-like Systemsinstall python 3.7 or greaterinstall pip3pip install prezzemoloReporting BugsRead theContributingdocument.ContributingRead theContributingdocument.Developer DocumentationRead thedeveloper documentation.Frequently Asked QuestionsRead theuser FAQ listand thedeveloper FAQ list.Change LogRead theChange Logdocument.Prezzemolo Change Log0.0.4Added Dijkstra to Graph class0.0.3Manage py.typed to setup.cfg options.package_data0.0.2Added py.typed0.0.1First version tracked in change logimplemented Graph and Vertex classes with respective unit testsmoved avl_tree.py from RP2moved to_string from RP2
Package: prf
Pyramid RESTful Framework (PRF) is designed to help coding RESTful endpoints with minimal code. It takes care of lots of reasonable defaults and boilerplate code.Setup.First, lets install pyramid and create an app:virtualenv myapp
pip install pyramid
pcreate -s starter myapp
pip install -e .Now if we runpserve development.iniand navigate tohttp://localhost:6543we will see the standard pyramid app. Boring.Lets installhttpieto use it for doing requests to our endpoints. Feel free to use curl or any other http client as long as it supports CRUDs.And lets add prf to the mix!pip install git+https://github.com/vahana/prfAnd add resources.Modify__init__.mainfunction of myapp to look like:def main(global_config, **settings):
    config = Configurator(settings=settings)

    config.include('prf') #pyramid way of adding external packages.
    root = config.get_root_resource() #acquire root resource.
    user = root.add('user', 'users', view='prf.view.NoOp') # declare `users` root resource
    user_story = user.add('story', 'stories', view='prf.view.NoOp') # declare `nested resource `users/stories`

    #per pyramid, must return wsgi app
    return config.make_wsgi_app()The following endpoints are declared with the code above:users/{id}
users/{user_id}/stories/{id}Try these:# will get all declared resources
http 0.0.0.0:6543/_
# will get users
http 0.0.0.0:6543/users
will get stories for a user with id 1
http 0.0.0.0:6543/users/1/stories'NoOp' view, as name suggests, does not do much. We will need to create our own views for each resource.
In our case UsersView and UserStoriesView.Lets modify views.py to add the following:from prf.view import BaseView

Users = [
  {
    'id': 0,
    'name':'Alice',
  },
  {
    'id': 1,
    'name':'Bob',
  },
  {
    'id': 2,
    'name':'Katy',
  },
]

class UsersView(BaseView):

  def index(self):
    return Users

  def show(self, id):
    return Users[int(id)]

  def create(self):
    Users.update(**self._params)

  def delete(self, id):
    Users.pop(int(id))We need to change the view argument for theusersresource to point to our new class in themain:user = root.add('user', view='myapp.views.UsersView')Restart the server and try:# list users
http 0.0.0.0:6543/users
# delete a user with id 1
http DELETE 0.0.0.0:6543/users/1
# user 1 is gone
http 0.0.0.0:6543/usersAbove, we declaredindex,show,createanddeleteactions which correspond to: GET collection, GET resource, POST resource and DELETE resource respectively. You could also declareupdate, which would correspond to the PUT method. You dont need to declare all of them, only those you need. The missing ones will automatically return 405 Method Not Allowed error.Comment out theindexaction and try:http 0.0.0.0:6543/usersHappy RESTing !
Package: prf-api
PRF APIAPI de dados abertos da PRFEsta pacote tem o objetivo de facilitar o download e o uso dosdados abertos da PRF,
que contém informações sobre acidentes e infrações cometidas nas rodovias federais do Brasil.DependênciasPara baixar dados anteriores a 2018, é necessário instalarunrar.Para MacOSbrew install unrarPara Linuxapt-get install unrarUsoO pacote pode ser obtido viapip.pipinstallprf-apiPara utlizar, basta instanciar a classe:fromprf_apiimportprf_apidata=prf_api.PRFApi()data.baixar('infracoes',anos=list(range(2017,2019)))df=data.dataframe('infracoes',anos=list(range(2017,2019)),estado='RN')CréditosEste pacote foi criado comCookiecuttere o templateaudreyr/cookiecutter-pypackage.History0.0.1 (2019-08-09)First release on PyPI.0.2.1 (2021-06-08)Fix download of accident data
Package: prfect
prfectPRFect is a tool to predict programmed ribosomal frameshifting in eukaryotic, prokaryotic, and viral genomesThe manuscript is currently in review and has been preprinted on bioRxiv:https://www.biorxiv.org/content/10.1101/2023.04.10.536325v1It takes as input the genome and its annotated CoDing Sequence (CDS) as a GenBank file. It
searches through the file looking for 8 different slippery site motifs associated with
backwards (-1) frameshifts and two motifs associated with forward (+1) frameshifts. When
a motif is encountered, various cellular properties and contributing factors are assessed and
a prediction is made whether the site is indeed involved in programmed ribosomal frameshifting.To install:pip3 install prfectTo run:prfect.py input.gbkAn example genome for SARS-Cov2 is provided in the test folder. The SARS-Cov2 genome contains 12 genes the first of which happens to be a PRF gene and is denoted as such through the use of thejoinkeyword.  Any genes already present that use thejoinkeyword are split into their two parts and subsequently predicted anew and then tagged with the /label=1 feature tag to indicate a TruePositive.  When the genome is run through PRFect the known PRF gene is correctly predicted to utilize programmed ribosomal frameshifting.$ prfect.py test/covid19.gbk 

     CDS             join(266..13468,13468..21555)
                     /ribosomal_slippage
                     /direction=-1
                     /motif=is_threethree
                     /slippery_sequence=tttaaac
                     /label=1
                     /locus=NC_045512
                     /product="ORF1ab polyprotein"
                     /product="ORF1ab polyprotein"Another example is bacteriophage lambda, which has thegeneGandgeneGTtail assembly chaperone gene that is known to frameshift.  The current genbank annotation file (NC_001416) does not have the gene properly denoted with thejoinkeyword and so both pieces are in two separate CDS features.  When the genome is run through PRFect the gene is correctly identified as being a single PRF gene with the /label=0 to indicate that it is an UnknownPositive.$ prfect.py test/lambda.gbk

     CDS             join(9711..10115,10115..10549)
                     /ribosomal_slippage
                     /direction=-1
                     /motif=is_threethree
                     /bases=gggaaag
                     /label=0
                     /locus=NC_001416
                     /product="minor tail protein G"
                     /product="tail assembly protein T"
Package: prfr
prfrProbabilistic random forest regressor: random forest model that accounts for errors in predictors and labels, yields calibrated probabilistic predictions, and corrects for bias.For a faster and more elaborate calibration routine (highly recommended), aJAXinstallation is required. You can install the package with the extrajaxfeature, which will install the necessary dependencies.InstallationFrom PyPI, withjaxfeature:pipinstall"prfr[jax]"From PyPI, withoutjaxfeature:pipinstallprfrFrom Github (latest), withjaxfeature:pipinstall"prfr[jax] @ git+https://github.com/al-jshen/prfr"From Github (latest), withoutjaxfeature:pipinstall"git+https://github.com/al-jshen/prfr"Example usageimportnumpyasnpimportprfrx_obs=np.random.uniform(0.,10.,size=10000).reshape(-1,1)x_err=np.random.exponential(1.,size=10000).reshape(-1,1)y_obs=np.random.normal(x_obs,x_err).reshape(-1,1)*2.+1.y_err=np.ones_like(y_obs)train,test,valid=prfr.split_arrays(x_obs,y_obs,x_err,y_err,test_size=0.2,valid_size=0.2)model=prfr.ProbabilisticRandomForestRegressor(n_estimators=250,n_jobs=-1)model.fit(train[0],train[1],eX=train[2],eY=train[3])model.fit_bias(valid[0],valid[1],eX=valid[2])# check whether the calibration routine will run with JAXprint(prfr.has_jax)model.calibrate(valid[0],valid[1],eX=valid[2])pred=model.predict(test[0],eX=test[2])pred_qtls=np.quantile(pred,[0.16,0.5,0.84],axis=-1)print(pred.shape)
Package: prg
# Progen## Project GeneratorGenerate projects easily with a single command(`python progen.py [generator]`). As of v0.0.1a, Progen supports generating C++ projects. More efforts are needed to improve it.### Creating your own generatorYou can create your own project generator that will be utilized by Progen. A generator is simply a python file.There are two types of generators:- **Folders Only**This type of generator only requires that you specify folders that will be created with a variable called `folders`.For example:```pythonfolders = ["bin","bin/epic","build","src"]```Just save the code above as a python script (for example, `testscript.py`) inside Progen's generator folder in the installation directory.To generate a project based on the specified folders above, just run `python progen.py testscript` inside the terminal.- **Full Generator**This type of generator requires that you be responsible for making the folders. This is useful if you want to create a generator that is interactive and flexible.The code must be inside a `main()` function in order for it to work. Running a full generator is similar to running a *Folders only* generator.*NOTE: Generators must be saved inside Progen's `generators` folder in the installation directory*### LicenseProgen is licensed under the GNU General Public License v3.0.Copyright (C) 2015 Sean Francis N. Ballais
Package: prg2xex
prg2xexConvertKickAssembler.prgobject code to Atari 8 Bit .xexfile.It does this by prepending0xff 0xffto the beginning of the file and then inserting the end address of the code after the start address.On a Mac you can then double click on the resulting file to open it in theAtari800MacXemulator.DependenciesPython 3Installationpip3 install prg2xexUsageprg2xex < object.prg > object.xexWhereobjectis the name of your object code.TestingRun unit tests with:pytest
Package: prgb-pkg
Prgb-pkg(Despite the current project version is 0.x, full functionality of package is already implemented.
There is a need to check if there are exceptional cases in which package content do not work correctly.
After that, the version of package will be fixed and upgraded to 1.0 marking the stable release.)Prgb-pkgis a Python package containing wrapper class for iterable objects.The main reason of its creation, is to provide comfortable and intact tracking of progress
in pythonforloops, like intqdm.Thanks to output information being put in dedicated GUI the console output is undisturbed andkept clean even when you print out information during iterating.
There is a possibility to use wrapper class in already wrapped loop.Input iterable object does not have to beSized, but if it is the case
some progress information can not be obtained.Package does not use any dependiences.PyPI websiteGit project homepagePip installation:>pip install prgb-pkgImport method:from prgb_pkg import PrgbExample of wrapper class usage:for i in Prgb(iterable):
    ...Wrapper usage on nested loop:a = [3, 4, 5]

for elem in Prgb(a):
    print(elem)
    for i in Prgb(range(3)):
        print(elem ** i)Each wrapper can have an optional title and can be set to not display his progress in GUI:Prgb(iterable, 'Some hilarious and creative title')

Prgb(iterable, display_bar=False)Summary about ending time and totall runtime of chosen bar? No problem:with open('example_bar_summary.txt', 'w') as f:
    for i in Prgb(iterable, print_summary=True, summary_stream=f)
        ...
Package: prgconfig
prgconfigprgconfig is a little library that ease the manage of configuration
file written intoml. It comes with nice default. The
minimum you have to specify is your program name then it does the rest.
It aims to fit to standard in use for location of configuration file. It
is also totally configurable to fit your needs.InstallationRecommended installation is by usingpip:pipinstallprgconfigUsagePrgConfigis a dict like object.Basic example:fromprgconfigimportPrgConfigconfig=PrgConfig("prgname")config.load()print(config["section"]["key"])See the constructor ofPrgConfigclass to get an idea of possible
configuration.RoadmapSeeissues with theenhancementtag