SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
‣
‣
‣
‣
‣
‣



‣

‣
‣

‣

‣
‣
‣



‣
#!/usr/bin/ruby
#!/usr/bin/ruby
                                h = Hash.new
                                ARGF.each do |line|
ARGF.each do |line|                     line.chomp!
  line.chomp!                           array = line.split(/,/)
  logs = line.split(/,/)                uid = array[0]
                                        c = array[1]
  unless logs.empty?
    printf("%s,1n", logs[0])           count = 1
                                        if h.key? uid
  end                                           count = h[uid].to_i + 1
end                                     end
                                        h.store uid, count
                                end
                                printf("#{h.length}")
‣
‣



‣
‣
‣
#!/usr/bin/ruby
#!/usr/bin/ruby
                                h = Hash.new
                                ARGF.each do |line|
ARGF.each do |line|                     line.chomp!
  line.chomp!                           array = line.split(/,/)
  logs = line.split(/,/)                uid = array[0]
                                        c = array[1]
  unless logs.empty?
    printf("%s,1n", logs[0])           count = 1
                                        if h.key? uid
  end                                           count = h[uid].to_i + 1
end                                     end
                                        h.store uid, count
                                end
                                printf("#{h.length}")
‣
‣
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17
Engineer event in Kyoto 10-04-17

Más contenido relacionado

La actualidad más candente

Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Santiago Sarmiento
 
Script PyThon
Script PyThonScript PyThon
Script PyThoninacap
 
Program to find factorial of a number
Program to find factorial of a numberProgram to find factorial of a number
Program to find factorial of a numberSwarup Boro
 

La actualidad más candente (6)

Cristina
CristinaCristina
Cristina
 
Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++
 
Script PyThon
Script PyThonScript PyThon
Script PyThon
 
6 pointers functions
6 pointers functions6 pointers functions
6 pointers functions
 
Perimeter
PerimeterPerimeter
Perimeter
 
Program to find factorial of a number
Program to find factorial of a numberProgram to find factorial of a number
Program to find factorial of a number
 

Destacado

2012_07_06_gxeb_05
2012_07_06_gxeb_052012_07_06_gxeb_05
2012_07_06_gxeb_05ryo katsuma
 
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5Yasuhiro Tsuchiya
 
Jaws Lt -2010-02-23
Jaws Lt -2010-02-23Jaws Lt -2010-02-23
Jaws Lt -2010-02-23ryo katsuma
 
meeting24.tv at Tokyo2.0
meeting24.tv at Tokyo2.0meeting24.tv at Tokyo2.0
meeting24.tv at Tokyo2.0ryo katsuma
 
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7Yasuhiro Tsuchiya
 
Media Equation: マシンと人との認知的な境界(竹内 勇剛)
Media Equation: マシンと人との認知的な境界(竹内 勇剛)Media Equation: マシンと人との認知的な境界(竹内 勇剛)
Media Equation: マシンと人との認知的な境界(竹内 勇剛)KIT Cognitive Interaction Design
 

Destacado (7)

2012_07_06_gxeb_05
2012_07_06_gxeb_052012_07_06_gxeb_05
2012_07_06_gxeb_05
 
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5
Tokyo Interactive Spam & Phishing Awards 2012 at GXEB#5
 
Plug and Pray at GXEB#6
Plug and Pray at GXEB#6Plug and Pray at GXEB#6
Plug and Pray at GXEB#6
 
Jaws Lt -2010-02-23
Jaws Lt -2010-02-23Jaws Lt -2010-02-23
Jaws Lt -2010-02-23
 
meeting24.tv at Tokyo2.0
meeting24.tv at Tokyo2.0meeting24.tv at Tokyo2.0
meeting24.tv at Tokyo2.0
 
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7
Tokyo Interactive Spam & Phishing Award 2014 at GXEB#7
 
Media Equation: マシンと人との認知的な境界(竹内 勇剛)
Media Equation: マシンと人との認知的な境界(竹内 勇剛)Media Equation: マシンと人との認知的な境界(竹内 勇剛)
Media Equation: マシンと人との認知的な境界(竹内 勇剛)
 

Engineer event in Kyoto 10-04-17

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 36.
  • 37.
  • 38.
  • 40. #!/usr/bin/ruby #!/usr/bin/ruby h = Hash.new ARGF.each do |line| ARGF.each do |line| line.chomp! line.chomp! array = line.split(/,/) logs = line.split(/,/) uid = array[0] c = array[1] unless logs.empty? printf("%s,1n", logs[0]) count = 1 if h.key? uid end count = h[uid].to_i + 1 end end h.store uid, count end printf("#{h.length}")
  • 42. #!/usr/bin/ruby #!/usr/bin/ruby h = Hash.new ARGF.each do |line| ARGF.each do |line| line.chomp! line.chomp! array = line.split(/,/) logs = line.split(/,/) uid = array[0] c = array[1] unless logs.empty? printf("%s,1n", logs[0]) count = 1 if h.key? uid end count = h[uid].to_i + 1 end end h.store uid, count end printf("#{h.length}")
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.