ImpUnit 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ImpUnit/version.rb +1 -1
- data/lib/ImpUnit.rb +156 -123
- 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: 5d4e8ba8da2cbc2619f7fe61a895397ff4a0bd3194a596a7687aad037ff951fa
|
4
|
+
data.tar.gz: 158e5d38f2e7936e9894670b5a9593a09248e49096819a58874855a586d8b7d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37106f9e337b138e8df1b594bc2102e2dbd9abf0506cbbcda84d8089110e7e0b061a60afdb30cf1e5196db3f2cc9ffd29c548003c49754299da82fd498898e6b
|
7
|
+
data.tar.gz: 04c1fb99ae707076115e6eecb22e82b94bf49d8212ec02ad2e3ed97658d81343d8d8bd24a235086664e5ae2e8bab13207f667d02e28a74ee05e1af7aedb94c5d
|
data/lib/ImpUnit/version.rb
CHANGED
data/lib/ImpUnit.rb
CHANGED
@@ -5,6 +5,9 @@ module ImpUnit
|
|
5
5
|
|
6
6
|
# class options
|
7
7
|
# def self.imp_choose
|
8
|
+
# require "decisiontree"
|
9
|
+
|
10
|
+
|
8
11
|
# end
|
9
12
|
|
10
13
|
# def self.manual
|
@@ -464,14 +467,14 @@ end"
|
|
464
467
|
local_name = File.read("data/usr_identity/local_name.txt").strip.to_s
|
465
468
|
|
466
469
|
# Create XML tags
|
467
|
-
salut = "
|
468
|
-
ejento = "
|
469
|
-
rikusuto = "
|
470
|
-
atemu = "
|
471
|
-
nitote = "
|
472
|
-
kara = "
|
473
|
-
yuza = "
|
474
|
-
lieu = "
|
470
|
+
salut = "Hello"
|
471
|
+
ejento = " #{agent_name}"
|
472
|
+
rikusuto = " #{request_type}"
|
473
|
+
atemu = " #{item}"
|
474
|
+
nitote = " for"
|
475
|
+
kara = " from"
|
476
|
+
yuza = " #{user_name}"
|
477
|
+
lieu = " #{local_name}?"
|
475
478
|
|
476
479
|
conjucate = [nitote, kara]
|
477
480
|
consign = conjucate.sample
|
@@ -479,81 +482,86 @@ end"
|
|
479
482
|
user_location = [yuza, lieu]
|
480
483
|
usign = user_location[0]
|
481
484
|
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
f.puts
|
488
|
-
f.puts
|
489
|
-
f.puts
|
490
|
-
f.puts
|
491
|
-
f.puts
|
485
|
+
system("date +'%Y-%d-%m' > date.txt")
|
486
|
+
|
487
|
+
date = File.read("date.txt").strip.to_s
|
488
|
+
|
489
|
+
open("#{date}-update.md", "w") { |f|
|
490
|
+
f.puts "---"
|
491
|
+
f.puts "title: '#{date} Update'"
|
492
|
+
f.puts "layout: post"
|
493
|
+
f.puts "---"
|
494
|
+
f.puts "#{salut} #{ejento} #{rikusuto} #{atemu} #{consign} #{usign}"
|
492
495
|
}
|
493
496
|
end
|
494
497
|
end
|
495
498
|
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
+
class BotWings
|
500
|
+
def self.reset_evo
|
501
|
+
reset_usr_input = 0
|
499
502
|
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
503
|
+
open("data/number/input.txt", "w") { |f|
|
504
|
+
f.puts reset_usr_input
|
505
|
+
}
|
506
|
+
end
|
504
507
|
|
505
|
-
|
506
|
-
|
508
|
+
def self.use_form
|
509
|
+
system("tts 'Form status: Suitable...', 'en'")
|
507
510
|
|
508
|
-
|
511
|
+
sleep(3)
|
509
512
|
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
+
# Detect bot form
|
514
|
+
# bot_choice = File.read("data/bot_input/input.txt").strip.to_i
|
515
|
+
# bot_wings = File.readlines("data/bot_shape/wings.txt")
|
513
516
|
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
517
|
+
# Form conditional
|
518
|
+
# if bot form is decision tree
|
519
|
+
# elsif bot form is naive bayes
|
520
|
+
# elsif bot form is biometrics
|
521
|
+
# elsif bot form is "infinite learning algorithm"
|
519
522
|
|
520
|
-
|
521
|
-
|
523
|
+
abort
|
524
|
+
end
|
522
525
|
|
523
|
-
|
524
|
-
|
526
|
+
def self.reshape
|
527
|
+
system("clear")
|
525
528
|
|
526
|
-
|
529
|
+
model_type = File.read("data/model/model_type.txt").strip
|
527
530
|
|
528
|
-
|
529
|
-
|
531
|
+
bot_choice = File.read("data/bot_input/input.txt").strip.to_i
|
532
|
+
number = File.read("data/number/input.txt").strip.to_i
|
530
533
|
|
531
|
-
|
532
|
-
|
534
|
+
usr_wings = File.readlines("data/usr_shape/wings.txt")
|
535
|
+
bot_wings = File.readlines("data/bot_shape/wings.txt")
|
533
536
|
|
534
|
-
|
535
|
-
|
537
|
+
current_wingset = usr_wings[number]
|
538
|
+
current_botwings = bot_wings[bot_choice]
|
536
539
|
|
537
|
-
|
538
|
-
|
540
|
+
system("tts 'The user #{model_type} model has: #{current_wingset}', 'en'")
|
541
|
+
system("tts 'The bot #{model_type} model has: #{current_botwings}', 'en'")
|
539
542
|
|
540
|
-
|
541
|
-
|
542
|
-
#else
|
543
|
-
#system("tts 'Form status: Changing form...', 'en'")
|
543
|
+
if current_wingset == current_botwings
|
544
|
+
ImpUnit::BotWings.use_form
|
544
545
|
|
545
|
-
|
546
|
+
sleep(3)
|
546
547
|
|
547
|
-
|
548
|
+
about
|
549
|
+
# ImpUnit::BotWings.reset_evo
|
550
|
+
else
|
551
|
+
system("tts 'Form status: Changing form...', 'en'")
|
548
552
|
|
549
|
-
|
550
|
-
#f.puts new_value
|
551
|
-
#}
|
552
|
-
#end
|
553
|
+
sleep(3)
|
553
554
|
|
554
|
-
|
555
|
-
|
556
|
-
|
555
|
+
new_value = number + 1
|
556
|
+
|
557
|
+
open("data/number/input.txt", "w") { |f|
|
558
|
+
f.puts new_value
|
559
|
+
}
|
560
|
+
end
|
561
|
+
|
562
|
+
ImpUnit::BotWings.reshape
|
563
|
+
end
|
564
|
+
end
|
557
565
|
|
558
566
|
class Spices
|
559
567
|
|
@@ -667,100 +675,125 @@ end"
|
|
667
675
|
end
|
668
676
|
end
|
669
677
|
|
678
|
+
#module Bianca
|
679
|
+
#class SmallTalk
|
680
|
+
#def self.name
|
681
|
+
#end
|
682
|
+
|
683
|
+
#def self.pets
|
684
|
+
#end
|
685
|
+
|
686
|
+
#def self.hobbies
|
687
|
+
#end
|
688
|
+
|
689
|
+
#def self.jobs
|
690
|
+
#end
|
691
|
+
|
692
|
+
#def self.skills
|
693
|
+
#end
|
694
|
+
|
695
|
+
#def self.weather
|
696
|
+
#end
|
697
|
+
|
698
|
+
#def self.operate
|
699
|
+
#end
|
700
|
+
#end
|
701
|
+
#end
|
702
|
+
|
670
703
|
## Measuring the distance between objects and size of objects in space.
|
671
|
-
module SpatialRelationships
|
672
|
-
class Error < StandardError; end
|
704
|
+
#module SpatialRelationships
|
705
|
+
#class Error < StandardError; end
|
673
706
|
|
674
|
-
class Static_Perimeters
|
707
|
+
#class Static_Perimeters
|
675
708
|
|
676
709
|
# The objects within the space.
|
677
|
-
def positive_perimeters
|
710
|
+
#def positive_perimeters
|
678
711
|
# Base radius of static objects.
|
679
|
-
base_radius = 2500
|
712
|
+
#base_radius = 2500
|
680
713
|
|
681
714
|
# Specfic multipliers for Earth index based objects.
|
682
|
-
base_two = 2
|
683
|
-
base_fro = 4
|
684
|
-
base_six = 6
|
685
|
-
base_eit = 8
|
715
|
+
#base_two = 2
|
716
|
+
#base_fro = 4
|
717
|
+
#base_six = 6
|
718
|
+
#base_eit = 8
|
686
719
|
|
687
720
|
# Size of specific objects.
|
688
|
-
size_of_planets = base_radius ** base_fro
|
689
|
-
size_of_moons = base_radius ** base_two
|
690
|
-
size_of_stars = base_radius ** base_six
|
691
|
-
size_of_blackholes = base_radius ** base_eit
|
721
|
+
#size_of_planets = base_radius ** base_fro
|
722
|
+
#size_of_moons = base_radius ** base_two
|
723
|
+
#size_of_stars = base_radius ** base_six
|
724
|
+
#size_of_blackholes = base_radius ** base_eit
|
692
725
|
|
693
726
|
# Total output sizes of specific objects.
|
694
|
-
puts "The size of the planets is #{size_of_planets} radius."; sleep(3)
|
695
|
-
puts "The size of the moons is #{size_of_moons} radius."; sleep(3)
|
696
|
-
puts "The size of the stars is #{size_of_stars} radius."; sleep(3)
|
697
|
-
puts "The size of a blackhole is #{size_of_blackholes} radius."; sleep(3)
|
698
|
-
end
|
727
|
+
#puts "The size of the planets is #{size_of_planets} radius."; sleep(3)
|
728
|
+
#puts "The size of the moons is #{size_of_moons} radius."; sleep(3)
|
729
|
+
#puts "The size of the stars is #{size_of_stars} radius."; sleep(3)
|
730
|
+
#puts "The size of a blackhole is #{size_of_blackholes} radius."; sleep(3)
|
731
|
+
#end
|
699
732
|
|
700
733
|
# Space between the objects.
|
701
|
-
def negative_perimeters
|
734
|
+
#def negative_perimeters
|
702
735
|
# Base distance between objects.
|
703
|
-
base_distance = 1_000_000_000
|
736
|
+
#base_distance = 1_000_000_000
|
704
737
|
|
705
738
|
# Estimated divider between specific objects to base distance.
|
706
|
-
space_between_planets = 43.8
|
707
|
-
space_between_moons = 14.6
|
708
|
-
space_between_stars = 876
|
709
|
-
space_between_blackholes = 2628
|
739
|
+
#space_between_planets = 43.8
|
740
|
+
#space_between_moons = 14.6
|
741
|
+
#space_between_stars = 876
|
742
|
+
#space_between_blackholes = 2628
|
710
743
|
|
711
744
|
# Minimum distance between objects.
|
712
|
-
planet_distance = base_distance / space_between_planets
|
713
|
-
moon_distance = base_distance / space_between_moons
|
714
|
-
star_distance = base_distance / space_between_stars
|
715
|
-
blackhole_distance = base_distance / space_between_blackholes
|
745
|
+
#planet_distance = base_distance / space_between_planets
|
746
|
+
#moon_distance = base_distance / space_between_moons
|
747
|
+
#star_distance = base_distance / space_between_stars
|
748
|
+
#blackhole_distance = base_distance / space_between_blackholes
|
716
749
|
|
717
750
|
# Actual distance between objects
|
718
|
-
actual_planets = planet_distance * 10
|
719
|
-
actual_moons = moon_distance * 10
|
720
|
-
actual_stars = star_distance * 10
|
721
|
-
actual_blackholes = blackhole_distance * 10
|
751
|
+
#actual_planets = planet_distance * 10
|
752
|
+
#actual_moons = moon_distance * 10
|
753
|
+
#actual_stars = star_distance * 10
|
754
|
+
#actual_blackholes = blackhole_distance * 10
|
722
755
|
|
723
756
|
# The output results of distance between objects.
|
724
|
-
puts "The distance between planets is #{actual_planets} miles."; sleep(3)
|
725
|
-
puts "The distance between moons is #{actual_moons} miles."; sleep(3)
|
726
|
-
puts "The distance between stars is #{actual_stars} miles."; sleep(3)
|
727
|
-
puts "The distance between blackholes is #{actual_blackholes} miles."; sleep(3)
|
728
|
-
end
|
757
|
+
#puts "The distance between planets is #{actual_planets} miles."; sleep(3)
|
758
|
+
#puts "The distance between moons is #{actual_moons} miles."; sleep(3)
|
759
|
+
#puts "The distance between stars is #{actual_stars} miles."; sleep(3)
|
760
|
+
#puts "The distance between blackholes is #{actual_blackholes} miles."; sleep(3)
|
761
|
+
#end
|
729
762
|
|
730
|
-
end
|
763
|
+
#end
|
731
764
|
|
732
765
|
# Changing perimeters
|
733
|
-
class Dynamic_Perimeters
|
766
|
+
#class Dynamic_Perimeters
|
734
767
|
|
735
768
|
# The objects within the space.
|
736
|
-
def positive_perimeters
|
737
|
-
spaceship = File.read("data/dynamic/positive_perimenters/spaceship_size.txt").strip.to_i
|
738
|
-
space_station = spaceship * 200
|
739
|
-
satalite = space_station / 10
|
769
|
+
#def positive_perimeters
|
770
|
+
#spaceship = File.read("data/dynamic/positive_perimenters/spaceship_size.txt").strip.to_i
|
771
|
+
#space_station = spaceship * 200
|
772
|
+
#satalite = space_station / 10
|
740
773
|
|
741
|
-
puts "The total size of the space shuttle is #{spaceship} feet."; sleep(3)
|
742
|
-
puts "The total size of the space station is #{space_station} feet."; sleep(3)
|
743
|
-
puts "The total size of the satalite is #{satalite} feet."; sleep(3)
|
744
|
-
end
|
774
|
+
#puts "The total size of the space shuttle is #{spaceship} feet."; sleep(3)
|
775
|
+
#puts "The total size of the space station is #{space_station} feet."; sleep(3)
|
776
|
+
#puts "The total size of the satalite is #{satalite} feet."; sleep(3)
|
777
|
+
#end
|
745
778
|
|
746
779
|
# Space between the objects.
|
747
|
-
def negative_perimeters
|
748
|
-
base_multiplier = 10
|
780
|
+
#def negative_perimeters
|
781
|
+
#base_multiplier = 10
|
749
782
|
|
750
783
|
# Minimum space between objects.
|
751
|
-
space_between_spaceships = File.read("data/dynamic/negative_perimeters/space_between_spaceships.txt").strip.to_i
|
752
|
-
space_between_station = File.read("data/dynamic/negative_perimeters/space_between_station.txt").strip.to_i
|
753
|
-
space_between_satalite = File.read("data/dynamic/negative_perimeters/space_between_satalite.txt").strip.to_i
|
784
|
+
#space_between_spaceships = File.read("data/dynamic/negative_perimeters/space_between_spaceships.txt").strip.to_i
|
785
|
+
#space_between_station = File.read("data/dynamic/negative_perimeters/space_between_station.txt").strip.to_i
|
786
|
+
#space_between_satalite = File.read("data/dynamic/negative_perimeters/space_between_satalite.txt").strip.to_i
|
754
787
|
|
755
788
|
# Actual space between objects
|
756
|
-
actual_spaceship_distance = space_between_spaceships * base_multiplier
|
757
|
-
actual_station_distance = space_between_station * base_multiplier
|
758
|
-
actual_satalite_distance = space_between_satalite * base_multiplier
|
789
|
+
#actual_spaceship_distance = space_between_spaceships * base_multiplier
|
790
|
+
#actual_station_distance = space_between_station * base_multiplier
|
791
|
+
#actual_satalite_distance = space_between_satalite * base_multiplier
|
759
792
|
|
760
|
-
puts "The minimum space between shuttles is #{actual_spaceship_distance} feet."; sleep(3)
|
761
|
-
puts "The minimum space between stations is #{actual_station_distance} feet."; sleep(3)
|
762
|
-
puts "The minimum space between satalites is #{actual_satalite_distance} feet."; sleep(3)
|
763
|
-
end
|
793
|
+
#puts "The minimum space between shuttles is #{actual_spaceship_distance} feet."; sleep(3)
|
794
|
+
#puts "The minimum space between stations is #{actual_station_distance} feet."; sleep(3)
|
795
|
+
#puts "The minimum space between satalites is #{actual_satalite_distance} feet."; sleep(3)
|
796
|
+
#end
|
764
797
|
|
765
|
-
end
|
766
|
-
end
|
798
|
+
#end
|
799
|
+
#end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ImpUnit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LWFlouisa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|