rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return false
return False
def _compare_values(instance, time, logger): log = "Entering _compare_values: " types = {'boolProp': 'boolean', 'dateProp': 'datetime', 'real32Prop': 'real32', 'real32Propa': 'real32', 'real64Prop': 'real64', 'real64Propa': 'real64', 'sint16Prop': 'sint16', 'sint16Propa': 'sint16', 'sint32Prop': 'sint32', 'sint32Propa': 'sint32', 'sint64Prop': 'sint64', 'sint64Propa': 'sint64', 'sint8prop': 'sint8', 'sint8propa': 'sint8', 'stringProp': 'string', 'stringPropa': 'string', 'uint16Prop': 'uint16', 'uint16Propa': 'uint16', 'uint32Prop': 'uint32', 'uint32Propa': 'uint32', 'uint64Prop': 'uint64', 'uint64Propa': 'uint64', 'uint8Prop' : 'uint8', 'uint8Propa' : 'uint8' } if instance['Name'] in _atoms: #print instance['Name'] atoms_value = _atoms.get(instance['Name']) for prop,value in instance.items(): #print prop #Char and Char_array if prop == 'char16Prop' or prop == 'char16Propa': pass #Date Property elif prop == 'dateProp': if str(instance[prop]) != str(time): logger.log_debug("DateProp NOT EQUAL") return false #Name or stringProp elif prop == 'Name' or prop == 'stringProp': if instance['Name'] not in _atoms or \ instance['stringProp'] not in _atoms: logger.log_debug("Atom Name NOT FOUND: %s" & instance['Name']) return false #boolProp elif prop == 'boolProp': if instance[prop] != False: logger.log_debug("False NOT EQUAL False") return false #All values not in lists elif (instance.properties[prop].type == types.get(prop)) and \ value == atoms_value and \ type(instance.properties[prop].value) != type([]): if prop == 'uint8Prop': if pywbem.Uint8(atoms_value) != instance[prop]: logger.log_debug("%s Error: %s" % (prop, instance[prop])) return false elif atoms_value != value: logger.log_debug("%s == %s"%(atoms_value,value)) return false #All list values elif type(instance.properties[prop].value) == type([]) and \ instance.properties[prop].type == types.get(prop): if prop == 'stringPropa': if value[0] != 'proton' and value[1] != 'electron' \ and value[2] != 'neutron': logger.log_debug("String Array NOT EQUAL") return false elif prop == 'uint8': for val in instance.properties[prop].value: if pywbem.uint8(atoms_value) != val: logger.log_debug("Uint8 Values NOT EQUAL") return false else: for a_prop in instance.properties[prop].value: if a_prop != atoms_value: logger.log_debug("%s NOT EQUAL %s" % (atoms_value\ , value)) return false else: logger.log_debug("%s NOT EQUAL %s" % (atoms_value, value)) return false else: logger.log_debug("Instance of TestAtom not Found: %s" % (instance['Name'])) return false return True
355654137d95d41164eaa9ca60363d941971e3c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1453/355654137d95d41164eaa9ca60363d941971e3c6/UpcallAtomProvider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 67, 2372, 12, 1336, 16, 813, 16, 1194, 4672, 613, 273, 315, 10237, 310, 389, 9877, 67, 2372, 30, 315, 1953, 273, 13666, 6430, 4658, 4278, 296, 6494, 2187, 296, 712, 4658, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 67, 2372, 12, 1336, 16, 813, 16, 1194, 4672, 613, 273, 315, 10237, 310, 389, 9877, 67, 2372, 30, 315, 1953, 273, 13666, 6430, 4658, 4278, 296, 6494, 2187, 296, 712, 4658, 42...
encodeMenu(os.path.join(getTempPath(),"chaptermenu-%s.png" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"chapterspumux-%s.xml" % page), os.path.join(getTempPath(),"chaptermenu-%s.mpg" % page), aspect_ratio)
if haspreview == True: encodeMenu(os.path.join(getTempPath(),"chaptermenu-%s-f%%06d.jpg" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"chapterspumux-%s.xml" % page), os.path.join(getTempPath(),"chaptermenu-%s.mpg" % page), aspect_ratio) else: encodeMenu(os.path.join(getTempPath(),"chaptermenu-%s.jpg" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"chapterspumux-%s.xml" % page), os.path.join(getTempPath(),"chaptermenu-%s.mpg" % page), aspect_ratio)
def createChapterMenu(screensize, screendpi, numberofitems): """Creates all the necessary menu images and files for the MythBurn menus.""" #Get the main menu node (we must only have 1) menunode=themeDOM.getElementsByTagName("submenu") if menunode.length!=1: fatalError("Cannot find submenu element in theme file") menunode=menunode[0] menuitems=menunode.getElementsByTagName("chapter") #Total number of video items on a single menu page (no less than 1!) itemsperpage = menuitems.length write( "Chapter items per page %s " % itemsperpage) #Get background image filename backgroundfilename = menunode.attributes["background"].value if backgroundfilename=="": fatalError("Background image is not set in theme file") backgroundfilename = getThemeFile(themeName,backgroundfilename) write( "Background image file is %s" % backgroundfilename) if not doesFileExist(backgroundfilename): fatalError("Background image not found (%s)" % backgroundfilename) #Get highlight color highlightcolor = "red" if menunode.hasAttribute("highlightcolor"): highlightcolor = menunode.attributes["highlightcolor"].value #Get menu music menumusic = "menumusic.ac3" if menunode.hasAttribute("music"): menumusic = menunode.attributes["music"].value #Get menu length menulength = 15 if menunode.hasAttribute("length"): menulength = int(menunode.attributes["length"].value) write("Music is %s, length is %s seconds" % (menumusic, menulength)) #Page number counter page=1 write( "Creating DVD sub-menus") while page <= numberofitems: write( "Sub-menu %s " % page) #Default settings for this page #Load background image bgimage=Image.open(backgroundfilename,"r").resize(screensize) draw=ImageDraw.Draw(bgimage) #Create image to hold button masks (same size as background) bgimagemask=Image.new("RGBA",bgimage.size) drawmask=ImageDraw.Draw(bgimagemask) spumuxdom = xml.dom.minidom.parseString('<subpictures><stream><spu force="yes" start="00:00:00.0" highlight="" select="" ></spu></stream></subpictures>') spunode = spumuxdom.documentElement.firstChild.firstChild #Extract the thumbnails chapterlist=createVideoChapters(page,itemsperpage,getLengthOfVideo(page),True) chapterlist=string.split(chapterlist,",") #Loop through all the items on this menu page chapter=0 while chapter < itemsperpage: # and itemsonthispage < itemsperpage: menuitem=menuitems[ chapter ] chapter+=1 drawThemeItem(page, itemsperpage, page, menuitem, bgimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, 999, chapter, chapterlist) #Save this menu image and its mask bgimage.save(os.path.join(getTempPath(),"chaptermenu-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) bgimagemask.save(os.path.join(getTempPath(),"chaptermenumask-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) spumuxdom.documentElement.firstChild.firstChild.setAttribute("select",os.path.join(getTempPath(),"chaptermenumask-%s.png" % page)) spumuxdom.documentElement.firstChild.firstChild.setAttribute("highlight",os.path.join(getTempPath(),"chaptermenumask-%s.png" % page)) #Release large amounts of memory ASAP ! del draw del bgimage del drawmask del bgimagemask #write( spumuxdom.toprettyxml()) WriteXMLToFile (spumuxdom,os.path.join(getTempPath(),"chapterspumux-%s.xml" % page)) if chaptermenuAspectRatio == "4:3": aspect_ratio = '2' elif chaptermenuAspectRatio == "16:9": aspect_ratio = '3' else: if getAspectRatioOfVideo(page) > aspectRatioThreshold: aspect_ratio = '3' else: aspect_ratio = '2' write("Encoding Chapter Menu Page %s using aspect ratio '%s'" % (page, chaptermenuAspectRatio)) encodeMenu(os.path.join(getTempPath(),"chaptermenu-%s.png" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"chapterspumux-%s.xml" % page), os.path.join(getTempPath(),"chaptermenu-%s.mpg" % page), aspect_ratio) #Tidy up
b4b3dc0760dd22f26d036660d08e363e0ebf4ef2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/b4b3dc0760dd22f26d036660d08e363e0ebf4ef2/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 782, 2487, 4599, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 3824, 4602, 471, 1390, 364, 326, 8005, 451, 38, 321, 2137...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 782, 2487, 4599, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 3824, 4602, 471, 1390, 364, 326, 8005, 451, 38, 321, 2137...
raise SystemExit(unicodeC(m) + os.linesep + u"""Could \ not find path %s and could not make a directory there. Please make sure this \ path is correct and try creating the folder with proper permissions for me\ """ % os.path.join(self['global']['workingDir'], downDict['Dir'] ))
raise SystemExit(''.join((traceback.format_exc(),os.linesep, u"""Could not find path %s and could not make a directory there. Please make \ sure this path is correct and try creating the folder with proper permissions """ % os.path.join(self['global']['workingDir'], downDict['Dir'] ))))
def check(self): global mechanize if not self['global']['urllib'] and not mechanize: print >> sys.stderr, """Using urllib2 instead of mechanize. setting\
0d66125a786b9ec925cf42d85180c8c854987932 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/0d66125a786b9ec925cf42d85180c8c854987932/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2552, 1791, 7472, 554, 309, 486, 365, 3292, 6347, 21712, 718, 2941, 3546, 471, 486, 1791, 7472, 554, 30, 1172, 1671, 2589, 18, 11241, 16, 3536, 7736, 11527, 22, 3560...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2552, 1791, 7472, 554, 309, 486, 365, 3292, 6347, 21712, 718, 2941, 3546, 471, 486, 1791, 7472, 554, 30, 1172, 1671, 2589, 18, 11241, 16, 3536, 7736, 11527, 22, 3560...
return SetFunctionAttr(ea, attr) else: return -1
chunk = idaapi.get_fchunk(ea) if chunk and _IDC_SetAttr(chunk, _FUNCATTRMAP, attr, value): return idaapi.update_func(chunk)
def SetFchunkAttr(ea, attr, value): """ Set a function chunk attribute @param ea: any address in the chunk @param attr: only FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER @param value: desired bg color (RGB) @return: 0 if failed, 1 if success """ if attr in [ FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER ]: return SetFunctionAttr(ea, attr) else: return -1
b97846eeae8f84836b5eb69af7f8306e2e48aaf4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/b97846eeae8f84836b5eb69af7f8306e2e48aaf4/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 42, 6551, 3843, 12, 24852, 16, 1604, 16, 460, 4672, 3536, 1000, 279, 445, 2441, 1566, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 2441, 632, 891, 1604, 30, 1338, 478, 21163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 42, 6551, 3843, 12, 24852, 16, 1604, 16, 460, 4672, 3536, 1000, 279, 445, 2441, 1566, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 2441, 632, 891, 1604, 30, 1338, 478, 21163, ...
int n = 0, ok_n = 0 float offset = 0 float www = 0
float width_of_line = 0 int word_end_glyphs = 0 char const *word_end_p = line_start_p char const *prev_word_end_p = line_start_p char const *ptr
static int def _wordwrap_helper(char const *text, int w, h, void (*cb)(int a, int b, void *data), void *data): int y = land_text_y_pos() float fh = land_font_state->font->size char const *a = text printf("wordwrap %d %d\n", w, h) while 1: char *ptr = (char *)a if h > 0 and land_text_y_pos() >= y + h: break int n = 0, ok_n = 0 float offset = 0 float www = 0 int c while 1: # Find next possible break location. bool skip = True while 1: c = land_utf8_char(&ptr) if c == 0: break if c == '\n': break if c == ' ': if not skip: break else: skip = False n++ offset = land_text_get_char_offset(a, n) int x = offset if x > w: if ok_n > 0: n = ok_n else: www = x break www = x if c == 0 or c == '\n': break ok_n = n n++ if www > land_font_state->wordwrap_width: land_font_state->wordwrap_width = www land_font_state->wordwrap_height += fh cb(a - text, a + n - text, data) a += n + 1 if c == 0: break return a - text
bfbdc17cfb9650eed81eb71f02e1137ba3225959 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/930/bfbdc17cfb9650eed81eb71f02e1137ba3225959/font.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 509, 1652, 389, 1095, 4113, 67, 4759, 12, 3001, 1866, 380, 955, 16, 509, 341, 16, 366, 16, 918, 261, 14, 7358, 21433, 474, 279, 16, 509, 324, 16, 918, 380, 892, 3631, 918, 380, 892, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 509, 1652, 389, 1095, 4113, 67, 4759, 12, 3001, 1866, 380, 955, 16, 509, 341, 16, 366, 16, 918, 261, 14, 7358, 21433, 474, 279, 16, 509, 324, 16, 918, 380, 892, 3631, 918, 380, 892, ...
box = (int(x_diff), int(yd), int(x-x_diff), int(y))
box = (int(x_diff), int(yd), int(x_diff+new_width), int(y))
def create_size(self, photosize): if self.size_exists(photosize): return if not os.path.isdir(self.cache_path()): os.makedirs(self.cache_path()) try: im = Image.open(self.get_image_filename()) except IOError: return if im.size == photosize.size(): shutil.copy(self.get_image_filename(), self._get_SIZE_path(photosize)) return cur_width, cur_height = im.size new_width, new_height = photosize.size() if photosize.crop: ratio = max(float(new_width)/cur_width,float(new_height)/cur_height) x = (cur_width * ratio) y = (cur_height * ratio) xd = abs(new_width - x) yd = abs(new_height - y) x_diff = int(xd / 2) y_diff = int(yd / 2) if self.crop_from == 'top': box = (int(x_diff), 0, int(x-x_diff), new_height) elif self.crop_from == 'left': box = (0, int(y_diff), new_width, int(y-y_diff)) elif self.crop_from == 'bottom': box = (int(x_diff), int(yd), int(x-x_diff), int(y)) # y - yd = new_height elif self.crop_from == 'right': box = (int(xd), int(y_diff), int(x), int(y-y_diff)) # x - xd = new_width else: box = (int(x_diff), int(y_diff), int(x-x_diff), int(y-y_diff)) resized = im.resize((int(x), int(y)), Image.ANTIALIAS).crop(box) else: if not new_width == 0 and not new_height == 0: if cur_width > cur_height: ratio = float(new_width)/cur_width else: ratio = float(new_height)/cur_height else: if new_width == 0: ratio = float(new_height)/cur_height else: ratio = float(new_width)/cur_width resized = im.resize((int(cur_width*ratio), int(cur_height*ratio)), Image.ANTIALIAS) # Paletted images can not be filtered. # TODO: look into converting the image, applying the filter and then converting back. if resized.palette is None: if self.filter_set is not None: filter_set = self.filter_set.filters.all() elif photosize.filter_set is not None: filter_set = list(photosize.filter_set.filters.all()) else: filter_set = None if filter_set is not None: for f in filter_set: filter = getattr(ImageFilter, f.name, None) if filter is not None: try: resized = resized.filter(filter) except ValueError: pass resized_filename = getattr(self, "get_%s_path" % photosize.name)() try: if im.format == 'JPEG': resized.save(resized_filename, 'JPEG', quality=photosize.quality, optimize=True) else: resized.save(resized_filename) except IOError, e: if os.path.isfile(resized_filename): os.unlink(resized_filename) raise e
2b1c8ab9545b0315a6723fbdbba41e94b2e6411e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10711/2b1c8ab9545b0315a6723fbdbba41e94b2e6411e/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1467, 12, 2890, 16, 18185, 554, 4672, 309, 365, 18, 1467, 67, 1808, 12, 29121, 554, 4672, 327, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 2493, 67, 803, 1435, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1467, 12, 2890, 16, 18185, 554, 4672, 309, 365, 18, 1467, 67, 1808, 12, 29121, 554, 4672, 327, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 2493, 67, 803, 1435, 467...
if(self.src_cache and cache) : return self.src_cache
if(self.src_cache and cache): return self.src_cache
def get_node_src(self, cache=True): """ Return a string containing the node src Return None if src is not available If cache is False, return the source on the disk """
0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2159, 67, 4816, 12, 2890, 16, 1247, 33, 5510, 4672, 3536, 2000, 279, 533, 4191, 326, 756, 1705, 2000, 599, 309, 1705, 353, 486, 2319, 971, 1247, 353, 1083, 16, 327, 326, 1084,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2159, 67, 4816, 12, 2890, 16, 1247, 33, 5510, 4672, 3536, 2000, 279, 533, 4191, 326, 756, 1705, 2000, 599, 309, 1705, 353, 486, 2319, 971, 1247, 353, 1083, 16, 327, 326, 1084,...
invalid_snapshot=False
def unpack(self): unpack=True
919c311ef5f3283aa181be51be2146d298b7407b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/919c311ef5f3283aa181be51be2146d298b7407b/generic_stage_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 12, 2890, 4672, 6167, 33, 5510, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 12, 2890, 4672, 6167, 33, 5510, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"De-compression requires the (missing) zlib module"
"De-compression requires the (missing) zlib module"
def read(self, name): "Return file bytes (as a string) for name" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' if not self.fp: raise RuntimeError, \ "Attempt to read ZIP archive that was already closed" zinfo = self.getinfo(name) filepos = self.fp.tell() self.fp.seek(zinfo.file_offset, 0) bytes = self.fp.read(zinfo.compress_size) self.fp.seek(filepos, 0) if zinfo.compress_type == ZIP_STORED: pass elif zinfo.compress_type == ZIP_DEFLATED: if not zlib: raise RuntimeError, \ "De-compression requires the (missing) zlib module" # zlib compress/decompress code by Jeremy Hylton of CNRI dc = zlib.decompressobj(-15) bytes = dc.decompress(bytes) # need to feed in unused pad byte so that zlib won't choke ex = dc.decompress('Z') + dc.flush() if ex: bytes = bytes + ex else: raise BadZipfile, \ "Unsupported compression method %d for file %s" % \ (zinfo.compress_type, name) crc = binascii.crc32(bytes) if crc != zinfo.CRC: raise BadZipfile, "Bad CRC-32 for file %s" % name return bytes
7e00393d38ad3fc1e6c2d72edde707f0918ae9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7e00393d38ad3fc1e6c2d72edde707f0918ae9a8/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 508, 4672, 315, 990, 585, 1731, 261, 345, 279, 533, 13, 364, 508, 6, 309, 365, 18, 3188, 486, 316, 7566, 86, 3113, 315, 69, 6, 4672, 1002, 7265, 16, 296, 896, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 508, 4672, 315, 990, 585, 1731, 261, 345, 279, 533, 13, 364, 508, 6, 309, 365, 18, 3188, 486, 316, 7566, 86, 3113, 315, 69, 6, 4672, 1002, 7265, 16, 296, 896, 14...
self.transport.write(self.factory.payload)
self.transport.write(str(self.factory.payload))
def connectionMade(self): """Send a HTTP POST command with the appropriate CIM over HTTP headers and payload."""
5621898f4fa05bbe42128e217caaabce741d6dc9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10648/5621898f4fa05bbe42128e217caaabce741d6dc9/twisted_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 49, 2486, 12, 2890, 4672, 3536, 3826, 279, 2239, 5485, 1296, 598, 326, 5505, 17459, 1879, 2239, 1607, 471, 2385, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 49, 2486, 12, 2890, 4672, 3536, 3826, 279, 2239, 5485, 1296, 598, 326, 5505, 17459, 1879, 2239, 1607, 471, 2385, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
-- David Harvey: original code
def group_law(self, prec=10): r""" The formal group law.
e2dc0eb52bc3f60716936de019f57db0860e8d21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e2dc0eb52bc3f60716936de019f57db0860e8d21/formal_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 67, 80, 2219, 12, 2890, 16, 13382, 33, 2163, 4672, 436, 8395, 1021, 25739, 1041, 328, 2219, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 67, 80, 2219, 12, 2890, 16, 13382, 33, 2163, 4672, 436, 8395, 1021, 25739, 1041, 328, 2219, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
quadratic character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`.
quadratic character `\chi_k` whose discriminant `d` satisfies `d_{\min} \leq d \leq d_{\max}`.
def twist_zeros(self, n, dmin, dmax, L=''): r""" Return first `n` real parts of nontrivial zeros for each quadratic character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`. INPUT: - ``n`` - integer - ``dmin`` - integer - ``dmax`` - integer - ``L`` - defines `L`-function (default: Riemann zeta function) OUTPUT: - ``dict`` - keys are the discriminants `d`, and values are list of corresponding zeros. EXAMPLES:: sage: lcalc.twist_zeros(3, -3, 6) {-3: [8.03973716, 11.2492062, 15.7046192], 5: [6.64845335, 9.83144443, 11.9588456]} """ L = self._compute_L(L) RR = sage.rings.all.RealField(prec) Z = sage.rings.all.Integer typ = '--twist-quadratic' n = int(n) v = self('-z %s %s --start %s --finish %s %s'%( (n, typ, dmin, dmax, L))) w = {} if len(v) == 0: return w for a in v.split('\n'): d, x = a.split() x = RR(x) d = Z(d) if w.has_key(d): w[d].append(x) else: w[d] = [x] return w
ec495a205ca232d81527044825ec337cd833d57b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ec495a205ca232d81527044825ec337cd833d57b/lcalc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 376, 67, 22008, 12, 2890, 16, 290, 16, 302, 1154, 16, 302, 1896, 16, 511, 2218, 11, 4672, 436, 8395, 2000, 1122, 1375, 82, 68, 2863, 2140, 434, 1661, 313, 20109, 4922, 364, 1517,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 376, 67, 22008, 12, 2890, 16, 290, 16, 302, 1154, 16, 302, 1896, 16, 511, 2218, 11, 4672, 436, 8395, 2000, 1122, 1375, 82, 68, 2863, 2140, 434, 1661, 313, 20109, 4922, 364, 1517,...
if options.qvalue_method == "empirical":
elif options.qvalue_method == "empirical":
def getSamples( gene2go, genes, background, options ): sample_size = options.sample # List of all minimum probabilities in simulation simulation_min_pvalues = [] E.info( "sampling: calculating %i samples: " % (sample_size)) counts = {} prob_overs = {} prob_unders = {} samples = {} options.stdlog.write("# ") options.stdlog.flush() for x in range(sample_size): if options.loglevel >= 1: options.stdlog.write( "." ) options.stdlog.flush() ## get shuffled array of genes from background sample_genes = random.sample( background, len(genes) ) go_results = AnalyseGO( gene2go , sample_genes, background ) pairs = go_results.mResults.items() for k, v in pairs: if k not in counts: counts[k] = [] prob_overs[k] = [] prob_unders[k] = [] counts[k].append( v.mSampleCountsCategory ) prob_overs[k].append( v.mProbabilityOverRepresentation ) prob_unders[k].append( v.mProbabilityUnderRepresentation ) simulation_min_pvalues.append( min( v.mProbabilityUnderRepresentation, v.mProbabilityOverRepresentation ) ) if options.loglevel >= 1: sys.stdout.write("\n") sys.stdout.flush() E.info("sampling: sorting %i P-Values" % len(simulation_min_pvalues) ) simulation_min_pvalues.sort() simulation_min_pvalues = numpy.array(simulation_min_pvalues) samples = {} if options.output_filename_pattern: filename = options.output_filename_pattern % { 'go': ontology, 'section': "samples" } E.info( "sampling results go to %s" % filename ) outfile = IOTools.openFile( filename, "w", create_dir = True ) else: outfile = sys.stdout outfile.write( "\t".join( ("goid", "min", "max", "mean", "median", "stddev", "CI95lower", "CI95upper", "pover", "punder", "goid", "category", "description") ) + "\n" ) for k in counts.keys(): c = counts[k] prob_overs[k].sort() prob_unders[k].sort() s = GOSample(min(c), max(c), scipy.mean(c), numpy.std(c), numpy.array(prob_overs[k]), numpy.array(prob_unders[k]), counts[k] ) samples[k] = s if k in go2info: n = go2info[k] else: n = "?" outfile.write( "%s\t%i\t%i\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%s\n" %\ (k, min(c), max(c), scipy.mean(c), scipy.median(c), numpy.std(c), scipy.stats.scoreatpercentile( c, 5 ), scipy.stats.scoreatpercentile( c, 95 ), min(prob_overs[k]), min(prob_unders[k]), n )) if options.output_filename_pattern: outfile.close() return samples, simulation_min_pvalues
a4c02f5be6f5bedd7e42c41024cbac1a98d20972 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4322/a4c02f5be6f5bedd7e42c41024cbac1a98d20972/GO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
result = FocusApplication.node.findChild(GenericPredicate(name = name, roleName = roleName, description = description), requireResult = False, retry = False)
result = FocusApplication.node.findChild(predicate, requireResult = False, retry = False)
def __call__ (self, name = '', roleName = '', description = ''): """ If name, roleName or description are specified, search for a widget that matches and refocus on it. """ if not name and not roleName and not description: raise TypeError, ENOARGS # search for a widget. result = None try: result = FocusWidget.node.findChild(GenericPredicate(name = name, roleName = roleName, description = description), requireResult = False, retry = False) except AttributeError: pass if result: FocusWidget.node = result else: try: result = FocusDialog.node.findChild(GenericPredicate(name = name, roleName = roleName, description = description), requireResult = False, retry = False) except AttributeError: pass if result: FocusWidget.node = result else: try: result = FocusApplication.node.findChild(GenericPredicate(name = name, roleName = roleName, description = description), requireResult = False, retry = False) if result: FocusWidget.node = result except AttributeError: raise FocusError, name if result == None: FocusWidget.node = result raise FocusError, name
a2340d5784d1e8a98084683a1999de37f6502dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10139/a2340d5784d1e8a98084683a1999de37f6502dab/procedural.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 261, 2890, 16, 508, 273, 10226, 19746, 273, 10226, 2477, 273, 875, 4672, 3536, 971, 508, 16, 19746, 578, 2477, 854, 1269, 16, 1623, 364, 279, 3604, 716, 1885, 471, 1278,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 261, 2890, 16, 508, 273, 10226, 19746, 273, 10226, 2477, 273, 875, 4672, 3536, 971, 508, 16, 19746, 578, 2477, 854, 1269, 16, 1623, 364, 279, 3604, 716, 1885, 471, 1278,...
for num in range(1,len(self.rulesDB)+1):
for num in sorted(self.rulesDB.keys()):
def ruleQue(self): """ set global class values one at a time then call matcher """ for num in range(1,len(self.rulesDB)+1): #make sure the rules are called in order #it stops iterating at one less then we need so add +1 if type(self.rulesDB[num]).__name__ == "list": for rule in self.rulesDB[num]: self.bssid = rule["bssid"] self.state = rule["state"] self.clients = rule["clients"] self.rule = rule["raw"] self.fullRule = str(rule) self.num = str(num) self.match() #call matching else: self.bssid = self.rulesDB[num]["bssid"] self.state = self.rulesDB[num]["state"] self.clients = self.rulesDB[num]["clients"] self.rule = self.rulesDB[num]["raw"] self.fullRule = str(self.rulesDB[num]) self.num = str(num) self.match() #call matching return self.violators #return kicklist
fa857b01093718726fcfae8d4894e406c4919f54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9343/fa857b01093718726fcfae8d4894e406c4919f54/airdrop-ng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1720, 12253, 12, 2890, 4672, 3536, 444, 2552, 667, 924, 1245, 622, 279, 813, 1508, 745, 4546, 3536, 364, 818, 316, 3115, 12, 2890, 18, 7482, 2290, 18, 2452, 1435, 4672, 468, 6540, 3071, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1720, 12253, 12, 2890, 4672, 3536, 444, 2552, 667, 924, 1245, 622, 279, 813, 1508, 745, 4546, 3536, 364, 818, 316, 3115, 12, 2890, 18, 7482, 2290, 18, 2452, 1435, 4672, 468, 6540, 3071, ...
sage: cos(3).numerical_approximation(200)
sage: cos(3).numerical_approx(200)
def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number.
620e070c69b2ba56d65f620b55649fc43ff77bab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/620e070c69b2ba56d65f620b55649fc43ff77bab/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -10...
try: template = gsm.adapters.lookup( (iface, self.request_type), provides, name=name) except: import pdb; pdb.set_trace()
template = gsm.adapters.lookup( (iface, self.request_type), provides, name=name)
def __call__(self, event=None, context=None, force_reload=False): if force_reload is False: settings = component.queryUtility(ISettings) auto_reload = settings and settings.reload_templates if not auto_reload: return
aee83246f03a87fca5f672e18213fd95329b22c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12476/aee83246f03a87fca5f672e18213fd95329b22c2/zcml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 33, 7036, 16, 819, 33, 7036, 16, 2944, 67, 17517, 33, 8381, 4672, 309, 2944, 67, 17517, 353, 1083, 30, 1947, 273, 1794, 18, 2271, 6497, 12, 45, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 33, 7036, 16, 819, 33, 7036, 16, 2944, 67, 17517, 33, 8381, 4672, 309, 2944, 67, 17517, 353, 1083, 30, 1947, 273, 1794, 18, 2271, 6497, 12, 45, 26...
"unsupported content encoding in %r", encoding)
"unsupported content encoding in %r", cenc)
def server_set_encoding_headers (server, filename=None): """ Set encoding headers. """ rewrite = server.is_rewrite() bytes_remaining = get_content_length(server.headers) to_remove = sets.Set() if server.headers.has_key('Transfer-Encoding'): to_remove.add('Transfer-Encoding') tencs = server.headers['Transfer-Encoding'].lower() for tenc in tencs.split(","): tenc = tenc.strip() if ";" in tenc: tenc = tenc.split(";", 1)[0] if not tenc or tenc == 'identity': continue if tenc == 'chunked': server.decoders.append(UnchunkStream.UnchunkStream(server)) elif tenc in ('x-gzip', 'gzip'): server.decoders.append(GunzipStream.GunzipStream(server)) elif tenc == 'deflate': server.decoders.append(DeflateStream.DeflateStream(server)) else: wc.log.warn(wc.LOG_PROXY, "unsupported transfer encoding in %r", tencs) if server.headers.has_key("Content-Length"): wc.log.warn(wc.LOG_PROXY, 'Transfer-Encoding should not have Content-Length') to_remove.add("Content-Length") bytes_remaining = None if rewrite: to_remove.add('Content-Length') remove_headers(server.headers, to_remove) if not server.headers.has_key('Content-Length'): server.headers['Connection'] = 'close\r' if not rewrite: # only decompress on rewrite return bytes_remaining to_remove = sets.Set() #if server.protocol == "HTTP/1.1": # # To make pipelining possible, enable chunked encoding. # server.headers['Transfer-Encoding'] = "chunked\r" # server.encoders.append(ChunkStream.ChunkStream(server)) # Compressed content (uncompress only for rewriting modules) if server.headers.has_key('Content-Encoding'): to_remove.add('Content-Encoding') cencs = server.headers['Content-Encoding'].lower() for cenc in cencs.split(","): cenc = cenc.strip() if ";" in cenc: cenc = cenc.split(";", 1)[0] if not cenc or cenc == 'identity': continue if filename is not None and \ (filename.endswith(".gz") or filename.endswith(".tgz")): continue # note: do not gunzip .gz files if cenc in ('gzip', 'x-gzip'): server.decoders.append(GunzipStream.GunzipStream()) elif cenc == 'deflate': server.decoders.append(DeflateStream.DeflateStream()) else: wc.log.warn(wc.LOG_PROXY, "unsupported content encoding in %r", encoding) # remove no-transform cache control if server.headers.get('Cache-Control', '').lower() == 'no-transform': to_remove.add('Cache-Control') # add warning server.headers['Warning'] = "214 Transformation applied\r" remove_headers(server.headers, to_remove) return bytes_remaining
e03289976f0bcc678d46da69aa8f94ace230fdf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/e03289976f0bcc678d46da69aa8f94ace230fdf2/Headers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 542, 67, 5999, 67, 2485, 261, 3567, 16, 1544, 33, 7036, 4672, 3536, 1000, 2688, 1607, 18, 3536, 10738, 273, 1438, 18, 291, 67, 21489, 1435, 1731, 67, 17956, 273, 336, 67, 174...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 542, 67, 5999, 67, 2485, 261, 3567, 16, 1544, 33, 7036, 4672, 3536, 1000, 2688, 1607, 18, 3536, 10738, 273, 1438, 18, 291, 67, 21489, 1435, 1731, 67, 17956, 273, 336, 67, 174...
i = find_token(document.body, "display", i) if i == -1: return if check_token(i, "false"):
i = find_token(document.body, "\tdisplay", i) if i == -1: return val = get_value(document.body, 'display', i) if val == "false":
def revert_display_enum(document): " Revert 'display false/true' to 'display none/color'" i = 0 while True: i = find_token(document.body, "display", i) if i == -1: return if check_token(i, "false"): document.body[i] = document.body[i].replace('false', 'none') if check_token(i, "true"): document.body[i] = document.body[i].replace('true', 'default')
ae760fa72b9d2280ac43d72ac3a9d1638d5775e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/ae760fa72b9d2280ac43d72ac3a9d1638d5775e4/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 5417, 67, 7924, 12, 5457, 4672, 315, 868, 1097, 296, 5417, 629, 19, 3767, 11, 358, 296, 5417, 6555, 19, 3266, 4970, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 5417, 67, 7924, 12, 5457, 4672, 315, 868, 1097, 296, 5417, 629, 19, 3767, 11, 358, 296, 5417, 6555, 19, 3266, 4970, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, ...
except ValueError: pass
def __calc_date_time(self): # Set self.__date_time, self.__date, & self.__time by using # time.strftime().
62fe75509c905bee1181fed9b6714e0de27ff5d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/62fe75509c905bee1181fed9b6714e0de27ff5d4/_strptime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 712, 67, 957, 12, 2890, 4672, 468, 1000, 365, 16186, 712, 67, 957, 16, 365, 16186, 712, 16, 473, 365, 16186, 957, 635, 1450, 468, 813, 18, 701, 9982, 7675, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12448, 67, 712, 67, 957, 12, 2890, 4672, 468, 1000, 365, 16186, 712, 67, 957, 16, 365, 16186, 712, 16, 473, 365, 16186, 957, 635, 1450, 468, 813, 18, 701, 9982, 7675, 2, -100, ...
('CANOPY_HT_MAX', '16777591' ),
('CANOPY_HT_MAX', '375' ),
def lcp_2(): ds = gdal.Open('data/test_USGS_LFNM_Alb83.lcp') if ds.RasterCount != 8: gdal.post_reason('wrong number of bands') return 'fail' metadata = [ ('LATITUDE', '48'), ('LINEAR_UNIT', 'Meters'), ('DESCRIPTION', '') ] md = ds.GetMetadata() for item in metadata: if md[item[0]] != item[1]: gdaltest.post_reason('wrong metadataitem for dataset. md[\'%s\']=\'%s\', expected \'%s\'' % (item[0], md[item[0]], item[1])) return 'fail' check_gt = (-1328145,30,0,2961735,0,-30) new_gt = ds.GetGeoTransform() for i in range(6): if abs(new_gt[i]-check_gt[i]) > 1e-5: print print 'old = ', check_gt print 'new = ', new_gt gdaltest.post_reason( 'Geotransform differs.' ) return 'fail' dataPerBand = [ ( 28381, [ ('ELEVATION_UNIT', '0' ), ('ELEVATION_UNIT_NAME', 'Meters' ), ('ELEVATION_MIN', '67109928' ), ('ELEVATION_MAX', '83887572' ), ('ELEVATION_NUM_CLASSES', '-1' ), ('ELEVATION_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_elevation_1.txt' ) ] ), ( 25824, [ ('SLOPE_UNIT', '0' ), ('SLOPE_UNIT_NAME', 'Degrees' ), ('SLOPE_MIN', '0' ), ('SLOPE_MAX', '34' ), ('SLOPE_NUM_CLASSES', '35' ), ('SLOPE_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_slope_1.txt' ) ] ), ( 28413, [ ('ASPECT_UNIT', '2' ), ('ASPECT_UNIT_NAME', 'Azimuth degrees' ), ('ASPECT_MIN', '0' ), ('ASPECT_MAX', '16777573' ), ('ASPECT_NUM_CLASSES', '-1' ), ('ASPECT_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_aspect_1.txt' ) ] ), ( 19052, [ ('FUEL_MODEL_OPTION', '0' ), ('FUEL_MODEL_OPTION_DESC', 'no custom models AND no conversion file needed' ), ('FUEL_MODEL_MIN', '1' ), ('FUEL_MODEL_MAX', '10' ), ('FUEL_MODEL_NUM_CLASSES', '5' ), ('FUEL_MODEL_VALUES', '1,2,5,8,10' ), ('FUEL_MODEL_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_fuel1.txt' ) ] ), ( 30164, [ ('CANOPY_COV_UNIT', '1' ), ('CANOPY_COV_UNIT_NAME', 'Percent' ), ('CANOPY_COV_MIN', '0' ), ('CANOPY_COV_MAX', '95' ), ('CANOPY_COV_NUM_CLASSES', '10' ), ('CANOPY_COV_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_canopy1.txt' ) ] ), ( 22316, [ ('CANOPY_HT_UNIT', '3' ), ('CANOPY_HT_UNIT_NAME', 'Meters x 10' ), ('CANOPY_HT_MIN', '0' ), ('CANOPY_HT_MAX', '16777591' ), ('CANOPY_HT_NUM_CLASSES', '5' ), ('CANOPY_HT_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_height_1.txt' ) ] ), ( 30575, [ ('CBH_UNIT', '3' ), ('CBH_UNIT_NAME', 'Meters x 10' ), ('CBH_MIN', '0' ), ('CBH_MAX', '100' ), ('CBH_NUM_CLASSES', '33' ), ('CBH_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_base_1.txt' ) ] ), ( 23304, [ ('CBD_UNIT', '3' ), ('CBD_UNIT_NAME', 'kg/m^3 x 100' ), ('CBD_MIN', '0' ), ('CBD_MAX', '21' ), ('CBD_NUM_CLASSES', '20' ), ('CBD_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_density_1.txt' ) ] ) ] for i in range(8): band = ds.GetRasterBand(i+1) if band.Checksum() != dataPerBand[i][0]: gdaltest.post_reason('wrong checksum for band %d. Got %d, expected %d' % (i+1, band.Checksum(), dataPerBand[i][0])) return 'fail' md = band.GetMetadata() for item in dataPerBand[i][1]: if md[item[0]] != item[1]: gdaltest.post_reason('wrong metadataitem for band %d. md[\'%s\']=\'%s\', expected \'%s\'' % (i+1, item[0], md[item[0]], item[1])) return 'fail' ds = None return 'success'
a36696c833b65ab5e544361e8bf6514eb8585fe7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10289/a36696c833b65ab5e544361e8bf6514eb8585fe7/lcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4057, 67, 22, 13332, 225, 3780, 273, 15551, 287, 18, 3678, 2668, 892, 19, 3813, 67, 3378, 16113, 67, 9105, 50, 49, 67, 1067, 70, 10261, 18, 80, 4057, 6134, 309, 3780, 18, 18637, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4057, 67, 22, 13332, 225, 3780, 273, 15551, 287, 18, 3678, 2668, 892, 19, 3813, 67, 3378, 16113, 67, 9105, 50, 49, 67, 1067, 70, 10261, 18, 80, 4057, 6134, 309, 3780, 18, 18637, ...
HardwareRandom_TestBasicOps,
def test_main(verbose=None): testclasses = (WichmannHill_TestBasicOps, MersenneTwister_TestBasicOps, HardwareRandom_TestBasicOps, TestDistributions, TestModule) test_support.run_unittest(*testclasses) # verify reference counting import sys if verbose and hasattr(sys, "gettotalrefcount"): counts = [None] * 5 for i in xrange(len(counts)): test_support.run_unittest(*testclasses) counts[i] = sys.gettotalrefcount() print counts
0f7c8f64e7b7d26f947ff8df1bc2fa3af2f82544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0f7c8f64e7b7d26f947ff8df1bc2fa3af2f82544/test_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1842, 4701, 273, 565, 261, 59, 1354, 81, 1072, 44, 737, 67, 4709, 8252, 8132, 16, 490, 414, 275, 4644, 23539, 1249, 67, 4709, 8252, 8132, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 1842, 4701, 273, 565, 261, 59, 1354, 81, 1072, 44, 737, 67, 4709, 8252, 8132, 16, 490, 414, 275, 4644, 23539, 1249, 67, 4709, 8252, 8132, 16,...
remote_cmd="vlc udp://@:1234 --brightness=2 --no-x11-shm --no-xvideo-shm --disable-screensaver --volume=300"
remote_cmd="vlc udp://@:1234 --udp-caching=1000 --aout=alsa --brightness=2.000000 --no-x11-shm --no-xvideo-shm --volume=300"
def menu_event_one(self, action): start1=time() (model, iter) = self.main.tabla.get_selection().get_selected() if iter == None: print_debug( "menu_event_one() not selected thin client !!!" ) return self.main.selected_host=model.get_value(iter,COL_HOST) self.main.selected_ip=model.get_value(iter, COL_IP) if not self.doaction_onthisclient(action, self.main.selected_ip): # show a msg shared.info_msg ( _("Can't exec this action because you are connected at this host!") ) return if action == 0: # refresh terminal # call to read remote info self.main.xmlrpc.newhost(self.main.selected_ip) self.main.xmlrpc.ip=self.main.selected_ip self.main.worker=shared.Workers( self.main,\ target=self.populate_datatxt, args=([self.main.selected_ip]) ).start() if action == 1: # clean datatxtbuffer self.main.datatxt.clean() if action == 2: # Ask for reboot reboot ip=self.main.selected_ip host=self.main.localdata.GetHostname(self.main.selected_ip) msg=_( _("Do you want to reboot %s?" ) %(host) ) if shared.ask_msg ( msg ): timeout=self.main.config.GetVar("actions_timeout") msg=(_("Pc will reboot in %s seconds") %timeout) self.exe_app_in_client("reboot", timeout, msg, users=[self.main.selected_ip]) if action == 3: # Ask for poweroff reboot host=self.main.localdata.GetHostname(self.main.selected_ip) msg=_( _("Do you want to poweroff %s?" ) %(host) ) if shared.ask_msg ( msg ): timeout=self.main.config.GetVar("actions_timeout") msg=(_("Pc will shutdown in %s seconds") %timeout) self.exe_app_in_client("poweroff", timeout, msg, users=[self.main.selected_ip]) if action == 4: # lock screen if not self.main.xmlrpc.lockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 5: # unlock screen if not self.main.xmlrpc.unlockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 6: # start ivs self.main.worker=shared.Workers(self.main, target=self.start_ivs, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 7: # start vnc self.main.worker=shared.Workers(self.main, target=self.start_vnc, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 8: # screenshot !!! self.main.worker=shared.Workers(self.main, target=self.get_screenshot, args=[self.main.selected_ip]) self.main.worker.start() if action == 9: # give a remote xterm throught SSH pass_msg=_("Enter password of remote thin client (if asked for it)") cmd="xterm -e \"echo '%s'; ssh %s@%s || sleep 5\"" %(pass_msg, self.main.config.GetVar("ssh_remote_username"),self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.common.exe_cmd( cmd, background=True ) if action == 10: # launch personalize settings if client is TCOS (PXES and LTSP not supported) client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": cmd="gksu \"tcospersonalize --host=%s\"" %(self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.common.exe_cmd( cmd, background=True ) else: shared.info_msg( _("%s is not supported to personalize!") %(client_type) ) if action == 11: # reset xorg # Ask for it if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't logout, user is not logged") ) return user=self.main.localdata.GetUsernameAndHost(self.main.selected_ip) print_debug("menu_event_one() user=%s" %user) msg=_( _("Do you want to logout user \"%s\"?" ) %(user) ) if shared.ask_msg ( msg ): newusernames=[] timeout=self.main.config.GetVar("actions_timeout") msg=_("Session will close in %s seconds") %timeout remote_cmd="/usr/lib/tcos/session-cmd-send LOGOUT %s %s" %(timeout, msg) if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("exec", remote_cmd ) else: newusernames.append(user) result = self.main.dbus_action.do_exec(newusernames ,remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason:%s") %( self.main.dbus_action.get_error_msg() ) ) if action == 12: # restart xorg with new settings # thin client must download again XXX.XXX.XXX.XXX.conf and rebuild xorg.conf client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": msg=_( "Restart X session of %s with new config?" ) %(self.main.selected_ip) if shared.ask_msg ( msg ): # see xmlrpc/xorg.h, rebuild will download and sed xorg.conf.tpl self.main.xmlrpc.tc.tcos.xorg("rebuild", "--restartxorg", \ self.main.xmlrpc.username, \ self.main.xmlrpc.password ) self.refresh_client_info(self.main.selected_ip) else: shared.info_msg( _("%s is not supported to restart Xorg!") %(client_type) ) if action == 13: # exec app if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't exec application, user is not logged") ) return self.askfor(mode="exec", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)]) if action == 14: # send message if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't send message, user is not logged") ) return self.askfor(mode="mess", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] ) if action == 15: print_debug ("menu_event_one() show running apps" ) self.get_user_processes(self.main.selected_ip) if action == 16: # action sent by vidal_joshur at gva dot es # start video broadcast mode # Stream to single client unicast eth=self.main.config.GetVar("network_interface") users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't send video broadcast, user is not logged") ) return str_scapes=[" ", "(", ")", "*", "!", "?", "\"", "`", "[", "]", "{", "}", ";", ":", ",", "=", "$"] lock="disable" volume="85" client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": ip_unicast="239.255.255.0" remote_cmd="vlc udp://@%s:1234 --brightness=2 --no-x11-shm --no-xvideo-shm --disable-screensaver --volume=300" %(ip_unicast) else: ip_unicast=self.main.selected_ip remote_cmd="vlc udp://@:1234 --brightness=2 --no-x11-shm --no-xvideo-shm --disable-screensaver --volume=300" dialog = gtk.FileChooserDialog(_("Select audio/video file.."), None, gtk.FILE_CHOOSER_ACTION_OPEN, (_("Play DVD"), 1, _("Play SVCD/VCD"), 2, _("Play AudioCD"), 3, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) self.folder = self._folder = os.environ['HOME'] dialog.set_current_folder(self.folder) filter = gtk.FileFilter() filter.set_name("Media Files ( *.avi, *.mpg, *.mpeg, *.mp3, *.wav, etc.. )") file_types=["*.avi", "*.mpg", "*.mpeg", "*.ogg", "*.ogm", "*.asf", "*.divx", "*.wmv", "*.vob", "*.m2v", "*.m4v", "*.mp2", "*.mp4", "*.ac3", "*.ogg", "*.mp1", "*.mp2", "*.mp3", "*.wav", "*.wma"] for elem in file_types: filter.add_pattern( elem ) dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All Files") filter.add_pattern("*.*") dialog.add_filter(filter) response = dialog.run() if response == gtk.RESPONSE_OK or response == 1 or response == 2 or response == 3: filename=dialog.get_filename() dialog.destroy() if filename.find(" ") != -1: msg=_("Not allowed white spaces in %s filename.\nPlease rename it." %os.path.basename(filename) ) shared.info_msg( msg ) return for scape in str_scapes: filename=filename.replace("%s" %scape, "\%s" %scape) if response == gtk.RESPONSE_OK: p=subprocess.Popen(["vlc", "file://%s" %filename, "--sout=#duplicate{dst=display{delay=1000},dst=\"transcode{vcodec=mp4v,acodec=%s,vb=800,ab=112,channels=2,soverlay}:standard{access=udp,mux=ts,dst=%s:1234}\"}" %(self.main.config.GetVar("vlc_audio_codec"), ip_unicast), "--miface=%s" %eth, "--ttl=12", "--brightness=2", "--no-x11-shm", "--no-xvideo-shm", "--disable-screensaver" ], shell=False) elif response == 1: p=subprocess.Popen(["vlc", "dvd://", "--sout=#duplicate{dst=display{delay=1000},dst=\"transcode{vcodec=mp4v,acodec=%s,vb=800,ab=112,channels=2,soverlay}:standard{access=udp,mux=ts,dst=%s:1234}\"}" %(self.main.config.GetVar("vlc_audio_codec"), ip_unicast), "--miface=%s" %eth, "--ttl=12", "--loop", "--brightness=2", "--no-x11-shm", "--no-xvideo-shm", "--disable-screensaver"], shell=False) elif response == 2: p=subprocess.Popen(["vlc", "vcd://", "--sout=#duplicate{dst=display{delay=1000},dst=\"transcode{vcodec=mp4v,acodec=%s,vb=800,ab=112,channels=2,soverlay}:standard{access=udp,mux=ts,dst=%s:1234}\"}" %(self.main.config.GetVar("vlc_audio_codec"), ip_unicast), "--miface=%s" %eth, "--ttl=12", "--brightness=2", "--no-x11-shm", "--no-xvideo-shm", "--disable-screensaver"], shell=False) elif response == 3: p=subprocess.Popen(["vlc", "cdda://", "--sout=#duplicate{dst=display,dst=\"transcode{vcodec=mp4v,vb=200,acodec=%s,ab=112,channels=2}:standard{access=udp,mux=ts,dst=%s:1234}\"}" %(self.main.config.GetVar("vlc_audio_codec"), ip_unicast), "--miface=%s" %eth, "--ttl=12", "--no-x11-shm", "--no-xvideo-shm", "--disable-screensaver"], shell=False) # exec this app on client self.main.write_into_statusbar( _("Waiting for start video transmission...") ) msg=_("First select the DVD chapter or play movie\nthen press enter to send clients..." ) shared.info_msg( msg ) # check if vlc is running or fail like check ping in demo mode running = p.poll() is None if not running: self.main.write_into_statusbar( _("Error while exec app")) return msg=_( "Lock keyboard and mouse on client?" ) if shared.ask_msg ( msg ): lock="enable" newusernames=[]
c6ac1f6bfa3b4985db0f6ae0f7ad14c0c38479f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13520/c6ac1f6bfa3b4985db0f6ae0f7ad14c0c38479f5/TcosActions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
line = line[1:] while 1: res = reg.search(line)
pos = 1 while 1: res = reg.search(line, pos)
def mime_encode(line, header): '''Code a single line as quoted-printable. If header is set, quote some extra characters.''' if header: reg = mime_header_char else: reg = mime_char newline = '' if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = string.upper('=%02x' % ord('F')) line = line[1:] while 1: res = reg.search(line) if res is None: break newline = newline + line[:res.start(0)] + \ string.upper('=%02x' % ord(line[res.group(0)])) line = line[res.end(0):] line = newline + line newline = '' while len(line) >= 75: i = 73 while line[i] == '=' or line[i-1] == '=': i = i - 1 i = i + 1 newline = newline + line[:i] + '=\n' line = line[i:] return newline + line
4795dec0fc48b083ae2113ae52427d0c8712bd70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4795dec0fc48b083ae2113ae52427d0c8712bd70/mimify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3015, 12, 1369, 16, 1446, 4672, 9163, 1085, 279, 2202, 980, 487, 9298, 17, 1188, 429, 18, 971, 1446, 353, 444, 16, 3862, 2690, 2870, 3949, 1093, 6309, 309, 1446, 30, 960, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3015, 12, 1369, 16, 1446, 4672, 9163, 1085, 279, 2202, 980, 487, 9298, 17, 1188, 429, 18, 971, 1446, 353, 444, 16, 3862, 2690, 2870, 3949, 1093, 6309, 309, 1446, 30, 960, 273...
'''
"""
def notify(username, pid, title, message): """ Sends a notification via notify-send Usage: sendnotification( "youruser", "pid", "your title", "your message") We will be probably using pynotify module for this, we'll see! """ #WARNING: Don't use the exclamation mark ("!") in the message or title, otherwise bash will return something like: # -bash: !": event not found #Might be good to include these substitutions, if someone doesn't read this warning title = re.compile('!').sub('\!', title) message = re.compile('!').sub('\!', message) #Get DBus dbus = getdbus(pid) #Create and send command notifycmd = 'su %s -c "%s notify-send \\"%s\\" \\"%s\\""' % (username, dbus, title, message) getcmdoutput(notifycmd) '''The long representations in terminal: # su username -c "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qwKxIfaWLw,guid=7215562baaa1153521197dc648d7bce7 notify-send \"title\" \"message\"" # sudo -u username DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qwKxIfaWLw,guid=7215562baaa1153521197dc648d7bce7 notify-send "title" "message" '''
d97acd20cc97476bb1b306cfabf7e64c3b37c595 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1574/d97acd20cc97476bb1b306cfabf7e64c3b37c595/timekpr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 5053, 16, 4231, 16, 2077, 16, 883, 4672, 3536, 2479, 87, 279, 3851, 3970, 5066, 17, 4661, 10858, 30, 1366, 9927, 12, 315, 93, 477, 1355, 3113, 315, 6610, 3113, 315, 93, 477, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 5053, 16, 4231, 16, 2077, 16, 883, 4672, 3536, 2479, 87, 279, 3851, 3970, 5066, 17, 4661, 10858, 30, 1366, 9927, 12, 315, 93, 477, 1355, 3113, 315, 6610, 3113, 315, 93, 477, ...
self.SetAcceleratorTable(wx.AcceleratorTable([]))
def OnFocusChange(self, focus): if focus == self.lastFocus: return if focus == "Edit": # avoid programmatic change of the selected item while editing self.UpdateViewOptions() # temporarily disable the "Del" accelerator self.SetAcceleratorTable(wx.AcceleratorTable([])) elif self.lastFocus == "Edit": # restore the "Del" accelerator self.SetAcceleratorTable(self.acceleratorTable) self.UpdateViewOptions() self.lastFocus = focus toolBarButtons = self.toolBar.buttons canCut, canCopy, canPaste, canDelete = self.GetEditCmdState(focus) toolBarButtons.cut.Enable(canCut) toolBarButtons.copy.Enable(canCopy) toolBarButtons.paste.Enable(canPaste)
9ee56a35fdb10b99f4946424378c77c9e877b479 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/9ee56a35fdb10b99f4946424378c77c9e877b479/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9233, 3043, 12, 2890, 16, 7155, 4672, 309, 7155, 422, 365, 18, 2722, 9233, 30, 327, 309, 7155, 422, 315, 4666, 6877, 468, 4543, 5402, 26500, 2549, 434, 326, 3170, 761, 1323, 15755,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9233, 3043, 12, 2890, 16, 7155, 4672, 309, 7155, 422, 365, 18, 2722, 9233, 30, 327, 309, 7155, 422, 315, 4666, 6877, 468, 4543, 5402, 26500, 2549, 434, 326, 3170, 761, 1323, 15755,...
while lines and not lines[-1]: lines.pop()
def prepare_docstring(s): """ Convert a docstring into lines of parseable reST. Return it as a list of lines usable for inserting into a docutils ViewList (used as argument of nested_parse().) An empty line is added to act as a separator between this docstring and following content. """ lines = s.expandtabs().splitlines() # Find minimum indentation of any non-blank lines after first line. margin = sys.maxint for line in lines[1:]: content = len(line.lstrip()) if content: indent = len(line) - content margin = min(margin, indent) # Remove indentation. if lines: lines[0] = lines[0].lstrip() if margin < sys.maxint: for i in range(1, len(lines)): lines[i] = lines[i][margin:] # Remove any trailing or leading blank lines. while lines and not lines[-1]: lines.pop() while lines and not lines[0]: lines.pop(0) return lines
7cf390aa9b7cfa39ccfdd30d907256bb996dd757 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/7cf390aa9b7cfa39ccfdd30d907256bb996dd757/autodoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 24675, 12, 87, 4672, 3536, 4037, 279, 14525, 1368, 2362, 434, 1109, 429, 283, 882, 18, 225, 2000, 518, 487, 279, 666, 434, 2362, 15603, 364, 21079, 1368, 279, 997, 5471, 4441, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 24675, 12, 87, 4672, 3536, 4037, 279, 14525, 1368, 2362, 434, 1109, 429, 283, 882, 18, 225, 2000, 518, 487, 279, 666, 434, 2362, 15603, 364, 21079, 1368, 279, 997, 5471, 4441, ...
return Infsign[sign]
return _Infsign[sign]
def handle(self, context, sign, *args): if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_HALF_DOWN, ROUND_UP): return Infsign[sign] if sign == 0: if context.rounding == ROUND_CEILING: return Infsign[sign] return _dec_from_triple(sign, '9'*context.prec, context.Emax-context.prec+1) if sign == 1: if context.rounding == ROUND_FLOOR: return Infsign[sign] return _dec_from_triple(sign, '9'*context.prec, context.Emax-context.prec+1)
7ea2d399fb15e34ed3695ca0160f84f982b9194c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/7ea2d399fb15e34ed3695ca0160f84f982b9194c/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 819, 16, 1573, 16, 380, 1968, 4672, 309, 819, 18, 17376, 316, 261, 15092, 67, 44, 21497, 67, 3079, 16, 27048, 67, 44, 21497, 67, 24427, 1157, 16, 27048, 67, 44, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 819, 16, 1573, 16, 380, 1968, 4672, 309, 819, 18, 17376, 316, 261, 15092, 67, 44, 21497, 67, 3079, 16, 27048, 67, 44, 21497, 67, 24427, 1157, 16, 27048, 67, 44, 2...
cast = "" self.emit("value = ast2obj_list(%s, %sast2obj_%s);" % (value, cast, field.type), depth)
self.emit("value = ast2obj_list(%s, ast2obj_%s);" % (value, field.type), depth)
def set(self, field, value, depth): if field.seq: if field.type.value == "cmpop": # XXX check that this cast is safe, i.e. works independent on whether # sizeof(cmpop_ty) != sizeof(void*) cast = "(PyObject*(*)(void*))" else: cast = "" self.emit("value = ast2obj_list(%s, %sast2obj_%s);" % (value, cast, field.type), depth) else: ctype = get_c_type(field.type) self.emit("value = ast2obj_%s(%s);" % (field.type, value), depth, reflow=False)
ce1d5d2527810961f7fe8f7a64d9e54075da482e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce1d5d2527810961f7fe8f7a64d9e54075da482e/asdl_c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 652, 16, 460, 16, 3598, 4672, 309, 652, 18, 5436, 30, 309, 652, 18, 723, 18, 1132, 422, 315, 9625, 556, 6877, 468, 11329, 866, 716, 333, 4812, 353, 4183, 16, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 652, 16, 460, 16, 3598, 4672, 309, 652, 18, 5436, 30, 309, 652, 18, 723, 18, 1132, 422, 315, 9625, 556, 6877, 468, 11329, 866, 716, 333, 4812, 353, 4183, 16, 277, ...
r'(?P<header>[-\w_.*,(){} ]+)'
r'(?P<header>[^]]+)'
def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): del self.__sections[section] return 1 else: return 0
a6a642e16a2ac47134bbee3df7cc71e349c762b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a6a642e16a2ac47134bbee3df7cc71e349c762b1/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3464, 12, 2890, 16, 2442, 4672, 3536, 3288, 279, 585, 2442, 12123, 309, 365, 16186, 11657, 18, 5332, 67, 856, 12, 3464, 4672, 1464, 365, 16186, 11657, 63, 3464, 65, 327, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3464, 12, 2890, 16, 2442, 4672, 3536, 3288, 279, 585, 2442, 12123, 309, 365, 16186, 11657, 18, 5332, 67, 856, 12, 3464, 4672, 1464, 365, 16186, 11657, 63, 3464, 65, 327, 404, ...
errors,
def test_main(): testfuncs = [ weakref_segfault, # Must be first, somehow wrapper_segfault, do_this_first, class_docstrings, lists, dicts, dict_constructor, test_dir, ints, longs, floats, complexes, spamlists, spamdicts, pydicts, pylists, metaclass, pymods, multi, mro_disagreement, diamond, ex5, monotonicity, consistency_with_epg, objects, slots, slotspecials, dynamics, errors, classmethods, classmethods_in_c, staticmethods, staticmethods_in_c, classic, compattr, newslot, altmro, overloading, methods, specials, weakrefs, properties, supers, inherits, keywords, restricted, str_subclass_as_dict_key, classic_comparisons, rich_comparisons, coercions, descrdoc, setclass, setdict, pickles, copies, binopoverride, subclasspropagation, buffer_inherit, str_of_str_subclass, kwdargs, recursive__call__, delhook, hashinherit, strops, deepcopyrecursive, modules, dictproxyiterkeys, dictproxyitervalues, dictproxyiteritems, pickleslots, funnynew, imulbug, docdescriptor, copy_setstate, slices, subtype_resurrection, slottrash, slotmultipleinheritance, testrmul, testipow, test_mutable_bases, test_mutable_bases_with_failing_mro, test_mutable_bases_catch_mro_conflict, mutable_names, subclass_right_op, dict_type_with_metaclass, meth_class_get, isinst_isclass, proxysuper, carloverre, filefault, vicious_descriptor_nonsense, test_init, methodwrapper, notimplemented, test_assign_slice, ] if is_jython: for testfunc in [ # Requires CPython specific xxsubtype module spamlists, spamdicts, classmethods_in_c, staticmethods_in_c, # Jython allows subclassing of classes it shouldn't (like # builtin_function_or_method): # http://bugs.jython.org/issue1758319 errors, # CPython's unicode.__cmp__ is derived from type (and only # takes 1 arg) specials, # Jython file lacks doc strings descrdoc, # New style classes don't support __del__: # http://bugs.jython.org/issue1057 delhook, subtype_resurrection, # Lack __basicsize__: http://bugs.jython.org/issue1017 slotmultipleinheritance, # Jython lacks CPython method-wrappers (though maybe this # should pass anyway?) methodwrapper, # derived classes don't support coerce: # http://bugs.jython.org/issue1060 notimplemented ]: testfuncs.remove(testfunc) if __name__ == '__main__': import sys if len(sys.argv) > 1: testfuncs = [globals()[arg] for arg in sys.argv[1:]] n = len(testfuncs) success = 0 for testfunc in testfuncs: try: if verbose: print "*"*40 testfunc() except Exception, e: if isinstance(e, KeyboardInterrupt) or n == 1: raise print "-->", testfunc.__name__, "FAILURE(%d/%d)" % (success, n), str(e) else: success += 1 if verbose: print "-->", testfunc.__name__, "OK(%d/%d)" % (success, n) if n != success: raise TestFailed, "%d/%d" % (success, n) else: if verbose: print "All OK"
13398ab1bd8d77ebfd0ce3cb3d1f505199b1fed3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6753/13398ab1bd8d77ebfd0ce3cb3d1f505199b1fed3/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 1842, 17728, 273, 306, 16046, 1734, 67, 5680, 643, 16, 468, 6753, 506, 1122, 16, 28578, 4053, 67, 5680, 643, 16, 741, 67, 2211, 67, 3645, 16, 667, 67, 2434, 1021...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 1842, 17728, 273, 306, 16046, 1734, 67, 5680, 643, 16, 468, 6753, 506, 1122, 16, 28578, 4053, 67, 5680, 643, 16, 741, 67, 2211, 67, 3645, 16, 667, 67, 2434, 1021...
if re.search('UNEXPECTED', cmd.logs['stdio'].getText()):
if re.search('TEST-UNEXPECTED-', cmd.logs['stdio'].getText()):
def evaluateCommand(self, cmd): superResult = ShellCommandReportTimeout.evaluateCommand(self, cmd) if SUCCESS != superResult: return WARNINGS if re.search('UNEXPECTED', cmd.logs['stdio'].getText()): return WARNINGS return SUCCESS
7a98e6a7b1b7c3be64f4ca6d0a6392c5ed6108e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/7a98e6a7b1b7c3be64f4ca6d0a6392c5ed6108e2/steps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 2189, 12, 2890, 16, 1797, 4672, 2240, 1253, 273, 19433, 2189, 4820, 2694, 18, 21024, 2189, 12, 2890, 16, 1797, 13, 309, 16561, 480, 2240, 1253, 30, 327, 9744, 55, 309, 283, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 2189, 12, 2890, 16, 1797, 4672, 2240, 1253, 273, 19433, 2189, 4820, 2694, 18, 21024, 2189, 12, 2890, 16, 1797, 13, 309, 16561, 480, 2240, 1253, 30, 327, 9744, 55, 309, 283, 18, 3...
if not len(emails):
if not emails:
def msg_send(self, msg, emails, priority=None): if not len(emails): return False del msg['To'] msg['To'] = emails[0] if len(emails)>1: if 'Cc' in msg: del msg['Cc'] msg['Cc'] = ','.join(emails[1:]) del msg['Reply-To'] msg['Reply-To'] = self.email if priority: msg['X-Priority'] = priorities.get(priority, '3 (Normal)') s = smtplib.SMTP() s.connect() s.sendmail(self.email, emails, msg.as_string()) s.close() return True
58e9a51264038e97e4ac99a3a64ac10d68e4c26a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/58e9a51264038e97e4ac99a3a64ac10d68e4c26a/openerp_mailgate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 4661, 12, 2890, 16, 1234, 16, 14255, 16, 4394, 33, 7036, 4672, 309, 486, 14255, 30, 327, 1083, 1464, 1234, 3292, 774, 3546, 1234, 3292, 774, 3546, 273, 14255, 63, 20, 65, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 4661, 12, 2890, 16, 1234, 16, 14255, 16, 4394, 33, 7036, 4672, 309, 486, 14255, 30, 327, 1083, 1464, 1234, 3292, 774, 3546, 1234, 3292, 774, 3546, 273, 14255, 63, 20, 65, 309...
print exposureKey
def process(self): self.activeClipboard = self.inputQueue.getNextDataset() metadataPolicy = self._policy.getPolicy("metadata") datatypePolicy = self._policy.getPolicy("datatype") exposureKeys = self._policy.getStringArray("exposureKey")
ce0d6d5f0dbf0aea3918c2b71f3cbd05c00f7b11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6553/ce0d6d5f0dbf0aea3918c2b71f3cbd05c00f7b11/MetadataStages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 365, 18, 3535, 15339, 3752, 273, 365, 18, 2630, 3183, 18, 588, 2134, 10656, 1435, 1982, 2582, 273, 365, 6315, 5086, 18, 588, 2582, 2932, 4165, 7923, 11172, 2582, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 365, 18, 3535, 15339, 3752, 273, 365, 18, 2630, 3183, 18, 588, 2134, 10656, 1435, 1982, 2582, 273, 365, 6315, 5086, 18, 588, 2582, 2932, 4165, 7923, 11172, 2582, 27...
action="store", type="str", default="ipv4")
action="store", type="string", default="ipv4")
def parseOptions(): parser = OptionParser(usage="%prog [options] list|xml|delete") common = OptionGroup(parser, "Options") common.add_option("--quiet", help="Be quiet", action="store_true", default=False) parser.add_option_group(common) common = OptionGroup(parser, "Filter") # Filter on IP common.add_option("-s", "--orig-src", help="Source address from original direction", action="store", type="str", default=None) common.add_option("-d", "--orig-dst", help="Destination address from original direction", action="store", type="str", default=None) common.add_option("-r", "--reply-src", help="Source address from reply direction", action="store", type="str", default=None) common.add_option("-q", "--reply-dst", help="Destination address from reply direction", action="store", type="str", default=None) # Filter on port common.add_option("--orig-src-port", "--sport", help="Source port from original direction", action="store", type="int", default=None) common.add_option("--orig-dst-port", "--dport", help="Destination port from original direction", action="store", type="int", default=None) common.add_option("--reply-src-port", help="Source port from reply direction", action="store", type="int", default=None) common.add_option("--reply-dst-port", help="Destination port from reply direction", action="store", type="int", default=None) common.add_option("-p", "--protonum", help="Layer 4 Protocol, eg. 'udp' (default: tcp)", action="store", type="str", default="tcp") common.add_option("-f", "--family", help="Layer 3 Protocol, eg. 'ipv6' (default: ipv4)", action="store", type="str", default="ipv4") parser.add_option_group(common) # Parse options values, arguments = parser.parse_args() # Check option values if values.orig_src: values.orig_src = IP(values.orig_src) if values.orig_dst: values.orig_dst = IP(values.orig_dst) if values.reply_src: values.reply_src = IP(values.reply_src) if values.reply_dst: values.reply_dst = IP(values.reply_dst) if values.protonum: if values.protonum not in IPPROTO_REVERSE_NAMES: print "Unknow protocol number: %s" % values.protonum sys.exit(1) else: values.protonum = IPPROTO_REVERSE_NAMES[values.protonum] if values.family not in L3PROTONUM_REVERSE_NAMES: print "Unknow layer 3 protocol: %s" % values.family sys.exit(1) else: values.family = L3PROTONUM_REVERSE_NAMES[values.family] if len(arguments) != 1 or arguments[0] not in ("list", "xml", "delete"): parser.print_help() sys.exit(1) return values, arguments[0]
306bc1c760f323751680387b5619bfcb236a084a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12504/306bc1c760f323751680387b5619bfcb236a084a/conntrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1320, 13332, 2082, 273, 18862, 12, 9167, 11613, 14654, 306, 2116, 65, 666, 96, 2902, 96, 3733, 7923, 225, 2975, 273, 2698, 1114, 12, 4288, 16, 315, 1320, 7923, 2975, 18, 1289, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1320, 13332, 2082, 273, 18862, 12, 9167, 11613, 14654, 306, 2116, 65, 666, 96, 2902, 96, 3733, 7923, 225, 2975, 273, 2698, 1114, 12, 4288, 16, 315, 1320, 7923, 2975, 18, 1289, 67, ...
conn.close()
def getInterpModels(dimensions, whereSQLStatement, gridData): conn = modeldb.getModelDBConnection() positions = conn.execute('select %s whereSQLStatement' % (dimensions,)).fetchall() binaryDecks = conn.execute('select deck whereSQLStatement') conn.close() modelGrid = [] for binDeck in binaryDecks: deck = pickle.loads(zlib.decompress(binDeck)) modelGrid.append(deck) return np.array(modelGrid)
e1f4ffdd45680f33feef2b078115e7fc26ccf7a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7433/e1f4ffdd45680f33feef2b078115e7fc26ccf7a2/interpolate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2465, 84, 8430, 12, 14797, 16, 1625, 3997, 3406, 16, 3068, 751, 4672, 225, 1487, 273, 681, 18963, 18, 588, 1488, 2290, 1952, 1435, 225, 6865, 273, 1487, 18, 8837, 2668, 4025, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2465, 84, 8430, 12, 14797, 16, 1625, 3997, 3406, 16, 3068, 751, 4672, 225, 1487, 273, 681, 18963, 18, 588, 1488, 2290, 1952, 1435, 225, 6865, 273, 1487, 18, 8837, 2668, 4025, 738, ...
operation = "None" doCount = False doList = False
operation = None
def main(): operation = "None" doCount = False doList = False argsList = [] namespaces = [] for arg in wikipedia.handleArgs(): if arg == '-count': operation = "Count" elif arg == '-list': operation = "List" elif arg.startswith('-namespace:'): try: namespaces.append(int(arg[len('-namespace:'):])) except ValueError: namespaces.append(arg[len('-namespace:'):]) else: argsList.append(arg) if operation == "None": wikipedia.output(__doc__, 'utf-8') else: robot = TemplateCountRobot() if not argsList: argsList = ['ref', 'note', 'ref label', 'note label'] if operation == "Count": robot.countTemplates(argsList, namespaces) elif operation == "List": robot.listTemplates(argsList, namespaces)
b081ba36851db19d77ba2736d2ccc1679a9b23b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/b081ba36851db19d77ba2736d2ccc1679a9b23b0/templatecount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1674, 273, 599, 833, 682, 273, 5378, 7728, 273, 5378, 225, 364, 1501, 316, 21137, 18, 4110, 2615, 13332, 309, 1501, 422, 2400, 1883, 4278, 1674, 273, 315, 1380, 6, 1327, 150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1674, 273, 599, 833, 682, 273, 5378, 7728, 273, 5378, 225, 364, 1501, 316, 21137, 18, 4110, 2615, 13332, 309, 1501, 422, 2400, 1883, 4278, 1674, 273, 315, 1380, 6, 1327, 150...
print '
def gen_special_table(pinyins): _dict = {} for i in xrange(0, len(pinyins)): _dict[pinyins[i][0]] = i l = list(compaired_special()) l.sort() print 'static const Pinyin *special_table[][4] = {' for r in l: ids = [("&pinyin_table[%d]," % _dict[py]).ljust(20) for py in r] print ' { %s %s %s %s },' % tuple(ids), "/* %s %s => %s %s */" % r print '};' print '#define SPECIAL_TABLE_NR (sizeof (special_table) / sizeof (special_table[0]))' print
2adb75fd7849d94019a36a13fbd3196ff707aea3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/471/2adb75fd7849d94019a36a13fbd3196ff707aea3/genpytable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 9371, 67, 2121, 12, 84, 11652, 2679, 4672, 389, 1576, 273, 2618, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 84, 11652, 2679, 3719, 30, 389, 1576, 63, 84, 11652, 2679, 63, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 9371, 67, 2121, 12, 84, 11652, 2679, 4672, 389, 1576, 273, 2618, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 84, 11652, 2679, 3719, 30, 389, 1576, 63, 84, 11652, 2679, 63, 7...
E = self.edit_text() + \ ' '.join(self.collaborators()) + ' '.join(self.viewers()) + ' ' + self.publisher() + \ ' '.join(self.attached_data_files()) E = E.lower() words = split_search_string_into_keywords(search) for word in words: if not word.lower() in E:
r = open('%s/worksheet.txt'%self.__dir).read().lower() for W in split_search_string_into_keywords(search): if W.lower() not in r:
def satisfies_search(self, search): """ INPUT: search is a string that describes a search query, i.e., a space-separated collections of words. OUTPUT: True if the search is satisfied by self, i.e., all the words appear in the text version of self. """ E = self.edit_text() + \ ' '.join(self.collaborators()) + ' '.join(self.viewers()) + ' ' + self.publisher() + \ ' '.join(self.attached_data_files()) E = E.lower() words = split_search_string_into_keywords(search) for word in words: if not word.lower() in E: return False return True
acc9b502df7a3da32bd92feda57dbf31bf0eff3a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/acc9b502df7a3da32bd92feda57dbf31bf0eff3a/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 3072, 12, 2890, 16, 1623, 4672, 3536, 12943, 30, 1623, 353, 279, 533, 716, 19605, 279, 1623, 843, 16, 277, 18, 73, 12990, 279, 3476, 17, 24622, 6980, 434, 4511, 18, 225, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 3072, 12, 2890, 16, 1623, 4672, 3536, 12943, 30, 1623, 353, 279, 533, 716, 19605, 279, 1623, 843, 16, 277, 18, 73, 12990, 279, 3476, 17, 24622, 6980, 434, 4511, 18, 225, 115...
DIRAC.exit(2)
DIRAC.exit( 2 )
def usage(): print 'Usage: %s <DN>/<username> <DIRAC group>' %( Script.scriptName ) print " <username> will fail if there's more than one DN registered for that username" DIRAC.exit(2)
8ca4e2de180e2d4ec827b82ef9abb7122c9ba783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8ca4e2de180e2d4ec827b82ef9abb7122c9ba783/dirac-admin-get-proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 8609, 16893, 32, 5053, 34, 411, 4537, 2226, 1041, 1870, 8975, 7739, 18, 4263, 461, 262, 1172, 315, 411, 5053, 34, 903, 2321, 309, 1915, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 8609, 16893, 32, 5053, 34, 411, 4537, 2226, 1041, 1870, 8975, 7739, 18, 4263, 461, 262, 1172, 315, 411, 5053, 34, 903, 2321, 309, 1915, ...
def _toPython(self, value, state=None): return self.attemptConvert(self, value, state, toPython) def _fromPython(self, value, state): return self.attemptConvert(self, value, state, fromPython)
def toPython(self, value, state=None): return self.attemptConvert(value, state, toPython) def fromPython(self, value, state): return self.attemptConvert(value, state, fromPython)
def _toPython(self, value, state=None): return self.attemptConvert(self, value, state, toPython)
4d228faf364c395bffae3f0483fcaa2dd3434c80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/4d228faf364c395bffae3f0483fcaa2dd3434c80/validators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 15774, 12, 2890, 16, 460, 16, 919, 33, 7036, 4672, 327, 365, 18, 11764, 2723, 12, 2890, 16, 460, 16, 919, 16, 358, 15774, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 15774, 12, 2890, 16, 460, 16, 919, 33, 7036, 4672, 327, 365, 18, 11764, 2723, 12, 2890, 16, 460, 16, 919, 16, 358, 15774, 13, 2, -100, -100, -100, -100, -100, -100, -100, -...
if sage.modules.free_module_element.is_FreeModuleElement(x):
if free_module_element.is_FreeModuleElement(x):
def __init__(self, parent, x, check=True): r""" Create with ``DirichletCharacter(parent, values_on_gens)`` INPUT: - ``parent`` - DirichletGroup, a group of Dirichlet characters - ``x``
80bb64cda04307dbe55314d6e4fce85c5aab0086 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/80bb64cda04307dbe55314d6e4fce85c5aab0086/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 619, 16, 866, 33, 5510, 4672, 436, 8395, 1788, 598, 12176, 1621, 1354, 1810, 7069, 12, 2938, 16, 924, 67, 265, 67, 23730, 13, 10335, 225, 12943,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 619, 16, 866, 33, 5510, 4672, 436, 8395, 1788, 598, 12176, 1621, 1354, 1810, 7069, 12, 2938, 16, 924, 67, 265, 67, 23730, 13, 10335, 225, 12943,...
context.env['MATLAB'] = 'MATLABPATH=%s %s -nosplash -nojvm -nodesktop' % \ MATLABPATH, matlab
context.env['MATLAB'] = 'MATLABPATH=%s %s -nosplash -nojvm -nodesktop' %(MATLABPATH,matlab)
def matlab(context): context.Message("checking for Matlab ... ") matlab = WhereIs('matlab') if matlab: context.Result(matlab) RSFROOT_lib = os.path.join(context.env.get('RSFROOT'),'lib') MATLABPATH = os.environ.get('MATLABPATH') if MATLABPATH: MATLABPATH += ':' + RSFROOT_lib else: MATLABPATH = RSFROOT_lib context.env['MATLAB'] = 'MATLABPATH=%s %s -nosplash -nojvm -nodesktop' % \ MATLABPATH, matlab else: context.Result(context_failure) stderr_write('Please install Matlab.') context.env['MATLAB'] = None sys.exit(unix_failure) context.Message("checking for mex ... ") mex = WhereIs('mex') if mex: context.Result(mex) context.env['MEX'] = mex else: context.Result(context_failure) stderr_write('Please install mex.') context.env['MEX'] = None sys.exit(unix_failure) # See http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mex.html if plat['OS'] == 'linux': if plat['arch'] == '32bit': suffix = 'glx' else: suffix = 'a64' elif plat['OS'] == 'sunos': suffix = 'sol' elif plat['OS'] == 'darwin': suffix = 'mac' else: suffix == 'glx' context.env['MEXSUFFIX'] = '.mex' + suffix
a4e5d9bbb7b435f3013c8ae0261cb58255b4c30e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3143/a4e5d9bbb7b435f3013c8ae0261cb58255b4c30e/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 7411, 12, 2472, 4672, 819, 18, 1079, 2932, 24609, 364, 14493, 7411, 1372, 9369, 4834, 7411, 273, 12177, 2520, 2668, 7373, 7411, 6134, 309, 4834, 7411, 30, 819, 18, 1253, 12, 7373, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 7411, 12, 2472, 4672, 819, 18, 1079, 2932, 24609, 364, 14493, 7411, 1372, 9369, 4834, 7411, 273, 12177, 2520, 2668, 7373, 7411, 6134, 309, 4834, 7411, 30, 819, 18, 1253, 12, 7373, ...
Link ('http://www.ninemoons.com/GG/' 'Geek Gadgets is an ongoing effort to port Unix tools to non-Unix' ' systems led by the famous Fred Fish at', ( Href ('http://www.ninemoons.com/', 'Cronus'), ), ), Link ('http://www.openamiga.org/', 'Open Amiga Foundation OAF'), Link ('http://www.satanicdreams.com/scalos/index.html', 'Official Scalos Site'), Link ('http://www.crosswinds.net/~osap/', 'Open Source Amiga Projects'),
Link ('http://www.ninemoons.com/GG/', 'Geek Gadgets', ( 'Geek Gadgets is an ongoing effort to port Unix tools to non-Unix' ' systems led by the famous Fred Fish at', Href ('http://www.ninemoons.com/', 'Cronus'), ), ), Link ('http://www.scalos.co.uk/', 'Official Scalos Site'),
def __init__ (self, url, label=None, text=None, logo=None):
39f2fab3ad3947c227ca8458ed9ca9edf3850912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4747/39f2fab3ad3947c227ca8458ed9ca9edf3850912/links.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 880, 16, 1433, 33, 7036, 16, 977, 33, 7036, 16, 19128, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 880, 16, 1433, 33, 7036, 16, 977, 33, 7036, 16, 19128, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
collectionconf.log_message("table: %s, parent: %s, pkeys: %s, penreg: %s, form: %s" % (self.__tablename__, self.__parent__, primarykeys, repr(penreg), repr(self.__form__)))
def traite_saisie(self, primarykeys, parent = None, sup = None, penreg = None) : if not parent : parent = self.__tablename__ ################# CHERCHER / CHERCHER LIEN #########
9e613a17c8e6c744819ccaebd29e26608cf977c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6029/9e613a17c8e6c744819ccaebd29e26608cf977c6/collectiondata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1284, 1137, 67, 13098, 291, 1385, 12, 2890, 16, 3354, 2452, 16, 982, 273, 599, 16, 1169, 273, 599, 16, 14264, 1574, 273, 599, 13, 294, 309, 486, 982, 294, 982, 273, 365, 16186, 7032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1284, 1137, 67, 13098, 291, 1385, 12, 2890, 16, 3354, 2452, 16, 982, 273, 599, 16, 1169, 273, 599, 16, 14264, 1574, 273, 599, 13, 294, 309, 486, 982, 294, 982, 273, 365, 16186, 7032, ...
BaseCursor._do_query(self, q) self._rows = self.result and self._fetch_all_rows() or ()
rowcount = self._BaseCursor__do_query(q) self._rows = self._result and self._fetch_all_rows() or ()
def _do_query(self, q): self.connection._acquire() try: BaseCursor._do_query(self, q) self._rows = self.result and self._fetch_all_rows() or () self._pos = 0 del self.result finally: self.connection._release()
4dcca6779b980ae173a387375f0f35be5e3fead3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/4dcca6779b980ae173a387375f0f35be5e3fead3/MySQLdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 12, 2890, 16, 1043, 4672, 365, 18, 4071, 6315, 1077, 1039, 1435, 775, 30, 1027, 1883, 273, 365, 6315, 2171, 6688, 972, 2896, 67, 2271, 12, 85, 13, 365, 6315, 3870,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 12, 2890, 16, 1043, 4672, 365, 18, 4071, 6315, 1077, 1039, 1435, 775, 30, 1027, 1883, 273, 365, 6315, 2171, 6688, 972, 2896, 67, 2271, 12, 85, 13, 365, 6315, 3870,...
'code': tax_code_obj.browse(cursor, user,
'code.rec_name': tax_code_obj.browse(cursor, user,
def _compute_tax_lines(self, cursor, user, ids, vals, journal_type, context=None): res = {} account_obj = self.pool.get('account.account') tax_code_obj = self.pool.get('account.tax.code') tax_obj = self.pool.get('account.tax') move_obj = self.pool.get('account.move') if vals.get('move'): #Only for first line return res if ids: line = self.browse(cursor, user, ids[0], context=context) if line.tax_lines: res['remove'] = [x.id for x in line.tax_lines] if vals.get('account'): account = account_obj.browse(cursor, user, vals['account'], context=context) debit = vals.get('debit', Decimal('0.0')) credit = vals.get('credit', Decimal('0.0')) for tax in account.taxes: if journal_type == 'revenue': if debit: key = 'credit_note' else: key = 'invoice' else: if debit: key = 'invoice' else: key = 'credit_note' base_amounts = {} for tax_line in tax_obj.compute(cursor, user, [x.id for x in account.taxes], debit or credit, 1, context=context): code_id = tax_line['tax'][key + '_base_code'].id base_amounts.setdefault(code_id, Decimal('0.0')) base_amounts[code_id] += tax_line['base'] * \ tax_line['tax'][key + '_tax_sign'] for code_id in base_amounts: if not code_id: continue res.setdefault('add', []).append({ 'amount': base_amounts[code_id], 'code': code_id, 'code': tax_code_obj.browse(cursor, user, code_id, context=context).rec_name, }) return res
ae2697cf04ba3ad85b74d4a7c4664d26a7ea6bc6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9290/ae2697cf04ba3ad85b74d4a7c4664d26a7ea6bc6/move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 8066, 67, 3548, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 13001, 67, 723, 16, 819, 33, 7036, 4672, 400, 273, 2618, 2236, 67, 2603, 273, 365, 18, 6011, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 8066, 67, 3548, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 13001, 67, 723, 16, 819, 33, 7036, 4672, 400, 273, 2618, 2236, 67, 2603, 273, 365, 18, 6011, 18, ...
return 'out'
return '../out'
def PlatformBuildPrefix(self): """Return a platform specific build directory prefix.
4c74d9174de4df13ec25263555fcc64dceb896b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/4c74d9174de4df13ec25263555fcc64dceb896b8/coverage_posix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11810, 3116, 2244, 12, 2890, 4672, 3536, 990, 279, 4072, 2923, 1361, 1867, 1633, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11810, 3116, 2244, 12, 2890, 4672, 3536, 990, 279, 4072, 2923, 1361, 1867, 1633, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print 'Found valid CMake version'
print 'Found valid CMake version %s' % m.group(1)
def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = p.communicate() if p.returncode == 0 and stdout == 'cmake version %s\r\n' % version: # found one that works, hurrah! print 'Found valid CMake version' found_cmd = test_cmd # HACK: gotta go out so just hacking this for now if found_cmd == r'tool\cmake\bin\%s' % self.cmake_cmd: found_cmd = r'..\tool\cmake\bin\%s' % self.cmake_cmd break if not found_cmd: found_cmake = False # if prompting allowed if not self.no_prompts: msg = 'CMake 2.8.0 not installed. Auto download now? [Y/n]' print msg, yn = raw_input() # if response was anyting but no if yn not in ['n', 'N']: if not os.path.exists('tool'): os.mkdir('tool') err = os.system(r'svn checkout https://synergy-plus.googlecode.com/svn/tools/win/cmake tool\cmake') if err != 0: raise Exception('Unable to get cmake from repository with error code code: ' + str(err)) found_cmd = r'..\tool\cmake\bin\%s' % self.cmake_cmd found_cmake = True # if cmake was not found if not found_cmake: raise Exception('Cannot continue without CMake, exiting.') return found_cmd else: return self.cmake_cmd
0ba55e5e1d08dbeaf7185ed1e612bb604e009673 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7412/0ba55e5e1d08dbeaf7185ed1e612bb604e009673/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3898, 67, 71, 6540, 12, 2890, 4672, 309, 2589, 18, 9898, 422, 296, 8082, 1578, 4278, 225, 1177, 273, 296, 22, 18, 28, 18, 20, 11, 1392, 67, 4172, 273, 875, 364, 1842, 67, 4172, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3898, 67, 71, 6540, 12, 2890, 4672, 309, 2589, 18, 9898, 422, 296, 8082, 1578, 4278, 225, 1177, 273, 296, 22, 18, 28, 18, 20, 11, 1392, 67, 4172, 273, 875, 364, 1842, 67, 4172, 316, ...
opts, args = getopt.getopt(sys.argv[1:], "qh", ["qmake=", "help"])
opts, args = getopt.getopt(sys.argv[1:], "q:h", ["qmake=", "help"])
def main(): try: opts, args = getopt.getopt(sys.argv[1:], "qh", ["qmake=", "help"]) except getopt.GetoptError, err: print str(err) usage(sys.argv[0]) sys.exit(1) qt = "" for o, a in opts: if o in ("-q", "--qmake"): qt = a if o in ("-h", "--help"): usage(sys.argv[0]) sys.exit(0) # qmake path if qt == "": qt = findqt() if qt == "": print "ERROR: No suitable Qt installation found." os.exit(1) # figure version from sources ver = findversion("version.h") header = "Building %s %s" % (program, ver) print header print len(header) * "=" # build it. qmake(qt) build() if sys.platform == "win32": upxfile() zipball(ver) else: tarball(ver) print "done."
d7b9f996e3eb3b870bee9d9f7fed369d39d93168 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6738/d7b9f996e3eb3b870bee9d9f7fed369d39d93168/deploy-release.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 85, 30, 76, 3113, 8247, 85, 6540, 1546, 16, 315, 5201, 6, 5717, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 85, 30, 76, 3113, 8247, 85, 6540, 1546, 16, 315, 5201, 6, 5717, 1335, ...
return { 'view_type': 'form', "view_mode": 'form', 'res_model': 'ir.actions.configuration.wizard', 'type': 'ir.actions.act_window', 'context':{'menu':True}, 'target':'new', }
return pool.get('res.config').next(cr, uid, [], context=context)
def _config(self, cr, uid, data, context=None): pool = pooler.get_pool(cr.dbname) users_obj=pool.get('res.users') action_obj=pool.get('ir.actions.act_window')
f9ffeae373c709188240e2e0ad58060c63c2592b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/f9ffeae373c709188240e2e0ad58060c63c2592b/wizard_base_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1425, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 33, 7036, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 3677, 67, 2603, 33, 6011, 18, 588, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1425, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 33, 7036, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 3677, 67, 2603, 33, 6011, 18, 588, 2668, ...
self.config['handle_size'] = int(widget.get_value())
self.config['handle_size'] = int(value)
def on_handlesize_change_value(self, widget): """Handle size changed""" self.config['handle_size'] = int(widget.get_value()) self.config.save()
5b0bb38cec7299d90e36e6015b49ba6e922b9f57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6502/5b0bb38cec7299d90e36e6015b49ba6e922b9f57/prefseditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 24111, 554, 67, 3427, 67, 1132, 12, 2890, 16, 3604, 4672, 3536, 3259, 963, 3550, 8395, 365, 18, 1425, 3292, 4110, 67, 1467, 3546, 273, 509, 12, 1132, 13, 365, 18, 1425, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 24111, 554, 67, 3427, 67, 1132, 12, 2890, 16, 3604, 4672, 3536, 3259, 963, 3550, 8395, 365, 18, 1425, 3292, 4110, 67, 1467, 3546, 273, 509, 12, 1132, 13, 365, 18, 1425, 18, ...
results = InspectableObjectCollectionView.getObjectsOfClass(self, theClass)
results = InspectableObjectView.getObjectsOfClass(self, theClass)
def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectCollectionView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if self.dataView.objects[objName][1].__class__ is theClass: dataResults['self.'+objName] = self.dataView.objects[objName][1] results.update(dataResults) return results
3095cf591b9bab682ecbcda45a59ab4acee24fb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3095cf591b9bab682ecbcda45a59ab4acee24fb6/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4710, 951, 797, 12, 2890, 16, 326, 797, 4672, 3536, 531, 1107, 2794, 358, 2546, 527, 2184, 628, 326, 1910, 1767, 3536, 1686, 273, 20045, 429, 921, 1767, 18, 588, 4710, 951, 797, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4710, 951, 797, 12, 2890, 16, 326, 797, 4672, 3536, 531, 1107, 2794, 358, 2546, 527, 2184, 628, 326, 1910, 1767, 3536, 1686, 273, 20045, 429, 921, 1767, 18, 588, 4710, 951, 797, 1...
right_topic = rospy.resolve_name("stereo") + "/right/" + rospy.resolve_name("image")
right_topic = rospy.resolve_name("stereo") + "/right" + rospy.resolve_name("image")
def __init__(self, chess_size, dim): self.chess_size = chess_size self.dim = dim
2befc05d43bcadd64305ea55118b2948a12b4ddf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10767/2befc05d43bcadd64305ea55118b2948a12b4ddf/cameracheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 462, 403, 67, 1467, 16, 2464, 4672, 365, 18, 343, 403, 67, 1467, 273, 462, 403, 67, 1467, 365, 18, 3509, 273, 2464, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 462, 403, 67, 1467, 16, 2464, 4672, 365, 18, 343, 403, 67, 1467, 273, 462, 403, 67, 1467, 365, 18, 3509, 273, 2464, 2, -100, -100, -100, -100, -100, -1...
self._add_accelerator_for_widget(agr, "edit_undo", "<Control>y")
self._add_accelerator_for_widget(agr, "edit_undo", "<Control>z") self._add_accelerator_for_widget(agr, "edit_redo", "<Control>y")
def _init_accelerators(self): agr = gtk.AccelGroup() self.builder.get_object("MainWindow").add_accel_group(agr)
af20d8e98a36f6aea701aa151a74528b5be3dc0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/af20d8e98a36f6aea701aa151a74528b5be3dc0f/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 8981, 22990, 3062, 12, 2890, 4672, 1737, 86, 273, 22718, 18, 18019, 1114, 1435, 365, 18, 9574, 18, 588, 67, 1612, 2932, 6376, 3829, 20387, 1289, 67, 30737, 67, 1655, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 8981, 22990, 3062, 12, 2890, 4672, 1737, 86, 273, 22718, 18, 18019, 1114, 1435, 365, 18, 9574, 18, 588, 67, 1612, 2932, 6376, 3829, 20387, 1289, 67, 30737, 67, 1655, 12, ...
return "Programme unavailable ('%s')" % (reason)
return _('Programme unavailable ("%s")') % (reason)
def __str__(self): reason = self.reason or '<no reason given>' return "Programme unavailable ('%s')" % (reason)
941a9a2fa9da9017710d82bcb23a65cee2c11ffe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11070/941a9a2fa9da9017710d82bcb23a65cee2c11ffe/iplayer2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3971, 273, 365, 18, 10579, 578, 2368, 2135, 3971, 864, 1870, 327, 389, 2668, 9459, 3501, 15781, 7566, 9, 87, 31241, 13, 738, 261, 10579, 13, 225, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3971, 273, 365, 18, 10579, 578, 2368, 2135, 3971, 864, 1870, 327, 389, 2668, 9459, 3501, 15781, 7566, 9, 87, 31241, 13, 738, 261, 10579, 13, 225, 2, -10...
vals['error_msg'] = result['error_msg']
vals['error_msg'] = result['error_msg']
def process(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state == 'todo': eval_context = { 'pool': self.pool, 'cr': cr, 'uid': uid, 'wi': wi, 'object': wi.activity_id, 'transition': wi.activity_id.to_ids } try: expr = eval(str(wi.activity_id.condition), eval_context) if expr: result = True if wi.campaign_id.mode in ('manual','active'): result = self.pool.get('marketing.campaign.activity').process( cr, uid, wi.activity_id.id, wi.id, context) if result: self.write(cr, uid, wi.id, {'state': 'done'}) self.process_chain(cr, uid, wi.id, context) else: vals = {'state': 'exception'} if type(result) == type({}) and 'error_msg' in result: vals['error_msg'] = result['error_msg'] self.write(cr, uid, wi.id, vals) else: self.write(cr, uid, wi.id, {'state': 'cancelled'}) except Exception,e: self.write(cr, uid, wi.id, {'state': 'exception', 'error_msg': str(e)}) return True
fe0030c8f5a3e1c3f2b5ccc0a600111746ef3da7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fe0030c8f5a3e1c3f2b5ccc0a600111746ef3da7/marketing_campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 4422, 16, 4555, 16, 26409, 67, 2232, 16, 819, 12938, 4672, 364, 16138, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 26409, 67, 2232, 4672, 309, 16138, 18, 2019, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 4422, 16, 4555, 16, 26409, 67, 2232, 16, 819, 12938, 4672, 364, 16138, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 26409, 67, 2232, 4672, 309, 16138, 18, 2019, 422...
if not data:
if not data or data == 'END':
def tick(self): c = True while c: try: data = self.q.get_nowait() if not data: self.timer.stop() self.done = True c = False key, args = data self.result.translate[key](*args) except Empty: c = False
5695744521085e073cc0200a034b3083fcaadb9d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14942/5695744521085e073cc0200a034b3083fcaadb9d/qtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4024, 12, 2890, 4672, 276, 273, 1053, 1323, 276, 30, 775, 30, 501, 273, 365, 18, 85, 18, 588, 67, 3338, 1540, 1435, 309, 486, 501, 578, 501, 422, 296, 4415, 4278, 365, 18, 12542, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4024, 12, 2890, 4672, 276, 273, 1053, 1323, 276, 30, 775, 30, 501, 273, 365, 18, 85, 18, 588, 67, 3338, 1540, 1435, 309, 486, 501, 578, 501, 422, 296, 4415, 4278, 365, 18, 12542, 18,...
cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/vrpn.lib"' cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/quat.lib"'
cmd = cmd + ' ' + THIRDPARTY + 'vrpn/lib/vrpn.lib' cmd = cmd + ' ' + THIRDPARTY + 'vrpn/lib/quat.lib'
def CompileLink(dll=0, obj=[], opts=[], xdep=[]): if (dll==0): sys.exit("Syntax error in CompileLink directive") if (COMPILER=="MSVC7"): ALLTARGETS.append(PREFIX+"/bin/"+dll) lib = PREFIX+"/lib/"+dll[:-4]+".lib" dll = PREFIX+"/bin/"+dll wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x) elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x) elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x) else: sys.exit("unknown suffix in object list.") if (older(dll, wobj+xdep)): cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB' if (dll[-4:]!=".exe"): cmd = cmd + " /DLL" if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG " cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 " if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB " if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def' cmd = cmd + ' /OUT:"' + dll + '" /IMPLIB:"' + lib + '" /MAP:NUL' cmd = cmd + ' /LIBPATH:"' + PREFIX + '/python/libs" ' for x in wobj: cmd = cmd + ' "' + x + '"' if (dll[-4:]==".exe"): cmd = cmd + ' "' + PREFIX + '/tmp/pandaIcon.res"' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' "' + THIRDPARTY + 'zlib/lib/libz.lib"' if (PkgSelected(opts,"PNG")): cmd = cmd + ' "' + THIRDPARTY + 'png/lib/libpng.lib"' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' "' + THIRDPARTY + 'jpeg/lib/libjpeg.lib"' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' "' + THIRDPARTY + 'tiff/lib/libtiff.lib"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/vrpn.lib"' cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/quat.lib"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' "' + THIRDPARTY + 'fmod/lib/fmod.lib"' if (PkgSelected(opts,"MILES")): cmd = cmd + ' "' + THIRDPARTY + 'miles/lib/mss32.lib"' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cgGL.lib"' cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cg.lib"' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/runtlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/syslib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/contlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/debuglib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/utillib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/stlport_vc7.lib"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' "' + THIRDPARTY + 'nspr/lib/libnspr4.lib"' if (PkgSelected(opts,"SSL")): cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/ssleay32.lib"' cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/libeay32.lib"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' "' + THIRDPARTY + 'freetype/lib/libfreetype.lib"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/rfftw.lib"' cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/fftw.lib"' if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' "' + Maya5SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMayaAnim.lib"' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' "' + Maya6SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMayaAnim.lib"' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' "' + MAXSDK[max] + 'lib/core.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/mesh.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/maxutil.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/paramblk2.lib"' oscmd(cmd) updatefiledate(dll) if ((OPTIMIZE == 1) and (dll[-4:]==".dll")): CopyFile(dll[:-4]+"_d.dll", dll) if (COMPILER=="LINUXA"): ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so") if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4] else: wdll = PREFIX+"/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a") else: sys.exit("unknown suffix in object list.") if (older(wdll, wobj+xdep)): if (dll[-4:]==".exe"): cmd = 'g++ -o "' + wdll + '" -L"' + PREFIX + '/lib"' else: cmd = 'g++ -shared -o "' + wdll + '" -L"' + PREFIX + '/lib"' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' "' + PREFIX + '/tmp/' + x[:-4] + '.o"' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' "' + PREFIX + '/lib/' + x[:-4] + '.a"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L"' + THIRDPARTY + 'fmod/lib" -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -L"' + THIRDPARTY + 'nvidiacg/lib" ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L"' + THIRDPARTY + 'nspr/lib" -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L"' + THIRDPARTY + 'vrpn/lib" -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L"' + THIRDPARTY + 'fftw/lib" -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) updatefiledate(wdll)
c85190276cd6a9b01b212e9fdd00c907bf653374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c85190276cd6a9b01b212e9fdd00c907bf653374/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8...
if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/rfftw.lib") if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/fftw.lib")
if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/rfftw.lib") if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/fftw.lib")
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
7bd73effad0148a5536b9f22c940716f514d961f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/7bd73effad0148a5536b9f22c940716f514d961f/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
FD_ZERO (&ds) FD_SET (self->sock, &ds)
FD_ZERO(&ds) FD_SET((unsigned)self->sock, &ds)
static def land_net_poll_connect(LandNet *self): int r struct timeval tv fd_set ds FD_ZERO (&ds) FD_SET (self->sock, &ds) tv.tv_sec = 0 tv.tv_usec = 0 # TODO: on Windows, need to check exception descriptors to know if connection failed? r = select (FD_SETSIZE, NULL, &ds, NULL, &tv) if r > 0: #ifdef WINDOWS char a; int as = sizeof a #else unsigned int a, as = sizeof a #endif if getsockopt (self->sock, SOL_SOCKET, SO_ERROR, &a, &as) == 0: if a != 0: errno = a self->state = LAND_NET_INVALID perror ("select(connect)") return self->state = LAND_NET_OK D(land_log_message("Connected (%s ->", land_net_get_address (self, 0))) D(land_log_message_nostamp(" %s).\n", land_net_get_address (self, 1))) return #if defined WINDOWS if WSAGetLastError () != WSAEINTR: #else if r < 0 && errno != EINTR: #endif perror ("select") closesocket (self->sock) return
592872e308788b926d7358eb0ec411e83ee451d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/592872e308788b926d7358eb0ec411e83ee451d0/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 1652, 19193, 67, 2758, 67, 13835, 67, 3612, 12, 29398, 7308, 380, 2890, 4672, 509, 436, 1958, 813, 1125, 13521, 5194, 67, 542, 3780, 225, 478, 40, 67, 24968, 12, 10, 2377, 13, 478, 40, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 1652, 19193, 67, 2758, 67, 13835, 67, 3612, 12, 29398, 7308, 380, 2890, 4672, 509, 436, 1958, 813, 1125, 13521, 5194, 67, 542, 3780, 225, 478, 40, 67, 24968, 12, 10, 2377, 13, 478, 40, ...
print "[free blocks] capacity=%d, used=%d" % (capacity, used)
print "[dvd+rw-mediainfo] free blocks capacity=%d, used=%d" % (capacity, used) elif line.find("Disc status:") > -1: if line.find("blank") > -1: print "[dvd+rw-mediainfo] Disc status blank capacity=%d, used=0" % (capacity) capacity = used used = 0 elif line.find("complete") > -1 and formatted_capacity == 0: print "[dvd+rw-mediainfo] Disc status complete capacity=0, used=%d" % (capacity) used = read_capacity capacity = 1 else: capacity = formatted_capacity
def mediainfoCB(self, mediuminfo, retval, extra_args): capacity = 1 used = 0 infotext = "" mediatype = "" for line in mediuminfo.splitlines(): if line.find("Mounted Media:") > -1: mediatype = line.rsplit(',',1)[1][1:] if mediatype.find("RW") > 0 or mediatype.find("RAM") > 0: self.formattable = True else: self.formattable = False if line.find("Legacy lead-out at:") > -1: used = int(line.rsplit('=',1)[1]) / 1048576.0 print "[lead out] used =", used elif line.find("formatted:") > -1: capacity = int(line.rsplit('=',1)[1]) / 1048576.0 print "[formatted] capacity =", capacity elif capacity == 1 and line.find("READ CAPACITY:") > -1: capacity = int(line.rsplit('=',1)[1]) / 1048576.0 print "[READ CAP] capacity =", capacity elif line.find("Disc status:") > -1: if line.find("blank") > -1: print "[Disc status] capacity=%d, used=0" % (capacity) capacity = used used = 0 elif line.find("Free Blocks:") > -1: try: size = eval(line[14:].replace("KB","*1024")) except: size = 0 if size > 0: capacity = size / 1048576 if used: used = capacity-used print "[free blocks] capacity=%d, used=%d" % (capacity, used) infotext += line+'\n' self["details"].setText(infotext) if self.formattable: self["key_yellow"].text = _("Format") else: self["key_yellow"].text = "" percent = 100 * used / (capacity or 1) if capacity > 4600: self["space_label"].text = "%d / %d MB" % (used, capacity) + " (%.2f%% " % percent + _("of a DUAL layer medium used.") + ")" self["space_bar"].value = int(percent) elif capacity > 1: self["space_label"].text = "%d / %d MB" % (used, capacity) + " (%.2f%% " % percent + _("of a SINGLE layer medium used.") + ")" self["space_bar"].value = int(percent) elif capacity == 1 and used > 0: self["space_label"].text = "%d MB " % (used) + _("on READ ONLY medium.") self["space_bar"].value = int(percent) else: self["space_label"].text = _("Medium is not a writeable DVD!") self["space_bar"].value = 0 free = capacity-used if free < 2: free = 0 self["info"].text = "Media-Type:\t\t%s\nFree capacity:\t\t%d MB" % (mediatype or "NO DVD", free)
946a71097573dc8abc273d24efd23bab3e5f2fb2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/946a71097573dc8abc273d24efd23bab3e5f2fb2/DVDToolbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20623, 28935, 8876, 12, 2890, 16, 16212, 1376, 16, 5221, 16, 2870, 67, 1968, 4672, 7519, 273, 404, 1399, 273, 374, 8286, 352, 408, 273, 1408, 25381, 273, 1408, 364, 980, 316, 16212, 1376...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20623, 28935, 8876, 12, 2890, 16, 16212, 1376, 16, 5221, 16, 2870, 67, 1968, 4672, 7519, 273, 404, 1399, 273, 374, 8286, 352, 408, 273, 1408, 25381, 273, 1408, 364, 980, 316, 16212, 1376...
def get_tasks(bucket=None, schedule=None, status=None):
def get_tasks(self, bucket=None, schedule=None, status=None):
def get_tasks(bucket=None, schedule=None, status=None): rs = AsyncTask.objects.get_query_set() if bucket: rs = rs.filter(bucket=bucket) if schedule: rs = rs.filter(task_type=schedule) if status: rs = rs.filter(status=status) return [ t for t in rs.all() ]
7915141a50ae4a7007dea15a169b15a5fa71ff8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14092/7915141a50ae4a7007dea15a169b15a5fa71ff8a/manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9416, 12, 2890, 16, 2783, 33, 7036, 16, 4788, 33, 7036, 16, 1267, 33, 7036, 4672, 3597, 273, 9672, 2174, 18, 6911, 18, 588, 67, 2271, 67, 542, 1435, 309, 2783, 30, 3597, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9416, 12, 2890, 16, 2783, 33, 7036, 16, 4788, 33, 7036, 16, 1267, 33, 7036, 4672, 3597, 273, 9672, 2174, 18, 6911, 18, 588, 67, 2271, 67, 542, 1435, 309, 2783, 30, 3597, 273...
id='c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com',
id='python.gcal.test%40gmail.com',
def _UpdateCalendarSubscription(self, id='c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com', color=None, hidden=None, selected=None): """Updates the subscription to the calendar with the specified ID.""" print 'Updating the calendar subscription with ID: %s' % id calendar_url = ( 'http://www.google.com/calendar/feeds/default/allcalendars/full/%s' % id) calendar_entry = self.cal_client.GetCalendarListEntry(calendar_url)
0fd73016e9ed2e0b1a268ba70f42439a3feaa2eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/0fd73016e9ed2e0b1a268ba70f42439a3feaa2eb/calendarExample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1891, 7335, 6663, 12, 2890, 16, 612, 2218, 8103, 18, 75, 771, 18, 3813, 9, 7132, 75, 4408, 18, 832, 2187, 2036, 33, 7036, 16, 5949, 33, 7036, 16, 3170, 33, 7036, 4672, 3536, 512...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1891, 7335, 6663, 12, 2890, 16, 612, 2218, 8103, 18, 75, 771, 18, 3813, 9, 7132, 75, 4408, 18, 832, 2187, 2036, 33, 7036, 16, 5949, 33, 7036, 16, 3170, 33, 7036, 4672, 3536, 512...
if result.beaker_id == self.PENDING_RESULT:
if result.beaker_id == cls.PENDING_RESULT:
def read_object(cls, id, parent, args={}): result = cls(id, parent) if result.beaker_id == self.PENDING_RESULT: raise KeyError("The result '%s' did not get through." % id)
302e85a17051b53e3bc2217ee41de8c4481bf915 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13148/302e85a17051b53e3bc2217ee41de8c4481bf915/beakerlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1612, 12, 6429, 16, 612, 16, 982, 16, 833, 12938, 4672, 563, 273, 2028, 12, 350, 16, 982, 13, 309, 563, 18, 2196, 6388, 67, 350, 422, 2028, 18, 25691, 67, 12289, 30, 1002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1612, 12, 6429, 16, 612, 16, 982, 16, 833, 12938, 4672, 563, 273, 2028, 12, 350, 16, 982, 13, 309, 563, 18, 2196, 6388, 67, 350, 422, 2028, 18, 25691, 67, 12289, 30, 1002, ...
def __init__(self, sock, debuglevel=0):
def __init__(self, sock, debuglevel=0, strict=0):
def __init__(self, sock, debuglevel=0): self.fp = sock.makefile('rb', 0) self.debuglevel = debuglevel
02cb24e9179066f7e11c810f45981beb3c445379 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/02cb24e9179066f7e11c810f45981beb3c445379/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 365, 18, 4148, 2815, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 365, 18, 4148, 2815, 27...
Traceback (most recent call last): ... TypeError: ideal is not zero dimensional sage: J = Ideal(I.groebner_basis()) sage: J.vector_space_dimension()
def vector_space_dimension(self): """ Return the vector space dimension of the ring modulo the ideal generated by the initial terms of the generators of self.
c343b8d231fc9be658add518c8ae51d67e3b536e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c343b8d231fc9be658add518c8ae51d67e3b536e/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 67, 11808, 12, 2890, 4672, 3536, 2000, 326, 3806, 3476, 4968, 434, 326, 9221, 26109, 326, 23349, 4374, 635, 326, 2172, 6548, 434, 326, 13327, 434, 365, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 67, 11808, 12, 2890, 4672, 3536, 2000, 326, 3806, 3476, 4968, 434, 326, 9221, 26109, 326, 23349, 4374, 635, 326, 2172, 6548, 434, 326, 13327, 434, 365, 18, 2, -100, -100,...
def __init__(self, parent, id, title, timeline, start=None, end=None, event=None):
def __init__(self, parent, id, title, timeline, start=None, end=None, event=None):
def __init__(self, parent, id, title, timeline, start=None, end=None, event=None): """ Create a event editor dialog.
a7e2ed6c59ed245e864a0d3e0ebd5d1cf4defaf6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/a7e2ed6c59ed245e864a0d3e0ebd5d1cf4defaf6/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 18316, 16, 787, 33, 7036, 16, 679, 33, 7036, 16, 871, 33, 7036, 4672, 3536, 1788, 279, 871, 4858, 6176, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 18316, 16, 787, 33, 7036, 16, 679, 33, 7036, 16, 871, 33, 7036, 4672, 3536, 1788, 279, 871, 4858, 6176, 18, 2, -100, -100, ...
self.assertEqual(content, expected)
self.assertEqualsFileContent(reference_file, fixture = content)
def test_write_content_types(self):
09d601d770e5afcc95590babffc36ecbb72ec6e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13008/09d601d770e5afcc95590babffc36ecbb72ec6e6/test_meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 1745, 67, 2352, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 1745, 67, 2352, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
>>> bool(view1.redirect_url()) False
>>> view1.redirect_url() 'http://somewhere'
... def checkEditPermission(self):
59f206fd83d9ff5c0e4e3ae7c6d2b6d6a3c87c89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10437/59f206fd83d9ff5c0e4e3ae7c6d2b6d6a3c87c89/feeditem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 866, 4666, 5041, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 866, 4666, 5041, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.body.append('<dd>\n')
self.body.append('</dd>\n')
def depart_citation(self, node): self.body.append('<dd>\n') if isinstance(node.next_node(), nodes.citation): self.body.append('<-- next citation -->') else: self.body.append('</dl>\n')
ce963ec4b76fd51820ab7644bdfa2638068f7db5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/ce963ec4b76fd51820ab7644bdfa2638068f7db5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 71, 8773, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 449, 5333, 82, 6134, 309, 1549, 12, 2159, 18, 4285, 67, 2159, 9334, 2199, 18, 71, 8773, 4672, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 71, 8773, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 449, 5333, 82, 6134, 309, 1549, 12, 2159, 18, 4285, 67, 2159, 9334, 2199, 18, 71, 8773, 4672, 365, ...
"no_site", "ignore_environment", "verbose",
"no_user_site", "no_site", "ignore_environment", "verbose",
def test_sys_flags(self): self.failUnless(sys.flags) attrs = ("debug", "division_warning", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_site", "ignore_environment", "verbose", "bytes_warning") for attr in attrs: self.assert_(hasattr(sys.flags, attr), attr) self.assertEqual(type(getattr(sys.flags, attr)), int, attr) self.assert_(repr(sys.flags))
8e28eec8a22263195aa1c5b51c5fdb2cea2bae1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/8e28eec8a22263195aa1c5b51c5fdb2cea2bae1f/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9499, 67, 7133, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 12, 9499, 18, 7133, 13, 3422, 273, 7566, 4148, 3113, 315, 2892, 1951, 67, 8551, 3113, 315, 12009, 3113, 315, 24761, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9499, 67, 7133, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 12, 9499, 18, 7133, 13, 3422, 273, 7566, 4148, 3113, 315, 2892, 1951, 67, 8551, 3113, 315, 12009, 3113, 315, 24761, ...
self.defaultLevelPauses = {'debug':0,'info':0, 'warn':1, 'error':3, 'fatal':5, 'target':5}
self.defaultLevelPauses = {'debug':0,'info':0, 'warn':0, 'error':0, 'fatal':0, 'target':0}
def __init__(self): self.defaultLevelPauses = {'debug':0,'info':0, 'warn':1, 'error':3, 'fatal':5, 'target':5}
8367bf9976dae7b6c740147ea922f944b4712b23 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5602/8367bf9976dae7b6c740147ea922f944b4712b23/PauseMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1886, 2355, 52, 9608, 273, 13666, 4148, 4278, 20, 11189, 1376, 4278, 20, 16, 296, 8935, 4278, 21, 16, 296, 1636, 4278, 23, 16, 296, 30709, 427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1886, 2355, 52, 9608, 273, 13666, 4148, 4278, 20, 11189, 1376, 4278, 20, 16, 296, 8935, 4278, 21, 16, 296, 1636, 4278, 23, 16, 296, 30709, 427...
countPC = int(ps.getConnectedLeechers()) if (countPC < 0): countPC = 0 self.sf.peers = "%d (%d)" % (countPC, countP) except: printException()
if hasStats == 1: countPC = int(ps.getConnectedLeechers()) if (countPC < 0): countPC = 0 self.sf.peers = "%d (%d)" % (countPC, countP) else: self.sf.peers = "(%d)" % (countP) except: printException()
def statRunning(self, download):
7634beca8bb59aa48a196239fabf5e4b743cb4f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/156/7634beca8bb59aa48a196239fabf5e4b743cb4f5/Transfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 610, 7051, 12, 2890, 16, 4224, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 610, 7051, 12, 2890, 16, 4224, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
src_doc = os.path.basename(sourcepath) new_result_dir = tempfile.mkdtemp() for filename in os.listdir(result_dir): fullpath = os.path.join(result_dir, filename) if not os.path.isfile(fullpath): continue if filename in ['MAINDOC', src_doc]: continue shutil.copy2(fullpath, os.path.join(new_result_dir, filename))
def copyResultToTempDir(self, sourcepath, result): """Copy the results to a fresh directory.
dd558ba4ddcee666111a7f02aab8fbf24cc559c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/dd558ba4ddcee666111a7f02aab8fbf24cc559c4/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 1253, 774, 7185, 1621, 12, 2890, 16, 1084, 803, 16, 563, 4672, 3536, 2951, 326, 1686, 358, 279, 12186, 1867, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 1253, 774, 7185, 1621, 12, 2890, 16, 1084, 803, 16, 563, 4672, 3536, 2951, 326, 1686, 358, 279, 12186, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
suffix=suffix+'<BR>'
suffix += '<BR>'
def __processbody_URLquote(self, lines): # XXX a lot to do here: # 1. use lines directly, rather than source and dest # 2. make it clearer # 3. make it faster source = lines[:] dest = lines last_line_was_quoted=0 for i in xrange(0, len(source)): Lorig=L=source[i] ; prefix=suffix="" if L==None: continue # Italicise quoted text if self.IQUOTES: quoted=quotedpat.match(L) if quoted==None: last_line_was_quoted=0 else: quoted = quoted.end(0) prefix=CGIescape(L[:quoted]) + '<i>' suffix='</I>' if self.SHOWHTML: suffix=suffix+'<BR>' if not last_line_was_quoted: prefix='<BR>'+prefix L= L[quoted:] last_line_was_quoted=1 # Check for an e-mail address L2="" jr = emailpat.search(L) kr = urlpat.search(L) while jr != None or kr != None: if jr == None: j = -1 else: j = jr.start(0) if kr == None: k = -1 else: k = kr.start(0) if j != -1 and (j < k or k == -1): text = jr.group(1) URL = 'mailto:' + text pos = j elif k!=-1 and (j>k or j==-1): text = URL = kr.group(1) pos=k else: # j==k raise ValueError, "j==k: This can't happen!" length=len(text) #self.message("URL: %s %s %s \n" # % (CGIescape(L[:pos]), URL, CGIescape(text))) L2 = L2 + ('%s<A HREF="%s">%s</A>' % (CGIescape(L[:pos]), URL, CGIescape(text))) L=L[pos+length:] jr=emailpat.search(L) ; kr=urlpat.search(L) if jr==None and kr==None: L=CGIescape(L) L=prefix+L2+L+suffix if L!=Lorig: source[i], dest[i]=None, L
469b12e8cfc912874019fdd0ddc95060d27b98f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/469b12e8cfc912874019fdd0ddc95060d27b98f4/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2567, 3432, 67, 1785, 6889, 12, 2890, 16, 2362, 4672, 468, 11329, 279, 17417, 358, 741, 2674, 30, 468, 404, 18, 999, 2362, 5122, 16, 9178, 2353, 1084, 471, 1570, 468, 576, 18, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2567, 3432, 67, 1785, 6889, 12, 2890, 16, 2362, 4672, 468, 11329, 279, 17417, 358, 741, 2674, 30, 468, 404, 18, 999, 2362, 5122, 16, 9178, 2353, 1084, 471, 1570, 468, 576, 18, 12...
ts = self.ts
ts = self.readOnlyTS()
def _all_packages(self): '''Generator that yield (header, index) for all packages ''' ts = self.ts mi = ts.dbMatch()
9afdb4007a0ec48dac4e7838f5d82f83b4150893 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/9afdb4007a0ec48dac4e7838f5d82f83b4150893/rpmsack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 454, 67, 10308, 12, 2890, 4672, 9163, 3908, 716, 2824, 261, 3374, 16, 770, 13, 364, 777, 5907, 9163, 3742, 273, 365, 18, 896, 3386, 8047, 1435, 12837, 273, 3742, 18, 1966, 2060, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 454, 67, 10308, 12, 2890, 4672, 9163, 3908, 716, 2824, 261, 3374, 16, 770, 13, 364, 777, 5907, 9163, 3742, 273, 365, 18, 896, 3386, 8047, 1435, 12837, 273, 3742, 18, 1966, 2060, 1...
mutex_name = "SpamBayesServer"
def open_platform_mutex(): if sys.platform.startswith("win"): try: import win32event, win32api, winerror, win32con import pywintypes, ntsecuritycon # ideally, the mutex name could include either the username, # or the munged path to the INI file - this would mean we # would allow multiple starts so long as they weren't for # the same user. However, as of now, the service version # is likely to start as a different user, so a single mutex # is best for now. # XXX - even if we do get clever with another mutex name, we # should consider still creating a non-exclusive # "SpamBayesServer" mutex, if for no better reason than so # an installer can check if we are running mutex_name = "SpamBayesServer" try: hmutex = win32event.CreateMutex(None, True, mutex_name) except win32event.error, details: # If another user has the mutex open, we get an "access denied" # error - this is still telling us what we need to know. if details[0] != winerror.ERROR_ACCESS_DENIED: raise raise AlreadyRunningException # mutex opened - now check if we actually created it. if win32api.GetLastError()==winerror.ERROR_ALREADY_EXISTS: win32api.CloseHandle(hmutex) raise AlreadyRunningException return hmutex except ImportError: # no win32all - no worries, just start pass return None
8cdcd6876e46c5b29f478bc439d3090b5b1531e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/8cdcd6876e46c5b29f478bc439d3090b5b1531e1/sb_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 9898, 67, 29946, 13332, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 775, 30, 1930, 5657, 1578, 2575, 16, 5657, 1578, 2425, 16, 5657, 1636, 16, 5657, 1578, 591, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 9898, 67, 29946, 13332, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 775, 30, 1930, 5657, 1578, 2575, 16, 5657, 1578, 2425, 16, 5657, 1636, 16, 5657, 1578, 591, ...
return tools.XLALCalculateEThincaParameter(a, b) > e_thinca_parameter
return xlaltools.XLALCalculateEThincaParameter(a, b) > e_thinca_parameter
def inspiral_coinc_compare(a, b, e_thinca_parameter): """ Returns False (a & b are coincident) if they pass the ellipsoidal thinca test. """ try: # FIXME: should it be ">" or ">="? return tools.XLALCalculateEThincaParameter(a, b) > e_thinca_parameter except ValueError: # ethinca test failed to converge == events are not # coincident return True
c03da7213eb606835bf8ddde25c4cd3cdc97b085 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/c03da7213eb606835bf8ddde25c4cd3cdc97b085/ligolw_thinca.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1752, 481, 287, 67, 12645, 71, 67, 9877, 12, 69, 16, 324, 16, 425, 67, 451, 267, 5353, 67, 6775, 4672, 3536, 2860, 1083, 261, 69, 473, 324, 854, 13170, 71, 6392, 13, 309, 2898, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1752, 481, 287, 67, 12645, 71, 67, 9877, 12, 69, 16, 324, 16, 425, 67, 451, 267, 5353, 67, 6775, 4672, 3536, 2860, 1083, 261, 69, 473, 324, 854, 13170, 71, 6392, 13, 309, 2898, ...
mock.util.rmtree(self.basedir, selinux=self.selinux)
self._unlock_and_rm_chroot()
def clean(self): """clean out chroot with extreme prejudice :)""" self.tryLockBuildRoot() self.state("clean") self._callHooks('clean') mock.util.rmtree(self.basedir, selinux=self.selinux) self.chrootWasCleaned = True
6c003bc0a39b4a0523a16923101192757ce08d47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7328/6c003bc0a39b4a0523a16923101192757ce08d47/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 3536, 6200, 596, 462, 3085, 598, 23755, 73, 675, 78, 1100, 1812, 294, 15574, 365, 18, 698, 2531, 3116, 2375, 1435, 365, 18, 2019, 2932, 6200, 7923, 365, 6315, 1991,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 3536, 6200, 596, 462, 3085, 598, 23755, 73, 675, 78, 1100, 1812, 294, 15574, 365, 18, 698, 2531, 3116, 2375, 1435, 365, 18, 2019, 2932, 6200, 7923, 365, 6315, 1991,...
if record_id is None:
if record_id is None or not record_id:
def create(self, cr, user, vals, context=None): """ Create new record with specified value
da2ea43b74df1c92c021dfea3dab98078ddf0d15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/da2ea43b74df1c92c021dfea3dab98078ddf0d15/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 729, 16, 5773, 16, 819, 33, 7036, 4672, 3536, 1788, 394, 1409, 598, 1269, 460, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 729, 16, 5773, 16, 819, 33, 7036, 4672, 3536, 1788, 394, 1409, 598, 1269, 460, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
model_data_ids = self.pool.get('ir.model.data').search(cr, uid, [('model', '=', self._name), ('res_id', '=', id), ('module', '=', 'base_external_referentials'), ('external_referential_id', '=', external_referential_id)])
model_data_ids = self.pool.get('ir.model.data').search(cr, uid, [('model', '=', self._name), ('res_id', '=', id), ('module', '=', 'base_external_referentials_keep'), ('external_referential_id', '=', external_referential_id)])
def oeid_to_extid(self, cr, uid, id, external_referential_id, context={}): model_data_ids = self.pool.get('ir.model.data').search(cr, uid, [('model', '=', self._name), ('res_id', '=', id), ('module', '=', 'base_external_referentials'), ('external_referential_id', '=', external_referential_id)]) if model_data_ids and len(model_data_ids) > 0: prefixed_id = self.pool.get('ir.model.data').read(cr, uid, model_data_ids[0], ['name'])['name'] ext_id = int(self.id_from_prefixed_id(prefixed_id)) return ext_id return False
0f01bee6284da5a7152fcf8140972e4f148b4f59 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/0f01bee6284da5a7152fcf8140972e4f148b4f59/external_osv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 73, 350, 67, 869, 67, 408, 350, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 3903, 67, 266, 586, 2001, 67, 350, 16, 819, 12938, 4672, 938, 67, 892, 67, 2232, 273, 365, 18, 6011,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 73, 350, 67, 869, 67, 408, 350, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 3903, 67, 266, 586, 2001, 67, 350, 16, 819, 12938, 4672, 938, 67, 892, 67, 2232, 273, 365, 18, 6011,...
return nl_langinfo(CODESET)
result = nl_langinfo(CODESET) if not result and sys.platform == 'darwin': result = 'UTF-8'
def getpreferredencoding(do_setlocale = True): """Return the charset that the user is likely using, according to the system configuration.""" if do_setlocale: oldloc = setlocale(LC_CTYPE) try: setlocale(LC_CTYPE, "") except Error: pass result = nl_langinfo(CODESET) setlocale(LC_CTYPE, oldloc) return result else: return nl_langinfo(CODESET)
9b7a66a95b80137849672f00390ed2bcba67606b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/9b7a66a95b80137849672f00390ed2bcba67606b/locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23616, 5999, 12, 2896, 67, 542, 6339, 273, 1053, 4672, 3536, 990, 326, 4856, 716, 326, 729, 353, 10374, 1450, 16, 4888, 358, 326, 2619, 1664, 12123, 309, 741, 67, 542, 6339, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23616, 5999, 12, 2896, 67, 542, 6339, 273, 1053, 4672, 3536, 990, 326, 4856, 716, 326, 729, 353, 10374, 1450, 16, 4888, 358, 326, 2619, 1664, 12123, 309, 741, 67, 542, 6339, 30, 1...
self.fp.write(struct.pack("<lLL", zinfo.CRC, zinfo.compress_size,
self.fp.write(struct.pack("<LLL", zinfo.CRC, zinfo.compress_size,
def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" if not self.fp: raise RuntimeError( "Attempt to write to ZIP archive that was already closed")
bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 16, 8028, 529, 33, 7036, 16, 8099, 67, 723, 33, 7036, 4672, 3536, 6426, 326, 1731, 628, 1544, 1368, 326, 5052, 3613, 326, 508, 8028, 529, 12123, 309, 486, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 16, 8028, 529, 33, 7036, 16, 8099, 67, 723, 33, 7036, 4672, 3536, 6426, 326, 1731, 628, 1544, 1368, 326, 5052, 3613, 326, 508, 8028, 529, 12123, 309, 486, 365...
print "copy (%s,%s)" % (str(file), libdest) shutil.copy(str(file), libdest)
actions.append (Copy(libdest, file)) return actions
def deploy_program(target, source, env): """Copy a program target into a deploy tree along with all of its dynamic dependencies.""" bindir = os.path.join(env['DEPLOY_DIRECTORY'],"bin") libdir = os.path.join(env['DEPLOY_DIRECTORY'],"lib") makedirs(bindir) makedirs(libdir) progdest = os.path.join(bindir,source[0].name) libraries = ldd(source[0], env) shutil.copy(str(source[0]), progdest) for k in libraries: file = libraries[k] libdest = os.path.join(libdir, file.name) print "copy (%s,%s)" % (str(file), libdest) shutil.copy(str(file), libdest)
6c69af15bc113426a1b1d20276d150bf8e0325b5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1466/6c69af15bc113426a1b1d20276d150bf8e0325b5/deploy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7286, 67, 12890, 12, 3299, 16, 1084, 16, 1550, 4672, 225, 3536, 2951, 279, 5402, 1018, 1368, 279, 7286, 2151, 7563, 598, 777, 434, 2097, 5976, 5030, 12123, 1993, 481, 273, 1140, 18, 803,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7286, 67, 12890, 12, 3299, 16, 1084, 16, 1550, 4672, 225, 3536, 2951, 279, 5402, 1018, 1368, 279, 7286, 2151, 7563, 598, 777, 434, 2097, 5976, 5030, 12123, 1993, 481, 273, 1140, 18, 803,...
getCsVersion = self.forceGetCsVersion
maskClientVersion = self.forceGetCsVersion
def _addToCache(fingerPrint, inF, csVersion, csInfo, sizeLimit): csPath = self.csCache.hashToPath(fingerPrint + '-%d' % csVersion) csDir = os.path.dirname(csPath) util.mkdirChain(csDir) (fd, csTmpPath) = tempfile.mkstemp(dir = csDir, suffix = '.ccs-new') outF = os.fdopen(fd, "w") util.copyfileobj(inF, outF, sizeLimit = sizeLimit) # closes the underlying fd opened by mkstemp outF.close()
4cc5034886031e656e782623ffba629e4610a1e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/4cc5034886031e656e782623ffba629e4610a1e5/proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 774, 1649, 12, 74, 6658, 5108, 16, 316, 42, 16, 2873, 1444, 16, 2873, 966, 16, 963, 3039, 4672, 2873, 743, 273, 365, 18, 2143, 1649, 18, 2816, 774, 743, 12, 74, 6658, 5108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 774, 1649, 12, 74, 6658, 5108, 16, 316, 42, 16, 2873, 1444, 16, 2873, 966, 16, 963, 3039, 4672, 2873, 743, 273, 365, 18, 2143, 1649, 18, 2816, 774, 743, 12, 74, 6658, 5108...
def QueueTaskDoneTest(q)
def QueueTaskDoneTest(q):
def QueueTaskDoneTest(q) try: q.task_done() except ValueError: pass else: raise TestFailed("Did not detect task count going negative")
c81060d8aab8b1069b3263ea4cafde95bd0707a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c81060d8aab8b1069b3263ea4cafde95bd0707a3/test_queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7530, 2174, 7387, 4709, 12, 85, 4672, 775, 30, 1043, 18, 4146, 67, 8734, 1435, 1335, 2068, 30, 1342, 469, 30, 1002, 7766, 2925, 2932, 18250, 486, 5966, 1562, 1056, 8554, 6092, 7923, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7530, 2174, 7387, 4709, 12, 85, 4672, 775, 30, 1043, 18, 4146, 67, 8734, 1435, 1335, 2068, 30, 1342, 469, 30, 1002, 7766, 2925, 2932, 18250, 486, 5966, 1562, 1056, 8554, 6092, 7923, 225,...
'Code inside a namespace should not be indented. [whitespace/indent] [4]',
'',
def test_indentation(self): # 1. Use spaces, not tabs. Tabs should only appear in files that # require them for semantic meaning, like Makefiles. self.assert_multi_line_lint( 'class Foo {\n' ' int goo;\n' '};', '') self.assert_multi_line_lint( 'class Foo {\n' '\tint goo;\n' '};', 'Tab found; better to use spaces [whitespace/tab] [1]')
2b486e5e18d0bde87e948171ae97a03c61dace61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/2b486e5e18d0bde87e948171ae97a03c61dace61/cpp_style_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9355, 367, 12, 2890, 4672, 468, 404, 18, 2672, 7292, 16, 486, 10920, 18, 399, 5113, 1410, 1338, 9788, 316, 1390, 716, 468, 565, 2583, 2182, 364, 15178, 12256, 16, 3007, 4344, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9355, 367, 12, 2890, 4672, 468, 404, 18, 2672, 7292, 16, 486, 10920, 18, 399, 5113, 1410, 1338, 9788, 316, 1390, 716, 468, 565, 2583, 2182, 364, 15178, 12256, 16, 3007, 4344, ...
if valueType == 'password': try: waitForDeferred(data[field].encryptPassword(val, window=self)) except password.NoMasterPassword: pass else: data[field] = val
data[field] = val
def __StoreFormData(self, panelType, panel, data): # Store data from the wx widgets into the "data" dictionary
b1d959dcb6ea3064db41fef843c06b239e066a69 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b1d959dcb6ea3064db41fef843c06b239e066a69/AccountPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2257, 30079, 12, 2890, 16, 6594, 559, 16, 6594, 16, 501, 4672, 468, 4994, 501, 628, 326, 7075, 10965, 1368, 326, 315, 892, 6, 3880, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2257, 30079, 12, 2890, 16, 6594, 559, 16, 6594, 16, 501, 4672, 468, 4994, 501, 628, 326, 7075, 10965, 1368, 326, 315, 892, 6, 3880, 2, -100, -100, -100, -100, -100, -100, -100, -...
'project_description': "project description", 'experience_description': "experience description",
'project_description': "\n".join(self.project_description), 'experience_description': "\n".join(self.experience_description)
def test_save_portfolio_entry(self): url = reverse(mysite.profile.views.save_portfolio_entry_do)
69f44d917d67a6ba3ab962e8874f70fc1dd8c707 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/69f44d917d67a6ba3ab962e8874f70fc1dd8c707/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 67, 28962, 67, 4099, 12, 2890, 4672, 880, 273, 4219, 12, 81, 1900, 1137, 18, 5040, 18, 7061, 18, 5688, 67, 28962, 67, 4099, 67, 2896, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 67, 28962, 67, 4099, 12, 2890, 4672, 880, 273, 4219, 12, 81, 1900, 1137, 18, 5040, 18, 7061, 18, 5688, 67, 28962, 67, 4099, 67, 2896, 13, 2, -100, -100, -100, -100, -...
self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \
self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[self.dtype], \
def get_leaktest_scenario(self): self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \ self.footprint, -2) #100B
34128e9b0827c17d15020a7d73bb23a6abf2d402 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/34128e9b0827c17d15020a7d73bb23a6abf2d402/vtk_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 2890, 18, 8972, 6487, 521...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 2890, 18, 8972, 6487, 521...
drv_module = apply(imp.load_module, info)
drv_module = _imp.load_module(*info)
def _create_parser(parser_name): info = _rec_find_module(parser_name) drv_module = apply(imp.load_module, info) return drv_module.create_parser()
294ed734ce234fdc044b005c6968ddc1e5d8ae0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/294ed734ce234fdc044b005c6968ddc1e5d8ae0d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 4288, 12, 4288, 67, 529, 4672, 1123, 273, 389, 3927, 67, 4720, 67, 2978, 12, 4288, 67, 529, 13, 302, 4962, 67, 2978, 273, 389, 14532, 18, 945, 67, 2978, 30857, 1376, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 4288, 12, 4288, 67, 529, 4672, 1123, 273, 389, 3927, 67, 4720, 67, 2978, 12, 4288, 67, 529, 13, 302, 4962, 67, 2978, 273, 389, 14532, 18, 945, 67, 2978, 30857, 1376, 1...
"""Open the pty slave and acquire the controlling terminal. Return the file descriptor. Linux version."""
"""slave_open(tty_name) -> slave_fd Open the pty slave and acquire the controlling terminal, returning opened filedescriptor. Deprecated, use openpty() instead."""
def slave_open(tty_name): """Open the pty slave and acquire the controlling terminal. Return the file descriptor. Linux version.""" # (Should be universal? --Guido) return os.open(tty_name, FCNTL.O_RDWR)
8cef4cf737878bd8eec648426eebe9b9019b18be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8cef4cf737878bd8eec648426eebe9b9019b18be/pty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 3190, 12, 5512, 67, 529, 4672, 3536, 3678, 326, 293, 4098, 11735, 471, 10533, 326, 3325, 2456, 8651, 18, 2000, 326, 585, 4950, 18, 225, 13318, 1177, 12123, 468, 261, 14309, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 3190, 12, 5512, 67, 529, 4672, 3536, 3678, 326, 293, 4098, 11735, 471, 10533, 326, 3325, 2456, 8651, 18, 2000, 326, 585, 4950, 18, 225, 13318, 1177, 12123, 468, 261, 14309, 50...
testGetMediaSize
testGetMediaSize, testVideoNotFound
def setHRef(): node.href = "../video/testfiles/h264-48x48.h264"
043af493719a98719c48a63c7af318343c899397 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/043af493719a98719c48a63c7af318343c899397/AVTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 44, 1957, 13332, 756, 18, 7547, 273, 315, 6216, 9115, 19, 3813, 2354, 19, 76, 23728, 17, 8875, 92, 8875, 18, 76, 23728, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 44, 1957, 13332, 756, 18, 7547, 273, 315, 6216, 9115, 19, 3813, 2354, 19, 76, 23728, 17, 8875, 92, 8875, 18, 76, 23728, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
else: self.max_login_attempts[1] += 1 if self.max_login_attempts[0] == self.max_login_attempts[1]:
else: self.attempted_logins += 1 if self.attempted_logins >= self.max_login_attempts:
def ftp_PASS(self, line): # TODO - brute force protection: 'freeze'/'sleep' (without blocking the main loop) # PI for a certain amount of time if authentication fails. if not self.username: self.respond("503 Login with USER first") return if self.username == 'anonymous': line = '' if self.authorizer.has_user(self.username): if self.authorizer.validate_authentication(self.username, line): if not self.msg_login: self.respond("230 User %s logged in." %self.username) else: self.push("230-%s\r\n" %self.msg_login) self.respond("230 Welcome.") self.authenticated = True self.max_login_attempts[1] = 0 self.fs.root = self.authorizer.get_home_dir(self.username) self.log("User %s logged in." %self.username) else: self.max_login_attempts[1] += 1 if self.max_login_attempts[0] == self.max_login_attempts[1]: self.log("Maximum login attempts. Disconnecting.") self.respond("530 Maximum login attempts. Disconnecting.") self.close() else: self.respond("530 Authentication failed.") self.username = "" else: if self.username.lower() == 'anonymous': self.respond("530 Anonymous access not allowed.") self.log('Authentication failed: anonymous access not allowed.') else: self.respond("530 Authentication failed.") self.log('Authentication failed: unknown username "%s".' %self.username) self.username = ""
cb01c49a66d7848781b76239960b060d1d7dcf4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/cb01c49a66d7848781b76239960b060d1d7dcf4e/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 10884, 12, 2890, 16, 980, 4672, 468, 2660, 300, 5186, 624, 2944, 17862, 30, 296, 29631, 11, 2473, 19607, 11, 261, 13299, 9445, 326, 2774, 2798, 13, 468, 282, 7024, 364, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 10884, 12, 2890, 16, 980, 4672, 468, 2660, 300, 5186, 624, 2944, 17862, 30, 296, 29631, 11, 2473, 19607, 11, 261, 13299, 9445, 326, 2774, 2798, 13, 468, 282, 7024, 364, 279, ...
return t + data[9] - time.timezone
return t - data[9] - time.timezone
def mktime_tz(data): """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp. Minor glitch: this first interprets the first 8 elements as a local time and then compensates for the timezone difference; this may yield a slight error around daylight savings time switch dates. Not enough to worry about for common use. """ t = time.mktime(data[:8] + (0,)) return t + data[9] - time.timezone
685dd65c0e12a282aeef45efbcc4abdbe1e5cbe8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/685dd65c0e12a282aeef45efbcc4abdbe1e5cbe8/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21977, 67, 12994, 12, 892, 4672, 3536, 15858, 279, 1728, 17, 8052, 487, 2106, 635, 1109, 712, 67, 12994, 1435, 1368, 279, 9951, 2858, 18, 225, 29007, 5118, 1437, 30, 333, 1122, 10634, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21977, 67, 12994, 12, 892, 4672, 3536, 15858, 279, 1728, 17, 8052, 487, 2106, 635, 1109, 712, 67, 12994, 1435, 1368, 279, 9951, 2858, 18, 225, 29007, 5118, 1437, 30, 333, 1122, 10634, 87...
if elementType != closeMacroType: resultElements.append(elementType)
if elem != closeMacroType: resultElements.append(elem)
#enddef - closes a scope
0ae3bc473d70b671840d2febe0a653a31a4589b5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/0ae3bc473d70b671840d2febe0a653a31a4589b5/wmliterator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
extended_examples = createLogRegExampleTable(examples) extended_model = LogRegLearner(extended_examples, extended_examples.domain.getmeta("weight"))
if weight == 0: weight = orange.newmetaid() examples.addMetaAttribute(weight, 1.0) extended_set_of_examples = createLogRegExampleTable(examples, weight) extended_models = [learner(extended_examples, weight) \ for extended_examples in extended_set_of_examples]
def findZero(model, at): if at.varType == orange.VarTypes.Discrete: for i_a in range(len(model.domain.attributes)): if model.domain.attributes[i_a].name == at.name+"="+at.name+"X": return model.beta[i_a+1] else: for i_a in range(len(model.domain.attributes)): if model.domain.attributes[i_a].name == at.name+"Disc": return model.beta[i_a+1]
4ae7da6ee8b6f203a5502fe34e8cd40ceb01f647 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4ae7da6ee8b6f203a5502fe34e8cd40ceb01f647/orngLR.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 7170, 12, 2284, 16, 622, 4672, 309, 622, 18, 1401, 559, 422, 578, 726, 18, 1537, 2016, 18, 1669, 6883, 30, 364, 277, 67, 69, 316, 1048, 12, 1897, 12, 2284, 18, 4308, 18, 4350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 7170, 12, 2284, 16, 622, 4672, 309, 622, 18, 1401, 559, 422, 578, 726, 18, 1537, 2016, 18, 1669, 6883, 30, 364, 277, 67, 69, 316, 1048, 12, 1897, 12, 2284, 18, 4308, 18, 4350, ...
desc = store.get_value(iter, PLUGINS_COL_DESC)
desc = store.get_value(iter, PLUGINS_COL_SHORT_DESC)
def plugin_markup(column, cell, store, iter): """Callback to set the content of a PluginTree cell. See PreferencesDialog._init_plugin_tree(). """ name = store.get_value(iter, PLUGINS_COL_NAME) desc = store.get_value(iter, PLUGINS_COL_DESC) cell.set_property('markup', "<b>%s</b>\n%s" % (name, desc)) cell.set_property('sensitive', store.get_value(iter, PLUGINS_COL_ACTIVATABLE))
815b0c382d0d118aa3a7a25e3093524239d0c518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/815b0c382d0d118aa3a7a25e3093524239d0c518/preferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1909, 67, 15056, 12, 2827, 16, 2484, 16, 1707, 16, 1400, 4672, 3536, 2428, 358, 444, 326, 913, 434, 279, 6258, 2471, 2484, 18, 225, 2164, 28310, 6353, 6315, 2738, 67, 4094, 67, 3413, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1909, 67, 15056, 12, 2827, 16, 2484, 16, 1707, 16, 1400, 4672, 3536, 2428, 358, 444, 326, 913, 434, 279, 6258, 2471, 2484, 18, 225, 2164, 28310, 6353, 6315, 2738, 67, 4094, 67, 3413, 7...
first2 = True for clause in c[0]: if not first2: query += ' AND ' first2 = False query += clause
first = True for c in g: if not first: query += ' OR ' first = False query += '(' first2 = True for clause in c[0]: if not first2: query += ' AND ' first2 = False query += clause query += ')' val += c[1]
def domain_get(self, cr, uid, model_name): # root user above constraint if uid == 1: return '', []
da808e63717f21dab9b6c5ee127d2d74770b88ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/da808e63717f21dab9b6c5ee127d2d74770b88ca/ir_rule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2461, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 938, 67, 529, 4672, 468, 1365, 729, 5721, 4954, 309, 4555, 422, 404, 30, 327, 10226, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2461, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 938, 67, 529, 4672, 468, 1365, 729, 5721, 4954, 309, 4555, 422, 404, 30, 327, 10226, 5378, 2, -100, -100, -100, -100, -100, -100, -100,...