├── Text ├── .DS_Store ├── count_words.txt ├── reverse_string.py ├── count_vowels.py ├── palindrome.py ├── pig_latin.py ├── count_words.py ├── cipher.py ├── fortydaysdating.py └── README.md ├── Numbers ├── .DS_Store ├── gameover.wav ├── cost_tile.py ├── fibonacci.py ├── credit_card.py ├── factorial.py ├── next_prime.py ├── prime_factor.py ├── binary_converter.py ├── return.py ├── alarm.py ├── README.md └── dijkstra.py ├── Misc ├── visited.txt ├── backup_bash_profile.py ├── breakup_days.py ├── cb.py ├── tinyUrl.py ├── twitter_bot.py ├── webcreme.py ├── class-builder │ ├── cb.py │ └── config.json └── classes.json ├── Files ├── file_copy.py └── README.md ├── Classes ├── matrix.py ├── movie_store.py ├── shape.py ├── product_inventory.py └── README.md ├── Networking ├── ip_country.py ├── atomic.py └── README.md ├── Games ├── hangman.py └── README.md ├── .gitignore ├── Web ├── page_scraper.py └── README.md ├── Threading └── README.md ├── Databases └── README.md ├── Graphics and Multimedia └── README.md └── README.md /Text/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelgazela/Projects/HEAD/Text/.DS_Store -------------------------------------------------------------------------------- /Numbers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelgazela/Projects/HEAD/Numbers/.DS_Store -------------------------------------------------------------------------------- /Numbers/gameover.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelgazela/Projects/HEAD/Numbers/gameover.wav -------------------------------------------------------------------------------- /Text/count_words.txt: -------------------------------------------------------------------------------- 1 | this is the first string 2 | this is the seconds string 3 | and this is the third and final string -------------------------------------------------------------------------------- /Misc/visited.txt: -------------------------------------------------------------------------------- 1 | http://www.icora.com/ 2 | http://www.timvandamme.com/ 3 | http://www.eighty8four.com/ 4 | http://www.intensify.org/ 5 | -------------------------------------------------------------------------------- /Misc/backup_bash_profile.py: -------------------------------------------------------------------------------- 1 | import shutil 2 | 3 | bash_file_path = '/Users/migueloliveira/.bash_profile' 4 | dest_file_path = '/Users/migueloliveira/Dropbox/Stuff/.bash_profile_backup' 5 | 6 | shutil.copyfile(bash_file_path, dest_file_path) -------------------------------------------------------------------------------- /Text/reverse_string.py: -------------------------------------------------------------------------------- 1 | # Reverse a String 2 | # Enter a string and the program will reverse it and print it out. 3 | 4 | 5 | def reverse_string(string): 6 | return string[::-1] 7 | 8 | string = raw_input('String: ') 9 | 10 | print reverse_string(string) 11 | -------------------------------------------------------------------------------- /Misc/breakup_days.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, date 2 | 3 | 4 | def main(): 5 | fateful_day = date(2013, 06, 26) 6 | delta = date.today() - fateful_day 7 | 8 | print "%s days have passed since we broke up." % delta.days 9 | if __name__ == "__main__": 10 | main() -------------------------------------------------------------------------------- /Misc/cb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import json 3 | 4 | """ 5 | Class note builder for college 6 | """ 7 | 8 | def main(): 9 | with open('classes.json') as fin: 10 | data = json.load(fin) 11 | 12 | print data['name'] 13 | 14 | if __name__ == "__main__": 15 | main() -------------------------------------------------------------------------------- /Files/file_copy.py: -------------------------------------------------------------------------------- 1 | # File Copy Utility 2 | # Create a utility that can do bulk file copying and backups of other files. 3 | 4 | """ 5 | For now it just copies a file 6 | """ 7 | 8 | import sys 9 | 10 | program, original, copy = sys.argv 11 | 12 | fin = open(original) 13 | fout = open(copy, "w") 14 | 15 | fout.write(fin.read()) 16 | 17 | fin.close() 18 | fout.close() -------------------------------------------------------------------------------- /Numbers/cost_tile.py: -------------------------------------------------------------------------------- 1 | # Find Cost of Tile to Cover W x H Floor 2 | # Calculate the total cost of tile it would take to cover a floor plan of width and height, 3 | # using a cost entered by the user. 4 | 5 | height = int(raw_input("Height: ")) 6 | width = int(raw_input("Width: ")) 7 | cost = int(raw_input("Cost: ")) 8 | 9 | print "Total cost is " + str(width * height * cost) + "€" 10 | -------------------------------------------------------------------------------- /Classes/matrix.py: -------------------------------------------------------------------------------- 1 | class Matrix(object): 2 | 3 | def __init__(self, n, m, init=True): 4 | self.n = n 5 | self.m = m 6 | if init: 7 | self.rows = [[0]*n for i in range(m)] 8 | else: 9 | self.rows = [] 10 | 11 | 12 | def main(): 13 | m1 = Matrix(3, 3) 14 | print m1.matrix 15 | 16 | if __name__ == "__main__": 17 | main() -------------------------------------------------------------------------------- /Networking/ip_country.py: -------------------------------------------------------------------------------- 1 | import urllib 2 | import sys 3 | 4 | 5 | def find_country(ip): 6 | sock = urllib.urlopen("http://whatismyipaddress.com/ip/"+ip) 7 | html_source = sock.read() 8 | 9 | print html_source 10 | 11 | close sock 12 | return "Testing" 13 | 14 | 15 | def main(): 16 | for arg in sys.argv[1:]: 17 | print "%s - %s" % (arg, find_country(arg)) 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /Games/hangman.py: -------------------------------------------------------------------------------- 1 | def read_words(filename): 2 | res = [] 3 | try: 4 | fin = open(filename) 5 | for line in fin: 6 | word = line.strip() 7 | res.append((word, False)) 8 | fin.close() 9 | return res 10 | except: 11 | print "Something went wrong with file operation" 12 | 13 | 14 | def get_unused_random_word(words): 15 | pass 16 | 17 | 18 | if __name__ == "__main__": 19 | words = read_words("words.txt") 20 | print words -------------------------------------------------------------------------------- /Text/count_vowels.py: -------------------------------------------------------------------------------- 1 | # Count Vowels 2 | # Enter a string and the program counts the number of vowels in the text. 3 | # For added complexity have it report a sum of each vowel found. 4 | 5 | vowels = ['a', 'e', 'i', 'o', 'u'] 6 | counter = [0, 0, 0, 0, 0] 7 | 8 | 9 | def count_vowels(string): 10 | for i in range(0, 5): 11 | counter[i] = string.count(vowels[i]) 12 | 13 | count_vowels(raw_input('String: ')) 14 | 15 | for i in range(0, 5): 16 | print vowels[i] + ": " + str(counter[i]) 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # Packages 7 | *.egg 8 | *.egg-info 9 | dist 10 | build 11 | eggs 12 | parts 13 | bin 14 | var 15 | sdist 16 | develop-eggs 17 | .installed.cfg 18 | lib 19 | lib64 20 | 21 | # Installer logs 22 | pip-log.txt 23 | 24 | # Unit test / coverage reports 25 | .coverage 26 | .tox 27 | nosetests.xml 28 | 29 | # Translations 30 | *.mo 31 | 32 | # Mr Developer 33 | .mr.developer.cfg 34 | .project 35 | .pydevproject 36 | 37 | # Komodo 38 | .komodotools/ 39 | *.komodoproject -------------------------------------------------------------------------------- /Numbers/fibonacci.py: -------------------------------------------------------------------------------- 1 | # Fibonacci Sequence 2 | # Enter a number and have the program generate the Fibonacci sequence to 3 | # that number or to the Nth number. 4 | 5 | 6 | def get_fibonacci_seq(n): 7 | res = [1,1] 8 | while len(res) < n: 9 | res.append(res[-1] + res[-2]) 10 | return res[:n] 11 | 12 | 13 | if __name__ == "__main__": 14 | try: 15 | n = int(raw_input("How many numbers in the sequence? ")) 16 | seq = get_fibonacci_seq(n) 17 | print seq 18 | except: 19 | print "Invalid input" -------------------------------------------------------------------------------- /Web/page_scraper.py: -------------------------------------------------------------------------------- 1 | from bs4 import BeautifulSoup 2 | import urllib2 3 | 4 | def main(): 5 | url = raw_input('URL: ') 6 | choice = input('Scrape what?\n 1 - Links\n 2 - Images\n 3 - Both\nOption: ') 7 | 8 | soup = BeautifulSoup(urllib2.urlopen(url).read()) 9 | 10 | if choice == 1 or choice == 3: 11 | urls = [link.get('href') for link in soup.find_all('a')] 12 | print "\n".join(urls) 13 | if choice == 2 or choice == 3: 14 | images = [image['src'] for image in soup.find_all('img')] 15 | print images 16 | 17 | 18 | if __name__ == "__main__": 19 | main() -------------------------------------------------------------------------------- /Text/palindrome.py: -------------------------------------------------------------------------------- 1 | # Check if Palindrome 2 | # Checks if the string entered by the user is a palindrome. 3 | # That is that it reads the same forwards as backwards like “racecar” 4 | 5 | 6 | def is_palindrome(string): 7 | if len(string) <= 1: 8 | return True 9 | if string[0] != string[-1]: 10 | return False 11 | return is_palindrome(string[1:-1]) 12 | 13 | 14 | def is_palindrome_alt(string): 15 | return string == string[::-1] 16 | 17 | string = raw_input('String: ').lower() 18 | 19 | if is_palindrome_alt(string): 20 | print string + ' is a palindrome' 21 | else: 22 | print string + ' is not a palindrome' 23 | -------------------------------------------------------------------------------- /Networking/atomic.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | 3 | # Get Atomic Time from Internet Clock 4 | # This program will get the true atomic time from an atomic time clock on the 5 | # Internet. There are various clocks across the world. 6 | # Do a search for a list of them. 7 | 8 | import urllib2 9 | from bs4 import BeautifulSoup 10 | 11 | def main(): 12 | content = urllib2.urlopen("http://time.is/") 13 | page = BeautifulSoup(content) 14 | 15 | time = page.find(id="twd").string 16 | location = page.find("h1", id="pL").a.string 17 | 18 | print "It's currently {0} in {1}.".format(time, location) 19 | 20 | if __name__ == "__main__": 21 | main() 22 | 23 | -------------------------------------------------------------------------------- /Text/pig_latin.py: -------------------------------------------------------------------------------- 1 | # Pig Latin 2 | # Pig Latin is a game of alterations played on the English language game. 3 | # To create the Pig Latin form of an English word the initial consonant sound is 4 | # transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). 5 | # Read Wikipedia for more information on rules. 6 | 7 | vowels = 'aeiou' 8 | pig = 'ay' 9 | res = '' 10 | 11 | string = raw_input("String: ") 12 | 13 | words = string.split(' ') # doesn't work with punctuation 14 | 15 | for word in words: 16 | if word[0] in vowels: 17 | res += word + "w" + pig + ' ' 18 | else: 19 | res += word[1:] + word[0] + pig + ' ' 20 | 21 | print res 22 | -------------------------------------------------------------------------------- /Numbers/credit_card.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | credit_card_num = list(raw_input("Credit card #: ")) 3 | checksum_nums = [int(v) * 2 for i, v in enumerate(credit_card_num) if i % 2 == 0] 4 | checksum = 0 5 | 6 | for i, v in enumerate(credit_card_num): 7 | checksum += (i % 2 != 0 and int(credit_card_num[i]) or 0) 8 | 9 | for v in checksum_nums: 10 | if v >= 10: 11 | q, r = divmod(v, 10) 12 | checksum += q + r 13 | else: 14 | checksum += v 15 | 16 | if checksum % 10 == 0: print "The credit card number is valid." 17 | else: print "The credit card number is not valid!" 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /Misc/tinyUrl.py: -------------------------------------------------------------------------------- 1 | from __future__ import with_statement 2 | import contextlib 3 | 4 | try: 5 | from urllib.parse import urlencode 6 | except ImportError: 7 | from urllib import urlencode 8 | try: 9 | from urllib.request import urlopen 10 | except ImportError: 11 | from urllib2 import urlopen 12 | 13 | import sys 14 | 15 | 16 | def make_tiny(url): 17 | requet_url = ('http://tinyurl.com/api-create.php?' + urlencode({'url': url})) 18 | with contextlib.closing(urlopen(requet_url)) as response: 19 | return response.read().decode('utf-8') 20 | 21 | 22 | def main(): 23 | for tinyurl in map(make_tiny, sys.argv[1:]): 24 | print(tinyurl) 25 | 26 | 27 | if __name__ == "__main__": 28 | main() -------------------------------------------------------------------------------- /Text/count_words.py: -------------------------------------------------------------------------------- 1 | # Count Words in a String 2 | # Counts the number of individual words in a string. 3 | # For added complexity read these strings in from a text file and generate a summary. 4 | 5 | import string 6 | 7 | 8 | def process_file(filename): 9 | hist = {} 10 | fin = open(filename) 11 | for line in fin: 12 | process_line(line, hist) 13 | return hist 14 | 15 | 16 | def process_line(line, hist): 17 | line = line.replace('-', ' ') 18 | 19 | for word in line.split(): 20 | word = word.strip(string.punctuation+string.whitespace) 21 | word = word.lower() 22 | 23 | hist[word] = hist.get(word, 0) + 1 24 | 25 | if __name__ == "__main__": 26 | hist = process_file("count_words.txt") 27 | print hist 28 | 29 | -------------------------------------------------------------------------------- /Numbers/factorial.py: -------------------------------------------------------------------------------- 1 | # Factorial Finder 2 | # The Factorial of a positive integer, n, is defined as the product of the 3 | # sequence n, n-1, n-2, ...1 and the factorial of zero, 0, is defined as 4 | # being 1. Solve this using both loops and recursion. 5 | 6 | def factorial(n): 7 | result = 1 8 | 9 | if n == 0: 10 | return result 11 | 12 | while n > 0: 13 | result *= n 14 | n -= 1 15 | 16 | return result 17 | 18 | 19 | def factorial_rec(n): 20 | if n == 0: 21 | return 1 22 | else: 23 | return n * factorial_rec(n-1) 24 | 25 | 26 | def main(): 27 | n = 5 28 | result = factorial_rec(n) 29 | print result 30 | result = factorial(n) 31 | print result 32 | 33 | 34 | if __name__ == "__main__": 35 | main() -------------------------------------------------------------------------------- /Numbers/next_prime.py: -------------------------------------------------------------------------------- 1 | # Next Prime Number 2 | # Have the program find prime numbers until the user chooses to stop asking for the next one. 3 | 4 | import math 5 | 6 | 7 | def is_prime(num): 8 | if num < 2: 9 | return False 10 | 11 | for i in range(2, int(math.sqrt(num))+1): 12 | if num % i == 0: 13 | return False 14 | return True 15 | 16 | 17 | def get_next_prime(num): 18 | i = num + 1 19 | while True: 20 | if is_prime(i): 21 | return i 22 | i += 1 23 | 24 | if __name__ == "__main__": 25 | print "Press enter to continue, done to stop" 26 | 27 | i = 2 28 | while True: 29 | print i, 30 | user_input = raw_input() 31 | if user_input == 'done': 32 | break 33 | i = get_next_prime(i) 34 | -------------------------------------------------------------------------------- /Numbers/prime_factor.py: -------------------------------------------------------------------------------- 1 | # Prime Factorization 2 | # Have the user enter a number and find all Prime Factors (if there are any) and display them. 3 | 4 | import math 5 | 6 | 7 | def is_prime(num): 8 | if num < 2: 9 | return False 10 | 11 | for i in range(2, int(math.sqrt(num))+1): 12 | if num % i == 0: 13 | return False 14 | return True 15 | 16 | 17 | def get_prime_factors(n): 18 | res = [] 19 | for i in range(1, n/2+1): 20 | if (n % i == 0) and is_prime(i): 21 | res.append(i) 22 | 23 | if is_prime(n): 24 | res.append(n) 25 | return res 26 | 27 | 28 | if __name__ == "__main__": 29 | try: 30 | n = int(raw_input("Pick a number: ")) 31 | pf = get_prime_factors(n) 32 | print pf 33 | except: 34 | print "Invalid input" 35 | -------------------------------------------------------------------------------- /Numbers/binary_converter.py: -------------------------------------------------------------------------------- 1 | # Binary to Decimal and Back Converter 2 | # Develop a converter to convert a decimal number to binary 3 | # or a binary number to its decimal equivalent. 4 | 5 | def binary_to_decimal(binary): 6 | decimal = 0 7 | i = 0 8 | 9 | while binary > 0: 10 | binary, last_digit = divmod(binary, 10) 11 | 12 | if last_digit not in [0,1]: 13 | raise ValueError 14 | 15 | decimal += last_digit * (2**i) 16 | i += 1 17 | 18 | return decimal 19 | 20 | def decimal_to_binary(decimal): 21 | binary = [] 22 | 23 | while decimal > 0: 24 | decimal, remainder = divmod(decimal, 2) 25 | binary.append(remainder) 26 | 27 | binary.reverse() 28 | 29 | res = "" 30 | for digit in binary: 31 | res += str(digit) 32 | 33 | return int(res) 34 | 35 | def main(): 36 | print binary_to_decimal(110000) 37 | print decimal_to_binary(48) 38 | 39 | 40 | if __name__ == "__main__": 41 | main() -------------------------------------------------------------------------------- /Numbers/return.py: -------------------------------------------------------------------------------- 1 | # Change Return Program 2 | # The user enters a cost and then the amount of money given. 3 | # The program will figure out the change and the number of quarters, 4 | # dimes, nickels, pennies needed for the change. 5 | 6 | coins = (0.25, 0.10, 0.05, 0.01) 7 | 8 | 9 | def select_change(change): 10 | res = [] 11 | for v in coins: 12 | res.append(int(round(change, 2) / v)) 13 | change -= v * res[-1] 14 | return res 15 | 16 | 17 | if __name__ == "__main__": 18 | try: 19 | cost = float(raw_input("Cost: ")) 20 | amount = float(raw_input("Amount given: ")) 21 | 22 | if amount < cost: 23 | print "Not enough money." 24 | elif amount == cost: 25 | print "Exact money, no change required." 26 | else: 27 | res = select_change(amount-cost) 28 | print "The change consists of %d quarters, %d dimes, %d nickels and %d pennies" % (res[0], res[1], res[2], res[3]) 29 | 30 | 31 | except: 32 | print "Invalid input" 33 | -------------------------------------------------------------------------------- /Numbers/alarm.py: -------------------------------------------------------------------------------- 1 | # Alarm Clock 2 | # A simple clock where it plays a sound after X number of 3 | # minutes/seconds or at a particular time. 4 | 5 | import pygame 6 | import time 7 | 8 | pygame.init() 9 | 10 | def play_sound(): 11 | sound_wav = pygame.mixer.Sound("gameover.wav") 12 | channel = sound_wav.play() 13 | while channel.get_busy(): 14 | pygame.time.delay(100) 15 | 16 | sound_wav = pygame.mixer.Sound("gameover.wav") 17 | 18 | def main(): 19 | print """ 20 | 1. Play sound after x seconds 21 | 2. Play sound after y minutes 22 | try: 23 | wait_seconds = int(raw_input("Wait how many seconds? ")) 24 | 25 | if wait_seconds < 0: 26 | print "Must be greater or equal than 0" 27 | exit() 28 | 29 | start = time.time() 30 | end = time.time() 31 | 32 | while (end - start) < wait_seconds: 33 | end = time.time() 34 | 35 | play_sound() 36 | except ValueError: 37 | print "Invalid input." 38 | 39 | 40 | if __name__ == "__main__": 41 | main() 42 | -------------------------------------------------------------------------------- /Threading/README.md: -------------------------------------------------------------------------------- 1 | Threading 2 | --------- 3 | 4 | **Create A Progress Bar for Downloads** – Create a progress bar for applications that can keep track of a download in progress. The progress bar will be on a separate thread and will communicate with the main thread using delegates. 5 | 6 | **Download Manager** – Allow your program to download various files and each one is downloading in the background on a separate thread. The main thread will keep track of the other thread’s progress and notify the user when downloads are completed. 7 | 8 | **Chat Application (remoting style)** – Create a chat application which allows you to connect directly to another computer by their IP through the use of remoting and allow your “server” application handle multiple incoming connections. 9 | 10 | **Bulk Thumbnail Creator** – Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program which can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handling re-sizing, have another bulk renaming of thumbnails etc. 11 | -------------------------------------------------------------------------------- /Text/cipher.py: -------------------------------------------------------------------------------- 1 | # Vigenere / Vernam / Ceasar Ciphers 2 | # Functions for encrypting and decrypting data messages. Then send them to a friend. 3 | 4 | import string 5 | 6 | 7 | def shift_letter(letter, shift): 8 | if letter not in string.ascii_letters: 9 | return letter 10 | 11 | if letter in string.ascii_uppercase: 12 | start = ord('A') 13 | else: 14 | start = ord('a') 15 | 16 | return chr((ord(letter) - start + shift) % 26 + start) 17 | 18 | 19 | def ceasar_encrypt(message, shift): 20 | return ceasar_aux(message, shift) 21 | 22 | 23 | def ceasar_decrypt(message, shift): 24 | return ceasar_aux(message, -shift) 25 | 26 | 27 | def ceasar_aux(message, shift): 28 | res = "" 29 | for char in message: 30 | res += shift_letter(char, shift) 31 | return res 32 | 33 | 34 | def vernam_encrypt(message): 35 | 36 | 37 | 38 | def vernam_decrypt(message): 39 | pass 40 | 41 | 42 | def vigenere_encrypt(message): 43 | pass 44 | 45 | 46 | def vigenere_decrypt(message): 47 | pass 48 | 49 | 50 | # testing ceasar cipher 51 | encrypted_ceasar = ceasar_encrypt("AY", 3) 52 | print encrypted_ceasar 53 | print ceasar_decrypt(encrypted_ceasar, 3) 54 | 55 | -------------------------------------------------------------------------------- /Misc/twitter_bot.py: -------------------------------------------------------------------------------- 1 | from twitter import Twitter, OAuth, TwitterHTTPError 2 | 3 | OAUTH_TOKEN = "218804182-mgRGE5K7JU8CgOhcC3BvICoahvPGIyJmvQDTrG6Q" 4 | OAUTH_SECRET = "e1KU101dJLRa5VBLEyaUhQpyyh5g5TC975YSjQIeg" 5 | CONSUMER_KEY = "jyigk3zwe3BHqNYx9QtbCg" 6 | CONSUMER_SECRET = "yHh8V3DARbCXvQMeTAY8yzoRa0mksBXlo6zF9i0" 7 | 8 | t = Twitter(auth=OAuth(OAUTH_TOKEN, OAUTH_SECRET, 9 | CONSUMER_KEY, CONSUMER_SECRET)) 10 | 11 | def search_tweets(q, count=100): 12 | return t.search.tweets(q=q, result_type='recent', count=count) 13 | 14 | def fav_tweet(tweet): 15 | try: 16 | result = t.favorites.create(_id=tweet['id']) 17 | print "Favorited: {0}".format(result['text']) 18 | return result 19 | # when you have already favourited a tweet 20 | # this error is thrown 21 | except TwitterHTTPError as e: 22 | print "Error: ", e 23 | return None 24 | 25 | def auto_fav(q, count=100): 26 | result = search_tweets(q, count) 27 | a = result['statuses'][0]['user']['screen_name'] 28 | print a 29 | success = 0 30 | 31 | for tweet in result['statuses']: 32 | if fav_tweet(tweet) is not None: 33 | success += 1 34 | 35 | print "We favorited a total of {0} out of {1} tweets".format(success, 36 | len(result['statuses'])) -------------------------------------------------------------------------------- /Games/README.md: -------------------------------------------------------------------------------- 1 | Games 2 | --------- 3 | 4 | **Battleship** – Create two game boards and let each player place a number of war ships. Each player can’t see the other person’s board. They then take turns firing at one another by guessing one of the board squares. If the square they guess contains part of a ship, it is a hit. Otherwise it is a miss. They sink a ship when all squares containing that particular ship have been uncovered. The player wins when all their opponents’ ships have been sunk. 5 | 6 | **Chess and Checkers** – Simply put a game of chess or checkers. Try to make it playable online and if you can use a graphical user interface that can also undo or redo a step as well as keep a history of moves for replay. 7 | 8 | **Hangman** – Randomly select a word from a file, have the user guess characters in the word. For each character they guess that is not in the word, have it draw another part of a man hanging in a noose. If the picture is completed before they guess all the characters, they lose. 9 | 10 | **Crossword Puzzle** – Create a crossword puzzle which links words together on common letters. Provide a list of clues for each word and let the user enter fill in the words until the entire crossword is filled in. 11 | 12 | **Frogger** – Get your frog across the river and lanes of traffic by either jumping on logs and lily pads rushing by at different speeds or avoid the automobiles which are also moving at various speeds. Based on the old arcade game. -------------------------------------------------------------------------------- /Classes/movie_store.py: -------------------------------------------------------------------------------- 1 | # Movie Store 2 | # Manage video rentals and controls when videos are checked out, due to return, 3 | # overdue fees and for added complexity create a summary of those accounts 4 | # which are overdue for contact. 5 | 6 | class Movie(object): 7 | 8 | current_id = 0 9 | 10 | def __init__(self, title, year, num_copies=0): 11 | Movie.current_id += 1 12 | self.id = Movie.current_id 13 | self.title = title 14 | self.year = year 15 | self.num_copies = num_copies 16 | 17 | def add_num_copies(self, num): 18 | self.num_copies += num 19 | 20 | def remove_num_copies(self, num): 21 | self.num_copies = max(0, self.num_copies - num) 22 | 23 | class Rental(object): 24 | 25 | def __init__(self, movie, customer): 26 | self.movie = movie 27 | self.start_date = None 28 | self.end_date = None 29 | 30 | 31 | class Customer(object): 32 | 33 | current_id = 0 34 | 35 | def __init__(self, name): 36 | Customer.current_id += 1 37 | self.id = Customer.current_id 38 | self.name = name 39 | self.active_rentals = [] 40 | self.past_rentals = [] 41 | 42 | def rent_movie(self, rental): 43 | self.active_rentals.append(rental) 44 | 45 | def deliver_movie(self, movie_id): 46 | for rental in self.active_rentals: 47 | if rental.movie.id == movie_id: 48 | self.past_rentals.append(rental) 49 | self.active_rentals.remove(rental) 50 | break 51 | 52 | 53 | class MovieStore(object): 54 | 55 | def __init__(self): 56 | self.movies = [] 57 | self.active_rentals = [] 58 | self.past_rentals = [] 59 | self.customers = [] 60 | 61 | 62 | -------------------------------------------------------------------------------- /Misc/webcreme.py: -------------------------------------------------------------------------------- 1 | # Webcreme website design inspiration 2 | # It opens a random website from http://www.webcreme.com/ 3 | # It saves all visited websites in a text file 4 | 5 | from bs4 import BeautifulSoup 6 | import urllib 7 | import webbrowser 8 | import re 9 | import random 10 | 11 | def get_number_pages(): 12 | page = urllib.urlopen("http://www.webcreme.com/").read() 13 | soup = BeautifulSoup(page) 14 | pages = soup.find('div', class_='navigation').contents[0] 15 | 16 | regex = re.search('(\d+)', pages) 17 | return regex.group(1) 18 | 19 | 20 | def get_url_from_page(page): 21 | page = urllib.urlopen("".join(["http://www.webcreme.com/page/", page])).read() 22 | soup = BeautifulSoup(page) 23 | 24 | websites = soup.find_all('div', class_='image') 25 | 26 | while True: 27 | # bug: if all websites of this page have been visited it enters an infinite loop 28 | chosen_one = random.randrange(len(websites)) 29 | url = websites[chosen_one].a['href'] 30 | 31 | if not visited_before(url): 32 | return (chosen_one, websites[chosen_one].a['href']) 33 | 34 | 35 | def save_url(url): 36 | with open("visited.txt", "a") as f: 37 | f.write("".join([url, "\n"])) 38 | 39 | 40 | def visited_before(url): 41 | with open("visited.txt", "r") as f: 42 | for visited_url in f: 43 | if visited_url.strip() == url: 44 | return True 45 | return False 46 | 47 | 48 | def main(): 49 | pages = get_number_pages() 50 | page = random.randint(1, int(pages)) 51 | 52 | url = get_url_from_page(str(page)) 53 | webbrowser.open_new(url[1]) 54 | save_url(url[1]) 55 | 56 | print "Opening '{2}', page {0}, link #{1}".format(page, url[0]+1, url[1]) 57 | 58 | if __name__ == "__main__": 59 | main() 60 | -------------------------------------------------------------------------------- /Classes/shape.py: -------------------------------------------------------------------------------- 1 | # Shape Area and Perimeter Classes 2 | # Create an abstract class called Shape and then inherit 3 | # from it other shapes like diamond, rectangle, circle, triangle etc. 4 | # Then have each class override the area and perimeter functionality to handle each shape type. 5 | 6 | import math 7 | 8 | 9 | class Shape(object): 10 | def __init__(self): 11 | self.area = 0.0 12 | self.perimeter = 0.0 13 | 14 | def calc_area(self): 15 | pass 16 | 17 | def calc_perimeter(self): 18 | pass 19 | 20 | 21 | class Rectangle(Shape): 22 | def __init__(self, w, l): 23 | super(Rectangle, self).__init__() 24 | self.w = w 25 | self.l = l 26 | 27 | def calc_area(self): 28 | self.area = self.w * self.l 29 | return self.area 30 | 31 | def calc_perimeter(self): 32 | self.perimeter = 2 * self.w + 2 * self.l 33 | return self.perimeter 34 | 35 | 36 | class Circle(Shape): 37 | def __init__(self, r): 38 | super(Circle, self).__init__() 39 | self.r = r 40 | 41 | def calc_area(self): 42 | self.area = math.pi * (self.r ** 2) 43 | return self.area 44 | 45 | def calc_perimeter(self): 46 | self.perimeter = 2 * math.pi * self.r 47 | return self.perimeter 48 | 49 | 50 | class Triangle(Shape): 51 | def __init__(self, b, s2, s3, h): 52 | self.b = b 53 | self.s2 = s2 54 | self.s3 = s3 55 | self.h = h 56 | 57 | def calc_area(self): 58 | self.area = 0.5 * self.b * self.h 59 | return self.area 60 | 61 | def calc_perimeter(self): 62 | self.perimeter = self.b + self.s2 + self.s3 63 | return self.perimeter 64 | 65 | 66 | s = Rectangle(10, 20) 67 | print "Rectangle - area: %.2f\tperimeter: %.2f" % (s.calc_area(), s.calc_perimeter()) 68 | 69 | c = Circle(2) 70 | print "Circle - area: %.2f\tperimeter: %.2f" % (c.calc_area(), c.calc_perimeter()) 71 | 72 | t = Triangle(3, 2, 2, 2.5) 73 | print "Triangle - area: %.2f\tperimeter: %.2f" % (t.calc_area(), t.calc_perimeter()) 74 | 75 | 76 | -------------------------------------------------------------------------------- /Classes/product_inventory.py: -------------------------------------------------------------------------------- 1 | """ 2 | Product Inventory Project 3 | Create an application which manages an 4 | inventory of products. Create a product class which has a price, id, 5 | and quantity on hand. Then create an inventory class which keeps 6 | track of various products and can sum up the inventory value. 7 | """ 8 | 9 | class Product(object): 10 | 11 | __current_id = 0 12 | 13 | def __init__(self, price, quantity): 14 | Product.__current_id += 1 15 | self.id = Product.__current_id 16 | self.price = price 17 | self.quantity = quantity 18 | 19 | def add_quantity(self, quantity): 20 | self.quantity += quantity 21 | 22 | def remove_quantity(self, quantity): 23 | self.quantity = max(0, self.quantity - quantity) 24 | 25 | def __str__(self): 26 | return "ID: {0}\tPrice: {1}\tQuantity: {2}".format(self.id, self.price, self.quantity) 27 | 28 | 29 | class Inventory(object): 30 | 31 | def __init__(self): 32 | self.products = [] 33 | 34 | def add_product(self, product): 35 | self.products.append(product) 36 | 37 | def add_products(self, products): 38 | self.products.extend(products) 39 | 40 | def remove_product(self, product_id): 41 | for product in self.products: 42 | if product.id == product_id: 43 | self.products.remove(product) 44 | break 45 | 46 | def print_inventory(self): 47 | for product in self.products: 48 | print product 49 | 50 | def get_total_value(self): 51 | sum = 0 52 | for product in self.products: 53 | sum += product.quantity * product.price 54 | return sum 55 | 56 | def print_separator(): 57 | print "-" * 40 58 | 59 | p1 = Product(100, 20) 60 | p2 = Product(200, 2) 61 | 62 | i = Inventory() 63 | 64 | i.add_product(p1) 65 | i.add_product(p2) 66 | 67 | i.print_inventory() 68 | print_separator() 69 | 70 | i.remove_product(2) 71 | i.print_inventory() 72 | print_separator() 73 | 74 | i.add_products([Product(300, 1), Product(400,2)]) 75 | i.print_inventory() 76 | 77 | print i.get_total_value() -------------------------------------------------------------------------------- /Misc/class-builder/cb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import json 3 | import os 4 | import sys 5 | from datetime import datetime 6 | from datetime import timedelta 7 | 8 | 9 | def read_config_file(): 10 | try: 11 | with open('config.json') as config_file: 12 | return json.load(config_file) 13 | except IOError: 14 | return None; 15 | 16 | 17 | def process_class(class_): 18 | create_notes('praticas', class_['schedule']['practical']) 19 | create_notes('teoricas', class_['schedule']['theoretical']) 20 | 21 | 22 | def create_notes(folder, classes): 23 | if len(classes) > 0: 24 | os.mkdir(folder) 25 | os.chdir(os.path.join(os.getcwd(), folder)) 26 | 27 | for p in classes: 28 | start = datetime.strptime(p['start_date'], "%d/%m/%Y") 29 | end = datetime.strptime(p['end_date'], "%d/%m/%Y") 30 | num_class = 1 31 | 32 | while True: 33 | with open('aula_{0}.md'.format(num_class), 'w') as fout: 34 | fout.write("# {0}\n## Aula {1}".format( 35 | start.strftime("%d/%m/%Y"), 36 | num_class)) 37 | 38 | num_class += 1 39 | start = start + timedelta(days=7) 40 | 41 | if end < start: 42 | break 43 | 44 | 45 | def main(): 46 | data = read_config_file() 47 | if not data: 48 | print "Config file is missing." 49 | return 50 | 51 | path = data['path'] 52 | 53 | # create the semester folder 54 | if not os.path.exists(path): 55 | os.mkdir(path) 56 | 57 | # create a folder for each class 58 | for s_class in data['classes']: 59 | if not os.path.exists(os.path.join(path, s_class['akronim'])): 60 | os.mkdir(os.path.join(path, s_class['akronim'])) 61 | os.chdir(os.path.join(path, s_class['akronim'])) 62 | process_class(s_class) 63 | else: 64 | print "Folder '{0}' already exists at {1}".format( 65 | s_class['akronim'], path) 66 | 67 | 68 | 69 | if __name__ == "__main__": 70 | sys.exit(main()) -------------------------------------------------------------------------------- /Text/fortydaysdating.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, date 2 | import urllib 3 | import re 4 | import webbrowser 5 | import sched 6 | import time 7 | 8 | sec_between_checks = 60 9 | 10 | days = [("2013-07-26", "day-nineteen"), 11 | ("2013-07-27", "day-twenty"), ("2013-07-28", "day-twentyone"), 12 | ("2013-07-29", "day-twentytwo"), ("2013-07-30", "day-twentythree"), 13 | ("2013-07-31", "day-twentyfour"), ("2013-08-01", "day-twentyfive"), 14 | ("2013-08-02", "day-twentysix"), ("2013-08-03", "day-twentyseven"), 15 | ("2013-08-04", "day-twentyeight"), ("2013-08-05", "day-twentynine"), 16 | ("2013-08-06", "day-thirty"), ("2013-08-07", "day-thirtyone"), 17 | ("2013-08-08", "day-thirtytwo"), ("2013-08-09", "day-thirtythree"), 18 | ("2013-08-10", "day-thirtyfour"), ("2013-08-11", "day-thirtyfive"), 19 | ("2013-08-12", "day-thirtysix"), ("2013-08-13", "day-thirtyseven"), 20 | ("2013-08-14", "day-thirtyeight"), ("2013-08-15", "day-thirtynine"), 21 | ("2013-08-16", "day-forty") 22 | ] 23 | 24 | 25 | def check_new_post(sc): 26 | now = datetime.now().time() 27 | 28 | if now.hour >= 14: 29 | data = urllib.urlopen("http://fortydaysofdating.com/").read() 30 | 31 | # find what post it should search 32 | today = str(date.today()) 33 | for post_date, post_day in days: 34 | if post_date == today: 35 | post = post_day 36 | break 37 | 38 | match = re.search(r'post-'+post, data) 39 | if match: 40 | print_msg("New post available!") 41 | webbrowser.open_new("http://fortydaysofdating.com/"+post) 42 | else: 43 | print_msg("Nothing new so far...") 44 | sc.enter(sec_between_checks, 1, check_new_post, (sc,)) 45 | else: 46 | print_msg("It's still early. Waiting a little longer to scrap the site.") 47 | sc.enter(sec_between_checks*5, 1, check_new_post, (sc,)) 48 | 49 | 50 | def print_msg(msg): 51 | now = datetime.now().time() 52 | print "[%.2d:%.2d:%.2d] - %s" % (now.hour, now.minute, now.second, msg) 53 | 54 | 55 | def main(): 56 | s = sched.scheduler(time.time, time.sleep) 57 | s.enter(sec_between_checks, 1, check_new_post, (s,)) 58 | s.run() 59 | 60 | 61 | if __name__ == "__main__": 62 | main() 63 | -------------------------------------------------------------------------------- /Misc/classes.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semestre-2", 3 | "path": "/Users/migueloliveira/Dropbox/FEUP/ano_4/", 4 | "classes": 5 | [ 6 | { 7 | "name": "Sistemas de Informação", 8 | "akronim": "SINF", 9 | "url": "https://sigarra.up.pt/feup/pt/ucurr_geral.ficha_uc_view?pv_ocorrencia_id=333136", 10 | "horario": 11 | { 12 | "praticas": 13 | [ 14 | { 15 | "week-day": "monday", 16 | "starts-at": "09:30", 17 | "duration": 2 18 | } 19 | ], 20 | "teoricas": 21 | [ 22 | { 23 | "week-day": "tuesday", 24 | "starts-at": "15:30", 25 | "duration": 2 26 | } 27 | ] 28 | } 29 | }, 30 | { 31 | "name": "Agentes e Inteligência Artificial Distribuída", 32 | "akronim": "AIAD", 33 | "url": "https://sigarra.up.pt/feup/pt/ucurr_geral.ficha_uc_view?pv_ocorrencia_id=333133", 34 | "horario": 35 | { 36 | "praticas": 37 | [ 38 | { 39 | "week-day": "thursday", 40 | "starts-at": "16:30", 41 | "duration": 2 42 | } 43 | ], 44 | "teoricas": 45 | [ 46 | { 47 | "week-day": "wednesday", 48 | "starts-at": "11:30", 49 | "duration": 1 50 | }, 51 | { 52 | "week-day": "thursday", 53 | "starts-at": "15:30", 54 | "duration": 1 55 | } 56 | ] 57 | } 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /Misc/class-builder/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "path": "/Users/migueloliveira/Dropbox/FEUP/ano_4/semestre-2", 3 | "classes": 4 | [ 5 | { 6 | "name": "Arquitectura de Sistemas de Software", 7 | "akronim": "ASSO", 8 | "url": "https://sigarra.up.pt/feup/pt/ucurr_geral.ficha_uc_view?pv_ocorrencia_id=333139", 9 | "schedule": 10 | { 11 | "practical": 12 | [ 13 | { 14 | "week_day": "thursday", 15 | "start_date": "13/02/2014", 16 | "end_date": "30/06/2014", 17 | "starts_at": "13:30", 18 | "duration": 3 19 | } 20 | ], 21 | "theoretical": [] 22 | } 23 | }, 24 | { 25 | "name": "Desenvolvimento de Jogos de Computador", 26 | "akronim": "DJCO", 27 | "url": "https://sigarra.up.pt/feup/pt/ucurr_geral.ficha_uc_view?pv_ocorrencia_id=333150", 28 | "schedule": 29 | { 30 | "practical": 31 | [ 32 | { 33 | "week-day": "monday", 34 | "start_date": "10/02/2014", 35 | "end_date": "30/06/2014", 36 | "starts-at": "09:30", 37 | "duration": 3 38 | } 39 | ], 40 | "theoretical": [] 41 | } 42 | }, 43 | { 44 | "name": "Paradigmas da Programação", 45 | "akronim": "PPRO", 46 | "url": "https://sigarra.up.pt/feup/pt/ucurr_geral.ficha_uc_view?pv_ocorrencia_id=333144", 47 | "schedule": 48 | { 49 | "practical": 50 | [ 51 | { 52 | "week-day": "monday", 53 | "start_date": "10/02/2014", 54 | "end_date": "30/06/2014", 55 | "starts-at": "17:00", 56 | "duration": 3 57 | } 58 | ], 59 | "theoretical": [] 60 | } 61 | } 62 | ] 63 | } -------------------------------------------------------------------------------- /Numbers/README.md: -------------------------------------------------------------------------------- 1 | Numbers 2 | --------- 3 | 4 | **Find PI to the Nth Digit** – Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go. 5 | 6 | [**Fibonacci Sequence**](https://github.com/miguelgazela/Projects/blob/master/Numbers/fibonacci.py) – Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. 7 | 8 | **Prime Factorization** – Have the user enter a number and find all Prime Factors (if there are any) and display them. 9 | 10 | [**Next Prime Number**](https://github.com/miguelgazela/Projects/blob/master/Numbers/next_prime.py) – Have the program find prime numbers until the user chooses to stop asking for the next one. 11 | 12 | [**Find Cost of Tile to Cover W x H Floor**](https://github.com/miguelgazela/Projects/blob/master/Numbers/cost_tile.py) – Calculate the total cost of tile it would take to cover a floor plan of width and height, using a cost entered by the user. 13 | 14 | **Mortgage Calculator** – Calculate the monthly payments of a fixed term mortgage over given Nth terms at a given interest rate. Also figure out how long it will take the user to pay back the loan. 15 | 16 | **Change Return Program** – The user enters a cost and then the amount of money given. The program will figure out the change and the number of quarters, dimes, nickels, pennies needed for the change. 17 | 18 | **Binary to Decimal and Back Converter** – Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. 19 | 20 | **Calculator** – A simple calculator to do basic operators. Make it a scientific calculator for added complexity. 21 | 22 | **Unit Converter (temp, currency, volume, mass and more)** – Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion. 23 | 24 | **Alarm Clock** – A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. 25 | 26 | **Distance Between Two Cities** – Calculates the distance between two cities and allows the user to specify a unit of distance. This program may require finding coordinates for the cities like latitude and longitude. 27 | 28 | **Credit Card Validator** – Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum). 29 | 30 | **Tax Calculator** – Asks the user to enter a cost and either a country or state tax. It then returns the tax plus the total cost with tax. 31 | 32 | **Dijkstra’s Algorithm** – Create a program that finds the shortest path through a graph using its edges. -------------------------------------------------------------------------------- /Networking/README.md: -------------------------------------------------------------------------------- 1 | Networking 2 | --------- 3 | 4 | **FTP Program** – A file transfer program which can transfer files back and forth from a remote web sever. 5 | 6 | [**Get Atomic Time from Internet Clock**](https://github.com/miguelgazela/Projects/blob/master/Networking/atomic.py) – This program will get the true atomic time from an atomic time clock on the Internet. There are various clocks across the world. Do a search for a list of them. 7 | 8 | **Chat Application (IRC or MSN Style)** – Create a chat application that can create simple chat rooms like on Internet Relay Chat (IRC) or a more direct chatting style like MSN. For added complexity, create your own protocol to facilitate this chatting. 9 | 10 | **Fetch Current Weather** – Get the current weather for a given zip/postal code. 11 | 12 | **P2P File Sharing App** – Create a program like LimeWire, FrostWire, Bearshare, or a torrent style application. 13 | 14 | **Port Scanner** – Enter an IP address and a port range where the program will then attempt to find open ports on the given computer by connecting to each of them. On any successful connections mark the port as open. 15 | 16 | **Mail Checker (POP3 / IMAP)** – The user enters various account information include web server and IP, protocol type (POP3 or IMAP) and the application will check for email on several accounts at a given interval. 17 | 18 | **Packet Sniffer** – A utility program that will read packets coming in and out of the machine along with related information like destination and payload size. 19 | 20 | **Country from IP Lookup** – Enter an IP address and find the country that IP is registered in. 21 | 22 | **Whois Search Tool** – Enter an IP or host address and have it look it up through whois and return the results to you. 23 | 24 | **Zip / Postal Code Lookup** – Enter a zip or postal code and have it return which city/cities that are in that zip code. 25 | 26 | **Remote Login** – Create a remote desktop style application which can see and control the remote computer (given you have permissions). It may require the use of your own private network and a second computer to test with. 27 | 28 | **Site Checker with Time Scheduling** – An application that attempts to connect to a website or server every so many minutes or a given time and check if it is up. If it is down, it will notify you by email or by posting a notice on screen. 29 | 30 | **Small Web Server** – A simple web server that can serve HTML files that contain Javascript and other forms of non-code executing code. Added complexity would be to try and implement streaming video, create a server-side language, or serve up other stream types. 31 | 32 | **Web Bot** – An automated program which carries out tasks on the web including checking websites, page scraping, and summarization of data or web posting. 33 | -------------------------------------------------------------------------------- /Databases/README.md: -------------------------------------------------------------------------------- 1 | Databases 2 | --------- 3 | 4 | **SQL Query Analyzer** – A utility application which a user can enter a query and have it run against a local database and look for ways to make it more efficient. 5 | 6 | **Remote SQL Tool** – A utility that can execute queries on remote servers from your local computer across the Internet. It should take in a remote host, user name and password, run the query and return the results. 7 | 8 | **Baseball / Other Card Collector** – Create an online application for keeping track of a collection of cards. Let the user enter all cards in a set, check off which ones they have, which ones they need and generate lists of cards they are looking for. For extra complexity, have it sum up sets and generate reports on how close they are of completing sets or the current value of a set. 9 | 10 | **Report Generator** – Create a utility that generates a report based on some tables in a database. Generates a sales reports based on the order/order details tables or sums up the days current database activity. 11 | 12 | **Database Backup Script Maker** – A program which reads a database’s objects, relationships, records and stored procedures and creates a .sql file which can then be imported into another database or kept as a backup file to rebuild the database with. 13 | 14 | **Event Scheduler and Calendar** – Make an application which allows the user to enter a date and time of an event, event notes and then schedule those events on a calendar. The user can then browse the calendar or search the calendar for specific events. For added complexity, allow the application to create reoccurrence events that reoccur every day, week, month, year etc. 15 | 16 | **Budget Tracker** – Write an application that keeps track of a household’s budget. The user can add expenses, income, and recurring costs to find out how much they are saving or losing over a period of time. For added complexity allow the user to specify a date range and see the net flow of money in and out of the house budget for that time period. 17 | 18 | **Address Book** – Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. For extra complexity, allow the user to connect to a website publish their address book based on specific options the user has set. 19 | 20 | **TV Show Tracker** – Got a favorite show you don’t want to miss? Don’t have a PVR or want to be able to find the show to then PVR it later? Make an application which can search various online TV Guide sites, locate the shows/times/channels and add them to a database application. The database/website then can send you email reminders that a show is about to start and which channel it will be on. 21 | 22 | **Travel Planner System** – Make a system that allows users to put together their own little travel itinerary and keep track of the airline / hotel arrangements, points of interest, budget and schedule. 23 | 24 | **Entity Relationship Diagram (ERD) Creator** – A program that allows the user to put together ERD diagram and save it or have it generate some basic SQL syntax to give them a jump start. 25 | 26 | **Database Translation (MySQL SQL Server)** – A simple utility that reads in from one database and constructs SQL compliant with another database. Then saves that to another database. One popular transition would be to and from MySQL server for databases like SQL Server and Oracle. 27 | 28 | **Web Board (Forum)** – Create a forum for you and your buddies to post, administer and share thoughts and ideas. 29 | -------------------------------------------------------------------------------- /Graphics and Multimedia/README.md: -------------------------------------------------------------------------------- 1 | Graphics and Multimedia 2 | --------- 3 | 4 | **Slide Show** – Make an application that shows various pictures in a slide show format. For extra complexity try adding various effects like fade in/out, star wipe and window blinds transitions. 5 | 6 | **Mind Mapper** – Allow the user to put down ideas and quickly brainstorm how they are related into a mind map. The goal here is speed so let the user quickly write in an idea and drag it around in a visual map to show relationships. 7 | 8 | **Import Picture and Save as Grayscale** – A utility that sucks the color right out of an image and saves it. You could add more including adjusting contrast, colorizing and more for added complexity. 9 | 10 | **Stream Video from Online** – Try to create your own online streaming video player. 11 | 12 | **Mp3 Player (and Other Formats)** – A simple program for playing your favorite music files. For extra complexity see if you can add in playlists and an equalizer. 13 | 14 | **Bulk Picture Manipulator** – This program will take in a directory of pictures and apply a certain effect to them whether it be reducing color count, changing its format, or alter file attributes. For something extra try to see if you can also create a system to tag them. 15 | 16 | **CD Burning App** – Create a utility that simply burns data to a CD. 17 | 18 | **YouTube Downloader** – A program which can download videos to your hard drive from youtube.com. Save the files in various formats including FLV and AVI. 19 | 20 | **Wallpaper Manager** – Make a program which keeps track of your favorite wallpapers, changes them regularly and maybe even re-sizes them for your resolution (aka tiles one and stretches another) 21 | 22 | **Screen Capture Program** – Make a utility that will simply capture a frame from your web cam. For added complexity see if you can also build in emailing functionality. 23 | 24 | **Image Browser** – This application is used to view various image files on your computer from PNG, GIF, JPG to BMP, TIFF etc. 25 | 26 | **Traffic Light Application** – See if you can make your own street light application and then put it into an intersection scenario. Don’t let any cars run the lights and crash into one another! 27 | 28 | **MP3 to Wav Converter** – MP3 is essentially compressed wav format. See if you can translate it back into wav so that some other sound editing programs can work with the wav file itself. Keep in mind that 1 MB of MP3 is relative 10MB wav. 29 | 30 | **Signature Maker** – Ever seen those web board posts where someone has a generated signature made up? See if you can make a program that allows the user to specify a background, text, colors and alignment to make their own signatures or userbars. 31 | 32 | **Screen Saver** – Make a screensaver program that will run while your computer sits idle. To make a simple one use some standard pictures and then for added complexity try a 3D object that spins around the screen and bounces off the sides. 33 | 34 | **Watermarking Application** – Have some pictures you want copyright protected? Add your own logo or text lightly across the background so that no one can simply steal your graphics off your site. Make a program that will add this watermark to the picture. 35 | 36 | **Turtle Graphics** – This is a common project where you create a floor of 20 x 20 squares. Using various commands you tell a turtle to draw a line on the floor. You have move forward, left or right, lift or drop pen etc. For added complexity, allow the program to read in the list of commands from a file. Do a search online for “Turtle Graphics” for more information. 37 | -------------------------------------------------------------------------------- /Text/README.md: -------------------------------------------------------------------------------- 1 | Text 2 | --------- 3 | 4 | [**Reverse a String**](https://github.com/miguelgazela/Projects/blob/master/Text/reverse_string.py) – Enter a string and the program will reverse it and print it out. 5 | 6 | [**Pig Latin**](https://github.com/miguelgazela/Projects/blob/master/Text/pig_latin.py) – Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules. 7 | 8 | [**Count Vowels**](https://github.com/miguelgazela/Projects/blob/master/Text/count_vowels.py) – Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found. 9 | 10 | [**Check if Palindrome**](https://github.com/miguelgazela/Projects/blob/master/Text/palindrome.py) – Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” 11 | 12 | [**Count Words in a String**](ttps://github.com/miguelgazela/Projects/blob/master/Text/count_words.py) – Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. 13 | 14 | **Text Editor** – Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features. 15 | 16 | **RSS Feed Creator** – A program which can read in text from other sources and put it in RSS or Atom news format for syndication. 17 | 18 | **Post it Notes Program** – A program where you can add text reminders and post them. You can have the program also add popup reminders. 19 | 20 | **Quote Tracker (market symbols etc)** – A program which can go out and check the current value of stocks for a list of symbols entered by the user. The user can set how often the stocks are checked and the program can show green up and red down arrows to show which direction the stock value has moved. 21 | 22 | **Guestbook / Journal** – A simple application that allows people to add comments or write journal entries. It can allow comments or not and timestamps for all entries. Could also be made into a shout box. 23 | 24 | **News Ticker and Game Scores** – A program which sits on your desktop and aggregates news and game scores from various sources on the net. It then scrolls them across the screen on regular intervals. 25 | 26 | **Fortune Teller (Horoscope)** – A program that checks your horoscope on various astrology sites and puts them together for you each day. 27 | 28 | **Vigenere / Vernam / Ceasar Ciphers** – Functions for encrypting and decrypting data messages. Then send them to a friend. 29 | 30 | **Random Gift Suggestions** – Enter various gifts for certain people when you think of them. When its time to give them a gift (xmas, birthday, anniversary) it will randomly pick one and perhaps places you can get it. 31 | 32 | **Text to HTML Generator** – Converts text files into web HTML files and stylizes them. Great for making online documentation of standard text documentation. 33 | 34 | **CD Key Generator** – Generates a unique key for your applications to use based on some arbitrary algorithm that you can specify. Great for software developers looking to make shareware that can be activated. 35 | 36 | **Regex Query Tool** – A tool that allows the user to enter a text string and then in a separate control enter a regex pattern. It will run the regular exp****ression against the source text and return any matches or flag errors in the regular exp****ression. 37 | -------------------------------------------------------------------------------- /Web/README.md: -------------------------------------------------------------------------------- 1 | Web 2 | --------- 3 | 4 | **WYSIWG (What you see is what you get) Editor** – Create an editor online which allows people to move around elements, create tables, write text, set colors etc for web pages without having to know HTML. Think Dreamweaver or FrontPage but for online sites. If you need an example check out the DIC page used to create a post. 5 | 6 | **Web Browser with Tabs** – Create a small web browser that allows you to navigate the web and contains tabs which can be used to navigate to multiple web pages at once. For simplicity don’t worry about executing Javascript or other client side code. 7 | 8 | **Page Scraper** – Create an application which connects to a site and pulls out all links, or images, and saves them to a list. For added complexity, organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file. 9 | 10 | **File Downloader** – An application which can download various objects on a page including video streams or all files on a page. Great for pages with a lot of download links. 11 | 12 | **Telnet Application** – Create an application which can telnet into servers across the internet and run basic commands. 13 | 14 | **Online White Board** – Create an application which allows you and friends to collaborate on a white board online. Draw pictures, write notes and use various colors to flesh out ideas for projects. For added complexity try building in picture tubes. 15 | 16 | **Bandwidth Monitor** – A small utility program that tracks how much data you have uploaded and downloaded from the net during the course of your current online session. See if you can find out what periods of the day you use more and less and generate a report or graph that shows it. 17 | 18 | **Bookmark Collector and Sorter** – An application that you can put online for people to upload bookmarks to, have it sort them, remove duplicates and export the entire list as a Firefox/IE/Safari bookmark file. For added complexity see if you can group the bookmark items into various folders. 19 | 20 | **Password Safe** – A program which keeps track of passwords for sites or applications and encrypts them with a key so that no one can read them. 21 | 22 | **Media Player Widget for iGoogle** – Create an iGoogle gadget which can play various song lists from your computer as well as share one song daily. Perhaps let people look up which songs you have listened to lately. 23 | 24 | **Text Based Game Like Utopia** – Create a simple text based RPG like Utopia where you can create a civilization, gather resources, forge alliances, cast spells and more on a turn based system. See if you can dominate the kingdom. 25 | 26 | **Scheduled Auto Login and Action** – Make an application which logs into a given site on a schedule and invokes a certain action and then logs out. This can be useful for checking web mail, posting regular content, or getting info for other applications and saving it to your computer. 27 | 28 | **E-Card Generator** – Make a site that allows people to generate their own little e-cards and send them to other people. Can use flash or not. Use a picture library and perhaps insightful mottos or quotes. 29 | 30 | **Content Management System** – Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small and allow for the addition of modules/addons later. 31 | 32 | **Template Maker** – Make a site or application which allows the user to enter in various color codes, elements, dimensions and constructs a template file for a particular application like PHPBB, Invision Board, MySpace, Bebo, etc. 33 | 34 | **CAPTCHA Maker** – Ever see those images with letters a numbers when you signup for a service and then asks you to enter what you see? It keeps web bots from automatically signing up and spamming. Try creating one yourself for online forms. If you use PHP, take a look at the image functions of GD. 35 | -------------------------------------------------------------------------------- /Files/README.md: -------------------------------------------------------------------------------- 1 | Files 2 | --------- 3 | 4 | **Quiz Maker** – Make an application which takes various questions form a file, picked randomly, and puts together a quiz for students. Each quiz can be different and then reads a key to grade the quizzes. 5 | 6 | **Quick Launcher** – A utility program that allows the user to assign various programs to icons on a toolbar. Then by clicking the buttons they can quickly launch the programs with parameters etc. Much like Windows quick launch. 7 | 8 | **File Explorer** – Create your own windows explorer program but with added features, better searching, new icons and other views. 9 | 10 | **Sort File Records Utility** – Reads a file of records, sorts them, and then writes them back to the file. Allow the user to choose various sort style and sorting based on a particular field. 11 | 12 | **Add Transactions In File and Find Averages** – Read in a file of financial transactions, group them into accounts, add up fields or find averages or apply credits and debits to each account. 13 | 14 | **Create Zip File Maker** – The user enters various files from different directories and maybe even another computer on the network and the program transfers them and zips them up into a zip file. For added complexity, apply actual compression to the files. 15 | 16 | **PDF Generator** – An application which can read in a text file, html file or some other file and generates a PDF file out of it. Great for a web based service where the user uploads the file and the program returns a PDF of the file. 17 | 18 | **Bulk Renamer and Organizer** – This program will take a series of files and renames them with a specific filename filter entered by the user. For instance if the user enters myimage###.jpg it will rename all files with a “minimum” of three numbers like “myimage001.jpg”, “myimage145.jpg” or even “myimage1987.jpg” since 1987 has at least three numbers. 19 | 20 | **Mp3 Tagger** – Modify and add ID3v1 tags to MP3 files. See if you can also add in the album art into the MP3 file’s header as well as other ID3v2 tags. 21 | 22 | **Log File Maker** – Make an application which logs various statistics in response to given events. This can be something that logs what an application does, what the system is doing, when something like a file changes etc. 23 | 24 | **Excel Spreadsheet Exporter** – Create an online application which can read in a file and create an Excel Spreadsheet to export back. This can be through CVS or other file formats. For added complexity, see if you can create formula fields as well. 25 | 26 | **RPG Character Stat Creator** – Make a program which will randomly create a character’s stats based on several rules set forth by the user. Have it generate a class, gender, strength/magic/dexterity points, and extra abilities or trades. Have it save it to a file which can then be printed out by a dungeon master. 27 | 28 | **Image Map Generator** – Image maps are those images on the web that have multiple hover points that link to different pages. Such images may include maps or splash pages. See if you can make one where the user specifies an image, clicks hotspots in the image and specify links. It will then generate the HTML code to a file that the user can then copy and paste into their website to make the image map. 29 | 30 | **File Copy Utility** – Create a utility that can do bulk file copying and backups of other files. 31 | 32 | **Code Snippet Manager** – Another utility program that allows coders to put in functions, classes or other tidbits to save for use later. Organized by the type of snippet or language the coder can quickly look up code. For extra practice try adding syntax highlighting based on the language. 33 | 34 | **Versioning Manager** – Create your own versioning system for code files. Users are forced to check out items and lock items during reading and writing so that a group of programmers are not accidentally overwriting code files on one another. 35 | -------------------------------------------------------------------------------- /Classes/README.md: -------------------------------------------------------------------------------- 1 | Classes 2 | --------- 3 | 4 | **Product Inventory Project** – Create an application which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value. 5 | 6 | **Movie Store** – Manage video rentals and controls when videos are checked out, due to return, overdue fees and for added complexity create a summary of those accounts which are overdue for contact. 7 | 8 | **Airline / Hotel Reservation System** – Create a reservation system which books airline seats or hotel rooms. It charges various rates for particular sections of the plane or hotel. Example, first class is going to cost more than coach. Hotel rooms have penthouse suites which cost more. Keep track of when rooms will be available and can be scheduled. 9 | 10 | **Student Grade Book Application** – Keep track of students (with a student class that has their name, average, and scores) in a class and their grades. Assign their scores on tests and assignments to the students and figure out their average and grade for the class. For added complexity put the students on a bell curve. 11 | 12 | **Bank Account Manager** \- Create a class called “Account” which will be an abstract class for three other classes called “CheckingAccount”, “SavingsAccount” and “BusinessAccount”. Manage credits and debits from these accounts through an ATM style program. 13 | 14 | **Library Catalog** – Create a book class with a title, page count, ISBN and whether or not it is checked out or not. Manage a collection of various books and allow the user to check out books or return books. For added complexity generate a report of those books overdue and any fees. Also allow users to put books on reserve. 15 | 16 | **Patient / Doctor Scheduler** – Create a patient class and a doctor class. Have a doctor that can handle multiple patients and setup a scheduling program where a doctor can only handle 16 patients during an 8 hr work day. 17 | 18 | **Recipe Creator and Manager** – Create a recipe class with ingredients and a put them in a recipe manager program that organizes them into categories like deserts, main courses or by ingredients like chicken, beef, soups, pies etc. 19 | 20 | **Image Gallery** – Create an image abstract class and then a class that inherits from it for each image type. Put them in a program which displays them in a gallery style format for viewing. 21 | 22 | **Class to Handle Large Numbers** – We know that the basic data types like integer, long, double, and floats only go so far. Create a class that can manage extremely large numbers like those used in space exploration. 23 | 24 | **Chart Making Class / API** – Create a class, or a set of classes, that generates bar charts, pie charts, histograms, and scatter plot charts. For added complexity, make this a service where people can connect to a web server, supply information and it returns a chart image for them in gif or jpg format. 25 | 26 | **Shape Area and Perimeter Classes** – Create an abstract class called “Shape” and then inherit from it other shapes like diamond, rectangle, circle, triangle etc. Then have each class override the area and perimeter functionality to handle each shape type. 27 | 28 | **Matrix Class** – A class to manage matrices. Add, subtract and multiple matrices. 29 | 30 | **Flower Shop Ordering To Go** – Create a flower shop application which deals in flower objects and use those flower objects in a bouquet object which can then be sold. Keep track of the number of objects and when you may need to order more. 31 | 32 | **Vending Machine** – Create an application which takes money and dispenses various types of candy or other item. The user enters a number and letter sequence, like D9, and have it return an instance of “Item” which of the proper type. Example when they press D9 it will return a type of candy bar which is an instance of Mr. GoodBar. 33 | 34 | **Josephus Problem** – Create a program which links together various node objects and then every Nth object is removed until you have one object left. This last object is the sole survivor. Look it up on Google under “Josephus Algorithm” 35 | 36 | **Family Tree Creator** – Create a class called “Person” which will have a name, when they were born and when (and if) they died. Allow the user to create these Person classes and put them into a family tree structure. Print out the tree to the screen. 37 | -------------------------------------------------------------------------------- /Numbers/dijkstra.py: -------------------------------------------------------------------------------- 1 | """ 2 | 1 function Dijkstra(Graph, source): 3 | 2 for each vertex v in Graph: // Initializations 4 | 3 dist[v] := infinity ; // Unknown distance function from 5 | 4 // source to v 6 | 5 previous[v] := undefined ; // Previous node in optimal path 7 | 6 end for // from source 8 | 7 9 | 8 dist[source] := 0 ; // Distance from source to source 10 | 9 Q := the set of all nodes in Graph ; // All nodes in the graph are 11 | 10 // unoptimized thus are in Q 12 | 11 while Q is not empty: // The main loop 13 | 12 u := vertex in Q with smallest distance in dist[] ; // Source node in first case 14 | 13 remove u from Q ; 15 | 14 if dist[u] = infinity: 16 | 15 break ; // all remaining vertices are 17 | 16 end if // inaccessible from source 18 | 17 19 | 18 for each neighbor v of u: // where v has not yet been 20 | 19 // removed from Q. 21 | 20 alt := dist[u] + dist_between(u, v) ; 22 | 21 if alt < dist[v]: // Relax (u,v,a) 23 | 22 dist[v] := alt ; 24 | 23 previous[v] := u ; 25 | 24 decrease-key v in Q; // Reorder v in the Queue 26 | 25 end if 27 | 26 end for 28 | 27 end while 29 | 28 return dist; 30 | 29 endfunction 31 | """ 32 | 33 | import sys 34 | 35 | 36 | class Graph(object): 37 | def __init__(self, vertex_set=None): 38 | if vertex_set == None: 39 | vertex_set = [] 40 | 41 | self.vertex_set = vertex_set 42 | 43 | def __str__(self): 44 | res = "" 45 | for v in self.vertex_set: 46 | res += v.__str__() + "\n" 47 | return res 48 | 49 | def dijkstra(self, info): 50 | for vertex in self.vertex_set: 51 | vertex.dist = sys.maxint 52 | 53 | src = self.get_vertex(info) 54 | 55 | if src: 56 | src.dist = 0 57 | set_nodes = sorted([vertex for vertex in self.vertex_set], key=self.cmp_fn) 58 | 59 | for node in set_nodes: 60 | print node 61 | 62 | while len(set_nodes) != 0: 63 | next_node = set_nodes.pop(0) 64 | 65 | if next_node.dist == sys.maxint: 66 | break 67 | 68 | for neighbor in next_node.adj: 69 | alt = next_node.dist + neighbor.weight 70 | if alt < 71 | 72 | else: 73 | raise ValueError 74 | 75 | def cmp_fn(self, vertex): 76 | return vertex.dist 77 | 78 | def add_vertex(self, info): 79 | for vertex in self.vertex_set: 80 | if vertex.info == info: 81 | return False 82 | 83 | self.vertex_set.append(Vertex(info)) 84 | return True 85 | 86 | def get_vertex(self, info): 87 | for vertex in self.vertex_set: 88 | if (vertex.info == info): 89 | return vertex 90 | return None 91 | 92 | def remove_vertex(self, info): 93 | pass 94 | 95 | def add_edge(src, dest, weight): 96 | pass 97 | 98 | 99 | class Vertex(object): 100 | def __init__(self, info): 101 | self.visited = False 102 | self.adj = [] 103 | self.info = info 104 | self.dist = 0 105 | self.previous = None 106 | 107 | def __str__(self): 108 | return "Info: %10s\tVisited: %s\tDist: %d" % (self.info, self.visited, self.dist) 109 | 110 | def add_edge(self, dest, weight=0): 111 | self.adj.append(Edge(dest, weight)) 112 | 113 | def remove_edge_to(self, dest): 114 | pass 115 | 116 | def get_info(self): 117 | return self.info 118 | 119 | 120 | class Edge(object): 121 | def __init__(self, dest, weight=0): 122 | 123 | if not isinstance(dest, Vertex): 124 | raise TypeError 125 | 126 | self.dest = dest 127 | self.weight = weight 128 | 129 | def __str__(self): 130 | return "Dest: %s\tWeight: %s" % (self.dest.get_info(), self.weight) 131 | 132 | def get_weight(self): 133 | return self.weight 134 | 135 | def get_dest(self): 136 | return self.dest 137 | 138 | 139 | g = Graph() 140 | 141 | g.add_vertex('Porto') 142 | g.add_vertex('Coimbra') 143 | g.add_vertex('Lisboa') 144 | g.add_vertex('Faro') 145 | g.add_vertex('Braga') 146 | 147 | print g 148 | 149 | g.dijkstra('Porto') -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Martyr2’s Mega Project List 2 | ======== 3 | 4 | Trying to complete all projects from [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/). 5 | 6 | **Note**: If you fork this repo to solve these projects in any language of your choice, please remove all my code, and start from scratch; you'll benefit a lot. Do ***not*** send pull requests. 7 | 8 | Some details: 9 | 10 | * I will use Python to solve these. Why? Because I want to learn the language quickly. 11 | * The projects will not be made in the order posted. 12 | * I may not be able to complete all of them. 13 | * My method of solving them may not be the best. 14 | 15 | I will link to each project that I complete. Some will be in this same repo, some bigger ones will have dedicated repos. 16 | 17 | ============================== 18 | 19 | Numbers 20 | --------- 21 | 22 | **Find PI to the Nth Digit** – Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go. 23 | 24 | [**Fibonacci Sequence**](https://github.com/miguelgazela/Projects/blob/master/Numbers/fibonacci.py) – Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. 25 | 26 | [**Prime Factorization**](https://github.com/miguelgazela/Projects/blob/master/Numbers/prime_factor.py) – Have the user enter a number and find all Prime Factors (if there are any) and display them. 27 | 28 | [**Next Prime Number**](https://github.com/miguelgazela/Projects/blob/master/Numbers/next_prime.py) – Have the program find prime numbers until the user chooses to stop asking for the next one. 29 | 30 | [**Find Cost of Tile to Cover W x H Floor**](https://github.com/miguelgazela/Projects/blob/master/Numbers/cost_tile.py) – Calculate the total cost of tile it would take to cover a floor plan of width and height, using a cost entered by the user. 31 | 32 | **Mortgage Calculator** – Calculate the monthly payments of a fixed term mortgage over given Nth terms at a given interest rate. Also figure out how long it will take the user to pay back the loan. 33 | 34 | [**Change Return Program**](https://github.com/miguelgazela/Projects/blob/master/Numbers/return.py) – The user enters a cost and then the amount of money given. The program will figure out the change and the number of quarters, dimes, nickels, pennies needed for the change. 35 | 36 | [**Binary to Decimal and Back Converter**](https://github.com/miguelgazela/Projects/blob/master/Numbers/binary_converter.py) – Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. 37 | 38 | **Calculator** – A simple calculator to do basic operators. Make it a scientific calculator for added complexity. 39 | 40 | **Unit Converter (temp, currency, volume, mass and more)** – Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion. 41 | 42 | **Alarm Clock** – A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. 43 | 44 | **Distance Between Two Cities** – Calculates the distance between two cities and allows the user to specify a unit of distance. This program may require finding coordinates for the cities like latitude and longitude. 45 | 46 | [**Credit Card Validator**](https://github.com/miguelgazela/Projects/blob/master/Numbers/credit_card.py) – Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum). 47 | 48 | **Tax Calculator** – Asks the user to enter a cost and either a country or state tax. It then returns the tax plus the total cost with tax. 49 | 50 | [**Factorial Finder**](https://github.com/miguelgazela/Projects/blob/master/Numbers/factorial.py) - The Factorial of a positive integer, n, is defined as the product of the sequence n, n-1, n-2, ...1 and the factorial of zero, 0, is defined as being 1. Solve this using both loops and recursion. 51 | 52 | **Complex Number Algebra** - Show addition, multiplication, negation, and inversion of complex numbers in separate functions. (Subtraction and division operations can be made with pairs of these operations.) Print the results for each operation tested. 53 | 54 | **Happy Numbers** - A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers. Take an input number from user, and find first 8 happy numbers from that input. 55 | 56 | **Number Names** - Show how to spell out a number in English. You can use a preexisting implementation or roll your own, but you should support inputs up to at least one million (or the maximum value of your language's default bounded integer type, if that's less). *Optional: Support for inputs other than positive integers (like zero, negative integers, and floating-point numbers).* 57 | 58 | Classic Algorithms 59 | ----------------- 60 | 61 | **Collatz Conjecture** - Start with a number *n > 1*. Find the number of steps it takes to reach one using the following process: If *n* is even, divide it by 2. If *n* is odd, multiply it by 3 and add 1. 62 | 63 | **Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. 64 | 65 | **Closest pair problem** - The closest pair of points problem or closest pair problem is a problem of computational geometry: given *n* points in metric space, find a pair of points with the smallest distance between them. 66 | 67 | **Sieve of Eratosthenes** - The sieve of Eratosthenes is one of the most efficient ways to find all of the smaller primes (below 10 million or so). 68 | 69 | Graphs 70 | --------- 71 | 72 | **Graph from links** - Create a program that will create a graph or network from a series of links. 73 | 74 | **Eulerian Path** - Create a program which will take as an input a graph and output either a Eulerian path or a Eulerian cycle, or state that it is not possible. A Eulerian Path starts at one node and traverses every edge of a graph through every node and finishes at another node. A Eulerian cycle is a eulerian Path that starts and finishes at the same node. 75 | 76 | **Connected Graph** - Create a program which takes a graph as an input and outputs whether every node is connected or not. 77 | 78 | **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. 79 | 80 | **Inverted index** - An [Inverted Index](http://en.wikipedia.org/wiki/Inverted_index) is a data structure used to create full text search. Given a set of text files, implement a program to create an inverted index. Also create a user interface to do a search using that inverted index which returns a list of files that contain the query term / terms. The search index can be in memory. 81 | 82 | Text 83 | --------- 84 | 85 | [**Reverse a String**](https://github.com/miguelgazela/Projects/blob/master/Text/reverse_string.py) – Enter a string and the program will reverse it and print it out. 86 | 87 | [**Pig Latin**](https://github.com/miguelgazela/Projects/blob/master/Text/pig_latin.py) – Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules. 88 | 89 | [**Count Vowels**](https://github.com/miguelgazela/Projects/blob/master/Text/count_vowels.py) – Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found. 90 | 91 | [**Check if Palindrome**](https://github.com/miguelgazela/Projects/blob/master/Text/palindrome.py) – Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” 92 | 93 | [**Count Words in a String**](ttps://github.com/miguelgazela/Projects/blob/master/Text/count_words.py) – Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. 94 | 95 | **Text Editor** – Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features. 96 | 97 | **RSS Feed Creator** – A program which can read in text from other sources and put it in RSS or Atom news format for syndication. 98 | 99 | **Post it Notes Program** – A program where you can add text reminders and post them. You can have the program also add popup reminders. 100 | 101 | **Quote Tracker (market symbols etc)** – A program which can go out and check the current value of stocks for a list of symbols entered by the user. The user can set how often the stocks are checked and the program can show green up and red down arrows to show which direction the stock value has moved. 102 | 103 | **Guestbook / Journal** – A simple application that allows people to add comments or write journal entries. It can allow comments or not and timestamps for all entries. Could also be made into a shout box. 104 | 105 | **News Ticker and Game Scores** – A program which sits on your desktop and aggregates news and game scores from various sources on the net. It then scrolls them across the screen on regular intervals. 106 | 107 | **Fortune Teller (Horoscope)** – A program that checks your horoscope on various astrology sites and puts them together for you each day. 108 | 109 | [**Vigenere / Vernam / Ceasar Ciphers**](https://github.com/miguelgazela/Projects/blob/master/Text/cipher.py) – Functions for encrypting and decrypting data messages. Then send them to a friend. - Incomplete 110 | 111 | **Random Gift Suggestions** – Enter various gifts for certain people when you think of them. When its time to give them a gift (xmas, birthday, anniversary) it will randomly pick one and perhaps places you can get it. 112 | 113 | **Text to HTML Generator** – Converts text files into web HTML files and stylizes them. Great for making online documentation of standard text documentation. 114 | 115 | **CD Key Generator** – Generates a unique key for your applications to use based on some arbitrary algorithm that you can specify. Great for software developers looking to make shareware that can be activated. 116 | 117 | **Regex Query Tool** – A tool that allows the user to enter a text string and then in a separate control enter a regex pattern. It will run the regular exp****ression against the source text and return any matches or flag errors in the regular exp****ression. 118 | 119 | [**Forty Days of Dating Scraper**](https://github.com/miguelgazela/Projects/blob/master/Text/fortydaysdating.py) - A small script that fetches date from the fortydaysofdating.com website and opens a new tab on the default browser as soon as a new post is posted. 120 | 121 | Networking 122 | --------- 123 | 124 | **FTP Program** – A file transfer program which can transfer files back and forth from a remote web sever. 125 | 126 | [**Get Atomic Time from Internet Clock**](https://github.com/miguelgazela/Projects/blob/master/Networking/atomic.py) – This program will get the true atomic time from an atomic time clock on the Internet. There are various clocks across the world. Do a search for a list of them. 127 | 128 | **Chat Application (IRC or MSN Style)** – Create a chat application that can create simple chat rooms like on Internet Relay Chat (IRC) or a more direct chatting style like MSN. For added complexity, create your own protocol to facilitate this chatting. 129 | 130 | **Fetch Current Weather** – Get the current weather for a given zip/postal code. 131 | 132 | **P2P File Sharing App** – Create a program like LimeWire, FrostWire, Bearshare, or a torrent style application. 133 | 134 | **Port Scanner** – Enter an IP address and a port range where the program will then attempt to find open ports on the given computer by connecting to each of them. On any successful connections mark the port as open. 135 | 136 | **Mail Checker (POP3 / IMAP)** – The user enters various account information include web server and IP, protocol type (POP3 or IMAP) and the application will check for email on several accounts at a given interval. 137 | 138 | **Packet Sniffer** – A utility program that will read packets coming in and out of the machine along with related information like destination and payload size. 139 | 140 | **Country from IP Lookup** – Enter an IP address and find the country that IP is registered in. 141 | 142 | **Whois Search Tool** – Enter an IP or host address and have it look it up through whois and return the results to you. 143 | 144 | **Zip / Postal Code Lookup** – Enter a zip or postal code and have it return which city/cities that are in that zip code. 145 | 146 | **Remote Login** – Create a remote desktop style application which can see and control the remote computer (given you have permissions). It may require the use of your own private network and a second computer to test with. 147 | 148 | **Site Checker with Time Scheduling** – An application that attempts to connect to a website or server every so many minutes or a given time and check if it is up. If it is down, it will notify you by email or by posting a notice on screen. 149 | 150 | **Small Web Server** – A simple web server that can serve HTML files that contain Javascript and other forms of non-code executing code. Added complexity would be to try and implement streaming video, create a server-side language, or serve up other stream types. 151 | 152 | **Web Bot** – An automated program which carries out tasks on the web including checking websites, page scraping, and summarization of data or web posting. 153 | 154 | Classes 155 | --------- 156 | 157 | **Product Inventory Project** – Create an application which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value. 158 | 159 | **Movie Store** – Manage video rentals and controls when videos are checked out, due to return, overdue fees and for added complexity create a summary of those accounts which are overdue for contact. 160 | 161 | **Airline / Hotel Reservation System** – Create a reservation system which books airline seats or hotel rooms. It charges various rates for particular sections of the plane or hotel. Example, first class is going to cost more than coach. Hotel rooms have penthouse suites which cost more. Keep track of when rooms will be available and can be scheduled. 162 | 163 | **Student Grade Book Application** – Keep track of students (with a student class that has their name, average, and scores) in a class and their grades. Assign their scores on tests and assignments to the students and figure out their average and grade for the class. For added complexity put the students on a bell curve. 164 | 165 | **Bank Account Manager** - Create a class called “Account” which will be an abstract class for three other classes called “CheckingAccount”, “SavingsAccount” and “BusinessAccount”. Manage credits and debits from these accounts through an ATM style program. 166 | 167 | **Library Catalog** – Create a book class with a title, page count, ISBN and whether or not it is checked out or not. Manage a collection of various books and allow the user to check out books or return books. For added complexity generate a report of those books overdue and any fees. Also allow users to put books on reserve. 168 | 169 | **Patient / Doctor Scheduler** – Create a patient class and a doctor class. Have a doctor that can handle multiple patients and setup a scheduling program where a doctor can only handle 16 patients during an 8 hr work day. 170 | 171 | **Recipe Creator and Manager** – Create a recipe class with ingredients and a put them in a recipe manager program that organizes them into categories like deserts, main courses or by ingredients like chicken, beef, soups, pies etc. 172 | 173 | **Image Gallery** – Create an image abstract class and then a class that inherits from it for each image type. Put them in a program which displays them in a gallery style format for viewing. 174 | 175 | **Class to Handle Large Numbers** – We know that the basic data types like integer, long, double, and floats only go so far. Create a class that can manage extremely large numbers like those used in space exploration. 176 | 177 | **Chart Making Class / API** – Create a class, or a set of classes, that generates bar charts, pie charts, histograms, and scatter plot charts. For added complexity, make this a service where people can connect to a web server, supply information and it returns a chart image for them in gif or jpg format. 178 | 179 | [**Shape Area and Perimeter Classes**](https://github.com/miguelgazela/Projects/blob/master/Classes/shape.py) – Create an abstract class called “Shape” and then inherit from it other shapes like diamond, rectangle, circle, triangle etc. Then have each class override the area and perimeter functionality to handle each shape type. 180 | 181 | **Matrix Class** – A class to manage matrices. Add, subtract and multiple matrices. 182 | 183 | **Flower Shop Ordering To Go** – Create a flower shop application which deals in flower objects and use those flower objects in a bouquet object which can then be sold. Keep track of the number of objects and when you may need to order more. 184 | 185 | **Vending Machine** – Create an application which takes money and dispenses various types of candy or other item. The user enters a number and letter sequence, like D9, and have it return an instance of “Item” which of the proper type. Example when they press D9 it will return a type of candy bar which is an instance of Mr. GoodBar. 186 | 187 | **Josephus Problem** – Create a program which links together various node objects and then every Nth object is removed until you have one object left. This last object is the sole survivor. Look it up on Google under “Josephus Algorithm” 188 | 189 | **Family Tree Creator** – Create a class called “Person” which will have a name, when they were born and when (and if) they died. Allow the user to create these Person classes and put them into a family tree structure. Print out the tree to the screen. 190 | 191 | Threading 192 | --------- 193 | 194 | **Create A Progress Bar for Downloads** – Create a progress bar for applications that can keep track of a download in progress. The progress bar will be on a separate thread and will communicate with the main thread using delegates. 195 | 196 | **Download Manager** – Allow your program to download various files and each one is downloading in the background on a separate thread. The main thread will keep track of the other thread’s progress and notify the user when downloads are completed. 197 | 198 | **Chat Application (remoting style)** – Create a chat application which allows you to connect directly to another computer by their IP through the use of remoting and allow your “server” application handle multiple incoming connections. 199 | 200 | **Bulk Thumbnail Creator** – Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program which can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handling re-sizing, have another bulk renaming of thumbnails etc. 201 | 202 | Web 203 | --------- 204 | 205 | **WYSIWG (What you see is what you get) Editor** – Create an editor online which allows people to move around elements, create tables, write text, set colors etc for web pages without having to know HTML. Think Dreamweaver or FrontPage but for online sites. If you need an example check out the DIC page used to create a post. 206 | 207 | **Web Browser with Tabs** – Create a small web browser that allows you to navigate the web and contains tabs which can be used to navigate to multiple web pages at once. For simplicity don’t worry about executing Javascript or other client side code. 208 | 209 | **Page Scraper** – Create an application which connects to a site and pulls out all links, or images, and saves them to a list. For added complexity, organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file. 210 | 211 | **File Downloader** – An application which can download various objects on a page including video streams or all files on a page. Great for pages with a lot of download links. 212 | 213 | **Telnet Application** – Create an application which can telnet into servers across the internet and run basic commands. 214 | 215 | **Online White Board** – Create an application which allows you and friends to collaborate on a white board online. Draw pictures, write notes and use various colors to flesh out ideas for projects. For added complexity try building in picture tubes. 216 | 217 | **Bandwidth Monitor** – A small utility program that tracks how much data you have uploaded and downloaded from the net during the course of your current online session. See if you can find out what periods of the day you use more and less and generate a report or graph that shows it. 218 | 219 | **Bookmark Collector and Sorter** – An application that you can put online for people to upload bookmarks to, have it sort them, remove duplicates and export the entire list as a Firefox/IE/Safari bookmark file. For added complexity see if you can group the bookmark items into various folders. 220 | 221 | **Password Safe** – A program which keeps track of passwords for sites or applications and encrypts them with a key so that no one can read them. 222 | 223 | **Media Player Widget for iGoogle** – Create an iGoogle gadget which can play various song lists from your computer as well as share one song daily. Perhaps let people look up which songs you have listened to lately. 224 | 225 | **Text Based Game Like Utopia** – Create a simple text based RPG like Utopia where you can create a civilization, gather resources, forge alliances, cast spells and more on a turn based system. See if you can dominate the kingdom. 226 | 227 | **Scheduled Auto Login and Action** – Make an application which logs into a given site on a schedule and invokes a certain action and then logs out. This can be useful for checking web mail, posting regular content, or getting info for other applications and saving it to your computer. 228 | 229 | **E-Card Generator** – Make a site that allows people to generate their own little e-cards and send them to other people. Can use flash or not. Use a picture library and perhaps insightful mottos or quotes. 230 | 231 | **Content Management System** – Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small and allow for the addition of modules/addons later. 232 | 233 | **Template Maker** – Make a site or application which allows the user to enter in various color codes, elements, dimensions and constructs a template file for a particular application like PHPBB, Invision Board, MySpace, Bebo, etc. 234 | 235 | **CAPTCHA Maker** – Ever see those images with letters a numbers when you signup for a service and then asks you to enter what you see? It keeps web bots from automatically signing up and spamming. Try creating one yourself for online forms. If you use PHP, take a look at the image functions of GD. 236 | 237 | Files 238 | --------- 239 | 240 | **Quiz Maker** – Make an application which takes various questions form a file, picked randomly, and puts together a quiz for students. Each quiz can be different and then reads a key to grade the quizzes. 241 | 242 | **Quick Launcher** – A utility program that allows the user to assign various programs to icons on a toolbar. Then by clicking the buttons they can quickly launch the programs with parameters etc. Much like Windows quick launch. 243 | 244 | **File Explorer** – Create your own windows explorer program but with added features, better searching, new icons and other views. 245 | 246 | **Sort File Records Utility** – Reads a file of records, sorts them, and then writes them back to the file. Allow the user to choose various sort style and sorting based on a particular field. 247 | 248 | **Add Transactions In File and Find Averages** – Read in a file of financial transactions, group them into accounts, add up fields or find averages or apply credits and debits to each account. 249 | 250 | **Create Zip File Maker** – The user enters various files from different directories and maybe even another computer on the network and the program transfers them and zips them up into a zip file. For added complexity, apply actual compression to the files. 251 | 252 | **PDF Generator** – An application which can read in a text file, html file or some other file and generates a PDF file out of it. Great for a web based service where the user uploads the file and the program returns a PDF of the file. 253 | 254 | **Bulk Renamer and Organizer** – This program will take a series of files and renames them with a specific filename filter entered by the user. For instance if the user enters myimage###.jpg it will rename all files with a “minimum” of three numbers like “myimage001.jpg”, “myimage145.jpg” or even “myimage1987.jpg” since 1987 has at least three numbers. 255 | 256 | **Mp3 Tagger** – Modify and add ID3v1 tags to MP3 files. See if you can also add in the album art into the MP3 file’s header as well as other ID3v2 tags. 257 | 258 | **Log File Maker** – Make an application which logs various statistics in response to given events. This can be something that logs what an application does, what the system is doing, when something like a file changes etc. 259 | 260 | **Excel Spreadsheet Exporter** – Create an online application which can read in a file and create an Excel Spreadsheet to export back. This can be through CVS or other file formats. For added complexity, see if you can create formula fields as well. 261 | 262 | **RPG Character Stat Creator** – Make a program which will randomly create a character’s stats based on several rules set forth by the user. Have it generate a class, gender, strength/magic/dexterity points, and extra abilities or trades. Have it save it to a file which can then be printed out by a dungeon master. 263 | 264 | **Image Map Generator** – Image maps are those images on the web that have multiple hover points that link to different pages. Such images may include maps or splash pages. See if you can make one where the user specifies an image, clicks hotspots in the image and specify links. It will then generate the HTML code to a file that the user can then copy and paste into their website to make the image map. 265 | 266 | [**File Copy Utility**](https://github.com/miguelgazela/Projects/blob/master/Files/file_copy.py) – Create a utility that can do bulk file copying and backups of other files. - Incomplete 267 | 268 | **Code Snippet Manager** – Another utility program that allows coders to put in functions, classes or other tidbits to save for use later. Organized by the type of snippet or language the coder can quickly look up code. For extra practice try adding syntax highlighting based on the language. 269 | 270 | **Versioning Manager** – Create your own versioning system for code files. Users are forced to check out items and lock items during reading and writing so that a group of programmers are not accidentally overwriting code files on one another. 271 | 272 | Databases 273 | --------- 274 | 275 | **SQL Query Analyzer** – A utility application which a user can enter a query and have it run against a local database and look for ways to make it more efficient. 276 | 277 | **Remote SQL Tool** – A utility that can execute queries on remote servers from your local computer across the Internet. It should take in a remote host, user name and password, run the query and return the results. 278 | 279 | **Baseball / Other Card Collector** – Create an online application for keeping track of a collection of cards. Let the user enter all cards in a set, check off which ones they have, which ones they need and generate lists of cards they are looking for. For extra complexity, have it sum up sets and generate reports on how close they are of completing sets or the current value of a set. 280 | 281 | **Report Generator** – Create a utility that generates a report based on some tables in a database. Generates a sales reports based on the order/order details tables or sums up the days current database activity. 282 | 283 | **Database Backup Script Maker** – A program which reads a database’s objects, relationships, records and stored procedures and creates a .sql file which can then be imported into another database or kept as a backup file to rebuild the database with. 284 | 285 | **Event Scheduler and Calendar** – Make an application which allows the user to enter a date and time of an event, event notes and then schedule those events on a calendar. The user can then browse the calendar or search the calendar for specific events. For added complexity, allow the application to create reoccurrence events that reoccur every day, week, month, year etc. 286 | 287 | **Budget Tracker** – Write an application that keeps track of a household’s budget. The user can add expenses, income, and recurring costs to find out how much they are saving or losing over a period of time. For added complexity allow the user to specify a date range and see the net flow of money in and out of the house budget for that time period. 288 | 289 | **Address Book** – Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. For extra complexity, allow the user to connect to a website publish their address book based on specific options the user has set. 290 | 291 | **TV Show Tracker** – Got a favorite show you don’t want to miss? Don’t have a PVR or want to be able to find the show to then PVR it later? Make an application which can search various online TV Guide sites, locate the shows/times/channels and add them to a database application. The database/website then can send you email reminders that a show is about to start and which channel it will be on. 292 | 293 | **Travel Planner System** – Make a system that allows users to put together their own little travel itinerary and keep track of the airline / hotel arrangements, points of interest, budget and schedule. 294 | 295 | **Entity Relationship Diagram (ERD) Creator** – A program that allows the user to put together ERD diagram and save it or have it generate some basic SQL syntax to give them a jump start. 296 | 297 | **Database Translation (MySQL SQL Server)** – A simple utility that reads in from one database and constructs SQL compliant with another database. Then saves that to another database. One popular transition would be to and from MySQL server for databases like SQL Server and Oracle. 298 | 299 | **Web Board (Forum)** – Create a forum for you and your buddies to post, administer and share thoughts and ideas. 300 | 301 | Graphics and Multimedia 302 | --------- 303 | 304 | **Slide Show** – Make an application that shows various pictures in a slide show format. For extra complexity try adding various effects like fade in/out, star wipe and window blinds transitions. 305 | 306 | **Mind Mapper** – Allow the user to put down ideas and quickly brainstorm how they are related into a mind map. The goal here is speed so let the user quickly write in an idea and drag it around in a visual map to show relationships. 307 | 308 | **Import Picture and Save as Grayscale** – A utility that sucks the color right out of an image and saves it. You could add more including adjusting contrast, colorizing and more for added complexity. 309 | 310 | **Stream Video from Online** – Try to create your own online streaming video player. 311 | 312 | **Mp3 Player (and Other Formats)** – A simple program for playing your favorite music files. For extra complexity see if you can add in playlists and an equalizer. 313 | 314 | **Bulk Picture Manipulator** – This program will take in a directory of pictures and apply a certain effect to them whether it be reducing color count, changing its format, or alter file attributes. For something extra try to see if you can also create a system to tag them. 315 | 316 | **CD Burning App** – Create a utility that simply burns data to a CD. 317 | 318 | **YouTube Downloader** – A program which can download videos to your hard drive from youtube.com. Save the files in various formats including FLV and AVI. 319 | 320 | **Wallpaper Manager** – Make a program which keeps track of your favorite wallpapers, changes them regularly and maybe even re-sizes them for your resolution (aka tiles one and stretches another) 321 | 322 | **Screen Capture Program** – Make a utility that will simply capture a frame from your web cam. For added complexity see if you can also build in emailing functionality. 323 | 324 | **Image Browser** – This application is used to view various image files on your computer from PNG, GIF, JPG to BMP, TIFF etc. 325 | 326 | **Traffic Light Application** – See if you can make your own street light application and then put it into an intersection scenario. Don’t let any cars run the lights and crash into one another! 327 | 328 | **MP3 to Wav Converter** – MP3 is essentially compressed wav format. See if you can translate it back into wav so that some other sound editing programs can work with the wav file itself. Keep in mind that 1 MB of MP3 is relative 10MB wav. 329 | 330 | **Signature Maker** – Ever seen those web board posts where someone has a generated signature made up? See if you can make a program that allows the user to specify a background, text, colors and alignment to make their own signatures or userbars. 331 | 332 | **Screen Saver** – Make a screensaver program that will run while your computer sits idle. To make a simple one use some standard pictures and then for added complexity try a 3D object that spins around the screen and bounces off the sides. 333 | 334 | **Watermarking Application** – Have some pictures you want copyright protected? Add your own logo or text lightly across the background so that no one can simply steal your graphics off your site. Make a program that will add this watermark to the picture. 335 | 336 | **Turtle Graphics** – This is a common project where you create a floor of 20 x 20 squares. Using various commands you tell a turtle to draw a line on the floor. You have move forward, left or right, lift or drop pen etc. For added complexity, allow the program to read in the list of commands from a file. Do a search online for “Turtle Graphics” for more information. 337 | 338 | Games 339 | --------- 340 | 341 | **Battleship** – Create two game boards and let each player place a number of war ships. Each player can’t see the other person’s board. They then take turns firing at one another by guessing one of the board squares. If the square they guess contains part of a ship, it is a hit. Otherwise it is a miss. They sink a ship when all squares containing that particular ship have been uncovered. The player wins when all their opponents’ ships have been sunk. 342 | 343 | **Chess and Checkers** – Simply put a game of chess or checkers. Try to make it playable online and if you can use a graphical user interface that can also undo or redo a step as well as keep a history of moves for replay. 344 | 345 | [**Hangman**](https://github.com/miguelgazela/Projects/blob/master/Games/hangman.py) – Randomly select a word from a file, have the user guess characters in the word. For each character they guess that is not in the word, have it draw another part of a man hanging in a noose. If the picture is completed before they guess all the characters, they lose. - Incomplete 346 | 347 | **Crossword Puzzle** – Create a crossword puzzle which links words together on common letters. Provide a list of clues for each word and let the user enter fill in the words until the entire crossword is filled in. 348 | 349 | **Frogger** – Get your frog across the river and lanes of traffic by either jumping on logs and lily pads rushing by at different speeds or avoid the automobiles which are also moving at various speeds. Based on the old arcade game. 350 | --------------------------------------------------------------------------------