<commit_before>#!/usr/bin/env ruby

require 'gtk2'

multiplexity = Gtk::Window.new("Multiplexity")
multiplexity.signal_connect("delete_event") {
#	puts "You are still connected.  Quit?" if connected
	false	# yes, we can close
#	true	# no, we can't close
}
multiplexity.signal_connect("destroy") {
  Gtk.main_quit
}

### Top Row
top_row = Gtk::HBox.new(true, 0)

### Settings side

settings_left = Gtk::HBox.new(false, 0)
settings_right = Gtk::VBox.new(true, 0)

labels = Gtk::VBox.new(true, 0)
server_label = Gtk::Label.new("Server: ", true)
port_label = Gtk::Label.new("Port: ", true)
multiplex_port_label = Gtk::Label.new("Multiplex Port: ", true)
chunk_size_label = Gtk::Label.new("Chunk Size: ", true)
socket_count_label = Gtk::Label.new("Sockets/IP: ", true)
labels.pack_start server_label, true, true, 0
labels.pack_start port_label, true, true, 0
labels.pack_start multiplex_port_label, true, true, 0
labels.pack_start chunk_size_label, true, true, 0
labels.pack_start socket_count_label, true, true, 0

inputs = Gtk::VBox.new(true, 0)
server_ip = Gtk::Entry.new
server_port = Gtk::Entry.new
multiplex_port = Gtk::Entry.new
chunk_size = Gtk::Entry.new
chunk_unit = Gtk::ComboBox.new
chunk_unit.append_text("KB")
chunk_unit.append_text("MB")
chunk_unit.active = 1
socket_count = Gtk::Entry.new
inputs.pack_start server_ip, true, true, 0
inputs.pack_start server_port, true, true, 0
inputs.pack_start multiplex_port, true, true, 0
chunk_box = Gtk::HBox.new
chunk_box.pack_start chunk_size, true, true, 0
chunk_box.pack_start chunk_unit, true, true, 0
inputs.pack_start chunk_box, true, true, 0
inputs.pack_start socket_count, true, true, 0

settings_left.pack_start labels, true, true, 0
settings_left.pack_start inputs, true, true, 0
#settings_left.set_size_request(400, 200)
###



network_mode = Gtk::CheckButton.new("I would like to use multiple networks")
network_mode.signal_connect("clicked") {

}

bind_ip_box = Gtk::HBox.new(false, 0)
bind_ips_label = Gtk::Label.new("Bind IPs: ", true)
bind_ips = Gtk::Entry.new
bind_ip_box.pack_start bind_ips_label, false, false, 0
bind_ip_box.pack_start bind_ips, true, true, 0

small_opts = Gtk::HBox.new(true, 0)
verify = Gtk::CheckButton.new("CRC verify chunks")
recycle = Gtk::CheckButton.new("Recycle sockets")
small_opts.pack_start verify, true, true, 0
small_opts.pack_start recycle, true, true, 0

log_box = Gtk::HBox.new(false, 0)
log_option = Gtk::CheckButton.new("Log messages")
log_file = Gtk::Entry.new
log_box.pack_start log_option, false, false, 0
log_box.pack_start log_file, true, true, 0

connect_button = Gtk::Button.new("Connect")
connect_button.signal_connect("clicked") {

}

settings_right.pack_start network_mode, true, true, 0
settings_right.pack_start bind_ip_box, true, true, 0
settings_right.pack_start small_opts, true, true, 0
settings_right.pack_start log_box, true, true, 0
settings_right.pack_start connect_button, true, true, 0

top_options = Gtk::HBox.new(true, 0)
top_label = Gtk::VBox.new(true, 0)
top_input = Gtk::VBox.new(true, 0)

top_options.pack_start top_label, true, true, 0
top_options.pack_start top_input, true, true, 0

#######################

settings = Gtk::HBox.new(true, 0)
settings.pack_start settings_left, false, false, 0
settings.pack_start settings_right, false, false, 0




<commit_msg>connected a few gtk objects<commit_after>#!/usr/bin/env ruby

require 'gtk2'

multiplexity = Gtk::Window.new("Multiplexity")
multiplexity.signal_connect("delete_event") {
#	puts "You are still connected.  Quit?" if connected
	false	# yes, we can close
#	true	# no, we can't close
}
multiplexity.signal_connect("destroy") {
  Gtk.main_quit
}

