Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, datetime, os
- version = "1.0"
- class string(object):
- def getVer(self):
- return version
- def removePhrase(self, string, charArray):
- string = str(string)
- for i in range (0, len(charArray)):
- string = string.replace(charArray[i], "")
- return string
- def removePhraseSpace(self, string, charArray):
- string = str(string)
- for i in range (0, len(charArray)):
- string = string.replace(charArray[i], " " * len(charArray[i]))
- return string
- def cleanPhrase(self, string, charArray):
- string = str(string)
- for i in range (0, len(charArray)):
- string = string.replace(charArray[i], "*" * len(charArray[i]))
- return string
- def censorPhrase(self, string, charArray):
- string = str(string)
- for i in range (0, len(charArray)):
- string = string.replace(charArray[i], "[Censored]")
- return string
- class log(object):
- def getVer(self):
- return version
- def fileOpen(self, file):
- self.file = open(file,"a")
- def addLine(self, line):
- self.file.write(str(line) + "\n")
- def addLineDT(self, line):
- time = datetime.datetime.now()
- print(time)
- self.addLine(str(time) + str(line))
- def addLinePrint(self, line):
- self.file.write(str(line) + "\n")
- print(line)
- def fileClose(self):
- self.file.close()
- class math(object):
- def getVer(self):
- return version
- def fibonacci(self, n):
- a = 0
- b = 1
- for i in range (1, n):
- c = a + b
- a = b
- b = c
- return a
- def lucas(self, n):
- a = 2
- b = 1
- for i in range (1, n):
- c = a + b
- a = b
- b = c
- return a
- def additiveSet(self, n, a, b):
- for i in range (1, n):
- c = a + b
- a = b
- b = c
- return a
- def phi(self, n):
- a = self.fibonacci(n)
- b = self.fibonacci(n-1)
- c = a / b
- return c
- class encrypt(object):
- def getVer(self):
- return version
- def fileOpen(self, file):
- self.file = open(file,"r+b")
- self.size = os.path.getsize(file)
- print(self.size)
- def encryptF(self):
- for i in range(0, self.size):
- print(self.file.read(1))
- def fileClose(self):
- self.file.close()
- """
- class misc(object):
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement