Saravanan666/pypi-org huggingface dataset:
Package: hadamard-transform
hadamard-transformA Fast Walsh–Hadamard Transform (FWHT) implementation in PyTorch.InstallationInstall this library usingpip:pip install hadamard-transformUsageFor the Basic normalized fast Walsh–Hadamard transform, use:importtorchfromhadamard_transformimporthadamard_transformx=torch.rand(2**10,dtype=torch.float64)y=hadamard_transform(x)asserttorch.allclose(hadamard_transform(y),x)Since the transform is not numerically-stable, it is recommended to usefloat64when possible.The input is either a vector or a batch of vectors where the first dimension is the batch dimension.Each vector's length
is expected to be a power of 2!This package also includes apad_to_power_of_2util, which appends zeros up to the next power of 2 if needed.In some common cases, we use the randomized Hadamard transform, which randomly flips the axes:importtorchfromhadamard_transformimportrandomized_hadamard_transform,inverse_randomized_hadamard_transformprng=torch.Generator(device='cpu')x=torch.rand(2**10,dtype=torch.float64)seed=prng.seed()y=randomized_hadamard_transform(x,prng),asserttorch.allclose(inverse_randomized_hadamard_transform(y,prng.manual_seed(seed)),x)This package also includeshadamard_transform_,randomized_hadamard_transform_, andinverse_randomized_hadamard_transform_. These are in-place implementations of the previous methods. They can be useful when approaching memory limits.See additional usage examples intests/test_hadamard_transform.py.DevelopmentTo contribute to this library, first checkout the code. Then create a new virtual environment:cd hadamard-transform
python -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e ".[test]"To run the tests:pytest
Package: hadapi
HAD API Service Python project=======================COMMANDS:sudo python setup.py registersudo python setup.py sdistsudo python setup.py sdist uploadrepo at: https://pypi.python.org/pypiuser:  shestakpass: Njit2003!----This is the README file for the project.The file should use UTF-8 encoding and be written using ReStructured Text. Itwill be used to generate the project webpage on PyPI and will be displayed asthe project homepage on common code-hosting services, and should be written forthat purpose.Typical contents for this file would include an overview of the project, basicusage examples, etc. Generally, including the project changelog in here is nota good idea, although a simple "What's New" section for the most recent versionmay be appropriate.
Package: hadar
HadarHadar is a adequacy python library for deterministic and stochastic computationAdequacy problemBasicEach kind of network has a needs of adequacy. On one side, some network nodes need to consume
items such as watt, litter, package. And other side, some network nodes produce items.
Applying adequacy on network, is tring to find the best available exchanges to avoid any lack at the best cost.For example, a electric grid can have some nodes wich produce too more power and some nodes which produce not enough power.Complexity comes soonAbove example is simple, but problem become very tricky with 10, 20 or 500 nodes !Moreover all have a price ! Node can have many type of production, and each kind of production has its unit cost. Node can have also many consumptions with specific unavailability cost. Links between node have also max capacity and cost.Network adequacy is not simple.HadarHadar computes adequacy from simple to complex network. For example, to compute above network, just few lines need:importhadarashdstudy=hd.Study(horizon=3)\.network()\.node('a')\.consumption(cost=10**6,quantity=[20,20,20],name='load')\.production(cost=10,quantity=[30,20,10],name='prod')\.node('b')\.consumption(cost=10**6,quantity=[20,20,20],name='load')\.production(cost=10,quantity=[10,20,30],name='prod')\.link(src='a',dest='b',quantity=[10,10,10],cost=2)\.link(src='b',dest='a',quantity=[10,10,10],cost=2)\.build()optimizer=hd.LPOptimizer()res=optimizer.solve(study)And few more lines to display graphics results.plot=hd.HTMLPlotting(agg=hd.ResultAnalyzer(study,res),node_coord={'a':[2.33,48.86],'b':[4.38,50.83]})plot.network().node('a').stack()plot.network().map(t=0,zoom=2.5)Get more information and examples athttps://www.hadar-simulator.org/
Package: hadar-dashboard
jupyter-dashboardJupyter Dashboard repo provideshadar_dashboardpython package which is an one-line jupyter widget to display a little dashboard and navigate into Hadar results.Use itplottting=hd.HTMLPlotting(...)fromhadar_dashboardimportdashboarddashboard(plotting)Start exampleBy BinderBy yourselfpip install -r requirements.txt
export PYTHONPATH=$(pwd)
jupyter notebook example/Begin\ Stochastic.ipynb
Package: hadder
Hadder--专用蛋白质补氢工具很多蛋白质数据库往往会采用去掉氢原子的方式来存储各种pdb蛋白质结构文件，
这就要求我们在实际构建力场的过程中手动去补齐氢原子，
本开源工具就可以实现这样的功能。安装与使用本软件支持pip一键安装与更新：$python3-mpipinstallhadder--upgrade-ihttps://pypi.org/simple支持在python中调用API接口，来完成蛋白质补氢：fromhadderimportAddHydrogenAddHydrogen('input.pdb','output.pdb')如果成功运行，会在终端窗口上打印如下文字：1 H-Adding task with 3032 atoms complete in 0.116 seconds.在1.4以及之后的版本中，安装完成后，也支持直接使用命令行操作来补氢：$python3-mhadder-h
usage:__main__.py[-h][-iI][-oO]optionalarguments:-h,--helpshowthishelpmessageandexit-iISettheinputpdbfilepath.-oOSettheoutputpdbfilepath.$python3-mhadder-iinput.pdb-oouput.pdb# e.g. $ python3 -m hadder -i examples/case2.pdb -o examples/case2-complete.pdb1H-Addingtaskwith3032atomscompletein0.116seconds.不论是调用API接口的补氢，还是使用命令形式的补氢，都建议使用绝对路径来进行文件索引。如果在此处使用相对路径，会导致一些文件索引错误的问题。示例在examples路径下有一个case2.pdb的文件，这是一个不含氢原子的蛋白质，其结构如下图所示：使用Hadder完成补氢的操作之后，得到的结果如下图所示：代码贡献如果希望在本仓库贡献您的代码，为开源社区的用户提供更多的技术支持，请在按照如下操作确保代码符合PEP8规范之后，
再提交Pull Request进入审核阶段，审核结束后即可合并分支。安装Flake8Flake8是一个常用的代码规范检查工具，可以使用pip进行安装和管理。但是由于不同版本的Flake8检查出来的问题可能存在不一致的现象，
因此我们要求使用Flake8的3.8.4指定版本，安装方法如下：$python3-mpipinstallflake8==3.8.4使用Flake8进入到hadder/路径下，执行如下指令：$flake8如果返回的结果为空，即表明当前路径下的所有python文件符合相关的规范要求，可以提交PR进入审核阶段。博客推荐从Hadder看蛋白质分子中的加氢算法用脚本的形式运行Hadder蛋白质基础组成结构氨基酸分子结构和原子命名
Package: haddock-curses
Aren’t you bored of reading and writing the same error messages over and over again like “Wrong
argument!”, “End date must be after start date!” , “Division by zero!” etc. . With the haddock
package you will be able to spice them up a bit:“Wrong argument, dipsomaniac!”“End date must be after start date, whipper-snapper!”“Division by zero, interplanetary goat!”To do this, the method curse() of this package returns random curses fromCaptain
Haddock. At the moment it supports curses in
english (default), german and french.The sources for the curses are - en:http://www3.sympatico.ca/brooksdr/haddock/main.htm- de:https://weltenwandel.wordpress.com/2011/04/22/die-1w100-fluche-des-kapitan-haddock/ - fr:https://fr.wikipedia.org/wiki/Vocabulaire_du_capitaine_HaddockPull requests for other languages are welcome.Installationpip install haddock-cursesUsageimport haddock
>>> print(haddock.curse())
anthropophagus!You can use thetitle() methodfrom
Python standard library to capitalize your swears.>>> print(haddock.curse().title())
Brontosaurus!
>>> print(haddock.curse(lang="de").title())
Sie Logarithmus!
>>> print(haddock.curse(lang="fr").title())
Bande D'Ectoplasmes De Tonnerre De BrestYou can decorate existing exception message with curses.>>> try: 0/0
... except Exception as e: print(str(e) + ", " + haddock.curse() + "!")
...
division by zero, confounded rattletrap!!
Package: hades
Hades is an multithreaded asynchronous job processing class. It allows you to register different job types and associate processor functions or classes with those job types.Job processor function needs to expect job data as input. If a job processor is a class, it needs to have run() method that expects job data as input.Jobs are discovered by watching a folder on the file system for new files. If a file is correctly formated it is parsed and processed passing the parsed data to the registered processor.A file needs to be a json document with a ‘type’ key matching one of the registered job types.When the class is initialized it expects a path to the folder to watch. The folder needs to have three subfolders: ‘in’ for incoming jobs, ‘cur’ for storing successfully processed jobs (this can be disabled by passing save_successful=False to the class), and ‘err’ for storing failed jobs (this can be disabled by passing save_failed=False to the class).By default a pool of 5 processing threads will be started. This can be tuned by passing threads=N to the class.If a job processing fails, it will be reprocessed few more times as defined by retries attribute (default is 3). If this is not desired it can be disabled by passing retries=0 to the class.UsageThe usage is very simple. You need to define processors, initialize Hades with the path to the folder to watch, register processors with Hades and call start() method to start all the threads. By default Hades runs in interactive mode. If you want to run it in a daemon mode, just pass ‘daemon=True’ to the start() method.import hades

