Python __builtin__.False() Examples

The following are 2 code examples of __builtin__.False(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module __builtin__ , or try the search function .
Example #1
Source File: train.py    From iaf with MIT License 5 votes vote down vote up
def get_data(problem, n_train, n_batch):
        
    if problem == 'cifar10':
        # Load data
        data_train, data_valid = G.misc.data.cifar10(False)
    if problem == 'svhn':
        # Load data
        data_train, data_valid = G.misc.data.svhn(False, True)
    elif problem == 'mnist':
        # Load data
        validset = False
        if validset:
            data_train, data_valid, data_test = G.misc.data.mnist_binarized(validset, False)
        else:
            data_train, data_valid = G.misc.data.mnist_binarized(validset, False)
        data_train['x'] = data_train['x'].reshape((-1,1,28,28))
        data_valid['x'] = data_valid['x'].reshape((-1,1,28,28))
    elif problem == 'lfw':
        data_train = G.misc.data.lfw(False,True)
        data_valid = G.ndict.getRows(data_train, 0, 1000)
    

    data_init = {'x':data_train['x'][:n_batch]}
        
    if n_train > 0:
        data_train = G.ndict.getRows(data_train, 0, n_train)
        data_valid = G.ndict.getRows(data_valid, 0, n_train)
    
    return data_train, data_valid, data_init 
Example #2
Source File: ClimateSERV_API_Access.py    From RHEAS with MIT License 4 votes vote down vote up
def getJobResult_wait_ForJobProgressCycle(jobID, APIAccessKey, BaseURL):
    
    isInCycle = True
    cycleCompleteCount = 0
    jobStatus = "unset" # "inprogress", "complete", "error_generic", "error_timeout"
    numOfCyclesToTry = 1800
    
    while(isInCycle == True):
        
         
        # get Job Progress value
        currentJobProgress = check_JobProgress(jobID, APIAccessKey, BaseURL)
        printMe("Current Job Progress: " + str(currentJobProgress) + ".  JobID: " + str(jobID))
        time.sleep(1) 
        
        # Process Job Status
        if(currentJobProgress == 100):
            jobStatus = "complete"
            isInCycle = False
        elif(currentJobProgress == -1):
            jobStatus = "error_generic"
            isInCycle = False
        else:
            jobStatus = "inprogress"
            isInCycle = True
            
        # Should we bail out of this loop?
        if(cycleCompleteCount > numOfCyclesToTry):
            jobStatus = "error_timeout"
            isInCycle = False
        
        cycleCompleteCount += 1
        
        # For long wait times, echo the cycle
        if(cycleCompleteCount % 50 == 0):
            printMe("Still working.... Cycle: " + str(cycleCompleteCount))
        
        
        
        
    # Process return (did the job fail or succeed..)
    printMe("Result of Job Status Cycle: " + str(jobStatus))
    if(jobStatus == "complete"):
        return True
    else:
        return False
    

# attempt to Convert epochTime to ints and then sort