Saravanan666/pypi-org huggingface dataset:
Package: phriky-units
## Phriky Units - Physical Unit Inconsistency DetectionPhysical unit static analysis tool for <a href=’http://www.ros.org’>ROS</a> C++.WINNER: <a href=”https://conf.researchr.org/home/issta-2017”>ISSTA 2017 Best Tool Demonstration</a><a href=’https://unl.box.com/shared/static/83mnbe7ez73z5az7ct5gbabo1wm9htfl.ova’>ARTIFACT – Download Virtual Machine with phriky-units pre-installed (Ubuntu 16.04 VM 3 GB .ova).</a><a href=”https://youtu.be/cc-Bubopml4” target=”_blank”><img src=”./.youtube.png” width=”420” alt=”youtbe screenshot for Phriky-Units”></a>* Free software: MIT license .. *Lightweight static analysis Lightweight static analysis## Install (tested on Ubuntu 16.04 and OSX 10.12.6)pip install phriky_unitsRequires Cppcheck greater than 1.75:apt-get install cppcheck(Ubuntu 16.04)brew install cppcheck(OSX)git clone git://github.com/danmar/cppcheck.git(Ubuntu 14.04)Examples:You can run examples by checking out:git clone https://github.com/unl-nimbus-lab/phriky-units.gitThen from that directory run:phriky_units ./examples/addition/src/action.cppphriky_units ./examples/assignment/src/trajectory_planner_ros.cppphriky_units ./examples/comparison/src/twist_marker.cppFeaturesDetects physical unit inconsistencies, like adding quantities with different units, i.e.meters+seconds.Lightweight static analysisPath insensitiveNo annotation burdenLow false positive rate (&lt; 15% for `high-confidence’ inconsistencies)Works with [ROS]Credits[NIMBUS] Lab at the University of Nebraska, LincolnThis work was supported in part by NSF awards #1638099 and #1526652, and USDA-NIFA #2013-67021-20947.[ROS]:http://www.ros.org[NIMBUS]:http://nimbus.unl.eduHistory0.1.0 (2016-08-31)First release on PyPI.
Package: phringe
PHRINGEPHRINGEis a syntheticPHotometRy data generator for nullINGintErferometers. It can simulate the
observation of an exoplanetary system with a space-based nulling interferometer and generate realistic photometry data
as a function of wavelength/spectral channel and time, considering both astrophysical and instrumental noise sources.DocumentationThe documentation including installation and usage instructions, examples and a general user documentation can be found
onphringe.readthedocs.io.FeaturesModel different array architectures including different array configurations (Emma-X, Triangle, Pentagon) and
different nulling schemes (double Bracewell, Kernel)Model noise contributions from astrophysical sources including stellar, local zodi and exozodi leakageModel noise contributions from systematic instrument perturbations including amplitude, phase (OPD) and polarization
rotation perturbationsConfigure the osbervation and the observatory with all major parametersConfigure the observed planetary system including the star, planets and exozodiExport the photometry data as a FITS fileContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,
PHRINGE is free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: phronesitron
PhronesitronPhronesitron is a set of tools to interact with textual AI
tools like OpenAI's models.Example use:> ph explain quantum physics in 10 words
Mysterious particles with probabilistic behavior in complex systems.Currently, openAI models are supported.SetupSet the openAI API key (get it from here:https://platform.openai.com/account/api-keys)export OPENAIKEY=<put key here>VersioningUses semantic versioning.https://semver.org/
Package: phruzz-matcher
phruzz-matcherCombination of the RapidFuzz library with Spacy PhraseMatcher
The goal of this component is to find matches when there were NO "perfect matches" due to typos or abbreviations between a Spacy doc and a list of phrases.
To see more about Spacy Phrase Matcher go tohttps://spacy.io/usage/rule-based-matching#phrasematcherInstallation (dev)git clone https://github.com/mjvallone/phruzz_matcher_spacy.gitConfiguration (dev)Create virtualenv using python3 (followhttps://virtualenvwrapper.readthedocs.io/en/latest/install.html)virtualenv venvActivate the virtualenv. venv/bin/activateInstall requirementspip install -r requirements.txtUsageFirst you need to install itpip install phruzz_matcherIf you want to add it to your pipeline you could do something like this:from phruzz_matcher.phrase_matcher import PhruzzMatcher

@Language.factory("phrase_matcher")
def phrase_matcher(nlp: Language, name: str):
    return PhruzzMatcher(nlp, list_of_phrases, entity_label, match_percentage)


nlp.add_pipe("phrase_matcher")Parametersnlp: the Spacy model you use (it was tested with the different Spanish models from Spacy).list_of_phrases: the list of phrases you want to find in the Spacy doc.entity_label: when finding matches you need to specify which entity label will replace them in the Spacy doc.match_percentage: percentage from the one you will keep matches between text from Spacy doc and the list of phrases. Higher the percentage, lower the differences "tolerated" to find a match.ResultBased on Spacy documentation "A pipeline component is a function that receives a Doc object, modifies it and returns it", so the PhruzzMatcher returns a Doc object.
For further information visithttps://spacy.io/usage/processing-pipelines#custom-componentsExampleimport spacy
from spacy.language import Language
from phruzz_matcher.phrase_matcher import PhruzzMatcher

famous_people = [
        "Brad Pitt",
        "Demi Moore",
        "Bruce Willis",
        "Jim Carrey",
]

@Language.factory("phrase_matcher")
def phrase_matcher(nlp: Language, name: str):
    return PhruzzMatcher(nlp, famous_people, "FAMOUS_PEOPLE", 85)

nlp = spacy.blank("es")
nlp.add_pipe("phrase_matcher")

doc = nlp("El otro día fui a un bar donde vi a brad pit y a Demi Moore, estaban tomando unas cervezas mientras charlaban de sus asuntos.")
print(f"doc.ents: {doc.ents}")
#doc.ents: (brad pit, Demi Moore)
Package: phsic-cli
Pointwise Hilbert窶鉄chmidt Independence Criterion (PHSIC)Computeco-occurrencebetween two objects utilizingsimilarities.For example, given consistent sentence pairs:XYThey had breakfast at the hotel.They are full now.They had breakfast at ten.I'm full.She had breakfast with her friends.She felt happy.They had breakfast with their friends at the Japanese restaurant.They felt happy.He have trouble with his homework.He cries.I have trouble associating with others.I cry.PHSIC can give high scores to consistent pairs in terms of the given pairs:XYscoreThey had breakfast at the hotel.They are full now.0.1134They had breakfast at an Italian restaurant.They are stuffed now.0.0023I have dinner.I have dinner again.0.0023Installation$ pip install phsicThis will installphsiccommand to your environment:$ phsic --helpBasic UsageDownload pre-trained wordvecs (e.g. fasttext):$ wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/crawl-300d-2M.vec.zip
$ unzip crawl-300d-2M.vec.zipPrepare dataset:$ TAB="$(printf '\t')"
$ cat << EOF > train.txt
They had breakfast at the hotel.${TAB}They are full now.
They had breakfast at ten.${TAB}I'm full.
She had breakfast with her friends.${TAB}She felt happy.
They had breakfast with their friends at the Japanese restaurant.${TAB}They felt happy.
He have trouble with his homework.${TAB}He cries.
I have trouble associating with others.${TAB}I cry.
EOF
$ cut -f 1 train.txt > train_X.txt
$ cut -f 2 train.txt > train_Y.txt
$ cat << EOF > test.txt
They had breakfast at the hotel.${TAB}They are full now.
They had breakfast at an Italian restaurant.${TAB}They are stuffed now.
I have dinner.${TAB}I have dinner again.
EOF
$ cut -f 1 test.txt > test_X.txt
$ cut -f 2 test.txt > test_Y.txtThen, train and predict:$ phsic train_X.txt train_Y.txt --kernel1 Gaussian 1.0 --encoder1 SumBov FasttextEn --emb1 crawl-300d-2M.vec --kernel2 Gaussian 1.0 --encoder2 SumBov FasttextEn --emb2 crawl-300d-2M.vec --limit_words1 10000 --limit_words2 10000 --dim1 3 --dim2 3 --out_prefix toy --out_dir out --X_test test_X.txt --Y_test test_Y.txt
$ cat toy.Gaussian-1.0-SumBov-FasttextEn.Gaussian-1.0-SumBov-FasttextEn.3.3.phsic
1.134489336180434238e-01
2.320408776101631244e-03
2.321869174772554344e-03Citation@InProceedings{D18-1203,
  author = 	"Yokoi, Sho
        and Kobayashi, Sosuke
        and Fukumizu, Kenji
        and Suzuki, Jun
        and Inui, Kentaro",
  title = 	"Pointwise HSIC: A Linear-Time Kernelized Co-occurrence Norm for Sparse Linguistic Expressions",
  booktitle = 	"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
  year = 	"2018",
  publisher = 	"Association for Computational Linguistics",
  pages = 	"1763--1775",
  location = 	"Brussels, Belgium",
  url = 	"http://aclweb.org/anthology/D18-1203"
}
Package: phsutaprofile
PyPi:https://pypi.org/project/phsutaprofile/สวัสดี package นี้มีไว้เพื่ออธิบาย profile ของ Tony และสามารถนำไปใช้กับ
user อื่นได้วิธีติดตั้งเปิด CMD / Terminalpipinstallphsutaprofileวิธีใช้งานแพ็คเกจนี้เปิด IDLE ขึ้นมาแล้วพิมพ์…my=Profile('Tony')my.company='Phsuta'my.hobby=['Developer','Programming','Reading','Diving']print(my.name)my.show_email()my.show_myart()my.show_hobby()my.show_mice()my.show_dolls()Developed By B1ackmonday
Package: phtml
phtml is a silly python library to generate HTML in Python like you would with a template, but refactor-oriented with a Pythonic React-like pattern based on nested components.Component baseThe base component class is Node:fromphtmlimportNodeform_layout=Node('form',# node.tag{# node.attrs'class':'foo',# node.attrs['class']'method':'POST',# node.attrs['method']},[# node.children'{{ form.as_p() }}',# node.children[0]Node('input',{'type':'submit'},selfclose=True),],)Casting form_layout to string will return the following:<form class="foo" method="POST">{{form.as_p()}}<input type="submit" />
</form>RenderingWhile callingphtml.jinja.render(form_layout,form=YourForm())will
return the phtml output processed with form in the context and produce the
final result.The whole purpose is refactoring HTML generating logic into Python components:fromphtmlimportForm,Submitform_layout=Form({'class':'foo'},['{{ form.as_p() }}',Submit())],)Importing on the flyfromphtmlimportNodeform_layout=Node.factory('phtml.Form',{'class':'foo'},['{{ form.as_p() }}',Node('phtml.Submit')],)Jinja and Materialize for the poorSuppose you want to make a nice layout for the login form, please don’t repeat
boring and verbose code like this because somewhere in the world a cat would
probably die because of a side effect in an alternate reality or something:fromphtmlimportForm,Divyour_layout=Form(Div({'class':'row'},[Div({'class':'col m6 s12'},['{{ form["username"] }}']),Div({'class':'col m6 s12'},['{{ form["password"] }}']),]),)Refactored components for the richInstead make a beautiful layout with reusable components:fromphtml.django.mdcimportForm,Row,Col,InputclassYourLoginForm(forms.LoginForm):_phtml=Form(Row(Col(m=6,s=12,Input('username')),Col(m=6,s=12,Input('password')),))NoteFor the documentation of the constructor of each component, please
fill in their docstrings under their signature in Python code, UTSL !Silly and Stupid context based renderingYou could render as such in jinja (or in Python without the curly braces):{{ form._phtml.jinja(form) }}, since all rendering logic should already be
in phtml.Thank youThanks a lot for reading. Hope this will serve as a useful example for anybody
on a mission to “refactor HTML in Python”.
Package: pht-station
PHT Station BackendThis project contains the implementation of the station API, workers for training models, as well as the configuration
for the station airflow instance and related workers. A FastAPI REST API als well as a command line tool for train and
station management can be found in thestationdirectory.Setup development environmentCheckout the repository and navigate to project directory.gitclonehttps://github.com/PHT-Medic/station-backend.gitcdstation-backendPrerequisitesMake sure the following ports required for the services are open or change the port mappings in thedocker-compose.ymlfile.Postgres:5432Redis:6379Minio:9000&9001(Console)Airflow:8080Blaze FHIR server:9090API:8000Start servicesStart the services for development using docker-compose.dockercomposeup-dCheck the logs of the services to see if everything is running as expected.dockercomposelogs-fConfigure station config for running the API in development modeCopy thestation_config.yml.tmplfile in the root directory tostation_config.ymland adjust the values (especially
configuring addresses and credentials for the central api)# Configure authentication for central servicescentral:api_url:""# Robot credentials for accessing central services, these can be obtained in the central UIrobot_id:"central-robot-id"robot_secret:"central-robot-secret"private_key:"/path/to/private_key.pem"# optional password for private keyprivate_key_passphrase:"admin"######### some lines omitted ########## Configures the address and credentials for the central container registryregistry:address:password:user:project:Install python dependenciesInstall dependencies usingpoetry. This will also create a virtual environment for the
project.poetryinstall--withdevRun the station APITo run the station API with hot reloading, run the following command:poetryrunpythonstation/app/run_station.py
Package: phub
PHUB - An API wrapper for PornHub.PHUB is a hybrid API for Pornhub. It is able to communicate with Pornhub
using both web-scraping and Pornhub's HubTraffic API. It is
able to access most used or useful PH features, such as video searching,
accessing account features, video downloading, and a lot more.Learn more on the projectdocumentationandGitHub page.Installationpipinstall--upgradephubQuickstartimportphubclient=phub.Client()video=client.get(url='...')video.download('my-video.mp4',quality='best')
Package: phulpy
The task manager for pythonWhyPort of GulpJS for PythonDocumentationUsageInstall:$pipinstallphulpyCreate yourphulpyfile.py(the configuration file, that describes all your tasks):fromphulpyimporttask,Output@taskdefdefault(phulpy):defprint_file(file):Output.out(Output.colorize(file.relative_path,'green'))defprint_src_class(src):Output.out(src.__class__.__name__)defif_phulpy_file(file):return'phulpyfile.py'infile.namephulpy.src(['./*'],read=True)\.pipe(phulpy.iterate(print_file))\.pipe(print_src_class)\.pipe(phulpy.filter(if_phulpy_file))\.pipe(phulpy.iterate(print_file))\.pipe(phulpy.dest('./var'))@taskdefclean(phulpy):phulpy.src(['./var/*'])\.pipe(phulpy.clean())@taskdefexec_1(phulpy):def__on_stdout__(tick,stdin):# Output.out(tick)if'[yes]?'intick:stdin.write('yes\n')def__on_stderr__(tick,stdin):# Output.err(tick)passdef__on_finish__(sigint,stdout,stderr):passcommand=phulpy.execute('ls -lah',quite=False,# write on stdout and stdin, default True, needs to be handledsync=False,# default Trueon_stdout=__on_stdout__,# handle stdouton_stderr=__on_stderr__,# handle stderron_finish=__on_finish__# handle sigint)command.kill()# force stop command@taskdefexec_2(phulpy):# when its is sync return a command with stdout, stderr, and sigintcommand=phulpy.execute('ls -lah')sigint=command.sigintstdout=command.stdoutstderr=command.stderr@taskdefdo_nothing():passRun:Run the phulpy over thephulpyfile.pydirectory$phulpy--help$phulpy# Will run the `default` task$phulpymytask# Will run the `mytask` task$phulpy--threads4mytask1mytask2# Will run the tasks simultaneouslyBy:@jefersondaniel <https://github.com/jefersondaniel>@reisraff <https://github.com/reisraff>
Package: phun
Phun: Physics Aware FunctionsWriting physics functions is non-trivial.
Although each physical quantity can be expressed in different units,
in computation physics, it is common to require the inputs of a
physics function in a pre-determined unit system.
This makes reusing these physics functions in different fields
challenging.Astropyprovides a powerfulunitssub-module to partially solve
this problem.
However, it introduces a specialQuantityclass, which makes it
incompatible with other high performance packages such asJAX.Phunsolves this problem by enablingbothwriting physics
functions withastropy.unitsand currying these functions into
pure functions that canjax.jit.Phunprovides a standard pattern to implement these functions, as
well as python decorator to transform these physics functions.Phunmakes writingJAXcompatible physics aware functions easier.
Package: phuzzy
PHUZZYpython representation of fuzzy numbers|dataspecify uncertainty easilyUsageTo use phuzzy in a project:# create a fuzzy numberp=phuzzy.Triangle(alpha0=[1,4],alpha1=[2],number_of_alpha_levels=5)# show alpha levelsp.dfalpha     l    r
0   0.00  1.00  4.0
1   0.25  1.25  3.5
2   0.50  1.50  3.0
3   0.75  1.75  2.5
4   1.00  2.00  2.0Available shapesUniformimportphuzzy.mplasphmuni=phm.Uniform(alpha0=[1,4],number_of_alpha_levels=5,name="x")uni.plot(show=True,filepath="uniform.png",title=True)Triangleimportphuzzy.mplasphmtri=phm.Triangle(alpha0=[1,4],alpha1=[2],number_of_alpha_levels=5)tri.plot(show=False,filepath="triangle.png",title=True)Trapezoidimportphuzzy.mplasphmtrap=phm.Trapezoid(alpha0=[1,5],alpha1=[2,3],number_of_alpha_levels=5)trap.plot(show=False,filepath="trapezoid.png",title=True)TruncNormimportphuzzy.mplasphmtn=phm.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="x")tn.plot(show=False,filepath="truncnorm.png",title=True)TruncGenNormimportphuzzy.mplasphmtgn=phm.TruncGenNorm(alpha0=[1,4],alpha1=[2,3],number_of_alpha_levels=15,beta=3.)tgn.plot(show=False,filepath="truncgennorm.png",title=True)Superellipseimportphuzzy.mplasphmse=phm.Superellipse(alpha0=[-1,2.],alpha1=None,m=1.0,n=.5,number_of_alpha_levels=17)se.plot(show=True,filepath="superellipse.png",title=True)Basic operationsAdditionx=phuzzy.Trapezoid(alpha0=[0,4],alpha1=[2,3],number_of_alpha_levels=5)y=phuzzy.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="y")z=x+yz.name="x+y"Substractionx=phuzzy.Trapezoid(alpha0=[0,4],alpha1=[2,3],number_of_alpha_levels=5)y=phuzzy.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="y")z=x-yz.name="x-y"Multiplicationx=phuzzy.Trapezoid(alpha0=[0,4],alpha1=[2,3],number_of_alpha_levels=5)y=phuzzy.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="y")z=x*yz.name="x*y"Divisionx=phuzzy.Trapezoid(alpha0=[0,4],alpha1=[2,3],number_of_alpha_levels=5)y=phuzzy.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="y")z=x/yz.name="x/y"Exponentiationx=phuzzy.Trapezoid(alpha0=[0,4],alpha1=[2,3],number_of_alpha_levels=5)y=phuzzy.TruncNorm(alpha0=[1,3],number_of_alpha_levels=15,name="y")z=x**yz.name="x^y"
Package: phx-data-providers
Data ProvidersGeneric implementation of the flywheel pattern.Data Providers is a great fit for situations where you need to bulk-fetch a lot
of data (e.g., from a database, API query, output from a computationally-
expensive operation, etc.) and then iterate over the results later on.RequirementsData Providers is known to be compatible with the following Python versions:3.113.103.9NoteI’m only one person, so to keep from getting overwhelmed, I’m only committing
to supporting the 3 most recent versions of Python.  Data Providers may work
in versions not listed here — there just won’t be any test coverage to prove
it 😇InstallationInstall the latest stable version via pip:pip install phx-data-providersImportantMake sure to installphx-data-providers,notdata-providers.  I
created the latter at a previous job years ago, and after I left they never
touched that project again and stopped responding to my emails — so in the
end I had to fork it 🤷Running Unit TestsInstall the package with thetest-runnerextra to set up the necessary
dependencies, and then you can run the tests with thetoxcommand:pip install -e .[test-runner]
tox -pTo run tests in the current virtualenv:python -m unittestDocumentationDocumentation is available onReadTheDocs.If you are installing from source (see above), you can also build the
documentation locally:Install extra dependencies (you only have to do this once):pip install '.[docs-builder]'Switch to thedocsdirectory:cd docsBuild the documentation:make htmlReleasesSteps to build releases are based onPackaging Python Projects TutorialImportantMake sure to build releases off of themainbranch, and check that all
changes fromdevelophave been merged before creating the release!1. Build the ProjectInstall extra dependencies (you only have to do this once):pip install -e '.[build-system]'Delete artefacts from previous builds, if applicable:rm dist/*Run the build:python -m buildThe build artefacts will be located in thedistdirectory at the top
level of the project.2. Upload to PyPICreate a PyPI API token(you only have to do this once).Increment the version number inpyproject.toml.Check that the build artefacts are valid, and fix any errors that it finds:python -m twine check dist/*Upload build artefacts to PyPI:python -m twine upload dist/*3. Create GitHub ReleaseCreate a tag and push to GitHub:git tag <version>
git push<version>must match the updated version number inpyproject.toml.Go to theReleases page for the repo.ClickDraft a new release.Select the tag that you created in step 1.Specify the title of the release (e.g.,Data Providers v1.2.3).Write a description for the release.  Make sure to include:
- Credit for code contributed by community members.
- Significant functionality that was added/changed/removed.
- Any backwards-incompatible changes and/or migration instructions.
- SHA256 hashes of the build artefacts.GPG-sign the description for the release (ASCII-armoured).Attach the build artefacts to the release.ClickPublish release.
Package: phx-events
PHX EventsPHX Events is an AsyncIO library to set up a websocket connection withPhoenix Channelsin Python 3.9+.Check out thephx_eventdocumentationInstalling PHX EventsFrom Pippipinstallphx-eventsFrom SourceClone the Git repo and then install the dependenciespipinstall-rrequirements/core.txtUse the client in your code:importasynciofromconcurrent.futuresimportThreadPoolExecutorfromphx_events.clientimportPHXChannelsClientfromphx_events.phx_messagesimportChannelMessage,Event,Topicdefprint_handler(message:ChannelMessage,client:PHXChannelsClient)->None:client.logger.info(f'DEFAULT:{message=}')asyncdefasync_print_handler(message:ChannelMessage,client:PHXChannelsClient)->None:client.logger.info(f'ASYNC:{message=}')asyncdefmain()->None:token='auth_token'client:PHXChannelsClientwithThreadPoolExecutor()aspool:asyncwithPHXChannelsClient(token)asclient:client.register_event_handler(event=Event('event_name'),handlers=[print_handler,async_print_handler,],)client.register_topic_subscription(Topic('topic:subtopic'))awaitclient.start_processing(pool)if__name__=='__main__':asyncio.run(main(),debug=True)DevelopingThis project usespip-toolsto manage dependencies.Before contributing ensure you agree to theDCO.
Commits contributed to this project need to be signed ingit.This can be done as follows (Note-sis a shortcut for--signoff) :gitcommit--signoff1. Create a virtualenvNote: Creating the virtualenv can be done however you want. We will assume you've done created a new
virtualenv and activated it from this point.2. Installpip-tools:pipinstallpip-tools3. Install Dependenciespip-syncrequirements/core.txtrequirements/dev.txt