Saravanan666/pypi-org huggingface dataset:
Package: htk_io
This python package allows reading and writing of files in some of the formats
used byHidden Markov Model Toolkit (HTK)andHMM-based Speech Synthesis System (HTS).
The following HTK / HTS file formats are currently supported:alignment files (also known as “label” files)decision tree question set filesdecision tree filesraw vector sequence files, used by HTS for storing speech parameter sequencesAlignments, trees, etc are represented in memory using simple python data
structures.
Files in the above formats may be read into, or written from, these python
representations.LicensePlease see the fileLicensefor details of the license and warranty for
htk_io.InstallationFor most purposes the simplest way to install htk_io is to use pip.
For example in Debian and Ubuntu:sudo apt-get install python-numpy
sudo pip install htk_ioThe first command installs numpy from the system repository, since installing
numpy using pip is generally not recommended.
The second command installs the latest released version ofhtk_io on PyPI, together with any
currently uninstalled python packages required by htk_io.htk_io can also be installed in a virtualenv:sudo apt-get install python-numpy
virtualenv --system-site-packages env
env/bin/pip install htk_ioThe latest development version of htk_io is available from a github repository
(see below).To check that htk_io is installed correctly you can run the test suite:python -m unittest discover htk_ioUsageExamples of usage of various functions and classes are included in their
docstrings.
A few examples of files in the formats this package can read and write are
provided in theexampledirectory.SourceThe source code is hosted in thehtk_io github repository.
To obtain the latest source code using git:git clone git://github.com/MattShannon/htk_io.gitDevelopment is in fact done usingdarcs, with the darcs
repository converted to a git repository usingdarcs-to-git.To install any currently uninstalled python packages required by htk_io:sudo apt-get install cython python-numpy
sudo pip install -r requirements.txtBugsPlease use theissue trackerto submit bug reports.ContactThe author of htk_io isMatt Shannon.
Package: htl
HTL - Library for transform data structuresExamplefromhtl.htlimportlinear_to_hierarchical,hierarchical_to_linearlinear=[{'name':'Lorem','parent':None},{'name':'ipsum','parent':'Lorem'},{'name':'dolor','parent':'ipsum'},{'name':'sit','parent':'dolor'},{'name':'amet','parent':'ipsum'},{'name':'consectetur','parent':'Lorem'},{'name':'adipisicing','parent':'consectetur'}]hierarchical=linear_to_hierarchical(linear)"""hierarchical:{'name': 'Lorem','children': [{'name': 'ipsum','children': [{'name': 'dolor','children': [{'name': 'sit'}]},{'name': 'amet'}]},{'name': 'consectetur','children': [{'name': 'adipisicing'}]}]}"""# To reverse conversion, use function hierarchical_to_linear
Package: htlfc
Hypertext Legacy File Converterhtlfcconverts the following file types into a single.htmlfile:.maff- Mozilla Archive File Format, as produced by the Firefox extension of the same name..mht|.mhtml- MIME Hypertext..war- Web ARchive as produced by the KDE Konqueror web browser.file+dir- web page having been saved asfilename.html plusfilename_files/(the native "Save As" format provided by Firefox and Chrome).Usage$ htlfc infile [outfile]— convertinfilefrom the command line.$ htlfc --browser infile— unpackinfileand open browser.Hint: associate extensions.maff.mhtetc withhtlfc-bso that your file manager will launchhtlfcwhich in turn opens the browser.$ htlfc --gui— launch the assisted workflow.From a specified starting directory, workflow searches for candidate files which the user may examine and/or convert permanently to.htmlDetailed instructions appear in theREADME.mdfile at the GitHub repository (NOT included in this package).
Package: htm
htm.pyA Python version ofdevelopit/htm- JSX-like syntax in plainJavaScriptPython.DocumentationThe main documentation of this module is located athttps://jviide.github.io/htm.py/.Installation$pip3installhtmUsagefromhtmimporthtm@htmdefhtml(tag,props,children):returntag,props,childrena=1b={"bar":100}c="span"d="world"html("""<div foo={a+2} ...{b}><{c}>Hello,{d}!<//></div>""")# ('div', {'foo': 3, 'bar': 100}, [('span', {}, ['Hello,', 'world', '!'])])DevelopmentTo install locally:$pipinstall-e.If you want to run tests and build the Sphinx docs and their examples...that runs intoa problem with hyperpython's transitive dependencies.
Thus:$pipinstalltoolz
$pipinstallsidekick
$pipinstall-e.[docs]Running Tests$python3-munittestdiscover-stestsBuilding DocsDocumentation is available in thedocsdirectory.
First install the dependencies then build the docs:$pipinstall-e.[docs]$cddocs
$sphinx-build-bhtml._buildLicenseThis library is licensed under the MIT license. See./LICENSE.
Package: htmailer
#Docs for Htmailer.Htmessage is simple extension of django's official EmailMessage.
It is adapted to work with django templating engine or any templating engine adapted to work with django.Htmessage subclassesDjango.core.mail.EmailMessageUser defines instance ofHtmailerlike sofrom htmailer import Htmessage`message = Htmessage()`

