Skip to content

Instantly share code, notes, and snippets.

View XChrisUnknownX's full-sized avatar

XChrisUnknownX

View GitHub Profile
@XChrisUnknownX
XChrisUnknownX / chargen starter pack.py
Created September 12, 2018 17:04
chargen starter pack.py
import time
import random
def charactergen():
#SECTION BELOW PICKS GENDER AND NAME
import random
malenames = ["Gary", "Joshua",
"Christopher","Noah","Matthew","Michael","Scott","Anthony","Salvatore","William","Frank","Mark","Thomas","Carl","Claude","Vincent","James","Nathan","Stuart","Steven","Albert","Adam","Charles","Darius","Greg","Hank","Harold","Paul","Peter","Patrick","Constantine","Kevin","Robert","Raymond","Benjamin","Yuri","Jacob","Oswald","Robin","Nicholas","Jeremy","Leslie","Arnold","Jack","Bruce"]
femalenames = ["Jeanine","Joy","Jovanna","Christina","Christine","Helen","Patricia","Gwen","Whitney","Dawn","Jeanine","Miriam","Leyla","Brittany","Amy","Felicia","Whitney","Kayla","Karen","Yolanda","Yuri","Hannah","Deanna","Mary","Marie","Jane","Sara","Reyna","Laura","Wanda","Wilma","Brenda","Rebecca","Octavia","Caitlyn","Kate","Penelope","Leslie","Robin","Darlene","Doreen","Danielle","Rachel","Rosemarie","Anna","Stephanie","Nancy","Delilah","Diane","Renee","Beatrice","Sasha","Elle","Marjorie","Madel
@XChrisUnknownX
XChrisUnknownX / one of 10.py
Created September 21, 2018 12:30
one of 10.py
import random
import time
#joke program. succinctly the computer picks a number between 1 and 10 and you try to guess it. There is a 1/10 chance it will lie to you.
print("Hello. My name is Blade. I am a computer program. Let's play a game. I will choose a number between 1 and 10. I will choose a new number after each guess.")
while True:
print()
bladeisaliar = random.choice([False,False,False,False,False,False,False,False,False,True])
bladepicksanumber = random.randint(1,10)
bladepicksanumbers = str(bladepicksanumber)
print("Pick a number between 1 and 10.")
@XChrisUnknownX
XChrisUnknownX / GuessThePassword.py
Created September 27, 2018 18:05
GuessThePassword.py
import random
import time
letters = ["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","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"]
numbers = ["0","1","2","3","4","5","6","7","8","9"]
def createthepassword():
letters = ["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","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"]
numbers = ["0","1","2","3","4","5","6","7","8","9"]
letter = "letters"
number = "numbers"
password = [0,1,2,3,4,5,6]
@XChrisUnknownX
XChrisUnknownX / MarcGreenbergIsAwesome.py
Created September 27, 2018 18:33
MarcGreenbergIsAwesome.py
import time
import random
#can be used on any computer with python 3 installed or the debugger at
# https://www.onlinegdb.com/online_python_debugger
# inspired by a Facebook comment with the man who made the For the Record documentary.
awesome = "awesome"
MarcGreenberg = awesome
print("Enter",end=" ")
@XChrisUnknownX
XChrisUnknownX / Ultimate Rock Paper Scissor.py
Created September 28, 2018 03:03
Ultimate Rock Paper Scissor.py
import random
import time
game1 = "game1"
game2 = "game2"
game3 = "game3"
game4 = "game4"
game5 = "game5"
game6 = "game6"
game7 = "game7"
game8 = "game8"
@XChrisUnknownX
XChrisUnknownX / Rock Paper Cheater.py
Last active September 28, 2018 14:43
Rock Paper Cheater.py
import time
import random
#This is almost exactly the same code as Ultimate Rock Paper Scissor but it cheats so that the player can never win.
game1 = "game1"
game2 = "game2"
game3 = "game3"
game4 = "game4"
game5 = "game5"
game6 = "game6"
game7 = "game7"
@XChrisUnknownX
XChrisUnknownX / FileMarkerPROSample.py
Last active October 10, 2018 14:28
With the help of redditor Kyber I started to understand more about text management in Python. (See third attempt)
import time
import sys
import random
timeofday = random.choice(["morning","afternoon","evening"])
#time of day and the whole beginning of this program means nothing. It is an insert for if I share this program with stenographer educators so that they're not completely lost, and would be rewritten in the event I get this program to work properly.
print("Good " + timeofday + ". I am Blade. I am programmed to insert timings into ASCII files and have no clue what time of day it is.")
textname = input("Name of text file you wish to open. ")
#textname is important. User must specify the exact name of the file. In this build, the .txt must be in the same folder as the .py program.
wordspermin = input("Mark X words per minute. ")
#If the program works correctly you should be able to give it a txt with a word on each line and it should give you a new txt with the words sorted alphabetically.
#It should also theoretically give a list of all the words at the end.
#Use chammy.txt to test.
filename = input("Specify txt you wish to sort: ")
with open(filename,"r") as sortfile, open("Sorted File.txt","x") as newfile:
newlist = []
for line in sortfile:
item = sortfile.readline()
newlist.append(item)
newlist.sort()
@XChrisUnknownX
XChrisUnknownX / Alphabetical Sorter
Last active October 17, 2018 15:47
Sorts txts that are in the format of chammy.txt or chammy2.txt
#If the program works correctly you should be able to give it a txt with a word on each line and it should give you a new txt with the words sorted alphabetically.
filename = input("Specify txt you wish to sort: ")
with open(filename,"r") as sortfile, open("Sorted File.txt","x") as newfile:
newstring = sortfile.read()
newlist = newstring.split()
newlist.sort()
for n in newlist:
newfile.write(n)
newfile.write("""
""")
@XChrisUnknownX
XChrisUnknownX / FibonacciGeneratorSAMPLE
Created October 18, 2018 19:45
This will generate Fibonacci numbers. DO NOT RUN THE PROGRAM WITHOUT MONITORING. Creates increasingly larger text files. Safely tested and opened at 10,000 fibonacci numbers ( about 10,000 KB)
import time
item1 = 0
item2 = 1
import time
fib = [0,1]
counter = 2
fibfile = open("Fibonacci Sequence.txt","w")
fibfile.write(str(1))
fibfile.write("""
""")