View Bitcoin Price GUI Application.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkinter import ttk | |
import urllib.request | |
import json | |
import time | |
def get_luno(): | |
# to change ticker pair, look at here https://api.mybitx.com/api/1/tickers | |
req = urllib.request.urlopen("https://api.mybitx.com/api/1/ticker?pair=XBTMYR") | |
x = json.loads(req.read().decode("utf-8")) |
View Artificial Intelligence Chatbot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
try: | |
import aiml | |
except ImportError: | |
print('[!] Failed to import the module') | |
try: | |
select = raw_input('[*] Attempt to auto-install aiml? [Y/n') | |
except KeyboardInterrupt: | |
print('\n[!] User Cancel') | |
sys.exit(5) |
View Automated Email.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from smtplib import SMTP as smtp | |
import json | |
def sendmail(sender_add, reciever_add, msg, password): | |
server = smtp('smtp.gmail.com:587') | |
server.starttls() | |
server.login(sender_add, password) | |
server.sendmail(sender_add, reciever_add, msg) | |
print("Mail sent succesfully....!") |
View Location to Address.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geocoder | |
t=input("enter the location:") | |
g = geocoder.arcgis(t) | |
print(g.latlng) |
View File Encrypt Decrypt.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
from cryptography.fernet import Fernet | |
class Crypt: | |
def __init__(self): | |
# can be generated Fernet.generate_key() |
View Sudoku Solver.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def printsudoku(sudoku): | |
print("\n\n") | |
for i in range(len(sudoku)): | |
line = "" | |
if i == 3 or i == 6: | |
print("---------------------") | |
for j in range(len(sudoku[i])): | |
if j == 3 or j == 6: | |
line += "| " | |
line += str(sudoku[i][j])+" " |
View calculator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from tkinter import Tk, END, Entry, N, E, S, W, Button | |
from tkinter import font | |
from tkinter import Label | |
from functools import partial | |
def get_input(entry, argu): | |
entry.insert(END, argu) |
View weather.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python program to find current weather details of any city using openweathermap api | |
import requests | |
# Enter your API key here | |
api_key = "Your_API_Key" | |
# base_url variable to store url | |
base_url = "http://api.openweathermap.org/data/2.5/weather?" | |
# Give city name |
View check_connection.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
status_dict = {"Website": "Status"} | |
def main(): | |
with open("websites.txt", "r") as fr: | |
for line in fr: | |
website = line.strip() | |
status = requests.get(website).status_code | |
status_dict[website] = "working" if status == 200 \ |
View wikipedia.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
# Trying to open a random wikipedia article | |
# Special:Random opens random articles | |
res = requests.get("https://en.wikipedia.org/wiki/Special:Random") | |
res.raise_for_status() | |
# pip install htmlparser | |
wiki = BeautifulSoup(res.text, "html.parser") |