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
;; from: uim/scm/elatin-rules.scm | |
;; | |
;; Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
;; | |
;; All rights reserved. | |
;; The translation tables in this file were derived from the | |
;; emacs-lisp source files latin-pre.el, latin-post.el, latin-alt.el, | |
;; and latin-ltx.el, included in GNU Emacs. The following is the | |
;; original copyright notice therein. |
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/env python3 | |
import posixpath | |
from elftools.dwarf.descriptions import describe_form_class | |
from elftools.elf.elffile import ELFFile | |
from elftools.dwarf.compileunit import CompileUnit | |
from elftools.dwarf.die import DIE | |
from elftools.dwarf.lineprogram import (LineProgram, LineProgramEntry) | |
from elftools.dwarf.dwarfinfo import DWARFInfo | |
from elftools.dwarf.callframe import (RegisterRule, CFARule) |
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
// | |
// coroutine.hpp | |
// ~~~~~~~~~~~~~ | |
// | |
// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
// | |
// Distributed under the Boost Software License, Version 1.0. (See accompanying | |
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
// |
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 getColor(): | |
r = requests.get("http://example.jp/live.jpg") | |
if r.ok: | |
image = PIL.Image.open(io.BytesIO(r.content)) | |
# 座標 x,y = (10,10), (100, 10), ..., (600, 20) の平均 r,g,b を得る | |
return map(statistics.mean, | |
zip(*(image.getpixel(pos) for pos in itertools.product((10, 100, 200, 300, 400, 500, 600), (10, 20))))) |