Saravanan666/pypi-org huggingface dataset:
Package: heva-evse
HEVA EVSE WrapperThe purpose of this module is to provide a standardised base class for OpenHEVA compatible EVSE wrappers.Included below are instructions describing how to build a wrapper for any HTTP based EVSE control and metering API.UsageFirst, install the module via pip install.pipinstallheva-evseNext, import the EVSEConnector base class for use in your project.fromheva_evseimportEVSEConnectorFinally, use the base class as a guide to implement the required control and telemetry methods.Note 1:The first argument of the constructor should be a dictionary of required config fields for a singular EVSE.Note 2:The second argument to the constructor should also be a dictionary containing any fields required to integrate with the specific API (such as a generic API key).classMyEVSEWrapper(EVSEConnector):def__init__(self,config,setup):self.username=config['username']self.password=config['password']self.charger_id=config['charger_id']self.partner_api_key=setup['api_key']...An example wrapper is available in the examples folder of this repository, showing how the base class can be used to abstract control of the Wallbox API.Integration with OpenHEVAIn order to integrate your control and telemetry module into the OpenHEVA server, a simple yaml file must be included in the project root.This file defines the import values and configuration fields required for successful operation, as well as brand and model information to assist in user onboarding.For example:module_name:my_evseimport_name:MyEVSEWrapperbrand_name:"MyEVSE"model_names:-"Thefirstandbestv0"-"Superchargev1.0"config:-username-password-charger_idsetup:-api_keyWith this file present, OpenHEVA is able to install the wrapper using only a git url (be it public or private).
Package: hex2file
hex2fileA Python module for writing hex string content to a file.What it doesWrites ascii hex strings to a file directly as in binary hex format. The string
can be multi-line or single-line and 0x-prefixed or not. Excess whitespace in
the input is ignored.The following input (multi-line string):0xFF00FF000xAABBCCDD0x1234567898765432 3456789AWould result in the following file content:FF00FF00AABBCCDD12345678987654323456789ACompatibilityPython 2/3 compatible.InstallGet the module via pip:pip install hex2file. Once installed 'hex2file' will
be added to your path and the module will be available for importing in your
Python projects.UsageCommand LineWhen pip installed, hex2file is added to your path. It can accept input directly
from stdin or from a file with the '-f' flag. Seehex2file --help.Example:echo "0xFF00FF00" | hex2file /tmp/testLibraryThe module can also be imported into a Python project. After installing it
simplyimport hex2fileand usehex2file.write().TestingRun the tests usingpython setup.py testfrom the root directory of this
repository.
Package: hexabyte
Hexabyte - Commandline Hex EditorA modern, robust, and extensible commandline hex editor.Usage~/$pipinstallhexabyte
...
~/$hexabyte--help
usage:hexabyte[-h][-cCONFIG_FILEPATH][-s][files...]Hexabytecanoperateinthreedistinctmodes.Singlefilemodeopensasinglefilewithasingleeditor.Splitscreenmodeopensasinglefilewithasplitscreenview.Diff
modeopenstwofilessidebyside.

positionalarguments:filesSpecify1or2filenames

