Did I find the right examples for you? yes no

All Samples(204091)  |  Call(203571)  |  Derive(520)  |  Import(0)
int(x[, base]) -> integer

Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.  If base is zero, the proper base is guessed based on the
string content.  If the argument is outside the integer range a
long object will be returned instead.

src/p/y/PySide-1.1.2/sources/pyside-examples/examples/threads/mandelbrot.py   PySide(Download)
        b = pow(b * s, 0.8)
 
        return QtGui.qRgb(int(r*255), int(g*255), int(b*255))
 
 
        else:
            scaleFactor = self.pixmapScale / self.curScale
            newWidth = int(self.pixmap.width() * scaleFactor)
            newHeight = int(self.pixmap.height() * scaleFactor)
            newX = self.pixmapOffset.x() + (self.pixmap.width() - newWidth) / 2

src/q/u/quickflash-HEAD/branch_tags/octave-swig/QuickFlash-1.0.0-Octave-1.0/examples/raytracer/stitch_tasks.py   quickflash(Download)
    def __init__(self, num_rows=int(0), num_cols=int(0),
                 default_value=float(0.0)) :
 
        self.__num_rows = int(0)
        self.__num_cols = int(0)
 
        self.__num_cells = int(0)
        if ((num_rows < 1) or (num_cols < 1)) :
 
            self.__num_rows = int(0)
            self.__num_cols = int(0)
 

src/v/t/VT-USRP-daughterboard-drivers_python-HEAD/gnuradio-examples/python/apps/hf_explorer/hfx2.py   VT-USRP-daughterboard-drivers_python(Download)
        self.f_slider_scale = 10000/options.decim
        self.spin_ctrl_1.SetRange(self.f_lo,self.f_hi)
        self.text_ctrl_1.SetValue(str(int(self.usrp_center)))
        self.slider_5.SetValue(0) 
	self.AM_mode = False
 
        self.slider_3.SetValue((self.frequency-self.f_slider_offset)/self.f_slider_scale)
        self.spin_ctrl_1.SetValue(int(self.frequency))
	else:
	   self.xlate.set_center_freq( self.usrp_center - (self.frequency - self.tune_offset - 7.5e3))
        self.slider_3.SetValue(int((self.frequency-self.f_slider_offset)/self.f_slider_scale))
	if self.button_12.GetValue():
	   self.auto_antenna_tune()
	else:
	   self.frequency = self.frequency + (fRel*1e3) - 7.5e3
        self.spin_ctrl_1.SetValue(int(self.frequency))
        self.slider_3.SetValue(int((self.frequency-self.f_slider_offset)/self.f_slider_scale))
        if self.AM_mode == False:

src/q/u/quickflash-HEAD/netcdf/examples/expansion_correct/binreader.py   quickflash(Download)
                last_val_rel = last_val - value
 
                i = int(1)
 
                found_trans = False
                # Find the index of the first bin above or equal to value
 
                i = int(0)
 
                found_bin = False
                # Find the index of the first bin below or equal to value
 
                i = int(0)
 
                found_bin = False
                last_val_rel = last_val - value
 
                i = int(last_bin - 1)
 
                found_trans = False
                # Find the index of the last bin above or equal to value
 
                i = int(last_bin)
 
                found_bin = False

src/g/l/globusonline-transfer-api-client-0.10.13/globusonline/transfer/api_client/examples/create_proxy.py   globusonline-transfer-api-client(Download)
 
    proxy_file, pubkey_file = sys.argv[1:3]
    lifetime = int(sys.argv[3]) * 3600
 
    with open(pubkey_file) as f:

src/p/y/pyglet-1.1.4/examples/astraea/astraea.py   pyglet(Download)
    def __init__(self, img, x, y, batch=None):
        super(WrappingSprite, self).__init__(img, x, y, batch=batch)
        self.collision_radius = self.image.width / COLLISION_RESOLUTION / 2 
 
    def update(self, dt):
        x = self.x + self.dx * dt
        y = self.y + self.dy * dt
        rotation = self.rotation + self.rotation_speed * dt
 
        self.x = wrap(x, ARENA_WIDTH)
 
        self.x = wrap(x, ARENA_WIDTH)
        self.y = wrap(y, ARENA_HEIGHT)
        self.rotation = wrap(rotation, 360.)
 
    def collision_cells(self):
        '''Generate a sequence of (x, y) cells this object covers,
        approximately.''' 
        radius = self.collision_radius
        cellx = int(self.x / COLLISION_RESOLUTION)

src/n/i/nipy-0.3.0/examples/tissue_classification.py   nipy(Download)
 
# Other optional arguments
niters = int(get_argument('niters', 25))
beta = float(get_argument('beta', 0.5))
ngb_size = int(get_argument('ngb_size', 6))

src/p/y/pyparsing-2.0.0/examples/ebnf.py   pyparsing(Download)
def do_integer(str, loc, toks):
    return int(toks[0])
 
def do_meta_identifier(str, loc, toks):
    if toks[0] in symbol_table:

src/p/y/PySide-1.1.2/sources/pyside-examples/examples/opengl/grabber.py   PySide(Download)
 
        if regExp.exactMatch(text):
            width = int(regExp.cap(1))
            height = int(regExp.cap(2))
            if width > 0 and width < 2048 and height > 0 and height < 2048:

src/m/o/mod_pywebsocket-0.6b1/example/bench_wsh.py   mod_pywebsocket(Download)
        raise ValueError('Bad parameter format')
    wait = float(parts[0])
    count = int(parts[1])
    message = parts[2]
    for i in xrange(count):

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