ai_tools 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ai_tools.rb +137 -0
- data/lib/ai_tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d7cf560274d96831e480b3282ff6f6b662822112e662a0414eea5ee9e2d89f0
|
4
|
+
data.tar.gz: 6b1d6c885ff66bd6c71d46ec2208c4440f9bc7e34a8f56043ba11cbc7ca6b620
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d663afb8d851f38c5ccd7050ee4d9a1ef91c9d36b288f461543bf0514989b7c0d5bfc0d28fa09bdc5e3ca001144dde699dce61902f10c7367703969b7c41776
|
7
|
+
data.tar.gz: f008ceb83dda550a8282b297846c2e0c90bde6e772bc70e897b0d58237ad707b727f511261ba3cb9a266c99c806a8cbd7b09781bfaa13b61beb05643ce312dc4
|
data/lib/ai_tools.rb
CHANGED
@@ -49,4 +49,141 @@ module AiTools
|
|
49
49
|
system("trans -brief -no-auto -t ja+en --output data/#{your_name} #{translate_file}")
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
class TimeKeeping
|
54
|
+
|
55
|
+
def self.sleep_mechanism
|
56
|
+
sleep(3)
|
57
|
+
end
|
58
|
+
|
59
|
+
def print_date
|
60
|
+
require "espeak"
|
61
|
+
|
62
|
+
time = Time.new
|
63
|
+
|
64
|
+
hour_mod = time.hour%12
|
65
|
+
|
66
|
+
say_it = "Exact Date: #{time.month} #{time.day} #{time.year}"
|
67
|
+
|
68
|
+
speech = ESpeak::Speech.new( say_it )
|
69
|
+
speech.speak
|
70
|
+
|
71
|
+
s = sleep_mechanism
|
72
|
+
end
|
73
|
+
|
74
|
+
def print_time
|
75
|
+
require "espeak"
|
76
|
+
|
77
|
+
time = Time.new
|
78
|
+
|
79
|
+
hour_mod = time.hour%12
|
80
|
+
|
81
|
+
normal_time = "Normal: #{hour_mod} #{time.min} #{time.sec}"
|
82
|
+
military_time = "Military: #{time.hour} #{time.min} #{time.sec}"
|
83
|
+
|
84
|
+
speech = ESpeak::Speech.new( normal_time )
|
85
|
+
speech.speak
|
86
|
+
|
87
|
+
speech = ESpeak::Speech.new( military_time )
|
88
|
+
speech.speak
|
89
|
+
|
90
|
+
s = sleep_mechanism
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
class Utilize_Steghide
|
95
|
+
def self.steghide_embed
|
96
|
+
require "espeak"
|
97
|
+
|
98
|
+
speech = ESpeak::Speech.new( "Name your text file." )
|
99
|
+
speech.speak
|
100
|
+
|
101
|
+
print " Name Text File >> "
|
102
|
+
text_file = gets.chomp
|
103
|
+
|
104
|
+
system("nano #{text_file}")
|
105
|
+
|
106
|
+
speech = ESpeak::Speech.new( "Which image do you want to embed in?" )
|
107
|
+
speech.speak
|
108
|
+
|
109
|
+
print " Embed in which image? >> "
|
110
|
+
image = gets.chomp
|
111
|
+
|
112
|
+
system("steghide embed -cf #{image}.jpg -ef embeds/#{text_file}")
|
113
|
+
end
|
114
|
+
|
115
|
+
def self.steghide_extract
|
116
|
+
require "espeak"
|
117
|
+
|
118
|
+
speech = ESpeak::Speech.new( "What image do you wish to extract?" )
|
119
|
+
speech.speak
|
120
|
+
|
121
|
+
print " Extract which image? >> "
|
122
|
+
image = gets.chomp
|
123
|
+
|
124
|
+
system("steghide extract -sf embeds/#{image}")
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
class Creativity
|
129
|
+
|
130
|
+
def self.generate_poetry
|
131
|
+
system("clear")
|
132
|
+
|
133
|
+
require "gabbler"
|
134
|
+
require "espeak"
|
135
|
+
|
136
|
+
gabbler = Gabbler.new
|
137
|
+
|
138
|
+
# Read from 3*17 files.
|
139
|
+
allistodust = File.read('poetry/allistodust.txt'); alongforestgreen = File.read('poetry/alongforestgreen.txt'); anarchojean = File.read('poetry/anarchojean.txt')
|
140
|
+
atmydoor = File.read('poetry/atmydoor.txt'); beingmyself = File.read('poetry/beingmyself.txt'); castleofthesea = File.read('poetry/castleofthesea.txt')
|
141
|
+
coping = File.read('poetry/coping.txt'); devilgoodcompany = File.read('poetry/devilgoodcompany.txt'); dianacyberneticdreams = File.read('poetry/dianacyberneticdreams.txt');
|
142
|
+
dontfallback = File.read('poetry/dontfallback.txt'); droptheidealogies = File.read('poetry/droptheideologies.txt'); flalaikurose = File.read('poetry/flalaikurose.txt');
|
143
|
+
girlnothingbutadream = File.read('poetry/girlnothingbutadream.txt'); goodopticsinthetropics = File.read('poetry/goodopticsinthetropics.txt'); haywiremeltingdown = File.read('poetry/haywiremeltingdown.txt');
|
144
|
+
inthislandoftennessee = File.read('poetry/inthislandoftennessee.txt'); juicyneonsteak = File.read('poetry/juicyneonsteak.txt'); lackofcommunication = File.read('poetry/lackofcommunication.txt');
|
145
|
+
laimencoformoonlight = File.read('poetry/laimencoformoonlight.txt'); leadwithfeelingsnotthemind = File.read('poetry/leadwithfeelingsnotthemind.txt'); lonelypetalswither = File.read('poetry/lonelypetalswither.txt');
|
146
|
+
marrowlust = File.read('poetry/marrowlust.txt'); mmesmiled = File.read('poetry/mmesmiled.txt'); momentarysilence = File.read('poetry/momentarysilence.txt');
|
147
|
+
neveradrollmoment = File.read('poetry/neveradrollmoment.txt'); nevermorecrackingknuckles = File.read('poetry/nevermorecrackingknuckles.txt'); newlaconia = File.read('poetry/newlaconia.txt');
|
148
|
+
nightlystatues = File.read('poetry/nightlystatues.txt'); policestate = File.read('poetry/policestate.txt'); resignationpowder = File.read('poetry/resigationpowder.txt');
|
149
|
+
sentimentality = File.read('poetry/sentimentality.txt'); shotgungirl = File.read('poetry/shotgungirl.txt'); skeletonsfinallaugh = File.read('poetry/skeletonsfinallaugh.txt');
|
150
|
+
skyslumbering = File.read('poetry/skyslumbering.txt'); sliceoflife = File.read('poetry/sliceoflife.txt'); spidersandtheghost = File.read('poetry/spidersandtheghost.txt');
|
151
|
+
superyacht = File.read('poetry/superyacht.txt'); thegirlwithrosecheeks = File.read('poetry/thegirlwithrosecheeks.txt'); theleftarentjellybeans = File.read('poetry/theleftarentjellybeans.txt');
|
152
|
+
thetimeshedied = File.read('poetry/thetimeshedied.txt'); turntodust = File.read('poetry/turntodust.txt'); undertheweepingwillowtree = File.read('poetry/undertheweepingwillowtree.txt');
|
153
|
+
unraveling = File.read('poetry/unravelingfriendship.txt'); vivalacyborgia = File.read('poetry/vivalacyborgia.txt'); waitinginthewall = File.read('poetry/waitinginthewall.txt');
|
154
|
+
whattheysayofrome = File.read('poetry/whattheysayofrome.txt'); windmillsong = File.read('poetry/windmillsong.txt'); winonaleeredneckbeyondrepair = File.read('poetry/winonaleeredneckbeyondrepair.txt');
|
155
|
+
wiromantic = File.read('poetry/wiromantic.txt'); yourmerlotourclimate = File.read('poetry/yourmerlotourclimate.txt');
|
156
|
+
|
157
|
+
# Have Gabbler learn from exponential lines of poetry.
|
158
|
+
gabbler.learn(allistodust); gabbler.learn(alongforestgreen); gabbler.learn(anarchojean);
|
159
|
+
gabbler.learn(atmydoor); gabbler.learn(beingmyself); gabbler.learn(castleofthesea);
|
160
|
+
gabbler.learn(coping); gabbler.learn(devilgoodcompany); gabbler.learn(dianacyberneticdreams);
|
161
|
+
gabbler.learn(dontfallback); gabbler.learn(droptheidealogies); gabbler.learn(flalaikurose);
|
162
|
+
gabbler.learn(girlnothingbutadream); gabbler.learn(goodopticsinthetropics); gabbler.learn(haywiremeltingdown);
|
163
|
+
gabbler.learn(inthislandoftennessee); gabbler.learn(juicyneonsteak); gabbler.learn(lackofcommunication);
|
164
|
+
gabbler.learn(laimencoformoonlight); gabbler.learn(leadwithfeelingsnotthemind); gabbler.learn(lonelypetalswither);
|
165
|
+
gabbler.learn(marrowlust); gabbler.learn(mmesmiled); gabbler.learn(momentarysilence);
|
166
|
+
gabbler.learn(neveradrollmoment); gabbler.learn(nevermorecrackingknuckles); gabbler.learn(newlaconia);
|
167
|
+
gabbler.learn(nightlystatues); gabbler.learn(policestate); gabbler.learn(resignationpowder);
|
168
|
+
gabbler.learn(sentimentality); gabbler.learn(shotgungirl); gabbler.learn(skeletonsfinallaugh);
|
169
|
+
gabbler.learn(skyslumbering); gabbler.learn(sliceoflife); gabbler.learn(spidersandtheghost);
|
170
|
+
gabbler.learn(superyacht); gabbler.learn(thegirlwithrosecheeks); gabbler.learn(theleftarentjellybeans);
|
171
|
+
gabbler.learn(thetimeshedied); gabbler.learn(turntodust); gabbler.learn(undertheweepingwillowtree);
|
172
|
+
gabbler.learn(unraveling); gabbler.learn(vivalacyborgia); gabbler.learn(waitinginthewall);
|
173
|
+
gabbler.learn(whattheysayofrome); gabbler.learn(windmillsong); gabbler.learn(winonaleeredneckbeyondrepair);
|
174
|
+
gabbler.learn(wiromantic); gabbler.learn(yourmerlotourclimate);
|
175
|
+
|
176
|
+
print "What name for your poem? >> "
|
177
|
+
poem_name = gets.chomp
|
178
|
+
|
179
|
+
open("data/#{poem_name}", "w") { |f|
|
180
|
+
12.times do
|
181
|
+
f.puts gabbler.sentence
|
182
|
+
end
|
183
|
+
}
|
184
|
+
|
185
|
+
puts "Written to #{poem_name}.txt..."
|
186
|
+
end
|
187
|
+
|
188
|
+
end
|
52
189
|
end
|
data/lib/ai_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ai_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LWFlouisa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|