options:-h,--helpshowthishelpmessageandexit-cCONFIG_FILEPATH,--configCONFIG_FILEPATHSpecifyconfiglocation.Default:~/.config/hexabyte/config.toml-s,--splitDisplayasinglefileintwosplitscreeneditors.
Package: hexabyte-entropy
Hexabyte Entropy PluginA hexabyte plugin for displaying the entropy of file chunks.The entropy values are mapped to color codes and then displayed in a scrollable sidebar. Clicking on a chunk will jump the active editor to the location of the selected chunk.Install~/$pipinstallhexabyte-entropy
...Addhexabyte_entropyto the plugins list inside your hexabyte config (~/.config/hexabyte/config.toml).plugins=["hexabyte_entropy",]
Package: hexacolors
HexacolorsA simple library that converts string to hexadecimal understandable by pythonA simple library that converts RGB to hexadecimal understandable by pythonA simple library that converts CMYK to hexadecimal understandable by pythonA simple library that converts HSL to hexadecimal understandable by pythonA simple library that converts hexadecimal understandable by pythonI created this library more to use as pycord integrationUsage:install with pippipinstallhexacolorsImport on your code:importhexacolorsRun itRunifonline:UsingStringColor:>>>importhexacolors>>>hexacolors.stringColor('Blue')>>>print(hexacolors.listall)#List all colors availablesUsingHexaColor:>>>importhexacolors>>>hexacolors.hexadecimal('#0000FF')#Convert Hexadecimal Color for Python understandUsingrgb:>>>importhexacolors>>>hexacolors.rgb("255,255,255")Usingcmyk:>>>importhexacolors>>>hexacolors.cmyk("423,522,4,244")Usinghsl:>>>importhexacolors>>>hexacolors.hsl('423,60%,70%')UsingAutoDetect:>>>importhexacolors>>>hexacolors.autodetect('Blue')#Identify string>>>hexacolors.autodetect('#fff000')#Identify Hexadecimal>>>hexacolors.autodetect('255,255,255')#Identify RGB>>>hexacolors.autodetect('423,522,4,244')#Identify CMYK>>>hexacolors.autodetect('255,75%,64%')#Identify HSLRunifoffline:UsingStringColor:>>>importhexacolors>>>>>>hexacolors.stringColor('Blue')>>>>>>print(hexacolors.listall)#List all colors availablesUsingHexaColor:>>>importhexacolors>>>>>>hexacolors.hexadecimaloff('#0000FF')#Convert Hexadecimal Color for Python understandUsingrgb:>>>importhexacolors>>>>>>hexacolors.rgboff(255,255,255)Usingcmyk:>>>importhexacolors>>>>>>hexacolors.cmykoff(423,522,4,244)
Package: hexafid
HexafidHexafid is an experimental block cipher.DANGER!The project goals are to produce a cipher that:works easily with pen and papersecures confidentiality of informationoffers plausible deniability if discoveredexhibits greater strength in softwareCaveat EmptorHexafid began as a hobby project during the COVID-19 pandemicThe work has NOT yet been peer reviewed by the academic communityThe algorithms have NOT yet been proven to have strong securityThe software is released under an open source licence (MIT) that:Limits ANY liability, andProvides NO warrantyDocumentation Homehttps://hexafid.gitlab.io/hexafidInstallationUse the package managerpipto install hexafid.$pipinstallhexafidUsageAs an end user:$hexafid--version$hexafid--help$hexafidAs a developer:fromhexafidimporthexafid_coreashexafidhexafid.encrypt(message,key,mode,iv,period,rounds)# returns ciphertext stringhexafid.decrypt(message,key,mode,period,rounds)# returns plaintext stringNOTE: use of these libraries assumes that you understand the cryptographic implications of changing parameters.ContributingMerge Requests are welcome. For all changes, please:open an Issue first to document the activity;label the Issue (e.g. Bug, Feature, Refactor, Suggestion, Test);update or add any related tests to support your work;create an associated Merge Request to discuss changes with a maintainer.We expect team members to have minimum knowledge as found inhttps://www.coursera.org/learn/crypto.Key areas of future research and development include:linear and differential cryptanalysisconstraint optimized key search algorithmpublishable reference implementation in CLicenseMIT License
Package: hexagonal
Hexagonalhexagonalprovides hexagonal vectors.Usage>>>importhexagonalCreate a vector from cube coordinates, with x + y + z = 0. x is
south-east-ish, y is north and z is south-west-ish.>>>v=hexagonal.Vec(x=4,y=3,z=-7)>>>vVec(4,3,-7)Coordinates can be accessed, but not modified.hexagonal.Vecis
immutable.>>>v.x4>>>v.y3>>>v.z-7Thezcoordinate is optional.>>>u=hexagonal.Vec(4,5)Arithmetic is supported.>>>v+uVec(8,8,-16)>>>v-uVec(0,-2,2)absgives the hexagonal distance to the vector, i.e. the radius of the
hexagon on which it sits.>>>abs(u)9
Package: hexagonal-sanity-check
Hexagonal Sanity CheckThis project checks if the dependency flow between the layers of the Hexagonal architecture defined
for this project was respected.How to installIt can be easily installed via pip:pip install hexagonal-sanity-checkHow to configure your projectFirst it's necessary to define your hexagonal layers and their order.
The tool expects a default file name on your source folder dir with the namehexagonal_config.py.First you create the Hexagonal Layers you have on your system via the class name HexagonalLayer.
There are two arguments:name: It can be any name,domain,frontend,infrastructure, or any name you used for your layers.usecases: This is the name of the directory the files related to this layer as storage. It's not the full path,
it's the directory name relative path from source.Importhexagonal_configon your file, and define the order with+(add layers)
then>>(set the sequence of the layers). The most to the left layers is the most outer layer, while
the most to the right layer is the most inner layer.Example, for this folder structure:. src
├── __init__.py
├── hexagonal_config.py
├── domain
│   ├── __init__.py
│   ├── __pycache__
│   └── person.py
├── infrastructure
│   ├── __init__.py
│   └── person_mysql_repository.py
├── main.py
├── services
│   ├── __init__.py
│   └── person_repository.py
└── usecases
    ├── __init__.py
    └── create_person_usecase.py
