Saravanan666/pypi-org huggingface dataset:
Package: aigit
AI-powered Git Helper (AIGIT)AIGIT is a command-line interface (CLI) tool that uses OpenAI to generate commit messages for your Git repositories. It checks the status of your Git repository, generates a commit message based on the changes, and commits those changes.InstallationTo install AIGIT, you need Python 3.10 and pip installed on your system. Clone the repository and navigate to the project directory. Then, run the following command:pipinstallaigitThis will install the AIGIT package and its dependencies.ConfigurationBefore using AIGIT, you need to configure your OpenAI API key. Run the following command and enter your API key when prompted:aig--configUsage$aig-h
usage:aig[-h][--config][-y]AI-poweredGitHelper

options:-h,--helpshowthishelpmessageandexit--configConfigureAPIKey-y,--yesAutocommitwithoutaskingforconfirmationTo use AIGIT, navigate to your Git repository and run the following command:aigAIGIT will check the status of your Git repository, generate a commit message, and ask for your confirmation before committing the changes. If you want to auto commit without confirmation, use the-yor--yesoption:aig-yContributingContributions are welcome! Please feel free to submit a pull request.LicenseAIGIT is open-source software licensed under the MIT license.
Package: ai-git-commit
ai-git-commitclick, prompt-toolkitAI Git CommitGenerate Git commit messages automatically with AIBuilt withcoderj001/python-cli-tool📦 InstallationInstall ai-git-commit with pip or pipxpipinstallai-git-commitorpipxinstallai-git-commit🚀 UsageWhen you're ready to commit. To run the CLI in your terminal:ai-git-commitSuggest using alias,alias commit=ai-git-commitadd it to.bashrcor.zshrc.😮 DemoTodoAdd support for OpenAI to generate more accurate and relevant commit messages.Add support for commit message customizationImplement Git hooks to automate the commit process even further.Add the ability to select from multiple AI models to generate commit messages.Improve the user interface with more features and options.
Package: aigremlins
AIGremlinsAI Gremlin - Automatic Error Correction with OpenAI
AI Gremlin is a Python module that leverages OpenAI's GPT-3 to automatically fix errors in your Python code. The module contains two main classes, GremlinTest and AIgremlin, which work together to handle exceptions and get suggestions for fixes from OpenAI's API.Note:
Using this code in real applications is a terrible idea for many reasons, including:Creating the machine revolution by given an AI direct possibility to execute functions without anyone chekcing.There's no garantuee that the AI generated function won't break anything else or delete something import.Many other reasons.Don't even think about using this in production.Installationpip install aigremlinsExample usagefrom aigremlins import AIGremlin

# Initialize AI Gremlin instance with your OpenAI API key
gremlin = AIgrAIGremlinemlin(api_key="your_openai_api_key", verbose=True)

# Define the function with an error
@gremlin.ai_backstop
def buggy_function(a, b):
    """ This function should always return a value"""
    return a / b

