• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(25833)  |  Call(23110)  |  Derive(0)  |  Import(2723)
sleep(seconds)

Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.

src/g/d/gdata-python-client-HEAD/samples/apps/adminsettings_example.py   gdata-python-client(Download)
  def Run(self):
    #pause 1 sec inbetween calls to prevent quota warning
    print 'Google Apps Domain: ', self.gd_client.domain
    time.sleep(1)
    print 'Default Language: ', self.gd_client.GetDefaultLanguage()
    time.sleep(1)
    print 'Organization Name: ', self.gd_client.GetOrganizationName()
    time.sleep(1)
    print 'Maximum Users: ', self.gd_client.GetMaximumNumberOfUsers()
    time.sleep(1)
    print 'Current Users: ', self.gd_client.GetCurrentNumberOfUsers()
    time.sleep(1)
    print 'Domain is Verified: ',self.gd_client.IsDomainVerified()
    time.sleep(1)
    print 'Domain is Verified: ',self.gd_client.IsDomainVerified()
    time.sleep(1)
    print 'Support PIN: ',self.gd_client.GetSupportPIN()
    time.sleep(1)
    print 'Domain Edition: ', self.gd_client.GetEdition()
    time.sleep(1)
    print 'Customer PIN: ', self.gd_client.GetCustomerPIN()
    time.sleep(1)
    print 'Domain Creation Time: ', self.gd_client.GetCreationTime()
    time.sleep(1)
    print 'Domain Country Code: ', self.gd_client.GetCountryCode()
    time.sleep(1)
    print 'Admin Secondary Email: ', self.gd_client.GetAdminSecondaryEmail()
    time.sleep(1)
    print 'CNAME Verification Record Name: ', cnameverificationstatus['recordName']
    print 'CNAME Verification Verified: ', cnameverificationstatus['verified']
    print 'CNAME Verification Method: ', cnameverificationstatus['verificationMethod']
    time.sleep(1)
    mxverificationstatus = self.gd_client.GetMXVerificationStatus()
    print 'MX Verification Verified: ', mxverificationstatus['verified']
    print 'MX Verification Method: ', mxverificationstatus['verificationMethod']
    time.sleep(1)
    print 'SSO Password Page: ', ssosettings['changePasswordUri']
    print 'SSO Whitelist IPs: ', ssosettings['ssoWhitelist']
    print 'SSO Use Domain Specific Issuer: ', ssosettings['useDomainSpecificIssuer']
    time.sleep(1)
    ssokey = self.gd_client.GetSSOKey()
    print 'SSO Key Modulus: ', ssokey['modulus']
    print 'SSO Key Exponent: ', ssokey['exponent']
    print 'SSO Key Algorithm: ', ssokey['algorithm']
    print 'SSO Key Format: ', ssokey['format']
    print 'User Migration Enabled: ', self.gd_client.IsUserMigrationEnabled()
    time.sleep(1)

src/g/o/google-data-api-HEAD/samples/apps/adminsettings_example.py   google-data-api(Download)
  def Run(self):
    #pause 1 sec inbetween calls to prevent quota warning
    print 'Google Apps Domain: ', self.gd_client.domain
    time.sleep(1)
    print 'Default Language: ', self.gd_client.GetDefaultLanguage()
    time.sleep(1)
    print 'Organization Name: ', self.gd_client.GetOrganizationName()
    time.sleep(1)
    print 'Maximum Users: ', self.gd_client.GetMaximumNumberOfUsers()
    time.sleep(1)
    print 'Current Users: ', self.gd_client.GetCurrentNumberOfUsers()
    time.sleep(1)
    print 'Domain is Verified: ',self.gd_client.IsDomainVerified()
    time.sleep(1)
    print 'Domain is Verified: ',self.gd_client.IsDomainVerified()
    time.sleep(1)
    print 'Support PIN: ',self.gd_client.GetSupportPIN()
    time.sleep(1)
    print 'Domain Edition: ', self.gd_client.GetEdition()
    time.sleep(1)
    print 'Customer PIN: ', self.gd_client.GetCustomerPIN()
    time.sleep(1)
    print 'Domain Creation Time: ', self.gd_client.GetCreationTime()
    time.sleep(1)
    print 'Domain Country Code: ', self.gd_client.GetCountryCode()
    time.sleep(1)
    print 'Admin Secondary Email: ', self.gd_client.GetAdminSecondaryEmail()
    time.sleep(1)
    print 'CNAME Verification Record Name: ', cnameverificationstatus['recordName']
    print 'CNAME Verification Verified: ', cnameverificationstatus['verified']
    print 'CNAME Verification Method: ', cnameverificationstatus['verificationMethod']
    time.sleep(1)
    mxverificationstatus = self.gd_client.GetMXVerificationStatus()
    print 'MX Verification Verified: ', mxverificationstatus['verified']
    print 'MX Verification Method: ', mxverificationstatus['verificationMethod']
    time.sleep(1)
    print 'SSO Password Page: ', ssosettings['changePasswordUri']
    print 'SSO Whitelist IPs: ', ssosettings['ssoWhitelist']
    print 'SSO Use Domain Specific Issuer: ', ssosettings['useDomainSpecificIssuer']
    time.sleep(1)
    ssokey = self.gd_client.GetSSOKey()
    print 'SSO Key Modulus: ', ssokey['modulus']
    print 'SSO Key Exponent: ', ssokey['exponent']
    print 'SSO Key Algorithm: ', ssokey['algorithm']
    print 'SSO Key Format: ', ssokey['format']
    print 'User Migration Enabled: ', self.gd_client.IsUserMigrationEnabled()
    time.sleep(1)

