From 9ebddd86404612e990682f5b717af6cf2d9ab61b Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Thu, 29 Aug 2013 19:58:31 +0530 Subject: [PATCH 01/49] Add security, classic algos update --- Classic Algorithms/README.md | 2 ++ README-scratch.md | 11 +++++++++-- README.md | 11 +++++++++-- Security/README.md | 4 ++++ 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 Security/README.md diff --git a/Classic Algorithms/README.md b/Classic Algorithms/README.md index bd88e10d6..9d15e2322 100644 --- a/Classic Algorithms/README.md +++ b/Classic Algorithms/README.md @@ -8,3 +8,5 @@ Classic Algorithms **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. **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). + +**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. \ No newline at end of file diff --git a/README-scratch.md b/README-scratch.md index 7d5c026b1..a81eb6329 100644 --- a/README-scratch.md +++ b/README-scratch.md @@ -51,6 +51,8 @@ Classic Algorithms **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). +**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. + Graph -------- **Graph from links** - Create a program that will create a graph or network from a series of links. @@ -213,10 +215,15 @@ Graphics and Multimedia **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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* +Security +------------- + +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. + =============================================== Sources ======= -[Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -[Rosetta Code](http://rosettacode.org/) +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) \ No newline at end of file diff --git a/README.md b/README.md index d43575493..3113e8a52 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,8 @@ Graphs **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. +**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. + Text --------- @@ -255,10 +257,15 @@ Graphics and Multimedia **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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* +Security +------------- + +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. + =============================================== Sources ======= -[Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -[Rosetta Code](http://rosettacode.org/) +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) \ No newline at end of file diff --git a/Security/README.md b/Security/README.md new file mode 100644 index 000000000..a654b76c7 --- /dev/null +++ b/Security/README.md @@ -0,0 +1,4 @@ +Security +------------- + +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. \ No newline at end of file From 65c87e0313214c5e84f41e48dc71139b7776ee6e Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Fri, 30 Aug 2013 20:01:11 +0530 Subject: [PATCH 02/49] Some minor updates --- Classes/product_inventory.py | 4 +- Numbers/change.py | 82 +++++++++++++++++------------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/Classes/product_inventory.py b/Classes/product_inventory.py index e337a7d5e..df1ef1afa 100644 --- a/Classes/product_inventory.py +++ b/Classes/product_inventory.py @@ -55,7 +55,9 @@ def print_inventory(self): """ value = 0 for product in self.products: - print '%d\t%s\t%.02f each' % (product.pid, product.qty, product.price) + print '%d\t%s\t%.02f each' % (product.pid, + product.qty, + product.price) value += (product.price * product.qty) print '\nTotal value: %.02f' % value diff --git a/Numbers/change.py b/Numbers/change.py index 6d6f13cde..8bce7273e 100644 --- a/Numbers/change.py +++ b/Numbers/change.py @@ -1,43 +1,39 @@ -# 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. - -if __name__ == '__main__': - cost = input("What's the cost in dollars? ") - given = input("What's the amount of dollars given? ") - - change = given - cost - - print "\n" - if change < 0: - print "Please ask for $%.2f more from the customer." % (-change) # double negation - else: - print "The change is $%.2f." % change - - q = 0 # 0.25 - d = 0 # 0.10 - n = 0 # 0.05 - p = 0 # 0.01 - - change = int(change * 100) # let's talk about cents - - if change >= 25: - q = int(change / 25) - change = change % 25 - if change >= 10: - d = int(change / 10) - change = change % 10 - if change >= 5: - n = int(change / 5) - change = change % 5 - if change >= 1: - p = change # rest all change is in pennies - - print "Give the following change to the customer:" - print "Quarters: %d\tDimes: %d\tNickels: %d\tPennies: %d" \ - % (q, d, n, p) - - # DEBUG - # print "Total change per the number of coins is %.2f" % \ - # ((q * .25) + (d * .10) + (n * 0.05) + (p * 0.01)) +# 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. + +if __name__ == '__main__': + cost = input("What's the cost in dollars? ") + given = input("What's the amount of dollars given? ") + + change = given - cost + + print "\n" + if change < 0: + print "Please ask for $%.2f more from the customer." % (-change) # double negation + else: + print "The change is $%.2f." % change + + q = 0 # 0.25 + d = 0 # 0.10 + n = 0 # 0.05 + p = 0 # 0.01 + + change = int(change * 100) # let's talk about cents + + if change >= 25: + q = int(change / 25) + change = change % 25 + if change >= 10: + d = int(change / 10) + change = change % 10 + if change >= 5: + n = int(change / 5) + change = change % 5 + if change >= 1: + p = change # rest all change is in pennies + + print "Give the following change to the customer:" + print "Quarters: %d\tDimes: %d\tNickels: %d\tPennies: %d" \ + % (q, d, n, p) From 7464080c62622d508bc4c8772a93791fe121eda8 Mon Sep 17 00:00:00 2001 From: Daniele Bonadiman Date: Wed, 4 Sep 2013 10:39:40 +0200 Subject: [PATCH 03/49] Update README.md The inverted index is not related to graphs but is used in information retrieval --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3113e8a52..6c0a48634 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,9 @@ Graphs **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. +Information Retrieval +--------- + **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. Text @@ -268,4 +271,4 @@ Sources ======= * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) \ No newline at end of file +* [Rosetta Code](http://rosettacode.org/) From cc2ed7faf003a0b77437c6936b752f98be6d5d9b Mon Sep 17 00:00:00 2001 From: Daniele Bonadiman Date: Wed, 4 Sep 2013 17:35:24 +0200 Subject: [PATCH 04/49] Update README-scratch.md --- README-scratch.md | 459 +++++++++++++++++++++++----------------------- 1 file changed, 231 insertions(+), 228 deletions(-) diff --git a/README-scratch.md b/README-scratch.md index a81eb6329..b89a3323f 100644 --- a/README-scratch.md +++ b/README-scratch.md @@ -1,229 +1,232 @@ -Mega Project List -======== - -Numbers ---------- - -**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. - -**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. - -**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. - -**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. - -**Find Cost of Tile to Cover W x H Floor** - 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. - -**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. - -**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. - -**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. - -**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. - -**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. - -**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. - -**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. - -**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). - -**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. - -**Factorial Finder** - 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. - -**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. - -**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. Display an example of your output here. Find first 8 happy numbers. - -**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).* - -Classic Algorithms ------------------ - +Mega Project List +======== + +Numbers +--------- + +**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. + +**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. + +**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. + +**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. + +**Find Cost of Tile to Cover W x H Floor** - 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. + +**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. + +**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. + +**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. + +**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. + +**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. + +**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. + +**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. + +**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). + +**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. + +**Factorial Finder** - 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. + +**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. + +**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. Display an example of your output here. Find first 8 happy numbers. + +**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).* + +Classic Algorithms +----------------- + **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. - -**Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. - -**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. - -**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). - -**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. - -Graph --------- -**Graph from links** - Create a program that will create a graph or network from a series of links. - -**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. - -**Connected Graph** - Create a program which takes a graph as an input and outputs whether every node is connected or not. - -**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. - - - -Text ---------- - -**Reverse a String** - Enter a string and the program will reverse it and print it out. - -**Pig Latin** - 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. - -**Count Vowels** - 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. - -**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” - -**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. - -**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* - -**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. - -**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* - -**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* - -**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* - -**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. - -**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. - -**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. *Optional: Suggest places you can get it (link to Amazon page?).* - -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](daringfireball.net/projects/markdown/syntax).* - -**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 expression against the source text and return any matches or flag errors in the regular expression. - -Networking ---------- - -**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. - -**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. - -**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. - -**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 at a given interval. - -**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* - -**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. - -**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. - -Classes ---------- - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -Threading ---------- - -**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. - -**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. - -Web ---------- - -**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* - -**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. - -**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* - -**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. - -**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* - -**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. - -**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. - -**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* - -**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. - -**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. - -Files ---------- - -**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. - -**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. - -**Sort Excel/CSV File 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. - -**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* - -**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. *Optional: Deploy on GAE or Heroku if possible.* - -**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. - -**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. *Optional: For extra practice try adding syntax highlighting based on the language.* - -Databases ---------- - -**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. - -**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. - -**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. - -**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* - -**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. *Optional: 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.* - -**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. - -**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. - -**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. - -Graphics and Multimedia ---------- - -**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* - -**Stream Video from Online** - Try to create your own online streaming video player. - -**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. - -**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. *Optional: Use threading to process multiple images simultaneously.* - -**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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* - -Security -------------- - -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. - -=============================================== - -Sources -======= - -* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) \ No newline at end of file + +**Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. + +**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. + +**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). + + +Graph +-------- +**Graph from links** - Create a program that will create a graph or network from a series of links. + +**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. + +**Connected Graph** - Create a program which takes a graph as an input and outputs whether every node is connected or not. + +**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. + +Data Structures +--------- + +**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. + + +Text +--------- + +**Reverse a String** - Enter a string and the program will reverse it and print it out. + +**Pig Latin** - 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. + +**Count Vowels** - 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. + +**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” + +**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. + +**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* + +**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. + +**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* + +**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* + +**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* + +**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. + +**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. + +**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. *Optional: Suggest places you can get it (link to Amazon page?).* + +**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](daringfireball.net/projects/markdown/syntax).* + +**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 expression against the source text and return any matches or flag errors in the regular expression. + +Networking +--------- + +**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. + +**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. + +**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. + +**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 at a given interval. + +**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* + +**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. + +**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. + +Classes +--------- + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +Threading +--------- + +**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. + +**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. + +Web +--------- + +**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* + +**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. + +**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* + +**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. + +**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* + +**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. + +**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. + +**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* + +**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. + +**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. + +Files +--------- + +**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. + +**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. + +**Sort Excel/CSV File 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. + +**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* + +**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. *Optional: Deploy on GAE or Heroku if possible.* + +**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. + +**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. *Optional: For extra practice try adding syntax highlighting based on the language.* + +Databases +--------- + +**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. + +**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. + +**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. + +**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* + +**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. *Optional: 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.* + +**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. + +**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. + +**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. + +Graphics and Multimedia +--------- + +**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* + +**Stream Video from Online** - Try to create your own online streaming video player. + +**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. + +**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. *Optional: Use threading to process multiple images simultaneously.* + +**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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* + +Security +------------- + +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. + +=============================================== + +Sources +======= + +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) From c9e2a81ed3f4603c0c25dcbf88ecdda726c443d4 Mon Sep 17 00:00:00 2001 From: Daniele Bonadiman Date: Wed, 4 Sep 2013 17:36:23 +0200 Subject: [PATCH 05/49] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c0a48634..8355a725a 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Graphs **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. -Information Retrieval +Data Structures --------- **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. From 52949a3095f6f842ff4685090f59ce07a11f9429 Mon Sep 17 00:00:00 2001 From: Daniele Bonadiman Date: Wed, 4 Sep 2013 17:40:56 +0200 Subject: [PATCH 06/49] added Data Structures Folder --- Data Structures/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Data Structures/README.md diff --git a/Data Structures/README.md b/Data Structures/README.md new file mode 100644 index 000000000..ec861fe6a --- /dev/null +++ b/Data Structures/README.md @@ -0,0 +1,4 @@ +Data Structures +--------- + +**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. \ No newline at end of file From 434c867e58d3f99c70668900c3ba490295c6ca53 Mon Sep 17 00:00:00 2001 From: Daniele Bonadiman Date: Wed, 4 Sep 2013 17:41:33 +0200 Subject: [PATCH 07/49] Update README.md --- Classic Algorithms/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Classic Algorithms/README.md b/Classic Algorithms/README.md index 9d15e2322..bd88e10d6 100644 --- a/Classic Algorithms/README.md +++ b/Classic Algorithms/README.md @@ -8,5 +8,3 @@ Classic Algorithms **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. **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). - -**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. \ No newline at end of file From e38a3b06a765de6d60705374bc300604267faf3b Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Fri, 13 Sep 2013 12:45:40 +0530 Subject: [PATCH 08/49] Remove math import --- Numbers/prime.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Numbers/prime.py b/Numbers/prime.py index 45cbe1390..ffa1ea83c 100644 --- a/Numbers/prime.py +++ b/Numbers/prime.py @@ -2,7 +2,6 @@ # and find all Prime Factors (if there are any) and # display them. -import math def is_a_prime(x): for i in range(2, x): From 8da323c5053756da78fb610242165fcd54b5ccf4 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Thu, 17 Oct 2013 09:40:39 -0700 Subject: [PATCH 09/49] update --- .gitignore | 76 +++++++++++------------ Classes/README.md | 38 ++++++------ Databases/README.md | 34 +++++----- Files/README.md | 30 ++++----- Graphics and Multimedia/README.md | 22 +++---- Networking/README.md | 30 ++++----- Numbers/README.md | 78 +++++++++++------------ Numbers/alarm.py | 98 ++++++++++++++--------------- Numbers/binary_decimal.py | 100 +++++++++++++++--------------- Numbers/credit_card_validator.py | 82 ++++++++++++------------ Numbers/factorial.py | 66 ++++++++++---------- Numbers/fibonacci.py | 30 ++++----- Numbers/next_prime.py | 50 +++++++-------- Numbers/pi.py | 20 +++--- Numbers/tile.py | 22 +++---- README.md | 2 +- RECOGNITION/README.md | 46 +++++++------- Text/README.md | 62 +++++++++--------- Text/count_words.py | 52 ++++++++-------- Text/palindrome.py | 24 +++---- Text/piglatin.py | 44 ++++++------- Text/reverse.py | 16 ++--- Threading/README.md | 10 +-- Web/README.md | 42 ++++++------- 24 files changed, 537 insertions(+), 537 deletions(-) diff --git a/.gitignore b/.gitignore index c084059d9..966cf2fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,39 @@ -*.py[cod] - -# C extensions -*.so - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Komodo -.komodotools/ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Komodo +.komodotools/ *.komodoproject \ No newline at end of file diff --git a/Classes/README.md b/Classes/README.md index c37fd9d63..1e45760a8 100644 --- a/Classes/README.md +++ b/Classes/README.md @@ -1,20 +1,20 @@ -Classes ---------- - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - +Classes +--------- + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + +**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. + **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. \ No newline at end of file diff --git a/Databases/README.md b/Databases/README.md index 6ca5485da..48fe04a91 100644 --- a/Databases/README.md +++ b/Databases/README.md @@ -1,18 +1,18 @@ -Databases ---------- - -**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. - -**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. - -**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. - -**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* - -**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. *Optional: 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.* - -**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. - -**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. - +Databases +--------- + +**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. + +**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. + +**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. + +**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* + +**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. *Optional: 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.* + +**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. + +**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. + **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. \ No newline at end of file diff --git a/Files/README.md b/Files/README.md index 881155570..b564c730b 100644 --- a/Files/README.md +++ b/Files/README.md @@ -1,16 +1,16 @@ -Files ---------- - -**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. - -**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. - -**Sort Excel/CSV File 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. - -**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* - -**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. *Optional: Deploy on GAE or Heroku if possible.* - -**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. - +Files +--------- + +**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. + +**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. + +**Sort Excel/CSV File 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. + +**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* + +**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. *Optional: Deploy on GAE or Heroku if possible.* + +**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. + **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. *Optional: For extra practice try adding syntax highlighting based on the language.* \ No newline at end of file diff --git a/Graphics and Multimedia/README.md b/Graphics and Multimedia/README.md index f7aa3ce9a..f104dac4c 100644 --- a/Graphics and Multimedia/README.md +++ b/Graphics and Multimedia/README.md @@ -1,12 +1,12 @@ -Graphics and Multimedia ---------- - -**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* - -**Stream Video from Online** - Try to create your own online streaming video player. - -**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. - -**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. *Optional: Use threading to process multiple images simultaneously.* - +Graphics and Multimedia +--------- + +**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* + +**Stream Video from Online** - Try to create your own online streaming video player. + +**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. + +**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. *Optional: Use threading to process multiple images simultaneously.* + **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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* \ No newline at end of file diff --git a/Networking/README.md b/Networking/README.md index d222d7db4..81565e25e 100644 --- a/Networking/README.md +++ b/Networking/README.md @@ -1,16 +1,16 @@ -Networking ---------- - -**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. - -**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. - -**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. - -**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 at a given interval. - -**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* - -**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. - +Networking +--------- + +**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. + +**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. + +**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. + +**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 at a given interval. + +**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* + +**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. + **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. \ No newline at end of file diff --git a/Numbers/README.md b/Numbers/README.md index ce820a66d..c6fc22db6 100644 --- a/Numbers/README.md +++ b/Numbers/README.md @@ -1,40 +1,40 @@ -Numbers ---------- - -**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. - -**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. - -**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. - -**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. - -**Find Cost of Tile to Cover W x H Floor** - 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. - -**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. - -**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. - -**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. - -**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. - -**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. - -**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. - -**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. - -**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). - -**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. - -**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. - -**Factorial Finder** - 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. - -**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. - -**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. Display an example of your output here. Find first 8 happy numbers. - +Numbers +--------- + +**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. + +**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. + +**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. + +**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. + +**Find Cost of Tile to Cover W x H Floor** - 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. + +**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. + +**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. + +**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. + +**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. + +**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. + +**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. + +**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. + +**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). + +**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. + +**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. + +**Factorial Finder** - 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. + +**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. + +**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. Display an example of your output here. Find first 8 happy numbers. + **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).* \ No newline at end of file diff --git a/Numbers/alarm.py b/Numbers/alarm.py index a0a1c7367..24e0d9e81 100644 --- a/Numbers/alarm.py +++ b/Numbers/alarm.py @@ -1,49 +1,49 @@ -""" -Alarm Clock - A simple clock where it plays a sound after -X number of minutes/seconds or at a particular time. - -Dependencies: -pyglet - pip install pyglet -""" - -import time -import winsound -import pyglet - -def play(hh, mm): - not_alarmed = 1 - - while(not_alarmed): - cur_time = list(time.localtime()) # get the time right now - hour = cur_time[3] # find the hour - minute = cur_time[4] # and the minute - if hour == hh and minute == mm: - song = pyglet.media.load('bin/sound.wav') - song.play() # play the sound - pyglet.app.run() - not_alarmed = 0 # stop the loop - -if __name__ == '__main__': - - print """ - 1. Play sound after X minutes - 2. Play sound at an exact time - """ - choice = input('What do you want to do? ') - - if choice == 1: - mins = input('How many minutes from now? ') - hh_from_now = mins / 60 # if minutes > 60, this will adjust the hours - mm_from_now = mins % 60 # and then the minutes - cur_time = list(time.localtime()) # get the time right now - hour = cur_time[3] # find the current hour - minute = cur_time[4] # and the current minute - hh = (hour + hh_from_now) % 24 # cycle through the clock if hh > 24 - mm = (minute + mm_from_now) % 60 # cycle through the clock if mm > 60 - play(hh, mm) - elif choice == 2: - hh = input('What hour do you want to wake up (0-23)? ') - mm = input('What minute do you want to wake up (0-59)? ') - play(hh, mm) - +""" +Alarm Clock - A simple clock where it plays a sound after +X number of minutes/seconds or at a particular time. + +Dependencies: +pyglet + pip install pyglet +""" + +import time +import winsound +import pyglet + +def play(hh, mm): + not_alarmed = 1 + + while(not_alarmed): + cur_time = list(time.localtime()) # get the time right now + hour = cur_time[3] # find the hour + minute = cur_time[4] # and the minute + if hour == hh and minute == mm: + song = pyglet.media.load('bin/sound.wav') + song.play() # play the sound + pyglet.app.run() + not_alarmed = 0 # stop the loop + +if __name__ == '__main__': + + print """ + 1. Play sound after X minutes + 2. Play sound at an exact time + """ + choice = input('What do you want to do? ') + + if choice == 1: + mins = input('How many minutes from now? ') + hh_from_now = mins / 60 # if minutes > 60, this will adjust the hours + mm_from_now = mins % 60 # and then the minutes + cur_time = list(time.localtime()) # get the time right now + hour = cur_time[3] # find the current hour + minute = cur_time[4] # and the current minute + hh = (hour + hh_from_now) % 24 # cycle through the clock if hh > 24 + mm = (minute + mm_from_now) % 60 # cycle through the clock if mm > 60 + play(hh, mm) + elif choice == 2: + hh = input('What hour do you want to wake up (0-23)? ') + mm = input('What minute do you want to wake up (0-59)? ') + play(hh, mm) + diff --git a/Numbers/binary_decimal.py b/Numbers/binary_decimal.py index f378fb76f..5453fb888 100644 --- a/Numbers/binary_decimal.py +++ b/Numbers/binary_decimal.py @@ -1,50 +1,50 @@ -""" -Binary to Decimal and Back Converter -Develop a converter to convert a decimal number to binary -or a binary number to its decimal equivalent. -""" - -def binary_to_decimal(binary): - """ - Converts a binary number into a decimal number. - """ - decimal = 0 - index = 0 - while binary > 0: - last = binary % 10 - binary = binary / 10 - decimal += (last * (2 ** index)) - index += 1 - return decimal - -def decimal_to_binary(decimal): - """ - Converts a decimal number into a binary number. - """ - binary = "" - remainders = [] - while decimal > 0: - remainders.append(str(decimal % 2)) - decimal /= 2 - remainders.reverse() - binary = "".join(remainders) - return binary - -if __name__ == '__main__': - print """ - 1. Binary to Decimal - 2. Decimal to Binary\n - """ - - choice = input("Make a choice: ") - - if choice == 1: - binary = input("Binary to convert: ") - print "The binary number %d in decimal is %d" % \ - (binary, binary_to_decimal(binary)) - elif choice == 2: - decimal = input("Decimal to convert: ") - print "The decimal number %d in binary is %s" % \ - (decimal, decimal_to_binary(decimal)) - else: - print "Invalid choice" +""" +Binary to Decimal and Back Converter +Develop a converter to convert a decimal number to binary +or a binary number to its decimal equivalent. +""" + +def binary_to_decimal(binary): + """ + Converts a binary number into a decimal number. + """ + decimal = 0 + index = 0 + while binary > 0: + last = binary % 10 + binary = binary / 10 + decimal += (last * (2 ** index)) + index += 1 + return decimal + +def decimal_to_binary(decimal): + """ + Converts a decimal number into a binary number. + """ + binary = "" + remainders = [] + while decimal > 0: + remainders.append(str(decimal % 2)) + decimal /= 2 + remainders.reverse() + binary = "".join(remainders) + return binary + +if __name__ == '__main__': + print """ + 1. Binary to Decimal + 2. Decimal to Binary\n + """ + + choice = input("Make a choice: ") + + if choice == 1: + binary = input("Binary to convert: ") + print "The binary number %d in decimal is %d" % \ + (binary, binary_to_decimal(binary)) + elif choice == 2: + decimal = input("Decimal to convert: ") + print "The decimal number %d in binary is %s" % \ + (decimal, decimal_to_binary(decimal)) + else: + print "Invalid choice" diff --git a/Numbers/credit_card_validator.py b/Numbers/credit_card_validator.py index 7bb0a39cf..fb4e8fc95 100644 --- a/Numbers/credit_card_validator.py +++ b/Numbers/credit_card_validator.py @@ -1,41 +1,41 @@ -""" -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). - -This program works with *most* credit card numbers. - -Uses Luhn Algorithm (http://en.wikipedia.org/wiki/Luhn_algorithm). - -1. From the rightmost digit, which is the check digit, moving -left, double the value of every second digit; if product of this -doubling operation is greater than 9 (e.g., 7 * 2 = 14), then -sum the digits of the products (e.g., 10: 1 + 0 = 1, 14: 1 + 4 = 5). - -2. Add together doubled digits with the undoubled digits from the -original number. - -3. If the total modulo 10 is equal to 0 (if the total ends in zero) -then the number is valid according to the Luhn formula; else it is -not valid. -""" - -if __name__ == '__main__': - number = raw_input('Enter the credit card number of check: ').replace(' ', '') - #if not number.isdigit(): - # raise Exception('Invalid credit card number. Make sure it\'s all digits (with optional spaces in between).' - - digits = [int(char) for char in number] - - # double alternate digits (step 1) - doubled = [(digit * 2) if (i % 2 == 0) else digit \ - for (i, digit) in enumerate(digits)] # i <3 python - # sum digits of number > 10 (step 2) - summed = [num if num < 10 else sum([int(dig) for dig in str(num)]) \ - for num in doubled] # i <3 python ** 2 - # step 3 - if sum(summed) % 10 == 0: - print 'The number is valid' - else: - print 'The number is invalid' +""" +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). + +This program works with *most* credit card numbers. + +Uses Luhn Algorithm (http://en.wikipedia.org/wiki/Luhn_algorithm). + +1. From the rightmost digit, which is the check digit, moving +left, double the value of every second digit; if product of this +doubling operation is greater than 9 (e.g., 7 * 2 = 14), then +sum the digits of the products (e.g., 10: 1 + 0 = 1, 14: 1 + 4 = 5). + +2. Add together doubled digits with the undoubled digits from the +original number. + +3. If the total modulo 10 is equal to 0 (if the total ends in zero) +then the number is valid according to the Luhn formula; else it is +not valid. +""" + +if __name__ == '__main__': + number = raw_input('Enter the credit card number of check: ').replace(' ', '') + #if not number.isdigit(): + # raise Exception('Invalid credit card number. Make sure it\'s all digits (with optional spaces in between).' + + digits = [int(char) for char in number] + + # double alternate digits (step 1) + doubled = [(digit * 2) if (i % 2 == 0) else digit \ + for (i, digit) in enumerate(digits)] # i <3 python + # sum digits of number > 10 (step 2) + summed = [num if num < 10 else sum([int(dig) for dig in str(num)]) \ + for num in doubled] # i <3 python ** 2 + # step 3 + if sum(summed) % 10 == 0: + print 'The number is valid' + else: + print 'The number is invalid' diff --git a/Numbers/factorial.py b/Numbers/factorial.py index b09d5e2f4..cd8e753fc 100644 --- a/Numbers/factorial.py +++ b/Numbers/factorial.py @@ -1,33 +1,33 @@ -""" -Factorial Finder - 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. -""" - -def fact_loop(n): - """ - Returns the factorial of a given positive, non-zero integer - using loops. - """ - fact = 1 - while n > 0: - fact *= n - n -= 1 - return fact - -def fact_recursion(n): - """ - Returns the factorial of a given positive, non-zero integer - using recursion. - """ - return 1 if n == 0 else n * fact_recursion(n - 1) # if user as ternary operator - -if __name__ == '__main__': - n = input('Enter a positive number: ') - - if n >= 0: - print 'Factorial of %d by loops is %d' % (n, fact_loop(n)) - print 'Factorial of %d by recursion is %d' % (n, fact_recursion(n)) - else: - print 'Not a valid number' +""" +Factorial Finder - 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. +""" + +def fact_loop(n): + """ + Returns the factorial of a given positive, non-zero integer + using loops. + """ + fact = 1 + while n > 0: + fact *= n + n -= 1 + return fact + +def fact_recursion(n): + """ + Returns the factorial of a given positive, non-zero integer + using recursion. + """ + return 1 if n == 0 else n * fact_recursion(n - 1) # if user as ternary operator + +if __name__ == '__main__': + n = input('Enter a positive number: ') + + if n >= 0: + print 'Factorial of %d by loops is %d' % (n, fact_loop(n)) + print 'Factorial of %d by recursion is %d' % (n, fact_recursion(n)) + else: + print 'Not a valid number' diff --git a/Numbers/fibonacci.py b/Numbers/fibonacci.py index a6692a94f..2c239b48d 100644 --- a/Numbers/fibonacci.py +++ b/Numbers/fibonacci.py @@ -1,15 +1,15 @@ -# -*- coding: cp1252 -*- -# Fibonacci Sequence - Enter a number and have the -# program generate the Fibonacci sequence to that number -# or to the Nth number - -n = int(raw_input('How many numbers do you need? ')) -series = [1] - -while len(series) < n: - if len(series) == 1: - series.append(1) - else: - series.append(series[-1] + series[-2]) - -print series +# -*- coding: cp1252 -*- +# Fibonacci Sequence - Enter a number and have the +# program generate the Fibonacci sequence to that number +# or to the Nth number + +n = int(raw_input('How many numbers do you need? ')) +series = [1] + +while len(series) < n: + if len(series) == 1: + series.append(1) + else: + series.append(series[-1] + series[-2]) + +print series diff --git a/Numbers/next_prime.py b/Numbers/next_prime.py index 0f356acee..3d479bd07 100644 --- a/Numbers/next_prime.py +++ b/Numbers/next_prime.py @@ -1,25 +1,25 @@ -# Next Prime Number - Have the program find prime -# numbers until the user chooses to stop asking for -# the next one. - -def next_prime(current): - next_prime = current + 1 # start checking for primes 1 number after the current one - i = 2 - while next_prime > i: # check with numbers up to next_prime - 1 - if next_prime % i == 0: # if number is divisible - next_prime += 1 # ready to check the next number - i = 2 # reset i to check divisibility again from 2 - else: - i += 1 # increment the divisor - return next_prime - -if __name__ == '__main__': - current_prime = 2 - while True: - response = raw_input('Do you want the next prime? (Y/N) ') - - if response.lower().startswith('y'): - print current_prime - current_prime = next_prime(current_prime) - else: - break +# Next Prime Number - Have the program find prime +# numbers until the user chooses to stop asking for +# the next one. + +def next_prime(current): + next_prime = current + 1 # start checking for primes 1 number after the current one + i = 2 + while next_prime > i: # check with numbers up to next_prime - 1 + if next_prime % i == 0: # if number is divisible + next_prime += 1 # ready to check the next number + i = 2 # reset i to check divisibility again from 2 + else: + i += 1 # increment the divisor + return next_prime + +if __name__ == '__main__': + current_prime = 2 + while True: + response = raw_input('Do you want the next prime? (Y/N) ') + + if response.lower().startswith('y'): + print current_prime + current_prime = next_prime(current_prime) + else: + break diff --git a/Numbers/pi.py b/Numbers/pi.py index 559480110..027c63e50 100644 --- a/Numbers/pi.py +++ b/Numbers/pi.py @@ -1,10 +1,10 @@ -# Find PI to the Nth Digit - -from math import * - -digits = raw_input('Enter number of digits to round PI to: ') - -# print ('{0:.%df}' % min(20, int(digits))).format(math.pi) # nested string formatting - -# calculate pi using Machin-like Formula -print ('{0:.%df}' % min(30, int(digits))).format(4 * (4 * atan(1.0/5.0) - atan(1.0/239.0))) +# Find PI to the Nth Digit + +from math import * + +digits = raw_input('Enter number of digits to round PI to: ') + +# print ('{0:.%df}' % min(20, int(digits))).format(math.pi) # nested string formatting + +# calculate pi using Machin-like Formula +print ('{0:.%df}' % min(30, int(digits))).format(4 * (4 * atan(1.0/5.0) - atan(1.0/239.0))) diff --git a/Numbers/tile.py b/Numbers/tile.py index 6f4d7cf62..1b5b23408 100644 --- a/Numbers/tile.py +++ b/Numbers/tile.py @@ -1,11 +1,11 @@ -# Find Cost of Tile to Cover W x H Floor - 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. - -# Use input as the input can be integer and float -cost = input("What's the cost per sq. feet? ") -width = input("What's the width of the floor? ") -height = input("What's the height of the floor? ") - -print "The total cost is $%.2f for %.2f square feet" \ - % (width * height * cost, width * height) +# Find Cost of Tile to Cover W x H Floor - 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. + +# Use input as the input can be integer and float +cost = input("What's the cost per sq. feet? ") +width = input("What's the width of the floor? ") +height = input("What's the height of the floor? ") + +print "The total cost is $%.2f for %.2f square feet" \ + % (width * height * cost, width * height) diff --git a/README.md b/README.md index 8355a725a..e70871f9f 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Web [**Get Atomic Time from Internet Clock**](https://github.com/thekarangoel/Projects/blob/master/Web/time.py) - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. -**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* +[**Fetch Current Weather**](https://github.com/thekarangoel/GAE-weather) - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* **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. diff --git a/RECOGNITION/README.md b/RECOGNITION/README.md index c6b3c1aec..d79d2c85a 100644 --- a/RECOGNITION/README.md +++ b/RECOGNITION/README.md @@ -1,24 +1,24 @@ -Recognition for Projects -========================= - -### Throughout July - -Ever since this repo was created, it has been in the top list on GH. Be it the daily or weekly list! - -Projects is the #5 most forked repo on GH done in Python language! - -![](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top-languages-python-2013-07-25.png) - -### July 25 2013 - -In the monthly top list on GH. - -![Showed up on top monthly list](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-monthly-2013-07-25.png) - -### July 14 2013 - -Just 10 days after the repo was created, it showed up in the top 5 on GH. - -![](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-2013-07-14.png) - +Recognition for Projects +========================= + +### Throughout July + +Ever since this repo was created, it has been in the top list on GH. Be it the daily or weekly list! + +Projects is the #5 most forked repo on GH done in Python language! + +![](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top-languages-python-2013-07-25.png) + +### July 25 2013 + +In the monthly top list on GH. + +![Showed up on top monthly list](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-monthly-2013-07-25.png) + +### July 14 2013 + +Just 10 days after the repo was created, it showed up in the top 5 on GH. + +![](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-2013-07-14.png) + Check other screenshots in this repo for more GH explore page rankings following that day. \ No newline at end of file diff --git a/Text/README.md b/Text/README.md index 9cfb18abb..b2147d7bd 100644 --- a/Text/README.md +++ b/Text/README.md @@ -1,32 +1,32 @@ -Text ---------- - -**Reverse a String** - Enter a string and the program will reverse it and print it out. - -**Pig Latin** - 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. - -**Count Vowels** - 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. - -**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” - -**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. - -**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* - -**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. - -**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* - -**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* - -**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* - -**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. - -**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. - -**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. *Optional: Suggest places you can get it (link to Amazon page?).* - -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](daringfireball.net/projects/markdown/syntax).* - +Text +--------- + +**Reverse a String** - Enter a string and the program will reverse it and print it out. + +**Pig Latin** - 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. + +**Count Vowels** - 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. + +**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” + +**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. + +**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* + +**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. + +**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* + +**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* + +**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* + +**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. + +**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. + +**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. *Optional: Suggest places you can get it (link to Amazon page?).* + +**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](daringfireball.net/projects/markdown/syntax).* + **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 expression against the source text and return any matches or flag errors in the regular expression. \ No newline at end of file diff --git a/Text/count_words.py b/Text/count_words.py index 113c31f81..afe0daccc 100644 --- a/Text/count_words.py +++ b/Text/count_words.py @@ -1,26 +1,26 @@ -""" -Count Words in a String - Counts the number of individual -words in a string and display the top 5/10 most used words. -""" - -from collections import defaultdict -import operator - -if __name__ == '__main__': - text = raw_input('Enter some text: \n') - words = text.split() # very naive approach, split at space - - counts = defaultdict(int) # no need to check existence of a key - - # find count of each word - for word in words: - counts[word] += 1 - - # sort the dict by the count of each word, returns a tuple (word, count) - sorted_counts = sorted(counts.iteritems(), \ - key=operator.itemgetter(1), \ - reverse=True) - - # print top 5 words - for (word,count) in sorted_counts[:5]: # thanks @jrwren for this! - print (word, count) +""" +Count Words in a String - Counts the number of individual +words in a string and display the top 5/10 most used words. +""" + +from collections import defaultdict +import operator + +if __name__ == '__main__': + text = raw_input('Enter some text: \n') + words = text.split() # very naive approach, split at space + + counts = defaultdict(int) # no need to check existence of a key + + # find count of each word + for word in words: + counts[word] += 1 + + # sort the dict by the count of each word, returns a tuple (word, count) + sorted_counts = sorted(counts.iteritems(), \ + key=operator.itemgetter(1), \ + reverse=True) + + # print top 5 words + for (word,count) in sorted_counts[:5]: # thanks @jrwren for this! + print (word, count) diff --git a/Text/palindrome.py b/Text/palindrome.py index 43c7f4145..8e9cf3a38 100644 --- a/Text/palindrome.py +++ b/Text/palindrome.py @@ -1,12 +1,12 @@ -""" -Check if Palindrome - Checks if the string entered -by the user is a palindrome. That is that it reads -the same forwards as backwards like "racecar" -""" - -string = raw_input('Enter a string: ').lower() - -if string == string[::-1]: - print '%s is a palindrome' % string -else: - print '%s is not a palindrome' % string +""" +Check if Palindrome - Checks if the string entered +by the user is a palindrome. That is that it reads +the same forwards as backwards like "racecar" +""" + +string = raw_input('Enter a string: ').lower() + +if string == string[::-1]: + print '%s is a palindrome' % string +else: + print '%s is not a palindrome' % string diff --git a/Text/piglatin.py b/Text/piglatin.py index 07af62233..f5b09251e 100644 --- a/Text/piglatin.py +++ b/Text/piglatin.py @@ -1,22 +1,22 @@ -""" -Pig Latin - 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. -""" - -word = raw_input('What\'s your word? ').lower() -vowels = 'aeiou' - -pig = 'ay' - -first = word[0] - -if first in vowels: - new = word + pig -else: - new = word[1:] + first + pig - -print new +""" +Pig Latin - 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. +""" + +word = raw_input('What\'s your word? ').lower() +vowels = 'aeiou' + +pig = 'ay' + +first = word[0] + +if first in vowels: + new = word + pig +else: + new = word[1:] + first + pig + +print new diff --git a/Text/reverse.py b/Text/reverse.py index 5cec022c3..82d5331f1 100644 --- a/Text/reverse.py +++ b/Text/reverse.py @@ -1,8 +1,8 @@ -# -*- coding: cp1252 -*- -""" -Reverse a String - Enter a string and the program -will reverse it and print it out. -""" - -string = raw_input("Whatchu wanna say to me? ") -print "You say %s, I say %s" % (string, string[::-1]) +# -*- coding: cp1252 -*- +""" +Reverse a String - Enter a string and the program +will reverse it and print it out. +""" + +string = raw_input("Whatchu wanna say to me? ") +print "You say %s, I say %s" % (string, string[::-1]) diff --git a/Threading/README.md b/Threading/README.md index 70550fd4e..17fdcd043 100644 --- a/Threading/README.md +++ b/Threading/README.md @@ -1,6 +1,6 @@ -Threading ---------- - -**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. - +Threading +--------- + +**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. + **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. \ No newline at end of file diff --git a/Web/README.md b/Web/README.md index 82708b573..cba41d524 100644 --- a/Web/README.md +++ b/Web/README.md @@ -1,22 +1,22 @@ -Web ---------- - -**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* - -**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. - -**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* - -**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. - -**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* - -**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. - -**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. - -**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* - -**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. - +Web +--------- + +**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* + +**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. + +**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* + +**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. + +**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* + +**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. + +**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. + +**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* + +**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. + **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. \ No newline at end of file From 6eddc253b949be514829503510594d65bce9ab18 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Date: Mon, 21 Oct 2013 18:05:43 +0530 Subject: [PATCH 10/49] Fixed the markdown Documentation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e70871f9f..b3fe9d25e 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Text **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. *Optional: Suggest places you can get it (link to Amazon page?).* -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](daringfireball.net/projects/markdown/syntax).* +**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](http://daringfireball.net/projects/markdown/syntax).* **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 expression against the source text and return any matches or flag errors in the regular expression. From 41debc368db5b4fde08c9ee5a83238535959b0f2 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 23 Oct 2013 16:26:17 -0700 Subject: [PATCH 11/49] Fix markdown docs url --- .DS_Store | Bin 0 -> 6148 bytes README-scratch.md | 2 +- Text/README.md | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Wed, 23 Oct 2013 16:28:03 -0700 Subject: [PATCH 12/49] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Sat, 23 Nov 2013 09:15:56 -0800 Subject: [PATCH 13/49] Fix #34 --- Numbers/binary_decimal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Numbers/binary_decimal.py b/Numbers/binary_decimal.py index 5453fb888..b6846b726 100644 --- a/Numbers/binary_decimal.py +++ b/Numbers/binary_decimal.py @@ -28,7 +28,7 @@ def decimal_to_binary(decimal): decimal /= 2 remainders.reverse() binary = "".join(remainders) - return binary + return 0 if binary == "" else binary if __name__ == '__main__': print """ From d1a0c320483d8b5c94e9457a4384db3d4d10267f Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sat, 23 Nov 2013 20:06:18 -0800 Subject: [PATCH 14/49] Real reverse algorithm #31 --- Text/reverse.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Text/reverse.py b/Text/reverse.py index 82d5331f1..3a1296545 100644 --- a/Text/reverse.py +++ b/Text/reverse.py @@ -5,4 +5,7 @@ """ string = raw_input("Whatchu wanna say to me? ") -print "You say %s, I say %s" % (string, string[::-1]) +copy = [c for c in string] +for i in range(len(copy) / 2): + copy[i], copy[len(copy) - i - 1] = copy[len(copy) - i - 1], copy[i] +print "You say %s, I say %s" % (string, ''.join(copy)) From 97f8597da739557c37e3b46f1e9de4656702cf9a Mon Sep 17 00:00:00 2001 From: Bitdeli Chef Date: Mon, 25 Nov 2013 22:44:55 +0000 Subject: [PATCH 15/49] Add a Bitdeli badge to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b3fe9d25e..d1f316043 100644 --- a/README.md +++ b/README.md @@ -272,3 +272,7 @@ Sources * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) * [Rosetta Code](http://rosettacode.org/) + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/karan/projects/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + From c8d140412dc816bb31ef928b4220fa6518239b26 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sun, 8 Dec 2013 11:56:41 -0800 Subject: [PATCH 16/49] remove .DS_Store --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 966cf2fa9..d77b8a24e 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,6 @@ nosetests.xml # Komodo .komodotools/ -*.komodoproject \ No newline at end of file +*.komodoproject + +.DS_Store \ No newline at end of file From 39a2ff6eedc45e5df634fc0613e4491530df86b5 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sun, 8 Dec 2013 12:16:30 -0800 Subject: [PATCH 17/49] completed tax --- Numbers/tax.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Numbers/tax.py diff --git a/Numbers/tax.py b/Numbers/tax.py new file mode 100644 index 000000000..76ccf776a --- /dev/null +++ b/Numbers/tax.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +TAXES = { + 'WA': 9.5, + 'CA': 7.5, + 'FL': 10.8, + 'OH': 7.8 +} + +state = raw_input('What\'s your state (WA / CA / FL / OH)?: ') +cost = float(raw_input('And the cost?: ')) + +tax = TAXES[state] / 100 * cost + +print 'Cost: %.02f\nTax: %.02f\n----------\nTotal: %.02f' % (cost, tax, cost + tax) \ No newline at end of file From 85ddcdca7a93560accb1a5d761772f0a0fc64ea2 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sun, 8 Dec 2013 12:17:36 -0800 Subject: [PATCH 18/49] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d1f316043..332b92ac7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Numbers [**Credit Card Validator**](https://github.com/thekarangoel/Projects/blob/master/Numbers/credit_card_validator.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). -**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. +[**Tax Calculator**](https://github.com/karan/Projects/blob/master/Numbers/tax.py) - 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. [**Factorial Finder**](https://github.com/thekarangoel/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. @@ -272,7 +272,7 @@ Sources * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) * [Rosetta Code](http://rosettacode.org/) - - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/karan/projects/trend.png)](https://bitdeli.com/free "Bitdeli Badge") - + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/karan/projects/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + From be8dd11422d9632f19e0f286d4d1f1bb8ca5c550 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Tue, 17 Dec 2013 08:41:44 -0800 Subject: [PATCH 19/49] add license issue #37 --- LICENSE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..378233073 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) +Copyright (c) 2013 Karan Goel + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From 36fd96bff7a4b895f1ddc7077e316ff98d4b4259 Mon Sep 17 00:00:00 2001 From: jintonation Date: Wed, 22 Jan 2014 09:08:46 -0700 Subject: [PATCH 20/49] Create caesar_cipher.py --- Text/caesar_cipher.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Text/caesar_cipher.py diff --git a/Text/caesar_cipher.py b/Text/caesar_cipher.py new file mode 100644 index 000000000..5e2698679 --- /dev/null +++ b/Text/caesar_cipher.py @@ -0,0 +1,40 @@ +""" +Caesar Cipher - Enter the cipher number and the program will "encrypt" them with +the Caesar cipher (a.k.a. ROT #). Type the word "exit" when you're finished. +""" + +while True: + try: + cipher = int(raw_input("Enter the cipher number: ")) + break + except ValueError: + print "I need a valid integer, please." + +print "Enter the text to be encoded." +print "Enter \"exit\" to leave." + +if __name__ == '__main__': + while True: + text = raw_input("> ") + encoded = [] + + if text.lower() == "exit": + break + + for letter in text: + if letter.isalpha(): + is_upper = False + + if letter == letter.upper(): + is_upper = True + letter = letter.lower() + + value = (ord(letter) - 97 + cipher) % 26 + if is_upper: + value -= 32 + + encoded.append(chr(value + 97)) + else: + encoded.append(letter) + + print ''.join(encoded) From 156235c44064338722e90736ea97372ca82346f4 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sat, 1 Mar 2014 12:26:35 -0800 Subject: [PATCH 21/49] donate links --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 332b92ac7..8834729d3 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,15 @@ You can find implementations of these projects in many other languages by other ================================ -### [Donate](https://www.gittip.com/Karan%20Goel/) +### Donations -If you love and use *Projects*, please consider [donating via gittip](https://www.gittip.com/Karan%20Goel/). Any support is appreciated! +If *Projects* has helped you in any way, and you'd like to help the developer, please consider donating. + +**- BTC: [19dLDL4ax7xRmMiGDAbkizh6WA6Yei2zP5](http://i.imgur.com/bAQgKLN.png)** + +**- Gittip: [https://www.gittip.com/karan/](https://www.gittip.com/karan/)** + +**- Flattr: [https://flattr.com/profile/thekarangoel](https://flattr.com/profile/thekarangoel)** ================================ From bca05a698ae5d218360f29f1a14da42f1c1547af Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Fri, 7 Mar 2014 21:52:40 -0800 Subject: [PATCH 22/49] add coin flip simulation project. close #40 --- Numbers/README.md | 4 +++- README-scratch.md | 2 ++ README.md | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Numbers/README.md b/Numbers/README.md index c6fc22db6..2253abd86 100644 --- a/Numbers/README.md +++ b/Numbers/README.md @@ -37,4 +37,6 @@ Numbers **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. Display an example of your output here. Find first 8 happy numbers. -**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).* \ No newline at end of file +**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).* + +**Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. diff --git a/README-scratch.md b/README-scratch.md index bef59871d..9be6373b3 100644 --- a/README-scratch.md +++ b/README-scratch.md @@ -40,6 +40,8 @@ Numbers **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).* +**Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. + Classic Algorithms ----------------- diff --git a/README.md b/README.md index 8834729d3..36d76f79f 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ Numbers **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).* +**Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. + Classic Algorithms ----------------- @@ -278,6 +280,7 @@ Sources * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) * [Rosetta Code](http://rosettacode.org/) +* Lots and lots of contributors. Thank you all. [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/karan/projects/trend.png)](https://bitdeli.com/free "Bitdeli Badge") From 3b61ba35eb88045a6e0ca3faa0d3bc0ad94a24e9 Mon Sep 17 00:00:00 2001 From: Gaurav Pareek Date: Mon, 14 Apr 2014 11:56:38 +0530 Subject: [PATCH 23/49] Update alarm.py In case of Choice 1 the previous code would play alarm on wrong time. For e.g. current time is 03:40 and users sets alarm for after 150 minutes so it should play alarm on 06:10 but code would play at 5:10 itself. I have edited the code for this condition as well. --- Numbers/alarm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Numbers/alarm.py b/Numbers/alarm.py index 24e0d9e81..2d7be3678 100644 --- a/Numbers/alarm.py +++ b/Numbers/alarm.py @@ -39,7 +39,7 @@ def play(hh, mm): cur_time = list(time.localtime()) # get the time right now hour = cur_time[3] # find the current hour minute = cur_time[4] # and the current minute - hh = (hour + hh_from_now) % 24 # cycle through the clock if hh > 24 + hh = (hour + hh_from_now+(minute+mm_from_now)/60) % 24 # cycle through the clock if hh > 24 mm = (minute + mm_from_now) % 60 # cycle through the clock if mm > 60 play(hh, mm) elif choice == 2: From 5d378c7c49ded576a9dc5f288010fe320927583c Mon Sep 17 00:00:00 2001 From: Gaurav Pareek Date: Mon, 14 Apr 2014 22:52:48 +0530 Subject: [PATCH 24/49] Update piglatin.py The existing program will give wrong output in case of glove or the letters which have more than 1 consonant at starting. I have modified it to give correct output, please let me know if i have missed any test case. --- Text/piglatin.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Text/piglatin.py b/Text/piglatin.py index f5b09251e..37313a6c2 100644 --- a/Text/piglatin.py +++ b/Text/piglatin.py @@ -12,11 +12,26 @@ pig = 'ay' +consonant = [] +count = 0 +copy = [c for c in word] + +for i in range(len(copy) - 1): + count = i + if copy[i] in vowels: + break + else: + consonant.append(copy[i]) + +new = word[count:] + "".join(consonant) + pig + +""" first = word[0] if first in vowels: new = word + pig else: new = word[1:] + first + pig +""" print new From 0e3eb440656d75f540b17db4363b87386da49a95 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 20 Apr 2014 19:49:58 -0300 Subject: [PATCH 25/49] Fixing Ceasar Cipher descriptions by changing all occurrences of 25 to 26. --- README.md | 2 +- Security/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36d76f79f..30a91383a 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ Graphics and Multimedia Security ------------- -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 26. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 26th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 26 keys. =============================================== diff --git a/Security/README.md b/Security/README.md index a654b76c7..3d6941ab5 100644 --- a/Security/README.md +++ b/Security/README.md @@ -1,4 +1,4 @@ Security ------------- -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. \ No newline at end of file +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 26. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 26th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 26 keys. From 86c69ddca9db6b12c685f2334830090845789a24 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Sun, 11 May 2014 09:42:17 -0700 Subject: [PATCH 26/49] Remove bitdeli badge --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 30a91383a..afd482ad6 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,3 @@ Sources * [Rosetta Code](http://rosettacode.org/) * Lots and lots of contributors. Thank you all. - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/karan/projects/trend.png)](https://bitdeli.com/free "Bitdeli Badge") - From 36b52ed4673735a28a5eb6476029fa990541c878 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Tue, 13 May 2014 08:26:36 -0700 Subject: [PATCH 27/49] remove my solutions --- Classes/product_inventory.py | 80 ----------- Classic Algorithms/collatz.py | 29 ---- Numbers/alarm.py | 49 ------- Numbers/binary_decimal.py | 50 ------- Numbers/calc.py | 17 --- Numbers/change.py | 39 ------ Numbers/credit_card_validator.py | 41 ------ Numbers/distance.py | 55 -------- Numbers/factorial.py | 33 ----- Numbers/fibonacci.py | 15 -- Numbers/happy_numbers.py | 40 ------ Numbers/next_prime.py | 25 ---- Numbers/pi.py | 10 -- Numbers/prime.py | 23 --- Numbers/tax.py | 15 -- Numbers/tile.py | 11 -- Numbers/unit.py | 91 ------------ README-scratch.md | 234 ------------------------------- README.md | 100 +++++-------- Text/caesar_cipher.py | 40 ------ Text/count_vowels.py | 19 --- Text/count_words.py | 26 ---- Text/palindrome.py | 12 -- Text/piglatin.py | 37 ----- Text/reverse.py | 11 -- Text/rss.py | 29 ---- Web/page_scraper.py | 33 ----- Web/time.py | 25 ---- 28 files changed, 38 insertions(+), 1151 deletions(-) delete mode 100644 Classes/product_inventory.py delete mode 100644 Classic Algorithms/collatz.py delete mode 100644 Numbers/alarm.py delete mode 100644 Numbers/binary_decimal.py delete mode 100644 Numbers/calc.py delete mode 100644 Numbers/change.py delete mode 100644 Numbers/credit_card_validator.py delete mode 100644 Numbers/distance.py delete mode 100644 Numbers/factorial.py delete mode 100644 Numbers/fibonacci.py delete mode 100644 Numbers/happy_numbers.py delete mode 100644 Numbers/next_prime.py delete mode 100644 Numbers/pi.py delete mode 100644 Numbers/prime.py delete mode 100644 Numbers/tax.py delete mode 100644 Numbers/tile.py delete mode 100644 Numbers/unit.py delete mode 100644 README-scratch.md delete mode 100644 Text/caesar_cipher.py delete mode 100644 Text/count_vowels.py delete mode 100644 Text/count_words.py delete mode 100644 Text/palindrome.py delete mode 100644 Text/piglatin.py delete mode 100644 Text/reverse.py delete mode 100644 Text/rss.py delete mode 100644 Web/page_scraper.py delete mode 100644 Web/time.py diff --git a/Classes/product_inventory.py b/Classes/product_inventory.py deleted file mode 100644 index df1ef1afa..000000000 --- a/Classes/product_inventory.py +++ /dev/null @@ -1,80 +0,0 @@ -""" -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. -""" - -class Product: - - def __init__(self, price, pid, qty): - """ - Class constructor that needs a price, a product id, - and quantity. - """ - self.price = price - self.pid = pid - self.qty = qty - - def update_qty(self, qty, method='add'): - """ - Updates the quantity of produts. By default, adds the - passed quantity. Pass method as 'subtract' to subtract - the quantity. - """ - if method == 'add': - self.qty += qty - elif method == 'subtract': - self.qty = max(0, self.qty - qty) - - def print_product(self): - """ - Prints a single product. - """ - print '%d\t%s\t%.02f each' % (self.pid, self.qty, self.price) - -class Inventory: - - def __init__(self): - """ - Initializes the class instance. - """ - self.products = [] # list to hold all products - - def add(self, product): - """ - Adds a passed Product to the list of products. - """ - self.products.append(product) - - def print_inventory(self): - """ - Prints the current inventory, and the total value - of products. - """ - value = 0 - for product in self.products: - print '%d\t%s\t%.02f each' % (product.pid, - product.qty, - product.price) - value += (product.price * product.qty) - print '\nTotal value: %.02f' % value - -if __name__ == '__main__': - p1 = Product(1.4, 123, 5) - p2 = Product(1, 3432, 100) - p3 = Product(100.4, 2342, 99) - - - i = Inventory() - i.add(p1) - i.add(p2) - i.add(p3) - i.print_inventory() - - p1.update_qty(10) - i.print_inventory() - - p1.update_qty(10, method='subtract') - i.print_inventory() diff --git a/Classic Algorithms/collatz.py b/Classic Algorithms/collatz.py deleted file mode 100644 index 3881ea11e..000000000 --- a/Classic Algorithms/collatz.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -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. -""" - -def main(): - try: - n = int(raw_input('Enter a number: ')) - except ValueError: - print 'Enter only an integer value, n > 1.' - - steps = 0 - - print '\n%d' % n, - - while n > 1: - if n % 2 == 0: - n /= 2 - else: - n = (n * 3) + 1 - steps += 1 - print ' -> %d' % n, - - print '\n\n%d steps take to reach ONE.' % steps - -if __name__ == '__main__': - main() diff --git a/Numbers/alarm.py b/Numbers/alarm.py deleted file mode 100644 index 2d7be3678..000000000 --- a/Numbers/alarm.py +++ /dev/null @@ -1,49 +0,0 @@ -""" -Alarm Clock - A simple clock where it plays a sound after -X number of minutes/seconds or at a particular time. - -Dependencies: -pyglet - pip install pyglet -""" - -import time -import winsound -import pyglet - -def play(hh, mm): - not_alarmed = 1 - - while(not_alarmed): - cur_time = list(time.localtime()) # get the time right now - hour = cur_time[3] # find the hour - minute = cur_time[4] # and the minute - if hour == hh and minute == mm: - song = pyglet.media.load('bin/sound.wav') - song.play() # play the sound - pyglet.app.run() - not_alarmed = 0 # stop the loop - -if __name__ == '__main__': - - print """ - 1. Play sound after X minutes - 2. Play sound at an exact time - """ - choice = input('What do you want to do? ') - - if choice == 1: - mins = input('How many minutes from now? ') - hh_from_now = mins / 60 # if minutes > 60, this will adjust the hours - mm_from_now = mins % 60 # and then the minutes - cur_time = list(time.localtime()) # get the time right now - hour = cur_time[3] # find the current hour - minute = cur_time[4] # and the current minute - hh = (hour + hh_from_now+(minute+mm_from_now)/60) % 24 # cycle through the clock if hh > 24 - mm = (minute + mm_from_now) % 60 # cycle through the clock if mm > 60 - play(hh, mm) - elif choice == 2: - hh = input('What hour do you want to wake up (0-23)? ') - mm = input('What minute do you want to wake up (0-59)? ') - play(hh, mm) - diff --git a/Numbers/binary_decimal.py b/Numbers/binary_decimal.py deleted file mode 100644 index b6846b726..000000000 --- a/Numbers/binary_decimal.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Binary to Decimal and Back Converter -Develop a converter to convert a decimal number to binary -or a binary number to its decimal equivalent. -""" - -def binary_to_decimal(binary): - """ - Converts a binary number into a decimal number. - """ - decimal = 0 - index = 0 - while binary > 0: - last = binary % 10 - binary = binary / 10 - decimal += (last * (2 ** index)) - index += 1 - return decimal - -def decimal_to_binary(decimal): - """ - Converts a decimal number into a binary number. - """ - binary = "" - remainders = [] - while decimal > 0: - remainders.append(str(decimal % 2)) - decimal /= 2 - remainders.reverse() - binary = "".join(remainders) - return 0 if binary == "" else binary - -if __name__ == '__main__': - print """ - 1. Binary to Decimal - 2. Decimal to Binary\n - """ - - choice = input("Make a choice: ") - - if choice == 1: - binary = input("Binary to convert: ") - print "The binary number %d in decimal is %d" % \ - (binary, binary_to_decimal(binary)) - elif choice == 2: - decimal = input("Decimal to convert: ") - print "The decimal number %d in binary is %s" % \ - (decimal, decimal_to_binary(decimal)) - else: - print "Invalid choice" diff --git a/Numbers/calc.py b/Numbers/calc.py deleted file mode 100644 index e6ea5f7f2..000000000 --- a/Numbers/calc.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Calculator - A simple calculator to do basic operators. -""" - -if __name__ == '__main__': - try: - num1 = int(raw_input("Number 1: ")) - num2 = int(raw_input("Number 2: ")) - except: - print 'Invalid input' - else: - op = raw_input("Operation (+, -, /, *): ") - if op not in '+-/*': - print "Invalid operator" - else: - print "%d %s %d = %d" % \ - (num1, op, num2, eval(str(num1) + op + str(num2))) diff --git a/Numbers/change.py b/Numbers/change.py deleted file mode 100644 index 8bce7273e..000000000 --- a/Numbers/change.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -if __name__ == '__main__': - cost = input("What's the cost in dollars? ") - given = input("What's the amount of dollars given? ") - - change = given - cost - - print "\n" - if change < 0: - print "Please ask for $%.2f more from the customer." % (-change) # double negation - else: - print "The change is $%.2f." % change - - q = 0 # 0.25 - d = 0 # 0.10 - n = 0 # 0.05 - p = 0 # 0.01 - - change = int(change * 100) # let's talk about cents - - if change >= 25: - q = int(change / 25) - change = change % 25 - if change >= 10: - d = int(change / 10) - change = change % 10 - if change >= 5: - n = int(change / 5) - change = change % 5 - if change >= 1: - p = change # rest all change is in pennies - - print "Give the following change to the customer:" - print "Quarters: %d\tDimes: %d\tNickels: %d\tPennies: %d" \ - % (q, d, n, p) diff --git a/Numbers/credit_card_validator.py b/Numbers/credit_card_validator.py deleted file mode 100644 index fb4e8fc95..000000000 --- a/Numbers/credit_card_validator.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -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). - -This program works with *most* credit card numbers. - -Uses Luhn Algorithm (http://en.wikipedia.org/wiki/Luhn_algorithm). - -1. From the rightmost digit, which is the check digit, moving -left, double the value of every second digit; if product of this -doubling operation is greater than 9 (e.g., 7 * 2 = 14), then -sum the digits of the products (e.g., 10: 1 + 0 = 1, 14: 1 + 4 = 5). - -2. Add together doubled digits with the undoubled digits from the -original number. - -3. If the total modulo 10 is equal to 0 (if the total ends in zero) -then the number is valid according to the Luhn formula; else it is -not valid. -""" - -if __name__ == '__main__': - number = raw_input('Enter the credit card number of check: ').replace(' ', '') - #if not number.isdigit(): - # raise Exception('Invalid credit card number. Make sure it\'s all digits (with optional spaces in between).' - - digits = [int(char) for char in number] - - # double alternate digits (step 1) - doubled = [(digit * 2) if (i % 2 == 0) else digit \ - for (i, digit) in enumerate(digits)] # i <3 python - # sum digits of number > 10 (step 2) - summed = [num if num < 10 else sum([int(dig) for dig in str(num)]) \ - for num in doubled] # i <3 python ** 2 - # step 3 - if sum(summed) % 10 == 0: - print 'The number is valid' - else: - print 'The number is invalid' diff --git a/Numbers/distance.py b/Numbers/distance.py deleted file mode 100644 index 65cfc9a9b..000000000 --- a/Numbers/distance.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python - -""" -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. - -Uses the Haversine formula -(http://www.movable-type.co.uk/scripts/latlong.html) - -Dependencies: -geopy - pip install geopy -""" - -from geopy import geocoders # to find lat/lon for the city -import math - -R = 6373 # km - -city1 = raw_input('Enter city 1: ') -city2 = raw_input('Enter city 2: ') -unit = raw_input('Enter unit of distance (Enter "K" for KM or "M" for MI): ').lower() - -if unit in 'km': - - g = geocoders.GoogleV3() - - try: - city1, (lat1, lon1) = g.geocode(city1) - city2, (lat2, lon2) = g.geocode(city2) - except: - raise Exception('Unable to locate the citites. Check the city names.') - - # convert decimal locations to radians - lat1 = math.radians(lat1) - lon1 = math.radians(lon1) - lat2 = math.radians(lat2) - lon2 = math.radians(lon2) - - # start haversne formula - dlon = lon2 - lon1 - dlat = lat2 - lat1 - a = (math.sin(dlat/2) ** 2) + math.cos(lat1) * math.cos(lat2) * \ - (math.sin(dlon/2) ** 2) - c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) - d = R * c - - if unit == 'k': - print 'Distance between %s and %s is %.04f km' % (city1, city2, d) - else: - print 'Distance between %s and %s is %.04f mi' % (city1, city2, d / 1.60934) -else: - print 'Invalid unit input!' diff --git a/Numbers/factorial.py b/Numbers/factorial.py deleted file mode 100644 index cd8e753fc..000000000 --- a/Numbers/factorial.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Factorial Finder - 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. -""" - -def fact_loop(n): - """ - Returns the factorial of a given positive, non-zero integer - using loops. - """ - fact = 1 - while n > 0: - fact *= n - n -= 1 - return fact - -def fact_recursion(n): - """ - Returns the factorial of a given positive, non-zero integer - using recursion. - """ - return 1 if n == 0 else n * fact_recursion(n - 1) # if user as ternary operator - -if __name__ == '__main__': - n = input('Enter a positive number: ') - - if n >= 0: - print 'Factorial of %d by loops is %d' % (n, fact_loop(n)) - print 'Factorial of %d by recursion is %d' % (n, fact_recursion(n)) - else: - print 'Not a valid number' diff --git a/Numbers/fibonacci.py b/Numbers/fibonacci.py deleted file mode 100644 index 2c239b48d..000000000 --- a/Numbers/fibonacci.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: cp1252 -*- -# Fibonacci Sequence - Enter a number and have the -# program generate the Fibonacci sequence to that number -# or to the Nth number - -n = int(raw_input('How many numbers do you need? ')) -series = [1] - -while len(series) < n: - if len(series) == 1: - series.append(1) - else: - series.append(series[-1] + series[-2]) - -print series diff --git a/Numbers/happy_numbers.py b/Numbers/happy_numbers.py deleted file mode 100644 index a50f05f92..000000000 --- a/Numbers/happy_numbers.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -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. -""" - -NUMBERS_REQUIRED = 8 # number of happy numbers required - -def is_happy_number(num): - seen = [] - while True: - sum_digits = sum(int(digit) ** 2 for digit in str(num)) - if sum_digits == 1: - return True - elif sum_digits in seen: - return False - else: - num = sum_digits - seen.append(num) - -if __name__ == '__main__': - - happies = [] # list of happy numbers found - - num = input('Start at: ') - - while len(happies) != NUMBERS_REQUIRED: - if is_happy_number(num): - happies.append(num) - num += 1 - - print happies - diff --git a/Numbers/next_prime.py b/Numbers/next_prime.py deleted file mode 100644 index 3d479bd07..000000000 --- a/Numbers/next_prime.py +++ /dev/null @@ -1,25 +0,0 @@ -# Next Prime Number - Have the program find prime -# numbers until the user chooses to stop asking for -# the next one. - -def next_prime(current): - next_prime = current + 1 # start checking for primes 1 number after the current one - i = 2 - while next_prime > i: # check with numbers up to next_prime - 1 - if next_prime % i == 0: # if number is divisible - next_prime += 1 # ready to check the next number - i = 2 # reset i to check divisibility again from 2 - else: - i += 1 # increment the divisor - return next_prime - -if __name__ == '__main__': - current_prime = 2 - while True: - response = raw_input('Do you want the next prime? (Y/N) ') - - if response.lower().startswith('y'): - print current_prime - current_prime = next_prime(current_prime) - else: - break diff --git a/Numbers/pi.py b/Numbers/pi.py deleted file mode 100644 index 027c63e50..000000000 --- a/Numbers/pi.py +++ /dev/null @@ -1,10 +0,0 @@ -# Find PI to the Nth Digit - -from math import * - -digits = raw_input('Enter number of digits to round PI to: ') - -# print ('{0:.%df}' % min(20, int(digits))).format(math.pi) # nested string formatting - -# calculate pi using Machin-like Formula -print ('{0:.%df}' % min(30, int(digits))).format(4 * (4 * atan(1.0/5.0) - atan(1.0/239.0))) diff --git a/Numbers/prime.py b/Numbers/prime.py deleted file mode 100644 index ffa1ea83c..000000000 --- a/Numbers/prime.py +++ /dev/null @@ -1,23 +0,0 @@ -# Prime Factorization - Have the user enter a number -# and find all Prime Factors (if there are any) and -# display them. - - -def is_a_prime(x): - for i in range(2, x): - if x % i == 0: - return False - return True - -# standard boilerplate -if __name__ == '__main__': - n = int(raw_input('Enter the number to find prime factors of: ')) - - factors = [] - - for i in range(2, n + 1): - while n % i == 0: # Thanks @madsulrik - if is_a_prime(i): - factors.append(i) - n /= i - print factors diff --git a/Numbers/tax.py b/Numbers/tax.py deleted file mode 100644 index 76ccf776a..000000000 --- a/Numbers/tax.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python - -TAXES = { - 'WA': 9.5, - 'CA': 7.5, - 'FL': 10.8, - 'OH': 7.8 -} - -state = raw_input('What\'s your state (WA / CA / FL / OH)?: ') -cost = float(raw_input('And the cost?: ')) - -tax = TAXES[state] / 100 * cost - -print 'Cost: %.02f\nTax: %.02f\n----------\nTotal: %.02f' % (cost, tax, cost + tax) \ No newline at end of file diff --git a/Numbers/tile.py b/Numbers/tile.py deleted file mode 100644 index 1b5b23408..000000000 --- a/Numbers/tile.py +++ /dev/null @@ -1,11 +0,0 @@ -# Find Cost of Tile to Cover W x H Floor - 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. - -# Use input as the input can be integer and float -cost = input("What's the cost per sq. feet? ") -width = input("What's the width of the floor? ") -height = input("What's the height of the floor? ") - -print "The total cost is $%.2f for %.2f square feet" \ - % (width * height * cost, width * height) diff --git a/Numbers/unit.py b/Numbers/unit.py deleted file mode 100644 index 383044e99..000000000 --- a/Numbers/unit.py +++ /dev/null @@ -1,91 +0,0 @@ -""" -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. -""" - -from __future__ import division -from urllib2 import urlopen -import json - -# 1 (std unit) = these many units -MULTIPLIERS_TO_STD = { - 'length': { - 'cm': 0.01, - 'm': 1, # std unit - 'km': 1000, - 'mi': 1609.34, - 'ft': 0.3048 - }, - 'temp': { - 'C': 1, # std unit - 'F': 33.8 - } -} - -# These many units = 1 (std unit) -MULTIPLIERS_FROM_STD = { - 'length': { - 'cm': 100, - 'm': 1, # std unit - 'km': 0.001, - 'mi': 0.000621371, - 'ft': 3.28084 - }, - 'temp': { - 'C': 1, # std unit - 'F': -17.2222 - } -} - - -def get_user_input(choice): - units = ', '.join(MULTIPLIERS_TO_STD[choice].keys()) - source_unit = raw_input('\nEnter source unit (%s): ' % units) - source_val = float(raw_input('How many %s\'s? ' % source_unit)) - convert_to = raw_input('Convert to? (%s): ' % units) - return source_unit, source_val, convert_to - -def get_currency(source_unit, source_val, convert_to): - url = 'http://rate-exchange.appspot.com/currency?from=%s&to=%s&q=%s' % ( - source_unit, convert_to, str(source_val)) - content = urlopen(url).read() - return json.loads(content)['v'] - -def main(): - print """Unit Converter - 1. Length - 2. Temperature - 3. Currency""" - - choice = int(raw_input('What do you want to convert: ')) - - if choice == 1: - source_unit, source_val, convert_to = get_user_input('length') - print '%f%s = %f%s' % (source_val, source_unit, - source_val * \ - MULTIPLIERS_TO_STD['length'][source_unit] * \ - MULTIPLIERS_FROM_STD['length'][convert_to], \ - convert_to) - elif choice == 2: - source_unit, source_val, convert_to = get_user_input('temp') - if (source_unit, convert_to) == ('F', 'C'): # F -> C - value = (source_val - 32) * (5/9) - elif (source_unit, convert_to) == ('C', 'F'): # C -> F - value = (source_val * (9/5)) + 32 - else: - value = source_val - print '%f%s = %f%s' % (source_val, source_unit, - value, convert_to) - - elif choice == 3: - source_unit = raw_input('\nEnter source currency (eg USD, INR etc): ') - source_val = float(raw_input('How many %s\'s? ' % source_unit)) - convert_to = raw_input('Convert to? (eg USD, INR etc): ') - print '%f%s = %f%s' % (source_val, source_unit, - get_currency(source_unit, source_val, convert_to), - convert_to) - -if __name__ == '__main__': - main() diff --git a/README-scratch.md b/README-scratch.md deleted file mode 100644 index 9be6373b3..000000000 --- a/README-scratch.md +++ /dev/null @@ -1,234 +0,0 @@ -Mega Project List -======== - -Numbers ---------- - -**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. - -**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. - -**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. - -**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. - -**Find Cost of Tile to Cover W x H Floor** - 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. - -**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. - -**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. - -**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. - -**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. - -**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. - -**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. - -**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. - -**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). - -**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. - -**Factorial Finder** - 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. - -**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. - -**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. Display an example of your output here. Find first 8 happy numbers. - -**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).* - -**Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. - -Classic Algorithms ------------------ - -**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. - -**Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. - -**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. - -**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). - - -Graph --------- -**Graph from links** - Create a program that will create a graph or network from a series of links. - -**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. - -**Connected Graph** - Create a program which takes a graph as an input and outputs whether every node is connected or not. - -**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. - -Data Structures ---------- - -**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. - - -Text ---------- - -**Reverse a String** - Enter a string and the program will reverse it and print it out. - -**Pig Latin** - 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. - -**Count Vowels** - 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. - -**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” - -**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. - -**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* - -**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. - -**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* - -**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* - -**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* - -**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. - -**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. - -**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. *Optional: Suggest places you can get it (link to Amazon page?).* - -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](http://daringfireball.net/projects/markdown/syntax).* - -**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 expression against the source text and return any matches or flag errors in the regular expression. - -Networking ---------- - -**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. - -**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. - -**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. - -**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 at a given interval. - -**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* - -**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. - -**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. - -Classes ---------- - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -Threading ---------- - -**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. - -**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. - -Web ---------- - -**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* - -**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. - -**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* - -**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. - -**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* - -**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. - -**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. - -**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* - -**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. - -**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. - -Files ---------- - -**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. - -**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. - -**Sort Excel/CSV File 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. - -**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* - -**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. *Optional: Deploy on GAE or Heroku if possible.* - -**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. - -**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. *Optional: For extra practice try adding syntax highlighting based on the language.* - -Databases ---------- - -**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. - -**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. - -**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. - -**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* - -**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. *Optional: 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.* - -**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. - -**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. - -**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. - -Graphics and Multimedia ---------- - -**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* - -**Stream Video from Online** - Try to create your own online streaming video player. - -**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. - -**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. *Optional: Use threading to process multiple images simultaneously.* - -**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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* - -Security -------------- - -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. - -=============================================== - -Sources -======= - -* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) diff --git a/README.md b/README.md index afd482ad6..4e14db857 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,21 @@ Mega Project List ======== -A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has it's own folder. +A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has it's own folder. + +To get started, simply fork this repo. -#### [RECOGNITION](https://github.com/thekarangoel/Projects/tree/master/RECOGNITION) +## [CONTRIBUTING](https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md) -Ever since this repo was created, it has been in the top list on GH. Be it the daily or weekly list! This repo is in the top 5 on GitHub on [July 14 2013](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-2013-07-14.png). (And again on [July 22, 2013](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-2013-07-22%2013_10_30.png), and again on [July 23, 2013](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-2013-07-23.png).) And on [weekly](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-weekly-2013-07-22.png) [list](https://github.com/thekarangoel/Projects/blob/master/RECOGNITION/top5-weekly-2013-07-23.png) during the week of July 2013. In the last week of July, *Projects* was in the monthly top list on GH. +See ways of [contributing](https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md) to this repo. You can contribute **solutions** (will be published in this [repo](https://github.com/thekarangoel/Projects-Solutions)) to existing problems, **add new projects** or remove existing ones. Make sure you follow all instructions properly. -![July 25, 2013](https://raw.github.com/thekarangoel/Projects/master/RECOGNITION/top5-monthly-2013-07-25.png) -=============================== +## [Solutions](https://github.com/thekarangoel/Projects-Solutions) -### [CONTRIBUTING](https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md) +You can find implementations of these projects in many other languages by other users in [this repo](https://github.com/thekarangoel/Projects-Solutions). -See ways of [contributing](https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md) to this repo. You can contribute solutions (will be published in this [repo](https://github.com/thekarangoel/Projects-Solutions)) to existing problems, add new projects or remove existing ones. Make sure you follow all instructions properly. -================================ - -### [Solutions](https://github.com/thekarangoel/Projects-Solutions) - -You can find implementations of these projects in many other languages by other users in this [repo](https://github.com/thekarangoel/Projects-Solutions). - -================================ - -### Donations +## Donations If *Projects* has helped you in any way, and you'd like to help the developer, please consider donating. @@ -35,57 +27,42 @@ If *Projects* has helped you in any way, and you'd like to help the developer, p ================================ -Some details about this repo: - -* I will use Python to solve these. Why? Because I want to learn the language quickly. -* I have no interest in making games, so I'm excluding those from the list below. -* I'm not interested in networking, so I *might* skip all (or some) of them. -* The projects will not be made in the order posted. -* I may not be able to complete all of them. -* My method of solving them may not be the best. If you do not like my algorithm(s), please add a comment for the file/commit or open an issue, and I'll try to improve. - -I will link to each project that I complete. Some will be in this same repo, some bigger ones will have dedicated repos. - -To get started, fork this repo, delete this README and rename [*README-scratch.md*](https://github.com/thekarangoel/Projects/blob/master/README-scratch.md) to *README.md*. - -=============================== - Numbers --------- -[**Find PI to the Nth Digit**](https://github.com/thekarangoel/Projects/blob/master/Numbers/pi.py) - 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. +**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. -[**Fibonacci Sequence**](https://github.com/thekarangoel/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. +**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. -[**Prime Factorization**](https://github.com/thekarangoel/Projects/blob/master/Numbers/prime.py) - Have the user enter a number and find all Prime Factors (if there are any) and display them. +**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. -[**Next Prime Number**](https://github.com/thekarangoel/Projects/blob/master/Numbers/next_prime.py) - Have the program find prime numbers until the user chooses to stop asking for the next one. +**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. -[**Find Cost of Tile to Cover W x H Floor**](https://github.com/thekarangoel/Projects/blob/master/Numbers/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. +**Find Cost of Tile to Cover W x H Floor** - 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. **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. -[**Change Return Program**](https://github.com/thekarangoel/Projects/blob/master/Numbers/change.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. +**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. -[**Binary to Decimal and Back Converter**](https://github.com/thekarangoel/Projects/blob/master/Numbers/binary_decimal.py) - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. +**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. -[**Calculator**](https://github.com/thekarangoel/Projects/blob/master/Numbers/calc.py) - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. +**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. -[**Unit Converter (temp, currency, volume, mass and more)**](https://github.com/thekarangoel/Projects/blob/master/Numbers/unit.py) - 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. +**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. -[**Alarm Clock**](https://github.com/thekarangoel/Projects/blob/master/Numbers/alarm.py) - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. +**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. -[**Distance Between Two Cities**](https://github.com/thekarangoel/Projects/blob/master/Numbers/distance.py) - 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. +**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. -[**Credit Card Validator**](https://github.com/thekarangoel/Projects/blob/master/Numbers/credit_card_validator.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). +**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). -[**Tax Calculator**](https://github.com/karan/Projects/blob/master/Numbers/tax.py) - 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. +**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. -[**Factorial Finder**](https://github.com/thekarangoel/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. +**Factorial Finder** - 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. **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. -[**Happy Numbers**](https://github.com/thekarangoel/Projects/blob/master/Numbers/happy_numbers.py) - 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. +**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. Display an example of your output here. Find first 8 happy numbers. **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).* @@ -94,7 +71,7 @@ Numbers Classic Algorithms ----------------- -[**Collatz Conjecture**](https://github.com/thekarangoel/Projects/blob/master/Classic%20Algorithms/collatz.py) - 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. +**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. **Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. @@ -102,9 +79,9 @@ Classic Algorithms **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). -Graphs ---------- +Graph +-------- **Graph from links** - Create a program that will create a graph or network from a series of links. **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. @@ -118,22 +95,23 @@ Data Structures **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. + Text --------- -[**Reverse a String**](https://github.com/thekarangoel/Projects/blob/master/Text/reverse.py) - Enter a string and the program will reverse it and print it out. +**Reverse a String** - Enter a string and the program will reverse it and print it out. -[**Pig Latin**](https://github.com/thekarangoel/Projects/blob/master/Text/piglatin.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. +**Pig Latin** - 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. -[**Count Vowels**](https://github.com/thekarangoel/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. +**Count Vowels** - 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. -[**Check if Palindrome**](https://github.com/thekarangoel/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” +**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” -[**Count Words in a String**](https://github.com/thekarangoel/Projects/blob/master/Text/count_words.py) - Counts the number of individual words in a string and display the top 5/10 most used words. +**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. **Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* -[**RSS Feed Creator**](https://github.com/thekarangoel/Projects/blob/master/Text/rss.py) - Given a link to RSS/Atom Feed, get all posts and display them. +**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. **Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* @@ -171,7 +149,7 @@ Networking Classes --------- -[**Product Inventory Project**](https://github.com/thekarangoel/Projects/blob/master/Classes/product_inventory.py) - 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. +**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. **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. @@ -199,15 +177,15 @@ Threading Web --------- -[**Page Scraper**](https://github.com/thekarangoel/Projects/blob/master/Web/page_scraper.py) - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* +**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* **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. **Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* -[**Get Atomic Time from Internet Clock**](https://github.com/thekarangoel/Projects/blob/master/Web/time.py) - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. +**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. -[**Fetch Current Weather**](https://github.com/thekarangoel/GAE-weather) - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* +**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* **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. @@ -271,7 +249,7 @@ Graphics and Multimedia Security ------------- -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 26. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 26th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 26 keys. +**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. =============================================== @@ -280,5 +258,3 @@ Sources * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) * [Rosetta Code](http://rosettacode.org/) -* Lots and lots of contributors. Thank you all. - diff --git a/Text/caesar_cipher.py b/Text/caesar_cipher.py deleted file mode 100644 index 5e2698679..000000000 --- a/Text/caesar_cipher.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Caesar Cipher - Enter the cipher number and the program will "encrypt" them with -the Caesar cipher (a.k.a. ROT #). Type the word "exit" when you're finished. -""" - -while True: - try: - cipher = int(raw_input("Enter the cipher number: ")) - break - except ValueError: - print "I need a valid integer, please." - -print "Enter the text to be encoded." -print "Enter \"exit\" to leave." - -if __name__ == '__main__': - while True: - text = raw_input("> ") - encoded = [] - - if text.lower() == "exit": - break - - for letter in text: - if letter.isalpha(): - is_upper = False - - if letter == letter.upper(): - is_upper = True - letter = letter.lower() - - value = (ord(letter) - 97 + cipher) % 26 - if is_upper: - value -= 32 - - encoded.append(chr(value + 97)) - else: - encoded.append(letter) - - print ''.join(encoded) diff --git a/Text/count_vowels.py b/Text/count_vowels.py deleted file mode 100644 index fe55626f1..000000000 --- a/Text/count_vowels.py +++ /dev/null @@ -1,19 +0,0 @@ -""" -Count Vowels - 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. -""" - -from collections import defaultdict - -if __name__ == '__main__': - string = raw_input('Enter a string: ').lower() - - vowels = ['a', 'e', 'i', 'o', 'u'] - counts = defaultdict(int) - - for char in string: - if char in vowels: - counts[char] += 1 - - print counts.items() diff --git a/Text/count_words.py b/Text/count_words.py deleted file mode 100644 index afe0daccc..000000000 --- a/Text/count_words.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Count Words in a String - Counts the number of individual -words in a string and display the top 5/10 most used words. -""" - -from collections import defaultdict -import operator - -if __name__ == '__main__': - text = raw_input('Enter some text: \n') - words = text.split() # very naive approach, split at space - - counts = defaultdict(int) # no need to check existence of a key - - # find count of each word - for word in words: - counts[word] += 1 - - # sort the dict by the count of each word, returns a tuple (word, count) - sorted_counts = sorted(counts.iteritems(), \ - key=operator.itemgetter(1), \ - reverse=True) - - # print top 5 words - for (word,count) in sorted_counts[:5]: # thanks @jrwren for this! - print (word, count) diff --git a/Text/palindrome.py b/Text/palindrome.py deleted file mode 100644 index 8e9cf3a38..000000000 --- a/Text/palindrome.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -Check if Palindrome - Checks if the string entered -by the user is a palindrome. That is that it reads -the same forwards as backwards like "racecar" -""" - -string = raw_input('Enter a string: ').lower() - -if string == string[::-1]: - print '%s is a palindrome' % string -else: - print '%s is not a palindrome' % string diff --git a/Text/piglatin.py b/Text/piglatin.py deleted file mode 100644 index 37313a6c2..000000000 --- a/Text/piglatin.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Pig Latin - 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. -""" - -word = raw_input('What\'s your word? ').lower() -vowels = 'aeiou' - -pig = 'ay' - -consonant = [] -count = 0 -copy = [c for c in word] - -for i in range(len(copy) - 1): - count = i - if copy[i] in vowels: - break - else: - consonant.append(copy[i]) - -new = word[count:] + "".join(consonant) + pig - -""" -first = word[0] - -if first in vowels: - new = word + pig -else: - new = word[1:] + first + pig -""" - -print new diff --git a/Text/reverse.py b/Text/reverse.py deleted file mode 100644 index 3a1296545..000000000 --- a/Text/reverse.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: cp1252 -*- -""" -Reverse a String - Enter a string and the program -will reverse it and print it out. -""" - -string = raw_input("Whatchu wanna say to me? ") -copy = [c for c in string] -for i in range(len(copy) / 2): - copy[i], copy[len(copy) - i - 1] = copy[len(copy) - i - 1], copy[i] -print "You say %s, I say %s" % (string, ''.join(copy)) diff --git a/Text/rss.py b/Text/rss.py deleted file mode 100644 index 25f8c8f1d..000000000 --- a/Text/rss.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -RSS Feed Creator - Given a link to RSS/Atom Feed, -get all posts and display them. -""" - -import re -import urllib2 - - -def main(): - """ - Takes in a Feedburned feed URL. - - Eg: http://feeds.feedburner.com/WebDesignLedger - """ - feed_url = raw_input('Enter Feedburner RSS URL: ') - content = urllib2.urlopen(feed_url).read() # get the source code of feed - - link_pattern = re.compile('(.*)') - title_pattern = re.compile('(.*)') - - links = re.findall(link_pattern, content)[1:] # skip blog url - titles = re.findall(title_pattern, content)[1:] # skip the page title - - for (link, title) in zip(links, titles): - print '{0}\n{1}\n'.format(title, link) - -if __name__ == '__main__': - main() diff --git a/Web/page_scraper.py b/Web/page_scraper.py deleted file mode 100644 index ccfd191fa..000000000 --- a/Web/page_scraper.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: cp1252 -*- -""" -Page Scraper - Create an application which connects to a -site and pulls out all links, or images, and saves them to -a list. Optional: Organize the indexed content and don�t -allow duplicates. Have it put the results into an easily -searchable index file. -""" - -import urllib2 -from bs4 import BeautifulSoup - - -def print_list(stuff): - print '\n'.join(stuff) - print '\n====================\n' - -if __name__ == '__main__': - - url = raw_input('Enter a URL: ') - - choice = input('What to scrape?\n1. Links\n2. Images\n3. Both\n') - - soup = BeautifulSoup(urllib2.urlopen(url).read()) - - if choice == 1 or choice == 3: - urls = [link.get('href') for link in soup.findAll('a')] - print 'URLs:' - print_list(urls) - if choice == 2 or choice ==3: - images = [image['src'] for image in soup.findAll("img")] - print 'Images:' - print_list(images) diff --git a/Web/time.py b/Web/time.py deleted file mode 100644 index 073d75f47..000000000 --- a/Web/time.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -Get Atomic Time from Internet Clock - This program will get -the true atomic time from an atomic time clock on the Internet. -Use any one of the atomic clocks returned by a simple Google search. -""" - -import re -from urllib2 import urlopen - - -def main(): - url = 'http://time.is/just' - content = urlopen(url).read() - pattern = re.compile('
(.*)(AM|PM)
') - - find_match = re.search(pattern, content) - - location_pat = re.compile('

(.*)

') - location_match = re.search(location_pat, content) - - print 'The time in %s is %s %s' % \ - (location_match.group(1), find_match.group(1), find_match.group(2)) - -if __name__ == '__main__': - main() From 76cfa898a99e4eadf9750ea11b03abf05bc66000 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Tue, 13 May 2014 08:27:44 -0700 Subject: [PATCH 28/49] update contributing instructions --- CONTRIBUTING.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 153e83ed4..19b982301 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,14 +22,13 @@ Please **do not send pull requests for replacing my code**. If you'd like to con - Save/Commit the README.md file. - Send a pull request for this commit ONLY - ie, the commit to the [solutions repo](https://github.com/thekarangoel/Projects-Solutions)! - -===================================== + ## Projects If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/thekarangoel/Projects/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes. If you add a problem, make sure you add it in the correct category. -It is required that any changes made to the projects (this does not include adding solutions) in *README.md*, must be reflected in *README-scratch.md*, in *README.md* file in the relevant category folder, and in the [Solutions *README.md* file](https://github.com/thekarangoel/Projects-Solutions/blob/master/README.md) +It is required that any changes made to the projects (this does not include adding solutions) in *README.md*, must be reflected in *README.md* file in the relevant **category folder**, and in the [Solutions *README.md* file](https://github.com/thekarangoel/Projects-Solutions/blob/master/README.md) If you're copying a project from some other webpage, you **MUST** link to it in the *Sources* section at the bottom of repo's *README.md* and *README-scratch.md*. From 219abb0540a1d472488320696725583e473e1951 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 11 Jun 2014 07:06:31 -0700 Subject: [PATCH 29/49] remove btc as a way of donation --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4e14db857..738dcf17a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ Mega Project List ======== -A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has it's own folder. - +A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has it's own folder. + To get started, simply fork this repo. ## [CONTRIBUTING](https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md) @@ -14,13 +14,10 @@ See ways of [contributing](https://github.com/thekarangoel/Projects/blob/master/ You can find implementations of these projects in many other languages by other users in [this repo](https://github.com/thekarangoel/Projects-Solutions). - ## Donations If *Projects* has helped you in any way, and you'd like to help the developer, please consider donating. -**- BTC: [19dLDL4ax7xRmMiGDAbkizh6WA6Yei2zP5](http://i.imgur.com/bAQgKLN.png)** - **- Gittip: [https://www.gittip.com/karan/](https://www.gittip.com/karan/)** **- Flattr: [https://flattr.com/profile/thekarangoel](https://flattr.com/profile/thekarangoel)** From 3d804d724969a803b3fb62df6c53d40ef6327543 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 11 Jun 2014 07:07:10 -0700 Subject: [PATCH 30/49] remove folders to simply structure --- Classes/README.md | 20 --------------- Classic Algorithms/README.md | 10 -------- Data Structures/README.md | 4 --- Databases/README.md | 18 ------------- Files/README.md | 16 ------------ Graphics and Multimedia/README.md | 12 --------- Graphs/README.md | 10 -------- Networking/README.md | 16 ------------ Numbers/README.md | 42 ------------------------------- Security/README.md | 4 --- Text/README.md | 32 ----------------------- Threading/README.md | 6 ----- Web/README.md | 22 ---------------- 13 files changed, 212 deletions(-) delete mode 100644 Classes/README.md delete mode 100644 Classic Algorithms/README.md delete mode 100644 Data Structures/README.md delete mode 100644 Databases/README.md delete mode 100644 Files/README.md delete mode 100644 Graphics and Multimedia/README.md delete mode 100644 Graphs/README.md delete mode 100644 Networking/README.md delete mode 100644 Numbers/README.md delete mode 100644 Security/README.md delete mode 100644 Text/README.md delete mode 100644 Threading/README.md delete mode 100644 Web/README.md diff --git a/Classes/README.md b/Classes/README.md deleted file mode 100644 index 1e45760a8..000000000 --- a/Classes/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Classes ---------- - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. - -**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. \ No newline at end of file diff --git a/Classic Algorithms/README.md b/Classic Algorithms/README.md deleted file mode 100644 index bd88e10d6..000000000 --- a/Classic Algorithms/README.md +++ /dev/null @@ -1,10 +0,0 @@ -Classic Algorithms ------------------ - -**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. - -**Sorting** - Implement two types of sorting algorithms: Merge sort and bubble sort. - -**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. - -**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). diff --git a/Data Structures/README.md b/Data Structures/README.md deleted file mode 100644 index ec861fe6a..000000000 --- a/Data Structures/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Data Structures ---------- - -**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. \ No newline at end of file diff --git a/Databases/README.md b/Databases/README.md deleted file mode 100644 index 48fe04a91..000000000 --- a/Databases/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Databases ---------- - -**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. - -**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. - -**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. - -**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. *Optional: Allow the application to create re-occurrence events that reoccur every day, week, month, year etc.* - -**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. *Optional: 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.* - -**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. - -**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. - -**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. \ No newline at end of file diff --git a/Files/README.md b/Files/README.md deleted file mode 100644 index b564c730b..000000000 --- a/Files/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Files ---------- - -**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. - -**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. - -**Sort Excel/CSV File 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. - -**Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* - -**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. *Optional: Deploy on GAE or Heroku if possible.* - -**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. - -**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. *Optional: For extra practice try adding syntax highlighting based on the language.* \ No newline at end of file diff --git a/Graphics and Multimedia/README.md b/Graphics and Multimedia/README.md deleted file mode 100644 index f104dac4c..000000000 --- a/Graphics and Multimedia/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Graphics and Multimedia ---------- - -**Slide Show** - Make an application that shows various pictures in a slide show format. *Optional: Try adding various effects like fade in/out, star wipe and window blinds transitions.* - -**Stream Video from Online** - Try to create your own online streaming video player. - -**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. - -**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. *Optional: Use threading to process multiple images simultaneously.* - -**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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* \ No newline at end of file diff --git a/Graphs/README.md b/Graphs/README.md deleted file mode 100644 index 759d41453..000000000 --- a/Graphs/README.md +++ /dev/null @@ -1,10 +0,0 @@ -Graphs ------- - -**Graph from links** - Create a program that will create a graph or network from a series of links. - -**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. - -**Connected Graph** - Create a program which takes a graph as an input and outputs whether every node is connected or not. - -**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. diff --git a/Networking/README.md b/Networking/README.md deleted file mode 100644 index 81565e25e..000000000 --- a/Networking/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Networking ---------- - -**FTP Program** - A file transfer program which can transfer files back and forth from a remote web sever. - -**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. - -**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. - -**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 at a given interval. - -**Country from IP Lookup** - Enter an IP address and find the country that IP is registered in. *Optional: Find the Ip automatically.* - -**Whois Search Tool** - Enter an IP or host address and have it look it up through whois and return the results to you. - -**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. \ No newline at end of file diff --git a/Numbers/README.md b/Numbers/README.md deleted file mode 100644 index 2253abd86..000000000 --- a/Numbers/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Numbers ---------- - -**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. - -**Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. - -**Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. - -**Next Prime Number** - Have the program find prime numbers until the user chooses to stop asking for the next one. - -**Find Cost of Tile to Cover W x H Floor** - 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. - -**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. - -**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. - -**Binary to Decimal and Back Converter** - Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. - -**Calculator** - A simple calculator to do basic operators. Make it a scientific calculator for added complexity. - -**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. - -**Alarm Clock** - A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. - -**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. - -**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). - -**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. - -**Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. - -**Factorial Finder** - 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. - -**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. - -**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. Display an example of your output here. Find first 8 happy numbers. - -**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).* - -**Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. diff --git a/Security/README.md b/Security/README.md deleted file mode 100644 index 3d6941ab5..000000000 --- a/Security/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Security -------------- - -**Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 26. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 26th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 26 keys. diff --git a/Text/README.md b/Text/README.md deleted file mode 100644 index 48916ccae..000000000 --- a/Text/README.md +++ /dev/null @@ -1,32 +0,0 @@ -Text ---------- - -**Reverse a String** - Enter a string and the program will reverse it and print it out. - -**Pig Latin** - 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. - -**Count Vowels** - 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. - -**Check if Palindrome** - Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” - -**Count Words in a String** - Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. - -**Text Editor** - Notepad style application that can open, edit, and save text documents. *Optional: Add syntax highlighting and other features.* - -**RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. - -**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* - -**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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* - -**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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* - -**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. - -**Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. - -**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. *Optional: Suggest places you can get it (link to Amazon page?).* - -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](http://daringfireball.net/projects/markdown/syntax).* - -**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 expression against the source text and return any matches or flag errors in the regular expression. \ No newline at end of file diff --git a/Threading/README.md b/Threading/README.md deleted file mode 100644 index 17fdcd043..000000000 --- a/Threading/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Threading ---------- - -**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. - -**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. \ No newline at end of file diff --git a/Web/README.md b/Web/README.md deleted file mode 100644 index cba41d524..000000000 --- a/Web/README.md +++ /dev/null @@ -1,22 +0,0 @@ -Web ---------- - -**Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* - -**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. - -**Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* - -**Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. - -**Fetch Current Weather** - Get the current weather for a given zip/postal code. *Optional: Try locating the user automatically.* - -**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. - -**E-Card Generator** - Make a site that allows people to generate their own little e-cards and send them to other people. Do not use Flash. Use a picture library and perhaps insightful mottos or quotes. - -**Content Management System** - Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small. *Optional: Allow for the addition of modules/addons.* - -**Web Board (Forum)** - Create a forum for you and your buddies to post, administer and share thoughts and ideas. - -**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. \ No newline at end of file From 7a098a3d9cb4f59e712e07c953d633d24c84ee41 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 11 Jun 2014 07:08:06 -0700 Subject: [PATCH 31/49] update steps for contributing --- CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 19b982301..482a7924a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,14 +22,12 @@ Please **do not send pull requests for replacing my code**. If you'd like to con - Save/Commit the README.md file. - Send a pull request for this commit ONLY - ie, the commit to the [solutions repo](https://github.com/thekarangoel/Projects-Solutions)! - + ## Projects If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/thekarangoel/Projects/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes. If you add a problem, make sure you add it in the correct category. -It is required that any changes made to the projects (this does not include adding solutions) in *README.md*, must be reflected in *README.md* file in the relevant **category folder**, and in the [Solutions *README.md* file](https://github.com/thekarangoel/Projects-Solutions/blob/master/README.md) +It is required that any changes made to the projects (this does not include adding solutions) in *README.md*, must be reflected in the [Solutions *README.md* file](https://github.com/thekarangoel/Projects-Solutions/blob/master/README.md) If you're copying a project from some other webpage, you **MUST** link to it in the *Sources* section at the bottom of repo's *README.md* and *README-scratch.md*. - -If you skip any step(s), I will not merge the changes! From 1aa5440698ed1ab99319b6717cf74a83b95e82ba Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 11 Jun 2014 07:13:36 -0700 Subject: [PATCH 32/49] remove absurdly hard projects, move sources to separate file --- README.md | 32 +++++++++++--------------------- sources.md | 5 +++++ 2 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 sources.md diff --git a/README.md b/README.md index 738dcf17a..31f9f4eb5 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Numbers **Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. + Classic Algorithms ----------------- @@ -79,6 +80,7 @@ Classic Algorithms Graph -------- + **Graph from links** - Create a program that will create a graph or network from a series of links. **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. @@ -87,6 +89,7 @@ Graph **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. + Data Structures --------- @@ -110,22 +113,15 @@ Text **RSS Feed Creator** - Given a link to RSS/Atom Feed, get all posts and display them. -**Post it Notes Program** - A program where you can add text reminders and post them. *Optional: You can have the program also add popup reminders.* - **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. For CLI, show whether the stock has moved up or down. *Optional: If GUI, the program can show green up and red down arrows to show which direction the stock value has moved.* **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. *Optional: Deploy it on Google App Engine or Heroku or any other PaaS (if possible, of course).* -**Fortune Teller (Horoscope)** - A program that checks your horoscope on various astrology sites and puts them together for you each day. - **Vigenere / Vernam / Ceasar Ciphers** - Functions for encrypting and decrypting data messages. Then send them to a friend. -**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. *Optional: Suggest places you can get it (link to Amazon page?).* - -**Markdown to HTML Converter** - Converts Markdown formatted text into HTML files. Implement basic tags like `p`, `strong`, `em` etc. *Optional: Implement all tags from [Markdown Syntax Docs](http://daringfireball.net/projects/markdown/syntax).* - **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 expression against the source text and return any matches or flag errors in the regular expression. + Networking --------- @@ -143,6 +139,7 @@ Networking **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. + Classes --------- @@ -164,6 +161,7 @@ Classes **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. + Threading --------- @@ -171,13 +169,12 @@ Threading **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. + Web --------- **Page Scraper** - Create an application which connects to a site and pulls out all links, or images, and saves them to a list. *Optional: Organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.* -**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. - **Online White Board** - Create an application which allows you to draw pictures, write notes and use various colors to flesh out ideas for projects. *Optional: Add feature to invite friends to collaborate on a white board online.* **Get Atomic Time from Internet Clock** - This program will get the true atomic time from an atomic time clock on the Internet. Use any one of the atomic clocks returned by a simple Google search. @@ -194,13 +191,12 @@ Web **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. + Files --------- **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. -**File Explorer** - Create your own simple windows explorer program. Add feature(s) you always thought are missing from MS Windows Explorer or Mac Finder. - **Sort Excel/CSV File 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. **Create Zip File Maker** - The user enters various files from different directories and the program zips them up into a zip file. *Optional: Apply actual compression to the files. Start with Huffman Algorithm.* @@ -211,6 +207,7 @@ Files **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. *Optional: For extra practice try adding syntax highlighting based on the language.* + Databases --------- @@ -224,12 +221,11 @@ Databases **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. *Optional: 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.* -**Address Book** - Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. - **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. **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. + Graphics and Multimedia --------- @@ -243,15 +239,9 @@ Graphics and Multimedia **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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* + Security ------------- **Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. -=============================================== - -Sources -======= - -* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) diff --git a/sources.md b/sources.md new file mode 100644 index 000000000..efb517dca --- /dev/null +++ b/sources.md @@ -0,0 +1,5 @@ +Sources +======= + +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) From 15222e9acc59ff5059800b8b54f618d96dc4cd05 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Thu, 12 Jun 2014 15:25:46 -0700 Subject: [PATCH 33/49] move sources back to readme --- README.md | 6 ++++++ sources.md | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 sources.md diff --git a/README.md b/README.md index 31f9f4eb5..43bd038fc 100644 --- a/README.md +++ b/README.md @@ -245,3 +245,9 @@ Security **Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. + +Sources +======= + +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) diff --git a/sources.md b/sources.md deleted file mode 100644 index efb517dca..000000000 --- a/sources.md +++ /dev/null @@ -1,5 +0,0 @@ -Sources -======= - -* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) From 34bca5b79b82f302781a89f4a4f8e3f3b994b2db Mon Sep 17 00:00:00 2001 From: Aaron Schumacher Date: Fri, 13 Jun 2014 15:19:48 -0400 Subject: [PATCH 34/49] typo: "form" -> "from" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43bd038fc..3a607e079 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Web Files --------- -**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. +**Quiz Maker** - Make an application which takes various questions from 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. **Sort Excel/CSV File 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. From d56420a7b7a4f5721e980985a8895e3b039ccb23 Mon Sep 17 00:00:00 2001 From: Wasim Sandhu Date: Mon, 7 Jul 2014 02:17:51 -0700 Subject: [PATCH 35/49] Added new Graphics and Multimedia project This is something that's been on my list for a while. I will work on a solution pronto. :+1: --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3a607e079..cfe670b09 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,8 @@ Graphics and Multimedia **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. Do a search online for "Turtle Graphics" for more information. *Optional: Allow the program to read in the list of commands from a file.* +**GIF Creator** A program that puts together multiple images (PNGs, JPGs, TIFFs) to make a smooth GIF that can be exported. *Optional: Make the program convert small video files to GIFs as well.* + Security ------------- From d44d05ea62043fa3b62d5996483b24f6c877615b Mon Sep 17 00:00:00 2001 From: bhainesva Date: Sat, 9 Aug 2014 20:20:46 -0400 Subject: [PATCH 36/49] Corrects it's to its --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cfe670b09..5430bce14 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Mega Project List ======== -A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has it's own folder. +A list of practical projects that anyone can solve in any programming language (See [solutions](https://github.com/thekarangoel/Projects-Solutions)). These projects are divided in multiple categories, and each category has its own folder. To get started, simply fork this repo. From 3627cf44c1d4a33373c8c88e03b5e072fcda1357 Mon Sep 17 00:00:00 2001 From: vdrey Date: Tue, 19 Aug 2014 20:34:25 -0400 Subject: [PATCH 37/49] Update Readme.md Added more layers to the mortgage calculator problem. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5430bce14..cd1d1f5d0 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Numbers **Find Cost of Tile to Cover W x H Floor** - 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. -**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. +**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. For added complexity, add an option for users to select the compounding interval (Monthly, Weekly, Daily, Continually). **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. From 22dd3c466d357ef7454a93ce9dd51be0d493750d Mon Sep 17 00:00:00 2001 From: vdrey Date: Mon, 25 Aug 2014 20:15:31 -0400 Subject: [PATCH 38/49] Update Readme.md Added Find e to the Nth Digit. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cd1d1f5d0..faed0bc94 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Numbers **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. +**Find e to the Nth Digit** - Just like the previous problem, but with e instead of PI. Enter a number and have the program generate e up to that many decimal places. Keep a limit to how far the program will go. + **Fibonacci Sequence** - Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. **Prime Factorization** - Have the user enter a number and find all Prime Factors (if there are any) and display them. From 3375fc3ddbd4a57a9dc17be5fec2350de2bde6dc Mon Sep 17 00:00:00 2001 From: vdrey Date: Tue, 26 Aug 2014 19:24:05 -0400 Subject: [PATCH 39/49] Added Limit Calculator Project --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index faed0bc94..4e052051b 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ Numbers **Coin Flip Simulation** - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads. +**Limit Calculator** - Ask the user to enter f(x) and the limit value, then return the value of the limit statement *Optional: Make the calculator capable of supporting infinite limits.* + Classic Algorithms ----------------- From 3454679dc2d78d785223734414759fa2765a689c Mon Sep 17 00:00:00 2001 From: Lovekesh garg Date: Mon, 17 Nov 2014 00:54:09 +0530 Subject: [PATCH 40/49] adding the fast expo. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4e052051b..5f6ae5d9a 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Numbers **Limit Calculator** - Ask the user to enter f(x) and the limit value, then return the value of the limit statement *Optional: Make the calculator capable of supporting infinite limits.* +**Fast Exponentiation** - Ask the user to enter 2 integers a and b and output a^b (i.e. pow(a,b)) in O(lg n) time complexity.* Classic Algorithms ----------------- From 4879fab6aa0c5235c21a9587cb25fbcfe77d1192 Mon Sep 17 00:00:00 2001 From: Lovekesh garg Date: Mon, 17 Nov 2014 00:56:10 +0530 Subject: [PATCH 41/49] Readme Updates typo errors corrected --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f6ae5d9a..21fdea112 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Numbers **Limit Calculator** - Ask the user to enter f(x) and the limit value, then return the value of the limit statement *Optional: Make the calculator capable of supporting infinite limits.* -**Fast Exponentiation** - Ask the user to enter 2 integers a and b and output a^b (i.e. pow(a,b)) in O(lg n) time complexity.* +**Fast Exponentiation** - Ask the user to enter 2 integers a and b and output a^b (i.e. pow(a,b)) in O(lg n) time complexity. Classic Algorithms ----------------- From e287ca8a7eb9cdb3ef46478729fdce5a4660588f Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Sat, 22 Nov 2014 15:52:16 +0200 Subject: [PATCH 42/49] Added a Company Manager problem in Classes --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 21fdea112..b4bce325f 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,9 @@ Classes **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. +**Company Manager** - Create an hierarchy of classes - abstract class Employee and subclasses HourlyEmployee, SalariedEmployee, Manager and Executive. Every one's pay is calculated differently, research a bit about it. +After you've established an employee hierarchy, create a Company class that allows you to manage the employees. You should be able to hire, fire and raise employees. + **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. **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. From 8d188b907746b29390696dfef0b6022ad3ac5b31 Mon Sep 17 00:00:00 2001 From: James Lieu Date: Tue, 25 Nov 2014 15:03:49 +0000 Subject: [PATCH 43/49] Added Fizzbuzz problem --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 21fdea112..4a36a2e17 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,8 @@ Data Structures Text --------- +**Fizz Buzz** - Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. + **Reverse a String** - Enter a string and the program will reverse it and print it out. **Pig Latin** - 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. From d240ac61ee85df54333a09aa3b82ee608c3f8b48 Mon Sep 17 00:00:00 2001 From: sutiam Date: Thu, 18 Dec 2014 05:08:59 -0800 Subject: [PATCH 44/49] Updated README.md typo fixed. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a6a7260b..c6439362f 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ Graphics and Multimedia **Stream Video from Online** - Try to create your own online streaming video player. -**Mp3 Player** - A simple program for playing your favorite music files. Add features you though are missing from your favorite music player. +**Mp3 Player** - A simple program for playing your favorite music files. Add features you thought are missing from your favorite music player. **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. *Optional: Use threading to process multiple images simultaneously.* From 5631ffa119bde2065cbdbcf4fab058810d8d5c4b Mon Sep 17 00:00:00 2001 From: sutiam Date: Fri, 19 Dec 2014 04:58:03 -0800 Subject: [PATCH 45/49] Updated README.md fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6439362f..e5237ddc8 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ Graphics and Multimedia **Stream Video from Online** - Try to create your own online streaming video player. -**Mp3 Player** - A simple program for playing your favorite music files. Add features you thought are missing from your favorite music player. +**Mp3 Player** - A simple program for playing your favorite music files. Add features you think are missing from your favorite music player. **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. *Optional: Use threading to process multiple images simultaneously.* From b5185543e6bd3b2109e5a860a743407a62629d7a Mon Sep 17 00:00:00 2001 From: Kiriakos Velissariou Date: Thu, 25 Dec 2014 18:46:07 +0200 Subject: [PATCH 46/49] Added Minimum Spanning Tree Problem --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3a6a7260b..1c57ff03c 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,9 @@ Graph **Dijkstra’s Algorithm** - Create a program that finds the shortest path through a graph using its edges. +**Minimum Spanning Tree** - Create a program which takes a connected, undirected graph with weights and outputs the minimum spanning tree of the graph i.e., a +subgraph that is a tree, contains all the vertices, and the sum of its weights is the least possible. + Data Structures --------- From 070095a83c21ab0f362485db4fba2b0bfe0a7020 Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 7 Jan 2015 14:34:09 -0800 Subject: [PATCH 47/49] move credits on top --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3a6a7260b..7fe54d547 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,15 @@ See ways of [contributing](https://github.com/thekarangoel/Projects/blob/master/ You can find implementations of these projects in many other languages by other users in [this repo](https://github.com/thekarangoel/Projects-Solutions). -## Donations +## Credits -If *Projects* has helped you in any way, and you'd like to help the developer, please consider donating. +This repo was compiled by [Karan Goel](http://twitter.com/karangoel). -**- Gittip: [https://www.gittip.com/karan/](https://www.gittip.com/karan/)** +Problems are motivated by the ones shared at: + +* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) +* [Rosetta Code](http://rosettacode.org/) -**- Flattr: [https://flattr.com/profile/thekarangoel](https://flattr.com/profile/thekarangoel)** ================================ @@ -256,10 +258,3 @@ Security ------------- **Caesar cipher** - Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC". This simple "monoalphabetic substitution cipher" provides almost no security, because an attacker who has the encoded message can either use frequency analysis to guess the key, or just try all 25 keys. - - -Sources -======= - -* [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) -* [Rosetta Code](http://rosettacode.org/) From 2bbb8ec298275efa35a186b5a5c60a540f6d49db Mon Sep 17 00:00:00 2001 From: Karan Goel Date: Wed, 7 Jan 2015 14:37:00 -0800 Subject: [PATCH 48/49] add a table of contents, close #61 --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7fe54d547..a4dc6607b 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,21 @@ Problems are motivated by the ones shared at: * [Martyr2’s Mega Project List](http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/) * [Rosetta Code](http://rosettacode.org/) - -================================ +## Table of Contents + +- [Numbers](https://github.com/karan/Projects#numbers) +- [Classic Algorithms](https://github.com/karan/Projects#classic-algorithms) +- [Graph](https://github.com/karan/Projects#graph) +- [Data Structures](https://github.com/karan/Projects#data-structures) +- [Text](https://github.com/karan/Projects#text) +- [Networking](https://github.com/karan/Projects#networking) +- [Classes](https://github.com/karan/Projects#classes) +- [Threading](https://github.com/karan/Projects#threading) +- [Web](https://github.com/karan/Projects#web) +- [Files](https://github.com/karan/Projects#files) +- [Databases](https://github.com/karan/Projects#databases) +- [Graphics and Multimedia](https://github.com/karan/Projects#graphics-and-multimedia) +- [Security](https://github.com/karan/Projects#security) Numbers --------- From 10ed1c05166c66aa1b1085b92d95b67ad5268182 Mon Sep 17 00:00:00 2001 From: Karan Goel <3261985+karan@users.noreply.github.com> Date: Tue, 24 Nov 2020 07:54:29 -0800 Subject: [PATCH 49/49] Create CNAME --- docs/CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/CNAME diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 000000000..7dc5a55a2 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +nojs.club \ No newline at end of file