# Call the function with parameters that cause an exception
result = buggy_function(4, 0)FeaturesAutomatically detects and corrects errors in your Python functions using OpenAI's GPT-3.
Tries to stay as close as possible to the intent of the original function.
Dynamically adds and executes the new fixed function in the original namespace.
Customizable parameters to control the number of iterations, token limit, temperature settings, and verbosity of the output.
Ability to add custom instructions for OpenAI's API.How It WorksThe AIgremlin class wraps your target function with a decorator called ai_backstop.
When the target function encounters an exception, the ai_backstop decorator captures the error, function code, and parameters.
The ai_backstop decorator formats a prompt for OpenAI's API to get a suggestion for fixing the function.
The suggestion is received from OpenAI's API, and a new fixed function is generated.
The fixed function is added to the original namespace and executed.
The process continues until the fixed function executes without errors or the maximum number of iterations is reached.UsageImport the AIgremlin class from the module.Instantiate an AIgremlin object with your OpenAI API key and other optional parameters (e.g., max_iterations, max_tokens, temperature, temperature_escalation, verbose, and instructions).Define your function and apply the ai_backstop decorator to it.Call the decorated function as you normally would. If an exception is encountered, the AI Gremlin will automatically attempt to fix it using OpenAI's API.Optionstemperature -> default temperature of the model used.temperature escalation -> the model can become increasingly creative. Should be somewhere between the range of 0.1-0.4 as the max temperature is 1.instructions -> you can give additional instructions to the AI to take into consideration.
Package: aigyminsper
AIGYMThe goal of this libray is provide a set of tools to help you to learn Artificial Intelligence.How to setup the environmentTo avoid any configuration problems, we recommend creating a virtual environment with python:python3-mvirtualenvvenvsourcevenv/bin/activate
python-mpipinstall--upgradepip
pipinstall-rrequirements.txtTo quit the virtual environment, typedeactivate. If you already have the virtual environment configured then typesource venv/bin/activate.How to test the projectTo run the tests, please type in the root directory:exportPYTHONPATH=.
pytesttestsHow to upgrade the packageIf you need to upgrade the package, please follow these steps:change what you need in the code;test it :smile: ;describe what you did in theChangelog.mdfile;change thesetup.pyfile. In special, theversionattribute;commit and push the changes onmainbranch;then do the same on thestablebranch;We have two workflows in the GitHub Actions:to publish the package in the PyPI when you push something in thestablebranch. This workflow does the same as:pythonsetup.pysdist
twineuploaddist/*to publish the website (documentation) in the GitHub Pages.How to install the packagepipinstallaigyminsperChange logThe change log of this library is in theChangelog.mdfile.DocumentationThe documentation of this library is in thedocsfolder.
We are usingMkDocsto generate the documentation.To see the documentation in your local machine, please type:mkdocsserveTo deploy a new version of the documentation, please merge the content in the stable branch:gitcheckoutstable
gitmergemaster
gitpushThere is a GitHub Action that will deploy the documentation in the GitHub Pages.
Package: aiha
🦉 AI Hardware AdvisorAIHA, Guiding AI with Wisdom and KnowledgeAIHA is a tool to help you choose the best hardware for your AI project. With AIHA you will able to choose wisely
the resources you need for inference or training any model on the Hugging Face Hub.AIHA is currently in construction.Feel free to contribute to the project by opening an issue or a pull request.If you find the project useful, please consider giving it a star ⭐️.
Package: aihandler
AI HandlerThis is a simple framework for running AI models. It makes use of the huggingface API
which gives you a queue, threading, a simple API, and the ability to run Stable Diffusion and LLMs seamlessly
from your local hardware.This is not intended to be used as a standalone application.It can easily be extended and used to power interfaces or it can be run from the command line.AI Handler is a work in progress. It powers two projects at the moment, but may not be ready for general use.InstallationThis is a work in progress.Pre-requisitesSystem requirementsWindows 10+Python 3.10.8pip 23.0.1CUDA toolkit 11.7CUDNN 8.6.0.163Cuda capable GPU16gb+ ramFor Windows, follow windows branch instructionsInstallpip install https://github.com/w4ffl35/diffusers/archive/refs/tags/v0.15.0.ckpt_fix_0.0.1.tar.gz
pip install aihandlerOptionalThese are optional instructions for installing TensorRT and Deepspeed for WindowsInstall Tensor RT:Download TensorRT-8.4.3.1.Windows10.x86_64.cuda-11.6.cudnn8.4Git clone TensorRT 8.4.3.1Follow their instructions to build TensorRT-8.4.3.1 python wheelInstall TensorRTpip install tensorrt-*.whlInstall Deepspeed:Git clone Deepspeed 0.8.1Follow their instructions to build Deepspeed python wheelInstall Deepspeed `pip install deepspeed-*.whlEnvironment variablesAIRUNNER_ENVIRONMENT-devorprod. Defaults todev. This controls the LOG_LEVELLOG_LEVEL-FATALfor production,DEBUGfor development. Override this to force a log levelHuggingface variablesOffline modeThese environment variables keep you offline until you need to download a model. This prevents unwanted online access and speeds up usage of huggingface libraries.DISABLE_TELEMETRYKeep this set to 1 at all times. Huggingface collects minimal telemetry when downloading a model from their repository but this will keep it disabled.See more info in this github threadHF_HUB_OFFLINEWhen loading a diffusers model, huggingface libraries will attempt to download an updated cache before running the model. This prevents that check from happening (long with a boolean passed toload_pretrainedsee the runner.py file for examples)TRANSFORMERS_OFFLINESimilar toHF_HUB_OFFLINEbut for transformers models
Package: aihandlerwindows
AI HandlerThis is a simple framework for running AI models. It makes use of the huggingface API
which gives you a queue, threading, a simple API, and the ability to run Stable Diffusion and LLMs seamlessly
from your local hardware.This is not intended to be used as a standalone application.It can easily be extended and used to power interfaces or it can be run from the command line.AI Handler is a work in progress. It powers two projects at the moment, but may not be ready for general use.InstallationThis is a work in progress.Pre-requisitesSystem requirementsWindows 10+Python 3.10.8pip 23.0.1CUDA toolkit 11.7CUDNN 8.6.0.163Cuda capable GPU16gb+ ramInstallpip install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 --index-url https://download.pytorch.org/whl/cu117
pip install https://github.com/w4ffl35/diffusers/archive/refs/tags/v0.14.0.ckpt_fix.tar.gz
pip install https://github.com/w4ffl35/transformers/archive/refs/tags/tensor_fix-v1.0.2.tar.gz
pip install https://github.com/acpopescu/bitsandbytes/releases/download/v0.37.2-win.0/bitsandbytes-0.37.2-py3-none-any.whl
pip install aihandlerwindowsOptionalThese are optional instructions for installing TensorRT and Deepspeed for WindowsInstall Tensor RT:Download TensorRT-8.4.3.1.Windows10.x86_64.cuda-11.6.cudnn8.4Git clone TensorRT 8.4.3.1Follow their instructions to build TensorRT-8.4.3.1 python wheelInstall TensorRTpip install tensorrt-*.whlInstall Deepspeed:Git clone Deepspeed 0.8.1Follow their instructions to build Deepspeed python wheelInstall Deepspeed `pip install deepspeed-*.whlEnvironment variablesAIRUNNER_ENVIRONMENT-devorprod. Defaults todev. This controls the LOG_LEVELLOG_LEVEL-FATALfor production,DEBUGfor development. Override this to force a log levelHuggingface variablesOffline modeThese environment variables keep you offline until you need to download a model. This prevents unwanted online access and speeds up usage of huggingface libraries.DISABLE_TELEMETRYKeep this set to 1 at all times. Huggingface collects minimal telemetry when downloading a model from their repository but this will keep it disabled.See more info in this github threadHF_HUB_OFFLINEWhen loading a diffusers model, huggingface libraries will attempt to download an updated cache before running the model. This prevents that check from happening (long with a boolean passed toload_pretrainedsee the runner.py file for examples)TRANSFORMERS_OFFLINESimilar toHF_HUB_OFFLINEbut for transformers models
Package: ai-harness
AI HarnessIntroductionThis project would like to supply some convenient tools for the machine learning and deep learning.
Current features:XMLConfiguration: for loading a configuration defined in xml files into a Python ObjectArguments: Mapping a Python Object to the arguments of argparseinspector: Some convenient method for class/objectexecutors: Some convenient ProcessExecutorfileutils: DirectoryNavigator, FileReadPipeLineothers:Log2019.4.18, version: 0.3.0: Added distributed training tools for python2019.4.23, version: 0.3.5: Added a Json file Reader2019.4.24, version: 0.3.6: Added a data utils for processing data2019.4.26, version: 0.3.7 Added a data utils for processing data for zip file2019.4.28, version: 0.3.8 Added QueueExecutorExamples1. XMLConfiguration(1) Define the configuration in xml file like:<?xml version="1.0" encoding="UTF-8" ?><configuration><argname="name"default="TestName"help="Name Test Help"/><argname="age"default="20"help="Age Test Help"/><groupname="address"><argname="home"default="shanghai"help="Home test Help"/><argname="phone"default="136"help="Phone test Help"/></group><groupname="education"><argname="school"default="beijing"help="school test Help"/><argname="grade"default="master"help="grade test Help"/></group></configuration>you can define multiple xml configuration files, and if the name is same, the value of the later will cover the previous.(3) Define the configuration class like:from aiharness.configuration import configclass,field

@configclass
class Address:
    phone: int = field(139, "phone help")
    home: str = field("beijing", "phone help")


@configclass
class Education:
    school: str = field('ustb', "phone help")
    grade: str = field("master", "phone help")


@configclass
class Config:
    name: str = field("test", "name help")
    age: str = field(10, "age help")
    address: Address = Address()
    education: Education = Education()(3) Load the xml configuration into python object as folling:from aiharness.configuration import XmlConfiguration

config:Config=XmlConfiguration(Config).load(['configuration1.xml','configuration2.xml'])Arguments ExampleGenerally, we use argparse as following:import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--name",default='TEST',help='name help')
parser.add_argument("--age",default=18,help='age help')
arguments=parser.parse_args()And you can got a arguments object.Here give an example showing how to load a xml configuration and set to argparse arguments and to parse the arguments into a object you defined.
And here the Config Class and 'configuration.xml' are same with those of the Configuration example.Firstly, in fact, the Config Class instead of the codes of 'add_argument' of the argparse.ArgumentParser.
Secondly, you can put the configuration into a xml file so that you can change it conveniently.from aiharness.configuration import  Arguments, XmlConfiguration

config: Config = XmlConfiguration(Config).load(['configuration.xml'])
arguments = Arguments(config)
config: Config = arguments.parse()
Package: ai-harness-sdk
AI-HarnessAI-Harness is a Python package designed to showcase and utilize the capabilities of the AI Harness platform. This SDK provides a set of tools and functionalities to interact with the AI Harness ecosystem and integrate AI models seamlessly.InstallationYou can install AI-Harness using pip:pipinstallai-harnessUsage# Import necessary modulesfromdotenvimportload_dotenv
fromai_harness.documents.documentimportDocuments# Load environment variables from a .env fileload_dotenv()# Initialize a Documents instancedoc_instance=Documents()# To Create a collection in the AI Harness platformdoc_instance.create_collection(collection_name="sample_collection")# Upload documents to the created collectiondoc_instance.upload_documents(doc_path=r"document_path",# Specify the path to the documentscollection_id="",# Provide the ID of the target collectioningest_with_google="false"# Indicate whether to ingest documents using Google API or open source pdf loader)# import applets from agentsfromai_harness.agents.applet_nameimportapplet_name# run a Conversation appletresult=Conversation(prompt="Your Prompt").run()# run a Place Making appletresult=PlaceMaking(site_name="write site name here").run()# run a Query Generator appletresult=QueryGenerator(prompt="Your Prompt",dialect="dialect name",schema="schema",db_type="db type(relational or non-relational)",additional_filters="any additional filters").run()# run a Site Analysis appletresult=SiteAnalysis(lat="latitude of site",# either use coordinates or site IDlong="longitude of site",siteId="URA site id of site",# using URA site IDproperties=["stations","market_analysis","competitive_analysis","airport","seaport","zones","history","demographics"],#  list of features that can be usedmarket_analysis="residential",# market analysis (residential , commercial or industrial)competitive_analysis="industrial"# competitive analysis (residential , commercial or industrial)).run()# run JSON TO JSON appletresult=JsonToJson(input_json="input json",output_json="output json",).run()# run Query Retrieval appletresult=QaRetrieval(prompt="prompt",document_id="id of document uploaded on ai harness",).run()
Package: ai-header-generator
AI Header GeneratorAI Header Generator is a Python package that generates headers for your code files using OpenAI's GPT-4. It supports various file types and can be easily customized via a configuration file.Software RequirementsPython 3.8 or higherPip (package installer for Python)OpenAI API KeyGitInstallation InstructionsClone the repository to your local machine: git clonehttps://github.com/your-username/your-repo.gitNavigate to the project directory: cd ai-generated-headersCreate a virtual environment: python -m venv venvActivate the virtual environment: source venv/bin/activate (for Unix-based systems) or venv\Scripts\activate (for Windows)Install the project dependencies: pip install -r requirements.txtCopy the config.ini.sample file to config.ini: cp config.ini.sample config.iniOpen config.ini and add your OpenAI API Key.You're ready to go!UsageTo generate headers for your code files, run:ai-header-generatorTo generate a README file based on the generated headers, use the --readme option:ai-header-generator--readmeTo use a custom configuration file, use the --config option:ai-header-generator--configpath/to/your/config.iniConfigurationThe config.ini file contains the following configuration options:api_key: Your OpenAI API key.
folder_path: The path to the folder containing the code files to be analyzed.analysis_file_extension: The file extension of the code files to be analyzed (e.g., .sql).template_file: The path to the JSON file containing the template for generating headers.Modify these options to customize the behavior of the AI Header Generator.
Package: aihero
AI Hero Python SDKThe AI Hero Python SDK offers a powerful set of tools for managing and developing AI models. With our latest release, you can easily manage prompt templates and versions, allowing for easier and more effective model development, testing, and deployment.AI Hero's PromptCraft and PromptStash helps you with:Prompt Creation: Define and format AI's interaction templates.Project Initialization: Quickly set up projects with a dedicated ID and API key.Version Control for Prompts: Easily stash, manage, and recall prompt variants.Track and Monitor AI Interactions: Document and visualize every AI interaction in real-time.Analysis and Oversight: Observe AI's steps and decision-making.Evaluation: Implement automated testing for AI's responses and compare your previous runs.Feedback System: Seamlessly log user feedback on AI outputs.InstallationInstall AI Hero using pip:pipinstallaihero==0.3.1PromptCraftAre you a product manager navigating the dynamic AI space? Imagine having the power to track edits in a shared document, but for AI prompts. With prompt versioning, we can keep an eye on alterations, dip back into past iterations, and streamline updates. Ever wished you could pull up an older version of an AI prompt for clarity or comparison without diving deep into the technical weeds? "PromptCraft" is your ally, tailor-made to simplify the journey for those on the product side of things.How to use itIn a folder for your project, create a file.envcontaining the following API Keys:OPENAI_API_KEY=<Your OpenAI API Key>
AI_HERO_PROJECT_ID=<Project ID from your project the AI Hero Website>
AI_HERO_PROJECT_API_KEY=<API Key for the project>Running PromptCraftIf you're using the Completions API:aihero promptcraft completionsOR if you are using the Chat Completions API:aihero promptcraft chat_completionsThere's more coming soon!We're building a notebook for Retrieval Augmented Generation.Hit us up if you'd like a custom demo atteam@aihero.studio.
Package: ai-hub
AI_HUBAI utils for developer.
such as notice、send massage when model training is over.Bind WeChat Official Account（AI_HUB）
插入在代码里的小工具，可以在模型训练结束时通过公众号及时发送微信消息给自己，提高科研效率。
inferServer: server your ai model as a API and match the tianchi eval
简单的操作把你训练好的模型变为服务API，并且支持天池大赛的流评测。INSTALLpip install ai-hubSAMPLENOTICEfromai_hubimportnotice#到AGIHub微信公众号获取个人openid如（oM8pVuBWl8Rw_vFz7rZNgeO4T8H8）,需替换为自己的openidnc=notice("oM8pVuBWl8Rw_vFz7rZNgeO4T8H8")#借助AGIHub公众号发送消息给自己nc.sendmsg("hi,AI_HUB.I am su")inferServer'''依赖：pip install ai-hub #(version>=0.1.7)测试用例：model为y=2*x请求数据为json:{"img":3}-----------post请求：curl localhost:8080/tccapi -X POST -d '{"img":3}'返回结果 6'''fromai_hubimportinferServerimportjsonclassmyInfer(inferServer):def__init__(self,model):super().__init__(model)print("init_myInfer")#数据前处理defpre_process(self,data):print("my_pre_process")#json processjson_data=json.loads(data.decode('utf-8'))img=json_data.get("img")print("processed data: ",img)returnimg#数据后处理defpost_process(self,data):print("post_process")processed_data=datareturnprocessed_data#模型预测：默认执行self.model(preprocess_data)，一般不用重写#如需自定义，可覆盖重写#def pridect(self, data)：#    ret = self.model(data)#    return retif__name__=="__main__":mymodel=lambdax:x*2my_infer=myInfer(mymodel)my_infer.run(debuge=True)#默认为("127.0.0.1", 80)，可自定义端口，如用于天池大赛请默认即可，指定debuge=True可获得更多报错信息TccProgressBarfromai_hubimportTccProgressBar#定义progress，显示名为training，在竞赛平台TCC上显示该进度条（tccBar_show=false 不影响本地打印进度条）progress=TccProgressBar(title="training",tccBar_show=True)forjinprogress(range(100)):time.sleep(0.1)TccTensorboardfromai_hubimportLogger#Logger用法与tensorboard的logger包一致info={'loss':loss.data[0],'accuracy':accuracy.data[0]}fortag,valueininfo.items():logger.scalar_summary(tag,value,step)获取OPENID1.扫描关注公众号AGIHub2.发送“openid”给公众号 即可获得openid