### Top Row
top_row = Gtk::HBox.new(true, 0)

### Settings side

settings_left = Gtk::HBox.new(false, 0)
settings_right = Gtk::VBox.new(true, 0)

labels = Gtk::VBox.new(true, 0)
server_label = Gtk::Label.new("Server: ", true)
port_label = Gtk::Label.new("Port: ", true)
multiplex_port_label = Gtk::Label.new("Multiplex Port: ", true)
chunk_size_label = Gtk::Label.new("Chunk Size: ", true)
socket_count_label = Gtk::Label.new("Sockets/IP: ", true)
labels.pack_start server_label, true, true, 0
labels.pack_start port_label, true, true, 0
labels.pack_start multiplex_port_label, true, true, 0
labels.pack_start chunk_size_label, true, true, 0
labels.pack_start socket_count_label, true, true, 0

inputs = Gtk::VBox.new(true, 0)
server_ip = Gtk::Entry.new
server_port = Gtk::Entry.new
server_port.insert_text("8000", 0)
multiplex_port = Gtk::Entry.new
chunk_size = Gtk::Entry.new
chunk_unit = Gtk::ComboBox.new
chunk_unit.append_text("KB")
chunk_unit.append_text("MB")
chunk_unit.active = 1
socket_count = Gtk::Entry.new
inputs.pack_start server_ip, true, true, 0
inputs.pack_start server_port, true, true, 0
inputs.pack_start multiplex_port, true, true, 0
chunk_box = Gtk::HBox.new
chunk_box.pack_start chunk_size, true, true, 0
chunk_box.pack_start chunk_unit, true, true, 0
inputs.pack_start chunk_box, true, true, 0
inputs.pack_start socket_count, true, true, 0

settings_left.pack_start labels, true, true, 0
settings_left.pack_start inputs, true, true, 0
#settings_left.set_size_request(400, 200)
###


bind_ip_box = Gtk::HBox.new(false, 0)
bind_ips_label = Gtk::Label.new("Bind IPs: ", true)
bind_ips = Gtk::Entry.new
bind_ips.set_sensitive false
bind_ip_box.pack_start bind_ips_label, false, false, 0
bind_ip_box.pack_start bind_ips, true, true, 0

network_mode = Gtk::CheckButton.new("I would like to use multiple networks")
network_mode.signal_connect("clicked") {
	bind_ips.set_sensitive !bind_ips.sensitive?
}

small_opts = Gtk::HBox.new(true, 0)
verify = Gtk::CheckButton.new("CRC verify chunks")
recycle = Gtk::CheckButton.new("Recycle sockets")
small_opts.pack_start verify, true, true, 0
small_opts.pack_start recycle, true, true, 0

log_file = Gtk::Entry.new
log_file.set_sensitive false

log_box = Gtk::HBox.new(false, 0)
log_option = Gtk::CheckButton.new("Log messages")
log_option.signal_connect("clicked") {
	log_file.set_sensitive !log_file.sensitive?
}

log_box.pack_start log_option, false, false, 0
log_box.pack_start log_file, true, true, 0

connect_button = Gtk::Button.new("Connect")
connect_button.signal_connect("clicked") {

}

settings_right.pack_start network_mode, true, true, 0
settings_right.pack_start bind_ip_box, true, true, 0
settings_right.pack_start small_opts, true, true, 0
settings_right.pack_start log_box, true, true, 0
settings_right.pack_start connect_button, true, true, 0

top_options = Gtk::HBox.new(true, 0)
top_label = Gtk::VBox.new(true, 0)
top_input = Gtk::VBox.new(true, 0)

top_options.pack_start top_label, true, true, 0
top_options.pack_start top_input, true, true, 0

#######################

settings = Gtk::HBox.new(true, 0)
settings.pack_start settings_left, false, false, 0
settings.pack_start settings_right, false, false, 0





{'fraction_non_alphanumeric': 0.1333430913348946, 'fraction_numerical': 0.015076112412177985, 'mean_word_length': 6.508791208791209, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2087155', 'n_tokens_mistral': 2634, 'n_tokens_neox': 2495, 'n_words': 573}