RHEL 7 发布应该算是比较大的新闻了吧~
人民群众纷纷表示红帽步子太大不要扯着蛋了比较好...
F_XZ: 完全没关心...
猫注意的新功能有 virtio 等 KVM 优化, docker 支持, 以及 ruby 2.0, python 2.7, java 7 之类的吧
""" | |
This gist shows how to run asyncio loop in a separate thread. | |
It could be useful if you want to mix sync and async code together. | |
Python 3.7+ | |
""" | |
import asyncio | |
from datetime import datetime | |
from threading import Thread | |
from typing import Tuple, List, Iterable |
function Bp(a, b) { | |
var c = b.split("."); | |
b = Number(c[0]) || 0; | |
for (var d = [], e = 0, f = 0; f < a.length; f++) { | |
var h = a.charCodeAt(f); | |
128 > h ? d[e++] = h : (2048 > h ? d[e++] = h >> 6 | 192 : (55296 == (h & 64512) && f + 1 < a.length && 56320 == (a.charCodeAt(f + 1) & 64512) ? (h = 65536 + ((h & 1023) << 10) + (a.charCodeAt(++f) & 1023), d[e++] = h >> 18 | 240, d[e++] = h >> 12 & 63 | 128) : d[e++] = h >> 12 | 224, d[e++] = h >> 6 & 63 | 128), d[e++] = h & 63 | 128) | |
} | |
a = b; | |
for (e = 0; e < d.length; e++) a += d[e], a = Ap(a, "+-a^+6"); | |
a = Ap(a, "+-3^+b+-f"); |
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
var list = new Array("Bulgaria", "93.123.23.1/59", | |
"Egypt", "197.199.253.1/59", | |
"Egypt", "197.199.254.1/59", | |
"Hong Kong", "218.189.25.129/187", | |
"Hong Kong", "218.253.0.76/92", "218.253.0.140/187", | |
"Iceland", "149.126.86.1/59", | |
"Indonesia", "111.92.162.4/6", "111.92.162.12/59", | |
"Iraq", "62.201.216.196/251", | |
"Japan", "218.176.242.4/251", | |
"Kenya", "41.84.159.12/30", |
""" | |
Contains reCaptcha fields for WTForms which can be used | |
for various forms. This library depends on `recaptcha-client` ~> 1.0.6. | |
Example usage is below. | |
Defining a form with a ``RecaptchaField``: | |
from wtforms import Form | |
from recaptcha_field import RecaptchaField |
class ProtocolBufferMixin(object): | |
"""Protocol Buffer support for RequestHandler objects.""" | |
MIMETYPE = 'application/x-protobuf' | |
def read_protobuf(self, message_type, data): | |
"""Attempts to parse a protocol buffer message from the given data.""" | |
# Create the message object and attempt to parse the data into it. | |
try: | |
message = message_type() |
""" | |
tornado_static is a module for displaying static resources in a Tornado web | |
application. | |
It can take care of merging, compressing and giving URLs ideal renamings | |
suitable for aggressive HTTP caching. | |
(c) [email protected] | |
""" |