<commit_before>require 'tmpdir'

SVN_URL = "http://uispec.googlecode.com/svn/trunk"

dest_dir = Dir.pwd

Dir.mktmpdir('frank_is_updating_uispec') do |tmpdir|
  snapshot_dir = File.join( tmpdir, "svn_snapshot" )
  puts `svn export #{SVN_URL} #{snapshot_dir}`
  FileUtils.cp_r( Dir.glob( File.join( snapshot_dir, "src", "*" )),  dest_dir )

  puts "\n"*3
  puts "uispec source files copied to current dir"
end
<commit_msg>use __FILE__ for dest_dir in update_from_svn<commit_after>require 'tmpdir'

SVN_URL = "http://uispec.googlecode.com/svn/trunk"

dest_dir = File.expand_path(File.dirname(__FILE__))

Dir.mktmpdir('frank_is_updating_uispec') do |tmpdir|
  snapshot_dir = File.join( tmpdir, "svn_snapshot" )
  puts `svn export #{SVN_URL} #{snapshot_dir}`
  FileUtils.cp_r( Dir.glob( File.join( snapshot_dir, "src", "*" )),  dest_dir )

  puts "\n"*3
  puts "uispec source files copied to current dir"
end

{'fraction_non_alphanumeric': 0.1426991150442478, 'fraction_numerical': 0.0022123893805309734, 'mean_word_length': 5.156462585034014, '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': '2463347', 'n_tokens_mistral': 360, 'n_tokens_neox': 371, 'n_words': 75}