Skip to content

Instantly share code, notes, and snippets.

@rokujyouhitoma
rokujyouhitoma / main.py
Created June 5, 2018 02:22
convert wikipedia titles to mecab
import codecs
import re
import sys
import unicodedata
REGEXP_ALIAS = re.compile(r'_\(.*?\)')
REGEXP_NUMBER = re.compile(r'^[0-9]+$')
def IsSyllabaryType(char, syllabaryType):
return unicodedata.name(char).startswith(syllabaryType)
@rokujyouhitoma
rokujyouhitoma / example.py
Created June 12, 2018 06:39
example apscheduler(TwistedScheduler)
rom datetime import datetime
from apscheduler.schedulers.twisted import TwistedScheduler
from scrapy.crawler import CrawlerProcess
from scrapy.crawler import CrawlerRunner
from scrapy.utils.project import get_project_settings
from scrapy.utils.log import configure_logging
from twisted.internet import reactor, defer
spiders = []
@rokujyouhitoma
rokujyouhitoma / sample.py
Created June 22, 2018 04:34
context decorator
# See: https://blog.amedama.jp/entry/2015/10/16/224740
import inspect
def context(session = Session):
def _decorator(func):
def __decorator(*args, **kwargs):
name = "context"
value = "some thing"
try:
args_names = inspect.getargspec(func)[0]
target_pos = args_names.index(name)
@rokujyouhitoma
rokujyouhitoma / YRPgunso.md
Created May 3, 2020 00:30 — forked from ryunosinfx/YRPgunso.md
YRP 軍曹が携帯電話開発の現状を語る 

引用元

https://lolipop-teru.ssl-lolipop.jp/gunsou/index.html

253 名前:YRP常駐from群馬 投稿日:04/07/24 21:42

俺たちは、仕様も知らされぬまま横須賀に送り込まれた。

依頼主も孫請けらしく、正確な情報はかなり伝言ゲーム的にそれも口頭でしか伝えられない。 俺たちは、経験5年の軍曹1人と、経験2年の上等兵1人と、新人の2等兵3人の小隊だった。 現地に就くなり、現場は火を噴いた有様だった。果てしないデバッグの果てに