Saravanan666/pypi-org huggingface dataset:
Package: pypme
pypme – Python package for PME (Public Market Equivalent) calculationBased on theModified PME
method.Examplefrompypmeimportverbose_xpmefromdatetimeimportdatepmeirr,assetirr,df=verbose_xpme(dates=[date(2015,1,1),date(2015,6,12),date(2016,2,15)],cashflows=[-10000,7500],prices=[100,120,100],pme_prices=[100,150,100],)Will return0.5525698793027238and0.19495150355969598for the IRRs and produce this
dataframe:Notes:Thecashflowsare interpreted from a transaction account that is used to buy from an
asset at priceprices.The corresponding prices for the PME arepme_prices.Thecashflowsis extended with one element representing the remaining value, that's
why all the other lists (dates,prices,pme_prices) need to be exactly 1 element
longer thancashflows.Variantsxpme: Calculate PME for unevenly spaced / scheduled cashflows and return the PME IRR
only. In this case, the IRR is always annual.verbose_xpme: Calculate PME for unevenly spaced / scheduled cashflows and return
vebose information.pme: Calculate PME for evenly spaced cashflows and return the PME IRR only. In this
case, the IRR is for the underlying period.verbose_pme: Calculate PME for evenly spaced cashflows and return vebose
information.tessa_xpmeandtessa_verbose_xpme: Use live price information via the tessa
library. See below.tessa examples – using tessa to retrieve PME prices onlineUsetessa_xpmeandtessa_verbose_xpmeto get live prices via thetessa
libraryand use those prices as the PME. Like so:fromdatetimeimportdatetime,timezonefrompypmeimporttessa_xpmecommon_args={"dates":[datetime(2012,1,1,tzinfo=timezone.utc),datetime(2013,1,1,tzinfo=timezone.utc)],"cashflows":[-100],"prices":[1,1],}print(tessa_xpme(pme_ticker="LIT",**common_args))# source will default to "yahoo"print(tessa_xpme(pme_ticker="bitcoin",pme_source="coingecko",**common_args))print(tessa_xpme(pme_ticker="SREN.SW",pme_source="yahoo",**common_args))Note that the dates need to be timezone-aware for these functions.Garbage in, garbage outNote that the package will only perform essential sanity checks and otherwise just works
with what it gets, also with nonsensical data. E.g.:frompypmeimportverbose_pmepmeirr,assetirr,df=verbose_pme(cashflows=[-10,500],prices=[1,1,1],pme_prices=[1,1,1])Results in this df and IRRs of 0:Other noteworthy librariestessa: Find financial assets and get their price history without worrying about different APIs or rate limiting.strela: A python package for financial alerts.ReferencesGoogle Sheet w/ reference calculationModified PME on Wikipedia
Package: pypmed
pypmed - a simple Python interface forPubMed's APIpypmed is a Python library that provides easy access to thePubMed's APIs.Installationpip install pypmedExample usageThis example can be executed inthis example notebook.frompypmedimportapissearch_criteria={'author_first_name':'rachel','author_last_name':'gottschalk','institution':'university of pittsburgh at pittsburgh','publication_year':2022}response=apis.query_pubmed_api(search_criteria=search_criteria)
Package: pyPMF
Positive Matrix Factorization in pythonHandle PMF output from various format in handy pandas DataFrame and do lot of stuf with
them.Currently, only data from the EPA PMF5 is handle, fromxlsxor sql database output.HistoryThis project started because I needed to run several PMF for my PhD and also needed to run
some computation on these results.
The raw output of the EPA PMF5 software is a bit messy and hard to understand at a first
glance, and copy/pasting xlsx file is not my taste... So I ended developping this tools
for handling the tasks of maping the xlsx output to nice python objects, on which I can
easily run some computation.Since I needed to plot the results afterward, I also added some plot utilities in this
package. It then has build in support for ploting :chemical profile (both absolute and normalized)species repartition among factortimeserie contribution (for all speciesand profiles)uncertainties plots (Bootstrap and DISP)seasonal contributioncontribution of sources to polluted and normal daysAnd a lot more!ExamplesThedocumentationhas a lot of examples and figures, but here is a short summary:frompyPMF.PMFimportPMFpmf=PMF(site="GRE-fr",reader="xlsx",BDIR="./")# Read various outputpmf.read.read_base_profiles()pmf.read.read_base_contributions()pmf.read.read_constrained_profiles()pmf.read.read_constrained_contributions()# ... or simply :pmf.read.read_all()# The pmf has now different attributes associatedpmf.profiles# name of the different factorspmf.species# name of the different speciespmf.dfcontrib_c# contribution dataframe of factorspmf.dfprofile_c# chemical profile of factors# ... and lot more# plot the resultspmf.plot.plot_stacked_profiles()# or use some utilitiespmf.to_cubic_meter(specie="Cu")# Contribution timeserie of the different factors to the Cupmf.to_relative_mass()# ... and lot more
Package: pyPMKL
Tessellated Kernel Learning (TKL) is a free machine learning MATLAB and python toolbox for learning optimal Tessellated Kernel (TK) functions for Support Vector Machine (SVM) classification and regression problems. TKs are a class of kernel functions that are ideal for kernel learning because they admit a linear parameterization (tractability); are dense in the set of all kernels (accuracy); and every member is universal so that the hypothesis space is infinite-dimensional (scalability).What can I do with TKL?TKL can be used toLearn optimal TK kernel functions for a given set of inputs x and outputs y.Train a Support Vector Machine (SVM) using the optimal TK kernel function.Outputs may be binary (classification) or real valued (regression).How to use TKL
If you only want to use TKL-SVM or build a Tessellated kernel, please look at these examples 1 and 2, as well as the basic functions for the kernel and the model construction.What is Multiple Kernel Learning?
To whom is interested in what MKL is, a good paper is Multiple kernel learning algorithms M GГ¶nen or just read on wikipedia.How to understand the TKL?
What is TKL and how to use it, you can read one of these articles 1 or 2. And we also have a shortened version on our websiteTechnical Support
Our goal is to make use of TKL as simple as humanly possible. However, our background is not in coding and sometimes we come up short. If you are having a serious technical issue and neither the help commands nor the manual are helping, and believe there is a bug in the program, please report it to:brendon.colbert@asu.eduoratalitck@asu.edu. If there is a bug, we will add it to the known bug list and do our best to fix it.Alternatively, if you would like to volunteer for the TKL development team, we would be happy to include you (no compensation - Sorry). Send an email tompeet@asu.edureleased-08/03/21
Package: pypmml-spark
PyPMML-SparkPyPMML-Sparkis a Python PMML scoring library for PySpark as SparkML Transformer, it really is the Python API forPMML4S-Spark.PrerequisitesJava >= 1.8Python 2.7 or >= 3.5DependenciesModulePySparkpypmml-sparkPySpark >= 3.0.0pypmml-spark2PySpark >= 2.4.0, < 3.0.0Installationpipinstallpypmml-sparkOr install the latest version from github:pipinstall--upgradegit+https://github.com/autodeployai/pypmml-spark.gitAfter that, you need to do more to use it in Spark that must know those jars in the packagepypmml_spark.jars. There are several ways to do that:The easiest way is to run the scriptlink_pmml4s_jars_into_spark.pythat is delivered withpypmml-spark:link_pmml4s_jars_into_spark.pyUse those config options to specify dependent jars properly. e.g.--jars, orspark.executor.extraClassPathandspark.executor.extraClassPath. SeeSparkfor details about those parameters.UsageLoad model from various sources, e.g. filename, string, or array of bytes.frompypmml_sparkimportScoreModel# The model is from http://dmg.org/pmml/pmml_examples/KNIME_PMML_4.1_Examples/single_iris_dectree.xmlmodel=ScoreModel.fromFile('single_iris_dectree.xml')Calltransform(dataset)to run a batch score against an input dataset.# The data is from http://dmg.org/pmml/pmml_examples/Iris.csvdf=spark.read.csv('Iris.csv',header='true')score_df=model.transform(df)Use PMML in Scala or JavaSee thePMML4Sproject.PMML4Sis a PMML scoring library for Scala. It provides both Scala and Java Evaluator API for PMML.Use PMML in PythonSee thePyPMMLproject.PyPMMLis a Python PMML scoring library, it really is the Python API for PMML4S.Use PMML in SparkSee thePMML4S-Sparkproject.PMML4S-Sparkis a PMML scoring library for Spark as SparkML Transformer.Deploy PMML as REST APISee theAI-Servingproject.AI-Servingis serving AI/ML models in the open standard formats PMML and ONNX with both HTTP (REST API) and gRPC endpoints.Deploy and Manage AI/ML models at scaleSee theDaaSsystem that deploys AI/ML models in production at scale on Kubernetes.SupportIf you have any questions about thePyPMML-Sparklibrary, please open issues on this repository.Feedback and contributions to the project, no matter what kind, are always very welcome.LicensePyPMML-Sparkis licensed underAPL 2.0.
Package: pypmml-spark2
PyPMML-SparkPyPMML-Sparkis a Python PMML scoring library for PySpark as SparkML Transformer, it really is the Python API forPMML4S-Spark.PrerequisitesJava >= 1.8Python 2.7 or >= 3.5DependenciesModulePySparkpypmml-sparkPySpark >= 3.0.0pypmml-spark2PySpark >= 2.4.0, < 3.0.0Installationpipinstallpypmml-spark2Or install the latest version from github:pipinstall--upgradegit+https://github.com/autodeployai/pypmml-spark.git@spark-2.xAfter that, you need to do more to use it in Spark that must know those jars in the packagepypmml_spark.jars. There are several ways to do that:The easiest way is to run the scriptlink_pmml4s_jars_into_spark.pythat is delivered withpypmml-spark:link_pmml4s_jars_into_spark.pyUse those config options to specify dependent jars properly. e.g.--jars, orspark.executor.extraClassPathandspark.executor.extraClassPath. SeeSparkfor details about those parameters.UsageLoad model from various sources, e.g. filename, string, or array of bytes.frompypmml_sparkimportScoreModel# The model is from http://dmg.org/pmml/pmml_examples/KNIME_PMML_4.1_Examples/single_iris_dectree.xmlmodel=ScoreModel.fromFile('single_iris_dectree.xml')Calltransform(dataset)to run a batch score against an input dataset.# The data is from http://dmg.org/pmml/pmml_examples/Iris.csvdf=spark.read.csv('Iris.csv',header='true')score_df=model.transform(df)Use PMML in Scala or JavaSee thePMML4Sproject.PMML4Sis a PMML scoring library for Scala. It provides both Scala and Java Evaluator API for PMML.Use PMML in PythonSee thePyPMMLproject.PyPMMLis a Python PMML scoring library, it really is the Python API for PMML4S.Use PMML in SparkSee thePMML4S-Sparkproject.PMML4S-Sparkis a PMML scoring library for Spark as SparkML Transformer.Deploy PMML as REST APISee theAI-Servingproject.AI-Servingis serving AI/ML models in the open standard formats PMML and ONNX with both HTTP (REST API) and gRPC endpoints.Deploy and Manage AI/ML models at scaleSee theDaaSsystem that deploys AI/ML models in production at scale on Kubernetes.SupportIf you have any questions about thePyPMML-Sparklibrary, please open issues on this repository.Feedback and contributions to the project, no matter what kind, are always very welcome.LicensePyPMML-Sparkis licensed underAPL 2.0.
Package: pypmp
pypmpPython lib to interact with ManageEngine Password Manager Pro's REST APIInstallationpipinstallpypmpUsagefrompypmpimportPasswordManagerProClient# Connectpmp=PasswordManagerProClient("pmp.example.com","REST_API_TOKEN",verify=True)# Get all resourcespmp.get_resources()# Get accountspmp.get_accounts(resource_id=resource_id)# Get passwordpmp.get_account_password(resource_id=resource_id,account_id=account_id)# Shortcuts# Get resource by namepmp.get_resource_by_name(name="resource01")# Get account by namepmp.get_account_by_name(resource_name="resource01",account_name="Administrator")# Get passwordpmp.get_password(resource_name="resource01",account_name="Administrator")API Documentationhttps://www.manageengine.com/products/passwordmanagerpro/help/restapi.html
Package: pypngnq
What is PyPngnq?PyPngnq is a tool for quantizing PNG images in RGBA formatInstallationYou need to install libpng first, To install PyPngnq:Debian:apt-get install libpng-dev -yFreeBSD:cd /usr/ports/graphics/png
make install cleanTo install PyPngnq:pip install PyPngnqHow to use it?Following is a simple example:# -*- coding: utf8 -*-
from pypngnq import PngNQ
nq = PngNQ('/tmp/test.png')
#print nq.config
nq.use_floyd = False
nq.save('/tmp/test_pypngnq.png')
nq.close()
Package: pypn-habref-api
Habref-api-moduleAPI d'interrogation d'Habref : référentiel des typologies d’habitats et de végétation pour la France (https://inpn.mnhn.fr/telechargement/referentiels/habitats).TechnologiesPython 3FlaskSQLAlchemyInstallationCréer un virtualenv et l'activer :virtualenv -p /usr/bin/python3 venv
source venv/bin/acticateInstaller le module :pip install https://github.com/PnX-SI/Habref-api-module/archive/<X.Y.Z>.zipInstaller le schéma de base de données :Le module est fourni avec une commande pour installer la base de données. Cette commande télécharge le référentiel Habref et créé un schéma de base de données nomméref_habitats.# Depuis le virtualenv
install_habref_schema <database uri>
# Exemple :
# install_habref_schema "postgresql://geonatadmin:monpassachanger@localhost:5432/geonature2db"
Package: pypnnomenclature
Nomenclature-api-moduleFlask (Python) module for Nomenclature API.It is used inGeoNaturebut can also be used as a standalone API service to manage and returns various nomenclatures with their hierarchy.Can be used as a standalone module or as git submodule.Databasebib_nomenclatures_typescontains nomenclatures types list.id_typemnemoniquelabel_frlabel_endefinition_frdefinition_ensourcestatutmeta_create_datemeta_update_date10TYP_DENBRType de dénombrementCounting typeNomenclature des types de dénombrement possibles (comptage, estimation...)Possible counting types (count, estimation...)SINPValidated2014-01-22 00:00:002015-12-16 00:00:00t_nomenclaturescontains all nomenclatures with their type, their parent (broader) and their hierarchy.id_nomenclatureid_typecd_nomenclaturemnemoniquelabel_frdefinition_frsourcestatutid_broaderhierarchymeta_create_datemeta_update_dateactiv10108TêtardTêtardLarve de batracienSINPValidé2010.0082015-07-29 00:00:002015-10-09 00:00:00trueDatabase usageGet all nomenclatures of a type :SELECT *
FROM nomenclatures.t_nomenclatures n
WHERE n.id_type = 100 AND n.active = trueGet all nomenclatures of a rank of a type :SELECT *
FROM JAIPASCAPTEUsageAPIRécupération des termes d'une nomenclature à partir de l'identifiant :/nomenclature/6[?regne=Animalia[&group2_inpn=Bivalves]]DEPRECIERécupération des termes d'une nomenclature à partir du code mnemonique :/nomenclature/STADE_VIE[?regne=Animalia[&group2_inpn=Bivalves]]Récupération des termes d'un ensemble de nomenclature :/nomenclatures?id_type=22&id_type=6[&regne=Animalia[&group2_inpn=Bivalves]]DEPRECIE/nomenclatures?code_type=STADE_VIE&code_type=REF_HAB[&regne=Animalia[&group2_inpn=Bivalves]]Interface d'administration des donnéesAccessible via l'url /nomenclatures/adminInstallationCloner repository and then launch in the folder:python setup.py install
Package: pypnp
pypnpUsageIn the project you want to use pypnp in, first installpypnp.python-mpipinstallpypnpA lock file will be generated the first time you run your application, if one does not exist. To run your python application:PYTHONPATH=.pypnp-runmy.python.module.pathExampleSee the README example directory.ContributingThis project is still in extremely early stages and not ready for external contributors just yet. Once the idea is flushed out a bit more, I'll open it up.To setup a virtual environment and install development dependencies:.script/bootstrap
Package: pypn-ref-geo
Référentiel géographiquePrérequis : vous devez installer l’extension postgis sur votre base de donnée.Création et remplissage du référentiel géographique :python3 -m venv venv
source venv/bin/activate
pip install -e .
pip install psycopg2  # for postgresql database
export SQLALCHEMY_DATABASE_URI="postgresql://user:password@localhost:5432/database"
cd src/ref_geo/migrations
alembic -x local-srid=2154 upgrade ref_geo@head
alembic upgrade ref_geo_fr_municipalities@head  # Insertion des communes françaises
alembic upgrade ref_geo_fr_departments@head  # Insertion des départements français
alembic upgrade ref_geo_fr_regions@head  # Insertion des régions françaises
alembic upgrade ref_geo_fr_regions_1970@head  # Insertion des anciennes régions françaises
alembic upgrade ref_geo_inpn_grids_1@head  # Insertion du maillage 1×1km de l’hexagone fourni par l’INPN
alembic upgrade ref_geo_inpn_grids_5@head  # Insertion du maillage 5×5km de l’hexagone fourni par l’INPN
alembic upgrade ref_geo_inpn_grids_10@head  # Insertion du maillage 10×10km de l’hexagone fourni par l’INPN
Package: pypo4sel.core
Wrapper for selenium webdriver to make page objects easy:class SomePageBlock(PageElement):
    filed = PageElement("#filed_id", timeout=10)
    button = PageElement("//path/to/element")

    def do_some_work(self, keys):
        self.field.send_keys(keys)
        self.button.click()
        ...

class SomePageObject(PageElementsContainer):
    element = SomePageBlock(".block_class")

    def __init__(self, driver):
        self.driver = driver

page = SomePageObject(get_driver('firefox'))
assert page.element.button.is_displayed()
page.element.do_some_work("bla-bla")lazy element loading by requestautomated handling ofStaleElementReferenceExceptionflexible timeoutsautomated detecting of locator typesmart lists of elements, automated logs and much morehere.
Package: pypoc
pypocPython package for analysis of molecular dynamics simulations of lipids membranes.
Seedocs.InstallationYou can installpypocfrom thePython package indexusingpip:pip install pypocThe development version can be installed directly fromgithubviapip:pip installgit+https://github.com/alejogiley/pypoc.gitUsageuntested releaseAuthorsAlejandro Gil-Ley <alejogiley@gmail.com>Licensepypocis free software and is licensed under the MIT license.CreditsThis package was created withcookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.1 (2019-05-21)First release on PyPI.
Package: pypocket
PyPocketA Python Package for GetPocket (https://getpocket.com)InstallationpipinstallpypocketLibrary Requirementsrequests (pip install requests)dominate (pip install dominate)Prerequisite: Obtain Your Consumer Key & Access TokenIn order to use PyPocket, you will need consumer_key and access_token for your Pocket.
For the consumer_key, you can follow Step 1 ofPocket Authentication API Documentationto obtain your consumer_key.For obtaining your access_token, you can either follow the pocket documentation (above link) to get your access_token,
or use theAuthclass available in this library for your convenience as below.frompypocket.authimportAuthauth=Auth(consumer_key="your_consumer_key")# The following will automatically obtain a request_token and ask you to authorize it.auth.authorize_request_token_browser()Theauth.authorize_request_token_browser()will open a webpage to getpocket.com website asking  you to authorize the token.
Once, you authorize it. Then you can get your access token by running the following:access_token=auth.get_access_token()UsagefrompypocketimportPocketp=Pocket(consumer_key="your_consumer_key",access_token="your_token",html_filename="report")p.to_html(num_post=10)Check the development roadmap for this projecthereNew features in the pipelineRetrieve pocket contents according to given tagsModify the pocket contents properties
Package: py-pod
Proper Orthogonal DecompositionPrincipleThe package contains a processing algorithm for decomposing an input using
a limited number of predefined signals from a bigger set.Decomposition is performed by iterating projections onto the straight lines
generated by the reference signals.The proposed algorithm takes a vector space approach. A signal, or more
precisely its sequence ofNtemporal samples, is mapped to a pointPin a vector space of dimensionN. A value taken by a signalPat
sample timetibecomes the coordinate ofPalong
the axisti.The set of reference signals represents a library the algorithm micks from
in order to synthetize or approximate any input. The reference points form a
cloud in the space described above. A linear combination of appropriately
selected reference points will approximate the target signalS.Use case: asset replicationIn order to illustrate how the algorithm works, let's assume we
replicate afundusing two assetsstock 1andstock 2, with
only 3 data points for past performances.Day 1Day 2Day 3Stock 10.820Stock 21.2-0.50Fund1-13Replication1-10The chart below shows the first and final projections in the case of a 3D space:
3 daily performances for a 2 stocks-universe, plus a target fund to replicate.The first projection is performed on the second stock (yellow), since it better
matches the fund performances than those of the first stock.The interactive version of the chart above is available
atmath3d.org.From a time perspective:Typical sizes for asset replication: 1000 dimensions (~5 years of daily data), 200 candidate assets
for use in replication, target portfolio with 5 assets.DocumentationGenerated with PyDoctor:pydoctor --make-html --html-output=docs/api podPublicationpoetry buildpoetry publish
Package: pypoetrylib
Confluent CLI Wraper for PythonSimple wrapper library to Confluent CLIGet startedpoetryaddpython-confluent-cli-wrapperfromconfluent.cli.wrapper.environmentimportEnvironmentfromconfluent.cli.wrapper.kafka_clusterimportKafkaClusterfromconfluent.cli.wrapper.kafka_topicimportKafkaTopicfromconfluent.cli.wrapper.sessionimportloginfromconfluent.cli.wrapper.utils.parsersimportOutputEnumenvironment=Environment()kafka_cluster=KafkaCluster()kafka_topic=KafkaTopic()login()environment.list()kafka_cluster.list()# eq '--all' argument
Package: pypofatu
pypofatuA python package to curatePofatu data.InstallationInstallpypofatufromPyPIrunningpipinstallpypofatupreferably in a newvirtual environment, to keep your system's Python installation unaffected.Installingpypofatuwill also install a command line programpofatu, which provides
functionality to curate and query Pofatu data. Runpofatu-hfor details on usage.pypofatuoperates on data of thePofatu database. This
data is accessed locally. Thus, in order to usepypofatuyou must clone thepofatu/pofatu-datarepository or download
arelease version.