Saravanan666/pypi-org huggingface dataset:
Package: htb-cli
HTB_CLI - Interact with HTB through a terminal.Copyleft: Gr3atWh173based upon https://github.com/kulinacs/htbINSTALL: pip install htb-cliSETUP:1. get your API key from HackTheBox (profile settings)2. set the HTB_API_KEY environment variable to your api keyUSAGE:LIST MACHINES:          hackthebox.py list machines [active/retired]GET A SPECIFIC MACHINE: hackthebox.py get machine (machine id)RESET A MACHINE:        hackthebox.py reset (machine id)SWITCH VPN:             hackthebox.py switch (lab)SUBMIT FLAG:            hackthebox.py submit (root/user) (machine id) (hash) (difficulty [10-100])
Package: htbulma
htbulma = "HTag bulma"Example of gui toolkit usinghtag.Just to be clear: This module is just for me ;-). It's just here to demonstrate that you can build a py3 module, containnig a set ofhtag's components, ready to be used, in youhtagapp.Of course, you can use it, at your own risk. But be aware that :the current components may change completly (and broke your apps)many of them are not well coded (80% coming from the old gtag, and 70% are not using the last htag features in the right place)Theses are my components, for my quick's htag apps ;-), for demo'ing the htag goal !I'd love too see a real module, well maintained, with high-end and clever components (but I have no time to manage that, focusing on other projects (ex: htag))See an example (in client side only (pyscript))See an example (in server side (on glitch.com))
Package: htcdaskgateway
HTCdaskGatewayA Dask Gateway client extension for heterogeneous cluster mode combining the Kubernetes backend for pain-free scheduler networking, with COFFEA-powered HTCondor workers and/or OKD [coming soon].Latestis installed by default and deployed to the COFFEA-DASK notebook on EAF (https://analytics-hub.fnal.gov). A few lines will get you going!The current image for workers/schedulers is: coffeateam/coffea-dask-cc7-gateway:0.7.12-fastjet-3.3.4.0rc9-g8a990faBasic usage @ FermilabEAFMake sure the notebook launched supports this functionality (COFFEA-DASK notebook)from htcdaskgateway import HTCGateway

gateway = HTCGateway()
cluster = gateway.new_cluster()
cluster

# Scale my cluster to 5 HTCondor workers
cluster.scale(5)

# Obtain a client for connecting to your cluster scheduler
# Your cluster should be ready to take requests
client = cluster.get_client()
client

# When computations are finished, shutdown the cluster
cluster.shutdown()Other functions worth checking outThis is a multi-tenant environment, and you are authenticated via JupyterHub Oauth which means that you can create as many* clusters as you wishTo list your clusters:# Verify that the gateway is responding to requests by asking to list all its clusters
clusters = gateway.list_clusters()
clustersTo connect to a specific cluster from the list:cluster = gateway.connect(cluster_name)
cluster
cluster.shutdown()To gracefully close the cluster and remove HTCondor worker jobs associated to it:cluster.shutdown()There are widgets implemented by Dask Gateway. Make sure to give them a try from your EAF COFFEA notebook, just execute the theclientandclustercommands (after properly initializing them) in a cell like:-------------
cluster = gateway.new_cluster()
cluster
< Widget will appear after this step>
-------------
client = cluster.get_client()
client
< Widget will apear after this step >
-------------
cluster
< Widget will appear after this step >
Package: htchirp
HTChirpPure Python Chirp client for HTCondorInstallationThe latest release is available on PyPI:pip install htchirpHowever, if HTCondor job sandbox space is a premium, most of HTChirp's
functionality can be accessed fromhtchirp.pyas a standalone script or module.Example UsageThere are multiple ways to invoke HTChirp inside a HTCondor job
environment.Using HTChirp inside PythonFirst, you can use an HTChirp object as part of a larger Python workflow
connect to the Chirp server and issue commands:Using context management (recommended):>>>importhtchirp>>>withhtchirp.HTChirp()aschirp:>>>chirp.ulog('Logging use of Chirp in Python')>>>me=chirp.whoami()>>>chirp.set_job_attr('UsingPythonChirp','True')>>>using_chirp=chirp.get_job_attr('UsingPythonChirp')>>>me'CONDOR'>>>using_chirp'true'Using manual connection and disconnection (not recommended):>>>importhtchirp>>>chirp=htchirp.HTChirp()>>>chirp.connect()>>>chirp.write('Important output 1\n','/tmp/my-job-output','cwa')19>>>chirp.write('Important output 2\n','/tmp/my-job-output','cwa')19>>>chirp.read('/tmp/my-job-output',1024)'Important output 1\nImportant output 2\n'>>>chirp.fetch('/tmp/my-job-output','./my-job-output')38>>>chirp.disconnect()For more information on the available commands, seehelp(htchirp.HTChirp).Using HTChirp on the command lineSecond, you can use HTChirp on the command line with the same commands
and arguments supported by thecondor_chirputility, either by includinghtchirp.pywith your job or by installing the HTChirp package inside a
virtual environment inside your job.Usinghtchirp.pyfrom within the working directory:$ python htchirp.py ulog "Logging use of Chirp in Python"
$ python htchirp.py whoami
CONDOR
$ python htchirp.py set_job_attr UsingPythonChirp True
$ python htchirp.py get_job_attr UsingPythonChirp
TrueUsingcondor_htchirpafter installing HTChirp in an active virtual
environment:$ condor_htchirp ulog "Logging use of Chirp in Python"
$ condor_htchirp whoami
CONDOR
$ condor_htchirp set_job_attr UsingPythonChirp True
$ condor_htchirp get_job_attr UsingPythonChirp
TrueUsingpython -m htchirpafter installing HTChirp in an active
virtual environment:$ python -m htchirp ulog "Logging use of Chirp in Python"
$ python -m htchirp whoami
CONDOR
$ python -m htchirp set_job_attr UsingPythonChirp True
$ python -m htchirp get_job_attr UsingPythonChirp
TrueFor a list of commands and arguments, pass--helpto your preferred
command line invokation, or see thecondor_chirpman page.
Package: htdp-pt-br
HtDP in PythonEnglishThis is an educational library inspired by thehtdplibrary existing for the Racket language, aiming to enable the use of ideas similar to theHow to Design Programsapproach for teaching programming.How to Design Programsis a textbook developed by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt and Shriram Krishnamurthi, and presents an interesting approach on teaching program design. The book can be accessed inhttps://htdp.org/2018-01-06/Book/index.htmlThe library's implementation is based on Pygame and facilitates de development of games and interactive programs by means of an interesting API which is easy to learn.This is the Portuguese version of the APIPortugueseEsta é uma biblioteca de fins educacionais inspirada pela bibliotecahtdpexistente na linguagem Racket, visando permitir o uso de ideias similares à abordagemHow to Design Programspara o ensino de programação.How to Design Programsé um livro-texto desenvolvido por Matthias Felleisen, Robert Bruce Findler, Matthew Flatt e Shriram Krishnamurth, e apresenta uma abordagem interessante para o ensino de projeto (design) de programas. O livro pode ser acessado emhttps://htdp.org/2018-01-06/Book/index.htmlA implementação da biblioteca é baseada em Pygame e facilita o desenvolvimento de jogos e programas interativos por meio de uma interessante API que é fácil de aprender.Está é a versão em Português da API.
Package: hte
historical-text-extraction (hte)Package to extract text from historical documents. The package is written for personal use.InstallationThe current release from the PyPI repository:pipinstallhteThe development version fromGitHubwith:pipinstallgit+ssh://git@github.com/eirikberger/hte.gitNote that it is nessecary with a SSH key for this approach to work.Using itImport the package.fromhteimportdigitizeThe basic setup is the following:# Define classbook=digitize.Book("data/finnmark_1968.pdf","books")# Run methods on the classbook.CreateFolderStructure()book.PdfImport(page_info=False,from_page=21,to_page=263)book.Split(multiple_columns=True)book.RunOCR(type="splits",export_image=False)book.CombineCleanGroup(ocr_grouping=True,group_type='norway')book.RegexStructure("norway")Make sure to install the correct language package for Tesseract.# Check languages already installed:tesseract--list-langs# Languages available for installationapt-cachesearchtesseract-ocr# Install the Norwegian language packsudoapt-getinstalltesseract-ocr-norExtracting headersStart by converting XML files using the Pascal VOC data format to JSON. These files can be created by using the free softwarelabelImg.importosimporthte.headersashteheadersos.chdir('/home/eirikb/Desktop')header=Headers('train',2022)header.runbbxConverting()Then convert the json file to csv.hteheaders.convertFromJson('/home/eirikb/Desktop/training_xml/json-bbox','xml')Finally, read the concent of the boxes.hteheaders.ReadBoxes('json-bbox/xml.csv','hordaland','train',print_images=True)Downloade more contentThese functions create a list of relevant content from the API of the Norwegian National Library and then downloads a high resolution pdf version.importosimporthte.NBasNBos.chdir('/home/eirikb/Desktop/')ListOfBooks=NB.ListNB(1920,1930,'skatteligning','digitidsskrift')ListOfBooks=NB.ListOfBooks[0:1]
Package: hteetp
hteetphteetpis a Python package for copying HTTP responses to disk. It
provides wrappers around the standard library'shttp.clientinfrastructure.This is useful when making something that should capture traffic,
either for later analysis or for a cache.It's liketeebut for HTTP requests.Installationpip install hteetpUsageThe simplest usage ishteetp.http_request:fromhteetpimporthttp_requestdefrequest_and_record():response=http_request("./snapshot.http","GET","github.com","/spenczar/hteetp")# Now the file ./snapshot.http exists - but it will only have headers and the# 'HTTP/1.1' preambleresponse_data=response.read()# Now the file will be populated with the contents of response_dataassertlen(response.headers)>0assertlen(response_data)!=0Long-lived connectionsAlternatively,hteetp.TeeHTTPConnectionis a replacement forhttp.client.HTTPConnection. You provide it with a function for
generating filepaths given HTTP request parameters, and it manages theteeing for you. This gives you a long-lived connection if you're
hitting the same host many times.fromhteetpimportTeeHTTPConnection,relative_filesdefrequest_and_record():conn=TeeHTTPConnection(relative_files("./snapshots")"github.com")forpathin["/spenczar/hteetp","/python/cpython","/psf/requests"]:resp=conn.request("GET",path)resp_data=resp.read()# handle each response# The following files will have been written:# ./snapshots/GET/github.com:443/spenczar/hteetp# ./snapshots/GET/github.com:443/python/cpython# ./snapshots/GET/github.com:443/psf/requestsReading HTTP from files on diskhteetp.http_response_from_fileis a little utility for loading ahttp.client.HTTPResponsefrom a file on disk:fromhteetpimporthttp_response_from_fileresp=http_response_from_file("./snapshots/GET/github.com:443/spenczar/hteetp")print(resp.headers)resp_body=resp.read()print(resp_body)
Package: h-testkit
h-testkitA collection of pytest fixtures and other shared code for use in Python tests.Setting up Your h-testkit Development EnvironmentFirst you'll need to install:Git.
On Ubuntu:sudo apt install git, on macOS:brew install git.GNU Make.
This is probably already installed, runmake --versionto check.pyenv.
Follow the instructions in pyenv's README to install it.
TheHomebrewmethod works best on macOS.
TheBasic GitHub Checkoutmethod works best on Ubuntu.
Youdon'tneed to set up pyenv's shell integration ("shims"), you canuse pyenv without shims.Then to set up your development environment:git clone https://github.com/hypothesis/h-testkit.git
cd h-testkit
make helpReleasing a New Version of the ProjectFirst, to get PyPI publishing working you need to go to:https://github.com/organizations/hypothesis/settings/secrets/actions/PYPI_TOKENand add h-testkit to thePYPI_TOKENsecret's selected
repositories.Now that the h-testkit project has access to thePYPI_TOKENsecret
you can release a new version by justcreating a new GitHub release.
Publishing a new GitHub release will automatically triggera GitHub Actions workflowthat will build the new version of your Python package and upload it tohttps://pypi.org/project/h-testkit.Changing the Project's Python VersionsTo change what versions of Python the project uses:Change the Python versions in thecookiecutter.jsonfile. For example:"python_versions":"3.10.4, 3.9.12",Re-run the cookiecutter template:make templateCommit everything to git and send a pull requestChanging the Project's Python DependenciesTo change the production dependencies in thesetup.cfgfile:Change the dependencies in the.cookiecutter/includes/setuptools/install_requiresfile.
If this file doesn't exist yet create it and add some dependencies to it.
For example:pyramid
sqlalchemy
celeryRe-run the cookiecutter template:make templateCommit everything to git and send a pull requestTo change the project's formatting, linting and test dependencies:Change the dependencies in the.cookiecutter/includes/tox/depsfile.
If this file doesn't exist yet create it and add some dependencies to it.
Use tox'sfactor-conditional settingsto limit which environment(s) each dependency is used in.
For example:lint: flake8,
format: autopep8,
lint,tests: pytest-faker,Re-run the cookiecutter template:make templateCommit everything to git and send a pull request
Package: htexpr
htexpr: Templating for Dashhtexprcompiles an html-like template syntax into Python
expressions, allowing embedded Python expressions in attributes and
content. It is inspired byJSXand intended to complement the
excellentDashpackage, which allows you to write single-page
React apps in Python. For motivation and further instructions, see thedocumentation.ExampleA Unicode table:importdashfromdashimportdcc,html,Input,Output,Statefromhtexprimportcompileimportunicodedataapp=dash.Dash()app.layout=compile("""<div><table style={"margin": "0 auto"}><tr><th>char</th><th>name</th><th>category</th></tr>[(<tr style={'background-color': '#eee' if line % 2 else '#ccc'}><td>{ char }</td><td>{ unicodedata.name(char, '???') }</td><td>{ unicodedata.category(char) }</td></tr>)for line, char in enumerate(chr(i) for i in range(32, 128))]</table></div>""").run()app.run_server(debug=True)Further demonstrations:a largerUnicode tableaBootstrap exampleDevelopment statusI wrote this to help me with a particular project where I kept makingbracketing mistakes.
The code works for that project, but there are likely to be corner
cases I haven't considered.The Python grammar used here is quite simplistic: it recognizes
strings and variously parenthesized expressions. By understanding more
Python it would probably be possible to disambiguate between
comparison operators and tags, and thus drop the requirement to
enclose nested expressions in parentheses.The error messages are not always helpful, and in particular the code
objects don't yet have reliable line-number data.
Package: htflow-utils
# htflow-utils## Name
htflow-utils## Description
A collection of classes and functions that are useful for the handling and reshaping of pymatgen slabs. Also contains helper functions for the TriboFlow and SurfFlow packages, especially to create VASP input sets and specific dynamic relax workflows. For the workflow module, atomate and its (large) dependencies have to be installed.## Installation
We strongly recommend to use a virtual environment for the installation. E.g.: mamba/conda, virtualenv, etc.Install with pip:pip install htflow-utilsOr, if you want to use the workflows module:pip install “htflow-utils[workflows]## Authors and acknowledgment
Firat Yalcin & Michael Wollochfirat.yalcin@univie.ac.atmichael.wolloch@univie.ac.at## License
MIT license
Package: htf-overton-instruments
HTF Extension for Overton Instruments DevicesThis extension enables the testing ofOverton Instruments' devices with htf (Hilster Testing Framework).
More information about htf can be found onHILSTER's websiteand onhtf's documentation site.
This extension works with our community license.PyPi project pagehtf-overton-instrumentsInstallation guideThe htf-overton extension can be installed using pip.pip install -i https://pypi.hilster.io htf-overton-instrumentsNaturally it requires the htf package to be installed, which can be done by followingthis guideExamplesThere are two included examples on how to use this extension with htf.fixture_example.pyshows how to usehtf.fixturesto set up the test environment. Furthermore, thetest_<device>functions can be split into multiple functionality tests (whether bits are getting set, etc.), for this each function name must start withtestor be decorated withhtf.test.testcase_example.pyshowcases htf's functionality more generally. For more information see thehtf documentationon writing tests.Both examples create atestreport.html, as do all htf test runs, where you can see the results and all outputs in a more accessible manner.Device supportCurrently, the devices SWITCH-MATE/HP(vI), GSM-MATE4/8(vI), LDM-MATE(vI) r1.0, MUX-MATE(vI), and SFM-MATE(vI) are supported.
Package: htg-url-generator
HTG URL INSTALLATION1. Install package$pipinstallhtg-url-generator2. Register package in INSTALLED_APPS in the Django settings:INSTALLED_APPS=[...'htg_url',...]3. Declare a new 'AbstractHtgUrlGenerator' wrapper class and override 'create_unique_identifier' method:classExampleGeneratorClass(AbstractHtgUrlGenerator):@staticmethoddefcreate_unique_identifier(**properties):...Includecustomimplementation...Returnvalueforthe'create_unique_identifier'methodshouldbeastring4. Declare a new 'AbstractFetchDataFromSap' wrapper class and override 'create_unique_identifier' method:classExampleFetcherCLass(AbstractFetchDataFromSap):@staticmethoddeffetch_document_from_sap(**properties):...Includecustomimplementation...Returnvalueforthe'fetch_document_from_sap'methodshouldbeabase64encodedstringorNone5. Declare a new 'AbstractDownloadDocumentView' wrapper class:classExampleDownloadDocumentView(AbstractDownloadDocumentView):passBydefault'AbstractDownloadDocumentView'classdoesNOTrequireloginoranypermission.Overrideifnecessary6. Register a new path in 'urls.py' and map declared view class:path('document/<token>/',ExampleDownloadDocumentView.as_view())7. Declare settings for the package in the Django settingsHTG_URL_SETTINGS={'HTG_URL_REDIS_TTL':216000,# 60 minutes'HTG_WRAPPER_CLASS':'app_name.file_name.class_name','DOC_WRAPPER_CLASS':'app_name.file_name.class_name''REDIS_CONNECTION_STRING':'redis_connection_string'orNone}8. Run tests$pythonmanage.pytesthtg_urlNOTEPackagewilluseconnectionstringtoconnecttoRedisifitisdefinedinsettingsunder'REDIS_CONNECTION_STRING'.
Otherwiseitwillinitializeconnectionusingenvironmentvariables(seebelow)Packageexpectsyoutohave'REDIS_HOST','REDIS_PORT','REDIS_PASSWORD'and'CACHE_REDIS_DB'(dbindex)environmentvariablesasfollows:host=os.environ.get('REDIS_HOST'),port=int(os.environ.get('REDIS_PORT')),password=os.environ.get('REDIS_PASSWORD'),os.environ.get('CACHE_REDIS_DB')NOTEPackagealsoexpectsyoutohave'libmagic'installedonyourmachineas'python-magic'librarydependsonit:$sudoapt-getinstalllibmagic1
Package: htithermal
Hti ThermalThis package is used to extract thermal raw datapoints from rJpeg image capture using Hti-Xintai HT-19 Thermal Imager.How to useAfter installing the package:import htithermal as htThen use following commands:Extract thermal datapoint from imagesthemperature_array = ht.convertRjpegToTemperature('C:/Users/gsome/Desktop/Hti-Images/20230417-100642.jpg')Extract all thermal datapoint from images in given directoryht.imagesToThermals(input_dir='C:\Users\gsome\Desktop\Hti-Images')Visualize thermal imageimport matplotlib.pyplot as pltimport pandas as pdplt.imshow(themperature_array)plt.show()
Package: htjs-pdf
A Pure-Python library built as a PDF toolkit.  It is capable of:extracting document information (title, author, …)splitting documents page by pagemerging documents page by pagecropping pagesmerging multiple pages into a single pageencrypting and decrypting PDF filesand more!By being Pure-Python, it should run on any Python platform without any
dependencies on external libraries.  It can also work entirely on StringIO
objects rather than file streams, allowing for PDF manipulation in memory.
It is therefore a useful tool for websites that manage or manipulate PDFs.
Package: htk
python-htkA set of convenience utils for Python requiring no external libs. Some of the best tricks fromdjango-htk, without the bloat and Django dependency.FeaturesDebug via Slack usingslack_debugandslack_debug_json. The best ofprintlndebugging, without the inconvenience of visually fishing for one message out of thousands of log lines.Debug via writing to local file usingfdb(fdebug) andfdb_json(fdebug_json). Certifiably awesome, fast, and secure.How To Use This Awesome?InstallationInstall via PIP:pip install htk(Alternative install via clone) Install via local clone: clone this repository into a directory namedhtkSSH:git clone git@github.com:hacktoolkit/python-htk.git htkHTTPS:git clone https://github.com/hacktoolkit/python-htk.gitAdd yourSlack incoming webhookURL.Create an ENV variable namedHTK_SLACK_WEBHOOK_URLorSLACK_WEBHOOK_URL.For a local clone, you can also create alocal_settings.pyand add the constantHTK_SLACK_WEBHOOK_URLorSLACK_WEBHOOK_URLwithin.Tips on Location of HTK Module (for Local Installation Only)You can place it outside of your app directory tree, and then symlink it inside.To not be nagged by the presence of thehtkdirectory whenever you dogit status, addhtkto your.git/info/excludefile (like.gitignore, but only in your local repository, not checked in).Slack DebugExample usage in Python ShellIn [1]: from htk import slack_debug

In [2]: from htk import slack_debug_json

In [3]: slack_debug('This is seriously awesome!')
Out[3]: <Response [200]>

In [4]: slack_debug('Yeah, no kidding.')
Out[4]: <Response [200]>

In [5]: slack_debug_json({'A':1,'B':2,'C':3,'X':['foo','bar','baz'],'Z':{'nested_key':'nested_val
   ...: ue'}}),
Out[5]: (None,)Check your Slack to verify that the message was posted. If not, perhaps your token was wrong, or the Slack integration was disabled.(Alternative link to screenshot above:https://cl.ly/436cfb4383a2)Profit!FDebug (FDBakafdb, short forfdebug)(Recommended) Create a BASH alias or similar:alias fdb='touch /tmp/fdebug.log; tail -f /tmp/fdebug.log'By default, the file path whichfdbwrites to is/tmp/fdebug.log. This is because/tmpis generally a writeable path on most systems.In a separate window used for debugging, runfdbto watch the logs roll in.from htk import fdbfdb('Not all heroes wear capes')If a different file path is desired, simply invokefdbwith its second optional argument: `fdb('log or debugging message', file_path='/path/to/fdebug.log')See AlsoC# -https://github.com/hacktoolkit/csharp-htkJavaScript -https://github.com/hacktoolkit/htk.jsPHP -https://github.com/hacktoolkit/php-htkPython (full) -https://github.com/hacktoolkit/python-htkPython (lite) -https://github.com/hacktoolkit/python-htk-liteRuby -https://github.com/hacktoolkit/htk-rbAuthors and MaintainersHacktoolkitJonathan TsaiLicenseMIT. SeeLICENSE.md