Skip to content

Instantly share code, notes, and snippets.

Working from home

Harendra Kumar Kanojiya harendra21

Working from home
View GitHub Profile
View Bitcoin Price GUI
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
req = urllib.request.urlopen("")
x = json.loads("utf-8"))
View Artificial Intelligence
import sys
import aiml
except ImportError:
print('[!] Failed to import the module')
select = raw_input('[*] Attempt to auto-install aiml? [Y/n')
except KeyboardInterrupt:
print('\n[!] User Cancel')
View Automated
from smtplib import SMTP as smtp
import json
def sendmail(sender_add, reciever_add, msg, password):
server = smtp('')
server.login(sender_add, password)
server.sendmail(sender_add, reciever_add, msg)
print("Mail sent succesfully....!")
View Location to
import geocoder
t=input("enter the location:")
g = geocoder.arcgis(t)
View File Encrypt
import os
import argparse
from cryptography.fernet import Fernet
class Crypt:
def __init__(self):
# can be generated Fernet.generate_key()
View Sudoku
def printsudoku(sudoku):
for i in range(len(sudoku)):
line = ""
if i == 3 or i == 6:
for j in range(len(sudoku[i])):
if j == 3 or j == 6:
line += "| "
line += str(sudoku[i][j])+" "
# -*- 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)
# 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 = ""
# Give city name
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 \
from bs4 import BeautifulSoup
import requests
# Trying to open a random wikipedia article
# Special:Random opens random articles
res = requests.get("")
# pip install htmlparser
wiki = BeautifulSoup(res.text, "html.parser")