Saravanan666/pypi-org huggingface dataset:
Package: hey_rexec
RExec is a simple interface for running R in bulk on .R files.
It is not intended to be a replacement for rpy or rpy2.
If you’re the kind of person who does some analysis in R and just wants
to mechanize running it (rather than a closer integration with Python),
this library might be for you.__doc__A chaining R executing object.RExec lets you run R code and get the results from Python.  For the
most part, the interface is pretty hacky.  The goal is to make it
easy to automate the usage of existing R files, rather than make
elegant programs integrating R and Python.  (For the latter, you
might consider rpy or rpy2.)An RExec object takes a directory where it will be run.  You can then
add R code to the object in a variety of ways (append_string,
append_file and so on).  When you are done appending to the RExec
object, you can use the execute() method which will run an R slave
process on all of the R that you have appended so far (concatenated
together.  Finally, you can get access to results of your R script
in a relatively unorthodox way.  Any files output with an “r_” prefix
will be available by calling get_text() or get_graphic() as appropriate.RExec has a chaining interface.  This means you can do things like:r_ex=(RExec(some_dir).append_file("some.R").append_file("other.R").execute())r_ex.get_graphic('foo.svg',path='absolute')
Package: heysops
# HeySopsA helpful utility for interfacing with sops. Inspired by
[git-secret](https://git-secret.io/)## Configuration### Environment VariablesSOPS_PATH- Set the path to the sops binary. By default, it will search the path for the SOPS binary file.### Configuration FileHeySops uses a configuration file named .heysops.yaml or .heysops.yml. This file should be stored in the root of your
repository, next to your .gitignore file.## Commands### Common Arguments-c- Specify a .heysops.yaml file to use during execution.-f- Force an action, such as overwriting files.-v- Display informational log event entries### Initheysops init- Creates a .heysops.yaml file in the current directory if it
does not exist. This must be run before other commands. You can have
multiple .heysops.yaml within a folder structure.### Encryptheysops encrypt- Encrypts all files that were previously encrypted with
this tool. Uses the .heysops.yaml file in the local directory. If
.heysops.yaml is not found in the current directory, it traverses upwards
until it finds one. If it doesn’t find one, it warns and exits.heysops encrypt [file]- Encrypts the specified file, creating a new
file alongside it with the.sopsextension.heysops encrypt –type {json,yaml,dotenv,binary} [file]- Encrypts the
specified file, creating a new file alongside it with the.sopsextension.
Passes the specified–typeto sops’s–input-typeargument. Will use the
same type on decryption.### Decryptheysops decrypt- If no files are specified, it looks for a file
named .heysops.yaml in the local directory. If .heysops.yaml is not found
in the current directory, it traverses upwards
until it finds one. If it doesn’t find one, it warns and exits.
Prompts if the decrypted file name already exists.heysops decrypt [file]- Decrypts the specific file.
Prompts if the decrypted file name already exists.### Cleanheysops clean- Removes all decrypted files if we have an encrypted copy.### Forgetheysops forget [file]- Untrack a file within .heysops.yaml. This will
leave the file on the system and no longer interact with it through other
commands.
Package: heysummit
Hey Summit API is a requests based client to the Hey Summit API.Free software: Apache 2.0 LicenseDocumentation:https://api-docs.heysummit.com/#introductionFeaturesAll features from the HeySummit API are implemented. Sadly the API seems unversioned at this point so I cannot guarantee stability.ExamplesThe only required argument is the HeySummit API token.This is an example usage:import argparse

from heysummit.api import HeySummit, HeySummitException

def list_attendees():
    attendees = hey.get_all_attendees()

    print("There are {n} attendees".format(len(attendees)))
    for attendee in attendees:
        print("id: {id}, email: {email}".format(
                id=attendee['id'], email=attendee['email']
                )
        )

def get_events():
    events = hey.get_events(is_live=True)

    for event in events:
      print(event)

# main

# Parse Arguments
parser = argparse.ArgumentParser(description='HeySummit interaction script.')
parser.add_argument('-t', '--token', type=str, help='API Token. Example: jdoe.', required=True)

args = parser.parse_args()

hey = HeySummit(token=args.token)

print(hey.get_all_attendees(event=5573))

talks = hey.get_talks(event=5573, is_active=True)

for talk in talks:
    print(talk)
Package: heysync
Hey, Sync!This package will allow you to convert an async function or a class (that has async methods) to a sync version.The new class name will be set as<OLD CLASS NAME>SyncInstallationpip install heysyncUsageAsync FunctionsYou can convert async functions to sync function by:Normal usage:fromheysyncimportasync_to_sync_funcasyncdefasync_func()->str:return"Hey there"sync_func=async_to_sync_func(async_func)# now you can call sync_func in the usual waysync_func()# Hey thereAs a decorator:fromheysyncimportasync_to_sync_func@async_to_sync_funcasyncdefsome_func()->str:return"boo"some_func()# booClassesYou can also convert async classes:fromheysyncimportmake_sync_class# a class with async methodsclassFoo:def__init__(self,x:int)->None:self.x=xasyncdef__aenter__(self):self.x+=2awaitasync_func()returnselfasyncdef__aexit__(self,exc_type,exc_value,exc_tb)->None:self.x-=1awaitasync_func()asyncdefmy_func(self)->str:returnf"Output is{self.x}"FooSync=make_sync_class(Foo)withFoo(7)asfoo:foo.my_func()# Output is 9foo.my_func()# Output is 8
Package: heyvi
"Hey Vi!"HEYVI: Analytics for Visual AIdocs:https://developer.visym.com/heyviHEYVI is a python package for visual AI that provides systems and trained models for activity detection and object tracking in videos.HEYVI provides:Real time activity detection of theCAP activity classesReal time activity detection of theMEVA activity classesReal time visual object tracking in long duration videosLive streaming of annotated videos to youtube liveVisual AI from RTSP camerasRequirementspython 3.*ffmpeg(required for videos)vipy, torch, pytorch_lightning (for training)InstallationpipinstallheyviQuickstartv=heyvi.sensor.rtsp().framerate(5)T=heyvi.system.Tracker()withheyvi.system.YoutubeLive(fps=5,encoder='480p')ass:T(v,frame_callback=lambdaim:s(im.pixelize().annotate()))Create a default RTSP camera and GPU enabled object tracker, then stream the privacy preserving annotated video (e.g. pixelated bounding boxes with captions) to a YouTube live stream.
Package: heywatch
Client Library for encoding Videos with HeyWatchHeyWatch is a Video Encoding Web Service.For a CLI, look at the ruby version:http://github.com/particles/heywatch-rubyFor more information:HeyWatch:http://www.heywatchencoding.comAPI Documentation:http://www.heywatchencoding.com/docsTwitter: @heywatch / @sadikzzzChangelogs2.2.0
Added a new method #config to generate a full configuration based on the given parameters. It’s especially useful to handle dynamic settings like source or variables that can be set directly in code.2.0.0
New version of the client library which uses the HeyWatch API v2. This library is not compatible with 1.x1.0.0
First version
Package: heyy
HEYY - some simple utilitiesUsageimportheyy# Temporarily change the working directory# to complete some IO operation (e.g. save data to files)@heyy.with_folder('my_folder')defsome_io_operation():pass# convert dict to objectimportrequestsres=requests.get('<url>')data=res.json()dict_obj=heyy.json2obj(data)# reflect attrs and values of an objectobj=dict_objheyy.reflect(obj,skip_callable=True)# default False
Package: heyyou
heyyou - the "Hey, You!" programheyyouis a command line application that prints out 'Hey, You!' in the chosen language.Currently,heyyousupports the following languages and many more:English (EN)Spanish (ES)French (FR)German (DE)Italian (IT)To useheyyouwith a specific language, simply provide the language code as an argument. For example, to print "Hey, You!" in Italian, runheyyou IT.
Runningheyyouwithout any argument will default to English, thus printing outHey, You!Enjoy usingheyyouand spreading greetings in different languages!
Package: hface
Documentation|GitHub|PyPIHTTP client and server written in PythonHTTP/1.1, HTTP/2, and HTTP/3 supportSans-IOcore with pluggable protocol implementationsasyncioorTriosupport thanks toAnyIOLayered design with well-defined APIsSee onlinedocumentationfor more info.LicenseCopyright 2022 Akamai Technologies, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: hfapi
PurposeOther public Python implementations of the HackForums API have shown to
be immature or varying levels of incomplete. The goal of this project is
to provide a fully usable Python API for Hackforums available throughpip.hfapifeatures include: - Read/Write profile user profile
information - Easy and intuitive integration with Python network
applications - Synchronous (requests) and Asynchronous (aiohttp)
implementations - All API objects are defined with PydanticHow-To: InstallInstallation is easy!python3 -m pip install -U hfapiHow-To UseThe synchronous and asynchronous API implementations are identical in
functionality and usage with the addition ofawaitsyntax in the
asynchronous version.# use "HFApp" and "HFClient" for synchronous
from hfapi import HFAppAsync, HFClientAsync

app = """ EXAMPLE WEB SERVER HERE """

hf = HFAppAsync(
    client_id="[CLIENT_ID]",
    secret_key="[SECRET_KEY]",
    redirect_uri="https://example.com/authorize",
)

# Hackforums will submit a GET request with "code" as a parameter
@app.get("/authorize")
async def authorize(code: str):
    # use the `hf.authorize` method to create a client session
    client = await hf.authorize(code)
    me = await client.me(all=True)  # collect all (possible) data from current user
    return me.dict()
Package: hf-argparser
HF ArgparserStandalone Argument Parser from HuggingFace Transformers.This is a standalone version of the argument parser used in the HuggingFace Transformers library. It is a simple wrapper around theargparselibrary that allows you to easily define your command-line arguments for your scripts using dataclasses.Installationpipinstallhf-argparserUsagefromdataclassesimportdataclassfromhf_argparserimportHfArgumentParser,HFArg@dataclassclassAddArgs():x:inty:int@dataclassclassOutputArgs():output_file:str=field(default=None,metadata={'help':'output filename'})parser=HfArgumentParser([AddArgs,OutputArgs])add_args,output_args,unknown_args=parser.parse_args_into_dataclasses(return_remaining_strings=True)returnadd_args,output_args,unknown_argsAbove code is taken fromthis postby @kenilc.See theTransformers documentationfor more information on how to use theHfArgumentParser.Todo[] Automate pulling new changes tohf_argparserfromtransformersrepo.[] Automate creating new releases on PyPi.[] Add tests.[] Improve README.AcknowledgementsHuggingFace Transformers :hugs:
Package: hf-chat
Unofficial HuggingFace chat api.DescriptionA simple async ready wrapper for reverse engineered API ofHuggingChat.The project has no affiliation with Hugging Face, and it is neither endorsed nor officially supported by Hugging Face. 
The repository owner(s) and contributors cannot be held responsible for any damages or losses resulting from the 
utilization of this repository or its contents. Users bear sole responsibility for their actions and any potential 
consequences that may ensue.Installingpip install hf-chatQuickstartimport asyncio
from hf_chat import ChatCompletion

async def main():
    chat = ChatCompletion("email", "password")
    async with chat:
        await chat.create_conversation(switch_to=True)
        user_input = input('> ')
        print(await chat.ask(user_input))
        
asyncio.run(main())Inspired bySoulter/hugging-chat-api
Package: hf-clean-benchmarks
hf_clean_benchmarksThis repository is heavily inspired by theBigCode
repositoryand is mostly a refactoring of their code. Specifically, the main person
who worked on this repository isChenghao
Mou(Awesome work!).Installpipinstallhf_clean_benchmarksHow to useUsing the APIFirst you need to specify which benchmarks you want to clean your data
of. You can do this by creating dictionary with the benchmark name in
huggingface’s datasets repository as the key and the name of the column
containing the benchmark data as the value. For example, if you want to
clean your data of theHumanEvalandLAMBADAbenchmarks, you would
do the following:# Benchmarks to cleanbenchmarks=[{"name":"openai_humaneval","splits":["test"],"columns":["prompt","canonical_solution","test"],},{"name":"lambada","splits":["test"],"columns":["text"],},]You then pass this dictionary to theBenchmarkCleanerclass. This class will download the benchmarks and construct the suffix
array for each benchmark. You can then use thecleanmethod to clean a
huggingface dataset. For example:fromdatasetsimportload_datasetfromhf_clean_benchmarks.coreimportBenchmarkCleanercleaner=BenchmarkCleaner(benchmarks,threshold=0.1,num_perm=128)# load your datasetdataset=load_dataset("bigcode/the-stack-smol",data_dir="data/python",split="train")# clean the datasetcleaned_dataset=cleaner.clean(dataset,column="content")Checking for false positives...: 100%|██████████| 8780/8780 [00:34<00:00, 251.05it/s]
Checking for false positives...: 100%|██████████| 8805/8805 [07:34<00:00, 19.39it/s][11/06/22 10:34:43]INFOData Number                   :10000core.py:210INFODuplicate Number              :4033core.py:211INFODuplicate Rate                :40.33%core.py:212INFOTotal Time                    :493.73secondscore.py:213cleaned_datasetDataset({
    features: ['content', 'avg_line_length', 'max_line_length', 'alphanum_fraction', 'licenses', 'repository_name', 'path', 'size', 'lang', '__id__'],
    num_rows: 5967
})Using the CLIFirst you need to specify which benchmarks you want to clean your data
of. You can do this by creating a json file with the benchmark name in
huggingface’s datasets repository as the key and the name of the column
containing the benchmark data as the value. For example, if you want to
clean your data of theHumanEvalandLAMBADAbenchmarks, you would
do the following:file:benchmarks.json[{"name":"openai_humaneval","splits":["test"],"columns":["prompt","canonical_solution","test"],},{"name":"lambada","splits":["test"],"columns":["text"],},]You then pass this json file to theclean_datasetcommand. This command will download the benchmarks and construct the
suffix array for each benchmark. You can then use thecleancommand to
clean a huggingface dataset. For example:clean_dataset\--dataset_namebigcode/the-stack-smol\--column_namecontent\--benchmark_configs_pathbenchmarks.json\--output_path/tmp/test.jsonl\--data_dirdata/python\--dataset_splittrain\--save_json
Package: hf-datasets
Simple check list for release from AllenNLP repo:https://github.com/allenai/allennlp/blob/master/setup.pyTo create the package for pypi.Change the version in __init__.py, setup.py as well as docs/source/conf.py.Commit these changes with the message: “Release: VERSION”Add a tag in git to mark the release: “git tag VERSION -m’Adds tag VERSION for pypi’ ”
Push the tag to git: git push –tags origin masterBuild both the sources and the wheel. Do not change anything in setup.py between
creating the wheel and the source distribution (obviously).For the wheel, run: “python setup.py bdist_wheel” in the top level directory.
(this will build a wheel for the python version you use to build it).For the sources, run: “python setup.py sdist”
You should now have a /dist directory with both .whl and .tar.gz source versions.Check that everything looks correct by uploading the package to the pypi test server:twine upload dist/* -r pypitest
(pypi suggest using twine as other methods upload files via plaintext.)
You may have to specify the repository url, use the following command then:
twine upload dist/* -r pypitest –repository-url=https://test.pypi.org/legacy/Check that you can install it in a virtualenv by running:
pip install -ihttps://testpypi.python.org/pypinlpUpload the final version to actual pypi:
twine upload dist/* -r pypiCopy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.Update the documentation commit in .circleci/deploy.sh for the accurate documentation to be displayedUpdate README.md to redirect to correct documentation.
Package: hfdownloader
HFDownloader - Hugging Face Model DownloaderThis package provides the user with one method that downloads a tokenizer and model fromHuggingFace Model Hubto a local path.This package utilizes thetransformerslibrary to download a tokenizer and model using just one method. When a model is downloaded, it will save a state from a loaded tokenizer and model to a local path. If the path does not exist, the method will create one with the title passed.This Github repo also allows you to run 'hf_downloader.py' like a script if you don't want to open a python terminal. It has two positional arguments, the model and the pathname you wish the model to save to. Example usage may look something like this in the command line.python hf_downloader.py cardiffnlp/twitter-roberta-base-sentiment sentiment_model_pathInstallationThe package can be installed with the following command:pip install hfdownloaderHow to UseHere is a bit of code you can reference to see how to use the package. I will be using another package I released calledHFLoader, that simply loads the tokenizer and model. You can do this in any way, this package is not required.import hlfloader as hfl
import hfdownload as hfd

huggingface_model = "cardiffnlp/twitter-roberta-base-sentiment"
tokenizer, model = hfl.load_model(huggingface_model)
hfd.save_model("HuggingFaceModelPath", tokenizer, model)The code above is the easiest way I have found to save models from the HuggingFace Model Hub locally.Requirementspip install transformersNot required but helpfulpip install hfloaderNotesI don't have plans to upkeep this project unless it necessitates it. I was able to achieve the goal I had set out when developing the package.
Package: hfendpoint
HFEndpoint - Set up local API Endpoint for any HuggingFace modelThis package provides the user with one method that opens a local API endpoint for any fromHuggingFace Model Hub.This package utilizes theFastAPIlibrary to set up an API Endpoint under127.0.0.1:8000/docs. It also makes use of HuggingFace'stransformerspackage,pydantic, and a package I createdhfloader.  Which can be foundhere.InstallationThe package can be installed with the following command:pip install hfendpointHow to UseTo use this package, all you need to do is import the package via this command.from hfendpoint import LoadApiEndpointThe functionLoadApiEndpointexpects one variable of typestr. This can be a local path to a model, or any package on theHuggingFace Model Hub.Usage may look something along the lines of:from hfendpoint import LoadApiEndpoint

app = LoadApiEndpoint("cardiffnlp/twitter-roberta-base-sentiment")Important:After running the script and loading the api endpoint, you have to call this command in cmd:uvicorn script:app --reloadSo, if the script that was written was calledscript.py, you need to exclude the.pyin the command call.Requirementspip install transformers
pip install fastapi
pip install uvicorn
pip install pydanticNotesI don't have plans to upkeep this project unless it necessitates it. I was able to achieve the goal I had set out when developing the package.
Package: hf-endpoints-emulator
Emulator for Custom Handlers for Inference Endpoints🤗 Inference Endpoints offers a secure production solution to easily deploy any 🤗 Transformers and Sentence-Transformers models from the Hub on dedicated and autoscaling infrastructure managed by Hugging Face.🤗 Inference Endpoints support all of the 🤗 Transformers and Sentence-Transformers tasks as well as custom tasks not supported by 🤗 Transformers yet like speaker diarization and diffusion.Thehf-endpoints-emulatorpackage provides a simple way to test your custom handlers locally before deploying them to Inference Endpoints. It is also useful for debugging your custom handlers.The package provides ahf-endpoints-emulatorcommand line tool that can be used to run your custom handlers locally. It also provides ahf_endpoint_emulatorPython package that can be used to run your custom handlers locally from Python.Installationpipinstallhf-endpoints-emulatorUsageYou can check theexamples/directory for examples on how to use thehf-endpoints-emulatorpackage.Command Linehf-endpoints-emulator--handler<handler>This will start a web server that will run your custom handler. The web server will be accessible athttp://localhost:5000. You can then send requests to the web server to test your custom handler.curlcurl--requestPOST\--urlhttp://localhost/:5000\--header'Content-Type: application/json'\--data'{"inputs": "I like you."}'pythonimportrequestsurl="http://localhost:5000/"payload={"inputs":"test"}headers={"Content-Type":"application/json"}response=requests.request("POST",url,json=payload,headers=headers)print(response.json())Python pacakgefromhf_endpoints_emulator.emulatorimportemulateemulate(handler_path="examples/my_handler.py",port=5000)
Package: hf-fastup
HF-fastupPushes a HF dataset to the HF hub as a Parquet dataset, allowing streaming.
The dataset is processed to shards and uploaded in parallel. It useful for large datasets, for example, with embedded data.UsageMake sure hf_transfer is installed andHF_HUB_ENABLE_HF_TRANSFERis set to1.importhffastupimportdatasetsdatasets.logging.set_verbosity_info()# load any HF datasetdataset=datasets.load_dataset("my_large_dataset.py")hffastup.upload_to_hf_hub(dataset,"Org/repo")# upload to HF Hubhffastup.push_dataset_card(dataset,"Org/repo")# Makes a dataset card and pushes it to HF Hub
Package: hfhd
hfhd is an accelerated Python library for estimating (integrated) covariance matrices with high frequency data in high dimensions. Its main focus lies on the estimation of covariance matrices of financial returns. This is a challenging task since high frequency data are observed irregularly (and non-synchronously across assets) and are contaminated with microstructure noise. The hfhd.hf module provides a collection of tools for synchronization and noise reduction.When many assets are considered relative to the sample size, we say that the covariance matrix has high dimension. Then, sample eigenvalues are overdispersed relative to the population eigenvalues due to the curse of dimensionality. This overdispersion leads to an ill-conditioned covariance matrix estimate. The hfhd.hd module provides tools to improve the condition of the matrix.Read the documentation.Install hfhd$pipinstallhfhdDeveloping hfhdTo install hfhd, along with the tools to develop and run tests, run the following command in your virtualenv after cloning the repo:$pipinstall-e.[dev]