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
""" | |
Examples: | |
>>> a = lock_array(np.zeros((5, 5))) # locked array | |
>>> b = np.zeros((5, 5)) # default array | |
# >>> a[:, 3] = 1. # You can't update locked arrays | |
>>> b[:, 3] = 1. | |
>>> with unlocked(a, b): |
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
def format(st, *args, **kwds): | |
""" Format with string interpolation | |
String interpolation for python version < 3.6 | |
See also | |
- https://www.python.org/dev/peps/pep-0498/ | |
- http://stackoverflow.com/questions/6618795/get-locals-from-calling-namespace-in-python | |
""" | |
>>> a = 1 | |
>>> b = 2 |
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 python2.6 | |
# coding: utf-8 | |
import twitter | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
ACCESS_TOKEN_KEY = '' | |
ACCESS_TOKEN_SECRET = '' |
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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>jsDeferred</title> | |
<script type="text/javascript" src="/js/lib/jsdeferred.js"></script> | |
<script type="text/javascript"> | |
/* | |
Some tests of deferred using jsdeferred ver 0.3.4. (http://github.com/cho45/jsdeferred) |