nature 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f61559d6ac9da59f703d78c5ef139aacf14b8ad
4
+ data.tar.gz: e1c438707be57842e25f98779eb6df492c6ffff6
5
+ SHA512:
6
+ metadata.gz: ac1fc1ede8d932621e640539b69554d86102855aeacae3752f97edae27b4f2c0b73dfd50fa5002c6d8c49a76ed2a93a56ef96ad47381bf7e3a296f15046ae2d7
7
+ data.tar.gz: 6319a8899646765ac85257e3d107c445f8e995ee79d70c459fcc4eaa475664405fd4048b5a94df24ca068b2051a0bb63a240d107a3d4f3536fbf2e3c9814f39f
data/nature ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/ruby
2
+
3
+ require "active_record"
4
+ require "vrlib"
5
+ require "csv"
6
+
7
+ # from require_all gem:
8
+ require_rel 'src/'
9
+ require 'sqlite3'
10
+
11
+ ActiveRecord::Base.establish_connection(
12
+ :adapter => "sqlite3",
13
+ :database => File.expand_path("~/visualruby/nature/db/nature.sqlite3")
14
+ )
15
+
16
+ #Fantasy.fill_bye_week
17
+ #ParseSchedule.parse_teams
18
+
19
+ #ParseSchedule.parse(2017)
20
+
21
+ #TallyGames.fill_run_pts
22
+
23
+ # TallyGames.combo_run_pts("ATL", "HOU")
24
+
25
+ Fantasy.new.show_glade
26
+
27
+ # MyClass.new.show_glade()
28
+
data/src/Combo.rb ADDED
@@ -0,0 +1,2 @@
1
+ class Combo < ActiveRecord::Base
2
+ end
data/src/Combos.rb ADDED
@@ -0,0 +1,43 @@
1
+
2
+ class Combos
3
+
4
+ include GladeGUI
5
+
6
+ def initialize(parent)
7
+ @parent = parent
8
+ end
9
+
10
+
11
+ def before_show()
12
+ @view = VR::ListView.new(team1: String, team2: String, avg_run_pts: Float, avg_wr_pts: Float, avg_te_pts: Float, avg_qb_pts: Float)
13
+ @view.add_active_record_rows(Combo.all)
14
+ @view.col_sortable(true)
15
+ @view.show
16
+ @builder[:scrolledwindow1].add @view
17
+ end
18
+
19
+ def buttonFilter__clicked(button)
20
+ and_or = extract_key(button)
21
+ filter = @builder[:entryFilter].text.upcase.gsub(" ", "").split(",")
22
+ @view.model.clear
23
+ @view.hide
24
+ # rows = Combo.all.where("team1 IN (#{filter}) and team2 IN (#{filter})")
25
+ rows = Combo.where("team1 IN (?) #{and_or} team2 IN (?)", filter, filter)
26
+ if rows.count > 0
27
+ @view.add_active_record_rows(rows)
28
+ else
29
+ @view.add_active_record_rows(Combo.all)
30
+ end
31
+ @view.show
32
+ end
33
+
34
+ def view__row_activated(*args) # 3rd arg is VR::TreeViewColumn of clicked cell
35
+ return unless rows = @view.selected_rows
36
+ col = args[2].col_symbol.to_s
37
+ return unless col.start_with?("avg_")
38
+ col = col.split("_")[1]
39
+ row = rows[0]
40
+ @parent.combo_pts(row[0], row[1], col, true)
41
+ end
42
+
43
+ end
data/src/Fantasy.rb ADDED
@@ -0,0 +1,173 @@
1
+ def r2(flot)
2
+ "%5.2f" % flot
3
+ end
4
+
5
+ class Fantasy
6
+
7
+ include GladeGUI
8
+
9
+ def before_show()
10
+ @avgs = {}
11
+ @avgs["run"] = 18.6
12
+ @avgs["wr"] = 22.7
13
+ @avgs["te"] = 7.5
14
+ @avgs["qb"] = 20
15
+
16
+ @avg_o = {}
17
+ @avg_o["run"] = 12.5
18
+ @avg_o["wr"] = 14.5
19
+ @avg_o["qb"] = 17.9
20
+ @avg_o["te"] = 8.6
21
+
22
+
23
+ @show = true
24
+ end
25
+ def buttonFillRunPts__clicked(*a)
26
+ @show = true
27
+ type = @builder[:type].active_text
28
+ home_advantage = @builder[:entryHomeFieldPts].text.to_f
29
+ o_factor = @builder[:entryOFactor].text.to_f
30
+ d_factor = @builder[:entryDFactor].text.to_f
31
+ count = 0
32
+ out "clear"
33
+ Game.all.each do |g|
34
+ home = Team.where(code: g.home).first
35
+ away = Team.where(code: g.away).first
36
+ home_o = home.read_attribute("#{type}_o")
37
+ away_o = away.read_attribute("#{type}_o")
38
+ home_d = home.read_attribute("#{type}_d")
39
+ away_d = away.read_attribute("#{type}_d")
40
+
41
+ home_d_factor = home_d/@avgs[type]
42
+ away_d_factor = away_d/@avgs[type]
43
+
44
+ home_pts = (@avg_o[type] + (o_factor * (home_o-@avg_o[type]))) * (away_d_factor) + home_advantage
45
+ away_pts = (@avg_o[type] + (o_factor * (away_o-@avg_o[type]))) * (home_d_factor) - home_advantage
46
+
47
+ g.send("home_#{type}_pts=", home_pts)
48
+ g.send("away_#{type}_pts=", away_pts)
49
+ # g.home_run_pts = (o_factor * home.run_o) + home_advantage + (d_factor * (away.run_d - 18.6))
50
+ # g.away_run_pts = (o_factor * away.run_o) - home_advantage + (d_factor * (home.run_d - 18.6))
51
+ #
52
+
53
+
54
+ out "#{g.away} @ #{g.home}"
55
+ out "#{g.home} #{type} offense = #{home_o}"
56
+ out "#{g.away} #{type} defense = #{r2(away_d)} (factor=#{r2(away_d_factor)})"
57
+ out "home total = #{r2(home_pts)}"
58
+ out "#{g.away} #{type} offense = #{away_o}"
59
+ out "#{g.home} #{type} defense = #{r2(home_d)} (factor=#{r2(home_d_factor)})"
60
+ out "away total = #{r2(away_pts)}\n"
61
+ count = count + 1
62
+ g.save!
63
+ # return if count > 5
64
+ end
65
+ out "Updated #{type} Points: Home = #{home_advantage.to_s} O Factor = #{o_factor.to_s} D Factor = #{d_factor}"
66
+ # @builder[:window1].show_all
67
+ end
68
+
69
+
70
+
71
+ def buttonComputeCombos__clicked(*a)
72
+ # Combo.destroy_all
73
+ out "clear"
74
+ type = @builder[:type].active_text
75
+ @teams = []
76
+ Team.all.each do |team1|
77
+ @teams << team1.code
78
+ end
79
+ @teams = @teams.sort
80
+ for i in 0..31 do
81
+ for j in (i+1)..31 do
82
+ combo_pts(@teams[i], @teams[j], type)
83
+ end
84
+ end
85
+ out "Combos Updated"
86
+ end
87
+
88
+ def buttonShowCombos__clicked(*a)
89
+ Combos.new(self).show_glade
90
+ end
91
+
92
+ def buttonRunCombo__clicked(*a)
93
+ team1 = @builder[:entryTeam1].text
94
+ team2 = @builder[:entryTeam2].text
95
+ if team2 < team1
96
+ team1, team2 = team2, team1
97
+ end
98
+ out "clear"
99
+ type = @builder[:type].active_text
100
+ combo_pts(team1, team2, type, true)
101
+ end
102
+
103
+ def combo_pts(team1,team2, type, show = false)
104
+ @show, @old_show = show, @show
105
+ tot1 = 0
106
+ tot2 = 0
107
+ tot_best = 0
108
+ tot_games = 0
109
+ out "clear" if show
110
+ out "#{type} Combos for #{team1} & #{team2}", true
111
+ for week in 1..16 do
112
+ best_pts = -99
113
+ best_team = "Error"
114
+ out "\nweek ##{week}"
115
+ clear_events
116
+ Game.where("(home = '#{team1}' or away = '#{team1}' or home = '#{team2}' or away = '#{team2}') and week = #{week}").each do |g|
117
+ home_pts = g.read_attribute("home_#{type}_pts")
118
+ away_pts = g.read_attribute("away_#{type}_pts")
119
+ if g.home == team1 or g.home == team2
120
+ out " #{g.away} @ #{g.home} => #{g.home} = #{r2(home_pts)}"
121
+ if home_pts > best_pts
122
+ best_pts = home_pts
123
+ best_team = g.home
124
+ end
125
+ end
126
+ if g.away == team1 or g.away == team2
127
+ out "#{g.away} @ #{g.home} => #{g.away} = #{r2(away_pts)}"
128
+ if away_pts > best_pts
129
+ best_pts = away_pts
130
+ best_team = g.away
131
+ end
132
+ end
133
+ end
134
+ if best_team != "Error"
135
+ out "best = #{best_team} (#{r2(best_pts)})"
136
+ tot_best = tot_best + best_pts
137
+ tot_games = tot_games + 1
138
+ end
139
+ end
140
+ out "\ntot games: #{tot_games} total: #{r2(tot_best)} avg: #{r2(tot_best/tot_games)}"
141
+ unless c = Combo.where("team1 = '#{team1}' and team2 = '#{team2}'").first
142
+ c = Combo.create
143
+ c.team1 = team1
144
+ c.team2 = team2
145
+ end
146
+ c.send("avg_#{type}_pts=", tot_best/tot_games)
147
+ c.save!
148
+ @show = @old_show
149
+ end
150
+
151
+ def out(str, show = @show)
152
+ if str == "clear"
153
+ @builder[:out].buffer.text = ""
154
+ elsif show
155
+ @builder[:out].buffer.text += str + "\n"
156
+ end
157
+ clear_events
158
+ end
159
+
160
+ def self.fill_bye_week()
161
+ Team.all.each do |t|
162
+ for week in 1..17
163
+ if Game.where("'#{t.code}' IN (home, away) AND week =#{week}").first
164
+ next
165
+ else
166
+ t.bye_week = week
167
+ t.save!
168
+ end
169
+ end
170
+ end
171
+ end
172
+
173
+ end
data/src/Game.rb ADDED
@@ -0,0 +1,2 @@
1
+ class Game < ActiveRecord::Base
2
+ end
data/src/MyClass.rb ADDED
@@ -0,0 +1,15 @@
1
+
2
+ class MyClass #(change name)
3
+
4
+ include GladeGUI
5
+
6
+ def before_show()
7
+ @button1 = "Hello World"
8
+ end
9
+
10
+ def button1__clicked(*args)
11
+ @builder["button1"].label = "Goodbye World"
12
+ end
13
+
14
+ end
15
+
@@ -0,0 +1,43 @@
1
+
2
+ class ParseSchedule
3
+
4
+ def self.parse_teams
5
+ Team.delete_all
6
+ CSV.foreach("./data/teams.csv") do |row|
7
+ r = Team.create
8
+ r.name = row[1]
9
+ r.code = row[0]
10
+ r.save
11
+ end
12
+ end
13
+
14
+ # record format
15
+ # 5,Sun,October 9,1:00PM,Philadelphia Eagles,@,Detroit Lions,preview,,,,,,
16
+ def self.parse(season) #int
17
+ Game.destroy_all
18
+ CSV.foreach("./data/#{season.to_s}_schedule.csv") do |row|
19
+ week = row[0].to_i
20
+ @switch = row[5] == "@"
21
+ home = Team.get_code(@switch ? row[6] : row[4])
22
+ unless game = Game.where(week: week, home: home).first
23
+ game = Game.create
24
+ end
25
+ day = row[2]
26
+ year = day.include?("January") ? (season + 1) : season
27
+ date = Date.strptime("#{day}, #{year}", "%B %e, %Y")
28
+ # game.date = date
29
+ game.week = week
30
+ @switch = row[5] == "@"
31
+ game.home = Team.get_code(@switch ? row[6] : row[3])
32
+ game.away = Team.get_code(@switch ? row[3] : row[6])
33
+ # game.home_points = @switch ? row[9].to_i : row[8].to_i
34
+ # game.away_points = @switch ? row[8].to_i : row[9].to_i
35
+ # game.home_yards = @switch ? row[12].to_i : row[10].to_i
36
+ # game.away_yards = @switch ? row[10].to_i : row[12].to_i
37
+ # game.home_turnovers = @switch ? row[13].to_i : row[11].to_i
38
+ # game.away_turnovers = @switch ? row[11].to_i : row[13].to_i
39
+ # game.season = season
40
+ game.save!
41
+ end
42
+ end
43
+ end
data/src/TallyGames.rb ADDED
@@ -0,0 +1,27 @@
1
+ class TallyGames
2
+
3
+ def self.fill_run_pts
4
+ home_advantage = 3
5
+ o_factor = 0
6
+ d_factor = 1
7
+ count = 0
8
+ Game.all.each do |g|
9
+ home = Team.where(code: g.home).first
10
+ away = Team.where(code: g.away).first
11
+ g.home_run_pts = (o_factor * home.run_o) + home_advantage + (d_factor * (away.run_d - 18.6))
12
+ g.away_run_pts = (o_factor * away.run_o) - home_advantage + (d_factor * (home.run_d - 18.6))
13
+ puts "#{g.away} @ #{g.home}"
14
+ puts "#{g.home} offense = #{home.run_o}"
15
+ puts "#{g.away} defense = #{away.run_d}"
16
+ puts "home total = #{g.home_run_pts}"
17
+ puts "#{g.away} offense = #{away.run_o}"
18
+ puts "#{g.home} defense = #{home.run_d}"
19
+ puts "away total = #{g.away_run_pts}"
20
+ count = count + 1
21
+ g.save!
22
+ # return if count > 100
23
+ end
24
+ end
25
+
26
+
27
+ end
data/src/Team.rb ADDED
@@ -0,0 +1,9 @@
1
+ class Team < ActiveRecord::Base
2
+
3
+ def self.get_code(team_name)
4
+ puts "Team: #{team_name}"
5
+ row = self.find_by_name(team_name)
6
+ row.code
7
+ end
8
+
9
+ end
data/src/Util.rb ADDED
@@ -0,0 +1,17 @@
1
+
2
+ module Util
3
+
4
+ def self.fill_bye_week()
5
+ Team.all.each do |t|
6
+ for week in 1..17
7
+ if Game.where("'#{t.code}' IN (home, away) AND week =#{week}").first
8
+ next
9
+ else
10
+ t.bye_week = week
11
+ t.save!
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ end
@@ -0,0 +1,118 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generated with glade 3.16.1 -->
3
+ <interface>
4
+ <requires lib="gtk+" version="3.0"/>
5
+ <object class="GtkWindow" id="window1">
6
+ <property name="width_request">600</property>
7
+ <property name="height_request">600</property>
8
+ <property name="can_focus">False</property>
9
+ <property name="title" translatable="yes">Nature Boy</property>
10
+ <property name="window_position">center</property>
11
+ <property name="gravity">west</property>
12
+ <child>
13
+ <object class="GtkBox" id="box1">
14
+ <property name="visible">True</property>
15
+ <property name="can_focus">False</property>
16
+ <property name="margin_left">11</property>
17
+ <property name="margin_right">11</property>
18
+ <property name="margin_top">11</property>
19
+ <property name="margin_bottom">11</property>
20
+ <property name="orientation">vertical</property>
21
+ <property name="spacing">9</property>
22
+ <child>
23
+ <object class="GtkLabel" id="label1">
24
+ <property name="visible">True</property>
25
+ <property name="can_focus">False</property>
26
+ <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;&lt;big&gt;Team Combos&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;</property>
27
+ <property name="use_markup">True</property>
28
+ </object>
29
+ <packing>
30
+ <property name="expand">False</property>
31
+ <property name="fill">True</property>
32
+ <property name="position">0</property>
33
+ </packing>
34
+ </child>
35
+ <child>
36
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
37
+ <property name="visible">True</property>
38
+ <property name="can_focus">True</property>
39
+ <property name="shadow_type">in</property>
40
+ <child>
41
+ <placeholder/>
42
+ </child>
43
+ </object>
44
+ <packing>
45
+ <property name="expand">True</property>
46
+ <property name="fill">True</property>
47
+ <property name="position">1</property>
48
+ </packing>
49
+ </child>
50
+ <child>
51
+ <object class="GtkGrid" id="grid1">
52
+ <property name="visible">True</property>
53
+ <property name="can_focus">False</property>
54
+ <child>
55
+ <object class="GtkEntry" id="entryFilter">
56
+ <property name="visible">True</property>
57
+ <property name="can_focus">True</property>
58
+ <property name="hexpand">True</property>
59
+ </object>
60
+ <packing>
61
+ <property name="left_attach">0</property>
62
+ <property name="top_attach">0</property>
63
+ <property name="width">1</property>
64
+ <property name="height">1</property>
65
+ </packing>
66
+ </child>
67
+ <child>
68
+ <object class="GtkButtonBox" id="buttonbox1">
69
+ <property name="visible">True</property>
70
+ <property name="can_focus">False</property>
71
+ <property name="halign">end</property>
72
+ <property name="spacing">9</property>
73
+ <property name="layout_style">end</property>
74
+ <child>
75
+ <object class="GtkButton" id="buttonFilter[and]">
76
+ <property name="label" translatable="yes">And</property>
77
+ <property name="visible">True</property>
78
+ <property name="can_focus">True</property>
79
+ <property name="receives_default">True</property>
80
+ </object>
81
+ <packing>
82
+ <property name="expand">False</property>
83
+ <property name="fill">True</property>
84
+ <property name="position">0</property>
85
+ </packing>
86
+ </child>
87
+ <child>
88
+ <object class="GtkButton" id="buttonFilter[or]">
89
+ <property name="label" translatable="yes">Or</property>
90
+ <property name="visible">True</property>
91
+ <property name="can_focus">True</property>
92
+ <property name="receives_default">True</property>
93
+ </object>
94
+ <packing>
95
+ <property name="expand">False</property>
96
+ <property name="fill">True</property>
97
+ <property name="position">1</property>
98
+ </packing>
99
+ </child>
100
+ </object>
101
+ <packing>
102
+ <property name="left_attach">1</property>
103
+ <property name="top_attach">0</property>
104
+ <property name="width">1</property>
105
+ <property name="height">1</property>
106
+ </packing>
107
+ </child>
108
+ </object>
109
+ <packing>
110
+ <property name="expand">False</property>
111
+ <property name="fill">True</property>
112
+ <property name="position">2</property>
113
+ </packing>
114
+ </child>
115
+ </object>
116
+ </child>
117
+ </object>
118
+ </interface>
@@ -0,0 +1,289 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generated with glade 3.16.1 -->
3
+ <interface>
4
+ <requires lib="gtk+" version="3.0"/>
5
+ <object class="GtkWindow" id="window1">
6
+ <property name="can_focus">False</property>
7
+ <property name="title" translatable="yes">Nature Boy</property>
8
+ <property name="gravity">east</property>
9
+ <child>
10
+ <object class="GtkBox" id="box1">
11
+ <property name="visible">True</property>
12
+ <property name="can_focus">False</property>
13
+ <property name="valign">start</property>
14
+ <property name="margin_left">10</property>
15
+ <property name="margin_right">10</property>
16
+ <property name="margin_top">10</property>
17
+ <property name="margin_bottom">10</property>
18
+ <property name="vexpand">True</property>
19
+ <property name="orientation">vertical</property>
20
+ <property name="spacing">10</property>
21
+ <child>
22
+ <object class="GtkLabel" id="label1">
23
+ <property name="visible">True</property>
24
+ <property name="can_focus">False</property>
25
+ <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;&lt;big&gt;Nature Boy's Fantasy World&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;</property>
26
+ <property name="use_markup">True</property>
27
+ </object>
28
+ <packing>
29
+ <property name="expand">False</property>
30
+ <property name="fill">True</property>
31
+ <property name="position">0</property>
32
+ </packing>
33
+ </child>
34
+ <child>
35
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
36
+ <property name="height_request">400</property>
37
+ <property name="visible">True</property>
38
+ <property name="can_focus">True</property>
39
+ <property name="vexpand">True</property>
40
+ <property name="shadow_type">in</property>
41
+ <child>
42
+ <object class="GtkTextView" id="out">
43
+ <property name="height_request">360</property>
44
+ <property name="visible">True</property>
45
+ <property name="can_focus">True</property>
46
+ <property name="hexpand">True</property>
47
+ <property name="vexpand">True</property>
48
+ <property name="wrap_mode">word</property>
49
+ </object>
50
+ </child>
51
+ </object>
52
+ <packing>
53
+ <property name="expand">True</property>
54
+ <property name="fill">True</property>
55
+ <property name="position">1</property>
56
+ </packing>
57
+ </child>
58
+ <child>
59
+ <object class="GtkGrid" id="grid2">
60
+ <property name="visible">True</property>
61
+ <property name="can_focus">False</property>
62
+ <child>
63
+ <object class="GtkGrid" id="grid3">
64
+ <property name="visible">True</property>
65
+ <property name="can_focus">False</property>
66
+ <property name="row_spacing">2</property>
67
+ <property name="column_spacing">2</property>
68
+ <child>
69
+ <object class="GtkEntry" id="entryHomeFieldPts">
70
+ <property name="visible">True</property>
71
+ <property name="can_focus">True</property>
72
+ <property name="text" translatable="yes">3</property>
73
+ </object>
74
+ <packing>
75
+ <property name="left_attach">1</property>
76
+ <property name="top_attach">0</property>
77
+ <property name="width">1</property>
78
+ <property name="height">1</property>
79
+ </packing>
80
+ </child>
81
+ <child>
82
+ <object class="GtkEntry" id="entryOFactor">
83
+ <property name="visible">True</property>
84
+ <property name="can_focus">True</property>
85
+ <property name="text" translatable="yes">1</property>
86
+ </object>
87
+ <packing>
88
+ <property name="left_attach">1</property>
89
+ <property name="top_attach">1</property>
90
+ <property name="width">1</property>
91
+ <property name="height">1</property>
92
+ </packing>
93
+ </child>
94
+ <child>
95
+ <object class="GtkEntry" id="entryDFactor">
96
+ <property name="visible">True</property>
97
+ <property name="can_focus">True</property>
98
+ <property name="text" translatable="yes">1</property>
99
+ </object>
100
+ <packing>
101
+ <property name="left_attach">1</property>
102
+ <property name="top_attach">2</property>
103
+ <property name="width">1</property>
104
+ <property name="height">1</property>
105
+ </packing>
106
+ </child>
107
+ <child>
108
+ <object class="GtkLabel" id="label2">
109
+ <property name="visible">True</property>
110
+ <property name="can_focus">False</property>
111
+ <property name="label" translatable="yes">Home Field Pts:</property>
112
+ </object>
113
+ <packing>
114
+ <property name="left_attach">0</property>
115
+ <property name="top_attach">0</property>
116
+ <property name="width">1</property>
117
+ <property name="height">1</property>
118
+ </packing>
119
+ </child>
120
+ <child>
121
+ <object class="GtkLabel" id="label3">
122
+ <property name="visible">True</property>
123
+ <property name="can_focus">False</property>
124
+ <property name="label" translatable="yes">Offense Factor:</property>
125
+ </object>
126
+ <packing>
127
+ <property name="left_attach">0</property>
128
+ <property name="top_attach">1</property>
129
+ <property name="width">1</property>
130
+ <property name="height">1</property>
131
+ </packing>
132
+ </child>
133
+ <child>
134
+ <object class="GtkLabel" id="label4">
135
+ <property name="visible">True</property>
136
+ <property name="can_focus">False</property>
137
+ <property name="label" translatable="yes">Defense Factor:</property>
138
+ </object>
139
+ <packing>
140
+ <property name="left_attach">0</property>
141
+ <property name="top_attach">2</property>
142
+ <property name="width">1</property>
143
+ <property name="height">1</property>
144
+ </packing>
145
+ </child>
146
+ </object>
147
+ <packing>
148
+ <property name="left_attach">0</property>
149
+ <property name="top_attach">0</property>
150
+ <property name="width">1</property>
151
+ <property name="height">1</property>
152
+ </packing>
153
+ </child>
154
+ <child>
155
+ <object class="GtkButtonBox" id="buttonbox1">
156
+ <property name="visible">True</property>
157
+ <property name="can_focus">False</property>
158
+ <property name="orientation">vertical</property>
159
+ <property name="spacing">2</property>
160
+ <property name="layout_style">start</property>
161
+ <child>
162
+ <object class="GtkButton" id="buttonFillRunPts">
163
+ <property name="label" translatable="yes">Fill Run Values</property>
164
+ <property name="visible">True</property>
165
+ <property name="can_focus">True</property>
166
+ <property name="receives_default">True</property>
167
+ </object>
168
+ <packing>
169
+ <property name="expand">False</property>
170
+ <property name="fill">True</property>
171
+ <property name="position">0</property>
172
+ </packing>
173
+ </child>
174
+ <child>
175
+ <object class="GtkButton" id="buttonComputeCombos">
176
+ <property name="label" translatable="yes">Compute Combos</property>
177
+ <property name="visible">True</property>
178
+ <property name="can_focus">True</property>
179
+ <property name="receives_default">True</property>
180
+ </object>
181
+ <packing>
182
+ <property name="expand">False</property>
183
+ <property name="fill">True</property>
184
+ <property name="position">1</property>
185
+ </packing>
186
+ </child>
187
+ <child>
188
+ <object class="GtkButton" id="buttonShowCombos">
189
+ <property name="label" translatable="yes">Show Combos</property>
190
+ <property name="visible">True</property>
191
+ <property name="can_focus">True</property>
192
+ <property name="receives_default">True</property>
193
+ </object>
194
+ <packing>
195
+ <property name="expand">False</property>
196
+ <property name="fill">True</property>
197
+ <property name="position">2</property>
198
+ </packing>
199
+ </child>
200
+ </object>
201
+ <packing>
202
+ <property name="left_attach">1</property>
203
+ <property name="top_attach">0</property>
204
+ <property name="width">1</property>
205
+ <property name="height">1</property>
206
+ </packing>
207
+ </child>
208
+ </object>
209
+ <packing>
210
+ <property name="expand">False</property>
211
+ <property name="fill">True</property>
212
+ <property name="position">2</property>
213
+ </packing>
214
+ </child>
215
+ <child>
216
+ <object class="GtkGrid" id="grid1">
217
+ <property name="visible">True</property>
218
+ <property name="can_focus">False</property>
219
+ <child>
220
+ <object class="GtkButton" id="buttonRunCombo">
221
+ <property name="label" translatable="yes">Run Combo</property>
222
+ <property name="visible">True</property>
223
+ <property name="can_focus">True</property>
224
+ <property name="receives_default">True</property>
225
+ </object>
226
+ <packing>
227
+ <property name="left_attach">3</property>
228
+ <property name="top_attach">0</property>
229
+ <property name="width">1</property>
230
+ <property name="height">1</property>
231
+ </packing>
232
+ </child>
233
+ <child>
234
+ <object class="GtkEntry" id="entryTeam2">
235
+ <property name="visible">True</property>
236
+ <property name="can_focus">True</property>
237
+ <property name="text" translatable="yes">BAL</property>
238
+ </object>
239
+ <packing>
240
+ <property name="left_attach">2</property>
241
+ <property name="top_attach">0</property>
242
+ <property name="width">1</property>
243
+ <property name="height">1</property>
244
+ </packing>
245
+ </child>
246
+ <child>
247
+ <object class="GtkEntry" id="entryTeam1">
248
+ <property name="visible">True</property>
249
+ <property name="can_focus">True</property>
250
+ <property name="text" translatable="yes">ATL</property>
251
+ </object>
252
+ <packing>
253
+ <property name="left_attach">1</property>
254
+ <property name="top_attach">0</property>
255
+ <property name="width">1</property>
256
+ <property name="height">1</property>
257
+ </packing>
258
+ </child>
259
+ <child>
260
+ <object class="GtkComboBoxText" id="type">
261
+ <property name="visible">True</property>
262
+ <property name="can_focus">False</property>
263
+ <property name="active">0</property>
264
+ <property name="active_id">0</property>
265
+ <items>
266
+ <item id="&lt;Enter ID&gt;" translatable="yes">run</item>
267
+ <item translatable="yes">wr</item>
268
+ <item translatable="yes">te</item>
269
+ <item translatable="yes">qb</item>
270
+ </items>
271
+ </object>
272
+ <packing>
273
+ <property name="left_attach">0</property>
274
+ <property name="top_attach">0</property>
275
+ <property name="width">1</property>
276
+ <property name="height">1</property>
277
+ </packing>
278
+ </child>
279
+ </object>
280
+ <packing>
281
+ <property name="expand">False</property>
282
+ <property name="fill">True</property>
283
+ <property name="position">3</property>
284
+ </packing>
285
+ </child>
286
+ </object>
287
+ </child>
288
+ </object>
289
+ </interface>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generated with glade 3.16.1 -->
3
+ <interface>
4
+ <requires lib="gtk+" version="3.0"/>
5
+ <object class="GtkWindow" id="window1">
6
+ <property name="can_focus">False</property>
7
+ <property name="window_position">center</property>
8
+ <child>
9
+ <object class="GtkButtonBox" id="buttonbox1">
10
+ <property name="visible">True</property>
11
+ <property name="can_focus">False</property>
12
+ <property name="halign">center</property>
13
+ <property name="valign">center</property>
14
+ <property name="margin_left">50</property>
15
+ <property name="margin_right">50</property>
16
+ <property name="margin_top">50</property>
17
+ <property name="margin_bottom">50</property>
18
+ <property name="orientation">vertical</property>
19
+ <property name="layout_style">start</property>
20
+ <child>
21
+ <object class="GtkButton" id="button1">
22
+ <property name="label" translatable="yes">button</property>
23
+ <property name="visible">True</property>
24
+ <property name="can_focus">True</property>
25
+ <property name="receives_default">True</property>
26
+ </object>
27
+ <packing>
28
+ <property name="expand">True</property>
29
+ <property name="fill">True</property>
30
+ <property name="position">0</property>
31
+ </packing>
32
+ </child>
33
+ </object>
34
+ </child>
35
+ </object>
36
+ </interface>
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nature
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eric Cunningham
8
+ autorequire:
9
+ bindir:
10
+ - "."
11
+ cert_chain: []
12
+ date: 2017-08-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: visualruby
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 3.1.10
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 3.1.10
28
+ - !ruby/object:Gem::Dependency
29
+ name: require_all
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 1.2.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 1.2.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: sqlite3
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.2.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.2.0
56
+ description: Full description here
57
+ email: you@yoursite.com
58
+ executables:
59
+ - nature
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - "./nature"
64
+ - src/Combo.rb
65
+ - src/Combos.rb
66
+ - src/Fantasy.rb
67
+ - src/Game.rb
68
+ - src/MyClass.rb
69
+ - src/ParseSchedule.rb
70
+ - src/TallyGames.rb
71
+ - src/Team.rb
72
+ - src/Util.rb
73
+ - src/glade/Combos.glade
74
+ - src/glade/Fantasy.glade
75
+ - src/glade/MyClass.glade
76
+ homepage: http://www.yoursite.org/
77
+ licenses: []
78
+ metadata: {}
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project: nowarning
95
+ rubygems_version: 2.5.1
96
+ signing_key:
97
+ specification_version: 4
98
+ summary: Short Description Here.
99
+ test_files: []