Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
long(x=0) -> long
long(x, base=10) -> long

Convert a number or string to a long integer, or return 0L if no arguments
are given.  If x is floating point, the conversion truncates towards zero.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.
The base defaults to 10.  Valid bases are 0 and 2-36.  Base 0 means to(more...)

src/k/t/ktbs-HEAD/examples/browser-history/firefox/processinfo.py   ktbs(Download)
        cpu_percent = round(self.p.get_cpu_percent(), 1)
        # récupération des informations en mémoire et conversion en Mo
        memory_total_phymem = round(psutil.TOTAL_PHYMEM / (1024 * 1024), 0)
        memory_info = self.p.get_memory_info()
        memory_rss = round(memory_info[0] / (1024 * 1024), 1)

src/s/l/slapos.core-HEAD/slapos/collect/snapshot.py   slapos.core(Download)
  def __init__(self):
    self.cpu_num_core = psutil.NUM_CPUS
    self.cpu_frequency = 0
    self.cpu_type = 0
    self.memory_size = psutil.TOTAL_PHYMEM  

src/s/a/salt-HEAD/salt/modules/ps.py   salt(Download)
        # TOTAL_PHYMEM is deprecated but with older psutil versions this is
        # needed as a fallback.
        return psutil.TOTAL_PHYMEM
 
 

src/s/a/salt-thin-HEAD/salt/modules/ps.py   salt-thin(Download)
        # TOTAL_PHYMEM is deprecated but with older psutil versions this is
        # needed as a fallback.
        return psutil.TOTAL_PHYMEM
 
 

src/m/y/MySQL-performance-tuner-HEAD/plugins/plugin_system_query.py   MySQL-performance-tuner(Download)
    def generate(self, **kwargs):
        result = { 'mem_phys_total': psutil.TOTAL_PHYMEM,
                   'mem_phys_avail': psutil.avail_phymem(),
                   'mem_phys_used' : psutil.used_phymem(),
                   'mem_virt_total': psutil.total_virtmem(),

src/s/a/salt-2014.1.3/salt/modules/ps.py   salt(Download)
        salt '*' ps.total_physical_memory
    '''
    return psutil.TOTAL_PHYMEM
 
 

src/d/j/django-system-monitor-0.5/sysmon/templatetags/sysmon_tags.py   django-system-monitor(Download)
        # memory
        mem_info = memTuple(
            total=bytes2human(pu.TOTAL_PHYMEM),
            used=pu.virtual_memory().percent)
 

src/i/n/invesalius3-HEAD/invesalius/utils.py   invesalius3(Download)
    except:
        print "Exception! psutil version < 0.3 (not recommended)"
        ram_total = psutil.TOTAL_PHYMEM  # this is for psutil < 0.3
        ram_free = 0.8 * psutil.TOTAL_PHYMEM 
        swap_free = psutil.avail_virtmem()

src/d/j/django-system-monitor-HEAD/sysmon/templatetags/sysmon_tags.py   django-system-monitor(Download)
        # memory
        mem_info = memTuple(
            total=bytes2human(pu.TOTAL_PHYMEM),
            used=pu.virtual_memory().percent)
 

src/m/a/mayan-HEAD/apps/installation/models.py   mayan(Download)
        namespace.add_property('processor', _(u'Processor'), platform.processor(), report=True)
        namespace.add_property('cpus', _(u'Number of CPUs'), psutil.NUM_CPUS, report=True)
        namespace.add_property('total_phymem', _(u'Total physical memory'), pretty_size(psutil.TOTAL_PHYMEM), report=True)
        namespace.add_property('disk_partitions', _(u'Disk partitions'), '; '.join(['%s %s %s %s' % (partition.device, partition.mountpoint, partition.fstype, partition.opts) for partition in psutil.disk_partitions()]))
 

  1 | 2  Next