Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(53)  |  Call(39)  |  Derive(0)  |  Import(14)
<comment-ja>
????????????
@param string: ???????
@return: ???????True????????False
</comment-ja>
<comment-en>
TODO: English Comment
</comment-en>

        def is_empty(string):
    """
    ????????????
    @param string: ???????
    @return: ???????True????????False
    
    
    TODO: English Comment
    
    """
    if string and 0 < len(string.strip()):
        return False
    else:
        return True
        


src/k/a/karesansui-HEAD/karesansui/gadget/hostby1reportby1by1.py   karesansui(Download)
import karesansui
from karesansui.lib.rest import Rest, auth, OUTPUT_TYPE_FILE
from karesansui.lib.utils import is_param, is_empty, \
    str2datetime, create_epochsec, remove_file
from karesansui.lib.rrd.rrd import RRD
        today = datetime.datetime.today()
 
        if is_param(self.input, 'report_start_day') and not is_empty(self.input.report_start_day):
            start_day = str2datetime(self.input.report_start_day,
                                     DEFAULT_LANGS[self.me.languages]['DATE_FORMAT'][0])
        else:
            start_day = today - datetime.timedelta(1)
 
        if is_param(self.input, 'report_start_time') and not is_empty(self.input.report_start_time):
            start_minute = today.minute
 
        if is_param(self.input, 'report_end_day') and not is_empty(self.input.report_end_day):
            end_day = str2datetime(self.input.report_end_day,
                                     DEFAULT_LANGS[self.me.languages]['DATE_FORMAT'][0])
        else:
            end_day = today
 
        if is_param(self.input, 'report_end_time') and not is_empty(self.input.report_end_time):

src/k/a/karesansui-HEAD/karesansui/lib/net/http.py   karesansui(Download)
 
import karesansui
from karesansui.lib.utils import is_empty
 
def is_ssl(hostname, port=443):
        port = config["application.proxy.port"]
 
    if is_empty(host) is True:
        return None, None
 
        password = config["application.proxy.password"]
 
    if is_empty(user) is True:
        return None, None
 
    return user, password
 
def proxies(proxy_host, proxy_port, user=None, password=None, method="http"):
 
    if is_empty(user) is False and is_empty(password) is False \

src/k/a/karesansui-HEAD/karesansui/gadget/init.py   karesansui(Download)
    ID_MIN_LENGTH, ID_MAX_LENGTH
 
from karesansui.lib.utils import is_param, is_empty
 
def validates_user(obj):
 
    if _password_flag == True:
        if not is_empty(obj.input.password) or \
           not is_empty(obj.input.retype):
            check = checker.check_password(

src/k/a/karesansui-HEAD/karesansui/gadget/me.py   karesansui(Download)
    PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, \
    LANGUAGES_MIN_LENGTH, LANGUAGES_MAX_LENGTH
from karesansui.lib.utils import is_param, is_empty, create_file
from karesansui.gadget.userby1 import compare_password
 
 
    if _password_flag == True:
        if not is_empty(obj.input.password) or \
           not is_empty(obj.input.new_password) or \
           not is_empty(obj.input.retype):

src/k/a/karesansui-HEAD/karesansui/gadget/job.py   karesansui(Download)
from karesansui.lib.const import JOB_LIST_RANGE, DEFAULT_LANGS, MACHINE_HYPERVISOR
from karesansui.lib.pager import Pager
from karesansui.lib.utils import str2datetime, is_param, is_empty
from karesansui.db.access._2pysilhouette import jg_findbyalltype, jg_findby1
 
 
            machine_name = self.input.name.strip()
            if is_empty(machine_name):
                machine_name = None
 
            if is_empty(self.input.start):
                start = str2datetime(self.input.start,
                                     DEFAULT_LANGS[self.me.languages]['DATE_FORMAT'][0])
            if is_empty(self.input.end):
                end = None
            else:
                 jobgroup_ids.append(m_m2j[1].jobgroup_id)
            jobgroup_status = self.input.status
            if is_empty(jobgroup_status):
                jobgroup_status = None
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1job.py   karesansui(Download)
from karesansui.lib.search import validates_jobsearch
from karesansui.lib.pager import Pager, validates_page
from karesansui.lib.utils import str2datetime, is_param, is_empty
from karesansui.lib.const import JOB_LIST_RANGE, DEFAULT_LANGS,\
    MACHINE_NAME_MIN_LENGTH, MACHINE_NAME_MAX_LENGTH,\
            machine_name = self.input.name.strip()
 
            if is_empty(machine_name):
                machine_name = None
 
            if is_empty(self.input.start):
                                     DEFAULT_LANGS[self.me.languages]['DATE_FORMAT'][0])
 
            if is_empty(self.input.end):
                end = None
            else:
 
            jobgroup_status = self.input.status
            if is_empty(jobgroup_status):
                jobgroup_status = None
 

src/k/a/karesansui-HEAD/karesansui/gadget/userby1.py   karesansui(Download)
from karesansui.lib.pager import Pager, validates_page
from karesansui.lib.search import validates_query
from karesansui.lib.utils import is_param, is_empty
 
def validates_user(obj):
 
    if _password_flag == True:
        if not is_empty(obj.input.password) or \
           not is_empty(obj.input.new_password) or \
           not is_empty(obj.input.retype):
        user.languages = self.input.languages
 
        if not is_empty(self.input.new_password):
            if compare_password(self, user) == False:
                return web.badrequest(self.view.alert)

src/k/a/karesansui-HEAD/karesansui/gadget/guestby1job.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
from karesansui.lib.pager import Pager, validates_page
from karesansui.lib.utils import str2datetime, is_param, is_empty
from karesansui.lib.virt.virt import KaresansuiVirtException, \
     KaresansuiVirtConnection
            for user in users:
                users_id.append(user.id)
            if is_empty(self.input.start):
                start = None
            else:
                start = str2datetime(self.input.start,
                                     DEFAULT_LANGS[self.me.languages]['DATE_FORMAT'][0])
            if is_empty(self.input.end):
 
            jobgroup_status = self.input.status
            if is_empty(jobgroup_status):
                jobgroup_status = None
            jobgroups = jg_findbyalltype(self.pysilhouette.orm, JOBGROUP_TYPE["SERIAL"],

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1reportby1.py   karesansui(Download)
from karesansui.lib.virt.virt import KaresansuiVirtConnection
from karesansui.lib.rrd.rrd import RRD
from karesansui.lib.utils import is_param, is_empty, \
    str2datetime, create_epochsec, get_proc_cpuinfo, \
    get_fs_info, get_hdd_list, get_ifconfig_info, \

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1staticroute.py   karesansui(Download)
    CHECK_UNIQUE
 
from karesansui.lib.utils import is_param, is_empty, preprint_r, \
    base64_encode, get_ifconfig_info
 

  1 | 2  Next