Загрузка страницы

How to build your own Wolfram Alpha — Math Equation Visualization with Tkinter and wolframalpha API

Hello Everyone! My name is Andrew Fung, in this video, I will be showing you how to create your own Math Equation Visualiser using python’s Tkinter Library and Wolfram Alpha API.

#wolframalpha #tkinter #datavisualization #python #replit

Installation and Setup!
Replit: https://replit.com/
Wolfram Alpha: https://www.wolframalpha.com
Wolfram Alpha API: https://products.wolframalpha.com/api/
Documentation: https://products.wolframalpha.com/simple-api/documentation/
Tkinter documentation: https://docs.python.org/3/library/tkinter.html

Source code for this project:
https://github.com/Andrew-FungKinHo/YouTube/blob/main/wolframAlpha.py

Check out my Github!
https://github.com/Andrew-FungKinHo

How I make my YouTube videos:
⌨️ Keyboard - Nuphy Air75 Mechanical Keyboard - https://amzn.to/3Xu4PD3
🎙 Microphone - MAONO A04 Professional Podcaster USB Microphone - https://amzn.to/3k8ocD5
🖱 Mouse - Microsoft Bluetooth Ergonomic Mouse - https://amzn.to/3CHhdHJ
🔌 Accessories - Laptop Docking Station for MacBook Pro - https://amzn.to/3CHi5Mv

Timestamps
0:00​ | Intro
1:56 | Data Fetching from API
9:10​ | User Interface with Tkinter
22:28 | Project improvement
24:02 | Out tro

Full code:
———————————————————————————————
import wolframalpha
import base64
import tkinter as tk
from urllib.request import urlopen

API_KEY = ‘INSERT YOUR API KEY HERE’
client = wolframalpha.Client(API_KEY)

def math():
equation = entry1.get()
res = client.query(equation.strip(),params=(("format", "image,plaintext"),))
data = {}
for p in res.pods:
for s in p.subpods:
if s.img.alt.lower() == "root plot":
data['rootPlot'] = s.img.src
elif s.img.alt.lower() == "number line":
data['numberLine'] = s.img.src
data['results'] = [i.texts for i in list(res.results)][0]

image1_url = data['rootPlot']
image2_url = data['numberLine']

image1_byt = urlopen(image1_url).read()
image1_b64 = base64.encodebytes(image1_byt)
photo1 = tk.PhotoImage(data=image1_b64)

image2_byt = urlopen(image2_url).read()
image2_b64 = base64.encodebytes(image2_byt)
photo2 = tk.PhotoImage(data=image2_b64)

canvas.photo1 = photo1
canvas.photo2 = photo2

canvas.create_image(10,30, image=canvas.photo1, anchor='nw')
canvas.create_text(175,40, fill='darkblue',font='Arial 10',text='Root Plot')

canvas.create_image(10,240, image=canvas.photo2, anchor='nw')
canvas.create_text(175,230, fill='darkblue',font='Arial 10',text='Number Line')

canvas.create_text(175,320,fill='darkblue',font='Arial 15',text=data['results'])
root = tk.Tk()
root.title("Math Visualization")

w = 500
h = 500
x = 50
y = 100

root.geometry("%dx%d+%d+%d" % (w,h,x,y))

canvas = tk.Canvas(bg='white')
canvas.config(height=350)
canvas.pack()

# entry
entry1 = tk.Entry(root)
canvas.create_window(150,15,window=entry1)

# submit button
submit = tk.Button(text="Solve",command=math,height=1, width=3)
canvas.create_window(280,15,window=submit)
root.mainloop()

———————————————————————————————

Feel free to drop a like and comment if you enjoy and video and let me know if you want me to do other types of programming videos ;) !!!

Видео How to build your own Wolfram Alpha — Math Equation Visualization with Tkinter and wolframalpha API канала Andrew Fung
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
11 мая 2021 г. 17:30:37
00:24:32
Другие видео канала
Trial and Error (Ep.2): Python Import Error from Saving Filename same as Python Module Name #ShortsTrial and Error (Ep.2): Python Import Error from Saving Filename same as Python Module Name #ShortsSmart Fan PresentationSmart Fan PresentationWine Quality Prediction with Machine Learning (part 1) — Data preprocessing and Feature CorrelationWine Quality Prediction with Machine Learning (part 1) — Data preprocessing and Feature CorrelationSet webhook and message handlers — Creating a CRM distribution Telegram bot with Notion API (EP.2)Set webhook and message handlers — Creating a CRM distribution Telegram bot with Notion API (EP.2)Scripting Audio Conversations (part 2) - User Files Upload with Google SpeechToText and Python DashScripting Audio Conversations (part 2) - User Files Upload with Google SpeechToText and Python DashSONAS - Speech to Text App for the Hearing ImpairedSONAS - Speech to Text App for the Hearing ImpairedHow to build an Interactive Ad-scraping Keyword Analysis Web App with Streamlit Python & ScraperAPIHow to build an Interactive Ad-scraping Keyword Analysis Web App with Streamlit Python & ScraperAPIHow to Schedule CronJobs to Send Email Notifications — Python Task Automation with CronJobs (part 2)How to Schedule CronJobs to Send Email Notifications — Python Task Automation with CronJobs (part 2)Wine Quality Prediction with Machine Learning (part 2) — Train Test Split & Linear Regression PlotsWine Quality Prediction with Machine Learning (part 2) — Train Test Split & Linear Regression PlotsFinding the correlation coefficients between two variables --- Data Analysis with Python and PandasFinding the correlation coefficients between two variables --- Data Analysis with Python and PandasHow to plot moving race bars animation — Data Visualisation with Python and PandasHow to plot moving race bars animation — Data Visualisation with Python and PandasFinding the Most Profitable Keywords by Plotting Competitor Analysis Graphs — with Python StreamlitFinding the Most Profitable Keywords by Plotting Competitor Analysis Graphs — with Python StreamlitBuild and deploy a simple bot — Creating a CRM distribution Telegram bot with Notion API (EP.1)Build and deploy a simple bot — Creating a CRM distribution Telegram bot with Notion API (EP.1)Create a Simple Programming Joke Generator that look like a Tweet -with HTML, CSS and JavascriptCreate a Simple Programming Joke Generator that look like a Tweet -with HTML, CSS and JavascriptFirst steps to approach a dataset — Introduction to Data analysis with Pandas and PythonFirst steps to approach a dataset — Introduction to Data analysis with Pandas and PythonUser authentication and customized messages — Creating a CRM Telegram bot with Notion API (EP.3)User authentication and customized messages — Creating a CRM Telegram bot with Notion API (EP.3)Sending documents and updating customer status — Creating a CRM Telegram bot with Notion API (EP.4)Sending documents and updating customer status — Creating a CRM Telegram bot with Notion API (EP.4)How to Automate Web Scraping Task with BeautifulSoup — Python Task Automation with CronJobs (part 1)How to Automate Web Scraping Task with BeautifulSoup — Python Task Automation with CronJobs (part 1)Targeted Keyword and Competitor Analysis with Google Ads — Python Web Scraping Task AutomationTargeted Keyword and Competitor Analysis with Google Ads — Python Web Scraping Task AutomationAnimating HTML Ranking Table with Javascript & JQuery — Realtime Crypto Prices Changes LeaderboardAnimating HTML Ranking Table with Javascript & JQuery — Realtime Crypto Prices Changes Leaderboard
Яндекс.Метрика