Datamodel/data/modified_userInfo.py
def gene_picture(size):
    '''Generate the pictures from the given size.
    input:
        - size, the number of pictures need to generate
    return:
        - a list, contain the size of the pictures.
    '''
    picturesList = list()

    folderName = "photo"
    files = os.listdir(folderName)
    files = [f for f in files if "jpg" in f]
    #print (files)
    #print (len(files))
    #files = [f for f in files if "jpg" in f]

    #picturesList = random.sample(files, size)
    picturesList = [os.sep.join([folderName, jpgName]) for jpgName in random.sample(files, size)]

    return picturesList
Generate the pictures from the given size.
    input:
        - size, the number of pictures need to generate
    return:
        - a list, contain the size of the pictures.
    
Generate the pictures from the given size.
input:
size, the number of pictures need to generate
return:
a list, contain the size of the pictures.
Generate the pictures from the given size . input : size the number of pictures need to generate return : a list contain the size of the pictures .
def gene_picture(size):
    picturesList = list()
    folderName = "photo"
    files = os.listdir(folderName)
    files = [f for f in files if "jpg" in f]
    picturesList = [os.sep.join([folderName, jpgName]) for jpgName in random.sample(files, size)]
    return picturesList
def gene_picture ( size ) : picturesList = list ( ) folderName = "photo" files = os . listdir ( folderName ) files = [ f for f in files if "jpg" in f ] picturesList = [ os . sep . join ( [ folderName , jpgName ] ) for jpgName in random . sample ( files , size ) ] return picturesList
Generate the pictures from the given size.
Generate the pictures from the given size .
'''Generate the pictures from the given size.
    input:
        - size, the number of pictures need to generate
    return:
        - a list, contain the size of the pictures.
    ''' #print (files) #print (len(files)) #files = [f for f in files if "jpg" in f] #picturesList = random.sample(files, size)
size