A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option("--debug", action="store_true", dest="debug") | |
(options, args) = parser.parse_args() | |
# Access the option like so; in this case it will be stored as a boolean | |
print options.debug |
Font | 字体 |
---|---|
SimSun | 宋体 |
SimHei | 黑体 |
KaiTi | 楷体 |
Microsoft YaHei | 微软雅黑 |
Microsoft JhengHei | 微软正黑体 |
FangSong | 仿宋 |
PingFang SC | 苹方 |
MingLiU | 细明体 |
Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
<?php | |
/** | |
*/ | |
Mail::raw('hello world', function($message) { $message->to('myawesomeemail@domain.com')->subject('Testing mails'); }); | |
/** | |
* Notification | |
*/ |
Here's a mechanism for transforming a discrete input flow into an output flow where the internal process state can be implemented with loop/recur. As an example I provide an implementation of "batching with both a maximum size and a maximum delay" referenced in leonoel/missionary#109.
A common pattern for discrete flows is that we want to create an output flow from an input flow, where:
/* usbreset -- send a USB port reset to a USB device | |
* | |
* Compile using: gcc -o usbreset usbreset.c | |
* | |
* | |
* */ | |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}