Saravanan666/pypi-org huggingface dataset:
Package: proofdock-reliability-platform-django
Django integrationInstallationThis package requires Python 3.5+$ pip install -U proofdock-reliability-platform-djangoUsageThe chaos middleware takes the followinginput variables:VariableDescriptionRELIABILITY_PLATFORM_APPLICATION_NAMEThe service application's nameRELIABILITY_PLATFORM_APPLICATION_ENVThe service application's deployed environmentRELIABILITY_PLATFORM_PROOFDOCK_API_TOKENThe API token to connect to Proofdock's Chaos APITheconfigurationexemplified ascode:# file: settings.pyMIDDLEWARE=['..''proofdock.rp.contrib.django.middleware.DjangoMiddleware','..']# other settings ...CHAOS_MIDDLEWARE={'RELIABILITY_PLATFORM_APPLICATION_NAME':'example-application-name','RELIABILITY_PLATFORM_APPLICATION_ENV':'example-environment','RELIABILITY_PLATFORM_PROOFDOCK_API_TOKEN':'eyJ0eXAi...05'}Start your Django application and create an attack usingHTTP request headerorcontrol panel. Read more about attackshere.
Package: proofdock-reliability-platform-flask
Flask integrationInstallationThis package requires Python 3.5+$ pip install -U proofdock-reliability-platform-flaskUsageThe reliability platform client for Flask takes the followinginput variables:VariableDescriptionRELIABILITY_PLATFORM_APPLICATION_NAMEThe service application's nameRELIABILITY_PLATFORM_APPLICATION_ENVThe service application's deployed environmentRELIABILITY_PLATFORM_PROOFDOCK_API_TOKENThe API token to connect to Proofdock's Reliability Platform APITheconfigurationexemplified ascode:fromflaskimportFlask,jsonifyfromproofdock.rp.contrib.flask.middlewareimportFlaskMiddlewareapp=Flask(__name__)app.config['RELIABILITY_PLATFORM_APPLICATION_NAME']='example-application-name'app.config['RELIABILITY_PLATFORM_APPLICATION_ENV']='example-environment'app.config['RELIABILITY_PLATFORM_PROOFDOCK_API_TOKEN']='eyJ0eXAi...05'middleware=FlaskMiddleware(app)# Your business logic here@app.route("/")defhello():return"Hello World!"if__name__=="__main__":app.run()Start your Flask application and inject faults using theReliability Platform.More.
Package: proof_frog
ProofFrogA work in progressInstallation:pip3 install -r requirements.txt
pip3 install -r requirements-dev.txtCommands:To use the proof engine:python3 proof_frog prove [proof_file]. As of right now, the only proofs working are 'examples/Proofs/SymEnc/OTUC=>OTS.proof' and 'examples/Proofs/SymEnc/CPA$=>CPA.proof'.You can also parse any type of file (scheme, proof, game, or primitive) usingpython3 proof_frog parse [file]. It will read the file, transform it into an internal AST representation, stringify the representation, and print it back out to the screen.The bash filestestParsing.shensures that the ANTLR grammar can parse each file in the examples folder.testAST.shparses each file with proof_frog, strips the whitespace, and diffs it with the original file to ensure that the AST output matches the file input.
Package: proofpoint-itm
proofpoint_itmProofpoint ITM API client library for pythonInstallationpython -m pip install proofpoint_itmUsageCreate a front end script to import the ITMClient class and create a new ITMClient object by passing in the tenant ID (first part of the admin console url), API Client ID, and client secret as a dict.fromproofpoint_itmimportITMClientitm_client=ITMClient({'tenant_id':<tenantid>,'client_id':<apiclientid>,'client_secret':<apiclientsecret>})Important changes:v0.8.0 - activity_search() now uses a different backend API call that requires a different search query format. Any previous searches will need to be recreated in the new format. Generate a new exploration and view the query to see the new format.DocumentationGeneral documentation can be found here:proofpoint_itm documentationDetailed API reference documentation here:API Reference
Package: proovl-sms
proovl-smsA Python library for sending SMS messages using Proovl APIInstallationInstall using pip:pip install proovl-smsParametersThe following parameters are required to send an SMS message:user: Your Proovl API user ID. You can obtain this from yourProovl account.token: Your Proovl API authentication token. You can obtain this from your Proovl account.from_num: The sender's name or phone number. This must be registered with Proovl. Leave this blank if you want to use the default sender name.Usage:fromproovl_smsimportProovl# Initialize Proovl with your Proovl user, token, and from numberproovl=Proovl(user='your_proovl_user',token='your_proovl_token',from_num='your_from_number')# Send a single SMS messageresponse=proovl.send_sms(destination='destination_number',message='Hello, world!')print(response)Bulk SMS:fromproovl_smsimportProovl# Initialize Proovl with your Proovl user, token, and from numbersproovl=Proovl(user='your_proovl_user',token='your_proovl_token',from_num='your_from_number')# Send a bulk SMS messageresults=proovl.send_bulk_sms(destinations='destination1;destination2;destination3;destination4;destination5',message='Hello, world!')forresultinresults:print(result['number'],result['response'])CreditsThe proovl-sms package was developed by Tomas. You can obtain your own Proovl account and API credentials fromproovl.com.
Package: prop
prop · pyA Python 🐍 library for getting a property from a nested object using a dot path.Usageimportpropdata={'k1':'v1','nested':{'x':'y','int':0,'null':None},'list':[[None,True,9]]}prop.get(data,'k1')# v1prop.get(data,'nested.x')# xprop.get(data,'list.0.1')# Trueprop.get(data,'list.0.-1')# 9Limitations: For navigating dicts, only string keys are supported.Installation$pipinstallpropSimilar librarieshttps://github.com/chrisinajar/py-dot-prop- (Python) Get a property from a dict or listhttps://github.com/sindresorhus/dot-prop- (Node.js) Get, set, or delete a property from a nested object using a dot pathhttps://github.com/jonschlinkert/get-value- (Node.js) Use property paths (a.b.c) to get a nested value from an objectLicenseMIT© Cristi Constantin.
Package: prop2po
Prop2POProp2PO package converts a java property file into a Gettext PO file.Usage# Basic use of the packageprop2pomessages.propertiesmessages.poThe available options areNameShortcutTypeExplanation--language-lTEXTLanguage of the translation--project-pTEXTName of the project--encoding-eTEXTEncoding of the file# Print helpprop2po--help
Package: propagate-uncertainties-sebastian-achim-mueller
Propagate the uncertainties of your variables in simple expressions.Examplesimportpropagate_uncertaintiesaspupu.add(x=1,x_au=0.1,y=4,y_au=0.1)(5,0.14142135623730953)pu.multiply(x=2,x_au=0.2,y=3,y_au=0.1)(6,0.632455532033676)pu.divide(x=5.0,x_au=1.0,y=2.0,y_au=0.1)(2.5,0.5153882032022076)pu.sqrt(x=4,x_au=0.1)(2.0,0.025)Functionsadd(x,y)multiply(x,y)divide(x,y)hypot(x,y)sqrt(x)max([x0,x1, x2, ... xN])sum([x0,x1, x2, ... xN])sum_axis0(X)integrate(f=[y0,y1, y2, ... yN],x_bin_edges=[x0,x1, x2, ...x(N+1)])
Package: propane
# PropaneA collection of somewhat random, helpful utility functions, data structures, Django fields, and other miscellany.Licensed under the [MIT license](https://tldrlegal.com/license/mit-license).## Other credits:setonceclass from Ian Bicking:http://blog.ianbicking.org/easy-readonly-attributes.htmlask_yes_nofunction fromhttp://code.activestate.com/recipes/577058/
Package: propdayscov
The purpose of this package is to provide a python-native means to calculate a common industry metric for
medication adherence, Proportion of Days Covered (PDC).  Much of the healthcare analytics industry is
transitioning from SAS and are working to replicate such fundametal metrics in new environments.
The goal is to offer one less thing that needs to be rebuilt from scratch, and hopefully smooth the path of
both better healthcare and the FOSS movement.The most comprehensive FOSS package for medication adherence is currently AdhereR, and anyone looking for a
broader coverage of the topic would be well served to give them a look.  They can be found athttps://www.adherer.eu/and offer a variety of adherence metrics and visualizatons.  The propdayscov package
is designed to be simpler to use, python-native, and offers a stricter focus on PDC.A popular implementation of PDC in SAS, and my original introduction to the topic, can be found athttp://support.sas.com/resources/papers/proceedings13/168-2013.pdfThis paper describes the nuances of the metric well, and will serve as a good primer for any analyst new
to its use.As of right now, this package consists of a single public function, calc_pdc.  Usage is described below:Parameters:indata - A pandas dataframe containing the required columns described below.druglevel - Accepts the values of "Y" or "N" to indicate whether you want to
additionally output drug-level PDC valuesmprocmode - Accepts the values of "Y" or "N" to indicate whether you want to run the
analysis in multiprocessing mode or not.  Defaults to "N"workers - The number of worker processes to be instantiated for multiprocessing.  If you
aren't sure, a decent 'best guess' can be found using multiprocessing.cpu_count()Input - A Pandas dataframe containing the following column:P_ID - A unique patient identifier. Format = STRINGDRUGNAME - The name of the drug being filled.  Generic name, per usual PDC requirements.Format = STRINGFILLDATE - The date of the fill being dispensed.  Format = DATEDAYSSUPPLY - Days of supply being dispensed at fill.  Format = INTEGERMBRELIGSTART - First date of coverage eligiblity for patient.  Per URAC, can be set tofirst known date of fill if eligibility records are not available. Format = DATEMBRELIGEND - Last date of coverage eligiblity for patient.  Per URAC, can be set tolast known date of fill if eligibility records are not available. Format = DATEReturns - A Pandas dataframe containing the following columnsP_ID - A unique patient identifier, as provided in input. FORMAT = STRING*DRUGNAME - The name of the drug being filled, as provided in input.  Optionalcolumn, only output if druglevel parameter is set to "Y".  FORMAT = STRINGCOV_DAYS - The number of unique days of drug coverage, after shifting coverageto accommodate early refills. FORMAT = INTEGERTOT_DAYS - The total number of days in patient analysis window.  Set to 0if days of coverage is 0.  FORMAT = INTEGERPDC_RATIO - The patient's PDC ratio, calculated as COV_DAYS / TOT_DAYS.Set to 0 if days of coverage is 0.  FORMAT = FLOAT
Package: propelauth-django-rest-framework
PropelAuth Django Rest Framework LibraryA Django Rest Framework library for managing authentication, backed byPropelAuth.PropelAuthmakes it easy to add authentication and authorization to your B2B/multi-tenant application.Your frontend gets a beautiful, safe, and customizable login screen. Your backend gets easy authorization with just a few lines of code. You get an easy-to-use dashboard to config and manage everything.DocumentationFull reference this library ishereGetting started guides for PropelAuth arehereQuestions?Feel free to reach out atsupport@propelauth.com
Package: propelauth-fastapi
PropelAuth FastAPI SDKA FastAPI library for managing authentication, backed byPropelAuth.PropelAuthmakes it easy to add authentication and authorization to your B2B/multi-tenant application.Your frontend gets a beautiful, safe, and customizable login screen. Your backend gets easy authorization with just a few lines of code. You get an easy-to-use dashboard to config and manage everything.DocumentationFull reference this library ishereGetting started guides for PropelAuth arehereQuestions?Feel free to reach out atsupport@propelauth.com
Package: propelauth-flask
PropelAuth Flask SDKA Flask library for managing authentication, backed byPropelAuth.PropelAuthmakes it easy to add authentication and authorization to your B2B/multi-tenant application.Your frontend gets a beautiful, safe, and customizable login screen. Your backend gets easy authorization with just a few lines of code. You get an easy-to-use dashboard to config and manage everything.DocumentationFull reference this library ishereGetting started guides for PropelAuth arehereQuestions?Feel free to reach out atsupport@propelauth.com
Package: propelauth-py
PropelAuth Python SDKA python library for managing authentication, backed byPropelAuth.PropelAuthmakes it easy to add authentication and authorization to your B2B/multi-tenant application.Your frontend gets a beautiful, safe, and customizable login screen. Your backend gets easy authorization with just a few lines of code. You get an easy-to-use dashboard to config and manage everything.DocumentationFull reference this library ishereGetting started guides for PropelAuth arehereQuestions?Feel free to reach out atsupport@propelauth.com
Package: propel-client
PCLIpropel client to operate agents and opeai callsInstallinstallationpip install .Usagecli command named:propelusepropel login -u some_userto obtain credentials store locallyusepropel logoutto logout on propel server and remove local credentialsusepropel openai /v1/modelsto perform openai call.usepropel openai /v1/models "{}"to perform openai call with json encoded payloadorecho "{}" | propel openai /v1/models -to perform openai call with json encoded payload from stdinplease check--helpfor other commands like: agents, keys, variables
Package: proper
Proper Web FrameworkConventions over configurationRequirementsPython 3.6+Design principles"Conventions over configuration".No globals.
When you need a shared object, pass it arround.Optimize for the 95%.
Don't compromise the usability of the common cases to keep consistency
with the edge cases.Code redability is very important.App-code over framework-code
Because app code is infintely configurable without dirty hacks."Everyone is an adult here".
Run with scissors if you must.Greenthtreads over async
Package: proper_forms
Proper Forms is a flexible form library to make far easier to create beautiful, semantically rich, syntactically awesome, readily stylable and wonderfully accessible HTML forms in your Python web application.Documentation:https://proper-forms.scaletti.devpipinstallproper-formsHow Proper Forms is differentA field isn't tied to a specific HTML tag, so can be presentend in multiple ways. Even the same form can be used in different contexts and have different widgets and styles on each. A set of options as checkboxes, a select multiple, or a comma-separated input? You got it. A date as a calendar or as three selects? No problem.Many commonly used built-in validators, and you can also write simple functions to use as custom ones.Any field can accept multiple values; as a list or as a comma-separated text.All error messages are customizable. The tone of the messages must be able to change or to be translated.Incredible easy to integrate with any ORM (object-relational mapper). Why should you needanotherlibrary to do that?Just show me how it looksfromproper_formsimportForm,Email,TextclassCommentForm(Form):email=Email(required=True,check_dns=True)message=Text(LongerThan(5,"Please write a longer message"),required=True)defcomment():form=CommentForm(request.POST)ifrequest.method=="POST"andform.validate():data=form.save()...returnrender_template("comment.html",form=form)
Package: propergitblame
Propergitblame installationNavigate to your project folder first$cdproject-to-test$pipinstallpropergitblame$gitclonehttps://github.com/qwchua/propergitblame$cdpropergitblame$pipinstall-e.$cd..Sample Usage$propergitblame-fjs/game_manager.js$propergitblame-fjs/game_manager.js-n200$propergitblame-fjs/game_manager.js-n200-opiechart
$propergitblame-fall
Package: properimage
Proper image treatmentsThis code is inspired onZackay & Ofek 2017papersHow to coadd images?(see References below).It can perform a PSF estimation usingKarhunen-Löeve expansion, which is based onLauer 2002work.It can perform the statistical proper coadd of several images.It can also perform a proper-subtraction of images.Images need to be aligned and registered, or at leastastroalignmust be installed.Contains a nice plot module for PSF visualization (needs matplotlib)InstallationTo install from PyPI$pipinstallproperimageQuick usagePSF estimation>>>fromproperimageimportsingleimageassi>>>withsi.SingleImage(frame,smooth_psf=False)assim:...a_fields,psf_basis=sim.get_variable_psf(inf_loss=0.15)Proper-subtraction of imagesTo create a proper-subtraction of images:>>>fromproperimageimportpropersubtractasps>>>D,P,Scorr,mask=ps.subtract(ref=ref_path,new=new_path,smooth_psf=False,fitted_psf=True,...align=False,iterative=False,beta=False,shift=False)WhereD,P,Scorrrefer to the images defined by the same name inZackay & Ofekpaper.For the full documentation refer toreadthedocs.RerefencesZackay, B., & Ofek, E. O. (2017). How to Coadd Images. I. Optimal Source Detection and Photometry of Point Sources Using Ensembles of Images. The Astrophysical Journal, 836(2), 187.Arxiv versionZackay, B., & Ofek, E. O. (2017). How to Coadd Images. II. A Coaddition Image that is Optimal for Any Purpose in the Background-dominated Noise Limit. The Astrophysical Journal, 836(2), 188.Arxiv versionZackay, B., Ofek, E. O., & Gal-Yam, A. (2016). Proper Image Subtrraction-Optimal Transient Detection, Photometry, and Hypothesis Testing.The Astrophysical Journal, 830(1), 27.Lauer, T. (2002, December). Deconvolution with a spatially-variant PSF. InAstronomical Data Analysis II (Vol. 4847, pp. 167-174). International Society for Optics and Photonics.
Package: proper-tea
proper_teaA Python package for automating the creation of common class properties.UsageProperties are a useful feature of modern Python, allowing users to cleanly add 'getter' and 'setter' functions in an unobtrusive manner. For example, a common use case is to ensure a class attribute cannot be set to a negative number:classItem:def__init__(self,weight):self.weight=weight# weight in kg@propertydefweight(self):# A simple getterreturnself._weight@weight.setterdefweight(self,value):# Cannot set negative weight!ifvalue<0:raiseValueError("Weight cannot be negative")self._weight=valueitem=Item(2.4)# The 'getter' function is called when accessing the 'weight' attributeassertitem.weight==2.4# The 'setter' function is called when assigning to the 'weight' attributeitem.weight=4.6assertitem.weight==4.6# The following raises an exception# item.weight = -1.0A downside of properties is that they require a significant amount of boilerplate code. Each property will usually require the implementation of two functions, and often this code is repeated. For example, if the Item class above were also given a 'price' attribute, it too cannot be negative, so the user must implement near-identical getter and setter functions.proper_teamakes use of 'property factories', inspired by the book Fluent Python (Luciano Ramalho, O'Reilly, 2015), to automate the creation of common properties. Usingproper_tea, the above class may instead be written:importproper_teaasptclassItem:weight=pt.positive()# weight in kgdef__init__(self,weight):self.weight=weightExtending it to include other variables couldn't be easier:importproper_teaasptclassItem:weight=pt.positive()# weight in kgprice=pt.positive_int()# price in penniestemperature=pt.float_greater_than(-273.15)# temperature in Celsiusrating=pt.int_in_range((1,10))# 1-10 star ratingformat=pt.in_set({"jpeg","png"})# output format, must match strings exactlydef__init__(self,weight,price,temperature,rating,format):self.weight=weightself.price=priceself.temperature=temperatureself.rating=ratingself.format=formatInstallationThe latest version ofproper_teamay be installed using pip:python3 -m pip install proper_teaTo install from the GitHub repo, first clone it, and then install via:python3 -m pip install .To run the tests:python3 -m pip install .[tests]
pytest testsAdditional FeaturesNumPy supportproper_teaprovides property factories for NumPy arrays:importnumpyasnpimportproper_teaasptimportproper_tea.numpyclassMyClass:x=pt.numpy.numpy_array()def__init__(self,x):self.x=x# Automatically convert iterables to NumPy arraymy_class=MyClass([1,2,3])assertisinstance(my_class.x,np.ndarray)# Assigning to my_class.x will also automatically convertmy_class.x=[[4,5,6],[7,8,9]]assertisinstance(my_class.x,np.ndarray)assertmy_class.x.ndim==2# Existing NumPy arrays are not copiedy=np.linspace(0.0,100.0,1001)my_class.x=yassertxisy
Package: propertia
Propertia SDKThe Propertia SDK helps users integrate easily with the SmartScore servicesInstallationInstall Propertia SDK usingpippip install propertiaSDK set upIn order to authenticate with Propertia, you will have to supply the API Key.frompropertia.clientimportPropertiaClientwithPropertiaClient(api_key="your_api_key")asclient:...Client UsageGet ScoresGiven coordinates and needs, return the scoresTakes:propertiesneedsReturns:List of properties sorted by descending scoresExample:frompropertia.clientimportPropertiaClientproperties=[{"id":"Property A","latitude":"43.70558","longitude":"-79.530985"},{"id":"Property B","latitude":"43.640971","longitude":"-79.579119"},{"id":"Property C","latitude":"43.704711","longitude":"-79.287965"}]needs={"food-and-drink":{"importance":5,"categories":["fast-food"]}}withPropertiaClient(api_key="your_api_key")asclient:scores=client.get_scores(properties,needs,region)# Do something with your scoresGet IsochronesGiven a list of one or two destinations and a boolean, return the isochrones (polygon)Takes:destinationsaggregatedReturns:A polygon in GeoJSON formatExample:frompropertia.clientimportPropertiaClientdestinations=[{"id":"destination","latitude":25.197197,"longitude":55.27437639999999,"time":10,"methods":["walking"]}]aggregated=TruewithPropertiaClient(api_key="your_api_key")asclient:polygon=client.get_isochrones(destinations,aggregated)# Do something with your isochronesGet Commute TimesGiven a list of one or two destinations and a list of properties, returns the time it takes to commute to each propertyTakes:destinationspropertiesReturns:A dictionary of properties with the time it takes to commute to each propertyExample:frompropertia.clientimportPropertiaClientdestinations=[{"id":"destination","latitude":25.197197,"longitude":55.27437639999999,"time":10,"methods":["walking"]}]properties=[{"id":"Property A","latitude":"43.70558","longitude":"-79.530985"},{"id":"Property B","latitude":"43.640971","longitude":"-79.579119"},{"id":"Property C","latitude":"43.704711","longitude":"-79.287965"}]withPropertiaClient(api_key="your_api_key")asclient:results=client.get_commute_time(destinations,properties)# Do something with your resultsUse category treefrom propertia.categories import CATEGORY_TREEGet user categoriesfrom propertia.client import PropertiaClient

with PropertiaClient(api_key="your_api_key") as client:
    categories = client.get_user_categories()
    # Do something with your results