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

All Samples(1051)  |  Call(955)  |  Derive(0)  |  Import(96)
log10(x)

Return the base 10 logarithm of x.

src/s/h/shedskin-HEAD/examples/ml/minilight.py   shedskin(Download)
from image import Image
from scene import Scene
 
from math import log10
from sys import argv, stdout
from time import time
 
            if SAVE_PERIOD < time() - last_time or frame_no == iterations:
                last_time = time()
                save_image(image_file_pathname, image, frame_no)
            stdout.write('\b' * ((int(log10(frame_no - 1)) if frame_no > 1 else -1) + 12) + 'iteration: %u' % frame_no)
            stdout.flush()
        print '\nfinished'
    except KeyboardInterrupt:

src/s/h/shedskin-HEAD/examples/ml/image.py   shedskin(Download)
#  MiniLight Python : minimal global illumination renderer
#
#  Copyright (c) 2007-2008, Harrison Ainsworth / HXA7241 and Juraj Sukop.
#  http://www.hxa7241.org/
 
 
from math import log10
    def calculate_tone_mapping(self, pixels, divider):
        sum_of_logs = 0.0
        for i in range(len(pixels) / 3):
            y = Vector3f_seq(pixels[i * 3: i * 3 + 3]).dot(RGB_LUMINANCE) * divider
            sum_of_logs += log10(y if y > 1e-4 else 1e-4)
        log_mean_luminance = 10.0 ** (sum_of_logs / (len(pixels) / 3))
        a = 1.219 + (DISPLAY_LUMINANCE_MAX * 0.25) ** 0.4

src/a/p/appscript-HEAD/py-appscript/trunk/appscript_3x/sample/appscript/Add_line_numbers_to_TextEdit_doc.py   appscript(Download)
#!/usr/bin/env python3
 
# Adds a zero-padded line number to every line in the front TextEdit document.
 
from appscript import *
from math import log10
 
textref = app('TextEdit').documents[1].text
 
lc = textref.paragraphs.count()
fstr = '%%.%ii ' % (int(log10(lc)) + 1)

src/a/p/appscript-HEAD/py-appscript/trunk/appscript_2x/sample/appscript/Add_line_numbers_to_TextEdit_doc.py   appscript(Download)
#!/usr/bin/env python
 
# Adds a zero-padded line number to every line in the front TextEdit document.
 
from appscript import *
from math import log10
 
textref = app('TextEdit').documents[1].text
 
lc = textref.paragraphs.count()
fstr = '%%.%ii ' % (int(log10(lc)) + 1)

src/a/p/appscript-0.21.1/appscript_3x/sample/appscript/Add_line_numbers_to_TextEdit_doc.py   appscript(Download)
#!/usr/bin/env python3
 
# Adds a zero-padded line number to every line in the front TextEdit document.
 
from appscript import *
from math import log10
 
textref = app('TextEdit').documents[1].text
 
lc = textref.paragraphs.count()
fstr = '%%.%ii ' % (int(log10(lc)) + 1)

src/a/p/appscript-0.21.1/appscript_2x/sample/appscript/Add_line_numbers_to_TextEdit_doc.py   appscript(Download)
#!/usr/bin/env python
 
# Adds a zero-padded line number to every line in the front TextEdit document.
 
from appscript import *
from math import log10
 
textref = app('TextEdit').documents[1].text
 
lc = textref.paragraphs.count()
fstr = '%%.%ii ' % (int(log10(lc)) + 1)

src/v/t/VT-USRP-daughterboard-drivers_python-HEAD/gnuradio-examples/python/apps/hf_radio/radio.py   VT-USRP-daughterboard-drivers_python(Download)
from ssbdemod import *
from ssbagc   import *
from ui       import *
from math     import log10
 
class graph( gr.hier_block ):
    def __init__( self, fg ):

src/h/e/heatsource-HEAD/src/Stream/PyHeatsource.py   heatsource(Download)
from __future__ import division
from math import pow, sqrt, sin, log, atan, sin, cos, pi, tan, acos, exp,radians, degrees, log10
from random import randint
from bisect import bisect
 
class HeatSourceError(Exception): pass
 
    #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    #7 - Received by Bed
    Water_Path = d_w / cos(atan((sin(radians(Zenith)) / 1.3333) / sqrt(-(sin(radians(Zenith)) / 1.3333) * (sin(radians(Zenith)) / 1.3333) + 1)))         #Jerlov (1976)
    Trans_Stream = 0.415 - (0.194 * log10(Water_Path * 100))
    if Trans_Stream > 1:
        Trans_Stream = 1
    Dummy1 = F_Direct[5] * (1 - Trans_Stream)       #Direct Solar Radiation attenuated on way down
    Dummy6 = Dummy5 * (1 - Trans_Stream)               #Direct Solar Radiation attenuated on way up
    F_Direct[6] = Dummy1 + Dummy4 + Dummy6
    F_Direct[7] = Dummy3 - Dummy4
    Trans_Stream = 0.415 - (0.194 * log10(100 * d_w))
    if Trans_Stream > 1:
        Trans_Stream = 1
    Dummy1 = F_Diffuse[5] * (1 - Trans_Stream)      #Diffuse Solar Radiation attenuated on way down

src/v/t/VT-USRP-daughterboard-drivers_python-HEAD/gnuradio-core/src/python/gnuradio/blksimpl/psk.py   VT-USRP-daughterboard-drivers_python(Download)
# Boston, MA 02110-1301, USA.
# 
 
from math import pi, sqrt, log10
import math, cmath
 
# The following algorithm generates Gray coded constellations for M-PSK for M=[2,4,8]
def make_gray_constellation(m):
    # number of bits/symbol (log2(M))
    k = int(log10(m) / log10(2.0))

src/v/t/VT-USRP-daughterboard-drivers_python-HEAD/gnuradio-core/src/python/gnuradio/blks2impl/psk.py   VT-USRP-daughterboard-drivers_python(Download)
# Boston, MA 02110-1301, USA.
# 
 
from math import pi, sqrt, log10
import math, cmath
 
# The following algorithm generates Gray coded constellations for M-PSK for M=[2,4,8]
def make_gray_constellation(m):
    # number of bits/symbol (log2(M))
    k = int(log10(m) / log10(2.0))

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