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 -*- | |
# | |
""" | |
Output Example: | |
start: num=0 st=1557729555989 | |
start: num=1 st=1557729555989 | |
start: num=2 st=1557729555989 |
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 json | |
class StatusCodeField(int): | |
def __new__(cls, status_code, message): | |
obj = int.__new__(cls, status_code) | |
obj.message = message | |
return obj | |
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 -*- | |
# | |
# @file test_metaclass.py | |
# @author kaka_ace <[email protected]> | |
# @date Nov 03 2015 | |
# @brief | |
# | |
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 -*- | |
# | |
# @file models/base.py | |
# @author kaka_ace <[email protected]> | |
# @date | |
# @brief | |
# | |
from sqlalchemy.ext.declarative import ( |
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 -*- | |
# | |
# @file model/model/base.py | |
# @author kaka_ace <[email protected]> | |
# @date | |
# @brief | |
# | |
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 -*- | |
# | |
# @file base.py | |
# @author kaka_ace <[email protected]> | |
# @date Jun 13 2015 | |
# @breif | |
# | |
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 -*- | |
# | |
# @file curl_request.py | |
# @author kaka_ace <[email protected]> | |
# @date Jan 10 2015 | |
# @breif learn from human_curl | |
# @refrences: | |
# http://pycurl.sourceforge.net/doc/curlmultiobject.html | |
# http://curl.haxx.se/libcurl/c/curl_multi_info_read.html |
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
# | |
# Simple MySQL systemd service file | |
# | |
# systemd supports lots of fancy features, look here (and linked docs) for a full list: | |
# http://www.freedesktop.org/software/systemd/man/systemd.exec.html | |
# | |
# Note: this file ( /usr/lib/systemd/system/mysql.service ) | |
# will be overwritten on package upgrade, please copy the file to | |
# | |
# /etc/systemd/system/mysql.service |
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
#!/bin/sh | |
# | |
# init.d script with LSB support. | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <[email protected]> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. |
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 -*- | |
# | |
# @file gevent_zmq_redis_demo.py | |
# @author kaka_ace <[email protected]> | |
# @date Tue Oct 14 2014 | |
""" | |
fetures: there are two concurrent tasks | |
1. From Redis server, Getting the notify msg with BLPOP operation, |
NewerOlder