src/c/h/chimera-python-0.1/docs/examples/meade/meadetest.py   chimera-python(Download)
            print
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            print "stopping tracking..."
            sys.stdout.flush()
            while time.time() < finish:
                print ".",
                sys.stdout.flush ()
                time.sleep (1)
            print
 
            print "re-starting tracking..."
            print
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            print
            print "setting new date and time..."
            setInfo ()
 
            print
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            print
 
 
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            print
 
 
            while time.time() < finish:
                update_scroll_spinner()
                time.sleep (0.2)
            print
 
            print
 
            for i in range(10):
                printCoord ()
                time.sleep (1)
 
            print "="*50
 

src/k/a/kamaelia-HEAD/trunk/Code/Python/Bindings/STM/Example/Philosophers.py   kamaelia(Download)
   def run(self):
      while 1:
         print self.data
         time.sleep(0.2)
 
class Philosopher(Thread):
    def __init__ (self,forks = None, store=None,name=None):
                    X.commit()
                    gotforks = True
                else:
                    time.sleep(random.random())
            except ConcurrentUpdate:
                time.sleep(random.random())
            except BusyRetry:
                time.sleep(random.random())
    def run(self):
        while 1:
            X = self.getforks()
            time.sleep(0.2)
            self.releaseforks(X)
            time.sleep(0.3+random.random())
 
Philosopher(store=S,forks=["fork.%d" % N ,"fork.%d" % 1]).start()
 
while 1:
   time.sleep(100)
 

src/k/a/kamaelia-HEAD/trunk/Code/Python/Axon/Examples/STM/Philosophers.py   kamaelia(Download)
   def run(self):
      while 1:
         print self.data
         time.sleep(0.2)
 
class Philosopher(Thread):
    def __init__ (self,forks = None, store=None,name=None):
                    X.commit()
                    gotforks = True
                else:
                    time.sleep(random.random())
            except ConcurrentUpdate:
                time.sleep(random.random())
            except BusyRetry:
                time.sleep(random.random())
    def run(self):
        while 1:
            X = self.getforks()
            time.sleep(0.2)
            self.releaseforks(X)
            time.sleep(0.3+random.random())
 
Philosopher(store=S,forks=["fork.%d" % N ,"fork.%d" % 1]).start()
 
while 1:
   time.sleep(100)
 

src/k/a/kamaelia-HEAD/Code/Python/Bindings/STM/Example/Philosophers.py   kamaelia(Download)
   def run(self):
      while 1:
         print self.data
         time.sleep(0.2)
 
class Philosopher(Thread):
    def __init__ (self,forks = None, store=None,name=None):
                    X.commit()
                    gotforks = True
                else:
                    time.sleep(random.random())
            except ConcurrentUpdate:
                time.sleep(random.random())
            except BusyRetry:
                time.sleep(random.random())
    def run(self):
        while 1:
            X = self.getforks()
            time.sleep(0.2)
            self.releaseforks(X)
            time.sleep(0.3+random.random())
 
Philosopher(store=S,forks=["fork.%d" % N ,"fork.%d" % 1]).start()
 
