₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,328,959 members, 8,438,141 topics. Date: Friday, 03 July 2026 at 01:08 AM

Toggle theme

Martinz09's Posts

Nairaland ForumMartinz09's ProfileMartinz09's Posts

1 2 3 (of 3 pages)

ProgrammingRe: Please Advice Me. by Martinz09(op): 9:39pm On Apr 12, 2025
Stepout23:
Since you're still in school and preparing for JAMB, here's a smart path to follow.

Start with Web Development.
It’s easier to enter, has tons of beginner resources, and you can begin freelancing or building projects faster. Plus, it still keeps you in tech and close to Python if you use Django or Flask (Python web frameworks).

Later, when you're more comfortable, you can add AI to your skills. Your background in Python will help a lot when you're ready to dive deeper into data science or machine learning.
Thank-you very much ma.

You don’t have to rush. Focus on mastering one area well first. And don’t forget, whichever path you choose, consistency and practice are what make someone a guru.
ProgrammingRe: Please Advice Me. by Martinz09(op): 10:48am On Apr 10, 2025
Lighterx:
Your hearth desires
okay thanks.
ProgrammingPlease Advice Me. by Martinz09(op): 11:56pm On Apr 09, 2025
Good day everyone,
I recently completed my python programming class last years December, and after that I decided to start practicing for this year's JAMB which is this month,the problem I have is that,I have plans of further into tech maybe web dev or python with A.i,among these two,I want gurus on this platform,to please assist me by advising me,on the one that is more versatile and easy employment or any other tech skill that is good and will profit.
CareerSorry by Martinz09(op):
........?..............................................?....................................lot9jjjmmng cool embarassed lipsrsealed lipsrsealed embarassed sad sad grin sad cool kiss kiss smiley smileytgh kiss kiss undecided > huh huh embarassed undecided kiss embarassedsad shocked tongue embarassed undecided undecided embarassed angry cheesy lipsrsealed lipsrsealed tongue angry... grin sad shocked cool shocked huh tongue tongue embarassed embarassed embarassed embarassed angry angry tongue lipsrsealed lipsrsealed wink tongue embarassed wink huh embarassed lipsrsealed cheesy angry tongue lipsrsealed lipsrsealed undecided lipsrsealed
FoodRe: What I Bought With 9,000 Naira In Russia In 2025 by Martinz09(m): 6:24pm On Jan 05, 2025
histemple:
This meat is unhealthy.

Can you snap and upload your mouth, let's see how it looks like since you started eating pork meat?
He looks healthy bro.
ProgrammingRe: Pls I Need Your Assistance �� by Martinz09(op): 10:37pm On Dec 03, 2024
MindHacker9009:
No problem. If you need further customization, just give ChatGPT a shout at: https://chatgpt.com
Okay.Thank you
ProgrammingRe: Pls I Need Your Assistance �� by Martinz09(op): 10:22pm On Dec 03, 2024
[quote author=Martinz09 post=133150489][/quote]Thank you sir
ProgrammingRe: Pls I Need Your Assistance �� by Martinz09(op): 10:22pm On Dec 03, 2024
[quote author=Martinz09 post=133150489][/quote]Thank you sir
ProgrammingRe: Pls I Need Your Assistance �� by Martinz09(op): 10:21pm On Dec 03, 2024
MindHacker9009:
By ChatGPT your best friend.

To create an application that displays live currency pair movements, saves user input to a database, and displays the history, we can divide the process into these steps:

Frontend User Interface: Use a Python GUI library like tkinter or a web framework like Flask for the user interface.
Fetching Live Data: Use an API, such as Exchange Rates API or similar services, to fetch live currency pair data.
Database Setup: Use SQLite for simplicity (or any database of your choice) to store and retrieve user input history.
Live Charting: Use a library like matplotlib for plotting or plotly for dynamic web-based charts.
Here's the implementation:

Step 1: Install Necessary Libraries
Before you begin, make sure you have these libraries installed:
pip install requests matplotlib flask sqlite3 plotly


