Saravanan666/pypi-org huggingface dataset:
Package: pf9-saml-auth
pf9-saml-authpf9-saml-auth is a set of OpenStack Keystone authentication plugins for enabling
federated authentication against non-ECP compliant SAML identity providers.Supported providersMicrosoft AD FSOktaOneloginInstallationpipinstallpf9-saml-authExample CLI UsageOpenStack RCexportOS_AUTH_URL="https://<hostname>/keystone/v3"exportOS_REGION_NAME="<region>"exportOS_USERNAME="<IdP username>"exportOS_PASSWORD="<IdP password>"exportOS_TENANT_NAME="<tenant>"exportOS_PROJECT_DOMAIN_ID=${OS_PROJECT_DOMAIN_ID:-"default"}exportOS_IDENTITY_API_VERSION=3exportOS_IDENTITY_PROVIDER=${OS_IDENTITY_PROVIDER:-"IDP1"}exportOS_PROTOCOL=saml2exportOS_AUTH_TYPE=v3pf9samloktaThen execute theopenstackCLI utility in interactive mode.$openstack(openstack)serverlistExample Python programimportpf9_saml_authfromkeystoneauth1importsessionfromnovaclientimportclientasnova_clientdefmain():auth=pf9_saml_auth.V3Pf9SamlOkta(auth_url='https://<hostname>/keystone/v3',username='<IdP username>',password='<IdP password>',protocol='saml2',identity_provider='IDP1',project_name='<tenant>',project_domain_name='default',)# Create Keystone authentication sessionsess=session.Session(auth=auth)# Create OpenStack service clientsnova=nova_client.Client(2,session=sess)if__name__=='__main__':main()
Package: pfa
# PFA (Python Fast Autoformat)An autoformatter should be three things:Fast: Run quickly so that you can afford to run the autoformatter on a large code base without ever having to wait for the autoformat to complete.Consistent: Running the autoformatter a second time won’t change the output. Code will run the same before and after the autoformatter is run. Trivial whitespace changes will be reverted.Pretty: Output looks nice and preferably follows PEP8.PFA chooses to beFastandConsistent, but sacrificesPrettyoutput in favor of speed.## Installation and UsageTo create the executable filepfa, runmakeAfterwards you can copy it intoPATH, say to/usr/binor~/bin/.There are two ways to run the program. If the executable file name does not end in “i”, i.e. withpfa that_python_script.pythen the formatted file will be dumped to standard output. If you make a symlink frompfatopfaiand run the latter likepfai that_python_script.py scriptus_secundus.pythen all files listed as arguments will be formatted in place.## FAQWhy is PFA written in C?The startup time for the Python interpreter is often longer than it takes to runpfaon a 2000 line file.How fast is it?The other popular Python formatters areyapfandautopep8. Formatting about 120KB of python code in place for the second time in a row with the following commands,yapf -i bx.py
autopep8 -i bx.py
pfai bx.pyone finds thatyapftakes 14.0 seconds;autopep8takes 1.8 seconds; andpfaicompletes in 0.020 seconds, less than the time it takes to press Enter.I have a change to contribute. Will it be accepted?: Yes, as long aspfastill runs in O(n) for even pathological input.
Package: pfam2go
pfam2goThe pfam2go package provides a short and simple interface to match the Pfam accesion numbres to Gene Ontology annotation data.The Pfam - Go term mapping was taken from:http://current.geneontology.org/ontology/external2go/pfam2goMitchell et al. (2015) Nucl. Acids Res. 43 :D213-D221The Go term information is taken from QuickGO:https://www.ebi.ac.uk/QuickGO/Installationpfam2go can be installed via pip:pip install pfam2goUsagepfam2go(pfam_seqs: Union[Iterable[str], str]) -> pd.DataFrameInput:pfam_seqs: string or an Iterable object containing strings (e.g., list or pd.Series).Returns:pd.Dataframe containing GO terms for all corresponding Pfam numbers. Dataframe contains 5 string fields:Pfam accession numberGO accession numberGO nameGO definitionGO functional aspectOne Pfam number can correspond to several GO terms.In case the information about a specific GO term has not been found in QuickGO the last 3 columns will be assigned to NaN.Examplefrom pfam2go import pfam2go  
pfam_list = ['PF00032', 'PF00049', 'PF08463']  
data = pfam2go(pfam_list)
Package: pfapack
pfapack: Efficient numerical computation of the Pfaffian for dense and banded skew-symmetric matricesCode and algorithms are taken fromarXiv:1102.3440which is authored byMichael Wimmer.InstallRecommended way (because it includes faster C/FORTRAN bindings)condainstallpfapackAlternatively usepipinstallpfapackUsagefrompfapackimportpfaffianaspfimportnumpy.matlibA=numpy.matlib.rand(100,100)A=A-A.Tpfa1=pf.pfaffian(A)pfa2=pf.pfaffian(A,method="H")pfa3=pf.pfaffian_schur(A)print(pfa1,pfa2,pfa3)If installed withconda, C/FORTRAN code is included with Python bindings, use it like:frompfapack.ctypesimportpfaffianascpfpfa1=cpf(A)pfa2=cpf(A,method="H")print(pfa1,pfa2)CitingIf you have usedpfapackin your research, please cite it using the followingbibentry:@article{wimmer2012algorithm,
  title={Efficient numerical computation of the pfaffian for dense and banded skew-symmetric matrices},
  author={Michael Wimmer},
  journal={ACM Transactions on Mathematical Software (TOMS)},
  volume={38},
  number={4},
  pages={1--17},
  year={2012},
  publisher={ACM New York, NY, USA}
}LicenseMIT LicenseContributionsBas NijholtMichael Wimmer (author of the algorithms)
Package: pfatools
PFAToolsPFATools is a collection of tools used for teaching python through API requests and data exploration. It is written in Python and is available under the MIT license.You need Python 3.8 or higher to run PFATools.ContentsPFAToolsContentsInstallationAPI ToolsName PredictionsRandom PersonInstallationUse pip to pull from the PyPi repository:pipinstallpfatoolsAPI ToolsName PredictionsCan predict various things through a single name. Returns the raw JSON response from the API.frompfatoolsimport*name="John"age_response=age_predictor(name)gender_response=gender_predictor(name)nationality_response=nationality_predictor(name)The only argument for these functions arenameRandom PersonReturns random person data. Returns the raw JSON response from the API.frompfatoolsimport*person=randomPerson()data=person.dataArguments:ArgumentTypeDescriptionamountintamount of people to generate. default: 1 (>= 1)deferboolwhether to defer the request or not. default: Falsemethodrun_queryruns the query and returns the raw JSON response from the API.frompfatoolsimport*person=randomPerson(defer=True)data=person.run_query()
Package: pfbackup
pfBackupSummarySimple utility for backing up pfSense configuration which uses web admin interface.InstallationCreate backup user accountIt is recommended to create a dedicated user account with limited permissions for backup purposes. This user should have "WebCfg - Diagnostics: Backup & Restore" permission. Please checkpfSense documentationif you are not sure how to do this.Installation form PyPI:pip3 install pfbackupDockerYou can download the image from Docker Hub:docker pull mharjac/pfbackupOr build it on your own:docker build -t pfbackup https://github.com/mharjac/pfbackup.git#:dockerCreate a volume for storing backups:docker volume create pfbackup-firewall-1Create a container:docker run -d --name=pfbackup-firewall-1 -e PF_URL="https://192.168.1.1" -e PF_USER="backusr" -e PF_PASS="somesuperstrongpassword" -e PF_CERT_VERIFY="true" --mount=src=pfbackup-firewall-1,dst=/backup pfbackup:latestAnd finally, for unattended regular backups, create a cron job which will execute:docker start pfbackup-firewall-1Install from Snap Storesnap install pfbackupUsageIt can be used as an interactive tool from CLI:pfbackup -U https://192.168.1.1 -u user1 -p passw0rd -f ./backup.xmlWhen used in CLI, it will prompt for password if -p (--password) flag is not provided. Also, without -f (--file) flag, config will be printed to the stdout.It can also be used for unattended backups (e.g., in containers), in which case, it requires following environment variables:PF_URL: for storing web admin URL (e.g.,https://192.168.1.1/)PF_USER: username for making backupsPF_PASS: password for provided usernamePF_CERT_VERIFY: set to False if self-signed certificate in useexport PF_URL="https://192.168.1.1" PF_USER="user1" PF_PASS="passw0rd" PF_CERT_VERIFY="True"
pfbackupWhen executed in unattended mode, configuration backup will be saved in execution directory asconfig-{time_stamp}.xml.
Package: pfb-clean
pfb-cleanPreconditioned forward-backward clean algorithm.Install the package by cloning and running:code:$ pip install -e pfb-clean/Note casacore needs to be installed on the system for this to work.You may also need to update pip eg.:code:$ pip install -U pip setuptools wheelIt is strongly recommended to install ducc in no binary mode eg:code:$ git clone https://gitlab.mpcdf.mpg.de/mtr/ducc.git:code:$ pip install -e duccIf you find any of this useful please cite (for now)https://arxiv.org/abs/2101.08072
Package: pfc-geometry
geometryTools for handling 3D geometry, mostly just adds a nice interface to various geometric enterties. Each geometric entity can also be a vector of geometric entities. Each entity wraps a numpy array with the relevant number of columns labelled according to the cols class property and rows equal to the number of elements in the vector. Attribute access to each column is available and returns a numpy array.Where operations are supported between geometric types the size of the output is inferred based on the length of the inputs. Where the two vectors of entities are of the same length, elementwise operations are performed. Where one vector is length one and the other is greater than one then the operation will be performed on every element of the longer vector.Magic methods are used extensively and the function of operators are logical for each type. If unsure what the logical option is then check the code where it should be pretty clear.Many convenience methods and constructors are available. Documentation is limited but if you need something it has probably already been written so check the code first.now available on pypi:pip install pfc-geometry
Package: pfcm
pfcmanother python wraper for firebase cloud messageFree software: MIT licenseDocumentation:https://pfcm.readthedocs.io.message ref:https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messagesauth ref:https://firebase.google.com/docs/cloud-messaging/auth-servertestyou should put config.yml in top dir likedefault:
    one_token: one_token
    project_name: you project namethe private key file should be in top dir with filenameservice_token.jsonHistory0.0.1 (2017-10-20)First release on PyPI.
