- 青空文庫(小説集)
- 名大会話コーパス
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
# -*- coding: utf-8 -*- | |
''' | |
Print some properties of members of your Mac AddressBook. | |
https://developer.apple.com/library/mac/documentation/userexperience/Reference/AddressBook/Miscellaneous/AddressBook_Constants/Reference/reference.html#//apple_ref/doc/uid/TP40003952-CH3g-SW6 | |
$ pip install -U pyobjc-core | |
$ pip install -U pyobjc | |
''' | |
from collections import OrderedDict | |
from Foundation import NSDate, NSDateFormatter |
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
#!/bin/bash -e | |
# These need to be set. | |
#export EC2_HOME="/path/to/ec2-api-tools" | |
#export AWS_ACCESS_KEY='XXXXXXXXXXXXXXXXXXXX' | |
#export AWS_SECRET_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
#export PATH="$PATH:${EC2_HOME}/bin" | |
ami_id='ami-123abc12' | |
availability_zone='eu-west-1a' | |
keypair="[email protected]" |
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
import logging | |
from nose.plugins import logcapture | |
def iter_captured_logs(pluck=None): | |
handler = get_nose_log_handler() | |
# need to call `format` in order to let it compose the `message` attr for us | |
format = handler.format | |
for r in handler.buffer: | |
format(r) |
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> | |
<html> | |
<head> | |
<link rel="stylesheet" href="./style.css"/> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js"></script> | |
</head> | |
<body> | |
<div class="form-group"> |
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
# -*- coding: utf-8 -*- | |
import threading | |
from nose.tools import eq_ | |
import celery | |
from celery._state import _get_current_app | |
eq_('3.0.22', celery.__version__) | |
eq_('default', _get_current_app().main) |
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
initial version |
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
# -*- coding: utf-8 -*- | |
""" | |
Ask every voice found by `say -v "?"` to say the demo text. | |
Note that `say` only returns voices for your system language. | |
""" | |
import time | |
from subprocess import Popen, PIPE | |
def say(voice, text): |
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
curl -XPUT 'http://localhost:9200/_template/template_logstash/' -d ' | |
{ | |
"template": "logstash-*", | |
"mappings": { | |
"_default_": { | |
"_source": { "compress": "true" } | |
} | |
} | |
}' |
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 | |
"""pre-commit-pep8.py | |
requirements | |
- pep8==1.3.3 | |
in .git/hooks/pre-commit | |
#!/bin/sh | |
./path/to/this/script/in/your/repo/pre-commit-pep8.py |