This module is moved to https://github.com/ikegami-yukino/jaconv
Try jaconv!
$ pip install jaconv
perl -pe 's/(?=[ドト])ゥ(?<!ー)//g;s/(?<=[キシチニヒミリィ])イ/ー/g;s/(?<=[ァゥェォ])ィ/イ/g;s/イション/ーション/g;s/ォウ/ォー/g;s/スィ/シー/g;s/ロウ/ロー/g;s/゛//g;s/ウカ/ーカ/g;s/トギャザー/トゥゲザー/g;s/ボキャビュラリー/ボキャブラリー/g;' < bep-eng.dic.txt |
# -*- coding: utf-8 -*- | |
MAX_DIGIT = 10 # 最大桁数(intなら10桁) | |
NUMS = ['0','1','2','3','4','5','6','7','8','9'] | |
def itoa(num): | |
result = '' | |
previous = 0 | |
for i in range(MAX_DIGIT,-1,-1): | |
temp = num / (10**i) |
# -*- coding: utf-8 -*- | |
""" | |
しょぼかるからアニメのタイトルと読み仮名、キャラクター名を取得する | |
引数で結果を書き込むファイルを指定します | |
""" | |
import sys, urllib2, re, codecs, time | |
base_url = 'http://cal.syoboi.jp' |
--- train.c 2012-10-29 01:46:32.000000000 +0900 | |
+++ train-new.c 2013-02-12 19:53:21.000000000 +0900 | |
@@ -135,10 +135,14 @@ | |
void do_cross_validation() | |
{ | |
int i; | |
- int total_correct = 0; | |
double total_error = 0; | |
double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0; | |
double *target = Malloc(double, prob.l); |
# -*- coding: utf-8 -*- | |
import urllib, re, os | |
from BeautifulSoup import BeautifulSoup | |
urls = (\ | |
'http://search.biglobe.ne.jp/rss/ranking.xml',\ | |
'http://trackword.rssfeed.cc/index.xml',\ | |
'http://www.jtb.co.jp/ranking/keyword/rss.aspx',\ | |
'http://www.nilab.info/buzztube/buzztube.xml',\ | |
'http://ranking.goo.ne.jp/rss/keyword/keyrank_all1/index.rdf',\ |
This module is moved to https://github.com/ikegami-yukino/jaconv
Try jaconv!
$ pip install jaconv
<?php | |
/** | |
* 1500ったーのCSVから余分な情報をカット | |
* | |
* RTを含むツイート、行頭の1500ったーのナンバーとユーザー名と投稿日、行末の引用元URL | |
* 文中のURL、返信宛先(@fooとか)をカット | |
* | |
* USAGE | |
* このスクリプトと同じディレクトリに1500ったーのCSVを置き | |
* コマンドプロンプトやターミナルから以下のとおり入力 |
#!/bin/bash | |
# usage: | |
# ./randomsplit.sh [FILE] [division number] | |
# | |
# Check the number of parameters | |
if [ $# -ne 2 ]; then | |
echo "usage: ./randomsplit.sh [FILE] [division number]" 1>&2 | |
exit 1 |
#!/bin/bash | |
# Check the number of parameters | |
if [ $# -ne 4 ]; then | |
echo "usage: ./cv.sh [FILE] [division number] [train command] [test command]" 1>&2 | |
echo "The file for training is named as trainfile" 1>&2 | |
echo "The file for testing is named as testfile" 1>&2 | |
echo "for example:" 1>&2 | |
echo './cv.sh data 5 "opal trainfile train.model -" "opal - train.model testfile"' 1>&2 | |
exit 1 |
#include<stdio.h> | |
#define NULL_LENGTH 4 | |
char* reverse(char* text){ | |
int i, length = sizeof text - NULL_LENGTH; | |
for(i = length;i > (length / 2);i--){ | |
*(text+(i)) = *(text+(i)) ^ *(text+(length-i)); | |
*(text+(length-i)) = *(text+(i)) ^ *(text+(length-i)); | |
*(text+(i)) = *(text+(i)) ^ *(text+(length-i)); | |
} |