Saravanan666/pypi-org huggingface dataset:
Package: pychatbots
小懒猫闲聊SDK这是小懒猫AI推出的闲聊SDK1.1.1版本。这个SDK是pyd文件。使用说明chat.pyd:示例：--coding:'utf-8'--fromchatimportchatsprint("您需要什么帮助")whileTrue:sel=input()q=chats.chat(None,sel,"your-bot-name",age,"x","like")print(q)函数：1.chats.chat(self,ji,name,age,xibe,like)self填任何东西都可以，建议填Noneji填问题name填机器人的名字age填机器人的年龄xibe填机器人的性别like填机器人的爱好module.pyd:module:以下modulename不包括文件后缀.h6这个文件可以为用户定制机器人编写语料库，如编写客服机器人，聊天机器人预训练模型在module-tool中chat.h6：这个模型包含404条语料（预训练模型）（通用）chat.txt:chat.h6对应文件数据集，自己编写数据集请参考chat-1.h6:内容与chat.h6部分相同（女），101条语料语料库来源：1.chatterbot库语料库2.腾讯智能闲聊3.网上图片4.自编数据集编写规范：--问题--(分割符，可自定义，但chat.txt,chat-1.txt必须是空格) --答案1#答案2--(分割符，可自定义，但chat.txt,chat-1.txt必须是空格) --相似度--(如1，0.9，0.8，0.7，0.33)（不超过1）函数训练函数module.train(self,g,filename,modulename,encoding)self填Noneg填分割符filename填数据集文件名(是txt文件)modulename是模型名encoding填编码（如gbk,utf-8)模型使用函数：module.chat(self,q,modulename)self填Noneq填问题modulename填模型名(不包括.h6)modulename是模型名Best:module.Best_train(self,g,filename,modulename，encoding)self填Noneg是分割符filename填数据集名modulename填模型名encoding填编码（如gbk,utf-8)Best数据集：问题（分割符，可自定义，但chat.txt,chat-1.txt必须是空格） 答案module.Best_chat（self,g,q,modulename):(其实module_tool中的预训练模型也可以用这个函数使用）self不填q填问题modulename填模型名q指问题示例：frommoduleimportmoduleaschatchat.train(None,' ','module-tool\chat','module-tool\chat')whileTrue:s=input()d=chat.chat(None,s,' ','module-tool\chat')#d = chat.Best_chat(None,s,' ','module-tool\chatprint(d)效果：1次/##########/100%

......


你好吗