.testsThe file:fromhexagonal.domain.hexagonal_layerimportHexagonalLayerfromhexagonal.hexagonal_configimporthexagonal_confighexagonal_config.add_inner_layer(HexagonalLayer(name='infrastructure',directories=['/infrastructure']))hexagonal_config.add_inner_layer(HexagonalLayer(name='use_cases',directories=['/use_cases']))hexagonal_config.add_inner_layer(HexagonalLayer(name='services',directories=['/services']))hexagonal_config.add_inner_layer(HexagonalLayer(name='domain',directories=['/domain']))hexagonal_config.excluded_dirs=['/tests']Generating the Project DiagramThis command generate a visual diagram show the composition of your hexagonal layers.Pre requisitesTo generate the Hexagonal Diagram of the project, it's necessary to have Graphviz installed in the machine.For Mac you canbrew install graphviz.For other, check the documentationhttps://graphviz.org/download/.CMDhexagonal diagram --source_path ./Checking Project's Hexagonal IntegrityThis checks if the correct flow of the dependencies -from outer to inner layer- was respected.CMDhexagonal check --source_path ./
Package: hexagonit.decorators
ContentsChange History0.2 (2007-09-05)0.1 (2007-08-31)Detailed DocumentationbrowsermoduleJSON decoratorHTTP cache disabling decoratorDownloadThe package contains function decorators that help implementing
repetitive tasks. It is mostly oriented towards Zope development.Change History0.2 (2007-09-05)Fixed problem with methods not being passed parameters from the
query string. When a view method was called directly using an URL
the parameters from the query string were lost when a view method
was decorated. The decorators now push back the query parameters
into the method call.0.1 (2007-08-31)First public release.Detailed DocumentationbrowsermoduleThis module provides decorators that are useful with Zope 3 browser
views (also usable in Zope 2).JSON decoratorThe JSON decorator usessimplejsonto encode the return value of the
decorated function as JSON.>>> from hexagonit.decorators.browser import json>>> @json
... def json_callback():
...     """JSON callback method."""
...     return {'bool' : (True, False) }
>>> json_callback()
'{"bool": [true, false]}'Any keyword arguments passed to the decorator will be passed on to thesimplejson.dumpsfunction.>>> @json(sort_keys=True, ensure_ascii=False)
... def json_callback():
...     """JSON callback method."""
...     return {'foo' : None, 'bool' : (True, False), 'ints' : [1,2,3]}
>>> json_callback()
u'{"bool": [true, false], "foo": null, "ints": [1, 2, 3]}'HTTP cache disabling decoratorThenocachedecorator is used for Zope 3 views and sets the
appropriate HTTP headers to disable caching for the results of the
decorated method.>>> from hexagonit.decorators.browser import nocacheWe’ll demonstrate the use of the decorator with a dummy view object.>>> class Dummy(object):pass
>>> class BrowserView(object):
...     """Dummy view class that fakes the ``request`` object."""
...     def __init__(self):
...         self.request = Dummy()
...         self.request.response = Dummy()
...         self.headers = []
...         self.request.response.setHeader = lambda header,value: self.headers.append('%s: %s' % (header, value))
...
...     @nocache
...     def ajax_callback(self):
...         print '\n'.join(self.headers)>>> view = BrowserView()
>>> view.ajax_callback()
Pragma: no-cache
Expires: Sat, 1 Jan 2000 00:00:00 GMT
Cache-Control: no-cache, must-revalidateIt is also possible to use both thejsondecorator and thenocachedecorator at the same time.Download
Package: hexagonit.portletroles
hexagonit.portletrolesoverrides each portlets for Plone to provide different edit_view permissions to them.Assigning different roles to those permissons happens through rolemap.xml.Only who has permission can manage portlets through@@manage-portletsthen.Further Documentation URLhttp://packages.python.org/hexagonit.portletroles/Repository URLhttps://github.com/hexagonit/hexagonit.portletroles/Examplerolemap.xml:<?xml version="1.0"?>
<rolemap>
  <permissions>
    <permission name="Portlets: Manage portlets"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <!-- Permission for moving and deleting portlets  -->
    <permission name="Portlets: Manage own portlets"
            acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <permission name="Portlets: Manage Events portlet"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <permission name="Portlets: Manage Login portlet"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
    </permission>
    ...
  </permissions>