class Download:
    def run(self, task):
        print("Downloading page: {0}".format(task['url']))
        return True

def send_email(task):
    print("Email for: {0}".format(task['rcpt']))
    return True

if __name__ == '__main__':
    hades = hades.Hades('/tmp/jobs')
    hades.register({'email':    send_email})
    hades.register({'download': Download})
    hades.start(daemon=True)To send jobs, just deserialize a json object containing the data for your jobs and save them into the defined folder. Hades will pick it up from there.import json

email = {'type':    'email',
         'from':    'no@mail.com',
         'rcpt':    'test@example.com',
         'subject': 'Test email',
         'body':    'Hi there!'}

download = {'type': 'download',
            'url':  'http://www.miljan.org/',
            'file': '/tmp/miljan.org.html'}

json.dump(email, open("/tmp/jobs/in/email", "w"))
json.dump(download, open("/tmp/jobs/in/download", "w"))
Package: hades-core
Hades Botbinance/okx based, currently it can only support real time Tick/Bar/Order/Position live update and monitor. Inbot/strategies/sample, created a simple strategy, doing nothing but send notificationHow to start1. Setup Environmentpython-mvenvruntime
runtime\Scripts\activate
pipinstall-rrequirements.txt# if requirements.txt not workpip3installpython-okxwebsocketsrequestsbinance-futures-connectorpython-telegram-botpydantic2. Change Configurationcopyexample.confand rename toapp.conf, change parameter[binance]apiKey=apiKeysecretKey=secretKey[okx]apiKey=apiKeysecretKey=secretKeypassphrase=passphrasews_private=wss://wsaws.okx.com:8443/ws/v5/privatews_public=wss://wsaws.okx.com:8443/ws/v5/publicws_business=wss://wsaws.okx.com:8443/ws/v5/businessdomain=https://aws.okx.comuseServerTime=False# optional[dingding]token=tokenprefix=prefixperiod=8-23# optional[telegram]token=tokenperiod=8-23chat=chat
Package: hades-framework
HADES(HADES Asynchronous Discrete-Event Simulation)is a small, user friendly framework for creating simulations in python!Features🎲🤖Supports both Agent Based and Process Based models- how you model the entities in your simulation is up to you!⚡Async execution within a time-step- designed for working IO-bound workloads over the network (e.g. LLM APIs, db lookups, etc)📈Visualisation-websocketssupport to for building a custom frontend for your sim,matplotlibin a Jupyter notepad or simply outputting amermaiddiagram🏷️Pydantic style immutable events- give type hints and enforcement, making it clear what an event will contain📦Encapsulated simulated processes- processes or agents are encapsulated, keeping state manageable and making it possible to swap processes in and out😊User friendly- pattern matching on pydantic based events makes for an intuitive way to build simulations, while the separation of state helps avoid potential footguns!Installationpipinstallhades-frameworkUsageUsing the Hades Framework is as simple as creating your customProcesses andEvents, registering them in the simulation, and letting Hades take care of the rest.Here are some of the fun things you might do with it:Boids and Websockets- The classic Boids simulation with canvas and d3.js visualisation via websockets.Multi Agent LLM Storytelling-  Retelling the Odyssey with LLMs - demonstrates the highly IO bound stuff hades is good at. Some output:"He remembered the sea nymph who had helped him before and realized that having allies like her was crucial to his success.
He also continued to use his technological knowledge to stay ahead of Poseidon's wrath, utilizing his drone and sonar to navigate the waters safely."Battery charging station- to help compare what building a simulation looks withsimpyvshades
Package: hadloc
HaDLOCCommand line tool containing several utilities for HADLoC.HADLoC (Harvard Architecture Discrete Logic Computer) is an 8-bit computer I constructed, primarily out of 7400 series TTL integrated circuits.
It contains 32KB of ROM, which is preloaded with the machine code of the program to be executed.I also built a EEPROM writer to load machine code onto the ROM. Theserialports,loadandreadcommands are intended to interface with this circuitThis tool currently provides 5 commandsassemble: Assembles the provided assembly file and writes the assembled machine code into a binary file of the same nameread: Reads data from a connected EEPROMload: Loads the data in the given file onto a connected EEPROMserialports: Displays a list of the currently available serial portsemulator: Starts the emulator running the given binary file. In debug mode, instructions can be stepped through one by one, and register/memory contents are shownAt the moment, I have created an assembly language, with an assembler to convert it into machine language. Checkout the examples folder for examples of this. In the future I plan to create a virtual machine language, that compiles down to assembly, and also a higher level language that compiles down to the VM language. I have yet to name the high level language, but it will most likely be inspired by Kotlin. In the resources folder, you can see an example of the computer running the fib.bin file, which computes the fibonacci sequence and displays the next value each time an input is recievedFor more details about the languages and computer checkout the Specifications folder. At the moment it only contains the machine language specification, which provides a bit more detail about the computer and how to program it in raw binary machine code. I plan to create a specification for the computer architecture, which describes how it works, and I will also create specifications for the three languages I plan to create, assembly, the VM language, and the high level language.InstallationTODOUsageTypehadloc -hfor details on how to use the tool
Package: hadmlservices
HAD API Service Python project=======================COMMANDS:sudo python setup.py registersudo python setup.py sdistsudo python setup.py sdist uploadrepo at: https://pypi.python.org/pypiuser:  shestakpass: Njit2003!----This is the README file for the project.The file should use UTF-8 encoding and be written using ReStructured Text. Itwill be used to generate the project webpage on PyPI and will be displayed asthe project homepage on common code-hosting services, and should be written forthat purpose.Typical contents for this file would include an overview of the project, basicusage examples, etc. Generally, including the project changelog in here is nota good idea, although a simple "What's New" section for the most recent versionmay be appropriate.
Package: hadmlservices-eval
HAD API Service Python project=======================COMMANDS:sudo python setup.py registersudo python setup.py sdistsudo python setup.py sdist uploadrepo at: https://pypi.python.org/pypiuser:  shestakpass: Njit2003!----This is the README file for the project.The file should use UTF-8 encoding and be written using ReStructured Text. Itwill be used to generate the project webpage on PyPI and will be displayed asthe project homepage on common code-hosting services, and should be written forthat purpose.Typical contents for this file would include an overview of the project, basicusage examples, etc. Generally, including the project changelog in here is nota good idea, although a simple "What's New" section for the most recent versionmay be appropriate.
Package: hadolint-bin
pybinThis project was inspired by howMaturin packages rust binaries.  The key observation is that in the wheel format, thedistribution-1.0.data/scripts/ directory is copied to bin, which means we can leverage this to seamlessly copy binaries into a user's PATH.Combined with Python's platform-specific wheels, this allows us to use pip as a "cross-platform package manager" for distributing single-binary CLI applications.Wheel Building ProcessThe core of the logic lies in thebuildlib.pymodule.A mapping from download URL (often github releases) to pypi platform tag is required.For each platform:Download the release & extract the binary.Set file permissions and place into scripts directory within wheel archive.Create the METADATA and WHEEL files within wheel archive.Place wheel intodist/folder.Once all wheels are constructed, the distribution is uploaded to PyPI.CICD is configured to automatically recognize newPyPIreleases by looking for a diff on the PYPI_VERSION.  When this happens, a build-and-release cycle is performed for that release version.Catalogpip install dive-bin:pybin version,upstream sourcepip install hadolint-bin:pybin version,upstream sourcepip install just-bin:pybin version,upstream sourcepip install lazydocker-bin:pybin version,upstream sourcepip install scc-bin:pybin version,upstream sourcepip install usql-bin:pybin version,upstream source
Package: hadolintw
hadolint-wrapperWhat is hadolint?Hadolintstands for Haskell Dockerfile Linter and is:A smarter Dockerfile linter that helps you buildbest practiceDocker images.ExampleDockerfileFROMdebianRUNexportnode_version="0.10"\&&apt-getupdate&&apt-get-yinstallnodejs="$node_verion"COPYpackage.jsonusr/src/appRUNcd/usr/src/app\&&npminstallnode-staticEXPOSE80000CMD"npm start"With hadolint$ hadolint Dockerfile
Dockerfile:1 DL3006 Always tag the version of an image explicitly
Dockerfile:2 SC2154 node_verion is referenced but not assigned (did you mean 'node_version'?).
Dockerfile:2 DL3009 Delete the apt-get lists after installing something
Dockerfile:2 DL3015 Avoid additional packages by specifying `--no-install-recommends`
Dockerfile:5 DL3003 Use WORKDIR to switch to a directory
Dockerfile:5 DL3016 Pin versions in npm. Instead of `npm install <package>` use `npm install <package>@<version>`
Dockerfile:8 DL3011 Valid UNIX ports range from 0 to 65535
Dockerfile:9 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT argumentsWith hadolint wrapper$hadolintwDockerfileInstallationOn OS X, the easiest way to installhadolintwis usingHomebrew$ brew tap mperezi/tools
$ brew install hadolint-wrapperOn other platforms, installhadolintwusing pip$ pip install hadolintwUsage$ hadolintw
Usage: hadolintw [OPTIONS] DOCKERFILE [HADOLINT_ARGS]...

  Provides a more clear output for hadolint

