Ruby Can Learn Something A Little

4d9515a22091b00688c6fe9db89e0601?s=47 cafedomancer
March 04, 2017
210

Ruby Can Learn Something A Little

4d9515a22091b00688c6fe9db89e0601?s=128

cafedomancer

March 04, 2017
Tweet

Transcript

  1. 3.
  2. 4.
  3. 5.
  4. 6.
  5. 7.
  6. 8.
  7. 9.
  8. 11.
  9. 12.
  10. 13.
  11. 14.
  12. 15.
  13. 16.
  14. 17.
  15. 18.
  16. 21.
  17. 22.
  18. 23.
  19. 24.
  20. 25.
  21. 26.
  22. 27.
  23. 28.
  24. 33.
  25. 35.

    * 4QBJO + #FMHJVN , /FUIFSMBOET - *UBMZ ) 'SBODF

    <   > <   > <   > <   > <   >
  26. 36.

    * 4QBJO + #FMHJVN , /FUIFSMBOET - *UBMZ  )

    'SBODF    <   > <   > <   > <   > <   >
  27. 38.
  28. 47.

     LJOH  NBO    XPNBO  

    RVFFO <   > <   > <   > <   >
  29. 48.

     LJOH  NBO    XPNBO  

    RVFFO <   > <   > <   > <   >
  30. 57.
  31. 58.
  32. 59.
  33. 60.
  34. 67.

    3VCZך؝٦س׾䱱ׅ require 'linguist' files = [] Dir.entries('repos').each do |repo| next

    if repo == '.' || repo == '..' dirname = File.join(root, repo) files += Dir.glob("#{dirname}/**/*").select do |file| ¦ File.file?(file) end end files = files.select do |file| begin ¦ blob = Linguist::FileBlob.new(file) ¦ blob.language.name.downcase == 'ruby' rescue ¦ false end end
  35. 71.

    ♶銲ז׮ך׾《׶ꤐֻ lists = lists.map do |list| list.select do |token| ¦

    !BLACKLIST.include?(token.first) end end lists = lists.map do |list| list.map { |token| token[1] }.join(' ') end File.open('text', 'wb') do |io| io.puts(lists.reject(&:empty?).join("\n")) end
  36. 75.