従来からの JavaScript の書き方だと「定義」するときにグルーバル環境を汚染してしまう課題があった。 window.Hoge
みたいに書いてしまう問題。 回避策はたくさんあるけど、人によって書き方が異なると「使う」ときに大変。 特に複数のライブラリが依存し合うスクリプトの場合、読み込み順序に気を配る必要がある。 こうした "Definition" と "Dependency References" の課題を解決する方法のひとつとして AMD (Asynchronous Module Definition) がある。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Bind multiple TSV files into Excel workbook. | |
Requires "xlwt" for Python 2.x, or "xlwt-future" for Python 3.x series. | |
""" | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>東京ポリゴン</title> | |
<meta name="description" content=""> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# See: | |
# encoding - Python 3, let json object accept bytes or let urlopen output strings - Stack Overflow | |
# http://stackoverflow.com/questions/6862770/python-3-let-json-object-accept-bytes-or-let-urlopen-output-strings | |
import json | |
import urllib.request | |
REMOTE_URL = 'http://data.okfn.org/data/cpi/datapackage.json' | |
res = urllib.request.urlopen(REMOTE_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"encoding/csv" | |
"fmt" | |
log "github.com/Sirupsen/logrus" | |
"github.com/docopt/docopt-go" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
default/layout.html | |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | |
Sphinx layout template for the default theme. | |
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
:license: BSD, see LICENSE for details. | |
#} | |
{% extends "basic/layout.html" %} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""%prog [options] svn-repository [svn-repository [ ... ]] | |
""" | |
import argparse | |
import codecs | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Dump database table schema as reST text. | |
This script requires configuration file which include title text and database | |
connection string. | |
Example configuration file is defined below in JSON :: |
OlderNewer