The content in this file is same as cmpt383.me and cmpt383.txt, you can choose one which you like.
1.Quike introduction 2.Quike code compile 3.Detailed introduction 1). Overall goal of the project 2). Languages using 3). Methods of communicating between languages 4). Steps of working the project
In my project, there are two parts. Part one is using C++ and Python to do a Covid-19 statistics, Part two is using Ruby and Python to create a Pokemon database query. Both two parts can save problems following the Polyglot, they are include all the requirements of the project.
vagrant up
vagrant ssh
pip3 install pandas
pip3 install matplotlib
cd project
cd swig-Covid19Stat
swig -python -py3 -modern covid_stat.i
gcc -fPIC -c covid_stat.c covid_stat_wrap.c -I/usr/include/python3.6
ld -shared covid_stat.o covid_stat_wrap.o -o _covid_stat.so
python3 covid19stat_main.pyc
cd mq-PokemonQuery
python3 PokemonQuery_server.py
cd mq-PokemonQuery
ruby PokemonQuery_client.rb
The overall goal of the project is using different languages cooperate to solve one or more problems. And I would like to use some of them to solve the problems that I care about.
Part one is using C++ and Python to do Covid-19 statistics. As we knew, Covid-19 is the biggest problem in the world now, it has impacted all of us. I want to do a Covid-19 statistics to see the growth in rate my favorite countries Canada, America, New Zealand, and the world. I'm using Python to do the data analysis and using the C++ to calculate the growth rate, Python can create a visualization of the growth rate for the 4 countries and the world. We can know the status of Covid-19 in this year.
Part two is using Ruby and Python to create a Pokemon database query. I am a big Pokemon fan, thus the reason I choose to do this problem. In this part, I am using RabbitMQ to solve the problem. I choose Python as my server and Ruby as my client, there is a pokemon database in the Python-server, and my Ruby_client query the Pokemon in this bi-directional channel. This is a good experience for me to work with Pokemon.
Part one(Covid-19 statistics): C++, Python Part two(Pokemon database query): Python, Ruby
Part one(Covid-19 statistics): The foreign function interface by SWIG Part two(Pokemon database query): RabbitMQ
vagrant up
vagrant ssh
pip3 install pandas
pip3 install matplotlib
cd project
cd swig-Covid19Stat
swig -python -py3 -modern covid_stat.i
gcc -fPIC -c covid_stat.c covid_stat_wrap.c -I/usr/include/python3.6
ld -shared covid_stat.o covid_stat_wrap.o -o _covid_stat.so
python3 covid19stat_main.py
Then we can get two pnd files of total case number and the growth rate.

cd mq-PokemonQuery
python3 PokemonQuery_server.py
cd mq-PokemonQuery
ruby PokemonQuery_client.rb
In this part, I implement many guide line for you to do a query.
At the biginning of query, it will ask you to choose key-word:
- Please enter the pokemon's key words:
- Name (Example: Pikachu)
- Index number (Example: 25)
- type (Example: Grass)
- Ablity (Example: =600, >300, <100, >=500, <=80, != 600)
- Legendary (Example: legendary, not legendary)
After your query, it will ask you next step: What do you want to do?
- I love Pokemon! Do it again!
- Cheak my history.
- Quit
- Save This Query to txt file. Please enter your number:)
There is no confrused for you to check it, just enjoy it.
Thanks all of you.