PEP: 3165
python module name: asyncio, new in Python 3.4
reference implementation: tulip
backport: trollius ( python >= 2.6)
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
KEY=XXXXXXXXXXXX | |
HOST="https://metrics.crisidev.org" | |
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search | jq -r '.[].uri|ltrimstr("db/")'); do | |
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash | jq '.dashboard' > dashboards/$dash.json | |
done |
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
mysqldump --single-transaction --no-create-info \ | |
--ignore-table zabbix.history \ | |
--ignore-table zabbix.history_str \ | |
--ignore-table zabbix.history_log \ | |
--ignore-table zabbix.history_uint \ | |
--ignore-table zabbix.history_text \ | |
--ignore-table zabbix.trends \ | |
--ignore-table zabbix.trends_uint \ | |
--ignore-table zabbix.auditlog \ | |
--ignore-table zabbix.auditlog_details \ |
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
import collections | |
from django.utils import six | |
from django.core.paginator import PageNotAnInteger, EmptyPage | |
class Paginator(object): | |
def __init__(self, object_list, per_page, orphans=0, | |
allow_empty_first_page=True): |
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
Goroutine By Example | |
==================== | |
尹吉峰 2013/11/05 | |
Python Thread | |
------------- | |
```python | |
import time | |
import threading |
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
jQuery.extend({ | |
parseQuerystring: function(){ | |
var nvpair = {}; | |
var qs = window.location.search.replace('?', ''); | |
var pairs = decodeURI(qs).split('&'); | |
$.each(pairs, function(i, v){ | |
var pair = v.split('='); | |
var key = pair[0], value = pair[1]; | |
if(key in nvpair){ | |
if(!$.isArray(nvpair[key])){ nvpair[key] = $.makeArray(nvpair[key]);} |