Roman Burtsev
- Team Leader
Roman Yezhov
- QA
Konstantin Rumyantsev
- Code Reviewer
Function Explorer Telegram Bot is a tool that allows you to analyse functions, get information about them and draw graphs.
What this bot can do • How to find or run the bot • How to use • What is planned to be implemented • Meme
- Might exist
- Draw graphs with some options
- Analyse math functions (there are many options for this)
- Send meme
- Disappoint you
Find our bot named "Function Explorer" in Telegram:
Then start a conversation with the bot to check if it is activated (/start
command).
- Python 3.10+
- TeX Distribution
- MongoDB
- Clone this repository. Make sure you have Python 3.10+ installed on your machine
- Create Telegram bot following official Telegram instructions
- Put your token into
TOKEN
variable insource/conf/default_config.json
- Install TeX distribution. For example, MiKTeX is recommended for Windows
or TeX Live is ideal for Linux:
- If you want to use MiKTeX, then after installing, open application 'MiKTeX Console', click 'Updates' - 'Check for
updates' - 'Update now'. Install all packages. Then open your IDE, launch the Bot and type him next command:
/analyse domain x
IDE may ask you to install some dependencies of TeX (in popup window). Accept it and wait until installation is complete - If you want to use TeX Live, then you must also install
texlive-latex-extra
anddvipng
(via apt-get or something else).
- If you want to use MiKTeX, then after installing, open application 'MiKTeX Console', click 'Updates' - 'Check for
updates' - 'Update now'. Install all packages. Then open your IDE, launch the Bot and type him next command:
- Install MongoDB and start server (on Windows it starts automatically)
- After that you can use the bot with your token. Maybe.
- Docker
- Docker-compose
If you want to deploy the bot:
- Find a suitable machine for your bot. For instance, your PC or Azure, or AWS
- Install Docker and Docker Compose
- Do steps 1, 2 and 3 of the "If you are a normal host..." instruction above
- Run command
docker-compose up --build
(you have not to type --build option further without updating the bot) in the working directory and wait until all dependencies installed
The commands below are an alternative way to the handy buttons, so you have not to use or know them
-
/start
to back to the main menu -
/help
to... get a help? Here you can check examples of plotting and analysing and guides -
/graph arg1, arg2, ..., option1, option2, ...
draws a graph of given functions with specified options (range / domain / aspect ratio). Options are... optional. See/resources/graph_patterns.md
to see all (or almost) patterns. Functions should be in math format, e.g. "x = 1", "y = x^2 + sin x", "x", "y = 1", "2 y sin x cos(x) = 0.5".
There are several options:Domain
- you can add functions domain via argument "x from _ to _" or "x = [, ]", for instance, "/graph x, x from -10 to 5", "/graph x = [0.5, 1.5], x^2".Range
- you can also define y-limit by same syntax as domain: "y from 10 to 20", "y in (-10, 10)".Aspect ratio
- the ratio of the width to the height of a result image: "aspect ratio = 1", "ratio = 0.5"
The limit on the number of functions is 10. Options can override each other. All variables except 'x' and 'y' will be replaced by 'x' and 'y' intuitively.
-
/analyse request
tries to perform a user query on a function specified in the query. The function should be in math format, for example: "/analyse domain of sqrt x", "/analyse derivative of the function y * x**2 by x", "period sin x". You can find sets of patterns in file/resources/analysis_patterns.md
. Supported actions:- Derivative
- Domain
- Range
- Zeros
- Axes intersection
- Periodicity
- Convexity
- Concavity
- Vertical asymptotes
- Horizontal asymptotes
- Slant asymptotes (with horizontal as a special case of slant)
- Asymptotes (vertical, horizontal and slant)
- Evenness and oddness
- Maximum value
- Minimum value
- Stationary points
- Monotonicity
- More actions for analysis
- Better function plotting. New features, functionality and customizable canvas
- Sample analysis. Statistics. Probability theory. Drawing a graph from the data and subsequent analysis
- New and more user-friendly commands for interaction with the bot