Saravanan666/pypi-org huggingface dataset:
Package: homie-helpers
homie-helpersYet another python implementation ofHomie ConvectionIn fact, it's a wrapper around another libraryHomie4- just with changed APIQuick startThere are two possible approaches - choose one that suits you more!Approach 1: setting properties using device object# Let's create settings first...SETTINGS=HomieSettings('mqtt.eclipseprojects.io',port=1883,username='...'password='...')# Callback for 'ison' propertydefset_enabled(value):print('Turning%s'%('on'ifvalueelse'off'))# Create Homie object# At this moment the MQTT messages will be sent!homie=Homie(SETTINGS,"my-thermometer",nodes=[Node("status",properties=[FloatProperty("temperature",unit="C"),# client cannot modify this propertyBooleanProperty('ison',set_handler=set_enabled)# client CAN modify this property - will call callback])])homie['temperature']=20.0Approach 2: setting properties using property objects# Let's create settings first...SETTINGS=HomieSettings('mqtt.eclipseprojects.io',port=1883,username='...'password='...')# Callback for 'ison' propertydefset_enabled(value):print('Turning%s'%('on'ifvalueelse'off'))property_temperature=FloatProperty("temperature",unit="C"),# client cannot modify this propertyproperty_ison=BooleanProperty('ison',set_handler=set_enabled)# client CAN modify this property - will call callback# Create Homie object# At this moment the MQTT messages will be sent!homie=Homie(SETTINGS,"my-thermometer",nodes=[Node("status",properties=[property_temperature,property_ison])property_temperature.value=20.0
Package: homie-power-supply-node
homie-power-supply-nodehomie-power-supply-nodeis a Python package that uses homie-spec to provide a homie node implementation that can be used to create Homie-compliant messages from your power supply device.This package has no dependencies other thanPython >=3.6andhomie-spec.
Only Linux is supported at the moment, as it uses/sys/class/power_supply/*/ueventto read the power supply properties.InstallationUse the package managerpipto installhomie-power-supply-node.pipinstallhomie-power-supply-nodeUsagefromhomie_specimportDevicefromhomie_power_supply_nodeimportPowerSupplydesktop=Device(id="desktop",name="Desktop Computer",nodes={"battery":PowerSupply("BAT0").node(whitelist_properties=["capacity"])},)messages=desktop.messages()assertnext(messages).topic=="homie/desktop/$state"assertnext(messages).topic=="homie/desktop/$name"assertnext(messages).topic=="homie/desktop/$homie"assertnext(messages).topic=="homie/desktop/$implementation"assertnext(messages).topic=="homie/desktop/$nodes"msg=next(messages)assertmsg.topic=="homie/desktop/battery/$name"assertmsg.payload=="BAT0"msg=next(messages)assertmsg.topic=="homie/desktop/battery/$type"assertmsg.payload=="power-supply"msg=next(messages)assertmsg.topic=="homie/desktop/battery/$properties"assertmsg.payload=="capacity"msg=next(messages)assertmsg.topic=="homie/desktop/battery/capacity/$name"assertmsg.payload=="Capacity"msg=next(messages)assertmsg.topic=="homie/desktop/battery/capacity/$datatype"assertmsg.payload=="integer"msg=next(messages)assertmsg.topic=="homie/desktop/battery/capacity/$unit"assertmsg.payload=="%"msg=next(messages)assertmsg.topic=="homie/desktop/battery/capacity/$format"assertmsg.payload=="0:100"print("Current battery capacity: "f"{format(desktop.getter_message('battery/capacity').payload)}%")"""ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: homie-spec
homie-spechomie-specis a Python library that models the v4Homie Convention.This package has no dependencies other thanPython >=3.6. Since it doesn't implement MQTT this also means it's fairly useless on it's own, as it has no ability to interact with any MQTT broker on it's own.The goal of this package is to provide a data-driven library to easily createdevices,nodesandproperties. These can also be published to be used by anyone.
Another package (WIP), will bridge the MQTT protocol andhomie-spec.Relevant external links:DocumentationSpecificationInstallationUse the package managerpipto installhomie-spec.pipinstallhomie-specUsagefromhomie_specimportDevice,Node,Propertyfromhomie_spec.propertiesimportDatatypelocaltime=Node(name="Local time",typeOf="clock",properties={"color-repr":Property(name="Color representation",datatype=Datatype.COLOR,get=lambda:"233,102,23"),"time":Property(name="HH:MM representation",datatype=Datatype.STRING,get=lambda:"20:20"),},)desktop=Device(id="desktop",name="Desktop Computer",nodes={"local-time":localtime})formsgindesktop.messages():print(msg.attrs)print(desktop.getter_message('local-time/time').attrs)print(desktop.getter_message('local-time/color-repr').attrs)"""{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$state',                          'payload': 'init'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$name',                           'payload': 'Desktop Computer'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$homie',                          'payload': '4.0.0'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$implementation',                 'payload': 'homie-spec'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$nodes',                          'payload': 'local-time'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/$name',                'payload': 'Local time'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/$type',                'payload': 'clock'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/$properties',          'payload': 'color-repr,time'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/color-repr/$name',     'payload': 'Color representation'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/color-repr/$datatype', 'payload': 'color'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/time/$name',           'payload': 'HH:MM representation'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/time/$datatype',       'payload': 'string'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/$state',                          'payload': 'ready'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/time',                 'payload': '20:20'}{'retained': True, 'qos': 1, 'topic': 'homie/desktop/local-time/color-repr',           'payload': '233,102,23'}"""ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: homing-search
Homing SearchHoming Search is a python module for smart hyperparameter optimization in Python.WhyTypically for hyperparameter optimization programmers use sklearn's GridSearch or RandomSearch algorithms.GridSearch has the advantage of being exhaustive, and the disadvantage of taking impractically long for large search spaces.RandomSearch has the advantage of being managable to a timeframe of the developer's choosing, but the disadvantage of being non-adaptable to results as they are discovered.Homing Search seeks to bring together the best of both of these two approaches and to improve upon them by adding adaptation based on the results discovered so far.FeaturesYou provide a time-limit within which it is guaranteed to finish.If the search area is small enough, it will perform an exhaustive grid search in approximately the same time as a GridSearch. There is no reason NOT to choose Homing Search in preference to GridSearch.If the search area is very large, it will produce better results than both GridSearch and RandomSearch.Backend agnostic. Currently supporting functions for Keras are provided to process pandas dataframes into tensorflow datasets, in the future additional supporting functions for sklearn and pytorch databunch will be added.Getting startedInstall Homing Search from PyPI$ pip install homing_searchTo run your first example:# TODO: Provide an example using a toy dataset!ContributingIf you're a developer and wish to contribute:Create an account on GitHub if you do not already have one.Fork the project repository: click on the â€˜Forkâ€™ button near the top of the page. This creates a copy of the code under your account on the GitHub user account. For more details on how to fork a repository seethis guide.Clone your fork of the homing_search repo from your GitHub account to your local disk:$ git clone https://github.com/<your github username>/homing_search.git
$ cd homing_search
Package: homlib
python-homlibPython homography library. Classic and state-of-the-art methods for homography estimation.Wrapps the C++/Eigen library HomLib.Solvers availableList will be updated.DevelopmentThe Python wrapper uses eigency, which can be downloaded using pip. The requirements.txt
file in thepythonsubdirectory also installs the necessary dependencies (numpy and cython)$pipinstall-rrequirements.txtIn order to compile and wrap the C++ code$pythonsetup.pybdist_wheelTo install the local changes use$pipinstall-e.[dev]
Package: homocompy
HomoComPyThis packages helps in computing effective stiffness properties of continuous fibre-matrix composite materials, based on analytical homogenization models. It assumes the fibres are transversally isotropic and the matrix is isotropicCurrently, these models are supported:Rule of MixturesChamis' modelMori-Tanaka(based on a closed-form expression)Installationpip install HomoComPyGet startedHow to calculate the effective properties of a fibre / matrix composite with this package:from homocompy import rule_of_mixtures, chamis_model, mori_tanaka

fvf = 0.5  # fibre volume fraction [-]

# Fibre properties - units in GPa - transversally isotropic
f_e11 = 230.0  # Young's modulus 11
f_e22 = 20.0  # Young's modulus 22
f_v12 = 0.2  # Poisson coefficient 12
f_g12 = 30.0  # Shear modulus 12
f_g23 = 7.0  # Shear modulus 23

# Matrix properties - units in GPa - isotropic
m_e = 4.0  # Young's modulus
m_v = 0.3  # Poisson coefficient

# Calculate effective properties
# Results is a tuple of floats: (e11, e22/e33, v12/v13, v23, g12/g13, g23)
results_rom = rule_of_mixtures(fvf, f_e11, f_e22, f_v12, f_g12, f_g23, m_e, m_v)
results_chamis = chamis_model(fvf, f_e11, f_e22, f_v12, f_g12, f_g23, m_e, m_v)
results_mori_tanaka = mori_tanaka(fvf, f_e11, f_e22, f_v12, f_g12, f_g23, m_e, m_v)
Package: homoeditdistance
Homo-Edit-DistanceA homo-insertion is an insertion of a string of equal characters, which we also call a block, into another string. A homo-deletion is the inverse operation, that is, the deletion of such a block. We consider the following problem: Given two strings, what is the minimum number of homo-insertions or homo-deletions needed to convert one into the other? We refer to this number as the homo-edit distance.ReferencesThe algorithm is described in the following publication:M. Brand,  N. K. Tran, P. Spohr, S. Schrinner, G. W. Klau. The homo-edit distance problem. bioRxiv, Cold Spring Harbor Laboratory, DOI: tbdInstallation from Repositorypip3installhomoeditdistanceInstallation from Sourcegitclonehttps://github.com/AlBi-HHU/homo-edit-distance.gitcdhomo-edit-distance
python3setup.pyinstallHow to Run on the Command LineThe Python package comes with a command line toolhed, which can be used to run a demonstration of the algorithm. Its source code is located indemonstration.py. It may also help you to see how to invoke the functions. If you just cloned the repository you can start the demonstration from inside the cloned repository usingpython3-mhomoeditdistanceHelpusage: hed [-h] -s STRING1 -t STRING2 [-a] [-b]

Given two strings, find their homo-edit distance

optional arguments:
  -h, --help            show this help message and exit
  -s STRING1, --string1 STRING1
                        first string. Use quotation marks around your string
                        (e.g. "STRING")for the empty string or strings with
                        special characters
  -t STRING2, --string2 STRING2
                        second string
  -a, --all             show all optimal subsequences
  -b, --backtrace       print transformation stepsExampleOutput ofhed -s "TCAGACT" -t "TAGGCTT" -a -bThe homo-edit distance between TCAGACT and TAGGCTT is 4

The following optimal subsequences were found, and obtained using the listed operations:

TAGCT
Possible optimal sequence of operations:
s: TCAGACT t: TAGGCTT
Deleting substring 1 -> 2 (C) from s
Deleting: C       Result: T-AGACT
Deleting substring 4 -> 5 (A) from s
Deleting: A       Result: T-AG-CT
Deleting substring 3 -> 4 (G) from t
Deleting: G       Result: TAG-CTT
Deleting substring 6 -> 7 (T) from t
Deleting: T       Result: TAG-CT-How to Use in Your Own CodeHomo-Edit-Distance between Two StringsfromhomoeditdistanceimporthomoEditDistancestring1="TCAGACT"string2="TAGGCTT"print('The homo-edit-distance of{}and{}is{}.'.format(string1,string2,homoEditDistance(string1,string2,0)['hed']))How to Run the Unit TestsMake sure thatunittestPython package is installed, and runpython3 -m unittestfrom inside the cloned repository.
Package: homog
=====homog=====.. image:: https://img.shields.io/pypi/v/homog.svg:target: https://pypi.python.org/pypi/homog.. image:: https://img.shields.io/travis/willsheffler/homog.svg:target: https://travis-ci.org/willsheffler/homog.. image:: https://readthedocs.org/projects/homog/badge/?version=latest:target: https://homog.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://pyup.io/repos/github/willsheffler/homog/shield.svg:target: https://pyup.io/repos/github/willsheffler/homog/:alt: UpdatesUtilities for Homogeneous Coordinates with Numpy* Free software: Apache Software License 2.0* Documentation: https://homog.readthedocs.io.Features--------* TODOCredits---------This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template... _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage=======History=======0.1.12 (2018-07-10)------------------* add some numba support0.1.12 (2018-03-23)------------------* rename random_* -> rand_** fix rand_xform so "uniform", old to rand_xform_acc* fix edge cases in rot_to_quat0.1.11 (2018-02-9)------------------* add quaternion conversions0.1.9 (2018-02-9)------------------* add hinv and hstub0.1.7 (2018-01-24)------------------* fix axis_ang_cen_of for helical xforms0.1.6 (2018-01-24)------------------* add symmetry data0.1.4 (2018-01-23)------------------* Make readthedocs and PyPI work.0.1.0 (2018-01-23)------------------* First release on PyPI.
Package: homogeneous-transformation
Define, sequence, and apply transformations in 3D.
Taken frommerlict_c89_linkand wrapped in python with a numpy friendly interface.Definet_civil={"pos":[1.0,0.0,0.0],"rot":{"repr":"axis_angle","axis":[0.0,0.0,1.0],"angle_deg":0.3,},}Transformations can be defined with a civil representation in a dict.
The rotation can be represented by either ‘axis_angle’, ‘tait_bryan’, or
‘quaternion’. To apply the transformation we compile it.importhomogeneous_transformationashtt=ht.compile(t_civil)The civil representation can be compiled into a compact numpy arraytof shape(7, ).In:tOut:array([1.,0.,0.,0.99999657,0.,0.,0.00261799])The first 3 fields are the translation vector and the remaining 4 fields are
the rotation quaternion.
One can also export this withto_matrixinto a homogenous
transformation matrix of shape(4, 4).In : ht.to_matrix(t)
Out:
array([[ 0.99998629, -0.00523596,  0.        ,  1.        ],
       [ 0.00523596,  0.99998629,  0.        ,  0.        ],
       [ 0.        ,  0.        ,  1.        ,  0.        ],
       [ 0.        ,  0.        ,  0.        ,  1.        ]])SequenceTransformations in compact representation can be concatenated to compute the
sequence.t_ab=ht.sequence(t_a,t_b)ApplyApply transformations to positions, orientations, or rays.importnumpyasnpvec=np.array([0,0,1])t_vec=ht.transform_position(t,vec)Hereveccan either be a single vector of shape(3, )or an
array ofNvectors with shape(N, 3).
The loop over the individual vectors is in theCbackend and
thus very efficient.
Package: homogenize
homogenizeAnalytical formulas for survival in regime switching Orstein-Uhlenbeck processesHi thereThis package exists for one purpose only: estimation of survival probability for a triply stochastic regime switching process using a fairly advanced technique, asymptotic homogenization. I'm still tinkering
with it and there might yet be bugs ... so caveat emptor. The calculation is
from the back of my phd thesis 18 years ago so I'm a bit rusty :) The technique is not like
a series expansion that is more accurate near t=0, rather it is more accurate for larger t. A little
counterintuitive. It needs to be used with care and I recommend running the simulations to get a sense.If you are truly interested there is a draft shared on Overleaf:https://www.overleaf.com/read/rqkgmnqfsvvmIf you discover a bug in the maple code for generating the series expansion or the
python code it is translated to I will be forever greatful.-PeterUsageTo use the survival probability estimatorfrom homogenize import RegimeSwitchingModel
params = {'kappa': 2.0, 'thetas': [0.15, 0.02], 'sigmas': [math.sqrt(0.0555), math.sqrt(0.0055)], 'lmbd': 1.7}
model = RegimeSwitchingModel(**params)
model.u(x=0.12,t=7.2)To check against simulationfrom homogenize import demo
demo()
Package: homography
library for 2d homographiesThe 3x3 homography transformation matrix for transformations in two
dimensions is illustrated below.| x0 |   | a  b  c | | x |
  | y0 | = | d  e  f | | y |
  | z0 |   | g  h  1 | | 1 |

x' = x0 / z0
y' = y0 / z0For documentation, visit thehomographyproject page
Package: homomorph
HomomorphHomomorph is yet another implementation of essential HMM algorithms in Python. (Its name is a reference to its similarity to the countless other HMM packages available on PyPI.) What sets Homomorph apart is its focus on flexibility, numerical stability, and clarity of exposition. For example, thoughhmmlearnis popular, it only natively supports HMMs with normal, mixture normal, or categorical emission distributions. In contrast, Homomorph can directly model states parametrized by arbitrary distributions. Unlike hmmlearn, it does not provide built-in methods for fitting HMMs to data since they would necessarily rely on general-purpose optimization algorithms. Instead, training methods are discussed for specific examples in thetraining tutorial. It covers many scenarios and approaches, including categorical and normal emission distributions with labeled and unlabeled data. Although the HMM class is fully documented, theHMM tutorialis the recommended introduction to the Homomorph API.DependenciesHomomorph is designed to be lightweight and only requires NumPy for array calculations and SciPy for its implementation of random variables. The minimum version for NumPy was set to the most recent at the time of initial release (1.17), but no functionality specific to this release is needed to my knowledge. SciPy, on the other hand, must be at least version 1.9. The reasons for this are highly technical, but the core issue was previous versions of SciPy did not strongly distinguish between discrete and continuous frozen random variables. As a result, reliably extracting the correct probability functions (the pmf and pdf, respectively) was extremely difficult. Although Homomorph does not directly use SciPy in its implementation, its practical use depends so strongly on it that this ambiguity effectively broke Homomorph. Fortunately, versions 1.9 and later have corrected this problem.InstallationTo install Homomorph, run the following command:pip install homomorph
Package: homotopy
Homotopy is a snippet compiler.
Instead of expanding and filling the blanks it lets you finish your thought and get the result you are expecting.Write that complex thought in one line and let
Homotopy take care of parentheses, formatting, indent and all that boring stuff.for#int$i%0%5>printf("Hello, five times.");for(inti=0;i<5;i++){printf("Hello, five times.");}InstallpipinstallhomotopyPluginsThis tool is intended to be used inside an editor. Currently only Atom plugin is implemented.AtomSeemaking a pluginif you want to create a plugin.Getting startedSeegetting startedsection in documentation.
Package: homura
## Homura[![Build Status][travis-image]][travis-link][![PyPI Version][pypi-image]][pypi-link]Homura (ほむら) is a Python downloader with progress, which can be used to download large files.It is named after [Homura Akemi](http://ja.wikipedia.org/wiki/%E6%9A%81%E7%BE%8E%E3%81%BB%E3%82%80%E3%82%89>).### Features* PycURL based* Resume downloads (if server supports [byte ranges](http://en.wikipedia.org/wiki/Byte_serving) on the resource)* Support for `requests.Session`### InstallationHomura depends on [PycURL](http://pycurl.sourceforge.net/). Install dependencies before installing the python package:#### Ubuntu```bashsudo apt-get install build-essential libcurl4-openssl-dev python-dev```#### FedoraYum:```bashsudo yum groupinstall "Development Tools"sudo yum install libcurl libcurl-devel python-devel```DNF:```bashsudo dnf groupinstall "Development Tools"sudo dnf install libcurl libcurl-devel python-devel```#### Install Homura```bashpip install homura```### UsageThe simplest usage is to import the utility function `download`:```pythonfrom homura import downloaddownload('http://download.thinkbroadband.com/200MB.zip')3%      6.2 MiB     739.5 KiB/s            0:04:28 ETA```To specify path for downloaded file:```pythondownload(url='http://download.thinkbroadband.com/200MB.zip',path='/path/to/big.zip')```You can specify extra headers as a dictionary:```pythondownload(url='http://example.com', headers={'API-Key': '123456'})```You can work with `Session` objects of the [requests](http://docs.python-requests.org/en/latest/) library:```pythonimport requestss = requests.Session()# Do some work with `s` and send requestsdownload(url='http://example.com', session=s)```Pass options to `setopt` of the `pycurl.Curl` object via the `pass_through_opts` argument:```pythonimport pycurldownload(url=url, pass_through_opts={pycurl.FOLLOWLOCATION: True})```[travis-image]: https://api.travis-ci.org/shichao-an/homura.png?branch=master[travis-link]: https://travis-ci.org/shichao-an/homura[pypi-image]: https://img.shields.io/pypi/v/homura.png[pypi-link]: https://pypi.python.org/pypi/homura/
Package: honcho
___           ___           ___           ___           ___           ___
    /\__\         /\  \         /\__\         /\  \         /\__\         /\  \
   /:/  /        /::\  \       /::|  |       /::\  \       /:/  /        /::\  \
  /:/__/        /:/\:\  \     /:|:|  |      /:/\:\  \     /:/__/        /:/\:\  \
 /::\  \ ___   /:/  \:\  \   /:/|:|  |__   /:/  \:\  \   /::\  \ ___   /:/  \:\  \
/:/\:\  /\__\ /:/__/ \:\__\ /:/ |:| /\__\ /:/__/ \:\__\ /:/\:\  /\__\ /:/__/ \:\__\
\/__\:\/:/  / \:\  \ /:/  / \/__|:|/:/  / \:\  \  \/__/ \/__\:\/:/  / \:\  \ /:/  /
     \::/  /   \:\  /:/  /      |:/:/  /   \:\  \            \::/  /   \:\  /:/  /
     /:/  /     \:\/:/  /       |::/  /     \:\  \           /:/  /     \:\/:/  /
    /:/  /       \::/  /        /:/  /       \:\__\         /:/  /       \::/  /
    \/__/         \/__/         \/__/         \/__/         \/__/         \/__/Honcho is a Python port ofForeman, a tool for managing Procfile-based applications.Why a port?Installing Honchopip install honchoHow to use HonchoThe 30-second version:Writea Procfile:$ cat >Procfile <<EOM
web: python serve.py
redis: redis-server
EOMOptional:write a .env fileto configure your app:$ cat >.env <<EOM
PORT=6000
REDIS_URI=redis://localhost:6789/0
EOMRun the app with Honcho:$ honcho startFor more detail and an explanation of the circumstances in which Honcho might
be useful, consult theHoncho documentation.LicenseHoncho is released under the terms of the MIT license, a copy of which can be
found inLICENSE.