Skip to content

Instantly share code, notes, and snippets.

sublime text 2

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

  • クロスプラットフォーム
    • windows
    • mac
    • linux
@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
@devlights
devlights / ubuntu-xrdp-keyboard-layout-ja.md
Last active December 21, 2015 16:59
Ubuntu 12.04でxrdpで日本語キーボードを認識させる

https://forums.ubuntulinux.jp/viewtopic.php?id=13399

$ sudo su -
# cd /etc/xrdp
# wget http://www.mail-archive.com/xrdp-devel@lists.sourceforge.net/msg00263/km-e0010411.ini
# mv km-e0010411.ini km-0411.ini 
# chmod 644 km-0411.ini
# ln -s km-0411.ini km-e0010411.ini
# ln -s km-0411.ini km-e0200411.ini
@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.

@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
@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):
@ikegami-yukino
ikegami-yukino / nfkc_compare.txt
Created December 30, 2013 19:32
Pythonのunicodedata.normalize('NFKC')で正規化される文字の一覧
# -*- coding: utf-8 -*-
import unicodedata
for unicode_id in xrange(65536):
char = unichr(unicode_id)
normalized_char = unicodedata.normalize('NFKC', char)
if char != normalized_char:
if len(normalized_char) == 1:
print u'[%d] %s -> [%d] %s' % (unicode_id, char, ord(normalized_char), normalized_char)
else:
@nappa7878
nappa7878 / ProgressBar.bas
Last active May 26, 2021 23:27
PowerPointのスライドにプログレスバーを付加するマクロ
Sub MakeProgressBar()
Const r As String = "00" '色・RGB値のR
Const g As String = "99" '色・RGB値のG
Const b As String = "00" '色・RGB値のB
Const pbH As Long = 10 '高さ
Const pbBG As Single = 0.6 '背景の透過性
Dim i As Long
Dim s As Shape
var attempts = 1;
function createWebSocket () {
var connection = new WebSocket();
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...
@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))