Saravanan666/pypi-org huggingface dataset:
Package: phenotrex
End-to-end Microbial Phenotypic Trait Prediction.Installation$ pip install phenotrex[fasta]UsagePhenotrex is a component of thePhenDBweb server, which performs phenotypic trait prediction on
user-uploaded metagenomic bins. To try out phenotrex with PhenDB’s pre-trained and curated set of
trait models, genomes may thus simply besubmitted to PhenDB.Basic UsageTo use a trained phenotrex modelMY_TRAIT.pklfor prediction of a phenotypic trait with a
given genomegenome.fna:$ phenotrex predict --classifier MY_TRAIT.pkl genome.fna > predictions.tsvThis yields a tabular file containing a prediction regarding the presence of the trait (YES or NO),
as well as a confidence value the model ascribes to this prediction, ranging from 0.5 to 1.0.Advanced UsageFor training, evaluation and explanation of phenotrex models on user data, please refer to the
full usage tutorialhere.History
Package: phenotype2phenopacket
Phenotype2PhenopacketPhenotype2Phenopacketis a command-line interface (CLI) application for the construction of phenopackets
from a phenotype annotation file.InstallationPhenotype2Phenopacket can be installed from PyPi.pipinstallphenotype2phenopacketUsagesTo convert all OMIM diseases in a phenotype annotation file to disease phenopackets, where all phenotypes are retained:p2pconvert--phenotype-annotation/path/to/phenotype.hpoa--output-dir/path/to/output-dirTo create synthetic patient disease phenopackets, where the dataset is more variable and frequencies are taken
into account and constrained noise is applied :p2pcreate--phenotype-annotation/path/to/phenotype.hpoa--output-dir/path/to/output-dirYou can also limit the number of disease phenopackets converted/created:p2pconvert--phenotype-annotation/path/to/phenotype.hpoa--output-dir/path/to/output-dir--num-diseases100To add known gene-to-phenotype relationships to phenopackets:p2padd-genes--phenopacket-dir/path/to/synthetic-phenopackets--disease-pg/path/to/disease.pg--hgnc-data/path/to/hgnc_complete_set.txt--output-dir/path/to/output-dirNOTE:To add known gene-to-phenotype the Exomiser disease.pg file is expected
Package: pheno-utils
pheno-utilspheno-utils is a dynamic Python package developed by Pheno.AI, for
handling our medical datasets. It simplifies data loading, enables
effective merging, and offers intuitive visualization tools.Installpipinstallpheno_utilsHow to useExamples:data=generate_synthetic_data(n=1000)hist_ecdf_plots(data=data,col="val1")age_refplots=GenderAgeRefPlot(data,"val1")age_refplots.plot()Setting Up pheno-utilsTo usepheno-utils, you must have aconfig.jsonfile. This file
should be set up according to your filesystem and placed in the~/.pheno/directory.If You’re Working on TREFor those working in the Trusted Research Environment (TRE), you don’t
need to worry about theconfig.jsonfile. It will be automatically
generated for you!If You’re Working with Phenos’ S3 BucketIf you’re working with Phenos’ S3 bucket, you’ll need to manually create
theconfig.jsonfile. You can do this by running the following Python
script:pythonconfig_setup/create_default_config.py-ds3://datasets_bucket_nameIf you are working on local file systemIf you are working on local file system, you’ll need to manually create
theconfig.jsonfile and locating it under~/.pheno/directory.
Please use the config_setup/example_config.json as a template for your
config.json file.
Package: pheval
PhEval - Phenotypic Inference Evaluation FrameworkThere is currently no empirical framework to evaluate the performance of phenotype matching and prioritization tools, much needed to guide tuning for cross species inference. Many algorithms are evaluated using simulations, which may fail to capture real-world scenarios. This gap presents a number of problems: it is difficult to optimize algorithms if we do not know which choices lead to better results; performance may be sensitive to factors that are subject to change, such as ontology structure or annotation completeness. We will develop a modular Phenotypic Inference Evaluation Framework, PhEval and use it to optimize our own algorithms, as well as deliver it as a community resource.
Package: phevaluator
PH Evaluator Python package (phevaluator)DescriptionPH Evaluatoris designed
for evaluating poker hands with more than 5 cards. Instead of traversing all
the combinations, it uses a perfect hash algorithm to get the hand strength
from a pre-computed hash table, which only costs very few CPU cycles and
considerably small memory (~100kb for the 7 card evaluation). With slight
modification, the same algorithm can be also applied to evaluating Omaha
poker hands.InstallationThe library requires Python 3.from release on PyPIpipinstallphevaluatorfrom source codepipinstall.Using the libraryThe main function is theevaluate_cardsfunction.fromphevaluatorimportevaluate_cardsp1=evaluate_cards("9c","4c","4s","9d","4h","Qc","6c")p2=evaluate_cards("9c","4c","4s","9d","4h","2c","9h")# Player 2 has a stronger handprint(f"The rank of the hand in player 1 is{p1}")# 292print(f"The rank of the hand in player 2 is{p2}")# 236The function can take both numbers and card strings (with a format like: 'Ah' or '2C'). Usage examples can be seen inexamples.py.TestThe pre-calculated tables (phevaluator.tables) are tested by comparing them with the tables generated by test codes.The functionality of the evaluators is tested by comparing with the JSON files generated by the original C++ evaluator.The functionality of the other modules is tested by its purposes.python3-munittestdiscover-vDevelopmentinstall from source code witheditable modepipinstall-e.The installed package reflects changes to files inside thephevaluatorfolder automatically.recommended to format withblackbefore commitcheck where to correct (without formatting)black.--diff--colorformat allblack.
Package: phfetch
PH FetchA light python interface for fetching and downloading videos from Pornhub.UsageInitialisation:importphfetch# Initialise with a video urlvideo=phfetch.video(url='https://...')# Or a viewkey tokenvideo=phfetch.video(key='xxxxxxxxxx')Available video infos:>>>video.title# The Pornhub title of the video>>>video.available# Whether the video is available to view (because deleted or not disponible in country)>>>video.duration# The video duration (in seconds)>>>video.hotspots# The list of hotspots of the videoTo download a video:# Using an absolute or relative file pathvideo.download(path='my-video.mp4')# Using a directory path (the file name will be the video title)video.download(path='my-dir/')# Using a specific qualityvideo.download(path='./',quality='best')# Possible quality values:# best, middle, worst or an int# Can also be a constant from pyhub.Quality, e.g:video.download(path='./',quality=pyhub.Quality.BEST)An example UI implementation can be found in theui.pyfile:InstallationMinimum python version:3.11Dependencies:requestsInstall using pip:pipinstallgit+https://github.com/Egsagon/pornhub-fetch.git
Package: phg
InstallationBy using pip:pip install phgExampleGenerate a random password, default to 16 characters:$ phg
xz2jlVQoSLT8+V_+Generate 20 random characters password:$ phg -l 20
L`>jDtSHc+b5)Ef07.^sGenerate random password which may contain single quotes or double quotes:$ phg -q
D5!&xG73\&n\&"BCGenerate multiple passwords for multiple users:$ phg hvn htl daivq tuda namnh thanhnt
hvn: DyZ9CCzaK!B5m-ms
htl: R;#SF(6dkr>)0pNI
daivq: !Bk6}tX.qlO/:?{2
tuda: z7.(}qZ:9[IMv,op
namnh: z(Dj5BRv/al>}O=j
thanhnt: w8,oG-e!uRV$CiE6Generate password and hash it with an external command (uses password
as STDIN):$ phg hvn -c 'shasum -a 512256' -i  # -i for stdin
hvn: 7Qm?i250R\06>&^*
ca6a3fa6a2e8bf2929f085c9bb043cf7aaec50e7cd532193634972869c9e0988  -This is corresponding to generate password then pass it to command specified
in-cthrough pipeline.
Notice: shasum is command on OSX.Generate password and hash it with an external command, password used as
command argument,
this mainly targets command that does not support reading from STDIN:$ phg hvn -c '/tmp/addprefix'
hvn: 93k/0E{cZVc6jWz/
PREFIX93k/0E{cZVc6jWz/Generate passwords for many users, construct a message that you can sent
over Markdown powered chat app such as Slack, Mattermost:$ phg -m -s https://grafana.pymi.vn hvn nvh pikachu pukachi
Address https://grafana.pymi.vn User: hvn Passwd: ``$8pZTMWX~NU5Z-2e``
Address https://grafana.pymi.vn User: nvh Passwd: ``S%]JWO-_bS]:w7QI``
Address https://grafana.pymi.vn User: pikachu Passwd: ``7^_c+e<|_%`RLMf2``
Address https://grafana.pymi.vn User: pukachi Passwd: ``E@EC5XcQPoN$+>57``AuthorsViet Hung Nguyen <hvn@familug.org>
Package: phgeograpy
phgeograpy (PH Geography)===phgeograpy is a python package that lists regions, provinces, and cities/municipalities in the Philippines.Take a break from machine learning and chatbots. I created this project to explore and experience building a python package. This is my first python package. Yey! I'll also use this project to expore unit testing.I'm working on a web app that needs location input broken down into regions, provinces, and cities/municipalities so I created this package to make it reusable and open source. Technically it's just a list, you can use it to create dropdown inputs or model choices in Django.# RegionsRegions are represented by `phgeograpy.Region` class.Sample usage:```pythonimport phgeograpy# Get all regions in the philippinesregions = phgeograpy.regions()# Get the details of the first regionprint(regions[0].slug)  # A unique id of the regionprint(regions[0].name)  # Name of the regionprint(regions[0].description)  # A longer/alternative name of the region# Get a specific region.# If no region is found, an Exception will be raised.region = phgeograpy.regions('ncr')  # `ncr` is the slug of NCR.```# ProvincesProvinces are represented by `phgeograpy.Province` class.Sample usage:```pythonimport phgeograpy# Get all provinces in the philippinesprovinces = phgeograpy.provinces()# Get the details of the first provinceprint(provinces[0].slug)  # A unique id of the provinceprint(provinces[0].name)# Get the region where the province is locatedregion = provinces[0].region# Get provinces of a specific regionregion1_provinces = phgeograpy.provinces(region_slug='region1')# You can also get the provinces from the `phgeograpy.Region` class instanceregion1 = phgeograpy.regions('region1')region1_provinces = region1.provinces()```# MunicipalitiesMunicipalities are represented by `phgeograpy.Municipality` class. Cities are also included.Sample Usage:```pythonimport phgeograpy# Get all municipalities in the philippinesmunicipalities = phgeograpy.municipalities()# Get the details of the first municipalityprint(municipalities[0].slug)  # A unique id of the municipalityprint(municipalities[0].name)print(municipalities[0].is_city)  # `True` if the instance is a cityprint(municipalities[0].is_capital)  # `True` if the instance is the capital of the province it is locatedprint(municipalities[0].is_huc)  # `True` if the instance is a highly-urbanized/independent city# Get the province where the municipality is locatedprovince = municipalities[0].province# Get municipalities from the `phgeograpy.Province` class instancemunicipalities = province.municipalities()```# Raw dataTo get raw data, just set `raw` parameter to `True`.Sample usage:```python# Get raw regions dataraw_regions = phgeograpy.regions(raw=True)```Note that all data below the area of your query will be included in the raw output (e.g. raw regions will include data for provinces and municipalities, raw provinces will include data for municipalities).
Package: phhelper
OverviewSimplify best practice for Lambda in Python, handling Lambda events and errors with detailed and standarized logs.FeaturesDead simple to use, reduces the complexity of writing a Lambda with Python runtimeGuarantees that Source will get a response even if an exception is raisedSends meaningful errors to Cloudwatch in the case of a failureThreading enables best runtime performance for events with multiple recordsJSON logging that includes request id’s, event id’s and source to assist in tracing logs relevant to a particular eventInstallationInstall into the root folder of your lambda functioncd my-lambda-function/
pip install phhelper -t .Example Usagefromphhelperimportaws_lambda_helperimportjsonimporttime@aws_lambda_helper.handlerdeflambda_handler(event,context):context.logging.info('info_test')time.sleep(0.5)context.logging.error('error_test')time.sleep(0.5)context.logging.debug('debug_test')return{'statusCode':200,'body':json.dumps('Hello from Lambda!')}ThreadingIf the event source send multiple records to be processed, you can enable Multithreading processing, by creating a
Environment variable calledTHREADING_ENABLEDwith valueTRUE. This will make a loop into event records, starting a
thread for each record. Your handler will receive each record in a separeted call, inside a thread model.LoggingYou can define the general log verbosity level using a Environment variable calledLOG_LEVELand the boto3 log level
using a Environment variable calledBOTO_LOG_LEVEL.The valid values for both Environment variables are:
* DEBUG
* INFO
* WARNING
* ERROR
* CRITICALThe default values are:LOG_LEVEL='ERROR'BOTO_LOG_LEVEL`='CRITICAL'CreditsDecorator implementation inspired byhttps://github.com/aws-cloudformation/custom-resource-helperLog implementation inspired byhttps://gitlab.com/hadrien/aws_lambda_loggingMultiprocessing implementation inspired byhttps://medium.com/@urban_institute/using-multiprocessing-to-make-python-code-faster-23ea5ef996baLicenseThis library is licensed under the MIT License.
Package: phi2_mps
phi2-mpsAn opinionated CLI to use Microsoft Phi-2 Model on your macOS!You should have at least 8GB of memory to run this SLM on Apple siliconStartInstallphi2-mpswithpip:pipinstallphi2-mpsDownload Phi-2 Model with this url:# this may take a while,cause the model size is about 5.18Gwgethttps://huggingface.co/AlexWuKing/atomgradient_models/resolve/main/weights.npzRun inference from any path on your computer:# [weights.npz] should be the download path of the model filephi2-mps--modelweights.npz--prompt"Hi how are you"--max_tokens256[!NOTE]
The CLI is highly opinionated and only works on Apple MPS.CLI OptionsThewhisper-mpsrepo provides an all round support for running Whisper in various settings. More command-line support will be provided later--model MODEL-PATH
                Local model file path where you put the weights file
  --prompt PROMPT
                The prompt will send to model to gen tokens    
  --max_tokens MAX-TOKEN
                The Total number of tokens will be replied to youWE ARE HIRINGrefer here:https://daxiang.feishu.cn/docx/LluCd7J38o9U5pxN3kdcpSh6nEh
Package: phi-accrual-failure-detector
phi-accrual-failure-detectorA python port of
theAkka's (φ) Accrual failure detector implementation.A in-depth description is availablehere.Getting startedYou can import the library into the project using:pipinstallpy-accrual-failure-detectorYou can use the package as follows:fromphi_accrual_failure_detectorimportPhiAccrualFailureDetectorfailure_detector=PhiAccrualFailureDetector(threshold=3,max_sample_size=1000,min_std_deviation_ms=10,acceptable_heartbeat_pause_ms=0,first_heartbeat_estimate_ms=1000)failure_detector.heartbeat()# sends an heartbeatfailure_detector.heartbeat()# sends an heartbeatfailure_detector.heartbeat()# sends an heartbeatnode_is_available=failure_detector.is_available()ReferencesThe ϕ Accrual Failure Detector - Naohiro Hayashibara, Xavier Défago, Rami Yared and Takuya KatayamaCassandra - A Decentralized Structured Storage SystemPhi Accrual Failure Detector - Akka documentationakka/akka source codeA logistic approximation to the cumulative normal distribution
Package: phial-slack
A simple framework for building slack botsPhial is a slack bot framework, modelled loosely onflask.Table of ContentsUsageInstallContributeLicensesUsagePython:fromphialimportPhial,command,Responsebot=Phial('---slack token here---')@bot.command('greet <name>')defgreet(name):'''Simple command with argument which replies to a message'''return"Hello{0}".format(name)bot.run()Slack:By default the bot requires a prefix of!before its commands. This
can be changed in the config.youruser:
> !greet jim
bot:
> Hello JimFeatures:Simple command definitionSend messages to slackReply to messages in a threadReply to messages with a reactionUpload FilesExamples of commands utilising these features can be found in theexamplesfolderInstall$ pip install phial-slackContributeIf a feature is missing, or you can improve the code please submit a PR
or raise an IssueLicensesphial - MIT Â© 2019 James Seden SmithErlenmeyer Flask by Iconic from the Noun Project -CC BY
3.0(used inexamples/phial.png)
Package: phiean
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial 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: phiera
PhieraPhiera is a fork ofPiera, a lightweight, pure-PythonHieraparser. Piera was originally built to provide Python tooling access to Puppet/Hiera configurations. The original Piera is currently not feature complete; lacking some less-used interpolation and loading features.Table of contentWhyInstallationUsageUnit TestsWhy?:Piera/Phiera generalizes Puppet Hiera's hierarchical storage system; making a simple, very flexible, abstracted, and DRY mechanism for managing complex configuration data available to a broad set of tooling and applicable to a broad set of problems.Phiera builds on the original Piera work, adding:Python3 compatibilitySupport for deep mergingSupport for configuration as a dictInstallation:From PyPi:pipinstallphieraFrom GitHub:pipinstallgit+https://github.com/Nike-Inc/phiera#egg=phieraManuallygitclonegit@github.com/Nike-Inc/phiera.gitcdphiera
poetryinstallUsage:importphierah=phiera.Hiera("my_hiera.yaml")# You can use phiera to simply interact with your structured Hiera data# key: 'value'asserth.get("key")=="value"# key_alias: '%{alias('key')}'asserth.get("key_alias")=="value"# key_hiera: 'OHAI %{hiera('key_alias')}'asserth.get("key_hiera")=="OHAI value"# Give phiera contextasserth.get("my_context_based_key",name='test01',environment='qa')=="context is great!"Unit Tests:poetryrunpytest--cov-report=html--cov=phiera--cov-fail-under=80tests/
Package: phiflow
PhiFlowHomepageDocumentationAPIDemosFluids TutorialPlaygroundPhiFlow is an open-source simulation toolkit built for optimization and machine learning applications.
It is written mostly in Python and can be used with NumPy, TensorFlow, Jax or PyTorch.
The close integration with machine learning frameworks allows it to leverage their automatic differentiation functionality,
making it easy to build end-to-end differentiable functions involving both learning models and physics simulations.See theinstallation Instructionson how to compile the optional custom CUDA operations.
Package: phigaro
Phigaro v2.4.0Phigaro is a standalone command-line application that is able to detect prophage regions taking raw genome and metagenome assemblies as an input. It also produces dynamic annotated “prophage genome maps” and marks possible transposon insertion spots inside prophages. It is applicable for mining prophage regions from large metagenomic datasets.Updates trackerYou can find the information about updates and releases bylink.Documentation: Installation & UsagePlease, followthe documentation linkto find installation and usage information.Methods overviewOpen-reading frames (i.e. proteins) are predicted from the input FASTA file using Prodigal. Phage genes are annotated with prokaryotic viral orthologous groups (pVOGs) profile Hidden Markov Models (HMMs), which can be downloaded stand-alone fromhttp://dmk-brain.ecn.uiowa.edu/pVOGs/. Each contig is represented as a sequence of phage and non-phage genes. A smoothing window algorithm (a triangular window function) determines regions with a high density of phage genes and therefore the prophage regions and boundaries, considering the pVOG annotations and the GC content.Known issuesPhigaro is tested on Linux systems. For MacOS, you may need to add the following softlinkln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedand runbrew install wget. If you encounter any issues while running Phigaro on test data, please report them to us atestarikova@rcpcm.org.PublicationElizaveta V. Starikova, Polina O. Tikhonova, Nikita A. Prianichnikov, Chris M. Rands, Evgeny M. Zdobnov, Vadim M. GovorunPhigaro: high throughput prophage sequence annotationBioinformatics, 2020; doi:https://doi.org/10.1093/bioinformatics/btaa250bioRxiv, 2019; doi:https://doi.org/10.1101/598243(c) E.Starikova, P. Tikhonova, N.Pryanichnikov, 2019
Package: phildb-client
The PhilDB timeseries database client aims to provide aPhilDB database APIcompatible object. At this stage mostly the read related methods have been implemented.
None of the write related methods have been implemented.
Any methods yet to be implemented in the client will raise a NotImplementedError if called.Example usagefrom phildb_client import PhilDBClient
db = PhilDBClient('http://localhost:8889')

db.ts_list()NotesThis client is experimental and depends on the experimentalPhilDB server.
By default the client reads data from the server in themsgpackformat.
The data served by the server and read by the client is using theexperimental Pandas msgpack implementation,
as such it is dependant on the version of Pandas used by the server and the client being compatible.
There is a known issue with Pandas < v0.17 (which has been made a dependency for the server),
the client however can use an older version of Pandas and use JSON as the transport format instead of msgpack if required.
For example:
.. code:from phildb_client import PhilDBClient
db = PhilDBClient('http://localhost:8889', 'json')
Package: phildb-server
PhilDB ServerPhilDB server, for HTTP access to aPhilDBinstance.DependenciesRequires Python 2.7 or Python 3.4 or greater.InstallationPhilDB server is pip installable.The latest stable version can be installed from pypi with:pip install phildb-serverThe latest development version can be installed from github with:pip install git+https://github.com/amacd31/phildb_server.git@devUsageStart a PhilDB using a specified PhilDB instance:phildb-server phildb_directoryList help options:phildb-server --help