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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
parse a file with a headline and json content like this: | |
GET /index/type/_search?pretty | |
{ | |
"query": { | |
"match": { |
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
let w:insert_input_active = 0 | |
function FcitxLeaveInsert() | |
let s:input_status = system("fcitx-remote") | |
if s:input_status == 2 | |
let w:insert_input_active = 1 | |
let l:a = system("fcitx-remote -c") | |
endif | |
endfunction | |
function FcitxEnterInsert() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
import re | |
import tornado.ioloop | |
import tornado.web | |
from tornado import httpclient | |
class MainHandler(tornado.web.RequestHandler): | |
@tornado.web.asynchronous |
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
class Application(tornado.web.Application): | |
def __init__(self): | |
tornado.web.Application.__init__(self, handlers, **settings) | |
self.db_session = db_session | |
self.redis = redis.StrictRedis() | |
self.session_store = RedisSessionStore(self.redis) | |
class BaseHandler(tornado.web.RequestHandler): |