WeaverBot 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/WeaverBot.rb +12 -114
- data/lib/WeaverBot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee2825b8e55ea708b8f59ef1afb7cf93a8c2e5df41feb7d2dcb9bab58948d777
|
4
|
+
data.tar.gz: '059785cb28dcf6458ff5f4ed6f1f7e7d03a6ada43a79b53312e7c28c3b6c4917'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5998acc611fa749f1f3ed889f4443a69822339fcce813b5f590225a5c7db4f0ad2a6c3b8b8f4355ba347ded7b73f09e92f8817c146d79eda502ac7aa8bfdf76
|
7
|
+
data.tar.gz: 34382bd0030332a8b99fb624fe930986c9a8199bcdf85e86de59afcb838bce4f647724a2dc5ade15ac956594c2716739a7c7c7fd984e0b86fa1c38a5fcc72458
|
data/lib/WeaverBot.rb
CHANGED
@@ -3,111 +3,9 @@ require "WeaverBot/version"
|
|
3
3
|
module WeaverBot
|
4
4
|
class Error < StandardError; end
|
5
5
|
|
6
|
-
class Find_Pattern
|
7
|
-
def self.single_major
|
8
|
-
print "What career do you want to major in? >> "; major = gets.chomp
|
9
|
-
|
10
|
-
if major == "building computers"
|
11
|
-
puts ">> Then you want to take a computer science class."
|
12
|
-
elsif major == "creative writing"
|
13
|
-
puts ">> Then you want to take a creative writing class."
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.multi_major
|
18
|
-
print "What careers do you want to major in? >> "; majors = gets.chomp
|
19
|
-
|
20
|
-
word_list = majors.split(" ")
|
21
|
-
|
22
|
-
input_1 = word_list{0]
|
23
|
-
input_2 = word_list[2]
|
24
|
-
|
25
|
-
if input_1 == "building computers" and input_2 == "creative writing"
|
26
|
-
puts ">> Then you want to take a computer science class and a creative writing class."
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
## This is a list of image drawing methods. Later addition will involve TTY.
|
32
|
-
class AIDrawing
|
33
|
-
def self.line
|
34
|
-
require "rules_ai"
|
35
|
-
|
36
|
-
RulesAi::Rules_Set.line
|
37
|
-
end
|
38
|
-
|
39
|
-
def self.square
|
40
|
-
require "rules_ai"
|
41
|
-
|
42
|
-
RulesAi::Rules_Set.square
|
43
|
-
end
|
44
|
-
|
45
|
-
def self.cube
|
46
|
-
require "rules_ai"
|
47
|
-
|
48
|
-
RulesAi::Rules_Set.cube
|
49
|
-
end
|
50
|
-
|
51
|
-
def self.hyper
|
52
|
-
require "rules_ai"
|
53
|
-
|
54
|
-
RulesAi::Rules_Set.hyper
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.image
|
58
|
-
image_number = File.read("data/image/number/input.txt").strip.to_i
|
59
|
-
image_list = File.readlines("data/image/images/image_list.txt")
|
60
|
-
|
61
|
-
active_image = image_list[image_number]
|
62
|
-
|
63
|
-
system("jp2a #{active_image}.jpeg")
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
## This is a list of common AI rules across chatbots.
|
68
|
-
class AIRulesets
|
69
|
-
def self.give_hours
|
70
|
-
require "rules_ai"
|
71
|
-
|
72
|
-
RulesAi::Rules_Set.hours_passed
|
73
|
-
end
|
74
|
-
|
75
|
-
def self.tesla_multiplication
|
76
|
-
require "rules_ai"
|
77
|
-
|
78
|
-
RulesAi::Rules_Set.tesla_multiplication
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.autonomous_prompting
|
82
|
-
require "rules_ai"
|
83
|
-
|
84
|
-
RulesAi::Rules_Set.autonomous_prompting
|
85
|
-
end
|
86
|
-
|
87
|
-
def self.calculate_hyper
|
88
|
-
require "rules_ai"
|
89
|
-
|
90
|
-
RulesAi::Rules_Set.calculate_hyper
|
91
|
-
end
|
92
|
-
|
93
|
-
def self.estimate_digest
|
94
|
-
require "rules_ai"
|
95
|
-
|
96
|
-
RulesAi::Rules_Set.estimate_digest
|
97
|
-
end
|
98
|
-
|
99
|
-
def self.write_poetry
|
100
|
-
require "rules_ai"
|
101
|
-
|
102
|
-
RulesAi::Rules_Set.write_poetry
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
6
|
class MachineLearning
|
107
7
|
def self.language_model
|
108
|
-
system("
|
109
|
-
ruby hafestrometre/classifier.rb; sleep 6; clear;
|
110
|
-
rm -rfv hafestrometre > /dev/null")
|
8
|
+
system("cd hafestrometre; ./meter.sh")
|
111
9
|
end
|
112
10
|
end
|
113
11
|
|
@@ -147,17 +45,17 @@ module WeaverBot
|
|
147
45
|
|
148
46
|
if reaction == ""
|
149
47
|
STDOUT.puts "#{bot_name} << I have no idea."
|
150
|
-
elsif reaction == "Lets check the hours."; WeaverBot::AIRulesets.give_hours
|
151
|
-
elsif reaction == "Lets do Tesla arithmetic."; WeaverBot::AIRulesets.tesla_multiplication
|
152
|
-
elsif reaction == "Lets give a morning prompt."; WeaverBot::AIRulesets.autonomous_prompting
|
153
|
-
elsif reaction == "Lets measure a hypercube."; WeaverBot::AIRulesets.calculate_hyper
|
154
|
-
elsif reaction == "Lets estimate digest size."; WeaverBot::AIRulesets.estimate_digest
|
155
|
-
elsif reaction == "Lets write some poetry."; WeaverBot::AIRulesets.write_poetry
|
156
|
-
elsif reaction == "Lets draw a line."; WeaverBot::AIRulesets.line
|
157
|
-
elsif reaction == "Lets draw a square."; WeaverBot::AIRulesets.square
|
158
|
-
elsif reaction == "Lets draw a cube."; WeaverBot::AIRulesets.cube
|
159
|
-
elsif reaction == "Lets draw a hyper."; WeaverBot::AIRulesets.hyper
|
160
|
-
elsif reaction == "Lets draw a image."; WeaverBot::AIRulesets.image
|
48
|
+
# elsif reaction == "Lets check the hours."; WeaverBot::AIRulesets.give_hours
|
49
|
+
# elsif reaction == "Lets do Tesla arithmetic."; WeaverBot::AIRulesets.tesla_multiplication
|
50
|
+
# elsif reaction == "Lets give a morning prompt."; WeaverBot::AIRulesets.autonomous_prompting
|
51
|
+
# elsif reaction == "Lets measure a hypercube."; WeaverBot::AIRulesets.calculate_hyper
|
52
|
+
# elsif reaction == "Lets estimate digest size."; WeaverBot::AIRulesets.estimate_digest
|
53
|
+
# elsif reaction == "Lets write some poetry."; WeaverBot::AIRulesets.write_poetry
|
54
|
+
# elsif reaction == "Lets draw a line."; WeaverBot::AIRulesets.line
|
55
|
+
# elsif reaction == "Lets draw a square."; WeaverBot::AIRulesets.square
|
56
|
+
# elsif reaction == "Lets draw a cube."; WeaverBot::AIRulesets.cube
|
57
|
+
# elsif reaction == "Lets draw a hyper."; WeaverBot::AIRulesets.hyper
|
58
|
+
# elsif reaction == "Lets draw a image."; WeaverBot::AIRulesets.image
|
161
59
|
elsif reaction == "Lets study a language model."; WeaverBot::MachineLearning.language_model
|
162
60
|
elsif reaction == "Closing"; MyBot::Purge.old_data; abort
|
163
61
|
else
|
data/lib/WeaverBot/version.rb
CHANGED