This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document Review and the High Cost of Civil Litigation | |
----------------------------------------------------- | |
Despite soaring discovery costs, the legal industry has by many accounts been slow to adapt to | |
the 21st century. Legal discovery refers to the initial phase of litigation during which the | |
disputing parties exchange information relevant to the case. Today, the majority of material | |
gathered consists of electronically stored information (ESI). ESI is an umbrella term used to | |
describe all electronic data, including e-mail (Outlook, Entourage, EML / RFC-2822) and e-docs | |
(PDF, plain text). | |
Traditionally, ESI has been reviewed in what is called a *linear* fashion. This means teams of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def newton_root(n) | |
puts "\nvalue : #{n}" | |
guess = Math.sqrt(n)-4 | |
puts "start : #{guess}" | |
for i in 1..9 | |
guess = (n/guess + guess)/2 | |
puts "guess #{i} : #{guess}" | |
end | |
puts "result : #{guess}" | |
return guess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
def is_fibonacci?(i) | |
a,b=0,1 | |
until b >= i | |
a,b=b,a+b | |
return true if b == i | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
def is_fibonacci?(i) | |
x, x1 = 5 * (i * i) + 4, 5 * (i * i) - 4 | |
y, y1 = (newton_root(5 * (i * i) + 4)).to_i, (newton_root(5 * (i * i) - 4)).to_i | |
(y**2) == x || (y1**2) == x1 ? true : false | |
end | |
def newton_root(n) | |
if (Math.sqrt(n)).infinite? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
@mod_256 = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 0, 33, 68, 105, 185, 228, 17, 113, 164, 217, 73, 132, 193, 65, 201, 89, 241, 145, 57, 233, 161, 97, 41, 249, 209, 177, 153, 137, 129] | |
def approx_root(n) | |
return n if n < 100 | |
len, divisor = ((n.to_s.length - 3) / 2), 10 | |
1.upto(len) {|i| divisor = divisor * 10} | |
return n / divisor | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SpeedDialPermutations | |
def average_time(set,iterations,perm,target = get_combinations(set).sample) | |
avg_arr = [] | |
for i in 0..iterations | |
avg_arr.push get_combinations(set).shuffle.index(target) | |
end | |
return ((avg_arr.inject(:+).to_f / avg_arr.size)*4)/60 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BabyCrypto | |
def decrypt(key, value) | |
((key.class == Fixnum) || (key.to_i != 0)) ? offset = key.to_s.split.map {|i| i.to_i} : offset = calc_offset(key) | |
decrypted, off_i = [], 1 | |
value.split('').each_with_index do |val, i| | |
val.ord >= 97 && val.ord <= 122 ? dist = val.ord + (offset[off_i -1] % 26) : dist = val.ord | |
dist > 122 && dist!= val.ord ? (decrypted.push (122 - (26 - (dist - 122))).chr) : (decrypted.push dist.chr) | |
off_i % (offset.length) == 0 ? off_i = 1 : off_i = off_i + 1 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def freq_analysis(msg) | |
freq,msg_arr,sum = Hash.new(0),msg.split(''),0 | |
msg_arr.each_with_index {|i,j| msg_arr.delete_at(j) if i == " "}.each {|i| freq[i],sum = freq[i] + 1,sum +1} | |
return freq.each {|a,b| freq[a] = calc_perc(b,sum)}.sort_by {|i,j| j}.reverse | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decrypt_single_key(key,value) | |
offset,decrypted, off_i = key,[] , 1 | |
value.split('').each_with_index do |val, i| | |
val.ord >= 97 && val.ord <= 122 ? dist = (val.ord + offset % 26) : dist = val.ord | |
dist > 122 && dist!= val.ord ? (decrypted.push (122 - (26 - (dist - 122))).chr) : (decrypted.push dist.chr) | |
end | |
return decrypted.join | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def encrypt_single_key(key,value) | |
offset,encrypted, off_i = key,[] , 1 | |
value.split('').each_with_index do |val, i| | |
val.ord >= 97 && val.ord <= 122 ? dist = val.ord - (offset % 26) : dist = val.ord | |
dist < 97 && dist != val.ord ? (encrypted.push (122 - (97 - (dist+1))).chr) : (encrypted.push dist.chr) | |
end | |
return encrypted.join | |
end |
OlderNewer