Did I find the right examples for you? yes no

# range

All Samples(197487)  |  Call(197482)  |  Derive(0)  |  Import(5)
range([start,] stop[, step]) -> list of integers

Return a list containing an arithmetic progression of integers.
range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range(4) returns [0, 1, 2, 3].  The end point is omitted!
These are exactly the valid indices for a list of 4 elements.


        self.findstamp = TIMESTAMP
self.removestamp = REMOVESTAMP
self.zobrist_strings = [random.randrange(sys.maxint) for i in range(3)]

def set_neighbours(self):

    def __init__(self, board):
self.board = board
self.empties = range(SIZE*SIZE)
self.empty_pos = range(SIZE*SIZE)


    def __init__(self):
self.squares = [Square(self, pos) for pos in range(SIZE*SIZE)]
for square in self.squares:
square.set_neighbours()
self.reset()

    def __repr__(self):
result = []
for y in range(SIZE):
start = to_pos(0, y)
result.append(''.join([SHOW[square.color]+' ' for square in self.squares[start:start+SIZE]]))


setup = (4, 2, 3, 5, 6, 3, 2, 4, iNone, iNone) + (iTrue,)*4 + (iNone, iNone) +   (1,) * 8 + (iNone, iNone, iTrue, iNone, iNone, iNone, iNone, iNone,) +   ((0, ) * 8 + (iNone,) * 8) * 4 +   (-1,) * 8 + (iNone,) * 8 +   (-4, -2, -3, -5, -6, -3, -2, -4) + (iNone,) * 40

squares = tuple([i for i in range(128) if not i & 8])
knightMoves = (-33, -31, -18, -14, 14, 18, 31, 33)
bishopLines = (tuple(range(17, 120, 17)), tuple(range(-17, -120, -17)), tuple(range(15, 106, 15)), tuple(range(-15, -106, -15)))



fixture = b2.Fixture(b2.Polygon(box=box_half_size), density=box_density)
for i in range(box_rows):
y = copy(x)

for j in range(i, box_rows):

    init_time = time.time() - start

range_ = range(iters)

TIMESTEP = 1.0 / 60


# one call per task
print("running with one call per task")
amr = v.map(sleep_here, [.01*t for t in range(100)])
tic = time.time()
for i,r in enumerate(amr):
print("task %i on engine %i: %.3f" % (i, r[0], time.time()-tic))

print("running with four calls per task")
# with chunksize, we can have four calls per task
amr = v.map(sleep_here, [.01*t for t in range(100)], chunksize=4)

print("running with two calls per task, with unordered results")
# We can even iterate through faster results first, with ordered=False
amr = v.map(sleep_here, [.01*t for t in range(100,0,-1)], ordered=False, chunksize=2)
tic = time.time()
for i,r in enumerate(amr):


num_vecs = 30
direct_snapshots = [MR.ArrayTextVecHandle('direct_vec%d.txt' % i)
for i in range(num_vecs)]
for i in range(num_vecs)]

x = N.linspace(0, N.pi, 200)
for i, snap in enumerate(direct_snapshots):
snap.put([N.sin(x*i) for i in range(num_vecs)])
snap.put([N.cos(0.5*x*i) for i in range(num_vecs)])

# The BPOD modes are saved to disk
num_modes = 10
mode_nums = range(num_modes)
direct_modes = [MR.ArrayTextVecHandle('direct_mode%d' % i)
for i in mode_nums]


	ax = gca()

for i in range(0,8):
f = fft.fft(W * cControl[s,i])[:N/2]
ax.plot(k, abs(f), label="$|%i\\rangle$" % i)

	barHeight = abs(corr)**2

for i in range(basisCount):
bar(left[i], barHeight[i], color=colors[i%len(colors)])
#ax.bar(left, barHeight)


for i, delay in enumerate(r_[280:310]):
for j in range(stateCount):
ax = subplot(stateCount, delayCount, (delayCount*j) + i + 1)
DrawBigClock(theta=theta[i,j], drawLines=False, drawTicks=False)


def poisson2d(n):
L = spmatrix.ll_mat(n*n, n*n)
for i in range(n):
for j in range(n):
k = i + n*j

def poisson2d_sym(n):
L = spmatrix.ll_mat_sym(n*n)
for i in range(n):
for j in range(n):
k = i + n*j

def poisson2d_sym_blk(n):
L = spmatrix.ll_mat_sym(n*n)
I = spmatrix.ll_mat_sym(n)
P = spmatrix.ll_mat_sym(n)
for i in range(n):



axisNum = 0
for row in range(5):
for col in range(5):
axisNum += 1

def example_hatching():
fig = plt.figure()
ax1.bar(range(1, 5), range(1, 5), color='red', edgecolor='black', hatch="/")
ax1.bar(range(1, 5), [6] * 4, bottom=range(1, 5), color='blue', edgecolor='black', hatch='//')


    ## Read the simulation parameters (temperature, ...)
params = {}
for i in range(1,n+1):
tmp, name, val = jwdb.ams_sim_get_simulation_parameter_info(fileid, i)
params[name] = val