Try Chardet(https://pypi.python.org/pypi/chardet)
(Need to change font)
chcp 65001
Want to get back?
Try Chardet(https://pypi.python.org/pypi/chardet)
(Need to change font)
chcp 65001
Want to get back?
# https://docs.python.org/2/library/timeit.html | |
>>> def foo(n): | |
... res = [] | |
... for i in range(n): res.append(n) | |
... return res | |
... | |
>>> def foo2(n): | |
... return [i for i in range(n)] | |
... | |
>>> foo(10) == foo2(10) |
import json | |
import re | |
import urllib | |
someUrl = '...' | |
f = urllib.urlopen(someUrl) | |
try: | |
myDict = json.load(f) | |
except ValueError: | |
# ValueError: Invalid control character at: line xxx column yyy (char zzz) |
# -*- coding: utf8 -*- | |
# http://lxml.de/tutorial.html | |
from lxml import etree | |
with open('test.xml', 'r') as f: | |
'''doc = etree.parse(f) | |
for elem in doc.iter('*'): | |
print elem.tag, elem.text.encode('utf8') | |
for k, v in elem.items(): | |
print ('\t%s\t%s' % (k, v)).encode('utf8')''' |
# -*- coding: utf8 -*- | |
# http://ask.python.kr/question/67705/%ED%95%9C%EA%B8%80%EC%9E%90%EC%86%8C%EB%B6%84%ED%95%B4-%EB%B0%A9%EB%B2%95/ | |
# http://soooprmx.com/wp/archives/2165 | |
# http://sugarcube.cvs.sourceforge.net/viewvc/sugarcube/plugins/HangulConvert/hangul.py | |
# https://kldp.org/node/116891?destination=node%2F116891 | |
# http://warmz.tistory.com/717 | |
# 유니코드 한글 시작 : 44032, 끝 : 55199 |
...
python numba ImportError: No module named llvm.core
...
http://www.llvmpy.org/llvmpy-doc/0.11.2/doc/getting_started.html#installation
package tutorial; | |
message Person { | |
required string name = 1; | |
required int32 id = 2; | |
optional string email = 3; | |
enum PhoneType { | |
MOBILE = 0; | |
HOME = 1; |
# https://docs.python.org/dev/library/contextlib.html#contextlib.ContextDecorator | |
# http://preshing.com/20110924/timing-your-code-using-pythons-with-statement/ | |
$ python2.7 | |
Python 2.7.6 (default, Nov 26 2013, 12:13:15) | |
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from contextlib import contextmanager | |
>>> import time | |
>>> @contextmanager | |
... def timer(): |