Package: pfcon
Table of ContentsOverviewpfconInstallationPython Virtual EnvironmentUsing thefnndsc/pfcondockUsagepfconusageEXAMPLESOverviewThis repository providespfcon– a controlling service that speaks to remotepmanandpfiohservices.pfconMost simply,pfconpushes local data to a remote location (by talking to a remotepfiohservice), runs some process on this data in the remote space usingpman, and then copies the resultant data back to a local target space.It can be used to query and control the following (for example):state: Is job <XYZ> still running?result: What is the stdout (or stderr) from job <XYZ>?control: Kill job <XYZ>InstallationInstallation is relatively straightforward, and we recommend using either python virtual environments or docker.Python Virtual EnvironmentOn Ubuntu, install the Python virtual environment creatorsudoaptinstallvirtualenvThen, create a directory for your virtual environments e.g.:mkdir~/python-envsYou might want to add to your .bashrc file these two lines:exportWORKON_HOME=~/python-envssource/usr/local/bin/virtualenvwrapper.shThen you can source your .bashrc and create a new Python3 virtual environment:source.bashrcmkvirtualenv--python=python3python_envTo activate or “enter” the virtual env:workonpython_envTo deactivate virtual env:deactivateUsing thefnndsc/pfcondockThe easiest option however, is to just use thefnndsc/pfcondock.dockerpullfnndsc/pfconand then rundockerrun--namepfcon-v/home:/Users--rm-tifnndsc/pfcon--forever--httpResponseUsageFor usage ofpfcon, consult the relevant wiki pages.pfconusageForpfcondetailed information, see thepfcon wiki page.[--ip<IP>]