</rolemap>With thisrolemap.xml, user who hasEditorrole can add and manage Events portlet, but not Login portlet.You can find which permissions are registered from overrides.zcml file in the package.Permission for deleting and moving up/down portlets is controled by permission:Portlets: Manage own portlets.Changelog1.0 (2012-04-18)Test for deleting and moving up/down portlet added. [taito]0.9 (2012-03-08)Code cleanups. [taito]Sphinx documentation updated. [taito]0.8 (2012-03-08)Release for production use. [taito]ContributorsKai Lautaportti <kai.lautaportti at hexagonit.fi>Taito Horiuchi <taito.horiuchi at hexagonit.fi>
Package: hexagonit.swfheader
Thehexagonit.swfheaderpackage provides a single function –parse– that is able to parse the metadata in a SWF (Flash
animation) file. The main use case is to interrogate the dimensions of
a SWF file to help in embedding the file in a HTML page.ContentsUsageCommand lineChange history1.2 (2012-07-18)1.1 (2010-05-08)1.0.1 (2008-04-29)1.0 (2008-04-16)DownloadUsageUsing the parser is very simple, simply call thehexagonit.swfheader.parsefunction and call it with either a
filesystem path or a file-like object.>>> import hexagonit.swfheader
>>> metadata = hexagonit.swfheader.parse(TEST_SWF)
>>> pprint(metadata)
{'compressed': False,
 'fps': 12,
 'frames': 1,
 'height': 400,
 'size': 153,
 'version': 5,
 'width': 550,
 'xmax': 550,
 'xmin': 0,
 'ymax': 400,
 'ymin': 0}Theparsefunction returns a dictionary that contains the
