Saravanan666/pypi-org huggingface dataset:
Package: hkmeans-minibatch
Hierarchical Minibatch KmeansAn implementation of hierarchical kmeans that uses mini-batches for
increased efficiency for large datasets.Installpip3 install hkmeans-minibatchUsage$ python3 -m hkmeans_minibatch -h
usage: __main__.py [-h] -r ROOT_FEATURE_PATH -p FEATURES_PREFIX [-b BATCH_SIZE] -s SAVE_DIR -c CENTROID_DIR -hr HIERARCHIES -k CLUSTERS [-e EPOCHS]
optional arguments:
  -h, --help            show this help message and exit
  -r ROOT_FEATURE_PATH, --root-feature_path ROOT_FEATURE_PATH
                        path to folder containing all the feature files
  -p FEATURES_PREFIX, --features-prefix FEATURES_PREFIX
                        prefix that contains the desired files to read
  -b BATCH_SIZE, --batch-size BATCH_SIZE
                        batch_size to use for the minibatch kmeans
  -s SAVE_DIR, --save-dir SAVE_DIR
                        save directory for sorted hierarchical kmeans vectors
  -c CENTROID_DIR, --centroid-dir CENTROID_DIR
                        directory to save the centroids in
  -hr HIERARCHIES, --hierarchies HIERARCHIES
                        number of hierarchies to run the kmeans on
  -k CLUSTERS, --clusters CLUSTERS
                        number of clusters for each part of the hierarchy
  -e EPOCHS, --epochs EPOCHS
                        number of epochs to run the kmeans for each hierarchyHave the .npy files all in one root feature directory to do kmeans over (they can be in
subdirectories). For optimal results have the batch size be larger than the number of
vectors in each .npy file. The features prefix is the common prefix of
the .npy files to kmeans over. The save directory should be an empty
directory, which the program will fill with sorted vectors and delete
after it is finished. The centroid directory should be an empty
directory where all the centroids will be stored. Note that the
centroids will be stored in separate files in the centroid directory.
Package: hko
python-hkoA python warpper for retrieving Hong Kong SAR local weather from Hong Kong Observatory Open Data API.
Please refer to the Official Documentation for request parameters and response details.Official API DocumentationReferenceHKO Modulehko.HKO(session)Manage and perform requests
Return: hko.HKO classParameterOptional (default value)TypeDescriptionsessionnoClientSessionseeaiohttphko.HKO.weather(dataType, lang)Retrieve weather data from Weather Information API
Return: dictionaryParameterOptional (default value)TypeDescriptiondataTypenostringtype of data requestedlangyes (en)stringlanguage used in responsehko.HKO.earthquake(dataType, lang)Retrieve weather data from Earthquake Information API
Return: dictionaryParameterOptional (default value)TypeDescriptiondataTypenostringtype of data requestedlangyes (en)stringlanguage used in responsehko.HKO.openData(dataType, lang)Retrieve weather data from Earthquake Information API
Return: dictionaryParameterOptional (default value)TypeDescriptiondataTypenostringtype of data requestedlangyes (en)stringlanguage used in responsestation-stringrefer toOfficial API Documentationyear-stringrefer toOfficial API Documentationmonth-stringrefer toOfficial API Documentationday-stringrefer toOfficial API Documentationhour-stringrefer toOfficial API DocumentationUsage ExampleGet and print local weather forcast general situation in EnglishfromhkoimportHKO,HKOErrorimportasynciofromaiohttpimportClientSessionfromaiohttpimportClientConnectorErrorasyncdefmain():asyncwithClientSession()assession:try:hko=HKO(session)fnd=awaithko.weather(dataType="fnd")print(fnd["generalSituation"])exceptHKOErroraserror:print(error)asyncio.run(main())
Package: hkobservatory
[![Build Status](https://travis-ci.org/ttoleung/hkobservatory.svg?branch=master)](https://travis-ci.org/ttoleung/hkobservatory)# hkobservatory
Return a weather object based on weather reported by HK Observatory# Installation
We recommend installation using pip
~~~
pip install hkobservatory
~~~# Quick Start Guide
~~~python
import hkobservatorymy_weather = hkobservatory.weather()
print (“The weather today is %s” % my_weather.condition())
~~~produce the following result:~~~
The weather today is light shower
~~~
Package: hkp4py
hkp4pyA Library to get GPG/PGP keys from a Keyserver.
This library uses the requests module to get the keys.Tested Python VersionsPython 2.72.7.15Python 33.7Intstall viaAURInstall viaPyPIpipinstallhkp4py

pip3installhkp4pyKeyServerThis object represents a keyserver using the hkp protocol.InitializeInitialize the KeyServer object.# python2and3 compliancefrom__future__importabsolute_import,unicode_literals,print_functionfromhkp4pyimportKeyServerserver=KeyServer("hkps://pgp.ext.selfnet.de")HKPS support via following pool.The hkps pool is also supported.hkps://hkps.pool.sks-keyservers.netAddAdd keys to a keyserver.key="a long key"server.add(key)SearchFind keys with the keyserver object.keys=server.search('@gnupg.org')# search by stringkeys=server.search('0x{}'.format('6F4B4E15768C8C4E'),exact=True)#search by fingerprintKey Objectforkeyinkeys:# Key Basic Informationprint("Key Algorithm:\t{}".format(key.algo))print("Key fpr:\t{}".format(key.keyid))print("Key Length:\t{}".format(key.key_length))print("Disabled?\t{}".format('yes'ifkey.disabledelse'no'))print("Expired?\t{}".format('yes'ifkey.expiredelse'no'))print("Revoked?\t{}".format('yes'ifkey.revokedelse'no'))print("From Host:\t{}".format(key.host))print("From Port:\t{}".format(key.port))print("Date Created:\t{}".format(key.creation_date))print("Date Expired:\t{}".format(key.expiration_date))print(key.key)print(key.key_blob)Identity Objectforidentityinkey.identities:print("Identity:\t{}".format(identity.uid))print("\tDisabled?\t{}".format('yes'ifidentity.disabledelse'no'))print("\tExpired?\t{}".format('yes'ifidentity.expiredelse'no'))print("\tRevoked?\t{}".format('yes'ifidentity.revokedelse'no'))print("\tDate Created:\t{}".format(identity.creation_date))print("\tDate Expired:\t{}".format(identity.expiration_date))More Advanced optionsTo set a different User-Agent and proxies for veiling purposes.
The KeyServer has the following additional options for the connection.server=KeyServer("hkps://pgp.ext.selfnet.de",proxies={"http":"socks5h://localhost:5050","https":"socks5h://localhost:5050"},headers={"User-Agent":"Testing"})Import key with gpgme python bindingsfrom__future__importabsolute_import,unicode_literalsimportgpgresult=gpg.Context().key_import(key.key_blob)
Package: hkpkg
demo_pkgA reference for making python packages and uploading them on PyPIFollow the above directory structure and enter the commands:For Windows:py -m pip install --upgrade build
py -m buildFor Unix/MacOS:python3-mpipinstall--upgradebuild
python3-mbuildHow to upload package on PyPI?For Windows:py -m pip install --upgrade twine
py -m twine upload dist/*For Unix/MacOS:python3-mpipinstall--upgradetwine
python3-mtwineuploaddist/*
Package: hkscs-unicode-converter
hkscs-unicode-converterhkscs-unicode-converteris a utility for converting HKSCS characters assigned to Private Use Areas of Unicode to their equivalents in Unicode 4.1 onwards. Inspired by thenpm moduleof the same name.>>>fromhkscs_unicode_converterimportconverter>>>converter.convert_string("亂廿四")# Convert an entire string'亂噏廿四'>>>converter.convert_char("")# Convert a single character'嘅'>>>converter.convert_char(chr(0xE7D4))# Convert from codepoint'啱'>>>converter.convert_char("\uE7D4")# Convert from Unicode literal'啱'>>>hex(ord(converter.convert_char(chr(0xE7D4))))# Get corresponding codepoint'0x5571'Installinghkscs-unicode-converter isavailable on PyPIand officially supports Python 3.7+:$python3-mpipinstallhkscs-unicode-converterTestsTests are located in the hkscs_unicode_converter submodule. Testing usestoxto automate environment management and the built-inunittestframework to run tests.$toxStyle GuideRunblackbefore committing to master!
Package: hks-pynetwork
hks_pynetworkA Python library is built to communicate between objects in internal or external programs.How to buildOur library is only supported by Python >=3.7.1. Now we test it only on Python 3.7.1. If you meet any problems, even if with other versions, you couldcreate an issueto notify us. We will solve them as quickly as possible.Create Virtual Environment (optional but IMPORTANT)If you had your virtual environment, you can ignore this step.You ought to create a virtual environment to avoid conflicting with other applications on your machine when installing our module. The virtual environment must be installed withPython 3.I highly recommend you to useAnacondabecause of its utilities. The command of creating a virtual environment in Anaconda is:$condacreate-nyour_venv_name
$condaactivateyour_venv_name(your_venv_name)$_Or usePython venv:$python-mvenvpath/to/your/venv
$path/to/your/venv/Scripts/activate.bat(your_venv_name)$_Method 1: Install the stablest version (PyPI)(your_venv_name)$pipinstallhks_pynetworkMethod 2: Install the newest version (Github)(your_venv_name)$gitclonehttps://github.com/huykingsofm/hks_pynetwork.git(your_venv_name)$cdhks_pynetwork(your_venv_name)hks_pynetwork$pipinstall-e.How to useJust useimportstatement and enjoy it. We will write documentation and tutorials as soon as possible so that you can understand our library easier.fromhks_pynetworkimportinternalfromhks_pynetworkimportexternalChange logVersion 0.0.5Modify error catching inexternalmodule.Change packet dependencies.Version 0.0.4Change .gitignore to Python template.Synchronize withhks_pylibversion 0.0.6.Fix typo.Change many error type and replace some of them tohkserror.Future work:Fix the error when a packet with invalid header (invalid or spoof size field).ChangeChannelBufferandPacketBufferto new style.Version 0.0.3Updatehks_pylibto 0.0.5.Change the name of some methods in modulespacketandsecure_packet.Add highly identified exceptions in modulehks_pynetwork.errors.Beautify code.Fix some errors.
Package: hksync
HKsyncHKsync, short for Hyperkitty-Sync is a simple client to download archives for
public mailing lists fromHyperkittyto a localMaildirto read with
your favorite email client.You don't have to be subscribed to the MailingList to download the
archives. Since we just download public MailingLists, there is no need for
any sort of authentication. We use Hyperkitty's export API to download emails
as mbox and then populate a local Maildir.WARNING: This is currently in alpha stage, although it has been tested by the
author to work for simple situations.InstallRight now, HKsync is in a alpha stage. To download and use, you need to
download it from git repo. Here are the instructions:# Clone the git repo.$gitclonehttps://gitlab.com/mailman/hksync# Create a virtualenv and install dependencies.$python3-mvenvhksync# Download the dependencies.$sourcehksync/bin/activate
$pythonsetup.pyinstallUsageHKsync let's you add various MailingLists and then sync from each of them using
a single command, which can be used as a periodic cron job. It does not provide
any mechanism to run periodically since there are several other tools already
available to run commands periodically like Cron or Systemd.To add a new MailingList:$hksyncadd--serverhttps://myserver.com/hyperkitty--mlistmylist@myserver.comYou can list all the currently added MailingLists's using:$hksynclistYou can remove a MailingList using:$hksyncremovemylist@myserver.comFinally, you can sync your emails using:$hksyncsyncThis will sync emails for past 1 day only. Optionally, you can provide a--days nparameter to sync pastndays of emails for each list.You can also pass--mlist mylist@myserver.comto sync emails for only one
server instead of all.Reading EmailsYou can use your favorite Email client to read these emails since we use a
standardMaildirformat which most clients support.muttThis is a sample configuration to read emails inmutt, which is a popular
command line email client:# ~/.muttrc
set mbox_type=Maildir
set folder="~/hksync"
set mbox="~/hksync"
set spoolfile="~/hksync"After this, you can just runmuttin your terminal to read the Emails from
MailingLists that you downloaded.If you don't want to alter the configuration, you can just run:$ mutt -f ~/hksync
Package: hktestpack
It is a test module which build by HeKai, it test the python module that can install by pip and
use in py2.7 and py3.5.Introductionimport testpack as pu
pu.testpy(1,2)
pu.testpy('Python','is an intersting tool!')SupportsTested on Python 2.7, 3.5, 3.6pip install testpackDownload:https://pypi.python.org/pypi/testpackDocumentation:https://pypi.python.org/pypi/testpack
Package: hktkzyx-toolbox
hktkzyx toolbox 文档Official Website| @hktkzyx/hktkzyx-toolboxhktkzyx toolbox 是 hktkzyx 的一个工具箱应用。
目前该工具箱主要采用命令行接口，具有一下功能：养老保险计算计算城镇居民养老保险的预期待遇LED 分压电阻、电流计算计算 LED 的分压电阻大小标准电阻查询根据电阻值查询标准电阻安装pipinstallhktkzyx-toolbox使用查询金融工具箱的命令和用法hktkzyx-finance--help查询电子工具箱的命令和用法hktkzyx-electronics--help如何贡献十分欢迎 Fork 本项目！
欢迎修复 bug 或开发新功能。
开发时请遵循以下步骤:使用poetry作为依赖管理克隆项目后，在项目文件夹运行poetryinstall使用pre-commit并遵守Conventional commits规范安装 pre-commit 并运行pre-commitinstall-tpre-commit-tcommit-msg建议使用commitizen提交您的 commits。建议遵循gitflow分支管理策略安装git-flow管理您的分支并运行gitconfiggitflow.branch.mastermain
gitconfiggitflow.prefix.versiontagv
gitflowinit-dPR 代码到 develop 分支*[PR]: Pull request许可证Copyright (c) 2022 Brooks YUAN.Environment Sensor Bluetooth firmware is licensed under Mulan PSL v2.You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:http://license.coscl.org.cn/MulanPSL2.THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.See the Mulan PSL v2 for more details.
Package: hktvtrack
Fung PUBLIC LICENSE
Version 3, 19 November 2019Example:from hktvtrack import trackprint(track.getProductStatus('H0888001_S_P10021200'))Result [JSON]:{"name": "可口可樂 - [原箱] 罐裝可口可樂汽水", "isBuy": true}Copyright (C) 2019 Fung Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Package: hkube.debbuging-python-api
HKUBE local python apiapi implementation for running and debugging Hkube`s pipeline without installing Hkubeprerequisiteinstall hkubectl# Check release page for latest versionos="linux/macos/windows"curl-Lohkubectlhttps://github.com/kube-HPC/hkubectl/releases/latest/download/hkubectl-{linux/macos/windows}\&&chmod+xhkubectl\&&sudomvhkubectl/usr/local/bin/runpip install hkube.debbuging-python-apiusageimportasynciofromhkube_debbuging_python_api.builderimportBuilderdeftest1(data):print(data['input'])returndata['input']classrunBuilder():asyncdefrun():build=Builder()pipe=awaitbuild.createPipeline("test")pipe.algorithm("test").input(5).add(test1).algorithm('test2').input("@test").input(8).add(test1).algorithm("test5").input("@test2").add(test2).flowInput().input({"david":5}).add().execute()bla=asyncio.run(runBuilder.run())print('finish')
Package: hkube-notebook
hkube_notebookThis python3 library for Jupyter Notebook enables to integrate with hkube system:Algorithms: add (including image built), list and delete algorithms.Pipelines: Create and store pipelines, get stored pipelines, etc.Execution: execute pipeline, track execution status by a progress bar, get the results, etc.
Algorithm could be built and added to Hkube in 3 methods:Function/s: pass your algorithm function/s (only 'start' function is must) - requirements.txt is created automatically.Algorithm folder: pass your algorithm code folder - requirements.txt is expected.Github: pass algorithm project github url - requirements.txt is expected.Intructions for DeveloperDownload the hkube projecthkube_notebookMake sure you have python3 and Jupyter Notebook installed (Anaconda is recommended)Make sure python3 is in your pathUpdate pip3 and install dependecies:$python3-mpipinstall--upgradepip
$python3-mpipinstallpipreqs
$python3-mpipinstallflask=0.12.2
$python3-mpipinstalltqdm=4.28.1Better work with a virtual env (in that case install required packages also in your virtual env)Install the library using the following shell commands (notice that library version is taken from setup.py):$cdhkube_notebook
$python3setup.pydevelop
$# make sure hkube_notebook is installed$python3-mpiplist|grephkubeRun Jupyter Notebook server, open a new python session, import the library and start workimporthkube_notebookExample and test notebook for pipeline build, store, execute and track:hkube_notebook.ipynbDS pipeline example notebook, including algorithms build and end-to-end DS pipeline: preprocess + split data + train batch + find best model, train and dump it:DS Example Pipeline.ipynbTested: Python 3.6.8 from AnacondaUpload package to python registrySee:https://packaging.python.org/tutorials/packaging-projects/Install/update tools:$python3-mpipinstall--user--upgradesetuptoolswheel
$python3-mpipinstall--user--upgradetwineCreate account for python test registry at:https://test.pypi.org/account/register/Create distribution and upload it to test registry:$# create a 'dist' diectory with whl and gz files:$python3setup.pysdistbdist_wheel
$# upload to python registry:$python3-mtwineupload--repository-url<url>dist/*
$# for python test registry use: <url>=https://test.pypi.org/legacy/$# Create account for python test registry at: https://test.pypi.org/account/register/Install package in user python3 envIn user python environment:$python3-mpipinstall--index-url<url>hkube_notebook
$# for python test registry use: <url>=https://test.pypi.org/simple/$# now install missing dependency packages...
Package: hl
HL - a simple flexible fuzzy host search/executeHL (Host List) provides omni-box style query interface (inspired by next to any modern browser).
HL uses easy to understand weighted fuzzy-matching over hierarchical host lists. Things considered in full-text matching process are project name, env (prod, qa, dev, etc.), tags, ports and FQDN itself.Note that what defines project name, or environment, etc. is your own arbitrary convention and they all work the same in HL.
In reality, HL accepts any hierarchical classification with each level considered as a tag. Upper classification tags have proportionally more weight then any other below, this property is used to disambiguate fuzzy string matches.Installationpipinstall--userhlExampleImaginary config for simple project with API and DBs, having 2 environments - staging on AWS and production on bare metal in 2 DCs. Note that admins are funky and DB have their own unique and inconsistent names + different ports, that we want to classify properly our with tags.# our-project.yml:
---
prod:
    api:
        us-east-dc:
            hosts: api-[0-4]-east-prod.our-company.cloud
            ports:
                http: 8080
        us-west-dc:
            hosts: api-[0-4]-west-prod.our-company.cloud
            ports:
                http: 8080
    db:
        us-east-dc:
            # list of host patterns is acceptable
            hosts:
                - ricky-the-great.our-company.cloud
                - mikky-the-malicious.our-company.cloud
            ports:
                postgres: 5432
         us-east-dc:
            # list of different host entries as well
            - hosts: east-mcgram-db.our-company.cloud
              ports:
                postgres: 5432
            - hosts: east-paul-db.our-company.cloud
              ports:
                postgres: 6432
qa:
    aws:
        api:
            hosts: api-[0-4]-aws-staging.ec2.cloud
            ports:
                http: 8080
        db:
            hosts: db-aws-staging.ec2.cloud
            ports:
                postgres: 5432Enterhltool:hlawsAlgorithmAlgorithm is simple (subject to change) - first we traverse the graph of host patterns and consider each tag as a token inversly weighted by depth (the deeper, the less weight). Then we apply sensible tokenization of hostname (split by '-', '_' and '.'), each token gets minimal weight. The result is then merged tags and hostname tokens.Query is tokenized in the same way as hostnames. After that the two frequency dictionaries are multipled like sparse vectors, to minimize sharp effect of repeated words, weights in query is smoothed by sigmoid (this will likely change in the future).Next step is to use trigramms or similar to fix typos in query and still find closest token to match.
Package: hl7000
HL7000This library is made to help consolidate measurements from the SebaKMT HL7000 acoustic logger.The goal is to centralize the data into measurement folders, provide an index for your measurement folders and to prevent duplicate records being saved.Installpip install HL7000UsageThe format will be a single depth folder structure, in which each folder name will be a uuid to prevent collision.An index file will be created after saving a measurement, and can be rebuilt/saved usingsave_index()All files will be copied from the source folder (likely off the HL7000) to the target folder when saving.Single Measurement usageTo read and process a single measurementfrom HL7000 import Measurement

measurement = Measurement('/path/to/measurement')

# view dataframe
measurement.data

#save to folder
measurement.save_measurement('/path/to/save/folder')Multiple Measurement usageTo save multiple items, simply pass the source folder and target foldersfrom HL7000 import load_folder

load_folder('/path/to/source/folder', '/path/to/target/folder')Rebuilding indexIndex can be rebuilt for a folder if any error or deletion occursfrom HL7000 import save_index

save_index('/path/to/folder')Import Folder from command linepython -m HL7000 /path/to/source/folder /path/to/target/folderFuture PlansCompanion GIS library for processing GIS dataVisulization ComponentsFFT of each measurementsTime series of each measurementOverlays of multiple measurements
Package: hl7apy
HL7apy is a lightweight Python package to intuitively handleHL7v2 messages according to HL7 specifications.The main features includes:Message parsingMessage creationMessage validation following the HL7 xsd specificationsAccess to elements by name, long name or positionSupport to all simple and complex datatypesEncoding chars customizationMessage encoding in ER7 format and compliant with MLLP protocol
Package: hl7conv2
AboutThis is a python library written in Rust.Scopeconvert hl7 medical format to jsonconvert json to hl7 medical format (TODO)How to installpip install hl7conv2ExamplesLoad hl7 from file and convert to jsonfrom hl7conv2 import Hl7Json

hl7_obj = Hl7Json.from_file("src/hl7_example.txt")
hl7_in_json_format = hl7_obj.hl7_json
print(hl7_in_json_format)Load hl7 from string and convert to jsonfrom hl7conv2 import Hl7Json

hl7_string = """hl7 data in tripple brackets"""

hl7_obj = Hl7Json(hl7_string)
hl7_in_json_format = hl7_obj.hl7_json
print(hl7_in_json_format)Access string hl7 datafrom hl7conv2 import Hl7Json

hl7_obj = Hl7Json.from_file("src/hl7_example.txt")
print(hl7_obj.hl7_string)
Package: hl7-conversion
HL7 to JSON Format ConverterA Python package to convert HL7 v2 messages to JSON format.Installation from sourceExtracthl7-conversion-{tag}.tar.gzfile in your working directory.Change directory to project root:cd hl7-conversionCreate and activate python virtual env:python3.8 -m venv .venv
source .venv/bin/activate
pip install --upgrade pipInstall hl7-conversion package:pip install -e .CLI usageType--helpafter commands to see full list of options$ hl7 --help
Usage: hl7 [OPTIONS] COMMAND [ARGS]...

  HL7 to JSON format converter

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  tojson  Convert given HL7 message to JSON format$ hl7 tojson --help
Usage: hl7 tojson [OPTIONS] INPUT

  Convert given HL7 message to JSON format

Options:
  -o, --output FILENAME  Output file path
  --help                 Show this message and exit.Example:hl7 tojson input.txt -o output.txtIn this example, the command will try to read the input HL7 message from input.txt file and write the converted JSON output to output.txt file.Programmatic usageHL7ClientHL7Client.hl7tojsonconvertArguments:message (str): Given HL7 message in string format.Seetests/test_clientfor usage examples.