The IP interface on which to listen. Default %s.

[--port<port>]
The port on which to listen. Defaults to '5055'.

[--man<manpage>]
Internal man page with more detail on specific calls.

[--forever]
Start service and do not terminate.

[--httpResponse]
Send return strings as HTTP formatted replies with content-type html.

[--cordBlockSeconds<blockSeconds>]
The number of seconds to block/wait internally in the coordination loop.
This is the time between ``pfioh`` has indicated successful unpack of file
data and the call to ``pman`` to start processing.

[--configFileLoad<file>]
Load configuration information from the JSON formatted<file>.

[--configFileSave<file>]
Save configuration information to the JSON formatted<file>.

[-x|--desc]
Provide an overview help page.

[-y|--synopsis]
Provide a synopsis help summary.

[--version]
Print internal version number and exit.

[--debugToDir<dir>]
A directory to contain various debugging output -- these are typically
JSON object strings capturing internal state. If empty string (default)
then no debugging outputs are captured/generated. If specified, then
``pfcon`` will check for dir existence and attempt to create if
needed.

[-v|--verbosity<level>]
Set the verbosity level. "0" typically means no/minimal output. Allows for
more fine tuned output control as opposed to '--quiet' that effectively
silences everything.EXAMPLESStartpfconin forever mode:pfcon\\--forever\\--port5005\\--httpResponse\\--verbosity1\\--debugToDir/tmp\\--ip127.0.0.1
Package: pfc-util
PFC simulation in pythoncreated by michael in 2022/04pfc_util is a python package for PFC (phase field crystal) simulations.DocumentationDocumentation is available onhttps://pfc-util.readthedocs.io.DependenciesnumpyscipymatplotlibpyfftwtorusgridrichInstallationInstall via pip:pipinstallpfc-utilModulespfc_util.core- Core module; definitions of PFC free energy functional, state functions, as well as minimizerspfc_util.extra- Extensions to vanilla PFC. Currently includespfc6, which is a 6th-order generalization to the PFC functionalpfc_util.toolkit- Static preminimized solid/liquid profiles & utility functions.MinimizersThe package provides three main means of minimizing/evolving a PFC system:Constant chemical potential- The grand potential\(\Omega \equiv F - \mu \int d\mathbf{r} \psi\)is minimized with fixed\(\mu\)Stress relaxer- The grand potentialdensity\(\omega \equiv \Omega / V\)is minimized with respect to the density field and system size with fixed\(\mu\)Conserved dynamics- The free energy\(F\)is minimized with fixed\(\bar\psi\)Example Code SnippetThe following code snippet will retrieve a preminimized solid unit cell, evolve
it under\(\epsilon=0.05\)and\(\mu=0.08\)until\(\bar\psi\)barely changes, and save the newly minimized
unit cell tosolid_eps0.05_mu0.08.fieldimportpfc_utilaspfcimporttorusgridastg'''Get a preminimized solid profile at epsilon = 0.1'''solid=pfc.toolkit.get_unit_cell(eps='0.1')'''Minimize this profile at epsilon = 0.05 and mu = 0.08'''pfc.ConstantMuMinimizer(solid,dt=0.001,eps=0.05,mu=0.08).run(n_steps=31,# n_steps means the number of evolution steps between hook calls# hooks are invoked to update display, monitor values, etchooks=(tg.dynamics.Display()# add display capability+tg.dynamics.Panel()# add a panel to live display+tg.dynamics.MonitorValues({'psibar':lambdae:e.field.psi.mean()},period=8)# tell the minimizer that psi.mean() should be monitored and stored as "psibar"# here e refers to the minimizer instance# period = 8 means that the values are logged every 8 hook calls# so in this case we would be calculating the values every 31*8 = 248 time steps+tg.dynamics.Text('psibar={psibar:.8f}')+tg.dynamics.DetectSlow('psibar',rtol=1e-9,atol=0,period=8,patience=200)# make the minimizer stop if psibar varies sufficiently slowly))tg.save(solid,'./solid_eps0.05_mu0.08.field')# save the minimized field
Package: pfdicomtag
Quick OverviewExtract DICOM tags.Overviewpfdicomtag is a dir-based DICOM file tag extractor. By ‘dir-based’ is understood that input DICOMs exist in a nested directory tree, and results of the tag extraction are written an output tree. This tree mimics the structure of the input data tree.DependenciesMake sure that the following dependencies are installed on your host
system/python3 virtual env:pydicom (to read DICOM files)matplotlib (to save data in various image formats)pillow (to save data in jpg format)InstallationThe best method of installing this script and all of its dependencies is
by fetching it from PyPIpip3installpydicomtagYou migh get an error aboutpython3-tknot installed. So you should install that package.
For example on Ubuntu:sudoapt-getupdatesudoapt-getinstall-ypython3-tkCommand line arguments::-I|–inputDir <inputDir>
Input DICOM directory to examine. By default, the first file in this
directory is examined for its tag information. There is an implicit
assumption that each <inputDir> contains a single DICOM series.-i|–inputFile <inputFile>
An optional <inputFile> specified relative to the <inputDir>. If
specified, then do not perform a directory walk, but convert only
this file.-e|–extension <DICOMextension>
An optional extension to filter the DICOM files of interest from the
<inputDir>.[-O|–outputDir <outputDir>]
The directory to contain all output files.NOTE: If neither -F nor -T are specified, a ‘-r raw’ is
assumed.-F|–tagFile <tagFile>
Read the tags, one-per-line in <tagFile>, and print the
corresponding tag information in the DICOM <inputFile>.-T|–tagList <tagList>
Read the list of comma-separated tags in <tagList>, and print the
corresponding tag information parsed from the DICOM <inputFile>.-m|–image <[<index>:]imageFile>
If specified, also convert the <inputFile> to <imageFile>. If the
name is preceded by an index and colon, then convert this indexed
file in the particular <inputDir>.-o|–outputFileStem <outputFileStem>
The output file stem to store data. This shouldnothave a file
extension, or rather, any “.” in the name are considered part of
the stem and arenotconsidered extensions.[-t|–outputFileType <outputFileType>]
A comma specified list of output types. These can be:o <type>    <ext>       <desc>
o raw       -raw.txt    the raw internal dcm structure to string
o json      .json       a json representation
o html      .html       an html representation with optional image
o dict      -dict.txt   a python dictionary
o col       -col.txt    a two-column text representation (tab sep)
o csv       .csv        a csv representation[-p|–printToScreen]
If specified, will print tags to screen.[-x|–man]
Show full help.[-y|–synopsis]
Show brief help.-v|–verbosity <level>
Set the app verbosity level.-1: No internal output.0: All internal output.ExamplesReplicate a tree and for each DICOM series dir, create multiple reports, including an html output with an embedded image of the center (middle file) of the series:pfdicomtag-I/var/www/html/normative\-mm:out.jpg-edcm\-o%PatientAge-%md5PatientID\-O/var/www/html/tag\-traw,json,col,csv,html,dict
Package: pfehler
Captures and logs exceptions, optionally printing them to stderr.Tested against Windows 10 / Python 3.10 / Anacondapip install pfehlerCaptureandlogexceptions,optionallyprintingthemtostderr.Args:logfile(str,optional):Thepathtotheerrorlogfilewheretheexceptiondetailswillbeappended.Ifnotprovided,nologgingtoafilewilloccur.print_error(bool,optional):IfTrue,theexceptiondetailswillbeprintedtostderr.IfFalse,nooutputwillbeprinted.DefaultstoTrue.Example:frompfehlerimportpfehlertry:x=5/0exceptException:pfehler(logfile="c:\\errorlogfile.txt",print_error=True)Thisfunctioncapturesanexception's traceback, optionally prints it to stderr, andappendstheerrordetailsalongwithatimestamptoaspecifiedlogfile.Ifthelogfiledoesnotexist,itwillbecreated.Thetimestampformatis"YYYY_MM_DD_HH_MM_SS_microseconds".
Package: pfhb
packet-filter-host-blockerA small Python package (class and cli) that digs into domains to find its related IPs and (if enabled) IP classes from the same ASN Origin due to generate PF (Packet Filter) tables and rules to block access into those services.Requirementsuser privileges to installpfhb, readpf.conf, write in/etc/pfhband to runpfctlpacket filter enabled (OpenBSD, FreeBSD, NetBSD or macOS)
Package: pfhm
pfhm (Python Function HeatMap tool)Mini line-by-line timing tool made for debugging functions in Python.This is not designed to be used as a large scale profiling tool - rather as a quick debugging of small functions.Supports doc-strings, and multiline function definitions.UsageInstall viapython setup.py install.Seeexample.pyfor a full example.Either use as a decorator,frompfhmimportprofile_func@profile_funcdeffunc(*args,**kwargs):...Where the output will be written toout.html, or inline,profile_func(func, out_file='custom_location.html')(*args, **kwargs).ExampleAs inexample.py, we call the function@profile_funcdeffunc(x):list=[]foriinrange(100):x+=2list.append([4]*500)x+=3list.append([4]*10000)x+=7returnxAnd receive the output:Custom callbacksYou can also pass a custom callback function toprofile_funcfor per line timing functions. For example, forPyTorchyou could profile the time spent in the GPU by passing the following callback:profile_func(func,callback=torch.cuda.synchronize)
Package: pfinance
pfinancepfinance is a Python financial mathematics library.
It attempts to provide a comprehensive suite of functions, tools, and calulators geared towards financial applications.
pfinance does not supply APIs for market and exchange lookup.SupportsPython 3.9Latest ReleasePackage StatusLicenseInstallationpfinance is available viaPyPI. Install with pip:$python3-mpipinstallpfinanceNote: pfinance requires Python >= 3.9 for full test and annotation compatability, but may offer reduced functionality for earlier 3.x versions.Modulespfinance functions are organized by module.ModuleDescriptiongeneralCommon finance functionsdepreciationDepreciation of assets functionstime_valueTime value of money functionsconversionUnit and notation conversion functionssecuritiesSecurities tracking and analysis functionsExampleDetermine the value of a $100.00 investment earning 7% interest compounded monthly after 10 years.>>>frompfinanceimportgeneral>>>value=general.compound_interest(100,0.07,10,12)>>>print(round(value,2))200.97Dependenciespfinance does not rely on any third party dependencies.
Package: pfinsim
Descriptionpfinsim stands for Personal FINance Simulation.Its goal is to allow for users to easily investigate the effect of taxes and investing on their personal financial situation. Use cases can be found onthe author's blog.As of writing this project is focused on the Dutch tax system. Efforts to extend towards other countries is highly appreciated.The following is currently supportedInvestingReal estateMortgagesTaxesTax creditsIncome taxesJobsMonthly incomeHoliday allowancePython >= 3.7 is requiredThis project onGithubDeployment! Before deployment, increment the version nr. in setup.pyrm build dist *.egg-info -r
python3 setup.py sdist bdist_wheel
twine upload dist/*You will be asked for your PyPI (python package index) username and password for authentication, enter these.LogUploaded to pypi aspfinsim2020-12-26
Package: pfio
PFIOPFIO is an IO abstraction library developed by PFN, optimized for deep
learning training with batteries included. It supportsFilesystem API abstraction with unified error semantics,Explicit user-land caching system,IO performance tracing and metrics stats, andFileset container utilities to save metadata.DependencyHDFS client and libhdfs for HDFS accessCPython >= 3.8Installation and Document buildInstallation$gitclonehttps://github.com/pfnet/pfio.git
$cdpfio
$pipinstall.Documentation$cdpfio/docs
$makehtml
$openbuild/html/index.htmlHow to usePlease refer to theofficial documentfor more information about the usage.ReleaseCheckthe official documentfor latest release procedure.Run tests locally:$pipinstalltox
$toxBump version numbers inpfio/version.py.Push and open a pull request to invoke CI. Once CI passed and the pull request merged,
tag a release:$gittag-sX.Y.Z
$gitpush--tagsBuild:$rm-rfdist
$pip3install--userbuild
$python3-mbuildRelease to PyPI:$python3-mpipinstall--user--upgradetwine
$python3-mtwineupload--repositorytestpypidist/*