Options:
  -d, --use-docker             use the dockerized version of hadolint
  --color [never|auto|always]
  --help                       Show this message and exit.Set up as a wrapper:$ alias hadolint=hadolintw
$ hadolint Dockerfile --ignore DL3020
# Please note that all hadolint options must come AFTER the DockerfileFAQDoes the wrapper keep the exit status of hadolint so that I can use it in my CI environment?No problem.My CI environment doesn't support colorized output. Can I disable it?By default the wrapper can detect if the output is being written to a tty or a pipe or a file, enabling or disabling the color codes accordingly (—color autois the default setting). However you can always turn this feature on or off regardless of the type of output destination:$ hadolintw --color never DockerfileIn our team we have ahadolint.ymlwith some rules defined for our project. Can we still use it with the hadolint wrapper?Sure.$ hadolintw Dockerfile --config hadolint.ymlThe hadolint program is not available where my build is going to run but at least I have access to a Docker environment. Can I still run hadolint?Be my guest.$ hadolintw --use-docker Dockerfile
Unable to find image 'hadolint/hadolint:latest' locally
latest: Pulling from hadolint/hadolint
8a8460b25d70: Pulling fs layer
8a8460b25d70: Verifying Checksum
8a8460b25d70: Download complete
8a8460b25d70: Pull complete
Digest: sha256:0cdbd1e0f5fd3135d17617bb510a85c0248eb70b041021fe5431d4d1501d41b9
Status: Downloaded newer image for hadolint/hadolint:latest
...
Package: hadoop-fs-wrapper
Hadoop FileSystem Java Class WrapperTyped Python wrappers forHadoop FileSystemclass family.InstallationYou can install this package frompypion any Hadoop or Spark runtime:pip install hadoop-fs-wrapperSelect a version that matches hadoop version you are using:Hadoop Version / Spark versionCompatible hadoop-fs-wrapper version3.2.x / 3.2.x0.4.x3.3.x / 3.3.x0.4.x, 0.5.x3.3.x / 3.4.x0.6.xUsageCommon use case is accessing Hadoop FileSystem from Spark session object:fromhadoop_fs_wrapper.wrappers.file_systemimportFileSystemfile_system=FileSystem.from_spark_session(spark=spark_session)Then, for example, one can check if there are any files under specified path:fromhadoop_fs_wrapper.wrappers.file_systemimportFileSystemdefis_valid_source_path(file_system:FileSystem,path:str)->bool:"""Checks whether a regexp path refers to a valid set of paths:param file_system: pyHadooopWrapper FileSystem:param path: path e.g. (s3a|abfss|file|...)://hello@world.com/path/part*.csv:return: true if path resolves to existing paths, otherwise false"""returnlen(file_system.glob_status(path))>0ContributionCurrently basic filesystem operations (listing, deleting, search, iterative listing etc.) are supported. If an operation you require is not yet wrapped,
please open an issue or create a PR.All changes are tested against Spark 3.4 running in local mode.
Package: hadoop_mock
Utility to mock hadoop command-line interface at your home.Overview$ export HADOOP_SSH_HOST=rnd07.local
$ export HADOOP_SSH_OPTS=User=afyodorov
$ export HADOOP_SSH_SUDO=hdfs

