<commit_before>#!/usr/bin/env ruby -w
# encoding: GBK
#ݷϵͳ
$root = Dir.pwd
$:.unshift($root)
require 'ScriptLoader'#ű

#~ t = Time.now
#~ @work_area = AreaManager.load_work_area("HANRU")
#~ @work_area.export_all
#~ @work_area.save_and_close_work_area
#~ p Time.now - t

#Dir.pwd << "/db.mdb"
#'one' => 1, 
conn = SqlServer.new('192.168.0.8')
md = MigrateData.new('CloudEdu',conn)
md.get_table_info('edu_ele_student')
hash_1 = { field_name: nil, proc: Proc.new{|i| i + 1}}
hash_2 = { field_name: Name, proc: Proc.new{|str| str}}
hash_3 = { field_name: ID, proc: Proc.new{|str| str}}
config = { ID: hash_1,
           XM: hash_1, 
           XH: hash_2, }
md.convert_data('edu_ele_student',config)

conn.close
<commit_msg>MigrateData today finish<commit_after>#!/usr/bin/env ruby -w
# encoding: GBK
#ݷϵͳ
$root = Dir.pwd
$:.unshift($root)
require 'ScriptLoader'#ű

#~ t = Time.now
#~ @work_area = AreaManager.load_work_area("HANRU")
#~ @work_area.export_all
#~ @work_area.save_and_close_work_area
#~ p Time.now - t

#Dir.pwd << "/db.mdb"
#'one' => 1, 
conn = SqlServer.new('192.168.0.8')
md = MigrateData.new('CloudEdu',conn)
md.get_table_info('edu_ele_student')
#hash_1 = { field_name: nil, proc: Proc.new{|i| i + 1}}
config = { ID: { field_name: nil, proc: Proc.new{|i| i + 1}},
           XM: { field_name: 'Name', proc: Proc.new{|str| str}}, 
           XH: { field_name: 'ID', proc: Proc.new{|str| str}}, }
md.convert_data('EDU_ZZXS_01_01_XSXX',config)

conn.close

{'fraction_non_alphanumeric': 0.19222903885480572, 'fraction_numerical': 0.021813224267211998, 'mean_word_length': 4.377289377289378, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4783754', 'n_tokens_mistral': 674, 'n_tokens_neox': 628, 'n_words': 117}