Skip to content

Fentaniao/ScientificCalculationBot

Repository files navigation

Scientific Calculation Bot

ChatBot Python CQ-HTTP

English Readme中文自述文件

An intelligent QQ bot based on Python scientific calculation and drawing library and CQ-HTTP framework, providing end-to-end services based on QQ client, and integrating scientific calculation, drawing, layout, chat interaction, group manage and other functions.

⚠️ This project stops maintenance because CQ-HTTP framework has been discontinued in the fall of 2020.

Features

End-to-end service

Users only need to send messages from QQ, and then the messages will be captured and processed by the bot. The bot will return the results either through text messages or images rendered by the $\LaTeX$ engine.

Based on powerful Python library and cloud

This project calls several Python libraries, Wolfram, AliCloud, Tencent Cloud, etc. to implement various functions of the bot.

Scientific calculation and drawing

QQ bots with entertaining features are very common, but QQ bots with scientific calculation and drawing are very rare. This bot focuses on scientific calculation and plotting. The scientific calculation function based on the SymPy library can use a simple syntax to implement various functions in the SymPy library, while the plotting function based on the matplotlib library uses a variety of functions to implement various simple or complex plotting tasks.

Main functions

Scientific calculation

numpy SymPy

Scientific calculation functionality is provided by Python's numpy library and SymPy library, which can compute expressions in Python format and reply to the results via QQ text messages or image messages. Available features include

  • symbolic representation
  • constant transformations
  • simplify
  • Solving equations
  • Limits
  • Calculus
  • Differential equations
  • ......

Click on the document for details.

Plot

matplotlib

The plotting functionality is provided by Python's matplotlib library, which provides several interfaces to implement different kinds of functions for plotting and replying to the plotted image via a QQ image message. Available functions include

  • one-dimensional explicit functions
  • binary implicit functions
  • Parameter equations

Click on the document for details

Chat interaction and group management

coolQ

The basic features such as chat interaction and group chat management are implemented by secondary development of the interface provided by coolQ. Existing features include

  • Basic interaction
  • Group chat management
  • Handling requests
  • Get information
  • Self-check

Click on the document for details.

Useful functions

Wolfram Wolfram Language Alibaba Cloud Tecent Cloud

A series of utilities developed around the cloud and Python. Available features include

  • Science Encyclopedia
  • Voice Message
  • Several experimental features (Beta)

Click on the document for details.

Contact

Author: Fentaniao

Email: Fentaniao@gmail.com

License

GPL-3.0 License © Fentaniao