This file contains hidden or 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
| #!python | |
| # coding: utf-8 | |
| """Zip/unzip files under specified folders.""" | |
| import sys | |
| from os import walk, path, remove | |
| import zipfile | |
This file contains hidden or 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
| [ {"category": "sound", "symbol": "\u3105", "combine": null, "basic": "b"}, | |
| {"category": "sound", "symbol": "\u3106", "combine": null, "basic": "p"}, | |
| {"category": "sound", "symbol": "\u3107", "combine": null, "basic": "m"}, | |
| {"category": "sound", "symbol": "\u3108", "combine": null, "basic": "f"}, | |
| {"category": "sound", "symbol": "\u3109", "combine": null, "basic": "d"}, | |
| {"category": "sound", "symbol": "\u310a", "combine": null, "basic": "t"}, | |
| {"category": "sound", "symbol": "\u310b", "combine": null, "basic": "n"}, | |
| {"category": "sound", "symbol": "\u310c", "combine": null, "basic": "l"}, | |
| {"category": "sound", "symbol": "\u310d", "combine": null, "basic": "g"}, | |
| {"category": "sound", "symbol": "\u310e", "combine": null, "basic": "k"}, |
This file contains hidden or 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
| #!python | |
| # coding: utf-8 | |
| tbl = [ | |
| {'symbol': u'ㄅ', 'basic': 'b', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄆ', 'basic': 'p', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄇ', 'basic': 'm', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄈ', 'basic': 'f', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄉ', 'basic': 'd', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄊ', 'basic': 't', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄋ', 'basic': 'n', 'combine': None, 'category': 'sound'}, |
This file contains hidden or 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
| #!python | |
| # coding: utf-8 | |
| tbl = [ | |
| {'symbol': u'ㄅ', 'basic': 'b', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄆ', 'basic': 'p', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄇ', 'basic': 'm', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄈ', 'basic': 'f', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄉ', 'basic': 'd', 'combine': None, 'category': 'sound'}, | |
| {'symbol': u'ㄊ', 'basic': 't', 'combine': None, 'category': 'sound'}, |
This file contains hidden or 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
| #define I1_SIZE (3+1) | |
| #define I2_SIZE (35+1) | |
| #define I3_SIZE (2+1) | |
| #define I4_SIZE (1488+1) | |
| #define I5_SIZE (35+1) | |
| #define I6_SIZE (2+1) | |
| #define I7_SIZE (488+1) | |
| #define TOTAL_SIZE (I1_SIZE*I2_SIZE*I3_SIZE*I4_SIZE*I5_SIZE*I6_SIZE*I7_SIZE) |
This file contains hidden or 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
| site_name: My Docs | |
| pages: | |
| - Home: index.md | |
| - Category1: category1.md | |
| - Category2: category2.md | |
| - About: about.md | |
| theme: mkdocs | |
| use_directory_urls: false |
This file contains hidden or 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
| #!python | |
| import random | |
| def avg2(data): | |
| result = 0.0 | |
| for i, num in enumerate(data): | |
| result = float(i * result + num) / (i+1) | |
| return result | |
This file contains hidden or 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
| class PidController(object): | |
| def __init__(self, kp=1.0, ki=0.0, kd=0.0, setpoint=0.0, integrator_range=0.0): | |
| self.reset() | |
| self.integrator_range = integrator_range | |
| self.integrator_max = abs(integrator_range) | |
| self.integrator_min = -1 * self.integrator_max; | |
| self.kp = kp | |
| self.ki = ki | |
| self.kd = kd | |
| self.set_setpoint(setpoint) |
This file contains hidden or 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
| #!python | |
| import sip | |
| sip.setapi(u'QDate', 2) | |
| sip.setapi(u'QDateTime', 2) | |
| sip.setapi(u'QString', 2) | |
| sip.setapi(u'QTextStream', 2) | |
| sip.setapi(u'QTime', 2) | |
| sip.setapi(u'QUrl', 2) | |
| sip.setapi(u'QVariant', 2) | |
| from PyQt4.QtGui import * |