2011-04-01から1ヶ月間の記事一覧

How simple rules determine pedestrian behavior and crowd disasters Mehdi Moussaïd, Dirk Helbing, and Guy TheraulazPNAS vol. 108 no. 17 6884-6888 (2011) 歩行者が、目的地に向かって進む人間行動のモデル化。 うりとしては our approach overcomes …

The blogosphere as an excitable social medium: Richter's and Omori's Law in media coverage P. Klimek, W. Bayer and S. Thurner arXiv:1102.2091 主に2008年のU.S. Presidential electionの670日間のブログをクロールして、単語の出現頻度をみる。 デ…

Human dynamics: Darwin and Einstein correspondence patterns J. G. Oliveira and A.-L. Barabási Nature 437, 1251 (2005) emailとかない時代にhuman dynamicsがどうだったのかを DarwinとEinsteinの手紙のやり取りデータを使って、調べた論文。 背景には…

2列目に数字かアルファベット(大+小)が含まれていない場合のみ、データを出力。 awk '{a=gsub(/[0-9a-zA-Z]/,"",$2);if(a==0)print $0}' test.txt2列目に半角文字が含まれていない場合のみデータ出力。 awk '{a=gsub(/[ -~]/,"",$2);if(a==0)print $0}' test…

文字コードの変換。 ユニコード、UTF-8とか。 # -*- coding: utf-8 -*-" import sys import unicodedata #全角半角混じった文章(utf8)をunicodeに変換します。 ustr=unicode('これはテストtestです!','utf-8') print ustr #半角に整形します。 s=unicodeda…