Skip to content

Instantly share code, notes, and snippets.

View jonaslsaa's full-sized avatar

Jonas jonaslsaa

View GitHub Profile
@jonaslsaa
jonaslsaa / name_generator.py
Last active August 29, 2015 14:19
Name Generator with interchanging system for vowels and consonants. Review 1
import random
import re
alphabet1 = ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
alphabet2 = ("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z")
alphabet3 = ("a","e","i","o","u","y")
length = 7 # Length of word.
c_length = 0
@jonaslsaa
jonaslsaa / SuperGGPaint.py
Created December 16, 2014 06:50
A Windows Paint Remake (Simple). UP/DOWN Arrow to adjust brush size. BACKSPACE to erase everything.
import pygame
#Initialization
pygame.init()
print("> SuperGGPaint Debug Console")
print("")
#Defining colors
white = (255,255,255)
@jonaslsaa
jonaslsaa / slither.py
Last active August 29, 2015 14:11
My first snake game in pygame. Requires pygame 3.4 module.
import pygame
import random
#Initialization
pygame.init()
print("> Snake Debug Console")
print("")
#Defining colors
white = (255,255,255)
@jonaslsaa
jonaslsaa / client.py
Created December 5, 2014 08:14
Improved One way message redux using sockets.
import socket # Import socket module
host = raw_input("Host IP: ") # Get local machine name
port = 12345 # Reserve a port for your service.
while True:
s = socket.socket() # Create a socket object
s.connect((host, port))
print s.recv(1024)
@jonaslsaa
jonaslsaa / terrain - v2.py
Last active August 29, 2015 14:10
ASCII Terrain Generation Version 2.0 Advanced. Made by VOX
#Made by VOX, on gist. (TheVoxcraft)
#Still has a few bugs.
#Python 2.7
print("Loading...\n\n")
import random
line1=""
line2=""
line3=""
@jonaslsaa
jonaslsaa / chat_room_client.py
Created December 3, 2014 12:15
Old Complex Chat room.
# telnet program example
import socket, select, string, sys
def prompt() :
sys.stdout.write('<You> ')
sys.stdout.flush()
#main function
if __name__ == "__main__":
@jonaslsaa
jonaslsaa / email_CONTENT.txt
Created December 3, 2014 12:14
Email Sender/Handler. No email code.
Your email content here.
@jonaslsaa
jonaslsaa / divide.py
Created December 3, 2014 12:12
Divides words.
#letter dividing
canRun=1
while canRun == 1:
word=raw_input("Type in a word: ")
for letter in word:
print("Current letter: " + letter)
print(" ")
@jonaslsaa
jonaslsaa / guess_it.py
Last active August 29, 2015 14:10
2 Player Guessing Game. The player nearest to random number wins. Local
import random
#To do: Make it multiplayer LAN version!
print("\n"*50)
print("Welcome to guess the it!")
print("")
print("")
player1name=raw_input("Enter your name player 1: ")
@jonaslsaa
jonaslsaa / ntsng v2.py
Created December 3, 2014 12:09
Never the same number generator. VERSION 2
import random as rnd
nu=0
try:
with open("DATA.txt", 'r') as f:
c = [line.rstrip('\n') for line in f]
print "LOADED!"
except IOError:
print "Setting up!"
with open("DATA.txt", 'w') as f: