Skip to content

Commit 4cd2ed4

Browse files
Merge pull request #2 from QuantumNovice/production
Add files via upload
2 parents 933aa3d + da7c224 commit 4cd2ed4

8 files changed

+1847
-48
lines changed

computer_cell_bot.py

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
import discord
2+
import random
3+
4+
5+
from io import BytesIO, StringIO
6+
import base64
7+
from numpy import *
8+
import numpy as np
9+
import matplotlib.pyplot as plt
10+
11+
12+
from discord.ext import commands
13+
14+
# last one sitting universe
15+
#TODO: Add channel ID HERE
16+
channels = [0000000]
17+
18+
VC = ""
19+
20+
bot = commands.Bot(command_prefix=">")
21+
22+
from corpora import Corpora
23+
24+
Corpora(bot)
25+
26+
27+
"""
28+
------------------------------
29+
Members
30+
------------------------------
31+
"""
32+
33+
34+
@bot.command("docs")
35+
async def hello(ctx):
36+
with open("help.txt") as afile:
37+
docs = afile.read()
38+
await ctx.send(docs)
39+
40+
41+
"""
42+
------------------------------
43+
JOKES
44+
------------------------------
45+
"""
46+
47+
48+
@bot.group()
49+
async def joke(ctx):
50+
if ctx.invoked_subcommand is None:
51+
await ctx.send("Invalid command passed...")
52+
53+
54+
@joke.command()
55+
async def comp(ctx):
56+
with open("computer_jokes.txt") as afile:
57+
roasts = afile.readlines()
58+
roast = random.choice(roasts)
59+
await ctx.send(roast)
60+
61+
62+
@joke.command()
63+
async def git(ctx):
64+
with open("git_jokes.txt") as afile:
65+
roasts = afile.readlines()
66+
roast = random.choice(roasts)
67+
await ctx.send(roast)
68+
69+
70+
"""
71+
------------------------------
72+
meme name
73+
------------------------------
74+
"""
75+
76+
77+
@bot.group()
78+
async def make(ctx):
79+
pass
80+
81+
82+
@make.command()
83+
async def doge(ctx, text_1, text_2):
84+
text_1 = urllib.parse.quote(text_1.replace(" ", "_"))
85+
text_2 = urllib.parse.quote(text_2.replace(" ", "_"))
86+
link = "https://memegen.link/doge/{}/{}.jpg".format(text_1, text_2)
87+
await ctx.send(link)
88+
89+
90+
@make.command()
91+
async def buzz(ctx, text_1, text_2):
92+
text_1 = urllib.parse.quote(text_1.replace(" ", "_"))
93+
text_2 = urllib.parse.quote(text_2.replace(" ", "_"))
94+
link = "https://memegen.link/buzz/{}/{}.jpg".format(text_1, text_2)
95+
await ctx.send(link)
96+
97+
98+
"""
99+
------------------------------
100+
mock name <>
101+
------------------------------
102+
"""
103+
104+
import urllib
105+
106+
107+
@bot.group()
108+
async def mock(ctx):
109+
if ctx.invoked_subcommand is None:
110+
await ctx.send("Invalid command passed...")
111+
112+
113+
@mock.command()
114+
async def name(ctx, name: str):
115+
with open("name_mock.txt") as afile:
116+
name_mocks = afile.readlines()
117+
for line in name_mocks:
118+
if line.startswith(name.upper()):
119+
await ctx.send("{}".format(line))
120+
return
121+
122+
123+
"""
124+
------------------------------
125+
DANGER: Math commands
126+
------------------------------
127+
"""
128+
import sympy
129+
130+
131+
@bot.group()
132+
async def math(ctx):
133+
if ctx.invoked_subcommand is None:
134+
await ctx.send("Invalid command passed...")
135+
136+
137+
@math.command()
138+
async def diff(ctx, equation: str, variable: str):
139+
try:
140+
ans = sympy.diff(equation, variable)
141+
except:
142+
ans = "Erro Occured."
143+
await ctx.send(
144+
"=tex \\begin{{align*}} {0} \\end{{align*}}".format(sympy.latex(ans))
145+
)
146+
return
147+
148+
149+
@math.command()
150+
async def integrate(ctx, equation: str, variable: str, upperlimit, lowerlimit):
151+
try:
152+
ans = sympy.integrate(equation, (variable, upperlimit, lowerlimit))
153+
except:
154+
ans = "Erro Occured."
155+
await ctx.send(
156+
"=tex \\begin{{align*}} {0} \\end{{align*}}".format(sympy.latex(ans))
157+
)
158+
return
159+
160+
161+
@math.command()
162+
async def plot(ctx, equation, x_min, x_max, delta_x):
163+
plt.clf()
164+
figure = BytesIO() # File like object to save png
165+
x_min = float(x_min)
166+
x_max = float(x_max)
167+
delta_x = float(delta_x)
168+
169+
print("Equation:", equation)
170+
X = np.arange(x_min, x_max, delta_x)
171+
Y = [eval(equation) for x in X]
172+
plt.plot(X, Y)
173+
plt.ylabel(equation)
174+
plt.xlabel("x")
175+
plt.savefig(figure, format="png")
176+
figure.seek(0)
177+
# Encode data with base64 so it can be served
178+
# figure = base64.standard_b64encode(figure.read()).decode()
179+
180+
for i in channels:
181+
channel = bot.get_channel(i)
182+
try:
183+
if channel.name == ctx.message.channel.name:
184+
file = discord.File(figure, filename="plot.png")
185+
await channel.send("Powered by matplotlib", file=file)
186+
except AttributeError:
187+
print("AttributeError")
188+
189+
API_KEY = "ADD API KEY HERE"
190+
bot.run(API_KEY)

computer_jokes.txt

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
There are 10 types of people in the world: those who understand binary, and those who don't
2+
If at first you don't succeed; call it version 1.0
3+
I'm not anti-social; I'm just not user friendly
4+
My software never has bugs. It just develops random features
5+
Roses are #FF0000 , Violets are #0000FF , All my base belongs to you
6+
In a world without fences and walls, who needs Gates and Windows?
7+
Hand over the calculator, friends don't let friends derive drunk
8+
I would love to change the world, but they won't give me the source code
9+
Enter any 11-digit prime number to continue...
10+
The box said 'Requires Windows 95 or better'. So I installed LINUX
11+
A penny saved is 1.39 cents earned, if you consider income tax
12+
Unix, DOS and Windows...the good, the bad and the ugly
13+
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila
14+
The code that is the hardest to debug is the code that you know cannot possibly be wrong
15+
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity
16+
Ethernet (n): something used to catch the etherbunny
17+
C://dos C://dos.run run.dos.run
18+
You know it's love when you memorize her IP number to skip DNS overhead
19+
JUST SHUT UP AND REBOOT!!
20+
1f u c4n r34d th1s u r34lly n33d t0 g37 l41d
21+
Alcohol & calculus don't mix. Never drink & derive
22+
How do I set a laser printer to stun?
23+
There is only one satisfying way to boot a computer
24+
Concept: On the keyboard of life, always keep one finger on the escape button
25+
It's not bogus, it's an IBM standard
26+
Be nice to the nerds, for all you know they might be the next Bill Gates!
27+
The farther south you go, the more dollar stores there are
28+
Beware of programmers that carry screwdrivers
29+
The difference between e-mail and regular mail is that computers handle e-mail, and computers never decide to come to work one day and shoot all the other computers
30+
If you want a language that tries to lock up all the sharp objects and fire-making implements, use Pascal or Ada: the Nerf languages, harmless fun for children of all ages, and they won't mar the furniture
31+
COFFEE.EXE Missing - Insert Cup and Press Any Key
32+
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning
33+
LISP = Lots of Irritating Silly Parentheses
34+
The beginning of the programmer's wisdom is understanding the difference between getting program to run and having a runnable program
35+
Squash one bug, you'll see ten new bugs popping
36+
Everytime i time i touch my code, i give birth to ten new bugs
37+
boast = blogging is open & amiable sharing of thoughts
38+
We are sorry, but the number you have dialed is imaginary. Please rotate your phone 90 degrees and try again
39+
Cannot find REALITY.SYS. Universe halted
40+
If it weren't for C, we'd all be programming in BASI and OBO
41+
Bad command or file name! Go stand in the corner
42+
Bad or corrupt header, go get a haircut
43+
Unrecognized input, get out of the class
44+
Warning! Buffer overflow, close the tumbler !
45+
WinErr 547: LPT1 not found... Use backup... PENCIL & PAPER
46+
Bad or missing mouse driver. Spank the cat? (Y/N)
47+
Computers make very fast, very accurate mistakes
48+
Best file compression around: "rm *.*" = 100% compression
49+
Hackers in hollywood movies are phenomenal. All they need to do is "c:\> hack into fbi"
50+
BREAKFAST.COM Halted...Cereal Port Not Responding
51+
I survived an NT installation
52+
The name is Baud......James Baud
53+
My new car runs at 56Kbps
54+
Why doesn't DOS ever say "EXCELLENT command or filename!"
55+
File not found. Should I fake it? (Y/N)
56+
Cannot read data, leech the next boy's paper? (Y/N)
57+
CONGRESS.SYS Corrupted: Re-boot Washington D.C (Y/n)?
58+
Does fuzzy logic tickle?
59+
Helpdesk : Sir, you need to add 10GB space to your HD , Customer : Could you please tell where I can download that?
60+
Windows: Just another pane in the glass
61+
Who's General Failure & why's he reading my disk?
62+
RAM disk is not an installation procedure
63+
Shell to DOS...Come in DOS, do you copy? Shell to DOS...
64+
The truth is out there...anybody got the URL?
65+
Smash forehead on keyboard to continue.....
66+
E-mail returned to sender -- insufficient voltage
67+
Help! I'm modeming... and I can't hang up!!!
68+
All wiyht. Rho sritched mg kegtops awound?
69+
Once I got this error on my Linux box: Error. Keyboard not attached. Press F1 to continue
70+
Once I got this error on my Linux box: Error. Mouse not attached. Please left click the 'OK' button to continue
71+
Press any key to continue or any other key to quit...
72+
Press every key to continue
73+
Helpdesk: Sir if you see the blue screen, press any key to continue. Customer : hm.. just a min.. where's that 'any key'..
74+
Idiot, Go ahead, make my data!
75+
Old programmers never die; they just give up their resources
76+
To err is human - and to blame it on a computer is even more so
77+
(001) Logical Error CLINTON.SYS: Truth table missing
78+
Clinton:/> READ | PARSE | WRITE | DUMP >> MONKIA.SYS
79+
(D)inner not ready: (A)bort (R)etry (P)izza
80+
Computers can never replace human stupidity
81+
A typical Yahoo! inbox : Inbox(0), Junk(9855210)
82+
(A)bort, (R)etry, (P)anic?
83+
Bugs come in through open Windows
84+
Penguins love cold, they wont survive the sun
85+
Unix is user friendly...its just selective about who its friends are
86+
Artificial intelligence usually beats real stupidity
87+
Bell Labs Unix -- Reach out and grep someone.
88+
To err is human...to really foul up requires the root password.
89+
Invalid password : Please enter the correct password to (Abort / Retry / Ignore )
90+
FUBAR - where Geeks go for a drink
91+
I degaussed my girlfriend and I'm just not attracted to her anymore
92+
Scandisk : Found 2 bad sectors. Please enter a new HD to continue scanning
93+
Black holes are where God divided by zero
94+
Hey! It compiles! Ship it!
95+
Thank god, my baby just compiled
96+
Yes! My code compiled, and my wife just produced the output
97+
Windows 98 supports real multitasking - it can boot and crash simultaneously
98+
Zap! And there was the blue screen !
99+
Please send all spam to my main address, root@localhost :-)
100+
MailerD(a)emon: You just received 9133547 spam. (O)pen all, (R)ead one by one, (C)heck for more spam
101+
A: Can you teach me how to use a computer? B: No. I just fix the machines, I don't use them
102+
PayPal: Your funds have been frozen for 668974 days
103+
1-800-404 : The subscriber you are trying to call does not exist
104+
1-800-403 : Access to that subscriber was denied
105+
Error message: "Out of paper on drive D:"
106+
If I wanted a warm fuzzy feeling, I'd antialias my graphics!
107+
A printer consists of three main parts: the case, the jammed paper tray and the blinking red light
108+
"Mr. Worf, scan that ship." "Aye Captain. 300 dpi?"
109+
Smith & Wesson: The Original Point And Click Interface
110+
Shout onto a newsgroup : It echoes back flames and spam
111+
Firewall : Intruder detected. (A)llow in (D)eactivate the firewall
112+
Real programmers can write assembly code in any language
113+
Warning! Perl script detected! (K)ill it , (D)eactivate it
114+
Firewall : Do you want to place a motion detector on port 80 ?
115+
Helpdesk: Sir, please refill your ink catridges Customer : Where can i download that?
116+
All computers run at the same speed... with the power off
117+
You have successfully logged in, Now press any key to log out
118+
Sorry, the password you tried is already being used by Dorthy, please try something else.
119+
Sorry, that username already exists. (O)verwrite it (C)ancel
120+
Please send all flames, trolls, and complaints to /dev/toilet
121+
Shut up, or i'll flush you out
122+
Cron : Enter cron command \ Now enter the number of minutes in an hour
123+
We are experiencing system trouble -- do not adjust your terminal
124+
You have successfully hacked in, Welcome to the FBI mainframes.
125+
I'm sorry, our software is perfect. The problem must be you
126+
Never underestimate the bandwidth of a station wagon full of tapes hurling down the highway
127+
Webhost livehelp: Sir you ran out of bandwidth, User: Where can I download that?
128+
If Ruby is not and Perl is the answer, you don't understand the question
129+
Having soundcards is nice... having embedded sound in web pages is not
130+
My computer was full, so I deleted everything on the right half
131+
You have received a new mail which is 195537 hours old
132+
Yahoo! Mail: Your email was sent successfully. The email will delivered in 4 days and 8 hours
133+
I'm sorry for the double slash (Tim Berners-Lee in a Panel Discussion, WWW7, Brisbane, 1998)
134+
Ah, young webmaster... java leads to shockwave. Shockwave leads to realaudio. And realaudio leads to suffering
135+
What color do you want that database?
136+
C++ is a write-only language. I can write programs in C++, but I can't read any of them
137+
As of next week, passwords will be entered in Morse code
138+
earth is 98% full ... please delete anyone you can
139+
A typical yahoo chat room: "A has signed in, A has signed out, B has signed in, B has signed out, C has signed in, C has signed out.."
140+
When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop
141+
Warning! No processor found! Press any key to continue
142+
Failure is not an option. It comes bundled with your Microsoft product
143+
NT is the only OS that has caused me to beat a piece of hardware to death with my bare hands
144+
Warning! Kernel crashed, Run for your lives !
145+
NASA uses Windows? Oh great. If Apollo 13 went off course today the manual would just tell them to open the airlock, flush the astronauts out, and re-install new one
146+
JavaScript: An authorizing language designed to make Netscape crash
147+
How's my programming? Call 1-800-DEV-NULL
148+
Yes, friends and neighbors, boys and girls - my PC speaker crashed NT
149+
root:> Sorry, you entered the wrong password, the correct password is 'a_49qwXk'
150+
New linux package released. Please install on /dev/null
151+
Quake and uptime do not like each other
152+
Unix...best if used before: Tue Jan 19 03:14:08 GMT 2038
153+
As you well know, magic and weapons are prohibited inside the cafeteria -- Final Fantasy VIII
154+
Man is the best computer we can put aboard a spacecraft...and the only one that can be mass produced with unskilled labo
155+
Unix is the only virus with a command line interface
156+
Windows 95 makes Unix look like an operating system
157+
How are we supposed to hack your system if it's always down!
158+
God is real, unless declared integer
159+
I'm tempted to buy the slashdot staff a grammar checker. What do they do for 40 hours a week?
160+
Paypal : Please enter your credit card number to continue
161+
It takes a million monkeys at typewriters to write Shakespeare, but only a dozen monkeys at computers to run Network Solutions
162+
Please help - firewall burnt down - lost packet - reward $$$
163+
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
164+
Thank you Mario! But our princess is in another castle
165+
Perl, the only language that looks the same before and after RSA encryption
166+
Norton: Incoming virus - (D)ownload and save (R)un after download
167+
I had a dream... and there were 1's and 0's everywhere, and I think I saw a 2!
168+
You sir, are an unknown USB device driver
169+
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void

0 commit comments

Comments
 (0)