while 1:
   time.sleep(100)
 

src/k/a/kamaelia-HEAD/Code/Python/Axon/Examples/STM/Philosophers.py   kamaelia(Download)
   def run(self):
      while 1:
         print self.data
         time.sleep(0.2)
 
class Philosopher(Thread):
    def __init__ (self,forks = None, store=None,name=None):
                    X.commit()
                    gotforks = True
                else:
                    time.sleep(random.random())
            except ConcurrentUpdate:
                time.sleep(random.random())
            except BusyRetry:
                time.sleep(random.random())
    def run(self):
        while 1:
            X = self.getforks()
            time.sleep(0.2)
            self.releaseforks(X)
            time.sleep(0.3+random.random())
 
Philosopher(store=S,forks=["fork.%d" % N ,"fork.%d" % 1]).start()
 
while 1:
   time.sleep(100)
 

src/p/y/pymol-HEAD/trunk/pymol/examples/devel/importing.py   pymol(Download)
# pymol.finish_launching() method now seems to be broken)
 
import time
time.sleep(1)
 
 
# put up some content
# play peek-a-boo with the window
 
if 1:
   time.sleep(5)
   pymol.cmd.window("hide")
   print "Peek-a-boo!"
   time.sleep(1)
   pymol.cmd.window("show")
   time.sleep(5)
   pymol.cmd.window("hide")
   print "Peek-a-boo!"
   time.sleep(1)
   pymol.cmd.window("show")
   time.sleep(5)
   time.sleep(5)
   pymol.cmd.window("hide")
   print "Peek-a-boo!"
   time.sleep(1)
   pymol.cmd.window("show")
 
# now quit 
 
   print "Quitting..."
   time.sleep(1)
   print "3..."
   time.sleep(1)
   print "2..."
   time.sleep(1)
   print "2..."
   time.sleep(1)
   print "1..."
   time.sleep(1)
   print "Die!"
 
# note, we cannot let the main thread terminate without first calling

src/l/a/Langtangen-HEAD/src/py/examples/pde/wave2D_func1_0.py   Langtangen(Download)
            if plot == 2:
                g.hardcopy(filename='tmp_%020f.ps' % t, enhanced=1, mode='eps',
                           color=0, fontname='Times-Roman', fontsize=14)
                time.sleep(1)
            time.sleep(0.2) # pause between frames
 
    t0 = time.clock()
    t1 = time.clock()
    cpu = t1 - t0
    print 'CPU time: %s version =' % version, cpu
    time.sleep(3)
    return cpu
 
 
                self.g.hardcopy(filename='tmp_%020f.ps' % t,
                                enhanced=1, mode='eps', fontsize=14,
                                color=0, fontname='Times-Roman')
                time.sleep(0.8)   # pause to finish plot
    import time
    t0 = time.clock()
    viz = Visualizer(plot)
    t1 = time.clock()
    cpu = t1 - t0
    print 'CPU time: %s version =' % version, cpu
    time.sleep(3)
    return cpu
 
 
    cpu = t1-t0
    print 'CPU time: %s version =' % version, cpu
    print 'max error:', max(error), 'min error:', min(error)
    time.sleep(3), max(error), min(error)
    return cpu
 
def benchmark(nx, tstop):

src/l/a/LabJackPython-HEAD/Examples/dca10Example.py   LabJackPython(Download)
See the dca10.py for more information on the DCA10 class.
"""
import dca10
from time import sleep
from time import time
 
 
d.startMotor(0.50)
print "Done"
 
sleep(3)
 
print "Changing motor direction...",
d.toggleDirection()
print "Done"
 
sleep(3)
 
print "The current drawn by the DCA-10 is %0.4f Amps" % usage
 
sleep(3)
 
print "Increasing motor speed to 100%...",
d.startMotor(1)
print "Done"
 
sleep(3)
    print "Measuring RPM...",
    a = int(time())
    s = d.readEncoder()
    sleep(2)
    f = d.readEncoder()
    b = int(time())
 
    d.startMotor(0.50)
    print "Done"
 
    sleep(3)
 
    print "Measuring RPM...",
    a = int(time())
    s = d.readEncoder()
    sleep(2)
 
    print "Motor spinning at %s CPM (%s Counts Per Second)." % (cpm, cps)
 
    sleep(3)
 
print "Stopping Motor...",
d.stopMotor()

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next