Micro Python Reference
| cmath | mathematical functions for complex numbers |
| gc | control the garbage collector |
| math | mathematical functions |
| os | basic “operating system” services |
| ### Project: | |
| # http://www.bradsprojects.com/electronics/Bradsprojects-PICnDuino.html | |
| # http://www.kickstarter.com/projects/1411349329/picnduino-dual-microcontroller-development-platfor | |
| ### Doc: | |
| # http://www.bradsprojects.com/kickstarter/PICnDuinoMacInstructions.pdf | |
| ### Download and install: | |
| # http://www.ftdichip.com/Drivers/VCP/MacOSX/ FTDIUSBSerialDriver_v2_2_18.dmg |
| #!/usr/bin/env python | |
| import sys | |
| from itertools import * | |
| from wavebender import * | |
| def half_wave(frequency=19000, framerate=44100, amplitude=0.5, | |
| skip_frame=0): | |
| for s in sine_wave(frequency, framerate, amplitude, |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import datetime | |
| import os | |
| import sys | |
| post = '' | |
| prev_date = '' | |
| posts = [] |
| # coding: utf8 | |
| import re | |
| REPR_UNICODE_CHAR = re.compile(r'(?<!\\)(\\u[0-9a-f]{4,4})') | |
| def readable_repr(obj): | |
| '''Return printing-friendly unicode string |
| #!/usr/bin/env python2 | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select |
| "***************************************************************************** | |
| "" NeoBundle core | |
| "***************************************************************************** | |
| if has('vim_starting') | |
| set nocompatible " Be iMproved | |
| " Required: | |
| set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
| endif |
| #!/usr/bin/env python | |
| from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
| import os | |
| PORT_NUMBER = 8080 | |
| class HttpStubDirHandler(BaseHTTPRequestHandler): |
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ | |
在这个系列的帖子里我会回顾我在创建搞科技创业公司时所积累的知识和经验。