├── 001 ├── NameGenerator.py └── README.md ├── 015 ├── CollatzConjecture.py └── README.md ├── README.md └── TODO /001/NameGenerator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import multiprocessing # TODO: Multithreading 4 | import random 5 | import re 6 | import sys 7 | import urllib.request 8 | 9 | regex = r'^[A-Za-z_.]+$' 10 | 11 | countFore = 1 12 | countLast = 1 13 | 14 | cleanForeList = [] 15 | cleanLastList = [] 16 | 17 | try: 18 | uncleanLastList = urllib.request.urlopen( 19 | "http://www.census.gov/genealogy/www/data/1990surnames/dist.all.last" 20 | ).read().split() 21 | 22 | uncleanForeList = urllib.request.urlopen( 23 | "http://deron.meranda.us/data/census-derived-all-first.txt" 24 | ).read().split() 25 | except MemoryError: 26 | print("Out of memory error.") 27 | sys.exit(0) 28 | 29 | 30 | # The following takes a long time. TODO: Write names to Database 31 | for i in range(0, len(uncleanForeList)): 32 | x = uncleanForeList[i].decode('utf-8') 33 | if re.match(regex, x): 34 | cleanForeList.append(x) 35 | print("Storing First Name:", x + ",", 36 | "Number:", countFore 37 | ) 38 | countFore += 1 39 | 40 | for i in range(0, len(uncleanLastList)): 41 | x = uncleanLastList[i].decode('utf-8') 42 | if re.match(regex, x): 43 | cleanLastList.append(x) 44 | print("Storing Last Name:", x + ",", 45 | "Number:", countLast 46 | ) 47 | countLast += 1 48 | print("\n") 49 | 50 | for i in range(0, 10): # Second number is amount of names to generate. 51 | print( 52 | cleanForeList[random.randint(0, len(cleanForeList) - 1)].lower().title(), 53 | cleanLastList[random.randint(0, len(cleanLastList) - 1)].lower().title(), 54 | ) 55 | -------------------------------------------------------------------------------- /001/README.md: -------------------------------------------------------------------------------- 1 | Name Generator 2 | ============================ 3 | 4 | A name generator that fetches and validates names from the census, and uses a PRNG to sort through them and generate Pseudorandom names. 5 |
6 | 7 | TODO: 8 | ---------------------------- 9 | 10 | NameGenerator.py 11 | ---------------------------- 12 | 16 | 17 | Other 18 | ---------------------------- 19 | 29 | -------------------------------------------------------------------------------- /015/CollatzConjecture.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # If odd: 3n +1 4 | # If even: n / 2 5 | # It always finds 1. 6 | 7 | while True: 8 | try: 9 | natNum = int(input("Starting number: ")) 10 | break 11 | except ValueError: 12 | print("Please enter a whole integer.") 13 | 14 | while True: 15 | if natNum % 2 == 0: 16 | natNum = natNum / 2 17 | elif natNum == 1: 18 | break 19 | else: 20 | natNum = (natNum * 3) + 1 21 | print(natNum) 22 | -------------------------------------------------------------------------------- /015/README.md: -------------------------------------------------------------------------------- 1 | Collatz Conjecture 2 | ============================ 3 | 4 | The 3n+1 Conjecture. You will always reach one. 5 |
6 | 7 | TODO: 8 | ---------------------------- 9 | 10 | Other 11 | ---------------------------- 12 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | programming-projects-for-n00bz 2 | ============================== 3 | 4 | /g/'s Programming Projects for n00bz. Courtesy of anon from 4chan. 5 | 6 | These are in random difficulty order. 7 | 8 | How to Play 9 | ----------------------------- 10 | Last three digits of your post decide. 11 | 12 | Happy Rolling! 13 | 14 |
15 | 16 |
    17 |
  1. Name Generator 18 |
  2. Higher or Lower / Heads or tails 19 |
  3. Temperature Converter 20 |
  4. Calculate your Age in Seconds 21 |
  5. Simple Encryption / Decryption 22 |
  6. FizzBuzz 23 |
  7. Rock Paper Scissors and/or Rock Paper Scissors Lizard Spock 24 |
  8. Hangman 25 |
  9. Love Calculator 26 |
  10. Pseudorandom Quote Generator 27 |
  11. Password Generator 28 |
  12. Atomically Correct Time from an internet clock 29 |
  13. Haiku Generator 30 |
  14. Magic Eight Ball 31 |
  15. Collatz Conjecture 32 |
  16. Reverse a string 33 |
  17. Count the Vowels in a string 34 |
  18. Count the words in a string 35 |
  19. Minesweeper 36 |
  20. Connect Four 37 |
  21. BMI Calculator 38 |
  22. 4chan Thread Downloader (Images) 39 |
  23. Sodoku Generator / Solver 40 |
  24. Maze Game and Solution Algorithm 41 |
  25. Decimal to Binary 42 |
  26. Picross Solver 43 |
  27. Eulerian Path 44 |
  28. Fibonnaci Sequence Algorithm 45 |
  29. Calculate and Print the Factorial of 100 46 |
  30. Encryption Collection. Implement all of the tools in the Rumkin Collection: http://rumkin.com/tools/cipher/ 47 |
  31. Blackjack 48 |
  32. Text Adventure Game 49 |
  33. Generate an ASCII image of a Christmas tree to a user given height. 50 |
  34. Area Calculator 51 |
  35. Benfords Law 52 |
  36. Hunt the Wumpus 53 |
  37. Static Website Generator 54 |
  38. Crossword Game 55 |
  39. NTP Server 56 |
  40. Stronger Password Generator (With less chance of predicting an outcome) 57 |
  41. Find the largest number in an array, and print its position 58 |
  42. ASCII Analogue Clock 59 |
  43. Dijkstra's Algorithm 60 |
  44. Text to Morse translator. Bonus points for generating the sound. 61 |
  45. Noughts and Crosses / Tic Tac Toe / X and O 62 |
  46. Snake Game 63 |
  47. FTP Client (TCP or UDP with ACK) 64 |
  48. Telnet Server 65 |
  49. IMP Interpreter 66 |
  50. Tetris 67 |
  51. Conway's Game of Life 68 |
  52. Web Crawler 69 |
  53. Text Editor 70 |
  54. RSS Feed Creator 71 |
  55. Evaluate Binomial Coefficients 72 |
  56. Reverse Polish Notation (RPN) Calculator 73 |
  57. Output the Mandlebrot Set in ASCII 74 |
  58. Sorting Algorithm 75 |
  59. Convert Markup to HTML 76 |
  60. The N Queens Problem 77 |
  61. Details Validatior using Regular Expressions. Validate Phone numbers, emails, names etc. 78 |
  62. Linked List 79 |
  63. Mastermind 80 |
  64. Random Image Generator 81 |
  65. last.FM Scrobbler 82 |
  66. Klingon Translator 83 |
  67. Prime Number generator using a Sieve 84 |
  68. Markov Chain 85 |
  69. Graphical Digital Clock (GUI) 86 |
  70. Oil Spill Game 87 |
  71. Algorithm to calculate Triangle Numbers 88 |
  72. Calculate a users typing speed 89 |
  73. Name Art in ASCII 90 |
  74. Towers of Hanoi 91 |
  75. Quine 92 |
  76. IRC Bot 93 |
  77. Brainfuck Interpreter 94 |
  78. Sorting Algorithm Audibilization and/or Visualisation 95 |
  79. Chip-8 Emulator 96 |
  80. Geekcode Generator (3.12) 97 |
  81. Define, translate and rotate a shape with an arbitrary amount of vertices 98 |
  82. Pong with Variable Vectors 99 |
  83. Battleships with an Artificial Intelligence (NPC) opponent. Make sure they're beatable. 100 |
  84. Simple Rougelike. Mega chapeau for multiplayer over LAN. 101 |
  85. TCP chat program with basic encryption (XOR) 102 |
  86. Incremental Economy Simulator (Look up Time of Exploration) 103 |
  87. Encryption / Decryption Hiding text in an image 104 |
  88. Calculate Pascals Triangle 105 |
  89. Sine Wave Generator from Pseudorandom Numbers 106 |
  90. Pacman Clone with Ghost AI 107 |
  91. Flappy Birds Clone 108 |
  92. Fast Fourier Transform 109 |
  93. Graphical Digital Clock (GUI) that allows the user to set alarms and change colors 110 |
  94. Binary Search / Binary Search Tree 111 |
  95. Nintendo Oil Panic 112 |
  96. Generate the Sierpinski Triangle 113 |
  97. Calculate the Dot and Cross of two Vectors 114 |
  98. Little Man Computer Simulator 115 |
  99. Basic LISP Interpreter 116 |
  100. Hailstone Sequence 117 |
118 | 119 | Challenge Tier 120 | ------------------------------ 121 | 127 | 128 | Also check out: 129 | 130 | https://projecteuler.net/
131 | https://github.com/WoutervdBrink/Programming-Challenges
132 | https://github.com/karan/Projects
133 | http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/
134 | http://rosettacode.org/wiki/Category:Programming_Tasks
135 | http://www.cs.manchester.ac.uk/study/postgraduate-research/projects/
136 | https://www.google.com/?q=Programming+Projects
137 | 138 | For more ideas. 139 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 001: 2 | Implement in C 3 | Implement in C++ 4 | Implement in C# 5 | Implement in Java 6 | Implement in Ruby 7 | Implement in Haskell 8 | Implement in LISP 9 | Python: 10 | Multithreading 11 | Database 12 | --------------------------------------------------------------------------------