Skip to content

Instantly share code, notes, and snippets.

View jonaslsaa's full-sized avatar

Jonas jonaslsaa

View GitHub Profile
@jonaslsaa
jonaslsaa / email_CONTENT.txt
Created December 3, 2014 12:14
Email Sender/Handler. No email code.
Your email content here.
@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 / 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 / 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 / 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 / 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 / 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 / boot.py
Created May 3, 2015 16:58
Python OS - Command Line Interface Operating System (needs an folder named 'usr' in same directory)
# -*- coding: utf-8 -*-
print("Loading OS...")
from datetime import datetime
import os
import re
import sys
import cl_apps
current_time = datetime.now().time()
@jonaslsaa
jonaslsaa / SchoolSystem.py
Created May 25, 2015 12:19
School System Official Release 2.4
#Python 3.4
import pickle
pupil = []
def menu():
print("\n*****************CLASS REGISTER*****************")
print("Press 1 See The List Of Pupils")
print("Press 2 To Add New Pupils")
print("Press 3 To Remove Pupils")
@jonaslsaa
jonaslsaa / name_gen.py
Created May 25, 2015 12:21
Name Fetcher 1.2
#Python 3.4
import requests
from bs4 import BeautifulSoup
def spider(max_refresh):
file = open("names_generated.txt","w")
file.close()
file = open("names_generated.txt","a")