This file contains 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
# coding:utf-8 | |
# Usage: ruby aozora_sort.rb URL [--morph] > kokoro_sorted.txt | |
%w(kconv MeCab open-uri rubygems nokogiri).each{|x| require x} | |
def main(argv) | |
morph = argv[1] == '--morph' | |
text = Nokogiri::HTML.parse(open(argv[0]).read).xpath('/html/body').text | |
text.gsub!(/[\r\n\s ]/u, '') | |
arr = morph ? split_with_morph(text) : split_with_char(text) | |
arr.sort.each_with_index do |s, i| |
This file contains 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
ldd linux-x86/linux-x86-skypekit | |
linux-gate.so.1 => (0xf77a7000) | |
librt.so.1 => /lib32/librt.so.1 (0xf7782000) | |
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf764c000) | |
libasound.so.2 => /usr/lib32/libasound.so.2 (0xf755a000) | |
libXv.so.1 => /usr/lib32/libXv.so.1 (0xf7554000) | |
libXss.so.1 => /usr/lib/i386-linux-gnu/libXss.so.1 (0xf7550000) | |
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7465000) | |
libm.so.6 => /lib32/libm.so.6 (0xf743b000) | |
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf741c000) |
This file contains 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
#!/usr/bin/perl | |
use utf8; | |
use strict; | |
use warnings; | |
use Encode; | |
use File::Slurp; | |
use URI::Escape qw(uri_unescape); | |
use LWP::Simple; |
This file contains 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
#!/usr/bin/perl | |
# this script is an implementation of http://textt.net/mapi/20101018201937 | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
my ($ustream_url, $file, $stop) = @ARGV; |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use MozRepl; | |
use Net::Pcap::Easy; | |
my ($ustream_url, $file, $stop, $device) = @ARGV; | |
my $usage = <<USAGE; |