Ruby Can Learn Something A Little

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

Ruby Can Learn Something A Little

4d9515a22091b00688c6fe9db89e0601?s=128

cafedomancer

March 04, 2017
Tweet

Transcript

  1. ٕؽ٦ر
 ؗؕ؎ؙؖءُؐ
 ثّحزرٕؗ 3VCZDBOMFBSOTPNFUIJOHBMJUUMF !DBGFEPNBODFS 3VCZ4BQQPSPCFBN

  2. 4IPIFJ6NFNPUP !DBGFEPNBODFS

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. 堣唒㷕统כװ׏ג׷

  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. 1ZUIPOא״ְ

  20. 3VCZד׮װ׶׋ְ

  21. None
  22. None
  23. None
  24. None
  25. None
  26. None
  27. None
  28. None
  29. ☺3VCZד׮דֹ׷ַ׮

  30. XPSEWFDװ׏ג׫׋

  31. XPSEWFDהכ

  32. ׋הִל˘

  33. ) 'SBODF

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

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

    <   > <   > <   > <   > <   >
  36. * 4QBJO + #FMHJVN , /FUIFSMBOET - *UBMZ  )

    'SBODF    <   > <   > <   > <   > <   >
  37. קַח׮˘

  38.  LJOH

  39.  LJOH 

  40.  LJOH  NBO 

  41.  LJOH  NBO  

  42.  LJOH  NBO    XPNBO

  43.  LJOH  NBO    XPNBO 

  44.  LJOH  NBO    XPNBO  ❓

  45.  LJOH  NBO    XPNBO 

  46.  LJOH  NBO    XPNBO  

    RVFFO
  47.  LJOH  NBO    XPNBO  

    RVFFO <   > <   > <   > <   >
  48.  LJOH  NBO    XPNBO  

    RVFFO <   > <   > <   > <   >
  49. XPSEWFDהכ ֮׷⽃铂׾⡦׵ַך侧⦼ד邌植׃׋ְ ⽃铂ה⽃铂ךꟼ⤘׾侧⦼ד鎘皾׃׋ְ ׉ך侧⦼כ⽃铂꟦ך䠐㄂涸ז騃ꨄ׾
 邌植׃גְג׮׵ְ׋ְ ֿ̔׸׾؝ٝؾُ٦ةח実׭ג׮׵ֲ

  50. הְֲ׻ֽד˘

  51. ٓ؎ـٓٔאֻ׏ ג׫׋

  52. 6رٌׅ׷׌״

  53. 兛鸐ח⹛ְ׋

  54. 3VCZד׮דֹ׋

  55. 3VCZד׮דֹ׋ /.BUSJYזוךٓ؎ـٓٔ׾⢪ֲֿהד
 ֮׷玎䏝תד㹋鄲דֹ׋ 㷕统׃׋穠卓׾铣׫⳿ׅ鿇ⴓכ3VCZדדֹגְ׷ ׋׌׃㷕统׾遤זֲך؝٦سכ$鎉铂ךתת
 3VCZח׃ג׫׋ְ  *3VCZOPUFCPPLז׿ַ׮֮׷

  56. ٌحزَٔة؎

  57. None
  58. None
  59. None
  60. None
  61. ن٦شأٓؐٝس

  62. 3VCZד⡲׏׋ַ׵

  63. ׮׏ה3VCZד麇רֲ

  64. 3VCZך؝٦س嗚稊

  65. 3VCZך؝٦س嗚稊 XPSEWFDכ荈搫鎉铂Ⳣ椚䪮遭ךמהא فؚٗٓىؚٝ鎉铂כ荈搫鎉铂ה䕎䒭鎉铂 ך⚥꟦ח֮׷׮ךה罋ִ׷ֿה׮דֹ׷ XPSEWFDח3VCZך؝٦س׾㷕统
 ׇׁג׫׷ה⡦ָ饯ֿ׷ךַ

  66. 3VCZך؝٦س׾䱱ׅ

  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
  68. ✂ز٦ؙٝחⴓ鍑ׅ׷

  69. ✂ز٦ؙٝחⴓ鍑ׅ׷ require 'ripper' lists = files.map do |file| Ripper.lex(File.read(file)).map do

    |token| ¦ token.slice(1, 2) end end
  70. ♶銲ז׮ך׾《׶ꤐֻ

  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
  72. 6رٌׅ׷׌״

  73. ׅ׀٦ְ׋٦ך׃٦

  74. ׅ׀٦ְ׋٦ך׃٦ ⡦ך䞔㜠ךوحؾؚٝ׮遤ז׏גְזְ
 ח׮ꟼ׻׵׆䠐㄂׾䬄⳿׃גְ׷ 䠐㄂ח㛇בֻ嗚稊װ؟آؑأزָדֹ׉ֲ ׉ך㢌侧װًاحسָ⢪׻׸׷
 ؝ٝذؗأزך椚鍑ח׮⡦ַאזָ׷ַ׮

  75. ֶתֽ

  76. ֶתֽ ֿךز٦ؙכ3VCZ$POG5BJXBOח䫎־׋׮ךָ
 ك٦أחז׏גְ׷ ➙傈כ1ZUIPOـٔحآ׾稱➜׃׋ֽוSVCFYװ WJSUVBM@NPEVMFהְ׏׋麩ֲ倯ぢ׮〳腉䚍ה׃ג֮׷ ر؍٦فٓ٦صؚٝ׾3VCZדװ׷ך׮鑧׃׋ַ׏׋ֽו 儗꟦ָ駈׶זַ׏׋ 4BQQPSPCFBNכ㥨ֹזֿה׃גְג葺ְךד
 㥨ֹזֿה׃ח遤ֹת׃׳ֲ

  77. ⿫罋俑柃 3VCZך׃ֻ׫ XPSEWFDח״׷荈搫鎉铂Ⳣ椚 ئַٗ׵⡲׷%FFQ-FBSOJOH