`message.subject('subject goes here')`
`message.html_template('mail_html.html', context)`
`message.txt_template('mail_text.html', context)`'mail_*.html'is a path to the template where the mail is defined.This works like standard django Render() function, such that 'mail_*.html' is searched for in the dirs
defined in theTEMPLATEsetting Dictconfig.
Since this mailer extendsEmailMessage, standard behaviour likesend(),header()are available,
that the content of rendered text template from the mailer is the body of the text message and manually settingbody()will replace the rendered text but will have no effect on the html part of the message.#USAGEclass Htmessageconstructed likeDjango.core.mail.EmailMessagehtml_template(template, context)templateis a path to the html file containing the template.contextis a dictionary containing context data to replace the place holders in the html file.txt_template(template, context)works just likehtml_template()above.The html file for txt template should not contain html document, its content should just be text with
with placeholders according to the style of the Template Engine used by your projectFor example, the html file can contain;<html>
<head>
	<title>Welcome to htmailer</title>
</head>
<body>
	Dear {{user_name}},<br>
		welcome to htmailer, I hope you wil find it useful one way or another.
																	signed,
																	{{company_name}}
</body>
</html>and the text file can contain the same information but as plain text like so;Dear {{user_name}},
		welcome to htmailer, I hope you wil find it useful one way or another.
																	signed,
																	{{company_name}}.This context for the html message above will be adictlike:{'user_name': 'dino', 'company_name': 'A cute company'}
