Saravanan666/pypi-org huggingface dataset:
Package: h5sparse-tensor
Sparse matrices fromoriginal Github repositorySparse tensors fromnew Github repositoryh5sparseScipy sparse matrix in HDF5.Installationpipinstallh5sparse-tensorTestingfor single environment:pythonsetup.pytestfor all environments:toxExamplesCreate datasetIn[1]:importscipy.sparseasss...:importh5sparse...:importnumpyasnp...:In[2]:sparse_matrix=ss.csr_matrix([[0,1,0],...:[0,0,1],...:[0,0,0],...:[1,1,0]],...:dtype=np.float64)In[3]:# create dataset from scipy sparse matrix...:withh5sparse.File("test.h5")ash5f:...:h5f.create_dataset('sparse/matrix',data=sparse_matrix)In[4]:# you can also create dataset from another dataset...:withh5sparse.File("test.h5")ash5f:...:h5f.create_dataset('sparse/matrix2',data=h5f['sparse/matrix'])In[5]:# you can also create dataset using the formats that original h5py accepts...:withh5sparse.File("test.h5")ash5f:...:h5f.create_dataset('sparse/matrix3',data=[1,2,3])Read datasetIn[6]:h5f=h5sparse.File("test.h5")In[7]:h5f['sparse/matrix'][1:3]Out[7]:<2x3sparsematrixoftype'<class 'numpy.float64'>'with1storedelementsinCompressedSparseRowformat>In[8]:h5f['sparse/matrix'][1:3].toarray()Out[8]:array([[0.,0.,1.],[0.,0.,0.]])In[9]:h5f['sparse']['matrix'][1:3].toarray()Out[9]:array([[0.,0.,1.],[0.,0.,0.]])In[10]:h5f['sparse']['matrix'][2:].toarray()Out[10]:array([[0.,0.,0.],[1.,1.,0.]])In[11]:h5f['sparse']['matrix'][:2].toarray()Out[11]:array([[0.,1.,0.],[0.,0.,1.]])In[12]:h5f['sparse']['matrix'][-2:].toarray()Out[12]:array([[0.,0.,0.],[1.,1.,0.]])In[13]:h5f['sparse']['matrix'][:-2].toarray()Out[13]:array([[0.,1.,0.],[0.,0.,1.]])In[14]:h5f['sparse']['matrix'][()].toarray()Out[14]:array([[0.,1.,0.],[0.,0.,1.],[0.,0.,0.],[1.,1.,0.]])In[15]:importh5pyIn[16]:h5py_h5f=h5py.File("test.h5")In[17]:h5sparse.Group(h5py_h5f.id)['sparse/matrix'][()]Out[17]:<4x3sparsematrixoftype'<class 'numpy.float64'>'with4storedelementsinCompressedSparseRowformat>In[18]:h5sparse.Group(h5py_h5f['sparse'].id)['matrix'][()]Out[18]:<4x3sparsematrixoftype'<class 'numpy.float64'>'with4storedelementsinCompressedSparseRowformat>In[19]:h5sparse.Dataset(h5py_h5f['sparse/matrix'])[()]Out[19]:<4x3sparsematrixoftype'<class 'numpy.float64'>'with4storedelementsinCompressedSparseRowformat>Append datasetIn[20]:to_append=ss.csr_matrix([[0,1,1],...:[1,0,0]],...:dtype=np.float64)In[21]:h5f.create_dataset('matrix',data=sparse_matrix,chunks=(100000,),...:maxshape=(None,))In[22]:h5f['matrix'].append(to_append)In[23]:h5f['matrix'][()]Out[23]:<6x3sparsematrixoftype'<class 'numpy.float64'>'with7storedelementsinCompressedSparseRowformat>In[24]:h5f['matrix'][()].toarray()Out[24]:array([[0.,1.,0.],[0.,0.,1.],[0.,0.,0.],[1.,1.,0.],[0.,1.,1.],[1.,0.,0.]])
Package: h5tree
h5treeh5treeis a command-line utilitly that prints the tree structure of an HDF5 file, similar totree.
It also displays meta-data, such as the data shape, data type, and the values of attributes.InstallInstall withpip install h5treeExample output>>>h5tree-vadata.h5
data.h5(3objects,2attributes)│├──nameSam
│├──value105├──group_1(3objects)│├──group_1_sub(1object,1attribute)││├──nameDan
││└──x(5,3),float64
│├──x(5,3),float64
│└──y(5,3),float64
├──group_2(2objects)│├──x(5,3),float64
│└──y(5,3),float64
└──x(5,5,3),float643groups,6datasetsUsageusage:h5tree[-h][-v][-a][-g][-L[LEVEL]][-p[PATTERN]]path