following items:version (int)The version of the Flash format, e.g. 7.compressed (bool)True, if the contents of the file are compressed using zlib
compression,Falseotherwise.size (int)Byte size of the (uncompressed) contents of the SWF file.xmin (int)The lesser x-coordinate of the bounding rectangle of the contents.xmax (int)The greater x-coordinate of the bounding rectangle of the contents.ymin (int)The lesser y-coordinate of the bounding rectangle of the contents.ymax (int)The greater y-coordinate of the bounding rectangle of the contents.width (int)The width of the SWF file in pixels.height (int)The height of the SWF file in pixels.frames (int)The number of frames in the SWF file.fps (int)Frames per second.Command lineWhen installed with setuptools a script namedswfheaderis placed
in your bin directory which can be used to easily introspect SWF files
on the filesystem:$ swfheader some_file.swf
SWF header
----------
Version:      7
Compression:  False
Dimensions:   1105 x 1629
Bounding box: (0, 1105, 0, 1629)
Frames:       64
FPS:          1Change history1.2 (2012-07-18)Only close file handles explicitly opened by the parser itself. Fixes an
issue where file handles that were passed in as parameters were prematurely
closed. Seehttps://github.com/dokai/hexagonit-swfheader/pull/1[aleksandr-rakov]1.1 (2010-05-08)Fixed a bug with parsing the “fps” and “frames” fields. The order of the
fields were reversed and additionally the “fps” field was parsed
incorrectly. Bug reported by Valeriy Zmiyevskoy.
[dokai]1.0.1 (2008-04-29)Refacted a reversed() call to make the package Python 2.3 compatible.1.0 (2008-04-16)First public release [dokai]Download
Package: hexagonit.testing
This package provides useful helper methods for testing in Plone.Further Documentation URLhttp://packages.python.org/hexagonit.testing/Repository URLhttps://github.com/hexagonit/hexagonit.testing/Changelog1.2.2 (2012-05-22)Default login_url updated from ‘/login_form’ to ‘/login’.
[taito]1.2.1 (2012-05-21)Added index for login method. [taito]1.2 (2012-02-29)Added new methods for browser: bycss, grep, search [rnd]1.1.1 (2012-01-24)Removed version.txt file. [taito]Updated necessary dependencies to setup.py. [taito]Updated frame work description on setup.py. [taito]1.1 (2011-12-09)Added functions to mockdatetime.datetime.now()anddatetime.date.today(). [dokai]1.0.1 (Unreleased)Typo in documentation fixed.Dependency to mock package set in setup.py.1.0 (2011-09-19)Initial releaseContributorsKai Lautaportti <kai.lautaportti at hexagonit.fi>Roman Susi <roman.susi at hexagonit.fi>Taito Horiuchi <taito.horiuchi at hexagonit.fi>
Package: hexalattice
hexalatticeGenerate and plot hexagonal lattices in 2D, with fine control over spacing between hexagons, arbitrary rotation of the grid around central tile, etc.
The module computes and returns the center point for each of the tiles in the lattice.Installation# Using pippipinstallhexalattice# Using condacondainstall-cconda-forgehexalatticeUsage exampleCreate and plot 5x5 lattice of hexagons (as in first image):fromhexalattice.hexalatticeimport*
hex_centers,_=create_hex_grid(nx=5,ny=5,do_plot=True)plt.show()# import matplotlib.pyplot as pltGet central points of the hexagons:tile_centers_x=hex_centers[:,0]tile_centers_y=hex_centers[:,1]Plot one grid over the other, second with spacing around the hexagons:_,h_ax=create_hex_grid(nx=5,ny=7,do_plot=True,edge_color=(0.85,0.85,0.85))create_hex_grid(nx=5,ny=7,do_plot=True,edge_color=(0.25,0.25,0.25),h_ax=h_ax,plotting_gap=0.3)plt.show()Create Moirֳ© pattern from two circularly cropped hexagrids:hex_grid1,h_ax=create_hex_grid(nx=50,ny=50,rotate_deg=0,min_diam=1,crop_circ=20,do_plot=True)create_hex_grid(nx=50,ny=50,min_diam=1,rotate_deg=5,crop_circ=20,do_plot=True,h_ax=h_ax)For API and additional examples see the wikihexalattice APIandassigning individual colors to hexagons.Release Historyv1.0.0 - First versionv1.1.0 - Added the option to assign different colors to hexagonsv1.2.0 - Added control over the outer line width of the hexagonsv1.2.2 - Added control over the axis background colorv1.3.0 - Reduced runtime by 50%About & LicenseAlex Kazakov ג€“@bio_vs_silicoג€“alex.kazakov@mail.huji.ac.ilDistributed under the MIT license. SeeLICENSEfor more information.https://github.com/alexkaz2/hexalattice
Package: hexapixl
hexapixlhexapixlis a Python command-line utility that allows you to encode and decode PNG images to and from hexadecimal data in a text file. This can be useful for various purposes, such as embedding images in text-based formats or sharing images as text data.FeaturesEncoding: Convert a PNG image into its hexadecimal representation and save it to a text file.Decoding: Retrieve a PNG image from a text file containing hexadecimal data and save it as an image file.PrerequisitesMake sure you have the following prerequisites installed in your Python environment:Python 3.xRequired Python libraries (these should be pre-installed with Python):binasciiargparseUsageEncoding an Image to HexadecimalTo encode a PNG image into hexadecimal format and save it to a text file, use the following command:pythonhexapixl.pyinput_image.png-ooutput.txtinput_image.png: The path to the input PNG image.-o output.txt: The output text file where the hexadecimal data will be saved.Decoding Hexadecimal to an ImageTo decode a text file containing hexadecimal data and save it as a PNG image, use the following command:pythonhexapixl.py-dinput.txt-ooutput_image.pngThis command will read the hexadecimal data from "input.txt" and save it as a PNG image named "output_image.png."LicenseThis project is licensed under the MIT License - see the LICENSE file for details.Acknowledgmentsbinascii: Python library for working with binary and ASCII data.argparse: Python library for parsing command-line arguments.Authorwerzq
Package: hexarray2decimal
Converts a numpy string array with hex values to int# Tested with:# Python 3.9.13# Windows 10pipinstallhexarray2decimalfromhexarray2decimalimportnumpy_hex_string_array_to_inta1=20000*["0xffff","0xa011","0xb122","0x99ff","0x00ee","0x0b54"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [65535 40977 45346 ... 39423   238  2900]a1=20000*["0xff","0xa0","0xb1","0x99","0x00","0x0b"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [255 160 177 ... 153   0  11]a1=20000*["ff","a0","b1","99","00","0b"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [255 160 177 ... 153   0  11]a1=20000*["f","a","b","9","0","c"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [15 10 11 ...  9  0 12]a1=20000*["0xFF","0xA1","0xB2","0x99","0xE0","0xCB"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [255 161 178 ... 153 224 203]# Different string sizes may lead to unexpected behavior:a1=20000*["fffff","a","b","9","0","c"]a1r=numpy_hex_string_array_to_int(numpyarray=a1)print(a1r)# [1048575  655360  720896 ...  589824       0  786432]
Package: hexastore
hexastoreanother hexastore implementationInstallation|Getting Up And Running|Examples|API|See AlsoAn implementation of"Sextuple Indexing for Semantic Web Data Management"
from C. Weiss et al..
This is an implementation for fun only, hence may be used if really needed, else it is
adviced to use something more serious. The main feature are:Basic functionality to CRUD triples in the store.InstallationpipinstallhexastoreGetting Up and Runningnox-lExamplesimporthexastorestore=hexastore.Hexastore()store.insert(["hexastores","are","awesome"])store.insert(["cats","are","awesome"])result=store.search(subject="cats")APIFor nowpydoc hexastore.Hexastore.See AlsoSee the original paperhere.Or for a more serious library, maybe usethis.
Package: hexbuilder
HexBuilderCommand line tool that converts a text file to its representing hex code.HexBuilder is a command line tool that makes bytecode writing easier for the eye. It converts a commented text file:// headerABCDDCBA000000000000000000000000/*This is a multi-line comment.*/12399129// oh and caps don't matterAbCdcAfeto a binary file whose hex dump is:ABCDDCBA00000000000000000000000012399129ABCDCAFESo it basically strips all comments and whitespaces and converts a text file to a binary file.InstallationInstall with pip:pipinstallhexbuilderUsageEnter in command line:hexbuildermy_text_fileThis will create a.hexfile (same name as input) as output in the same directory.Alternatively, the output file can be specified with-o:hexbuildermy_text_file-ooutput.hex