Package: htmap
HTMapJump right in to the tutorials with Binder!HTMap is a library that wraps the process of mapping Python function calls out
to an HTCondor pool.
It provides tools for submitting, managing, and processing the output of
arbitrary functions.Our goal is to provide as transparent an interface as possible to
high-throughput computing resources so that you can spend more time thinking
about your own code, and less about how to get it running on a cluster.For tutorials, installation instructions, and more details, see thedocumentation.Please post bug reports and feature requests toour issue tracker.
Package: htmapp
Sample package structureThis is a tiny, little package that shows how to easily setup a python
package that includesModularized structureA simple unittest setup using.travis.ymlAn easy environment building option viaenvironment.ymlDocumentation of the code based on sphinx.With this sample repository and a few instructions you should be good to go
to create your own repositories that are simple to distribute and easily
reproducible in the future.Where do you start?The simplest way is to take a peak into the documentation which is located
here:Documentation.
There, I will explain and go through the few necessary steps to get you started
to package your modules.Installation of this packageA few simple steps:# Create the conda environment and install dependenciescondaenvcreate-fenvironment.yml# Activate the conda environmentcondaactivatehtmapp# Install your packagepipinstall-e.The-esimply let's you modify the package without having to reinstall it
all the time.
Package: htmd-pdb2pqr
This directory is the home for the [PDB2PQR software](http://www.poissonboltzmann.org/docs/structures-ready/).Some useful information:
* See the [install notes](INSTALL.md) to build pdb2pqr.
* Using pdb2pqr [binaries](BINARY_README.md)
* Latest [changelog](ChangeLog.md)
* For testing the [server](ServerNotes.md) (for developers)Please see the [user guide](http://www.poissonboltzmann.org/docs/pdb2pqr-algorithm-description/) for documentation and the [COPYING file](COPYING) for license information.Please see [programmer’s guide](http://www.poissonboltzmann.org/docs/pdb2pqr-programmers/) for information on working with the PDB2PQR code.
Package: htminify
A lightweight HTML minifier forallPython web frameworks and WSGI apps.FeaturesUsing a web framework, like django, flask, and pyramid? We got you covered.Or you’re feeling adventurous and you’re building your own wsgi app? We got you covered there too. This will work with any program that complies with the WSGI specificationUsing an encoding that is not UTF-8? Just pass an argument,and we’ll take it from there. 😉Mixing Javascript and html? We’ll try to minify that too, without judging you too much. (No promises though😜).No external dependencies.InstallationWith pip$pipinstallhtminifyWith poetry$poetryaddhtminifyUsageFor DjangoThe middleware goes in yourwsgi.pyfile. An examplewsgi.pywill look like this.# wsgi.pyimportosfromdjango.core.wsgiimportget_wsgi_applicationfromhtminify.wsgiimportStripWhitespaceMiddleware# add this!os.environ.setdefault('DJANGO_SETTINGS_MODULE','website.settings')application=get_wsgi_application()application=StripWhitespaceMiddleware(application)# add this too!For FlaskFlask provides access to its wsgi app, which you can pass as an argument to the middleware.
You are essentially wrapping the middleware around the wsgi application.
An example flask file would be like this.# app.pyfromflaskimportFlaskfromhtminify.wsgiimportStripWhitespaceMiddleware# add this!app=Flask(__name__)app.wsgi_app=StripWhitespaceMiddleware(app.wsgi_app)# add this too!@app.route('/')defhello():return"Hello, world."if__name__=="__main__":app.run()Note that we are wrapping theapp.wsgi_appobject and not theappobject.For any other wsgi frameworkA similar procedure can be followed to integrate the middleware with other wsgi-Python web frameworks.
Just wrap the middleware around the wsgi app.# app.pyfromhtminify.wsgiimportStripWhitespaceMiddleware# add this!wsgi_app=StripWhitespaceMiddleware(wsgi_app)# wrap aroundConfigurationif you don’t want to minify when debug is trueYou can do something like this# app.pyifnotdebug:wsgi_app=StripWhitespaceMiddleware(wsgi_app)If you’re using encoding other than UTF-8Pass the encoding-type to the middleware when wrapping the app.# app.pyfromhtminify.wsgiimportStripWhitespaceMiddleware# add this!wsgi_app=StripWhitespaceMiddleware(wsgi_app,"UTF-16")# pass the encodingTODONew FeaturesMinify Json content.Add ASGI support.DocumentationGenerate Documentation and push to read the docs.Add information for contributing.TestingImprove test suite for wsgi middleware.
Package: html2data
Welcome to Html2DataAuthor:Daniel Perez Rada <dperezrada@gmail.com>DescriptionA simple way to transform a HTML file or URL to structured data.  You only need to define the xpath to the element. Optionaly you can define functions to be applied after. You can easily write XPATH using the firebug extension, copy XPATH (I recommend edit the XPATH given by firebug, making it shorter).ExampleImport>>> from html2data import HTML2DataCreate instance>>> html = """<!DOCTYPE html><html lang="en"><head>
        <meta charset="utf-8" />
        <title>Example Page</title>
        <link rel="stylesheet" href="css/main.css" type="text/css" />
                </head>
                <body>
                <h1><b>Title</b></h1>
                <div class="description">This is not a valid HTML
                </body>
        </html>"""
>>> h2d_instance = HTML2Data(html = html) #You can also create it from a url = urlUsing XPATH configOne you have the object>>> config = [
    {'name': 'header_title', 'xpath': '//head/title/text()'},
    {'name': 'body_title', 'xpath': '//h1/b/text()'},
    {'name': 'description', 'xpath': '//div[@class="description"]/text()'},
]

>>> h2d_instance.parse(config = config)
{'header_title': 'Example Page', 'body_title': 'Title', 'description': 'This is not a valid HTML'}Using CSS SELECTOR config>>> config = [
        {'name': 'header_title', 'css': 'head title'},
        {'name': 'body_title', 'css': 'h1 b '},
        {'name': 'description', 'css': 'div.description'},
    ]

>>> h2d_instance.parse(config = config)
{'header_title': 'Example Page', 'body_title': 'Title', 'description': 'This is not a valid HTML'}Real life exampleimport urllib2

from html2data import HTML2Data

response = urllib2.urlopen('http://sil.senado.cl/cgi-bin/sil_ultproy.pl')
html = response.read()

config = [
    {'name': 'fecha', 'css': 'td:nth-child(1)'},
    {'name': 'id', 'css': 'td:nth-child(2) a'},
    {'name': 'nombre', 'css': 'td:nth-child(3)'},
    {'name': 'estado', 'css': 'td:nth-child(4)'},
]

html_instance = HTML2Data(html = html)
rows = html_instance.parse_one(css = 'td td tr', multiple = True, text = False)
for row_element in rows:
    row_in_html = HTML2Data(tree = row_element)
    print row_in_html.parse(config = config)You will get something like:{'nombre': 'Reforma Constitucional que restablece obligatoriedad del voto.', 'fecha': '24/11/2011', 'estado': 'En tramitación', 'id': '8062-07'}
..
{'nombre': 'Prohíbe el anatocismo.', 'fecha': '02/11/2011', 'estado': 'En tramitación', 'id': '8007-03'}Requirementlxml 2.0+httplib2TestsRequirementludibrionoseRun>> nosetests
Package: html2django
DescriptionModifies the HTML content of a file to replace all  tags' href attributes, all <script> tags' src attributes, and allsrc attributes by default, also provides support for custom modification of tags and attribute with Django template tags, and adds {% load static %} to the beginning of the file.InstallationTo use the function, simply install the package with pip, by default beautifulsoup4 library will be in install using the code below but incase there is any problem, you can install it via pip:pipinstallhtml2djangoUsagefromdjangohtmlimportdjangoifydjangoify('index.html')# modify the index.html file in placeExampleSuppose you have an HTML file named index.html that looks like this:<!DOCTYPE html><html><head><title>My Website</title><linkrel="stylesheet"href="styles.css"><scriptsrc="script.js"></script></head><body><h1>Hello, World!</h1><imgsrc="image.png"></body></html>Running the djangoify() function on this file:djangoify('index.html')will modify the file to look like this:{% load static %}<!DOCTYPE html><html><head><title>My Website</title><linkhref="{% static 'styles.css' %}"rel="stylesheet"><scriptsrc="{% static 'script.js' %}"></script></head><body><h1>Hello, World!</h1><imgsrc="{% static 'image.png' %}"></body></html>Here, the , <script>, andtags' href and src attributes have been replaced with Django template tags, and {% load static %} has been added to the beginning of the file.Parameters- file (str): The path to the input HTML file.
- custom_tag (str): Custom html tag to modify. To be used with the custom_attr parameter.
- custom_attr (str): Custom html attribute of the custom_tag.
- custom_value (any): The value of the - custom attribute.ReturnsNone: The function modifies the input file in place.RaisesFileNotFoundError: If the input file cannot be found or accessed.Authors@haxsys
Package: html2docbook
This package contains transformation from HTML to DocBook XML.Installationinstallhtml2docbookeither using easy_install or by downloading the sources from the Python CheeseshopSupported platformsUnixSubversion repositoryhttps://svn.zmag.de/svn/python/html2docbookUsageExample from the Python command-line:>>> from html2docbook import Html2DocBook
>>> h2d = Html2DocBook()
>>> h2d.transform('<p>first paragraph</p><p>second paragraph</p>')
'<section><para>first paragraph</para><para>second paragraph</para></section>'LicenseGPLAuthorTimo Stollenwerk |timo@zmag.deChanges:0.1 (11.03.2009)initial release
Package: html2docx
html2docxhtml2docx converts valid HTML input to docx output. The project is distributed
under the MIT license.InstallingTo install, use pip:$ pip install html2docxUsagefromhtml2docximporthtml2docxwithopen("my.html")asfp:html=fp.read()# html2docx() returns an io.BytesIO() object. The HTML must be valid.buf=html2docx(html,title="My Document")withopen("my.docx","wb")asfp:fp.write(buf.getvalue())TestingTo run the test suite, use tox:$ tox
Package: html2dt
html2dt links the static files present in the Django project static folder to .html files.Eg: <img src="/img/abc.jpg"> converted to <img src="{% static '/img/abc.jpg' %}">Note- Bash shell is needed for it's working.Installation========pip install html2dtUsage=====html2dt index.htmlPypi url=====https://pypi.python.org/pypi?:action=display&name=html2dt
Package: html2eml
html2emlhtml2emlis a simple package for converting HTML text to EML format (MIME RFC 2822).Getting startedCreate simple message withtoandfromheaders>>>importhtml2eml>>>msg=html2eml.from_html('<html><body><p>Hello world</p></body></html>',to='spam@example.com',from_='eggs@example.com',subject='Sausage')>>>print(msg.as_string())MIME-Version:1.0Content-Type:text/html;charset="utf-8"Content-Transfer-Encoding:base64To:spam@example.comFrom:eggs@example.comSubject:=?utf-8?q?Sausage?=PGh0bWw+PGJvZHk+PHA+SGVsbG8gd29ybGQ8L3A+PC9ib2R5PjwvaHRtbD4=html2emlallows changing charset of html message>>>msg=html2eml.from_html('<html><body><p>Hello world</p></body></html>',charset='ISO-8859-1',to='spam@example.com')>>>print(msg.as_string())MIME-Version:1.0Content-Type:text/html;charset="iso-8859-1"Content-Transfer-Encoding:quoted-printableTo:spam@example.com<html><body><p>Helloworld</p></body></html>Outside ofToandFromfields we can also specifyCCandBCC>>>msg=html2eml.from_html('<html><body><p>Hello world</p></body></html>',to='foo@example.com',from_='bar@example.com',cc='spam@example.com',bcc='eggs@example.com')>>>print(msg.as_string())MIME-Version:1.0Content-Type:text/html;charset="utf-8"Content-Transfer-Encoding:base64To:foo@example.comFrom:bar@example.comCC:spam@example.comBCC:eggs@example.comPGh0bWw+PGJvZHk+PHA+SGVsbG8gd29ybGQ8L3A+PC9ib2R5PjwvaHRtbD4=In case of multiple recipients we can pass a list in any of those fields>>>msg=html2eml.from_html('<html><body><p>Hello world</p></body></html>',to=['foo@example.com','spam@example.com','eggs@example.com'],from_='bar@example.com')>>>print(msg.as_string())MIME-Version:1.0Content-Type:text/html;charset="utf-8"Content-Transfer-Encoding:base64To:foo@example.com,spam@example.com,eggs@example.comFrom:bar@example.comPGh0bWw+PGJvZHk+PHA+SGVsbG8gd29ybGQ8L3A+PC9ib2R5PjwvaHRtbD4Library also supports converting plain EML messages to MIME Multipart messages>>>msg=html2eml.from_html('<html><body><p>Hello world</p></body></html>',to=['foo@example.com','spam@example.com','eggs@example.com'],from_='bar@example.com')>>>multipart=html2eml.convert_eml_to_multipart(msg)>>>print(multipart.as_string())MIME-Version:1.0Content-Type:multipart/mixed;charset="utf-8";boundary="===============2813024326530809151=="Content-Transfer-Encoding:base64To:foo@example.com,spam@example.com,eggs@example.comFrom:bar@example.com--===============2813024326530809151==Content-Type:text/html;charset="utf-8"MIME-Version:1.0Content-Transfer-Encoding:base64PGh0bWw+PGJvZHk+PHA+SGVsbG8gd29ybGQ8L3A+PC9ib2R5PjwvaHRtbD4=--===============2813024326530809151==--
Package: html2epub
html2epub简介原项目为python2项目pypub, 此为python3项目, 并进行了些许修改.将 html链接, html文件 或 html文本 转换成 epub文件.tips关于epub文件的格式可以参考EPUB - Wikipedia.快速使用>>>importhtml2epub>>>epub=html2epub.Epub('My First Epub')>>>chapter=html2epub.create_chapter_from_url('https://en.wikipedia.org/wiki/EPUB')>>>epub.add_chapter(chapter)>>>epub.create_epub('OUTPUT_DIRECTORY')参考文献wcember/pypub: Python library to programatically create epub files.EPUB - Wikipedia.
Package: html2excel
HTML2Excel DocumentationLibrary to convert HTML Tables to Excel file.While libraries like pandas do read html files, they often don't work with merged cells and line breaks.
This library was created with the sole intention of converting HTML tables to Excel files
as they're seen while opening them with softwares such as MS Excel and LibreOffice.A sample flask host code is providedin this linkInstallationpip install html2excelUsageRunning from command linepython -m html2excel input_file output_fileUsing as packagefromhtml2excelimportExcelParserinput_file='/tmp/text_file.html'output_file='/tmp/converted_file.xlsx'parser=ExcelParser(input_file)parser.to_excel(output_file)
Package: html2flask
HTML to FlaskIn a nutshellHTML to Flaskis a HTML to Jinja2 Flask Converter.OverviewThis tool transforms HTML to Jinja2 Flask templates, performing these changes:Change the project CSS tags to Jinja2 tags.Change the project JS tags to Jinja2 tags.Change the project img tags to Jinja2 tags.Install>pipinstallhtml2flaskUsage>html2flask<file.html>><new_file.html>LicenseDictionary Search is Open Source and available under theMIT.ContributionsContributions are very welcome. SeeCONTRIBUTING.mdor skim existing tickets to see where you could help out.
Package: html2hamlpy
[![Build Status](https://travis-ci.org/davidtingsu/html2hamlpy.png?branch=master)](https://travis-ci.org/davidtingsu/html2hamlpy)
[![Coverage Status](https://coveralls.io/repos/davidtingsu/html2hamlpy/badge.png?branch=master)](https://coveralls.io/r/davidtingsu/html2hamlpy)
html2hamlpy
=======
Converts HTML to [HamlPy](https://github.com/jessemiller/HamlPy)
Package: html2jirawiki
Installationpip install html2jirawikiUsageConvert some HTML to Markdown:from html2jirawiki import html_to_jira_wiki
    html_to_jira_wiki('<b>Yay</b> <a href="http://github.com">GitHub</a>')  # > '**Yay** [GitHub](http://github.com)'Specify tags to exclude (blacklist):from html2jirawiki import html_to_jira_wiki
    html_to_jira_wiki('<b>Yay</b> <a href="http://github.com">GitHub</a>', strip=['a'])  # > '*Yay* GitHub'or specify the tags you want to include (whitelist):from html2jirawiki import html_to_jira_wiki
    html_to_jira_wiki('<b>Yay</b> <a href="http://github.com">GitHub</a>', convert=['b'])  # > '*Yay* GitHub'Optionshtml2jirawiki supports the following options:strip
A list of tags to strip (blacklist). This option can't be used with theconvertoption.convert
A list of tags to convert (whitelist). This option can't be used with thestripoption.autolinks
A boolean indicating whether the "automatic link" style should be used when
aatag's contents match its href. Defaults toTrueheading_style
Defines how headings should be converted. Accepted values areATX,ATX_CLOSED,SETEXT, andUNDERLINED(which is an alias forSETEXT). Defaults toUNDERLINED.bullets
An iterable (string, list, or tuple) of bullet styles to be used. If the
iterable only contains one item, it will be used regardless of how deeply
lists are nested. Otherwise, the bullet will alternate based on nesting
level. Defaults to'*+-'.Options may be specified as kwargs to thehtml2jirawikifunction, or as a
nestedOptionsclass inMarkdownConvertersubclasses.