positionalarguments:pathfilepath/grouppath

optionalarguments:-h,--helpshowthishelpmessageandexit-v,--verboseverboseoutput-a,--attributesshowattributes-g,--groupsonlyshowgroups-L[LEVEL],--level[LEVEL]maximumnumberofdirectoriestorecuseinto-p[PATTERN],--pattern[PATTERN]pattern
Package: h5utils
h5utilsis a python package adding extra functionality missing from MIT/nanoComp’s h5utils (which is not a python package and is available athttps://github.com/NanoComp/h5utils).
.HDF5(Hierarchical Data Format 5) is a file format for storing scientific data.The tools in the h5utils package allow converting other formats from and to HDF5 and to visualize HDF5 files.They include:h5tovts, which converts HDF5 files to structured VTK files for
visualization with VTK-aware programs. This is particularly useful to visualize HDF5 output files fromMPB.For more documentation, please seehttps://h5utils.readthedocs.io.Installation:pipinstallh5utilsUsage:To convert an .h5 files to .vts, simply run:h5tovtsexample.h5For more help:h5tovts--help
Package: h5viewer
Installpip install h5vieweror download theexefile from the last release.
It was tested on mac and windows.UsageTo open the viewer runh5viewerinside your cmd or run the executable file.Run analysisBy default, analyze code will be executed withexec, which means:if you started the window from cmd it'll execute from the same cmdif you started the window as an exe file, it'll execute inside the virtual environment of this exe file, where almost nothing installedIf you want to run an analysis inside the specific environment, you should specify it at the beginning of theinit_analyse.pyfile (which should be in the same directory as your data file).Example for Mac:# SOURCE: source ~/opt/anaconda3/bin/activate pyqtExample for Windows:# SOURCE: C:\ProgramData\Anaconda3\Scripts\activate.bat&&conda activate pyqtHow to run code before your analyze cell.init_analyse.pyIf you want to set up any variables or imports before running the analysis_cell, you can do in by adding theinit_analyse.pyfile in the same directory as the data file.Use case:
This is the classical file structure if you uselabmatelibrary:sample_001analysis_codeanalysis_script.pydataexperiment_1init_analyse.pydata_file.h5
Suppose you openeddata_file.h5and try to run the code inside it, but it needs dependencies fromanalysis_script.py. So they could be imported insideinit_analyse.pylike this:fromlabmate.acquisition_notebookimportAcquisitionAnalysisManagerSCRIPT_DIR=os.path.join(os.path.dirname(__file__),os.pardir)sys.path.append(os.path.join(os.path.abspath(SCRIPT_DIR),'analyse'))meas_dir=os.path.split(os.path.split(SCRIPT_DIR)[0])[0]aqm=AcquisitionAnalysisManager(meas_dir)fromanalysis_scriptimport*ErrorAny error can be seen in the console view at the bottom right. Output from executing analysis_cell is also available there.Set upAcquisitionAnalysisManagerto createinit_analyse.pyautomaticallyThere is no need for you to create aninit_analyse.pyfile in each directory.You can set any file to be aninit_analyse.pyby providing it toAcquisitionAnalysisManager:aqm.set_init_analyse_file("some_init.py")DevHow to compile locallyInstall pyinstallerpython-mpipinstall--upgradepip
pipinstallsetuptoolswheeltwine
pipinstall-rrequirements.txt
pipinstallpyinstallerThen runpyinstaller main.specDepending on which system you are, it will create a program file for this system inside thedistNote: there is no need to install the package with pip to compile it.Installation in dev modeYou can download the code, package it and install it in dev mode. It will allow you to change the code while using it.python setup.py bdist_wheel && pip install -e .or you can just runpython setup.py develop
Package: h6
H6A Python library to emulate a Zoom H6 recorder remote controlIntroductionThis library allows you to control your Zoom H6 recorder from your computer using an USB to TTL adapter.
For this, you will need a few components to make a specific cable, but it's quite simple.CableYou will have to make a specific cable that connects a USB port from your computer to the Zoom H6 remote control port, but fear not. It's actually really simple.You will need:An FTDI USB to TTL converter:A 2.5mm jack screw terminal:A simple 3 wire cableAll of these components are widely available to buy online and the overall cost is less than 5€.Once you have all of the components, the wiring is also quite simple:FTDI adapter2.5mm jackRxLTxRGNDVIMPORTANT: Make sure that the FTDI USB to TTL adapter jumper is set to3.3vbefore using the cable. Leaving it at 5v could damage your recorder.InstallationSimply install the library usingpip:pip install h6UsageYou can include this library in your Python project or run it directly as a CLI tool.CLITo execute commands using your command line run:h6 -p /dev/cu.usbserial-alcdut1 -c stopYou must specify the serial port using-por--portand the command to send using-cor--command.Importing the libraryUsage example:fromh6importZoomH6fromtimeimportsleep# Define the serial portserial_port='/dev/cu.usbserial-alcdut1'# Instantiate recorderrecorder=ZoomH6(serial_port)# Initialize recorderrecorder.initialize()# Send 'rec' commandrecorder.send('record')# wait for a whilesleep(3)# Send 'stop' commandrecorder.send('stop')As you can see, when instantiating the ZoomH6 class you will need to specify the serial port where your FTDI USB to TTL adapter is connected.Theinitialize()function executes a specific handshake expected by the Zoom H6 recorder in order to accept incoming commands.You can send any valid command to the recorder. Keep reading for a list with all the available commands.CommandsThe complete list of available commands is:CommandButtonplay_pausePlay / PausestopStoprecordRecordforwardForwardreverseReversevol_upIncrease volumevol_downDecrease volumech1Toggle Channel 1ch2Toggle Channel 2ch3Toggle Channel 3ch4Toggle Channel 4chrToggle R ChannelchlToggle L ChannelCompatibilityThis library has only been tested with theH6model, but according to the Zoom support (see#1) it should work with other models such as theH4nand theH5.If you get to try with any other model than theH6, please write your experience in that issue's comments.Changelog0.1.1:Added 3 seconds timeout to avoid infinite handshakeImproved the way commands are sentRenamed L and R channels commands for consistencyImproved error handlingUpdated README fileBumped version to 0.1.10.1.0Initial release
Package: h8mail
Email OSINT and password breach hunting. Use h8mail to find passwords through different breach and reconnaissance services, or the infamous Breached Compilation torrentFree software: BSD licenseFeaturesEmail pattern matching (reg exp), useful for reading from other tool outputsLoosey patterns for local searchs (“john.smith”, “evilcorp”)Painless install. Available throughpip, only requiresrequestsSmall and fast Alpine Dockerfile availableCLI or Bulk file-reading for targetingOutput to CSV fileCompatible with the “Breach Compilation” torrent scriptsSearch .txt and .gz files locally using multiprocessing
* Compatible with “Collection#1”Get related emailsChase and target related emails in ongoing searchSupports premium lookup services for advanced usersRegroup breach results for all targets and methodsDelicious colorsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: ha
haA medley of joke datasets and tools.To install:pip install haExamplesJoke datasetsList the datasets (keys):importhalist(ha.joke_datasets)# ['reddit_jokes', 'stupidstuff', 'wocka']Get a dataset. The datasets are lists of dicts.reddit_jokes=ha.joke_datasets['reddit_jokes']reddit_jokes[1000:1003][{'body': 'Why did the chicken cross the road? ...',
'id': '5tdwk4',
'score': 1,
'title': 'Why did the chicken cross the road?'},
{'body': 'A little boy goes to his dad and asks, ..."',
'id': '5tdssi',
'score': 123,
'title': 'What is Politics?'},
{'body': 'A teacher asked her 4th grade students a ...',
'id': '5tdsmb',
'score': 40,
'title': 'A teacher asked her students...'}]The values of thejoke_datasetsmapping are lists of dicts containing the joke
data. For example, to list the datasets and their sizes, you'd do:print({k:len(v)fork,vinha.joke_datasets.items()})# {'reddit_jokes': 194553, 'stupidstuff': 3773, 'wocka': 10019}Get an aggregate of all the datasets.len(jokes)208345The keys of the aggregate come as(dataset_name, id)pairs.
Let's look at the first two and the first last keys.print(list(jokes)[:2])print(list(jokes)[-2:])[('reddit_jokes', '5tz52q'), ('reddit_jokes', '5tz4dd')]
[('wocka', 18199), ('wocka', 18200)]Get a joke (data) by using it's key:jokes['wocka',18199]Joke (vendorized) toolspyjokesInstall:pip install ha[pyjokes](or independently, doingpip install pyjokes).fromha.pyjokesimportget_jokeget_joke()# gets a random joke, with default characteristics"Two bytes meet. The first byte asks, 'Are you ill?' The second byte replies, 'No, just feeling a bit off.'"laughimportlaughthor_joke=laugh.NamedJokes(name='Thor')thor_joke()# random joke'The stock market monitors Thor.'thor_joke('god')# random joke containing the word "god" (or None if none found)'The guy that God prays to goes to Thor for forgiveness!'
Package: ha7000d
ha7000dPython interface to the Holzworth HA7000D series Phase Noise AnalyzerInstallation$ pip install ha7000dUsage>>>fromha7000dimportCommChannel>>>importmatplotlib.pyplotasplt>>>withCommChannel("<ip address>")aspna:>>>x,y=pna.read()>>>plt.semilogx(x,y)[<matplotlib.lines.Line2Dobjectat...]>>>plt.show()>>>SupportedConfigurationAcquisitionNot supported: LO calibration
Package: haadb
haadbHive-as-a-DB SDK for Python.Leveraging Hive custom JSONs to store both text-based and binary data. Hive Custom JSONs are limited to 4096 KB includng overheads, HaaDB breaks data into chunks whenever required.When using objects such as images, files, etc., make sure you have processed it into hex-strings, for example, else it might use class names, pointers, or other data that may result to data loss.Official ReleaseHaaDBcan now be used on your Python projects through PyPi by running pip command on a Python-ready environment.pip install haadb --UCurrent version is 1.0.*, but more updates are coming soon.This is compatible with Python 3.9 or later.WARNINGS:This package is still under development, some future breakage is inevitable.Allwritetransactions in the Hive Blockchain incurs RC costs.Do NOT copy your private keys in your codes!HaaDB Modules.WARNING:Store WIFs securely in a separate file!Import ModulefromhaadbimportHaaDBInitialization# Warning: Do NOT store your WIFs in the code,# or in the repository!username="valid-username"wifs={"active":"5*","posting":"5*"}# `limit` --> bytes size before the string representation# before the string is sliced into chunks, 1024-4096 (default 4096)limit=1024# basic usagedb=HaaDB(username,wifs=wifs,limit=limit)OptimizationGet the last known transaction id
and store in your app configuration.
This will optimize the traversal in the account history.marker=hive.get_marker()EncryptionGenerate a unique encryption key and store securely,
to avoid data loss. You can create separate encryption keys
for different contracts, or depending on your needs.ek=hive.generate_encryption_key()Broadcasting unencrypted data using custom JSONscid="store-integers-v1"data=1234567890hive.broadcast(cid,data)Fetching unencrypted data (all versions)cid="store-integers-v1"result=hive.fetch(cid,start=marker,latest=False)fortimestamp,contentinresult.items():print(timestamp,content)Fetching unencrypted data (latest version)cid="store-integers-v1"result=hive.fetch(cid,start=marker)print("\nResult:",result,type(result))Broadcasting encrypted data using custom JSONscid="store_encrypted_string_v1"data="Lorem ipsum, this is a secret message..."hive.broadcast(cid,data,encryption_key=ek)Fetching encrypted data (all versions)cid="store_encrypted_string_v1"result=hive.fetch(cid,encryption_key=ek,start=marker,latest=False)fortimestamp,contentinresult.items():print(timestamp,content)Fetching encrypted data (latest versions)cid="store_encrypted_string_v1"result=hive.fetch(cid,encryption_key=ek,start=marker)print("\nResult:",result,type(result)Lists, dictionaries, and other objects.All native data types can be converted back,
but other objects will be returned
as string representation instead.cid="native_list_v1"data=[1,"2",3.4]hive.broadcast(cid,data,encryption_key=ek)result=hive.fetch(cid,encryption_key=ek,start=marker)print("\nResult:",result,type(result)cid="native_dict_v1"data={"message":"Hello, world!"}hive.broadcast(cid,data,encryption_key=ek)result=hive.fetch(cid,encryption_key=ek,start=marker)print("\nResult:",result,type(result)
Package: haaiolifx
aiolifxaiolifx is a Python 3/asyncio library to control Lifx LED lightbulbs over your LAN.Most of it was taken from Meghan Clarkk lifxlan package (https://github.com/mclarkk)
and adapted to Python 3 (and asyncio obviously)InstallationWe are on PyPi sopip3 install aiolifxor
python3 -m pip install aiolifxAfter installation, the utilityaiolifxcan be used to test/control devices.NOTE: When installing with Python 3.4, the installation produce an error message
(syntax error). This can be safely ignored.How to useEssentially, you create an object with at least 2 methods:- register
- unregisterYou then start the LifxDiscovery task in asyncio. It will register any new light it finds.
All the method communicating with the bulb can be passed a callback function to react to
the bulb response. The callback should take 2 parameters:- a light object
- the response messageThe easiest way is to look at the file in the examples directory. "Wifi" and "Uptime" use
a callback to print the info when it is returned.In essence, the test program is thisclass bulbs():
""" A simple class with a register and unregister methods
"""
    def __init__(self):
        self.bulbs=[]

    def register(self,bulb):
        self.bulbs.append(bulb)

    def unregister(self,bulb):
        idx=0
        for x in list([ y.mac_addr for y in self.bulbs]):
            if x == bulb.mac_addr:
                del(self.bulbs[idx])
                break
            idx+=1

def readin():
"""Reading from stdin and displaying menu"""

    selection = sys.stdin.readline().strip("\n")
    DoSomething()

MyBulbs = bulbs()
loop = aio.get_event_loop()
discovery = alix.LifxDiscovery(loop, MyBulbs)
try:
    loop.add_reader(sys.stdin, readin)
    discovery.start()
    loop.run_forever()
except:
    pass
finally:
    discovery.cleanup()
    loop.remove_reader(sys.stdin)
    loop.close()Other things worth noting:-  Whilst LifxDiscovery uses UDP broadcast, the bulbs are
   connected with Unicast UDP

- The socket connecting to a bulb is not closed unless the bulb is deemed to have
  gone the way of the Dodo. I've been using that for days with no problem

- You can select to used IPv6 connection to the bulbs by passing an
  IPv6 prefix to LifxDiscovery. It's only been tried with /64 prefix.
  If you want to use a /48 prefix, add ":" (colon) at the end of the
  prefix and pray. (This means 2 colons at the end!)

- I only have Original 1000, so I could not test with other types
  of bulbs

- Unlike in lifxlan, set_waveform takes a dictionary with the right
  keys instead of all those parametersThanksThanks to Anders Melchiorsen for his essential contributions
Package: haapi.games.common
FeaturesGenericget_configfunction for projectsCommonSecretManagerfor GCP secretsRequirementsPython>3.6.1InstallationYou can installHaapi Games CommonviapipfromPyPI:$pipinstallhaapi.games.commonContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMITlicense,Haapi Games Commonis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: haapi.games.rawg
InstallationYou can installHaapi Games RawgviapipfromPyPI:$pipinstallhaapi.games.rawgContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMITlicense,Haapi Games Rawgis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: haar-cascade-nms
OpenCV Haar cascade with Non-Maxima SuppressionThis simple project provides aDetectorclass extending the opencvCascadeDetectorclass with a new function:detectAndFilter.This function performs the detection using the cascade and filter the detections based on the score and their overlap to yield the best detections that do not overlap above the selectedoverlap-threshold.For more details about Non-Maxima Suppression, you can refer to my article about Multi-Template Matching, which uses a similar strategy (or other online resources).Here the NMS shipped with OpenCV is used.InstallationUsing pip:pip install haar-cascade-nmsThen to use in your scripts:fromhaarcascadeimportDetectormyDetector=Detector(filepathToCascade)myDetector.detectAndFilter(image,etc...)See the tutorial notebook for a more detailed documentation.
Package: haar-pytorch
haar_pytorch: Pytorch implementation of forward and inverse Haar Wavelets 2DA simple library that implements differentiable forward and inverse Haar Wavelets.Install the latest versionpipinstall--upgradegit+https://github.com/bes-dev/haar_pytorch.gitExampleimporttorchfromhaar_pytorchimportHaarForward,HaarInversehaar=HaarForward()ihaar=HaarInverse()img=torch.randn(5,4,64,64)wavelets=haar(img)img_reconstructed=ihaar(wavelets)
Package: haas
haasis a Python test runner that is backward-compatible with Python’s
built-in unittest Test Cases, but supports more advanced features, such
as project-specific plugins.FeaturesRunsunittest.TestCasebased tests!Plugin system, based onstevedore.Still subject to change and revision to clean the plugin APIs.Plugins for whole-test-run environment configuration (run before any
client-code is imported).Plugins for test result output formatting.Plugins for test runner scheme (e.g. parallel runner)Generic test result collection, presentation & output handled by
plugins.(Very) Basic parallel test run support.Missing (unittest) FeaturesDoes not support theunittest.load_testsprotocol.Does not support subtests.Future FeaturesPer-project config fileImprove parallel test runner to allow conditional splitting of tests,
or allow tests to be run in the main process.Improve plugin systemMore result output plugins/options (xunit, result summary)… ?Copyrighthaasis copyright 2013-2014 Simon JagoeThe namehaasis taken from the animal on the cover of O’Reilly’s
Python Cookbook, aspringhaasorPedetes capensis.
Package: haas-python-aht21b
HaaS Python介绍HaaS Python是阿里云IoT团队最新研发的一套低代码编程框架，兼容MicroPython编程规范，依托HaaS平台软硬件积木提供AI、支付、蓝牙配网、云连接、UI等物联网场景常用的能力，从而解决了物联网应用开发难的问题。有了Python轻应用框架，物联网编程不再局限于专业软件开发人员，一般的技术员也可以快速实现复杂的物联网需求。
更多HaaS Python介绍和开发资料见HaaS Python官网,创意案例,硬件积木HaaS Python is a set of low-code programming frameworks newly developed by Alibaba Cloud IoT team. It is compatible with MicroPython programming specifications. It relies on the hardware and software building blocks of the HaaS platform to provide capabilities commonly used in IoT scenarios such as AI, payment, Bluetooth network configuration, cloud connection, and UI. Solve the difficult problem of IoT application development. With the Python light application framework, IoT programming is no longer limited to professional software developers, and general technicians can quickly implement complex IoT requirements.
For more HaaS Python introduction and development materials, seeHaaS Python official website,Creative Case,Hardware Building Blocks安装方法在HaaS Python官网下载开发板对应的固件，并完成固件烧录Download the firmware corresponding to the development board atHaaS Python websiteand complete the firmware burning在开发板上运行以下命令完成安装和使用,如果您在使用过程中遇到问题，欢迎在github上向我们提交issue，我们的工程师会及时解答Run the following commands on the development board to complete the installation and use. If you encounter problems during use, please submit an issue to us ongithub, Our engineers will answer in timeimport upip
upip.install("haas-python-aht21b")
import haas-python-aht21b