rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
timings.append(float(l[3]) / links) sizes.append(int(l[1]))
readdata.append( (int(l[1]),float(l[3]) / 2 ) ); sorteddata = sorted( readdata, key=lambda pair: pair[0]) sizes,timings = zip(*sorteddata);
def calibrate (links, latency, bandwidth, sizes, timings): assert len(sizes) == len(timings) if len(sizes) < 2: return None S_XY = cov(sizes, timings) S_X2 = variance(sizes) a = S_XY / S_X2 b = avg(timings) - a * avg(sizes) return (b * 1e-6) / (latency * links), 1e6 / (a * bandwidth)
f08c51969b477f4df715e6ed41846f01e52450a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7090/f08c51969b477f4df715e6ed41846f01e52450a7/calibrate_piecewise.py
for i in xrange(5, len(sys.argv)): limits += [idx for idx in xrange(len(sizes)) if sizes[idx] == int(sys.argv[i])]
for i in range(5, len(sys.argv)): limits += [idx for idx in range(len(sizes)) if sizes[idx] == int(sys.argv[i])]
def calibrate (links, latency, bandwidth, sizes, timings): assert len(sizes) == len(timings) if len(sizes) < 2: return None S_XY = cov(sizes, timings) S_X2 = variance(sizes) a = S_XY / S_X2 b = avg(timings) - a * avg(sizes) return (b * 1e-6) / (latency * links), 1e6 / (a * bandwidth)
f08c51969b477f4df715e6ed41846f01e52450a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7090/f08c51969b477f4df715e6ed41846f01e52450a7/calibrate_piecewise.py
requires=("gtk (>=2.12.0)",),
requires=("gtk",),
def run(self): """Build tarballs and create additional files.""" if os.path.isfile("ChangeLog"): os.remove("ChangeLog") os.system("tools/generate-change-log > ChangeLog") assert os.path.isfile("ChangeLog") assert open("ChangeLog", "r").read().strip() distutils.command.sdist.sdist.run(self) basename = "nfoview-%s" % sel...
84d1e57549ff73825a449449e53abedf7465ac36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12936/84d1e57549ff73825a449449e53abedf7465ac36/setup.py
while not lines[-1]:
while lines and not lines[-1]:
def _read_file(self, path, encoding=None): """Read and return the text of the NFO file.
ce9efb6872590104a2f7f7574e24d2eaea98de3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12936/ce9efb6872590104a2f7f7574e24d2eaea98de3a/window.py
if subprocess.call(command) != 0:
if os.system(command) != 0:
def run_command_or_exit(command): """Run command in shell and raise SystemExit if it fails.""" if subprocess.call(command) != 0: log.error("command %s failed" % repr(command)) raise SystemExit(1)
4bd687a6e88966ddc13a25b600ad1aae8296a8d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12936/4bd687a6e88966ddc13a25b600ad1aae8296a8d2/setup.py
if subprocess.call(command) != 0:
if os.system(command) != 0:
def run_command_or_warn(command): """Run command in shell and raise SystemExit if it fails.""" if subprocess.call(command) != 0: log.warn("command %s failed" % repr(command))
4bd687a6e88966ddc13a25b600ad1aae8296a8d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12936/4bd687a6e88966ddc13a25b600ad1aae8296a8d2/setup.py
run_command_or_warn(("update-desktop-database", directory))
run_command_or_warn('update-desktop-database "%s"' % directory)
def run(self): """Install everything and update the desktop file database.""" install.run(self) get_command_obj = self.distribution.get_command_obj root = get_command_obj("install").root data_dir = get_command_obj("install_data").install_dir # Assume we're actually installing if --root was not given. if (root is not No...
4bd687a6e88966ddc13a25b600ad1aae8296a8d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12936/4bd687a6e88966ddc13a25b600ad1aae8296a8d2/setup.py
def calc_cross_points(self,cross=None): sizes = self.sizes() hasc = self.houses[0] nnode = self.planets[10] h = 0 hn = self.which_house(nnode) while hn > h: #if h == 0 and hn == 1: if hn - h == 1 and hn < self.which_house((nnode - 30) % 360): break h = (h+1)%12 hasc = self.houses[h] nnode = (nnode - 30) % 360 hn = self...
a2e9e3ce03a8174ea34d5c6bfcb84a7af30e5217 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2637/a2e9e3ce03a8174ea34d5c6bfcb84a7af30e5217/chart.py
self.original.tap( x=x, y=y, z=self.z2(z), self.z2(zretract), depth, standoff, dwell_bottom, pitch, stoppos, spin_in, spin_out, tap_mode, direction)
self.original.tap( x, y, self.z2(z), self.z2(zretract), depth, standoff, dwell_bottom, pitch, stoppos, spin_in, spin_out, tap_mode, direction)
def tap(self, x=None, y=None, z=None, zretract=None, depth=None, standoff=None, dwell_bottom=None, pitch=None, stoppos=None, spin_in=None, spin_out=None, tap_mode=None, direction=None): self.original.tap( x=x, y=y, z=self.z2(z), self.z2(zretract), depth, standoff, dwell_bottom, pitch, stoppos, spin_in, spin_out, tap_mo...
119350e6230023dd559f4c554e1b9d5d3b7e8e84 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/119350e6230023dd559f4c554e1b9d5d3b7e8e84/attach.py
move = False
no_move = True
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
move = False
no_move = True
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
drill = True; move = False; path_col = "feed"; col = "feed";
drill = True no_move = True path_col = "feed" col = "feed"
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
move = False;
no_move = True
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
drill = True; move = False;
drill = True no_move = True
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
if (move):
if (move and not no_move):
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
if direction == "on": return if roll_on == None: return
if direction == "on": roll_on = None
def add_roll_on(k, roll_on_k, direction, roll_radius, offset_extra, roll_on): if direction == "on": return if roll_on == None: return num_spans = kurve.num_spans(k) if num_spans == 0: return if roll_on == 'auto': sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0) vx, vy = kurve.get_span_dir(k, 0, 0) # get start directi...
14f1224859a258975d450c6a21374ef10834e897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/14f1224859a258975d450c6a21374ef10834e897/kurve_funcs.py
if roll_on == 'auto': sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0)
sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0) if roll_on == None: rollstartx = sx rollstarty = sy elif roll_on == 'auto':
def add_roll_on(k, roll_on_k, direction, roll_radius, offset_extra, roll_on): if direction == "on": return if roll_on == None: return num_spans = kurve.num_spans(k) if num_spans == 0: return if roll_on == 'auto': sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0) vx, vy = kurve.get_span_dir(k, 0, 0) # get start directi...
14f1224859a258975d450c6a21374ef10834e897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/14f1224859a258975d450c6a21374ef10834e897/kurve_funcs.py
rollstartx, rollstarty = roll_on sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0) if sx == rollstartx and sy == rollstarty: return vx, vy = kurve.get_span_dir(k, 0, 0) rcx, rcy, rdir = kurve.tangential_arc(sx, sy, -vx, -vy, rollstartx, rollstarty) rdir = -rdir
rollstartx, rollstarty = roll_on if sx == rollstartx and sy == rollstarty: rdir = 0 rcx = 0 rcy = 0 else: vx, vy = kurve.get_span_dir(k, 0, 0) rcx, rcy, rdir = kurve.tangential_arc(sx, sy, -vx, -vy, rollstartx, rollstarty) rdir = -rdir
def add_roll_on(k, roll_on_k, direction, roll_radius, offset_extra, roll_on): if direction == "on": return if roll_on == None: return num_spans = kurve.num_spans(k) if num_spans == 0: return if roll_on == 'auto': sp, sx, sy, ex, ey, cx, cy = kurve.get_span(k, 0) vx, vy = kurve.get_span_dir(k, 0, 0) # get start directi...
14f1224859a258975d450c6a21374ef10834e897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/14f1224859a258975d450c6a21374ef10834e897/kurve_funcs.py
while (loop_count < 360): top_x = math.sin(loop_count * math.pi / 180) * top_r top_y = math.cos(loop_count * math.pi / 180) * top_r bottom_x = math.sin(loop_count * math.pi / 180) * bottom_r bottom_y = math.cos(loop_count * math.pi / 180) * bottom_r
while (loop_count < 360): top_x = math.sin(loop_count * math.pi / 180) * top_r top_y = math.cos(loop_count * math.pi / 180) * top_r bottom_x = math.sin(loop_count * math.pi / 180) * bottom_r bottom_y = math.cos(loop_count * math.pi / 180) * bottom_r
def cutcone(x_cen, y_cen, z_cen, top_r, bottom_r, depth, step_over): if top_r >= bottom_r: step_count = math.pi * top_r * 2 / step_over else: step_count = math.pi * bottom_r * 2 / step_over loop_count = 0 while (loop_count < 360): top_x = math.sin(loop_count * math.pi / 180) * top_r top_y = math.cos(loop_count * math...
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
feed(x=(x_cen + top_x), y=(y_cen + top_y), z=(z_cen)) feed(x=(x_cen + bottom_x), y=(y_cen + bottom_y), z=(z_cen - depth)) feed(z=(z_cen)) loop_count = loop_count + (360 / step_count)
feed(x=(x_cen + top_x), y=(y_cen + top_y), z=(z_cen)) feed(x=(x_cen + bottom_x), y=(y_cen + bottom_y), z=(z_cen - depth)) feed(z=(z_cen)) loop_count = loop_count + (360 / step_count)
def cutcone(x_cen, y_cen, z_cen, top_r, bottom_r, depth, step_over): if top_r >= bottom_r: step_count = math.pi * top_r * 2 / step_over else: step_count = math.pi * bottom_r * 2 / step_over loop_count = 0 while (loop_count < 360): top_x = math.sin(loop_count * math.pi / 180) * top_r top_y = math.cos(loop_count * math...
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
tool_r = tooldiameter / 2 top_r = diameter / 2
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
comment('tool change') tool_change(id=tool_id) spindle(spindle_speed) feedrate_hv(horizontal_feedrate, vertical_feedrate)
tool_r = tooldiameter / 2 top_r = diameter / 2
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
bottom_r = top_r - (math.tan(angle * math.pi / 180) * depth)
comment('tool change') tool_change(id=tool_id) spindle(spindle_speed) feedrate_hv(horizontal_feedrate, vertical_feedrate)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
if top_r >= bottom_r: top_r = top_r - tool_r bottom_r = bottom_r - tool_r if top_r < bottom_r: top_r = top_r + tool_r bottom_r = bottom_r + tool_r
bottom_r = top_r - (math.tan(angle * math.pi / 180) * depth)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
if bottom_r < 0: bottom_r = bottom_r * -1 depth = depth - (bottom_r / math.tan(angle * math.pi / 180)) bottom_r = 0
if top_r >= bottom_r: top_r = top_r - tool_r bottom_r = bottom_r - tool_r if top_r < bottom_r: top_r = top_r + tool_r bottom_r = bottom_r + tool_r
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
no better idea) cone_feed = (step_down / math.tan(angle * math.pi / 180)) if angle < 0 : cone_feed = cone_feed * -1 flush_nc()
if bottom_r < 0: bottom_r = bottom_r * -1 depth = depth - (bottom_r / math.tan(angle * math.pi / 180)) bottom_r = 0
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
rapid(x=(x_cen + bottom_r), y=y_cen) rapid(z=z_safe)
cone_feed = (step_down / math.tan(angle * math.pi / 180)) if angle < 0 : cone_feed = cone_feed * -1 flush_nc()
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
loop_feed = 0 while(loop_feed < depth): loop_feed = loop_feed + step_down if loop_feed >= depth: feed(z=(z_cen - depth)) else: feed(z=(z_cen - loop_feed)) arc_ccw(x=(x_cen - bottom_r), y=y_cen, i= -bottom_r, j=0) arc_ccw(x=(x_cen + bottom_r), y=y_cen, i=bottom_r, j=0) feed(z=z_cen)
rapid(x=(x_cen + bottom_r), y=y_cen) rapid(z=z_safe)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
loop_feed = 0 while(loop_feed < depth): loop_feed = loop_feed + cone_feed if loop_feed >= depth: temp_depth = depth else: temp_depth = loop_feed temp_top_r = bottom_r + (math.tan(angle * math.pi / 180) * temp_depth)
loop_feed = 0 while(loop_feed < depth): loop_feed = loop_feed + step_down if loop_feed >= depth: feed(z=(z_cen - depth)) else: feed(z=(z_cen - loop_feed)) arc_ccw(x=(x_cen - bottom_r), y=y_cen, i= -bottom_r, j=0) arc_ccw(x=(x_cen + bottom_r), y=y_cen, i=bottom_r, j=0) feed(z=z_cen)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
cutcone(x_cen, y_cen, z_cen, temp_top_r, bottom_r, temp_depth, step_over)
loop_feed = 0 while(loop_feed < depth): loop_feed = loop_feed + cone_feed if loop_feed >= depth: temp_depth = depth else: temp_depth = loop_feed temp_top_r = bottom_r + (math.tan(angle * math.pi / 180) * temp_depth)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
rapid(z=z_safe)
cutcone(x_cen, y_cen, z_cen, temp_top_r, bottom_r, temp_depth, step_over) rapid(z=z_safe)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
else: self.write(iso_codes.codes.PECK_DRILL() + iso_codes.codes.PECK_DEPTH(self.fmt, peck_depth))
else: self.write(iso_codes.codes.PECK_DRILL() + iso_codes.codes.PECK_DEPTH(self.fmt, peck_depth))
def drill(self, x=None, y=None, z=None, depth=None, standoff=None, dwell=None, peck_depth=None, retract_mode=None, spindle_mode=None):
847e2e14f5c9abb2b2dff83168323e3bf56b2e66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/847e2e14f5c9abb2b2dff83168323e3bf56b2e66/emc2.py
def cut_curve(curve, need_rapid, p, rapid_down_to_height, final_depth):
def cut_curve(curve, need_rapid, p, rapid_down_to_height, current_start_depth, final_depth):
def cut_curve(curve, need_rapid, p, rapid_down_to_height, final_depth): prev_p = p first = True for vertex in curve.getVertices(): if need_rapid and first: # rapid across rapid(vertex.p.x, vertex.p.y) ##rapid down rapid(z = rapid_down_to_height) #feed down feed(z = final_depth) first = False else: dc = vertex.c - p...
ec3698dde3d110a186cf4acac001834823044738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/ec3698dde3d110a186cf4acac001834823044738/area_funcs.py
rapid(z = rapid_down_to_height)
rapid(z = current_start_depth + rapid_down_to_height)
def cut_curve(curve, need_rapid, p, rapid_down_to_height, final_depth): prev_p = p first = True for vertex in curve.getVertices(): if need_rapid and first: # rapid across rapid(vertex.p.x, vertex.p.y) ##rapid down rapid(z = rapid_down_to_height) #feed down feed(z = final_depth) first = False else: dc = vertex.c - p...
ec3698dde3d110a186cf4acac001834823044738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/ec3698dde3d110a186cf4acac001834823044738/area_funcs.py
def cut_curvelist(curve_list, rapid_down_to_height, depth, clearance_height, keep_tool_down_if_poss):
def cut_curvelist(curve_list, rapid_down_to_height, current_start_depth, depth, clearance_height, keep_tool_down_if_poss):
def cut_curvelist(curve_list, rapid_down_to_height, depth, clearance_height, keep_tool_down_if_poss): p = area.Point(0, 0) first = True for curve in curve_list: need_rapid = True if first == False: s = curve.FirstVertex().p if keep_tool_down_if_poss == True: # see if we can feed across if feed_possible(p, s): need_rapi...
ec3698dde3d110a186cf4acac001834823044738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/ec3698dde3d110a186cf4acac001834823044738/area_funcs.py
p = cut_curve(curve, need_rapid, p, rapid_down_to_height, depth)
p = cut_curve(curve, need_rapid, p, rapid_down_to_height, current_start_depth, depth)
def cut_curvelist(curve_list, rapid_down_to_height, depth, clearance_height, keep_tool_down_if_poss): p = area.Point(0, 0) first = True for curve in curve_list: need_rapid = True if first == False: s = curve.FirstVertex().p if keep_tool_down_if_poss == True: # see if we can feed across if feed_possible(p, s): need_rapi...
ec3698dde3d110a186cf4acac001834823044738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/ec3698dde3d110a186cf4acac001834823044738/area_funcs.py
flunkOnFailure=False,
def tools_run_tests(self): self.addStep(ShellCommand( workdir='tools/release/signing', command=['python', 'tests.py'], name='release_signing_tests', )) self.addStep(ShellCommand( workdir='tools/lib/python', env={'PYTHONPATH': WithProperties('%(topdir)s/tools/lib/python')}, name='run_lib_nosetests', command=['nosetests'...
24f5a0dc5ba11a78d8f4906aa6e63913c2e89731 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/24f5a0dc5ba11a78d8f4906aa6e63913c2e89731/preproduction_factory.py
./bin/pip install Twisted || exit 1;
./bin/pip install Twisted==10.1.0 || exit 1;
def createSummary(self, log): self.parent_class.createSummary(self, log) key = 'pylint-%s' % self.project if not self.build.getProperties().has_key(key): self.setProperty(key, {}) props = self.getProperty(key) for msg, fullmsg in self.MESSAGES.items(): props[fullmsg] = self.getProperty('pylint-%s' % fullmsg) props['tot...
3360a811d983129df06a4ed476b6517c6ed98dfc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/3360a811d983129df06a4ed476b6517c6ed98dfc/preproduction_factory.py
self.addStep(RemovePYCs(workdir="."))
self.addStep(ShellCommand( name='rm_pyc', command=['find', '.', '-name', '*.pyc', '-exec', 'rm', '-fv', '{}', ';'], workdir=".", ))
def __init__(self, hgHost, **kwargs): self.parent_class = BuildFactory self.parent_class.__init__(self, **kwargs) self.hgHost = hgHost self.addStep(SetProperty(name='set_topdir', command=['pwd'], property='topdir', workdir='.', )) self.addStep(RemovePYCs(workdir="."))
3360a811d983129df06a4ed476b6517c6ed98dfc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/3360a811d983129df06a4ed476b6517c6ed98dfc/preproduction_factory.py
def __init__(self, hgHost, **kwargs): self.parent_class = BuildFactory self.parent_class.__init__(self, **kwargs) #self.addFactoryArguments(hgHost=hgHost) self.hgHost = hgHost self.addStep(SetProperty(name='set_topdir', command=['pwd'], property='topdir', workdir='.', )) self.addStep(ShellCommand(name='rm_pyc', command...
185d9d2a198fecc1a9a65320717bb1db12a6bd52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/185d9d2a198fecc1a9a65320717bb1db12a6bd52/preproduction_factory.py
'PYTHONPATH': WithProperties('%(topdir)s'),
'PYTHONPATH': WithProperties('%(topdir)s:%(topdir)s/tools/lib/python'),
def test_masters(self): self.addStep(ShellCommand(name='test_masters', command=['./test-masters.sh', '-8'], env = { 'PYTHONPATH': WithProperties('%(topdir)s'), 'PATH': WithProperties('%(topdir)s/sandbox/bin:/bin:/usr/bin'), }, workdir="buildbot-configs", ))
185d9d2a198fecc1a9a65320717bb1db12a6bd52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/185d9d2a198fecc1a9a65320717bb1db12a6bd52/preproduction_factory.py
flunkOnFailure=False,
def tools_pylint(self): # TODO: move pylintrc to tools self.addStep(PyLintExtended( command='../../../sandbox/bin/pylint --rcfile=../../.pylintrc *', workdir='tools/lib/python', flunkOnFailure=False, name='tools_lib_pylint', project='tools_lib', )) self.addStep(PyLintExtended( command='find buildbot-helpers buildfarm \...
b26538652f371234249676f23f4a9a3bab4a5156 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13112/b26538652f371234249676f23f4a9a3bab4a5156/preproduction_factory.py
else: values[field] = getattr(self, field) values['id'] = self.id return values def _on_change_args(self, args): res = {} values = {} for field, definition in self._fields.iteritems(): if definition['type'] in ('one2many', 'many2many'): values[field] = [x._get_eval() for x in getattr(self, field)]
def _get_eval(self): values = {} for field, definition in self._fields.iteritems(): if definition['type'] in ('one2many', 'many2many'): values[field] = [x.id for x in getattr(self, field) or []] else: values[field] = getattr(self, field) values['id'] = self.id return values
39c1c7f7309fe3bdb4aa869b46297cdb28b3986d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9150/39c1c7f7309fe3bdb4aa869b46297cdb28b3986d/__init__.py
setting.EMAIL_SUBJECT_PREFIX + (_("Configuration for %s/%s") % (d['hostname'], d['ip'])),
settings.EMAIL_SUBJECT_PREFIX + (_("Configuration for %s/%s") % (d['hostname'], d['ip'])),
def generate_image(d): """ Generates an image accoording to given configuration. """ logging.debug(repr(d)) if d['imagebuilder'] not in IMAGEBUILDERS: raise Exception("Invalid imagebuilder specified!") x = OpenWrtConfig() x.setUUID(d['uuid']) x.setOpenwrtVersion(d['openwrt_ver']) x.setArch(d['arch']) x.setPortLayout(...
6c450d9787ea656fd345ef6dc1ad51ec3071a894 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/6c450d9787ea656fd345ef6dc1ad51ec3071a894/gennyd.py
snr = float(signal) / float(noise)
snr = float(signal) - float(noise)
def process_node(node_ip, ping_results, is_duped, peers, varsize_results): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon @param varsize_results: R...
2facf9bd4088b9a0749529cfaa5a4e1b8f40828c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/2facf9bd4088b9a0749529cfaa5a4e1b8f40828c/monitor.py
self.addService('S35', 'misc') self.addService('K35', 'misc')
self.addService('S46', 'misc') self.addService('K46', 'misc')
def __init__(self): """ Class constructor. """ NodeConfig.__init__(self) # Add some basic services self.addService('S35', 'misc') self.addService('K35', 'misc')
d7a79e468486423d05dec3ad4c1584ccc0901738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/d7a79e468486423d05dec3ad4c1584ccc0901738/config_generator.py
f.write('START=35') f.write('\n') f.write('STOP=35') f.write('\n')
f.write('START=46\n') f.write('STOP=46\n')
def __generateMiscScript(self, f): f.write('#!/bin/sh /etc/rc.common\n') f.write('START=35') f.write('\n') f.write('STOP=35') f.write('\n') f.write('start() {\n') # Prevent the time from reseting to far into the past t = datetime.today() f.write('\tif [ ! -f /etc/datetime.save ]; then\n') f.write('\t echo -n "%02d%02...
d7a79e468486423d05dec3ad4c1584ccc0901738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/d7a79e468486423d05dec3ad4c1584ccc0901738/config_generator.py
fresh_subnet = pool.allocate_subnet()
fresh_subnet = pool.allocate_subnet(prefix_len)
def save(self, user): """ Completes node registration. """ ip = self.cleaned_data.get('ip') project = self.cleaned_data.get('project') pool = self.cleaned_data.get('pool') subnet = None
56a4d140bead09ad9ccc152a81d31f11d084b585 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/56a4d140bead09ad9ccc152a81d31f11d084b585/forms.py
return _("If this is not intentional, it is a bug. Please report it. If it is intentional, please get into a contact with network administrators to arrange new project entry with you own ESSID for you.")
return _("If this is not intentional, it is a bug. Please report it. If it is intentional, please get in contact with network administrators to arrange a new project entry with your own ESSID for you.")
def to_help_string(code): """ A helper method for transforming a warning code to a human readable help string.
d2fcb4c3cbb9c2e72ca5af1f6972909525d65735 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/d2fcb4c3cbb9c2e72ca5af1f6972909525d65735/models.py
f.write('LinkQualityDijkstraLimit 0 9.0\n')
def __generateOlsrdConfig(self, f): # Subnet configuration if self.subnets: f.write('Hna4\n') f.write('{\n') for subnet in self.subnets: if subnet['olsr'] and subnet['cidr'] < 29: f.write(' %(subnet)s %(mask)s\n' % subnet) f.write('}\n\n') # General configuration (static) f.write('AllowNoInt yes\n') f.write('UseHy...
859d5d51a12277ae093292aee6ba0ef35f8d64b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/859d5d51a12277ae093292aee6ba0ef35f8d64b1/config_generator.py
def interfaceConfiguration(name, ip):
def interfaceConfiguration(name):
def interfaceConfiguration(name, ip): f.write('Interface "{0}"\n'.format(name)) f.write('{\n') f.write(' IPv4Multicast 255.255.255.255\n') if ip is not None: f.write(' IPv4Src {0}\n'.format(ip)) f.write(' HelloInterval 5.0\n') f.write(' HelloValidityTime 40.0\n') f.write(' TcInterval 7.0\n') f.write(' TcValidityT...
859d5d51a12277ae093292aee6ba0ef35f8d64b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/859d5d51a12277ae093292aee6ba0ef35f8d64b1/config_generator.py
if ip is not None: f.write(' IPv4Src {0}\n'.format(ip))
def interfaceConfiguration(name, ip): f.write('Interface "{0}"\n'.format(name)) f.write('{\n') f.write(' IPv4Multicast 255.255.255.255\n') if ip is not None: f.write(' IPv4Src {0}\n'.format(ip)) f.write(' HelloInterval 5.0\n') f.write(' HelloValidityTime 40.0\n') f.write(' TcInterval 7.0\n') f.write(' TcValidityT...
859d5d51a12277ae093292aee6ba0ef35f8d64b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/859d5d51a12277ae093292aee6ba0ef35f8d64b1/config_generator.py
interfaceConfiguration(interface['name'], interface['ip'])
interfaceConfiguration(interface['name'])
def interfaceConfiguration(name, ip): f.write('Interface "{0}"\n'.format(name)) f.write('{\n') f.write(' IPv4Multicast 255.255.255.255\n') if ip is not None: f.write(' IPv4Src {0}\n'.format(ip)) f.write(' HelloInterval 5.0\n') f.write(' HelloValidityTime 40.0\n') f.write(' TcInterval 7.0\n') f.write(' TcValidityT...
859d5d51a12277ae093292aee6ba0ef35f8d64b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/859d5d51a12277ae093292aee6ba0ef35f8d64b1/config_generator.py
f.write('\n') f.write(' f.write('config alias routerid\n') f.write('\toption interface loopback\n') f.write('\toption proto static\n') f.write('\toption ipaddr %s\n' % self.ip) f.write('\toption netmask 255.255.255.255\n')
def __generateNetworkConfig(self, f): # VLAN configuration layout = portLayouts[self.portLayout] if isinstance(layout, tuple): f.write('#### VLAN configuration\n') f.write('config switch %s\n' % ("eth0" if not self.portLayout in switchIds else switchIds[self.portLayout])) f.write('\toption vlan0 "%s"\n' % layout[0]) f...
859d5d51a12277ae093292aee6ba0ef35f8d64b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/859d5d51a12277ae093292aee6ba0ef35f8d64b1/config_generator.py
if not self.profile:
from wlanlj.generator.models import Profile try: self.profile except Profile.DoesNotExist:
def adapt_to_router_type(self): """ Ensures that new router type is compatible with current configuration. """ if not self.profile: return for entry in self.profile.template.adaptation_chain.all().order_by("priority"): cls = load_plugin(entry.class_name, required_super = RouterTransition) transition = cls() transition...
7b43dac1aa76601db5738fae8acb301205eba4ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/7b43dac1aa76601db5738fae8acb301205eba4ec/models.py
if db_backend.startswith('postgresql'):
if db_backend.find('postgresql') != -1:
def ensure_success(errcode): if errcode != 0: print "ERROR: Command failed to execute, aborting!" exit(1)
fa522864c2c4f5ce19485f933ba5e4775e537f48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/fa522864c2c4f5ce19485f933ba5e4775e537f48/prepare-database.py
elif db_backend.startswith('sqlite'):
elif db_backend.find('sqlite') != -1:
def ensure_success(errcode): if errcode != 0: print "ERROR: Command failed to execute, aborting!" exit(1)
fa522864c2c4f5ce19485f933ba5e4775e537f48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/fa522864c2c4f5ce19485f933ba5e4775e537f48/prepare-database.py
elif db_backend.startswith('mysql'):
elif db_backend.find('mysql') != -1:
def ensure_success(errcode): if errcode != 0: print "ERROR: Command failed to execute, aborting!" exit(1)
fa522864c2c4f5ce19485f933ba5e4775e537f48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/fa522864c2c4f5ce19485f933ba5e4775e537f48/prepare-database.py
return _("unknown nodes")
return _("Unknown nodes")
def node_type_as_string_plural(self): """ Returns node type as string. """ if self.node_type == NodeType.Mesh: return _("Mesh nodes") elif self.node_type == NodeType.Server: return _("Server nodes") elif self.node_type == NodeType.Test: return _("Test nodes") elif self.node_type == NodeType.Mobile: return _("Mobile nod...
7c7e50be05a1714172cf255be20a5bfd1e31fde8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/7c7e50be05a1714172cf255be20a5bfd1e31fde8/models.py
twitter_api = twitter.Api(username=settings.TWITTER_USERNAME, settings.TWITTER_PASSWORD)
twitter_api = twitter.Api(username = settings.TWITTER_USERNAME, password = settings.TWITTER_PASSWORD)
def generate_new_node_tweet(node): if not tweets_enabled(): return try: bit_api = bitly.Api(login=settings.BITLY_LOGIN, apikey=settings.BITLY_API_KEY) twitter_api = twitter.Api(username=settings.TWITTER_USERNAME, settings.TWITTER_PASSWORD) node_link = bit_api.shorten(node.get_url()) msg = "A new node %s has just connec...
15fc06b4ed7cd075be6731793fe9ad03b4f06063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/15fc06b4ed7cd075be6731793fe9ad03b4f06063/monitor.py
if n.profile: iface_wifi = n.profile.template.iface_wifi if Template.objects.filter(iface_wifi = iid).count() >= 1: iid = iface_wifi
try: if n.profile: iface_wifi = n.profile.template.iface_wifi if Template.objects.filter(iface_wifi = iid).count() >= 1: iid = iface_wifi except Profile.DoesNotExist: pass
def process_node(node_ip, ping_results, is_duped, peers, varsize_results): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon @param varsize_results: R...
0ea86c54de878c0613893ce1db1d97823abdca5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/0ea86c54de878c0613893ce1db1d97823abdca5e/monitor.py
l = hna.setdefault(ip, []) l.append('%s/32' % alias)
for x in alias: l = hna.setdefault(ip, []) l.append('%s/32' % x)
def parse_tables(data): """ Parses the OLSR routing tables. """ isTable = False isTableHead = False currentTable = '' nodes = {} hna = {} for line in data.splitlines(): line = line.strip() if line[0:6] == 'Table:' and line[7:] in ('Topology', 'HNA', 'MID'): isTable = True isTableHead = True currentTable = line[7:] co...
e90fb94a3ff57a7bcb1bd62000007cfaac67728a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/e90fb94a3ff57a7bcb1bd62000007cfaac67728a/wifi_utils.py
return item.get_full_url()
return item.node.get_full_url()
def item_link(self, item): return item.get_full_url()
7bb6c7534dd8ed55da570227fbe2038ac007d1ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/7bb6c7534dd8ed55da570227fbe2038ac007d1ad/feeds.py
"LINE1:loss_def r'GPRINT:loss_def:LAST: Current\:%8.2lf', r'GPRINT:loss_def:AVERAGE:Average\:%8.2lf', r'GPRINT:loss_def:MAX:Maximum\:%8.2lf\n', "LINE1:loss_100 r'GPRINT:loss_100:LAST: Current\:%8.2lf', r'GPRINT:loss_100:AVERAGE:Average\:%8.2lf', r'GPRINT:loss_100:MAX:Maximum\:%8.2lf\n', "LINE1:loss_500 r'GPRINT:loss_5...
"CDEF:nloss_def=loss_def,100,/", "CDEF:nloss_100=loss_100,100,/", "CDEF:nloss_500=loss_500,100,/", "CDEF:nloss_1000=loss_1000,100,/", "CDEF:nloss_1480=loss_1480,100,/", "LINE1:nloss_def r'GPRINT:nloss_def:LAST: Current\:%8.2lf', r'GPRINT:nloss_def:AVERAGE:Average\:%8.2lf', r'GPRINT:nloss_def:MAX:Maximum\:%8.2lf\n', "...
def __str__(self): return "DS:%s:%s:%s:U:U" % (self.name, self.type, self.heartbeat)
94f4d4c1e8b50a7d7f6c04d763562c0efc9c4b6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/94f4d4c1e8b50a7d7f6c04d763562c0efc9c4b6c/rra.py
'--upper-limit', '100'
'--upper-limit', '1'
def __str__(self): return "DS:%s:%s:%s:U:U" % (self.name, self.type, self.heartbeat)
94f4d4c1e8b50a7d7f6c04d763562c0efc9c4b6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/94f4d4c1e8b50a7d7f6c04d763562c0efc9c4b6c/rra.py
if len(wifiSubnet) and n.clients >= ipcalc.Network(wifiSubnet[0].subnet, wifiSubnet[0].cidr).size() - 4:
if len(wifiSubnet) and n.clients > max(0, ipcalc.Network(wifiSubnet[0].subnet, wifiSubnet[0].cidr).size() - 4):
def process_node(node_ip, ping_results, is_duped, peers): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon """ transaction.set_dirty() try: n = Node...
5df71f9ef8f332b065dba1f70c0dd76d084a221b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/5df71f9ef8f332b065dba1f70c0dd76d084a221b/monitor.py
last_updated = graph.last_update,
last_update = graph.last_update,
def draw_graph(graph_id, timespan): """ Draws the specified graph. @param graph_id: Graph primary key @param timespan: Timespan to draw the graph for @return: True on success, False on failure """ logger = draw_graph.get_logger() # First check that we haven't drawn this graph already result = cache.get('nodewatcher.g...
41b6f21fba709e6814bc433c791c4190cc862ce0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/41b6f21fba709e6814bc433c791c4190cc862ce0/tasks.py
upload_limit = safe_int_convert(info['net']['vpn']['upload_limit'][:-3]) // 1000
offset = -3 unit = 1000 if 'Kbit' in info['net']['vpn']['upload_limit']: offset = -4 unit = 1 upload_limit = safe_int_convert(info['net']['vpn']['upload_limit'][:offset]) // unit
def process_node(node_ip, ping_results, is_duped, peers, varsize_results): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon @param varsize_results: R...
4fb6af186335addb1a39c08e825290be33ba7fea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/4fb6af186335addb1a39c08e825290be33ba7fea/monitor.py
NodeWarning.create(n, WarningCode.AnnounceConflict, EventSource.Monitor)
NodeWarning.create(n, WarningCode.UnregisteredAnnounce, EventSource.Monitor)
def check_mesh_status(): """ Performs a mesh status check. """ # Initialize the state of nodes and subnets, remove out of date ap clients and graph items Node.objects.all().update(visible = False) Subnet.objects.all().update(visible = False) APClient.objects.filter(last_update__lt = datetime.now() - timedelta(minutes ...
f0fe4f5230205dc028f7b4b978cb8367ae0b2400 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/f0fe4f5230205dc028f7b4b978cb8367ae0b2400/monitor.py
self.fields['prefix_%s' % subnet.pk] = forms.IntegerField()
self.fields['prefix_%s' % subnet.pk] = forms.IntegerField(required = False, initial = 27)
def __init__(self, user, node, *args, **kwargs): """ Class constructor. """ super(RenumberForm, self).__init__(*args, **kwargs) self.__node = node # Use renumber with subnet only when this is possible self.fields['primary_ip'] = forms.ChoiceField( choices = [ (RenumberAction.SetManually, _("Set manually")) ], initial ...
c4145a241c9ee074d2dc6640b2a2ea71ad2186b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/c4145a241c9ee074d2dc6640b2a2ea71ad2186b1/forms.py
return _("If this is not intentional, you are using an old firmware version or it is a bug. In the later case please report it. If it is intentional, please get in contact with network administrators to arrange a configuration option in the firmware for it.")
return _("If this is not intentional, it is a bug. Please report it. If it is intentional, please get in contact with network administrators to arrange a configuration option in the firmware for it.")
def to_help_string(code): """ A helper method for transforming a warning code to a human readable help string.
d98f5d44d05ad34b144d324e2b87938ce0581f1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/d98f5d44d05ad34b144d324e2b87938ce0581f1e/models.py
for key, value in info['solar'].iteritems(): if not value.strip(): info['solar'][key] = None
def process_node(node_ip, ping_results, is_duped, peers, varsize_results): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon @param varsize_results: R...
536183f8df7a59f56780c77694d525a16f7d300f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/536183f8df7a59f56780c77694d525a16f7d300f/monitor.py
states.get(info['solar']['state'], 1),
states.get(info['solar']['state']),
def process_node(node_ip, ping_results, is_duped, peers, varsize_results): """ Processes a single node. @param node_ip: Node's IP address @param ping_results: Results obtained from ICMP ECHO tests @param is_duped: True if duplicate echos received @param peers: Peering info from routing daemon @param varsize_results: R...
536183f8df7a59f56780c77694d525a16f7d300f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/536183f8df7a59f56780c77694d525a16f7d300f/monitor.py
result = "%s-%s-%s%s-%s%s" % (d['hostname'], d['router_name'], version, ("-%s" % type if type else ""), filechecksum, ext)
router_name = d['router_name'].replace('-', '') result = "%s-%s-%s%s-%s%s" % (d['hostname'], router_name, version, ("-%s" % type if type else "-all"), filechecksum, ext)
def generate_image(d): """ Generates an image accoording to given configuration. """ logging.debug(repr(d)) if d['imagebuilder'] not in IMAGEBUILDERS: raise Exception("Invalid imagebuilder specified!") x = OpenWrtConfig() x.setUUID(d['uuid']) x.setOpenwrtVersion(d['openwrt_ver']) x.setArch(d['arch']) x.setPortLayout(...
138bcd7573be01f98360aeb1f0b9ba6c80cc2b1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/138bcd7573be01f98360aeb1f0b9ba6c80cc2b1b/gennyd.py
raise TemplateSyntaxError("'%s' tag expected format is 'as name'" % args[0])
raise template.TemplateSyntaxError("'%s' tag expected format is 'as name'" % args[0])
def setcontext(parser, token): """ Sets (updates) current template context with the rendered output of the block inside tags. """ nodelist = parser.parse(('endsetcontext',)) args = list(token.split_contents()) if len(args) != 3 or args[1] != "as": raise TemplateSyntaxError("'%s' tag expected format is 'as name'" % arg...
f902f594dd95a58c1ade9ec5956970a29b5a2e5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/f902f594dd95a58c1ade9ec5956970a29b5a2e5c/misc.py
raise TemplateSyntaxError("'%s' tag requires at most two arguments" % args[0])
raise template.TemplateSyntaxError("'%s' tag requires at most two arguments" % args[0])
def notice(parser, token): """ Renders notice. """ nodelist = parser.parse(('endnotice',)) args = list(token.split_contents()) if len(args) > 3: raise TemplateSyntaxError("'%s' tag requires at most two arguments" % args[0]) classes = args[2] if len(args) > 2 else '""' notice_type = args[1] if len(args) > 1 else '""' ...
f902f594dd95a58c1ade9ec5956970a29b5a2e5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/f902f594dd95a58c1ade9ec5956970a29b5a2e5c/misc.py
form = InfoStickerForm({
form = InfoStickerForm(initial = {
def sticker(request): """ Display a form for generating an info sticker. """ user = UserAccount.for_user(request.user) # We want disabled error to show only after POST (to be same as image generation behavior) disabled = False if request.method == 'POST': form = InfoStickerForm(request.POST) if form.is_valid(): if get...
bc4b2a9359248ddb8c6b0b9ce6efcdb4e9c36a5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/bc4b2a9359248ddb8c6b0b9ce6efcdb4e9c36a5d/views.py