Skip to content

Instantly share code, notes, and snippets.

View Dhravya's full-sized avatar
🚀
Building things!

Dhravya Shah Dhravya

🚀
Building things!
View GitHub Profile
@Dhravya
Dhravya / tictactoe.py
Created September 13, 2021 07:35
TicTacToe with GUI
#Multiplayer and single player
# Tic Tac Toe game with GUI
# using tkinter
# importing all necessary libraries
import random
import tkinter
from tkinter import *
from functools import partial
@Dhravya
Dhravya / sudoku.py
Created September 13, 2021 07:34
Sudoku Generator and game with gui
import pygame #pip install pygame
import time
from sudokugen.generator import generate, Difficulty #pip install sudokugen
from inputimeout import inputimeout, TimeoutOccurred #pip install inputimout
import os
new_puzzle = generate(difficulty=Difficulty.MEDIUM)
def chunk(l, n):
n = max(1, n)
return (l[i:i+n] for i in range(0, len(l), n))
@Dhravya
Dhravya / jarvis.py
Created September 13, 2021 07:30
Virtual assistant
import pyttsx3 # pip install pyttsx3
import speech_recognition as sr # pip install speechRecognition
import datetime
import wikipedia # pip install wikipedia
import webbrowser
import os
import smtplib
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
@Dhravya
Dhravya / main.py
Created September 13, 2021 07:29
Basic file organiser
from logging import exception
import os
import shutil
import time
path = "C:/Users/dhrav/Downloads/Organiser"
files = os.listdir(path)
listOfDirectories = {
'Picture_Folder': ['jpeg', 'jpg', 'gif', 'png'],
@Dhravya
Dhravya / calculator.py
Created September 13, 2021 07:16
Basic calculator using tkinter
import tkinter as tk
from tkinter import *
import math
from functools import reduce
def reverse(s):
str = ""
for i in s:
str = i + str
return str