你好bot:这是一个基于module的扩展,可以让聊天机器人不那么傻示例1：frommoduleimportbotfrommoduleimportcomparefrommoduleimportmodulemodule.train(None,' ','module-tool\chat','module-tool\chat','utf-8')Zhou=bot('Zhou')Zhou.reset()whileTrue:s=input()a=Zhou.bot(s,'小智不能理解','module-tool\chat',',你烦不烦,None)print(a)效果：1次/##########/100%

......

你好

你好

你好

看到你好我都不知道要回什么那就回你好吧，你烦不烦示例2(使用tihuan)：frommoduleimportbotfrommoduleimportcomparefrommoduleimportmodulemodule.train(None,' ','module-tool\chat','module-tool\chat','utf-8')Zhou=bot('Zhou')Zhou.reset()whileTrue:s=input()a=Zhou.bot(s,'，小智','小智不能理解','module-tool\chat',None,['你烦不烦','到底你是机器人还是我是机器人'])print(a)效果：1次/##########/100%

......

你好(问)

你好(答)

你好(问)

你烦不烦(答)

你好(问)

到底你是机器人还是我是机器人(答)这里的XXX可以自定义XXX = bot(botname)这个函数可以创建一个机器人，并生成XXX.bot文件botname指生成XXX.bot的文件名，不包括.bot。XX.bot(self,q,chu,Nonesay,modulename,again,tihuan)self填Noneq填问题chu填对一些没用的词，系统会把这些词去掉。(chu参数可为列表(list)或字符串(str))Nonesay是当调用Best_chat函数的返回结果是None时，返回的语句。(Nonesay参数可为列表(list)或字符串(str))modulename指模型名（module)again填再次问一个问题的后缀，不用可填None或Falsetihuan填再次问一个问题的替换句，即可为列表(list)或字符串（不用可填None或False(注意：again和tihuan必须使用其中一项）XXX.reset()重置机器人compare.pyd:这是一个chat.pyd的依赖项函数：compare(str1,str2)str1，str2填对比的文本pyd文件：pyd文件采用cython在windows编译的二进制文件，是无法进行反编译。要求：1.Python3.8.6rc1(必须要下载这个版本)下载地址：Python2.chat.pyd需要requests==2.24(查天气）源代码：本SDK的代码禁止个人获取，只提供服务。使用方法：1.下载SDK之后解压，建议下载zip文件（git下载可跳过）2.把解压的文件改为您的项目名3.编写py文件，导入参考示例4.运行用户使用协议：希望各位用户遵守以下条款：1.不将SDK发布到CSDN平台(CSDN平台下载很麻烦）2.在fork此储存库同时，不能更改README.md文件小懒猫AI联系邮箱：earuil@outlook.comgithub:githubgitee地址2：gitee2一般是github先更新
Package: pychatgpt-cli
PyChatGPT-CLIA command-line ChatGPT tool using official OpenAI API.InstallingInstall and update usingpip:pipinstall-Upychatgpt-cliUsage# set environment# for windows>setOPENAI_API_KEY=your_api_key# for linux>exportOPENAI_API_KEY="your api key">gcli--help
Usage:gcli[OPTIONS]PROMPT

Options:--helpShowthismessageandexit.ExtraIf you need ChatGPT API please contact me.
Package: py-chatgpt-plus
chatgptDOCSchatgpt库的封装调用, 支持流式和非流式。特性支持流式和非流式支持底层调用chatgpt的封装(很easy启动)支持上层Http服务的封装调用(支持sse方式)调用安装pipinstallpy-chatgpt-plus底层调用非流式frompy_chatgpt_plus.core.chat_gpt_3importChatGptV3cg=ChatGptV3(api_key="*****",system_prompt="请帮我把以下的工作内容填充为工作周报，用markdown格式以分点叙述的方式输出:",)answer=cg.chat_once("主要开展了三件事情, 第一是完成功能1的开发，第二是完成了xx的需求评审，第三是接待了xx客户")print(answer)cg.save_conversations("./conversations.json")流式frompy_chatgpt_plus.core.chat_gpt_3importChatGptV3cg=ChatGptV3(api_key="****"# 请填写自己生成的api_key)streams=cg.chat_stream(prompt="**")# 返回的流式结果forstreaminstreams:print(stream)上层调用上层支持以sse的接口形式将结果返回给调用方，采用该方式可模拟chatgpt官方网页显示效果。服务启动方式:1.cdpython/py_chatgpt_plus2.修改conf/service.yaml配置文件(重点配置api_key和proxy)3.执行run.sh即可启动接口文档浏览器打开:http://${ip}:${port}/api/v1/doc即可在线访问(注意替换ip和port为真实启动的)
Package: pychatl
Installationpip$pipinstallpychatlsource$gitclonehttps://github.com/atlassistant/chatl.git$cdchatl/python$pythonsetup.pyinstallor$pipinstall-e.UsageFrom the terminalusage:pychatl[-h][--version][-aADAPTER][-mMERGE][--pretty]files[files...]GeneratestrainingdatasetfromasimpleDSL.positionalarguments:filesOneormoreDSLfilestoprocessoptionalarguments:-h,--helpshowthishelpmessageandexit--versionshowprogram'sversionnumberandexit-aADAPTER,--adapterADAPTERNameoftheadaptertouse-mMERGE,--mergeMERGEOptionsfiletomergewiththefinalresult--prettyPrettyoutputFrom the codefrompychatlimportparseresult=parse("""
%[get_forecast]
  will it rain in @[city] @[dateStart]

~[new york]
  ny
  nyc

@[dateStart](type=snips/datetime)
  at the end of the day
  tomorrow
  today

@[city]
  ~[new york]
  paris
""")# Now you got a parsed dataset so you may want to process it for a specific NLU enginesfrompychatl.adaptersimportsnipssnips_dataset=snips(result)# Or give options with `snips(result, language='en')`# And now you got your dataset ready to be fitted within snips-nlu!Testing$pipinstall-e.[test]$python-mnose--with-doctest--with-coverage--cover-package=pychatl
Package: pychatlib
pychatlibProvides functionality to read messenger/chat application exports.Installationpip install pychatlibUsageSuppose you have exported your group conversation in LINE to a.txtfile (which is what LINE does when exporting). If you want to read the.txtfile into Python, you can use the following commands.from chatlib.line import LineChatData
line = LineChatData("E:/my_line_export.txt")The resulting object has following attributes:database: this is the most interesting attribute. It contains the data of the conversation. In its current form, it is simply a list of four lists:_date_time: denotes time of a record_sender: denotes a sender, or a person that is involved in the creation of the record_event: denotes an event, i.e. a record which is not a chat, e.g. when someone joins the group or unsent a message._message: denotes the chat.n_entry: how many records are listed.start_date: earliest record's time.end_date: most recent record's time.participants: set of all sender names in the group. If someone is in the group but does not have their name recorded on the export file at all, their name will not be here.Information regarding metadata of the object can be obtained viaprint(line)which will display whatever is available out of these things (not all applications provide these info on their export file):What application exports the fileWhen the file is exportedWhat name is the personal/group/room chatHow many records are availableApplicationsCurrently this package is able to read these applications' exports:WhatsAppLINE
Package: pychatml
pychatmlThepychatmlpackage allows you to convert chat interfaces from and to the ChatML format.InstallationYou can install thepychatmlpackage using pip:pipinstallpychatmlWhatMakes it easy to integrate between different chat formats and models.frompychatml.llama2_converterimportLlama2PROMPT="""
 Hi, how are you? 
 Good thanks!
 Can you help me with this math program? 
"""converter=Llama2()converter.to_chatml(PROMPT)[{"role":"user","content":"Hi, how are you?"},{"role":"assistant","content":"Good thanks!"},{"role":"user","content":"Can you help me with this math program?"},]Supported formatsLlama 2AnthropicAlpacaVicuna/ShareGPT (fromhttps://github.com/lm-sys/FastChat/blob/e67b21dcbde91a5ad9740b081c59c433093f54da/fastchat/conversation.py#L394C1-L404C2)Why?https://github.com/OpenAccess-AI-Collective/axolotl/pull/982Questions?Create an issue or discussion in this repository.Or, reach out to our team!@jakob_frick,@__anjor,@maxnajorkon X orteam@radiantai.com.How to create a new releaseA new release will automatically be published to pypi. For this to happen you need toupdate the version specificed insetup.pycreate agit tagwith the version you want to release and push it viagit push --tagscreate a new release in GithubA Github action will automatically publish the new version to pypi.Contributing GuidelinesThank you for your interest in contributing to our project! Before you begin writing code, it would be helpful if you read thesecontributing guidelines. Following them will make the contribution process easier and more efficient for everyone involved.Please note that the project is released with anMIT License.
Package: pychatter
pychatterpychatter is a direct chat tool, which may be run to communicate over a local network.Communication happens over the localhost port 8080.This is primarily an exercise in duplex client-server communication using websockets.Getting startedInstall the pychatter package using pip, then run the package:python -m pip install pychatter
python -m pychatterHosting a chat server can be done directly inside the graphical user interface, or a dedicated server may be started from the command line using:python -m pychatter --serverConfigurationThe chat application supports external configuration files. Place a file named config.json in the directory from which the application is run.The configuration file currently supports one setting,"chat_format", which is used to display chat messages. It supports the following placeholder strings:%T: time%U: user name%M: messageAn example config.json could contain the following data:{"chat_format":"%T: %U: %M"}ContributionsTo contribute to this repository, please read thecontribution guidelines.PythonWritten in Python 3.7.3.LicenseThis repository is open-source software available under theMIT License.ContactPlease raise an issue for code changes. To reach out, please send an email torichard@baltrusch.net.AttributionsIcons made byFreepikfromwww.flaticon.com.
Package: pyChatteringy
pyChatteringyCreate simple chatbots by using JSON. Built with ♥ and Python📝 Table of Contents📝 Table of Contents🧐 About🏁 Installation🚦 Prerequisites🩹 Updating🚀 Quickstart⛏️ Built Using✍️ Authors🧐 AboutThis package aims to provide users a simple way to create simple chatbots by using JSON.🏁 InstallationIt is very easy to get the basic chatbot running or integrate it in your application.🚦 PrerequisitesThis project is in alpha/testing stage, but the bare minimum works.SeeTODO.mdfor a to-do list.Note:This project was tested against Python 3.9 only.
Python 3.6+ should work, but wasn't tested (yet - perhaps you'd like to give it a go?)$pipinstallpychatteringy🩹 Updating$pipinstallpychatteringy--update🚀 QuickstartTo create a basic & minimal chatbot with included example intents, use:# Import the ChatBot class:frompychatteringy.classes.chatbotimportChatBot# Initialize chatbot:chatbot=ChatBot()# Store response to query "Hi!" in a variable:response=chatbot.chat("Hi!")# Print the response:print(response)The code above is very simple. It obtains a response from a chatbot and then returns it.TODO: More documentation⛏️ Built UsingPython- Programming language✍️ Authors@CWKevo- Main owner & maintainerSee also the list ofcontributorswho participated in this project.
Package: pychatwork
pychatworkA Python wrapper for ChatWork's APIhttp://developer.chatwork.com/チャットワークのAPIを簡単に使えるPythonのライブラリです。InstollationInstall from PyPI.pip install pychatworkInstall from github.pip install git+https://github.com/takeshi0406/pychatworkUsageimportpychatworkaschclient=ch.ChatworkClient('your access token')# get message from room 1234res=client.get_messages(room_id='1234',force=True)# post message to room 1234client.post_messages(room_id='1234',message='hello chatwork!')TODONow, only post message and get message methods were implemented.
Package: pycheckey
PyChecKeyEver have JSON or a large dictionary that you want to validate before you jump deeper into it? PyChecKey allows you to check a dictionary-like object against a defined structure.This works with Python 3.5+.ComponentsBelow are the components and common examples of how to use them.KeyEnsurerAKeyEnsurerallows checking against a dictionary-like structure.frompycheckeyimportKeyEnsurerdata={"key1":4,"key2":{"innerKey":"hi"}}ensurer=KeyEnsurer(data=data,required_keys=['key1','key2.innerKey','key3'])ensurer.validate()# Will return false because key3 does not exist!print(ensurer.missing)# ['key3']ensurer.key_exists(data,'key2.inner')# Returns true because data[key2][inner] existsLocal DevelopmentTo work on this repository, you needvirtualenv. Clone it first, then run the following two commands.$virtualenv-ppython3venv
$sourcevenv/bin/activateRunning TestsRunpytestfrom the root directory to run all tests.LintingRunpylintfrom the root directory to lint the code files.
Package: pycheckmate
pycheckmatepycheckmate is a library designed to analyze Python code for various properties, focusing primarily on the evaluation of code authored by programming novices.Installationpycheckmate requires at least the following Python packages:python >= 3.9 (only for methodprint_ast)astDocumentationThe documentation for the latest pycheckmate is currently in progress.Example Usagefrom pycheckmate import PyCheckMate

#store code as str in variable source_code
with open("testing_file.py") as file:
    source_code = file.read()

reqs_args = {
    'param1': { 'default': 0 },
    'param2': { 'type': int }
}

pcm = PyCheckMate(source_code) 

check_func_name = pcm.has_function("test_function")
# check_func_name is a dictionary, could be for example:
#{'passed': True, 'note': "Function 'test_function' found."}

check_func_params = pcm.function_has_parameters("test_function", required_args=reqs_args, required_vararg=False, required_kwarg="kwarg")
# check_func_params is a dictionary, could be for example:
#{'passed': False, 'note': 
    "Parameter 'param1' of function 'test_function' is completly missing.
    Parameter 'param2' of function 'test_function' is of wrong type, expected '<class 'int'>', got 'None'..
    Your function has a parameter to pass a variable number of arguments to the function. Here you are not allowed to use this type of parameter.
    Your function is missing a parameter to pass a variable number of keyworded arguments to the function."}Testingpython -m unittest discover tests "*_tests.py"
Package: pycheckpoint
checkpointCreate restore points for your project locallyCheckpoint is a tool that helps you to create restore points for your project. This is very similar to git tagging, the only difference between these two is that checkpoint doesn't require the project to be git initialized. It also doesn't require you to have a git remote.How does it work?Checkpoint provides multipleSequenceclasses that have memeber functions which execute based on their order in the sequence. These sequences are used to perform all the sequentional operations that are required to create a restore point. Some of these sequences are:IOSequence: This sequence is used to perfrom all the input/output sequentional operations.CLISequence: This sequence is used to perform all the CLI operations which includes parsing the arguments, determining the action and performing the action.Checkpoint also supports custom sequences that can be used to initialize checkpoint in different environments. For example, if checkpoint isto be initialized in a UI enviroment a sequence for UI can be created and passed to theCheckpointconstructor.Detailed documentation can be foundhereHow to use checkpoint?To run checkpoint in UI environment, run the following command:Run checkpoint in UI environmentcheckpoint--run-uiThe following is an example of how to use checkpoint in a CLI environment.Initialize checkpoint in the target projectcheckpoint--action=init--path=path/to/projectAfter initialization a.checkpointdirectory is created in the target project. If the project is git initialized, this directory should be added to the git ignore file.Creating a restore pointcheckpoint--name=restore_point_name--action=create--path=path/to/projectJumping to a restore pointcheckpoint--name=restore_point_name--action=restore--path=path/to/projectDeleting a restore pointcheckpoint--name=restore_point_name--action=delete--path=path/to/projectVersion of checkpointcheckpoint--name=restore_point_name--action=version--path=path/to/projectInstallationpip install pycheckpointDevelopment1. Get the source code by cloning from remote repository.gitclonehttps://github.com/antrikshmisri/checkpoint.git2. Create and activate a virtual environment.python-mvenvvenvsourcevenv/bin/activate3. Get the dependenciespipinstall-rrequirements/default.txt4. Install checkpoint as a local project.pipinstall.5. Run the testspipintall-rrequirements/test.txt
pytest-vcheckpoint/tests/Code of ConductPlease go through the code of conduct before contributing to this project which can be foundhere.Screenshots
Package: py-checksum
PyChecksumA simple CLI tool to create unified checksum from all the files and directories within a certain path. You can use it within your CI/CD pipeline and automations to detect change or deterministically address a specific artifact.How to use?To view help:./pychecksum-hGet the checksum of current directories files and sub-directories:./pychecksumCreate a checksum of all the files and sub-directoreis withinsrcdirectory:./pychecksum-d./srcExcludenode_modules,__pycache__directories and.envfiles:./pychecksum-d.-enode_modules__pycache__.envLimit the size of the checksum to 10 characters:./pychecksum-s10
Package: py-check-updates
py-check-updatesThis is a dependency update checker to assist Python package developers.If you are the kind of paranoid person who checks whether packages
in your dependency lists are updated once a week
and you do it manually for some technical reasons,
then this program is for you.Currently, the program checks updates (it does not automatically update them, though) for:Top-level dependencies inpyproject.tomlforPoetry(seepoetry#2684).
Limited to simple versions of the formpackage = "(^|~|>=)?version".Additional dependencies of hooks in.pre-commit-config.yamlforpre-commit(seepre-commit#1351).
Limited to simple Python dependencies of the formpackage==version.Installationpipinstallpy-check-updatesUsagepy-check-updates
Package: pycheckwatt
pyCheckwattPython package for communicating withCheckWattEnergyInBalancetargeted forHome Assistantintegrations and other use-cases.WarningThis library is providedas-isand is not supported or approved by CheckWatt. CheckWatt can implement breaking changes at any time that renders this module useless. The module may not be updated promptly, or not at all if the changes are not possible to reverse engineer.StatusThe library isexperimentaland pulls basic info fromEnergyInBalance.
Use with care as it loads the servers of CheckWattExampleThe following example will login toEnergyInBalanceand retrieve basic information.Create a file calledexample.pythat looks like this:"""Example file to test pyCheckwatt"""frompycheckwattimportCheckwattManagerEIB_USERNAME="eib_username"EIB_PASSWORD="eib_password"asyncdefmain():"""Test function for pyCheckwatt."""asyncwithCheckwattManager(EIB_USERNAME,EIB_PASSWORD)ascw_instance:try:# Login to EnergyInBalanceifawaitcw_instance.login():# Fetch customer detailawaitcw_instance.get_customer_details()print("System\n======")print(cw_instance.registered_owner)print(cw_instance.battery_make_and_model)print("\nFCR-D\n=====")print(f"FCR-D State:{cw_instance.fcrd_state}")print(f"FCR-D Percentage:{cw_instance.fcrd_percentage}")print(f"FCR-D Date:{cw_instance.fcrd_timestamp}")exceptExceptionase:print(f"An error occurred:{e}")if__name__=="__main__":importasyncioloop=asyncio.new_event_loop()asyncio.set_event_loop(loop)loop.run_until_complete(main())Create a virtual environment and install pyCheckwatt:$python-mvenvvenv
$./venv/Scripts/activate
$pipinstallpycheckwattRun a simple test:$ python example.pyWatch the output:System
======
First-name Last-name (Address Zip City)
Solax power T30 12.0 (12.3kW, 12.0kWh)

FCR-D
=====
FCR-D State: ACTIVATED
FCR-D Percentage: 99,0/2,9/97,7 %
FCR-D Date: 2023-12-20 00:11:45Comprehensive ExampleA comprehensive example can can found in theexamplesfolder. This example use additional modules, such asdotenvandargparse.
These modules needs to be installed before themain.pyis executed.$python-mvenvvenv
$./venv/Scripts/activate
$pipinstallpycheckwattpython-dotenvargparseRun the comprehensive test:$ python main.pyAcknowledgementsThis module was developed as a team effort by the following contributors.@faanskit: Developer@flopp999: Developer@angoyd: CI/CDThis integration could not have been made without the excellent work done by the Home Assistant team.If you like what have been done here and want to help I would recommend that you firstly look into supporting Home Assistant.You can do this by purchasing some swag from theirstoreor paying for a Nabu Casa subscription. None of this could happen without them.LicensesThe integration is provided as-is without any warranties and published underThe MIT License.
Package: pychee
pycheeClient forLychee, written in Python.Lychee is a photo management system I've been using for years. I had the idea to
make a « Lychee filesystem » withFUSE, so I needed an
API client.Installationpython3-mpipinstallpycheeNotesMy reference isthis documentation.
The API is partially implemented and focused on photo management,i.e.onlyAlbums,Photo,Frame,SharingandSettings::setLogin. Users can do
whatever they want with their albums and photos and change their password.Disclaimer : I usually suck at coding, so use with caution and at your own risks.
Tested with Lychee v4.7.0. The code probably won't be retrocompatible and should
just work with the latest version.TODOAdd testsExample usage⚠️pycheereturns exactly what the API sends back, just parsing it todictif necessary. As sample answers are not documented in the API and because answers
tend to change over time, you should inspect requests in browser if your client
code does not works anymore.A sample of common API calls :#!/usr/bin/env python# coding=utf-8frompycheeimportpychee# Initialize instanceclient=pychee.LycheeClient('https://pic.chosto.me')# Loginclient.login('login','password')# Create a new albumalbum_name='test_name'album_id=client.add_album(album_name)['id']# Add a photo in the created albumpath_to_your_photo='/your/path/photo.jpg'withopen(path_to_your_photo,'rb')asf:photo_id=client.add_photo(f,'photo.jpg',album_id)['id']# Set uploaded photo publicclient.set_photo_public(photo_id)# Set licence of uploaded photoclient.set_photo_license(photo_id,'CC0')# Download an archive of the created albumoutput_path='/tmp/photos.zip'with(open(output_path,'wb'))asf:f.write(client.get_albums_archive([album_id]))# Logoutclient.logout()DocumentationDocumentation is automatically published on GitHub:https://chostakovitch.github.io/pychee/index.html
Package: pychek
pyChek : A Smarter Print for Execution ChecksA Python Library to Track Program ProgressDependenciesPlease make sure that the following Python packages are installed on your system / virtual environment : tqdm, colorama, pyfiglet, psutilInstallationSimply run the following:pipinstallpychekUsageFirst, addfrom pychek import checkto your program header. Then, you can do the following wherever needed in the program :check("header", "Your Header Goes Here"): Print the graffitti header.check("pass", "Your custom pass message here")check("info", "Your custom info message here")check("finish"): program execution finishes here.Updates & Other InfoGithub:https://github.com/xbais/pychek