Step 2: Code Implementation
1. Backend (API and Database)

import sqlite3
from flask import Flask, request, jsonify
import requests

app = Flask(__name__)
DATABASE = 'currency_pairs.db'

# Initialize Database
def init_db():
conn = sqlite3.connect(DATABASE)
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS currency_history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
currency_pair TEXT NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
)
"""wink
conn.commit()
conn.close()

@app.route('/add_currency_pair', methods=['POST'])
def add_currency_pair():
data = request.json
currency_pair = data['currency_pair']

conn = sqlite3.connect(DATABASE)
cursor = conn.cursor()
cursor.execute("INSERT INTO currency_history (currency_pair) VALUES (?)", (currency_pair,))
conn.commit()
conn.close()

return jsonify({'message': 'Currency pair added successfully!'})

@app.route('/get_history', methods=['GET'])
def get_history():
conn = sqlite3.connect(DATABASE)
cursor = conn.cursor()
cursor.execute("SELECT currency_pair, timestamp FROM currency_history ORDER BY timestamp DESC"wink
rows = cursor.fetchall()
conn.close()
return jsonify(rows)

@app.route('/get_live_rate', methods=['GET'])
def get_live_rate():
base = request.args.get('base', 'USD')
target = request.args.get('target', 'EUR')
response = requests.get(f"https://api.exchangerate.host/latest?base={base}&symbols={target}"wink
return response.json()

if __name__ == "__main__":
init_db()
app.run(debug=True)


2. Frontend (Python GUI Example using Tkinter)

import tkinter as tk
from tkinter import ttk
import requests
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import time

# Base URL for Flask API
API_BASE = 'http://127.0.0.1:5000'

# Function to fetch live rates
def fetch_live_rate(base, target):
response = requests.get(f"{API_BASE}/get_live_rate", params={"base": base, "target": target})
data = response.json()
return data["rates"][target]

# Function to update database
def save_currency_pair(base, target):
requests.post(f"{API_BASE}/add_currency_pair", json={"currency_pair": f"{base}/{target}"})

# Live Chart Setup
fig, ax = plt.subplots()
times, rates = [], []

def update_chart(base, target):
def fetch_and_update(frame):
rate = fetch_live_rate(base, target)
times.append(time.strftime('%H:%M:%S'))
rates.append(rate)

ax.clear()
ax.plot(times[-20:], rates[-20:])
ax.set_title(f"Live Rate: {base}/{target}"wink
ax.set_xlabel("Time"wink
ax.set_ylabel("Exchange Rate"wink

ani = FuncAnimation(fig, fetch_and_update, interval=1000)
plt.show()

# Main GUI
def main():
root = tk.Tk()
root.title("Currency Pair Tracker"wink

ttk.Label(root, text="Base Currency"wink.grid(row=0, column=0, padx=10, pady=10)
base_currency = ttk.Entry(root)
base_currency.grid(row=0, column=1, padx=10, pady=10)

ttk.Label(root, text="Target Currency"wink.grid(row=1, column=0, padx=10, pady=10)
target_currency = ttk.Entry(root)
target_currency.grid(row=1, column=1, padx=10, pady=10)

def track_currency():
base = base_currency.get()
target = target_currency.get()
save_currency_pair(base, target)
update_chart(base, target)

ttk.Button(root, text="Track Live", command=track_currency).grid(row=2, column=0, columnspan=2, pady=20)

def show_history():
response = requests.get(f"{API_BASE}/get_history"wink
history = response.json()
for row in history:
print(f"Currency Pair: {row[0]}, Timestamp: {row[1]}"wink

ttk.Button(root, text="Show History", command=show_history).grid(row=3, column=0, columnspan=2, pady=10)

root.mainloop()

if __name__ == "__main__":
main()


How it Works
Run the Backend: Start the Flask API backend first.
Run the Frontend: Launch the Tkinter app to input currency pairs.
Track Live Data: Use matplotlib to plot live exchange rates.
Save and View History: Save the selected currency pairs to a database and retrieve them Thanks sir

1 2 3 (of 3 pages)