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

All Samples(32)  |  Call(16)  |  Derive(0)  |  Import(16)
<comment-ja>
?????????????

@param len: ??????
@return: ???????
@rtype: str
</comment-ja>
<comment-en>
Generate random string
(more...)

        def generate_phrase(len,letters=None):
    """
    ?????????????

    @param len: ??????
    @return: ???????
    @rtype: str
    
    
    Generate random string

    @param len: length of string
    @return: The generated string
    @rtype: str
    
    """
    if letters is None:
        letters = string.digits + string.letters + '-.'
    random.seed()
    return ''.join(random.choice(letters) for i in xrange(len))
        


src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorageby1.py   karesansui(Download)
 
from karesansui.lib.virt.virt import KaresansuiVirtConnection
from karesansui.lib.utils import is_param, generate_phrase, create_file, \
    get_filelist, symlink2real
from karesansui.lib.const import ISCSI_COMMAND_GET, ISCSI_COMMAND_UPDATE, \
            options['user'] =  user
            try:
                password_file_name = '/tmp/' + generate_phrase(12,'abcdefghijklmnopqrstuvwxyz')
                create_file(password_file_name, password)
                options['password-file'] = password_file_name

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorage.py   karesansui(Download)
from pysilhouette.command import dict2command
 
from karesansui.lib.utils import is_param, generate_phrase, create_file, \
    get_filelist, symlink2real
from karesansui.lib.const import ISCSI_COMMAND_GET, ISCSI_COMMAND_ADD, \
            options['user'] =  user
            try:
                password_file_name = '/tmp/' + generate_phrase(12,'abcdefghijklmnopqrstuvwxyz')
                create_file(password_file_name, password)
                options['password-file'] = password_file_name

src/k/a/karesansui-HEAD/bin/ready_mount.py   karesansui(Download)
    import karesansui
    from karesansui import __version__
    from karesansui.lib.utils import load_locale, execute_command, pipe_execute_command, generate_phrase, get_filesystem_info
    from karesansui.lib.const import KARESANSUI_TMP_DIR, MOUNT_CMD, UMOUNT_CMD, FORMAT_CMD, YES_CMD
 
        self.up_progress(10)
        try:
            tmp_dir_name = generate_phrase(12,'abcdefghijklmnopqrstuvwxyz')
            tmp_dir_path = "%s/%s" % (KARESANSUI_TMP_DIR, tmp_dir_name)
            os.mkdir(tmp_dir_path)

src/k/a/karesansui-HEAD/karesansui/lib/rrd/df.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_df_file_exist(rrd_dir, dev):
def create_df_graph(_, lang, graph_dir, rrd_dir, start, end, dev, type=None):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))
    graph_filepath = "%s/%s" % (graph_dir, graph_filename)
 
    rrd_filepath = ("%s/df/df-%s.rrd" % (rrd_dir, dev),

src/k/a/karesansui-HEAD/karesansui/lib/rrd/interface.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_interface_file_exist(rrd_dir, dev):
def create_interface_graph(_, lang, graph_dir, rrd_dir, start, end, dev, type):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))
    graph_filepath = "%s/%s" % (graph_dir, graph_filename)
 
    rrd_filepath = ("%s/interface/if_%s-%s.rrd" % (rrd_dir, type, dev),

src/k/a/karesansui-HEAD/karesansui/lib/rrd/disk.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_disk_file_exist(rrd_dir, dev):
def create_disk_graph(_, lang, graph_dir, rrd_dir, start, end, dev, type):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))
    graph_filepath = "%s/%s" % (graph_dir, graph_filename)
 
    rrd_filepath = ("%s/disk-%s/disk_%s.rrd" % (rrd_dir, dev, type),

src/k/a/karesansui-HEAD/karesansui/lib/rrd/users.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_users_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))

src/k/a/karesansui-HEAD/karesansui/lib/rrd/uptime.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_uptime_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))

src/k/a/karesansui-HEAD/karesansui/lib/rrd/memory.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_memory_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))

src/k/a/karesansui-HEAD/karesansui/lib/rrd/load.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_load_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
    graph_filename = "%s.png" % (generate_phrase(12,'abcdefghijklmnopqrstuvwxyz'))

  1 | 2  Next