Skip to content

Instantly share code, notes, and snippets.

@ikegami-yukino
ikegami-yukino / wikipedia_anob.py
Created December 19, 2013 16:48
Wikipediaの不要見出し語をカットするためのsuffix一覧
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter
import re
suffixes = Counter()
re_anob = re.compile(u'(?P<A>.+[^の])の(?P<B>[^の].+)')
re_hiragana = re.compile(u'[ぁ-ゖ]+')
def extract_anob(text):
@neubig
neubig / crf.py
Created November 7, 2013 10:59
This is a script to train conditional random fields. It is written to minimize the number of lines of code, with no regard for efficiency.
#!/usr/bin/python
# crf.py (by Graham Neubig)
# This script trains conditional random fields (CRFs)
# stdin: A corpus of WORD_POS WORD_POS WORD_POS sentences
# stdout: Feature vectors for emission and transition properties
from collections import defaultdict
from math import log, exp
import sys
@ramnathv
ramnathv / README.md
Last active December 26, 2015 12:59
Publish Slidify Decks as Gists

Slidify now allows you to publish your slide decks as gists. You will need the dev version of slidify to use this feature.

require(devtools)
install_github(c('slidify', 'slidifyLibraries'), 'ramnathv', ref = 'dev')

Let us first create a directory for our slide deck and open an index.Rmd file to author our presentation.

@devlights
devlights / ubuntu-xrdp-keyboard-layout-ja.md
Last active December 21, 2015 16:59
Ubuntu 12.04でxrdpで日本語キーボードを認識させる
@kunst1080
kunst1080 / xls2csv.bat
Created March 31, 2013 07:29
EXCELファイルをカンマ区切りのCSVファイルに変換する。 EXCELを解析するのが面倒なので、変換にはEXCELの機能を使用。
@if (1==1) /*
@echo off
if "%~2"=="" goto :USAGE
if "%~1"=="/?" goto :USAGE
rem ********************************************************************************
:MAIN
CScript //nologo //E:JScript "%~f0" %*
If ERRORLEVEL 1 goto :USAGE

sublime text 2

http://www.sublimetext.com/
Total: USD $70 ちょっと値上がってましたね。。

  • クロスプラットフォーム
    • windows
    • mac
    • linux
@mollifier
mollifier / zshrc_useful.sh
Last active November 24, 2024 10:20
少し凝った zshrc
# 少し凝った zshrc
# License : MIT
# http://mollifier.mit-license.org/
########################################
# 環境変数
export LANG=ja_JP.UTF-8
# 色を使用出来るようにする
@stantonk
stantonk / flake8.xml
Created January 26, 2013 01:17
PyCharm Flake8 Configuration XML File
<!-- Drop this in ~/Library/Preferences/PyCharm20/tools -->
<!-- make sure you set the path to flake8 executable for your machine in the COMMAND option -->
<?xml version="1.0" encoding="UTF-8"?>
<toolSet name="Flake8">
<tool name="Flake8 File" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="/usr/local/share/python/flake8" />
<option name="PARAMETERS" value="--max-line-length=120 --ignore=E301,E302,E261,E262,W404 $FileDir$/$FileName$" />
<option name="WORKING_DIRECTORY" value="$FileDir$" />
@wch
wch / server.r
Last active September 8, 2023 20:25
Shiny example: dynamic input fields
data_sets <- c("mtcars", "morley", "rock")
shinyServer(function(input, output) {
# Drop-down selection box for which data set
output$choose_dataset <- renderUI({
selectInput("dataset", "Data set", as.list(data_sets))
})
# Check boxes
@wizard-paso
wizard-paso / SublimeText2Memo.md
Last active July 30, 2021 23:02
Sublime Text 2 Windows版メモです

Sublime Text 2 memo (Windows)

最低限やっておくべきこと

インストール

portable versionでも良いが、インストールしていないと、縦に選択等のAltキーを使用するショートカットが使えなかった。

Sublime Package Controlのインストール