$ hadoop_ssh fs -ls /flume/logs/bs/2014/09/03

Found 4 items
drwxr-xr-x   - hdfs supergroup          0 2014-10-01 16:28 /flume/logs/bs/2014/09/03/20
drwxr-xr-x   - hdfs supergroup          0 2014-10-01 16:29 /flume/logs/bs/2014/09/03/21
drwxr-xr-x   - hdfs supergroup          0 2014-10-01 16:31 /flume/logs/bs/2014/09/03/22
drwxr-xr-x   - hdfs supergroup          0 2014-10-01 16:33 /flume/logs/bs/2014/09/03/23

$ export HADOOP_MOCK_HDFS_PATH=~/.hdfs_mock
$ export HADOOP_MOCK_CLI=hadoop_ssh

$ hadoop_mock mock /flume/logs/bs/2014/09/03
$ hadoop_mock -fs ls /flume/logs/bs/2014/09/03

Found 4 items
drwxr-xr-x   - user group        204 2015-04-20 02:40 /flume/logs/bs/2014/09/03/20
drwxr-xr-x   - user group        204 2015-04-20 02:40 /flume/logs/bs/2014/09/03/21
drwxr-xr-x   - user group        204 2015-04-20 02:40 /flume/logs/bs/2014/09/03/22
drwxr-xr-x   - user group        204 2015-04-20 02:40 /flume/logs/bs/2014/09/03/23

$ seq 10 | hadoop_mock fs -put - /test.txt
$ hadoop_mock jar hadoop-streaming -reducer 'wc -l' -input /test.txt -output /output
$ cat ~/.hdfs_mock/output/*

      10