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 -*- | |
from Queue import Queue | |
# --------------------- | |
# Corotine Task Manager | |
# --------------------- |
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
<?php | |
class ModelBase { | |
static $attr_accessible = array(); | |
static $attr_readable = array(); | |
static $attr_writable = array(); | |
public function __get($attr) { | |
$getter = "get_{$attr}"; | |
if (in_array($attr, static::$attr_accessible) || in_array($attr, static::$attr_readable)) { |
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 -*- | |
import datetime | |
from flask import Flask | |
from mixins import db | |
from models import Post, User |
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
<?php | |
require_once 'observer.php'; | |
require_once 'subject.php'; | |
use Common\Observer\Observer; | |
use Common\Observer\Subject; | |
class Notice | |
{ | |
use Subject; |
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 -*- | |
import sys | |
import logging | |
import urllib | |
import bs4 | |
import requests | |
import requests.exceptions |
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 -*- | |
import sys | |
import StringIO | |
import requests | |
import PIL.Image | |
import tesserwrap |
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
syntax on | |
filetype off | |
" format and user interface | |
set nocompatible | |
set number | |
set softtabstop=4 tabstop=4 shiftwidth=4 | |
set expandtab | |
set autoindent | |
set hlsearch |
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 sh | |
if [ -n "`ifconfig | grep tun`" ]; then | |
export http_proxy="http://10.x.x.x:xxxx" # this proxy could only be used throught VPN. | |
else | |
export http_proxy="http://127.0.0.1:8087" # this is goagent proxy | |
fi | |
export https_proxy=$http_proxy | |
if [[ -n "$@" ]]; then | |
$@ |
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 -*- | |
def dispatch(entry_object, path, spliter="/"): | |
"""Starting with an entry object and dispatching the request by url path. | |
>>> class GroupList(object): | |
... exports = frozenset(["create"]) | |
... |
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 -*- | |
from functools import partial | |
from unittest import TestCase, main | |
from quixote.errors import QueryError | |
from validators import validate, ValidateError |
OlderNewer