ImpUnit 0.2.0 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ImpUnit/version.rb +1 -1
- data/lib/ImpUnit.rb +158 -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: 2c224c84d73dfa3da3084615e9b1b3e4446dda9912d020e0dcbea40b1b040227
|
4
|
+
data.tar.gz: 7b34acb44943729d6772ab3cb9d21906e2a003ed249ec03b95f473752c49b5e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f628da9b3073c7430e63db2f95da83226e4415af283208c2b229f0ffdac59c837152c8638edd15636e6566fa485217ef3a7cfebf06df57bd37fff5ebac7c126
|
7
|
+
data.tar.gz: d2ebd7ac4d9fc050fe9f872f39b1e81b9482897c176b5843ed653ce3b0386ab973de76c73f655873a4cebfd7afc27214ab33962e75b3b0d52a800423f57bd0d2
|
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,88 @@ 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
|
+
puts "Form status: Suitable..."
|
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
|
+
print "The user #{model_type} model has: #{current_wingset}"
|
541
|
+
print "The bot #{model_type} model has: #{current_botwings}"
|
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)
|
547
|
+
# ImpUnit::BotWings.reset_evo
|
548
|
+
else
|
549
|
+
# system("tts 'Form status: Changing form...', 'en'")
|
546
550
|
|
547
|
-
|
551
|
+
puts "Form status: Changing form..."
|
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
|
+
|
561
|
+
ImpUnit::BotWings.reshape
|
562
|
+
end
|
563
|
+
|
564
|
+
ImpUnit::BotWings.reshape
|
565
|
+
end
|
566
|
+
end
|
557
567
|
|
558
568
|
class Spices
|
559
569
|
|
@@ -667,100 +677,125 @@ end"
|
|
667
677
|
end
|
668
678
|
end
|
669
679
|
|
680
|
+
#module Bianca
|
681
|
+
#class SmallTalk
|
682
|
+
#def self.name
|
683
|
+
#end
|
684
|
+
|
685
|
+
#def self.pets
|
686
|
+
#end
|
687
|
+
|
688
|
+
#def self.hobbies
|
689
|
+
#end
|
690
|
+
|
691
|
+
#def self.jobs
|
692
|
+
#end
|
693
|
+
|
694
|
+
#def self.skills
|
695
|
+
#end
|
696
|
+
|
697
|
+
#def self.weather
|
698
|
+
#end
|
699
|
+
|
700
|
+
#def self.operate
|
701
|
+
#end
|
702
|
+
#end
|
703
|
+
#end
|
704
|
+
|
670
705
|
## Measuring the distance between objects and size of objects in space.
|
671
|
-
module SpatialRelationships
|
672
|
-
class Error < StandardError; end
|
706
|
+
#module SpatialRelationships
|
707
|
+
#class Error < StandardError; end
|
673
708
|
|
674
|
-
class Static_Perimeters
|
709
|
+
#class Static_Perimeters
|
675
710
|
|
676
711
|
# The objects within the space.
|
677
|
-
def positive_perimeters
|
712
|
+
#def positive_perimeters
|
678
713
|
# Base radius of static objects.
|
679
|
-
base_radius = 2500
|
714
|
+
#base_radius = 2500
|
680
715
|
|
681
716
|
# Specfic multipliers for Earth index based objects.
|
682
|
-
base_two = 2
|
683
|
-
base_fro = 4
|
684
|
-
base_six = 6
|
685
|
-
base_eit = 8
|
717
|
+
#base_two = 2
|
718
|
+
#base_fro = 4
|
719
|
+
#base_six = 6
|
720
|
+
#base_eit = 8
|
686
721
|
|
687
722
|
# 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
|
723
|
+
#size_of_planets = base_radius ** base_fro
|
724
|
+
#size_of_moons = base_radius ** base_two
|
725
|
+
#size_of_stars = base_radius ** base_six
|
726
|
+
#size_of_blackholes = base_radius ** base_eit
|
692
727
|
|
693
728
|
# 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
|
729
|
+
#puts "The size of the planets is #{size_of_planets} radius."; sleep(3)
|
730
|
+
#puts "The size of the moons is #{size_of_moons} radius."; sleep(3)
|
731
|
+
#puts "The size of the stars is #{size_of_stars} radius."; sleep(3)
|
732
|
+
#puts "The size of a blackhole is #{size_of_blackholes} radius."; sleep(3)
|
733
|
+
#end
|
699
734
|
|
700
735
|
# Space between the objects.
|
701
|
-
def negative_perimeters
|
736
|
+
#def negative_perimeters
|
702
737
|
# Base distance between objects.
|
703
|
-
base_distance = 1_000_000_000
|
738
|
+
#base_distance = 1_000_000_000
|
704
739
|
|
705
740
|
# 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
|
741
|
+
#space_between_planets = 43.8
|
742
|
+
#space_between_moons = 14.6
|
743
|
+
#space_between_stars = 876
|
744
|
+
#space_between_blackholes = 2628
|
710
745
|
|
711
746
|
# 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
|
747
|
+
#planet_distance = base_distance / space_between_planets
|
748
|
+
#moon_distance = base_distance / space_between_moons
|
749
|
+
#star_distance = base_distance / space_between_stars
|
750
|
+
#blackhole_distance = base_distance / space_between_blackholes
|
716
751
|
|
717
752
|
# 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
|
753
|
+
#actual_planets = planet_distance * 10
|
754
|
+
#actual_moons = moon_distance * 10
|
755
|
+
#actual_stars = star_distance * 10
|
756
|
+
#actual_blackholes = blackhole_distance * 10
|
722
757
|
|
723
758
|
# 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
|
759
|
+
#puts "The distance between planets is #{actual_planets} miles."; sleep(3)
|
760
|
+
#puts "The distance between moons is #{actual_moons} miles."; sleep(3)
|
761
|
+
#puts "The distance between stars is #{actual_stars} miles."; sleep(3)
|
762
|
+
#puts "The distance between blackholes is #{actual_blackholes} miles."; sleep(3)
|
763
|
+
#end
|
729
764
|
|
730
|
-
end
|
765
|
+
#end
|
731
766
|
|
732
767
|
# Changing perimeters
|
733
|
-
class Dynamic_Perimeters
|
768
|
+
#class Dynamic_Perimeters
|
734
769
|
|
735
770
|
# 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
|
771
|
+
#def positive_perimeters
|
772
|
+
#spaceship = File.read("data/dynamic/positive_perimenters/spaceship_size.txt").strip.to_i
|
773
|
+
#space_station = spaceship * 200
|
774
|
+
#satalite = space_station / 10
|
740
775
|
|
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
|
776
|
+
#puts "The total size of the space shuttle is #{spaceship} feet."; sleep(3)
|
777
|
+
#puts "The total size of the space station is #{space_station} feet."; sleep(3)
|
778
|
+
#puts "The total size of the satalite is #{satalite} feet."; sleep(3)
|
779
|
+
#end
|
745
780
|
|
746
781
|
# Space between the objects.
|
747
|
-
def negative_perimeters
|
748
|
-
base_multiplier = 10
|
782
|
+
#def negative_perimeters
|
783
|
+
#base_multiplier = 10
|
749
784
|
|
750
785
|
# 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
|
786
|
+
#space_between_spaceships = File.read("data/dynamic/negative_perimeters/space_between_spaceships.txt").strip.to_i
|
787
|
+
#space_between_station = File.read("data/dynamic/negative_perimeters/space_between_station.txt").strip.to_i
|
788
|
+
#space_between_satalite = File.read("data/dynamic/negative_perimeters/space_between_satalite.txt").strip.to_i
|
754
789
|
|
755
790
|
# 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
|
791
|
+
#actual_spaceship_distance = space_between_spaceships * base_multiplier
|
792
|
+
#actual_station_distance = space_between_station * base_multiplier
|
793
|
+
#actual_satalite_distance = space_between_satalite * base_multiplier
|
759
794
|
|
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
|
795
|
+
#puts "The minimum space between shuttles is #{actual_spaceship_distance} feet."; sleep(3)
|
796
|
+
#puts "The minimum space between stations is #{actual_station_distance} feet."; sleep(3)
|
797
|
+
#puts "The minimum space between satalites is #{actual_satalite_distance} feet."; sleep(3)
|
798
|
+
#end
|
764
799
|
|
765
|
-
end
|
766
|
-
end
|
800
|
+
#end
|
801
|
+
#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.4
|
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
|