Saravanan666/pypi-org huggingface dataset:
Package: hLepor
Library to calculate hLEPOR score (harmonic mean of enhanced Length Penalty, Precision, n-gram Position difference Penalty and Recall) has been created as port from Perl on materials of the following atricle by Aaron Li-Feng Han, Derek F. Wong, Lidia S. Chao, Liangye He Yi Lu, Junwen Xing, and Xiaodong Zeng. 2013."Language-independent Model for Machine Translation Evaluation with Reinforced Factors". In Proceedings of the XIV Machine Translation Summit.All hLepor score calculation functions take mandatory and optional parameters for input; mandatory parameters are:reference(ideal translation),hypothesis- new translation which has to be compared with reference.Optional parameters are:preprocessis a function to preprocess strings, default isstr.lower().separate_punctuationallows different tokenization options: by default standardword_tokenize()function fromnltk.tokenizeis used, for this option you can specify the language (default is English), ifseparate_punctuation = False, sentence is tikenized by spaces.Other optional parameters control hLepor algorithm:alphaandbeta-- recall and  precision weights, respectively, to calculate weighted Harmonic mean of precision and recall;n-- number of words in vicinity of current word in N-gram word alignment algorithm;weight_elp, weight_pos, weight_pr-- weigths for enhanced length penalty, N-gram Position Difference Penalty and weighted Harmonic mean of precision and recall for   hLepor calculation.Main functions:To calculate hLepor on one pair of sentences you need to pass these strings to single_hlepor_score function:reference = 'Rising urban populations around the world have ushered in the concept of Smart Cities, in which digital innovations are used to address long-standing urban challenges.'
hypothesis = 'Rising urban populations around the world introduced the concept of Smart Cities, where long-standing urban challenges are addressed with digital innovations.'
hLepor_value = single_hlepor_score(reference, hypothesis)
round(hLepor_value, 4)The result is 0.7550.To calculate hLepor on a set of sentences they need to be passed to hLepor as a list of strings:reference = ['Rising urban populations around the world have ushered in the concept of Smart Cities, in which digital innovations are used to address long-standing urban challenges.', 'The related construction boom has put increasing demands on builders to erect structures and systems beautifully and efficiently.']
hypothesis = ['Rising urban populations around the world introduced the concept of Smart Cities, where long-standing urban challenges are addressed with digital innovations.', 'The related construction boom has put increasing demands on teams to build structures and systems beautifully and efficiently.']
hLepor_value = hlepor_score(reference, hypothesis)
round(hLepor_value, 4)This code will calculate hLepor on each pair of sentences and mean value will be calculated, the result should be 0.8395.
Package: hlfiles
hlfileshandle lots of files for youModulesreadA basic module which provides a functionscan_files()to read all files with a specified suffix in a root directory.convertIt provides a classDataFileConverter, which is used to generate file converting function, such as a function that converts all csv.gz files into parquet files (see example).Examplepipinstallhlfilesimportpandasaspdfromhlfiles.convertimportDataFileConverter# You can create any file converting funcion by DataFileConvertercsvgz_to_parquet=DataFileConverter(read_func=pd.read_csv,write_func=lambdadata,file_path:data.to_parquet(file_path),read_file_extension="csv.gz",write_file_extension="parquet",read_func_kwargs={"compression":"gzip"},)if__name__=="__main__":root_dir=r"xxx"# Convert all csv.gz files into parquet files in root_dircsvgz_to_parquet(root_dir,inplace=True)
Package: hlm2-music-changer
Hotline Miami 2 Music Changer(a.k.a. hlm2_music_changer or hlm2mc)A Python module to make the installation and management of Hotline Miami 2 music mods simpler.InstallationMake sure you have Python version 3.9 or above installed. If you don't, it can be downloadedhereMake sure you havepipinstalled (more about installingpiphere)Runpip install hlm2_music_changerThe package and dependencies should download and install automaticallyRunning after installationSimply runhlm2mcin your command processor of choiceDevelopmentThis project usespoetryfor packaging and dependancy management. More aboutpoetrycan be foundhere.Oncepoetryis installed,Clone this repository locally usinggit clone https://github.com/generic-user1/hlm2_music_changer.gitEnter the repository directory usingcd hlm2_music_changerInstall a virtual environment with the appropriate dependencies usingpoetry installRun the project usingpoetry run hlm2mcLinksPyPI:https://pypi.org/project/hlm2-music-changerGitHub:https://github.com/generic-user1/hlm2_music_changerOther notesYou can purchaseHotline Miami 2: Wrong NumberonSteam.
Please note that the author of this software is not affiliated with Devolver Digital or Dennaton Games. This software is in no way official.
Package: hlm-texts
hlm-textsHlm at your fingertipsThis repo currently just has340-脂砚斋重批红楼梦.txt: hlm_zhdavid-hawks-the-story-of-the-stone.txt: hlm_enyang-hlm.txt: hlm_en1joly-hlm.txt: hlm_en2It may be expanded to other versions. If you wish to have one particular version included, make apull request(fork, upload files and click the pull request button) or provide a text file to me.Special Dependencieshlm_textsdepends on polyglot that in turn depends onlibicuTo installlibicuFor Linux/OSXE.g.Ubuntu:sudo apt install libicu-devCentos:yum install libicuOSX:brew install icu4cThen usepoetryorpipto installPyICU pycld2 Morfessor, e.g.pipinstallPyICUpycld2MorfessororpoetryaddPyICUpycld2MorfessorFor WindowsDownload and install thepyicuandpycld2(possibly alsoMorfessor) whl packages for your OS/Python version fromhttps://www.lfd.uci.edu/~gohlke/pythonlibs/#pyicuandhttps://www.lfd.uci.edu/~gohlke/pythonlibs/#pycld2(possibly also Morfessorhttps://www.lfd.uci.edu/~gohlke/pythonlibs/)Installationpipinstallhlm-texts# pip install hlm-texts -U  # to upgrade to the newest versionor install the newest versionpip install git+https://github.com/ffreemt/hlm-textsor git clone the repo and install from the sourcegitclonecdhlm-texts
pipinstall-rrequirements.textUsageTexts from various editionsfromhlm_textsimporthlm_en,hlm_zh,hlm_en1,hlm_en2hlm_zh: 340-脂砚斋重批红楼梦.txthlm_en: david-hawks-the-story-of-the-stone.txthlm_en1: yang-hlm.txthlm_en2: joly-hlm.txtwith blank lines removed and paragraphs retaind.Sentence tokenizing:sent_tokenizerfor tokenizing text or list of texts into sentencesfromhlm_textsimportsent_tokenizer,hlm_enhlm_en_sents=sent_tokenizer(hlm_en,lang="en")Tokenizing long English texts for the first time can take a while (3-5 minutes for hlm_en, hlm_en1, hlm_en2). Subsequent operations are, however, instant sincesent_tokenizeris cached in~/joblib_cache(\Users\xyz\joblib_cacheforWindows 10`).Final NoteThe repo is for study purpose only. If you believe that your interests have been violated in any way, please let me know. I'll promptly follow it up with appropriate actions.
Package: hloenv
HloEnvHloEnvis an environment based on Accelerated Linear Algebra
(XLA) for deep learning compiler
optimization research. HloEnv transforms all graph rewrites into a
common representation, providing a flexible interface to control and
modify existing graph optimization passes. In this representation, an
XLA pass is converted into a set of sequential rewrite decisions.HloEnv has the following major features:The alternative graph representationHloEnv frames the graph optimization problem as a sequential
rewrite decision problem, serving as a single-player game engine.
Seealways_pick_firstanduniform_policyfor examples of interacting with
HloEnv and optimizing a HLO computation grpah.Python interface for full XLA optimization passes and pipelinesHloEnv provides a Python interface to control and modify existing
graph optimization passes. Seegeneral_fusion_pipelinefor
an example of our customized XLA optimization pipeline.The design of HloEnv points to a potential future where deep learning
compiler engineers only need to develop and maintain a simple set of
rewrite rules. The complicated heuristics are left to machine
learning-generated optimization strategies that generalize to both new
deep learning models and new deep learning hardware.CitationsHloEnv is described in details in the following paper:@inproceedings{HloEnv2022,author={Chin Yang Oh, Kunhao Zheng, Bingyi Kang, Xinyi Wan, Zhongwen Xu, Shuicheng Yan, Min Lin, Yangzihao Wang},title={HloEnv: A Graph Rewrite Environment for Deep Learning Compiler Optimization Research},booktitle={Workshop on ML for Systems at NeurIPS 2022},year={2022},series={NeurIPS '22},month=dec,}DocsThe full documentation for HloEnv can be found atthis link.Quick StartInstall the pre-built HloEnv wheel from PyPI:python3-mpipinstallhloenvTo run examples, you need to install the following dependencies in your python package:TensorFlow==2.9.0NumPyBuild HloEnvTo build HloEnv and evaluate HLO graph runtime, you need to install the following dependencies:Bazelliblapack-devCUDATo clone HloEnv and install Tensorflow, run the following command:gitclonegit@github.com:sail-sg/hloenv.gitcdhloenv
python-mvenvhloenv-envsourcehloenv-env/bin/activate
python3-mpipinstalltensorflow==2.9.0When met the minimum requirement, building HloEnv Python Wheels can be very simple.In the root directory of HloEnv, run the following command:makebuildWill build the wheels file and put it under the folderdist.makeinstallWill install the freshly built Python Wheels and all the dependencies.HLO DatasetYou can find the unoptimized HLO text files harvested from JAX implemented repositories on GitHubhere
Package: hlog
HashLogPrinciplesRecords are immutableRecords are orderedIt must be possible to checkhash(Xi)for anyihash(Xi)can be sent to anyone as a proofhash(Xi) == hash(X, hash(Xi-1))You do not need X to perform the checkInstallation$ pip install hlogUsageGetting started# create a chainc=Chain()# send some messagesc.append(message="Alice gives 10.36 euros to Bob",amount=10.36,currency="EUR")c.append(message="Bob gives 2 dollars to Alice",amount=2,currency="USD")# you can loop through the chain recordsused_currencies=set(r.fields["currency"]forrinc.records)# call verify() to ensure records have not been modifiedc.verify()Raising an exception during validationc.verify(raise_on_error=True)Verify will raise aModifiedRecordException. It has 3 interesting attributes:index: the index in the chain where validation starts to failmessage: a user-friendly message to indicate the errorrecord: theRecordobject itselfDumpingc=Chain()c.append(message="hello")c.append(message="wonderful")c.append(message="world")rows=c.dump()rowsis atupleofbytes, each item being one record of the chain.Restoring from a dumpIf you want to reconstruct your chain based on a file or database records, you can useChain.from_dump()c=Chain()c.append(message="hello")c.append(message="wonderful")c.append(message="world")d=c.dump()c2=Chain.from_dump(d)c2.verify()
Package: hlp
hlpGet Python help from the command-line.Setuppip install hlpTo enable autocompletion, put the following in your shell's init script:eval "$(hlp --autocomplete-init=bash)"Usagehlp part [parts ...]Wherepartandpartscombined form a Python package, module, or class
name. When executed,hlpruns thehelp()built-in
function on the combined parts.For example:hlp http
hlp http.server
hlp http server
hlp http server SimpleHTTPRequestHandlerhlpautocompletes package, module, and class names.hlpprovides help for the Python environment it is executed under. To get
help for a different environment, install help into it. Only one user-level
install is supported. If more are required, it may be better to just usepath/to/python -m pydoc.FeaturesModule and class name autocompletion (in bash)A few less characters thanpython -m pydocDevelopmentTests/LintersInstallnoxand run it in the root of the
repository.ReleaseIdentify commit to promote artifacts for, it must have a successful build
with artifacts pushed to S3.Locally tag commit with annotated tag.Push tag to repo.Create PR to bump version.
Package: hlpl
Human Life Programming Language (HLPL)HLPL is a programming language for human life, it is composed from seven sofwtare:Composer:composes textstemplater:templates texts\transcriber:transcribes textspress:designes web sitescharacter:simulates human lifephotographer:simulates naturegraphics:makes graphics (movies, anime, games ...)InstallationThis package can be installed fromPyPiby running:pip install hlplCommands lineSome line commands in HLPL:hlpl
hlpl version
hlpl composer
hlpl templater
hlpl transcriber
hlpl press
hlpl character
hlpl photographer
hlpl graphicsResourcesHLPL comes with resources utility databases. These resources can be found at:hlpl-resource.Siteofficial site:HLPLdocumentation:documentationContributions are welcome! Please github a pull request..Development pattern for contributorsCreate a forkof
themain hlpl_transcriber repositoryon GitHub.Make your changes in a branch named something different frommaster, e.g. create
a new branchmy-pull-request.Create a pull request.LicenseHLPL is licensed under theMIT license.
Package: hlre
hlreInteractivelyhighlightregular expression matches.What?A TUI application that shows the matches of a (python-flavored) regular
expression as you type it.Why?I really like usingRegExr, but it uses the javascript
regex engine and there are some subtle differences between the results there and
what you get with python.Installationpython3 -m pip install hlreUsageTLDRRunhlre -f nginx.logType a regex and see the matches highlighted innginx.log.PressControl-Cto exit.Input SourcesYou can either highlight matches with the built-in example text, a string passed
on the command line, or in an external file.Built-in Demo Texthlre --demo-textStringhlre --text 'This is the regular expression subject.'External Filehlre --file nginx.logReading in the whole file can slow this tool down quite a bit, so you probably
want to do something like:hlre --file <(head -n 10 nginx.log)To look at just the first 10 lines.Highlighting All MatchesBy default, each line is treated as a seperate subject to match the regex on.To highlightallmatches in the subject, use the-aflag:hlre --demo-text -a
# OR
hlre --file nginx.log --allThis usesre.finditerand there.MULTILINEflag under the hood.Customizing Highlight Styleshlreuses prompt toolkit's HTML functionality, so any tag name that works
there should work here. This tool does not currently support any custom
attributes on tags (e.gstyle="...").Here are some examples:Underline the entire match, highlight capture groups in a dark redhlre --demo-text --highlight-style u --group-highlight-style firebrickHighlight the entire match in green, bold the capture groupshlre --demo-text -s green -g bItalicize the entire match, highlight capture groups in cyanhlre --demo-text -s i -g cyan
Package: hls2dash
DescriptionThis is an open source video streaming packager and toolkit to rewrap
live HLS streams to live MPEG DASH streams.FeaturesGenerate single period MPEG DASH for live based on an HLS live streamGenerate multi period MPEG DASH for live based on an HLS live stream
with SCTE35 splicingRewrap MPEG2 TS segment to fragmented MP4UsageInstallInstallation from Python package index:pip install hls2dashInstallation from source:python setup.py installRunningGenerate Single period MPEG DASH:hls-to-dash http://example.com/master.m3u8 > stream.mpdGenerate Multi period MPEG DASH:hls-to-dash http://example.com/master.m3u8 --multi > stream.mpdRewrap MPEG2 TS segment to fragmented MP4ts-to-fmp4 master2500_19274.ts 2500_19274.dashor when TS segment is on a remote serverts-to-fmp4 http://example.com/master2500_19274.ts 2500_19274.dashHelphls-to-dashusage: hls-to-dash [-h] [--multi] [--ctx CTX] [--ctxdir CTXDIR] [--debug]
                   PLAYLIST

Generate single and multi period MPEG DASH manifest from a live HLS source.
Writes MPEG DASH manifest to stdout.

Currently assumes that HLS variant is named as 'master[PROFILE].m3u8'
  master2500.m3u8, master1500.m3u8
and that the segments are named as 'master[PROFILE]_[SEGNO].ts'
  master2500_34202.ts, master1500_34202.ts

positional arguments:
  PLAYLIST         Path to HLS playlist file. Can be a URI or local file.

optional arguments:
  -h, --help       show this help message and exit
  --multi          Generate multi period MPEG DASH on EXT-X-CUE markers in HLS
  --ctx CTX        Name of DASH session file
  --ctxdir CTXDIR  Where to store DASH session file. Defaults to /tmp/
  --debug          Write debug info to stderrts-to-fmp4usage: ts-to-fmp4 [-h] [--outdir OUTDIR] [--debug] TSFILE OUTPUT

Rewrap a MPEG2 TS segment to a fragmented MP4

positional arguments:
  TSFILE           Path to TS file. Can be a URI or local file.
  OUTPUT           Output file name

optional arguments:
  -h, --help       show this help message and exit
  --outdir OUTDIR  Directory where the fragmented MP4 will be stored. Default is current directory
  --debug          Write debug info to stderr
Package: hlsclient
This is a simple PythonHTTP Live Streaming Client. It consumes a
list of remote playlists, and saves all needed files to serve the
playlist locally: the key, segments, and a modifiedm3u8with paths
normalized.It also supports backups, i.e., if the same playlist is available on
more than one server, it will track each server status and will switch
to the backup if needed.Through theconfig.iniit’s possible to customize where the files
will be saved and what is the URL that provides servers info via JSON.The JSON must be something like:{
    "streams": [
        "nasa": {
            "input-path": "/msfc/Edge.m3u8",
            servers: [
                "http://liveips.nasa.gov.edgesuite.net"
            ]
        }
    ]
}Variant Playlist Generationhlslcientcan consume multiple playlists and generate a variant playlists grouping then.To do so, include abandwidthfor each stream and add an action to combine them in the JSON:{
    "streams": {
        "Nasa-low": {
            "input-path": "/msfc/Edge.m3u8",
            "servers": ["http://liveips.nasa.gov.edgesuite.net"],
            "bandwidth": 254082
        },
        "Nasa-medium": {
            "input-path": "/msfc/3G.m3u8",
            "servers": ["http://liveips.nasa.gov.edgesuite.net"],
            "bandwidth": 460658
        },
        "Nasa-high": {
            "input-path": "/msfc/Wifi.m3u8",
            "servers": ["http://liveips.nasa.gov.edgesuite.net"],
            "bandwidth": 1080434
        }
    },

    "actions": [
        {
            "type": "combine",
            "input": ["Nasa-low", "Nasa-medium", "Nasa-high"],
            "output": "/msfc/nasa_mbr.m3u8"
        }
    ]
}Transcodinghlsclientis also able to create an audio only track from a video stream using FFMPEG.To do so, add atranscodeaction an include the new stream on a combine action:"actions": [
    {
        "type": "combine",
        "input": ["Nasa-audio-only", "Nasa-low", "Nasa-medium", "Nasa-high"],
        "output": "/msfc/nasa_mbr.m3u8"
    },
    {
        "type": "transcode",
        "input": "Nasa-low",
        "output": {
            "audio": {
                "Nasa-audio-only": {
                    "path": "Nasa-audio-only.m3u8",
                    "audio-bitrate": 64000,
                    "bitrate": 65000
                }
            }
        }
    }
]EncryptionIf you setencryption=truein the config file,hlsclientwill
automatically encrypt all streams with a random AES-128 cipher.RunningTo run the client, simply run:$ python -m hlsclientRunning testsYou will need ffmpeg and mediainfo installed.$ ./runtestsFFmpeg InstallationIn order to use the current version of hlsclient with transcoding support,
you must have ffmpeg installed with libaac and libx264. Download them and
compile FFfmpeg like this:libaac:./configure && make && sudo make installlibx264:./configure --enable-shared && make && sudo make installFFmpeg:./configure --enable-libx264 --enable-gpl --enable-libfaac --enable-nonfree --enable-shared && make && sudo make installThe tested versions were:libaac: faac-1.28libx264: x264-snapshot-20121030-2245FFmpeg: N-46213-g976175f
Package: hlsdownload
# Description
This package contains a script that with the help of ffmpeg download segments in an
HLS stream and convert and concatenate the video segments to MP4 files. HLS with
discontinuities are supported.# Installationpip install hlsdownload# Usagehls-downloader “http://example.com/event/master.m3u8?t=2016-11-21T10:35:00Z-2016-11-21T10:45:00Z” outfile# Contribution
We welcome contributions to this project. Just follow the normal procedures by forking
this repository, create a topic branch for your fix and then submit a pull request.# License
See LICENSE for details
Package: hls-edit-file
OverviewThis project support for manage edit video hls (*.m3u8).
When you need processing VOD with file type HLS. Sometime you want cut video, merge 2 hls video, or insert ad hls into main vod hls. This is lightweight library support you.Road mapCut video HLS[] Merge 2 HLS video[] Insert HLS into HLS (Like AD video insert)[] Testing[] Support Python3DocumentationInstallationReferenceHLS specification:https://tools.ietf.org/html/rfc8216LICENSEThe MIT License (MIT)Copyright © 2019Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.