<commit_before>require 'socket'
require 'yaml'
require 'thread'
require 'cipher/des'
require 'net/vnc/version'

module Net
	#
	# The VNC class provides for simple rfb-protocol based control of
	# a VNC server. This can be used, eg, to automate applications.
	#
	# Sample usage:
	#
	#	  # launch xclock on localhost. note that there is an xterm in the top-left
	#   Net::VNC.open 'localhost:0', :shared => true, :password => '<PASSWORD>' do |vnc|
	#     vnc.pointer_move 10, 10
	#     vnc.type 'xclock'
	#     vnc.key_press :return
	#   end
	#
	# = TODO
	#
	# * The server read loop seems a bit iffy. Not sure how best to do it.
	# * Should probably be changed to be more of a lower-level protocol wrapping thing, with the
	#   actual VNCClient sitting on top of that. all it should do is read/write the packets over
	#   the socket.
	#
	class VNC
		class PointerState
			attr_reader :x, :y, :button

			def initialize vnc
				@x = @y = @button = 0
				@vnc = vnc
			end

			# could have the same for x=, and y=
			def button= button
				@button = button
				refresh
			end
<commit_msg>Add require to docs<commit_after>require 'socket'
require 'yaml'
require 'thread'
require 'cipher/des'
require 'net/vnc/version'

module Net
	#
	# The VNC class provides for simple rfb-protocol based control of
	# a VNC server. This can be used, eg, to automate applications.
	#
	# Sample usage:
	#
	#	  # launch xclock on localhost. note that there is an xterm in the top-left
	#
	#   require 'net/vnc'
	#   Net::VNC.open 'localhost:0', :shared => true, :password => '<PASSWORD>' do |vnc|
	#     vnc.pointer_move 10, 10
	#     vnc.type 'xclock'
	#     vnc.key_press :return
	#   end
	#
	# = TODO
	#
	# * The server read loop seems a bit iffy. Not sure how best to do it.
	# * Should probably be changed to be more of a lower-level protocol wrapping thing, with the
	#   actual VNCClient sitting on top of that. all it should do is read/write the packets over
	#   the socket.
	#
	class VNC
		class PointerState
			attr_reader :x, :y, :button

			def initialize vnc
				@x = @y = @button = 0
				@vnc = vnc
			end

			# could have the same for x=, and y=
			def button= button
				@button = button
				refresh
			end

{'fraction_non_alphanumeric': 0.09491371480472298, 'fraction_numerical': 0.005449591280653951, 'mean_word_length': 2.8717047451669595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1821302', 'n_tokens_mistral': 825, 'n_tokens_neox': 753, 'n_words': 297}