Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
dic = {}
print dic
dic['YEAR'] = '2015'
dic['MONTH'] = '06'
dic['DAY'] = '26'
@lehanto
lehanto / ruby exif
Created November 19, 2014 14:54
ruby exifr example
require 'rubygems'
require 'exifr'
@exif = EXIFR::JPEG::new('hoge.jpg')
# カメラ機種
puts "カメラ:#{@exif.model}"
# シャッタースピード
@lehanto
lehanto / ruby exifr
Created November 19, 2014 14:48
ruby
gem install exifr
@lehanto
lehanto / ex_3-1.pl
Created July 21, 2014 07:05
初めてのPerl
#!/usr/bin/env perl
use strict;
use warnings;
my @lines;
my @reverse_lines;
@lines = <STDIN>;
print @lines;
@lehanto
lehanto / ex_3-3.pl
Created July 21, 2014 06:57
初めてのPerl
#!/usr/bin/env perl
use strict;
use warnings;
chomp(my @name_lines = <STDIN>);
my @sorted_name_lines = sort @name_lines;
print "@sorted_name_lines";
@lehanto
lehanto / ex_3-2.pl
Created July 21, 2014 06:54
初めてのPerl
#!/usr/bin/env perl
use strict;
use warnings;
my @names = qw/ fred betty barney dino wilma pebbles bamm-bamm /;
chomp(my @nums = <STDIN>);
foreach (@nums) {
print $names [$_ - 1];
@lehanto
lehanto / list_context.pl
Created July 17, 2014 13:33
初めてのPerl
@lines = <STDIN>; //リストコンテキストでの標準入力
@lehanto
lehanto / list_qw.pl
Created July 10, 2014 02:23
初めてのPerl
qw ( hoge Taro Hanako )
@lehanto
lehanto / list.pl
Created July 10, 2014 02:21
初めてのPerl
("hoge", "Taro", "Hanako")
@lehanto
lehanto / ex_2-5.pl
Created July 8, 2014 14:17
初めてのPerl
#!/usr/bin/env perl
use strict;
use warnings;
my $num;
my $string;
my $answer;
print "num >";
$num = <STDIN>;