rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
""" | TESTS:: sage: digraphs.DeBruijn(5,0) De Bruijn digraph (n=5, k=0): Looped multi-digraph on 1 vertex sage: digraphs.DeBruijn(0,0) De Bruijn digraph (n=0, k=0): Looped multi-digraph on 0 vertices """ | def DeBruijn(self,n,k): r""" Returns the De Bruijn diraph with parameters `n,k`. | d040f0a8aa53ab9c78e7ce9b0a20f0963cd9f0d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d040f0a8aa53ab9c78e7ce9b0a20f0963cd9f0d3/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1505,
19114,
4881,
78,
82,
12,
2890,
16,
82,
16,
79,
4672,
436,
8395,
2860,
326,
1505,
605,
86,
4881,
78,
82,
4314,
1483,
598,
1472,
1375,
82,
16,
79,
8338,
2,
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,
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,
1505,
19114,
4881,
78,
82,
12,
2890,
16,
82,
16,
79,
4672,
436,
8395,
2860,
326,
1505,
605,
86,
4881,
78,
82,
4314,
1483,
598,
1472,
1375,
82,
16,
79,
8338,
2,
-100,
-100,
-100,
-100... |
misc/sagedoc.py: ... print search_src(" fetch(", "def", interact=False) misc/sagedoc.py: ... print search_src(" fetch\(", "def", interact=False) misc/sagedoc.py: ... print search_src(" fetch\(", "def", "pyx", interact=False) misc/sagedoc.py: ... print search_src('^ *sage[:] .*search_src\(', interact=False) misc/sagedoc.py: ... len(search_src("matrix", interact=False).splitlines()) > 9000 misc/sagedoc.py: ... print search_src('matrix', 'column', 'row', 'sub', 'start', 'index', interact=False) | misc/sagedoc.py:... len(search_src("matrix", interact=False).splitlines()) misc/sagedoc.py:... len(search_src("matrix", module="sage.calculus", interact=False).splitlines()) misc/sagedoc.py:... len(search_src("matrix", path_re="calc", interact=False).splitlines()) misc/sagedoc.py:... print search_src(" fetch(", "def", interact=False) misc/sagedoc.py:... print search_src(" fetch\(", "def", interact=False) misc/sagedoc.py:... print search_src(" fetch\(", "def", "pyx", interact=False) misc/sagedoc.py:... print search_src('^ *sage[:] .*search_src\(', interact=False) misc/sagedoc.py:... len(search_src("matrix", interact=False).splitlines()) > 9000 misc/sagedoc.py:... print search_src('matrix', 'column', 'row', 'sub', 'start', 'index', interact=False) | matrix/matrix0.pyx: cdef fetch(self, key): | 8e857122a4650f1c8910e1f54d1a94cf998efa3b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8e857122a4650f1c8910e1f54d1a94cf998efa3b/sagedoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3148,
19,
5667,
20,
18,
2074,
92,
30,
565,
276,
536,
2158,
12,
2890,
16,
498,
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,... | [
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3148,
19,
5667,
20,
18,
2074,
92,
30,
565,
276,
536,
2158,
12,
2890,
16,
498,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
'output':sys.stdout | 'output':sys.stdout, 'fixed_width':True | def __call__ (self, item): "Execute the call behavior." | 49f7cf850b803093831ddb07ea689be861903eaa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/49f7cf850b803093831ddb07ea689be861903eaa/reportlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
261,
2890,
16,
761,
4672,
315,
5289,
326,
745,
6885,
1199,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
261,
2890,
16,
761,
4672,
315,
5289,
326,
745,
6885,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
get_calias_data = urllib.urlopen(OPENCALAIS_URL, param).read | get_calias_data = lambda x: urllib2.urlopen(OPENCALAIS_URL, x).read() | def analyze(self, text, content_type="text/txt"): """ Submits 'text' to OpenCalais for analysis and memorizes the extracted metadata. Set the content-type to 'text/html' if you are submitting HTML data. """ externalID = Calais.content_id(text) paramsXML = PARAMS_XML % (content_type, self.allow_distro, self.allow_search, externalID, self.submitter) param = urllib.urlencode({'licenseID':self.api_key, 'content':text, 'paramsXML':paramsXML}) # do not fetch the data again, if a file exists in the cache get_calias_data = urllib.urlopen(OPENCALAIS_URL, param).read if self.cache is None: xml_data = unpack( get_calias_data() ) else: xml_data = unpack( self.cache.fetch( externalID, get_calias_data ) ) | 81e94b045477ce84d5691e72cef69f651c8d471e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/81e94b045477ce84d5691e72cef69f651c8d471e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
12,
2890,
16,
977,
16,
913,
67,
723,
1546,
955,
19,
5830,
6,
4672,
3536,
2592,
22679,
296,
955,
11,
358,
3502,
3005,
69,
291,
364,
6285,
471,
1663,
280,
3128,
326,
9438,
1982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12375,
12,
2890,
16,
977,
16,
913,
67,
723,
1546,
955,
19,
5830,
6,
4672,
3536,
2592,
22679,
296,
955,
11,
358,
3502,
3005,
69,
291,
364,
6285,
471,
1663,
280,
3128,
326,
9438,
1982,
... |
migration.migrate_app(app, target_name=None, resolve_mode=None, fake=False, verbosity=0) | tree = migration.dependency_tree() migration.migrate_app(app, tree, target_name=None, resolve_mode=None, fake=False, verbosity=0) | def test_apply_migrations(self): migration.MigrationHistory.objects.all().delete() app = migration.get_app("fakeapp") # We should start with no migrations self.assertEqual(list(migration.MigrationHistory.objects.all()), []) # Apply them normally migration.migrate_app(app, target_name=None, resolve_mode=None, fake=False, verbosity=0) # We should finish with all migrations self.assertListEqual( ( (u"fakeapp", u"0001_spam"), (u"fakeapp", u"0002_eggs"), (u"fakeapp", u"0003_alter_spam"), ), migration.MigrationHistory.objects.values_list("app_name", "migration"), ) # Now roll them backwards migration.migrate_app(app, target_name="zero", resolve_mode=None, fake=False, verbosity=0) # Finish with none self.assertEqual(list(migration.MigrationHistory.objects.all()), []) | 8b34071d6104797e11476476fc034f1678aeedab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/8b34071d6104797e11476476fc034f1678aeedab/logic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9010,
67,
15642,
12,
2890,
4672,
6333,
18,
10224,
5623,
18,
6911,
18,
454,
7675,
3733,
1435,
595,
273,
6333,
18,
588,
67,
2910,
2932,
28395,
2910,
7923,
225,
468,
1660,
1410,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9010,
67,
15642,
12,
2890,
4672,
6333,
18,
10224,
5623,
18,
6911,
18,
454,
7675,
3733,
1435,
595,
273,
6333,
18,
588,
67,
2910,
2932,
28395,
2910,
7923,
225,
468,
1660,
1410,
... |
if (char.npc or char.intelligencelock == 0) or realint >= char.intelligencecap: | if (char.npc or char.intelligencelock != 0) or realint >= char.intelligencecap: | def gainskill(char, skill, totalskill, totalcap): value = char.skill[skill] / 10.0 lock = char.skilllock[skill] cap = char.skillcap[skill] / 10.0 info = SKILLS[skill] if lock == 0 and value < cap: # Skills lower than 10.0% will gain 0.1% - 0.5% at once if value < 10.0: points = randint(1, 5) / 10.0 else: points = 0.1 # This will always happen if we are above the skillcap # But if we have some skills set to lower, they # are lowered even if we are below the skillcap if totalskill / totalcap >= random(): for i in range(0, ALLSKILLS): if i != skill and char.skilllock[i] == 1 and char.skill[i] / 10.0 >= points: # See if there is a bonus for this skill and reducing further would go below the bonus try: if char.hastag('skillbonus_%u' % i): value = int(char.gettag('skillbonus_%u' % i)) # Skip this skill if reducing it wouldn't work if char.skill[i] - int(points * 10) < value: continue except: pass char.skill[i] -= int(points * 10) totalskill -= points if DEBUG_SKILLS == 1: char.log(LOG_TRACE, 'Character [%x] lost %0.01f%% of %s [%02.01f%%].\n' % (char.serial, points, SKILLS[i][SKILL_NAME], char.skill[i] / 10.0)) if char.socket: char.socket.updateskill(i) break # We can only gain in this skill if we are still below # the total skill cap. Atrophy has been taken care of # in the if before this. if totalskill + points <= totalcap: char.skill[skill] += int(points * 10) totalskill += points if DEBUG_SKILLS == 1: char.log(LOG_TRACE, 'Character [%x] gained %0.01f%% of %s [%02.01f%%].\n' % (char.serial, points, info[SKILL_NAME], char.skill[skill] / 10.0)) if char.socket: char.socket.updateskill(skill) # It's not important that we actually gained the skill # in order to gain stats by using it. if lock == 0: strchance = info[SKILL_STRCHANCE] dexchance = info[SKILL_DEXCHANCE] intchance = info[SKILL_INTCHANCE] realstr = char.strength - char.strength2 realdex = char.dexterity - char.dexterity2 realint = char.intelligence - char.intelligence2 if (char.npc or char.strengthlock == 0) or realstr >= char.strengthcap: strchance = 0.0 else: strchance /= 33.3 if (char.npc or char.dexteritylock == 0) or realdex >= char.dexteritycap: dexchance = 0.0 else: dexchance /= 33.3 if (char.npc or char.intelligencelock == 0) or realint >= char.intelligencecap: intchance = 0.0 else: intchance /= 33.3 if strchance > random(): gainstat(char, 0) elif dexchance > random(): gainstat(char, 1) elif intchance > random(): gainstat(char, 2) | 6d37d0007eb2e7a18fcebe4db8685366ca67e375 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6d37d0007eb2e7a18fcebe4db8685366ca67e375/skillgain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
4167,
16418,
12,
3001,
16,
15667,
16,
19489,
16418,
16,
2078,
5909,
4672,
460,
273,
1149,
18,
7771,
737,
63,
7771,
737,
65,
342,
1728,
18,
20,
2176,
273,
1149,
18,
7771,
737,
739,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
314,
4167,
16418,
12,
3001,
16,
15667,
16,
19489,
16418,
16,
2078,
5909,
4672,
460,
273,
1149,
18,
7771,
737,
63,
7771,
737,
65,
342,
1728,
18,
20,
2176,
273,
1149,
18,
7771,
737,
739,... |
fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) boundarybox=9999,9999,0,0 | fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) boundarybox = 9999,9999,0,0 | def drawThemeItem(page, itemsonthispage, itemnum, menuitem, bgimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, numberofitems, chapternumber, chapterlist): """Draws text and graphics onto a dvd menu, called by createMenu and createChapterMenu""" #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #boundarybox holds the max and min dimensions for this item so we can auto build a menu highlight box boundarybox=9999,9999,0,0 wantHighlightBox = True #Loop through all the nodes inside this menu item for node in menuitem.childNodes: #Process each type of item to add it onto the background image if node.nodeName=="graphic": #Overlay graphic image onto background #if this graphic item is a movie thumbnail then we dont process it here if node.attributes["filename"].value == "%movie": #this is a movie item but we must still update the boundary box boundarybox=checkBoundaryBox(boundarybox, node) else: imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage, chapternumber, chapterlist) if doesFileExist(imagefilename) == False: if imagefilename == node.attributes["filename"].value: imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if doesFileExist(imagefilename): picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") #see if an image mask exists imagemaskfilename = None if node.hasAttribute("mask"): if node.attribute["mask"].value <> "": imagemaskfilename = getThemeFile(themeName, node.attributes["mask"].value) if imagemaskfilename <> None and doesFileExist(imagemaskfilename): maskpicture = Image.open(imagemaskfilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) maskpicture = maskpicture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), maskpicture) del maskpicture else: bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added image %s" % imagefilename) boundarybox=checkBoundaryBox(boundarybox, node) else: write( "Image file does not exist '%s'" % imagefilename) elif node.nodeName=="text": #Apply some text to the background, including wordwrap if required. text=expandItemText(infoDOM,node.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if node.hasAttribute("colour"): color = node.attributes["colour"].value elif node.hasAttribute("color"): color = node.attributes["color"].value else: color = None if text>"": paintText( draw, bgimage, getScaledAttribute(node, "x"), getScaledAttribute(node, "y"), getScaledAttribute(node, "w"), getScaledAttribute(node, "h"), text, themeFonts[node.attributes["font"].value], color, node.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text elif node.nodeName=="previous": if page>1: #Overlay previous graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for previous button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for previous button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","previous") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="next": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for next button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for next button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","next") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="playall": #Overlay playall graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for playall button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for playall button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added playall button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added playall button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","playall") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="titlemenu": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for titlemenu button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for titlemenu button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added titlemenu button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added titlemenu button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","titlemenu") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="button": wantHighlightBox = False #Overlay item graphic/text button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for menu button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for menu button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textnormal") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if node.hasAttribute("colour"): color = node.attributes["colour"].value elif node.hasAttribute("color"): color = node.attributes["color"].value else: color = None if text > "": paintText( draw, bgimage, getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[textnode.attributes["font"].value], color, textnode.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text write( "Added button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")),picture) #del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textselected") if textnode.length > 0: textnode = textnode[0] text = expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage = Image.new("RGBA",picture.size) textDraw = ImageDraw.Draw(textImage) if text > "": paintText(textDraw, textImage, getScaledAttribute(node, "x") - getScaledAttribute(textnode, "x"), getScaledAttribute(node, "y") - getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[textnode.attributes["font"].value], "white", textnode.attributes["align"].value ) #convert the RGB image to a 1 bit image (width, height) = textImage.size for y in range(height): for x in range(width): if textImage.getpixel((x,y)) < (100, 100, 100, 255): textImage.putpixel((x,y), (0, 0, 0, 0)) else: textImage.putpixel((x,y), (255, 255, 255, 255)) if textnode.hasAttribute("colour"): color = textnode.attributes["colour"].value elif textnode.hasAttribute("color"): color = textnode.attributes["color"].value else: color = "white" bgimagemask.paste(color, (getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y")), textImage) boundarybox=checkBoundaryBox(boundarybox, node) del text, textImage, textDraw del picture elif node.nodeName=="#text" or node.nodeName=="#comment": #Do nothing assert True else: write( "Dont know how to process %s" % node.nodeName) if drawmask == None: return #Draw the mask for this item if wantHighlightBox == True: # Make the boundary box bigger than the content to avoid over writing it boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 drawmask.rectangle(boundarybox,outline=highlightcolor) # Draw another line to make the box thicker - PIL does not support linewidth boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 drawmask.rectangle(boundarybox,outline=highlightcolor) node = spumuxdom.createElement("button") #Fiddle this for chapter marks.... if chapternumber>0: node.setAttribute("name","%s" % chapternumber) else: node.setAttribute("name","%s" % itemnum) node.setAttribute("x0","%d" % int(boundarybox[0])) node.setAttribute("y0","%d" % int(boundarybox[1])) node.setAttribute("x1","%d" % int(boundarybox[2] + 1)) node.setAttribute("y1","%d" % int(boundarybox[3] + 1)) spunode.appendChild(node) | 3b621623397009015c837134fe56f0ca3f353bed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/3b621623397009015c837134fe56f0ca3f353bed/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
8839,
3266,
16,
1694,
379,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3724,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
8839,
3266,
16,
1694,
379,... |
insert_connection = atom.service.AtomService._CreateConnection(self, | insert_connection = self.handler._CreateConnection(self, | def Post(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None): """Insert data into a GData service at the given URI. | c6f5c407589126fc84499bf29cb17f4d244b2562 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5609/c6f5c407589126fc84499bf29cb17f4d244b2562/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5616,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
24,
16,
3539,
67,
3168,
33,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5616,
12,
2890,
16,
501,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
880,
67,
2010,
33,
7036,
16,
4114,
67,
2010,
33,
5510,
16,
18064,
67,
17956,
33,
24,
16,
3539,
67,
3168,
33,
70... |
print 'shlex: popping to %s, line %d' % (self.instream, self.lineno) | print 'shlex: popping to %s, line %d' \ % (self.instream, self.lineno) | def get_token(self): "Get a token from the input stream (or from stack if it's nonempty)" if self.pushback: tok = self.pushback[0] self.pushback = self.pushback[1:] if self.debug >= 1: print "shlex: popping token " + `tok` return tok | 52dc76c81fffa709fae35af92538723d23ad18d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/52dc76c81fffa709fae35af92538723d23ad18d6/shlex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2316,
12,
2890,
4672,
315,
967,
279,
1147,
628,
326,
810,
1407,
261,
280,
628,
2110,
309,
518,
1807,
1661,
5531,
2225,
309,
365,
18,
6206,
823,
30,
946,
273,
365,
18,
6206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2316,
12,
2890,
4672,
315,
967,
279,
1147,
628,
326,
810,
1407,
261,
280,
628,
2110,
309,
518,
1807,
1661,
5531,
2225,
309,
365,
18,
6206,
823,
30,
946,
273,
365,
18,
6206,
... |
assert gc.collect() == 1 | if gc.collect() != 1: raise TestFailed | def test_dict(): d = {} d[1] = d gc.collect() del d assert gc.collect() == 1 | a84d7e902d565e6ea53dab3d21a5e721598dd168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a84d7e902d565e6ea53dab3d21a5e721598dd168/test_gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1576,
13332,
302,
273,
2618,
302,
63,
21,
65,
273,
302,
8859,
18,
14676,
1435,
1464,
302,
309,
8859,
18,
14676,
1435,
480,
404,
30,
1002,
7766,
2925,
225,
2,
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,
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,
1842,
67,
1576,
13332,
302,
273,
2618,
302,
63,
21,
65,
273,
302,
8859,
18,
14676,
1435,
1464,
302,
309,
8859,
18,
14676,
1435,
480,
404,
30,
1002,
7766,
2925,
225,
2,
-100,
-100,
-100... |
data_dict = profile_data_from_username(username) | data_dict = profile_data_from_username(person) | def display_person(person, tab): # {{{ data_dict = profile_data_from_username(username) if tab == 'inv': return render_to_response('profile/participation.html', data_dict) if tab == 'tags': return render_to_response('profile/tags.html', data_dict) if tab == 'tech': return render_to_response('profile/tech.html', data_dict) else: return render_to_response('profile/main.html', data_dict) # }}} | 38f8ef01167670f11f5003e6b1842c5c58696d0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/38f8ef01167670f11f5003e6b1842c5c58696d0c/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
12479,
12,
12479,
16,
3246,
4672,
468,
10179,
95,
225,
501,
67,
1576,
273,
3042,
67,
892,
67,
2080,
67,
5053,
12,
12479,
13,
225,
309,
3246,
422,
296,
5768,
4278,
327,
1743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2562,
67,
12479,
12,
12479,
16,
3246,
4672,
468,
10179,
95,
225,
501,
67,
1576,
273,
3042,
67,
892,
67,
2080,
67,
5053,
12,
12479,
13,
225,
309,
3246,
422,
296,
5768,
4278,
327,
1743,
... |
("\x00\x10\xff\xff", "\U0010ffff"), ("\x00\x00\x01\x01", "\U00000101"), ("", ""), | (b"\x00\x10\xff\xff", "\U0010ffff"), (b"\x00\x00\x01\x01", "\U00000101"), (b"", ""), | def test_bug1251300(self): # Decoding with unicode_internal used to not correctly handle "code # points" above 0x10ffff on UCS-4 builds. if sys.maxunicode > 0xffff: ok = [ ("\x00\x10\xff\xff", "\U0010ffff"), ("\x00\x00\x01\x01", "\U00000101"), ("", ""), ] not_ok = [ "\x7f\xff\xff\xff", "\x80\x00\x00\x00", "\x81\x00\x00\x00", "\x00", "\x00\x00\x00\x00\x00", ] for internal, uni in ok: if sys.byteorder == "little": internal = "".join(reversed(internal)) self.assertEquals(uni, internal.decode("unicode_internal")) for internal in not_ok: if sys.byteorder == "little": internal = "".join(reversed(internal)) self.assertRaises(UnicodeDecodeError, internal.decode, "unicode_internal") | 1975d6fcb90a8e177469f7023acbc81a4a45db34 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/1975d6fcb90a8e177469f7023acbc81a4a45db34/test_codecs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
925,
18473,
3437,
713,
12,
2890,
4672,
468,
3416,
4751,
598,
5252,
67,
7236,
1399,
358,
486,
8783,
1640,
315,
710,
468,
3143,
6,
5721,
374,
92,
2163,
9460,
603,
587,
4596,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
925,
18473,
3437,
713,
12,
2890,
4672,
468,
3416,
4751,
598,
5252,
67,
7236,
1399,
358,
486,
8783,
1640,
315,
710,
468,
3143,
6,
5721,
374,
92,
2163,
9460,
603,
587,
4596,
17... |
nodes = xpath.Evaluate("//A[starts-with(@href, 'view.php?page=film&fid=')]", doc.documentElement) | nodes = xpath.Evaluate("//A[starts-with(@href, 'film/')]", doc.documentElement) | def clean_title(t): t = urllib.unquote(t) (t, ext) = os.path.splitext(t) m = re.match("(.*)(?:[(|\[]|, The$)",t, re.I) ret = t if m: ret = m.group(1) return urllib.quote(ret.strip()) | 2ffdaee9138ec9cb46201405bbe8379f1e308d49 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13713/2ffdaee9138ec9cb46201405bbe8379f1e308d49/ofdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
2649,
12,
88,
4672,
268,
273,
11527,
18,
318,
6889,
12,
88,
13,
261,
88,
16,
1110,
13,
273,
1140,
18,
803,
18,
4939,
408,
12,
88,
13,
312,
273,
283,
18,
1916,
2932,
14361... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2649,
12,
88,
4672,
268,
273,
11527,
18,
318,
6889,
12,
88,
13,
261,
88,
16,
1110,
13,
273,
1140,
18,
803,
18,
4939,
408,
12,
88,
13,
312,
273,
283,
18,
1916,
2932,
14361... |
for prognosis,status,count in res['Value']: if not resDict.has_key(prognosis): | for prognosis, status, count in res['Value']: if not resDict.has_key( prognosis ): | def getProblematicsSummary(self): """ Get a summary of the current problematics table """ req = "SELECT Prognosis,Status,COUNT(*) FROM Problematics GROUP BY Prognosis,Status;" res = self._query(req) if not res['OK']: return res resDict = {} for prognosis,status,count in res['Value']: if not resDict.has_key(prognosis): resDict[prognosis] = {} resDict[prognosis][status] = int(count) return S_OK(resDict) | c0ad35468416f798369c9462d5f8a11a19686a43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c0ad35468416f798369c9462d5f8a11a19686a43/DataIntegrityDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3570,
70,
3269,
270,
2102,
4733,
12,
2890,
4672,
3536,
968,
279,
4916,
434,
326,
783,
6199,
270,
2102,
1014,
3536,
1111,
273,
315,
4803,
1186,
1600,
538,
291,
16,
1482,
16,
7240,
24099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3570,
70,
3269,
270,
2102,
4733,
12,
2890,
4672,
3536,
968,
279,
4916,
434,
326,
783,
6199,
270,
2102,
1014,
3536,
1111,
273,
315,
4803,
1186,
1600,
538,
291,
16,
1482,
16,
7240,
24099,
... |
if self._invalid(None): raise ConflictError("transaction already invalidated") | def tpc_begin(self, transaction, sub=None): if self._invalid(None): # Some nitwit invalidated everything! raise ConflictError("transaction already invalidated") self._invalidating = [] self._creating = [] | 3864625806d3ff7ef2c87394f31ee0a6fa94234f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3864625806d3ff7ef2c87394f31ee0a6fa94234f/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2436,
67,
10086,
12,
2890,
16,
2492,
16,
720,
33,
7036,
4672,
309,
365,
6315,
5387,
12,
7036,
4672,
468,
10548,
290,
305,
28450,
28711,
7756,
5,
1002,
23460,
668,
2932,
7958,
1818,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2436,
67,
10086,
12,
2890,
16,
2492,
16,
720,
33,
7036,
4672,
309,
365,
6315,
5387,
12,
7036,
4672,
468,
10548,
290,
305,
28450,
28711,
7756,
5,
1002,
23460,
668,
2932,
7958,
1818,
... | |
print "EXIT", self | pass | def exit(self, request): """We are done handling the node to which this controller was attached. """ print "EXIT", self | 5cbbe214b1daf141167d6d431bb84b1c890356c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5cbbe214b1daf141167d6d431bb84b1c890356c8/controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2427,
12,
2890,
16,
590,
4672,
3536,
3218,
854,
2731,
5057,
326,
756,
358,
1492,
333,
2596,
1703,
7495,
18,
3536,
1172,
315,
28682,
3113,
365,
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,
2427,
12,
2890,
16,
590,
4672,
3536,
3218,
854,
2731,
5057,
326,
756,
358,
1492,
333,
2596,
1703,
7495,
18,
3536,
1172,
315,
28682,
3113,
365,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
FL_Coord, STRING], | FL_Coord, STRING], | def fl_set_chart_baseline(ob, iYesNo): """ fl_set_chart_baseline(ob, iYesNo) """ _fl_set_chart_baseline(ob, iYesNo) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11563,
67,
27818,
12,
947,
16,
277,
22352,
2279,
4672,
3536,
1183,
67,
542,
67,
11563,
67,
27818,
12,
947,
16,
277,
22352,
2279,
13,
3536,
225,
389,
2242,
67,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11563,
67,
27818,
12,
947,
16,
277,
22352,
2279,
4672,
3536,
1183,
67,
542,
67,
11563,
67,
27818,
12,
947,
16,
277,
22352,
2279,
13,
3536,
225,
389,
2242,
67,
542,
... |
if authname == 'anonymous': self.auth_name = '*' else: self.auth_name = authname | self.auth_name = authname | def __init__(self,env,authname): if authname == 'anonymous': self.auth_name = '*' else: self.auth_name = authname | fb50fdf6b616357187cb5bf3f91d7c61ecf7eb51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/fb50fdf6b616357187cb5bf3f91d7c61ecf7eb51/authzperm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3074,
16,
1944,
529,
4672,
309,
1357,
529,
422,
296,
19070,
4278,
365,
18,
1944,
67,
529,
273,
5306,
469,
30,
365,
18,
1944,
67,
529,
273,
1357,
529,
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,
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,
3074,
16,
1944,
529,
4672,
309,
1357,
529,
422,
296,
19070,
4278,
365,
18,
1944,
67,
529,
273,
5306,
469,
30,
365,
18,
1944,
67,
529,
273,
1357,
529,
2... |
else | else: | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 218) else quickfix.DoubleField.__init__(self, 218, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
2643,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
2643,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
273... |
self.tk.call(self._w, 'popup') | self.tk.call(self._w, 'popup') | def popup(self): | 86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10431,
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,
0,
0,
0,
0,
0,
0... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10431,
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,
-100,
-100,
-100,
-100,
... |
self.assertRaises(UnicodeError, eval, 'u\'\\Ufffffffe\'') self.assertRaises(UnicodeError, eval, 'u\'\\Uffffffff\'') self.assertRaises(UnicodeError, eval, 'u\'\\U%08x\'' % 0x110000) | self.assertRaises(UnicodeError, eval, '\'\\Ufffffffe\'') self.assertRaises(UnicodeError, eval, '\'\\Uffffffff\'') self.assertRaises(UnicodeError, eval, '\'\\U%08x\'' % 0x110000) | def test_literals(self): self.assertEqual('\xff', '\u00ff') self.assertEqual('\uffff', '\U0000ffff') self.assertRaises(UnicodeError, eval, 'u\'\\Ufffffffe\'') self.assertRaises(UnicodeError, eval, 'u\'\\Uffffffff\'') self.assertRaises(UnicodeError, eval, 'u\'\\U%08x\'' % 0x110000) | 1324c6f5e7ed0fb2d129b09fc27d3110e56e75c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/1324c6f5e7ed0fb2d129b09fc27d3110e56e75c0/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
80,
11235,
12,
2890,
4672,
365,
18,
11231,
5812,
2668,
64,
5297,
2187,
2337,
89,
713,
1403,
6134,
365,
18,
11231,
5812,
2668,
64,
696,
25449,
2187,
2337,
57,
2787,
9460,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
80,
11235,
12,
2890,
4672,
365,
18,
11231,
5812,
2668,
64,
5297,
2187,
2337,
89,
713,
1403,
6134,
365,
18,
11231,
5812,
2668,
64,
696,
25449,
2187,
2337,
57,
2787,
9460,
6134,
... |
self.myException.msg = self.errmsg | def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False ): super(Word,self).__init__() self.initCharsOrig = initChars self.initChars = _str2dict(initChars) if bodyChars : self.bodyCharsOrig = bodyChars self.bodyChars = _str2dict(bodyChars) else: self.bodyCharsOrig = initChars self.bodyChars = _str2dict(initChars) self.maxSpecified = max > 0 | bb0e6c1d8894ec4cade5f95640e793eeb8be8f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3693/bb0e6c1d8894ec4cade5f95640e793eeb8be8f10/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
1208,
7803,
16,
1417,
7803,
33,
7036,
16,
1131,
33,
21,
16,
943,
33,
20,
16,
5565,
33,
20,
16,
487,
8736,
33,
8381,
262,
30,
2240,
12,
3944,
16,
2890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
1208,
7803,
16,
1417,
7803,
33,
7036,
16,
1131,
33,
21,
16,
943,
33,
20,
16,
5565,
33,
20,
16,
487,
8736,
33,
8381,
262,
30,
2240,
12,
3944,
16,
2890,... | |
if self.saw_video_tag == False and self.saw_audio_tag == True: | if not self.saw_video_tag and self.saw_audio_tag: | def paused_reached(self): self.saw_video_tag = False self.saw_audio_tag = False | d93c7f89036dcd5d1d5d01ae053e1c6ae6d67942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/d93c7f89036dcd5d1d5d01ae053e1c6ae6d67942/gst_extractor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17781,
67,
266,
2004,
12,
2890,
4672,
365,
18,
87,
2219,
67,
9115,
67,
2692,
273,
1083,
365,
18,
87,
2219,
67,
11509,
67,
2692,
273,
1083,
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,
17781,
67,
266,
2004,
12,
2890,
4672,
365,
18,
87,
2219,
67,
9115,
67,
2692,
273,
1083,
365,
18,
87,
2219,
67,
11509,
67,
2692,
273,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mpd_args = list(mpd_args) | def call(mpdclient, mpd_cmd, *mpd_args): mpd_args = list(mpd_args) try: retval = getattr(mpdclient, mpd_cmd)(*mpd_args) except: if not mpd_cmd in ['disconnect', 'lsinfo', 'listplaylists']: if not suppress_errors: print strftime("%Y-%m-%d %H:%M:%S") + " " + str(sys.exc_info()[1]) if mpd_cmd == 'lsinfo': return [] else: return None return retval | 97d6b592394fbaa4a945c5499c89b00f34cfad61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/97d6b592394fbaa4a945c5499c89b00f34cfad61/mpdhelper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
12,
1291,
72,
2625,
16,
6749,
72,
67,
4172,
16,
380,
1291,
72,
67,
1968,
4672,
775,
30,
5221,
273,
3869,
12,
1291,
72,
2625,
16,
6749,
72,
67,
4172,
21433,
14,
1291,
72,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
12,
1291,
72,
2625,
16,
6749,
72,
67,
4172,
16,
380,
1291,
72,
67,
1968,
4672,
775,
30,
5221,
273,
3869,
12,
1291,
72,
2625,
16,
6749,
72,
67,
4172,
21433,
14,
1291,
72,
67,
1... | |
try: query = request.GET['q'] except: query = '' | query = request.GET['q'] | def get_object(self, request, query): try: query = request.GET['q'] except: query = '' return query | fcc7aa4c7076b39a2b9b90820a347df3a748bb85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6762/fcc7aa4c7076b39a2b9b90820a347df3a748bb85/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1612,
12,
2890,
16,
590,
16,
843,
4672,
225,
843,
273,
590,
18,
3264,
3292,
85,
3546,
282,
327,
843,
225,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1612,
12,
2890,
16,
590,
16,
843,
4672,
225,
843,
273,
590,
18,
3264,
3292,
85,
3546,
282,
327,
843,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if pstate is not None: | if pstate is None: resumedata = None else: | def __init__(self, statusfunc, finfunc, errorfunc, excfunc, doneflag, config, response, infohash, id, rawserver, port, play_video, videoinfo, progressinf, videoanalyserpath, appdataobj = None, dht = None): | e239277b228e78b2742b1e5de51688e910142f7f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/e239277b228e78b2742b1e5de51688e910142f7f/triblerAPI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1267,
644,
16,
574,
644,
16,
555,
644,
16,
3533,
644,
16,
2731,
6420,
16,
642,
16,
766,
16,
1123,
2816,
16,
612,
16,
1831,
3567,
16,
1756,
16,
6599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1267,
644,
16,
574,
644,
16,
555,
644,
16,
3533,
644,
16,
2731,
6420,
16,
642,
16,
766,
16,
1123,
2816,
16,
612,
16,
1831,
3567,
16,
1756,
16,
6599,
... |
this = apply(_quickfix.new_SecondaryTradeReportID, args) | this = _quickfix.new_SecondaryTradeReportID(*args) | def __init__(self, *args): this = apply(_quickfix.new_SecondaryTradeReportID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
14893,
22583,
4820,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
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,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
14893,
22583,
4820,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,... |
self.frame = frontend.MainFrame(self.tabs) | print "Displaying main frame..." self.frame = frontend.MainFrame(self.tabs,globalData) | def OnStartup(self): | 7bcfab25fa096922056e7694b7302557660b3e4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/7bcfab25fa096922056e7694b7302557660b3e4c/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
22178,
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,
0,
0,
0,
0,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
22178,
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,
-100,
-100,
-100,
... |
before = datetime.now() self._env.open(self.dbHome, self.OPEN_FLAGS) after = datetime.now() self._openDb(False) | self._env.open(self.dbHome, self.OPEN_FLAGS, 0) self._openDb(False) | def open(self, verbose=False, create=False, notxn=False): | 793acc675ad871332cdc05c1e4b5c2a9ce5c6a4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/793acc675ad871332cdc05c1e4b5c2a9ce5c6a4a/XMLRepository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
3988,
33,
8381,
16,
752,
33,
8381,
16,
486,
22695,
33,
8381,
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... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
3988,
33,
8381,
16,
752,
33,
8381,
16,
486,
22695,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for key in ['platform', 'gml', 'gmlsim', 'debug', 'optimize', | for key in ['platform', 'gml', 'gmlsim', 'gmldebug', 'debug', 'optimize', | def makeHashTable(args): table = { } for arg in args: if len(arg) > 1: lst = arg.split('=') if len(lst) < 2: continue key = lst[0] value = lst[1] if len(key) > 0 and len(value) > 0: table[key] = value return table | 4123b55488a8c09f5641f1cec06e1c4fd2544669 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1030/4123b55488a8c09f5641f1cec06e1c4fd2544669/rts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
2310,
1388,
12,
1968,
4672,
1014,
273,
288,
289,
364,
1501,
316,
833,
30,
309,
562,
12,
3175,
13,
405,
404,
30,
9441,
273,
1501,
18,
4939,
2668,
2218,
13,
309,
562,
12,
16923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1221,
2310,
1388,
12,
1968,
4672,
1014,
273,
288,
289,
364,
1501,
316,
833,
30,
309,
562,
12,
3175,
13,
405,
404,
30,
9441,
273,
1501,
18,
4939,
2668,
2218,
13,
309,
562,
12,
16923,
... |
"""Check if a base addess of e network is compatible with a prefixlen""" | """Check if a base addess of a network is compatible with a prefixlen""" | def _checkNetaddrWorksWithPrefixlen(net, prefixlen, version): """Check if a base addess of e network is compatible with a prefixlen""" global check_addr_prefixlen if check_addr_prefixlen: if net & _prefixlenToNetmask(prefixlen, version) == net: return 1 else: return 0 else: if prefixlen < 0: return 0 if _ipVersionToLen(version) < prefixlen: return 0 return 1 | beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
50,
1167,
3069,
16663,
1190,
2244,
1897,
12,
2758,
16,
1633,
1897,
16,
1177,
4672,
3536,
1564,
309,
279,
1026,
527,
403,
434,
279,
2483,
353,
7318,
598,
279,
1633,
1897,
8395,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
50,
1167,
3069,
16663,
1190,
2244,
1897,
12,
2758,
16,
1633,
1897,
16,
1177,
4672,
3536,
1564,
309,
279,
1026,
527,
403,
434,
279,
2483,
353,
7318,
598,
279,
1633,
1897,
8395,... |
importModule = __import__('%s.%s' % modulePath,moduleName,globals(),locals(),[moduleName]) | importModule = __import__('%s.%s' %(modulePath,moduleName),globals(),locals(),[moduleName]) | def getModule(self,importString,argumentsDict): """This method returns the Module instance given the import string and arguments dictionary. """ try: moduleName = string.split(importString,'.')[-1] modulePath = importString.replace('.%s' %(moduleName),'') importModule = __import__('%s.%s' % modulePath,moduleName,globals(),locals(),[moduleName]) except Exception, x: msg = 'ModuleFactory could not import %s.%s' %(modulePath,moduleName) self.log.warn(x) self.log.warn(msg) return S_ERROR(msg) | ba3ab92ab8689bd89d82393098ce9efcf065735c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/ba3ab92ab8689bd89d82393098ce9efcf065735c/ModuleFactory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11251,
12,
2890,
16,
5666,
780,
16,
7099,
5014,
4672,
3536,
2503,
707,
1135,
326,
5924,
791,
864,
326,
1930,
533,
471,
1775,
3880,
18,
3536,
775,
30,
9780,
273,
533,
18,
4939,
12,
5666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11251,
12,
2890,
16,
5666,
780,
16,
7099,
5014,
4672,
3536,
2503,
707,
1135,
326,
5924,
791,
864,
326,
1930,
533,
471,
1775,
3880,
18,
3536,
775,
30,
9780,
273,
533,
18,
4939,
12,
5666... |
collection_events = None | def parse_node(self, block=False, indentless_sequence=False): if self.check_token(AliasToken): token = self.get_token() event = AliasEvent(token.value, token.start_mark, token.end_mark) self.state = self.states.pop() else: anchor = None tag = None start_mark = end_mark = tag_mark = None if self.check_token(AnchorToken): token = self.get_token() start_mark = token.start_mark end_mark = token.end_mark anchor = token.value if self.check_token(TagToken): token = self.get_token() tag_mark = token.start_mark end_mark = token.end_mark tag = token.value elif self.check_token(TagToken): token = self.get_token() start_mark = tag_mark = token.start_mark end_mark = token.end_mark tag = token.value if self.check_token(AnchorToken): token = self.get_token() end_mark = token.end_mark anchor = token.value if tag is not None and tag != u'!': handle, suffix = tag if handle is not None: if handle not in self.tag_handles: raise ParserError("while parsing a node", start_mark, "found undefined tag handle %r" % handle.encode('utf-8'), tag_mark) tag = self.tag_handles[handle]+suffix else: tag = suffix #if tag == u'!': # raise ParserError("while parsing a node", start_mark, # "found non-specific tag '!'", tag_mark, # "Please check 'http://pyyaml.org/wiki/YAMLNonSpecificTag' and share your opinion.") if start_mark is None: start_mark = end_mark = self.peek_token().start_mark event = None collection_events = None implicit = (tag is None or tag == u'!') if indentless_sequence and self.check_token(BlockEntryToken): end_mark = self.peek_token().end_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark) self.state = self.parse_indentless_sequence_entry else: if self.check_token(ScalarToken): token = self.get_token() end_mark = token.end_mark if (token.plain and tag is None) or tag == u'!': implicit = (True, False) elif tag is None: implicit = (False, True) else: implicit = (False, False) event = ScalarEvent(anchor, tag, implicit, token.value, start_mark, end_mark, style=token.style) self.state = self.states.pop() elif self.check_token(FlowSequenceStartToken): end_mark = self.peek_token().end_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=True) self.state = self.parse_flow_sequence_first_entry elif self.check_token(FlowMappingStartToken): end_mark = self.peek_token().end_mark event = MappingStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=True) self.state = self.parse_flow_mapping_first_key elif block and self.check_token(BlockSequenceStartToken): end_mark = self.peek_token().start_mark event = SequenceStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=False) self.state = self.parse_block_sequence_first_entry elif block and self.check_token(BlockMappingStartToken): end_mark = self.peek_token().start_mark event = MappingStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style=False) self.state = self.parse_block_mapping_first_key elif anchor is not None or tag is not None: # Empty scalars are allowed even if a tag or an anchor is # specified. event = ScalarEvent(anchor, tag, (implicit, False), u'', start_mark, end_mark) self.state = self.states.pop() else: if block: node = 'block' else: node = 'flow' token = self.peek_token() raise ParserError("while scanning a %s node" % node, start_mark, "expected the node content, but found %r" % token.id, token.start_mark) return event | 95c8976b37428c048ea78c18be63c03897557c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12018/95c8976b37428c048ea78c18be63c03897557c21/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2159,
12,
2890,
16,
1203,
33,
8381,
16,
3504,
2656,
67,
6178,
33,
8381,
4672,
309,
365,
18,
1893,
67,
2316,
12,
2936,
1345,
4672,
1147,
273,
365,
18,
588,
67,
2316,
1435,
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,
1109,
67,
2159,
12,
2890,
16,
1203,
33,
8381,
16,
3504,
2656,
67,
6178,
33,
8381,
4672,
309,
365,
18,
1893,
67,
2316,
12,
2936,
1345,
4672,
1147,
273,
365,
18,
588,
67,
2316,
1435,
8... | |
if descriptions.get(value, 'KEEP-OLD-VALUE') == 'KEEP-OLD-VALUE': descriptions[value] = field_get_subfield_values(field, 'y') if comments.get(value, 'KEEP-OLD-VALUE') == 'KEEP-OLD-VALUE': comments[value] = field_get_subfield_values(field, 'z') | description = field_get_subfield_values(field, 'y') if description: old_descriptions[value] = description[0] comment = field_get_subfield_values(field, 'z') if comment: old_comments[value] = comment[0] | def _synchronize_8564(rec_id, record, descriptions, comments, changed): """Sinchronize the 8564 tags for record with actual files. descriptions should be a dictionary docname:description for the new description to be inserted.""" tags8564s = record_get_field_instances(record, '856', '4', ' ') filtered_tags8564s = [] | 7da63e726510a9c35cfffe55724f3fe9a86c31c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/7da63e726510a9c35cfffe55724f3fe9a86c31c6/bibupload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
2600,
554,
67,
7140,
1105,
12,
3927,
67,
350,
16,
1409,
16,
15550,
16,
5678,
16,
3550,
4672,
3536,
55,
267,
29115,
554,
326,
19692,
1105,
2342,
364,
1409,
598,
3214,
1390,
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,
87,
2600,
554,
67,
7140,
1105,
12,
3927,
67,
350,
16,
1409,
16,
15550,
16,
5678,
16,
3550,
4672,
3536,
55,
267,
29115,
554,
326,
19692,
1105,
2342,
364,
1409,
598,
3214,
1390,
18,... |
if len(vmargs)>0: | if len(vmargs2)>0: | def socketlog(msg): if logresults: if globs['socketlog']=='': file="socketlog-%s.txt" % globs['vmversion'] ctr=0 while os.path.exists(file): ctr+=1 file="socketlog-%s-%s.txt" % (globs['vmversion'],ctr) globs['socketlog']=file alltext='' try: alltext=open(globs['socketlog']).read() except: print("creating new socket log file %s" % globs['socketlog']) alltext+="%s\n" % msg open(globs['socketlog'],'w').write(alltext) s = socket(AF_INET, SOCK_STREAM) # create a TCP socket s.connect((serverHost, serverPort)) # connect to server on the port s.send("%s;exit\r\n" % msg) # send the data data = s.recv(1024) #print('Sent: %s' % msg) #print('Received: %s \n\n' % data) s.shutdown(SHUT_RDWR) s.close() | 922a70b8ca3591bc66a38d59f03d4b2e4e59737f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13395/922a70b8ca3591bc66a38d59f03d4b2e4e59737f/runtests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2987,
1330,
12,
3576,
4672,
309,
613,
4717,
30,
309,
4715,
87,
3292,
7814,
1330,
3546,
18920,
4278,
585,
1546,
7814,
1330,
6456,
87,
18,
5830,
6,
738,
4715,
87,
3292,
3489,
1589,
3546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2987,
1330,
12,
3576,
4672,
309,
613,
4717,
30,
309,
4715,
87,
3292,
7814,
1330,
3546,
18920,
4278,
585,
1546,
7814,
1330,
6456,
87,
18,
5830,
6,
738,
4715,
87,
3292,
3489,
1589,
3546,
... |
self._callback() | if not self._finished: self._finished = True self._callback() | def finish(self): self._callback() self.destroy() | 993a257348aeb456ced22efb515c9131aaef5a8c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/993a257348aeb456ced22efb515c9131aaef5a8c/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
12,
2890,
4672,
309,
486,
365,
6315,
13527,
30,
365,
6315,
13527,
273,
1053,
365,
6315,
3394,
1435,
365,
18,
11662,
1435,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
12,
2890,
4672,
309,
486,
365,
6315,
13527,
30,
365,
6315,
13527,
273,
1053,
365,
6315,
3394,
1435,
365,
18,
11662,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.comments += " Choose toolbar button '%s' (%d)%c" % \ | self.comments += " Choose toolbar button '%s' (%d)%s" % \ | def writeComment (): if eventType in commentTheseEventTypes: if eventType == "wx.EVT_CHAR": if self.typingSequence is None: self.typingSequence = unicode (unichr (event.UnicodeKey)) self.startTypingLineNumber = self.lineNumber else: self.typingSequence += unichr (event.UnicodeKey) else: if self.typingSequence is not None: self.comments += " Type %s (%d)%c" % \ (self.valueToString (self.typingSequence), self.startTypingLineNumber, os.linesep) self.typingSequence = None if eventType == "wx.EVT_MENU": widget = associatedBlock.widget if isinstance (widget, wx.MenuItem): # Find the menu name using wx.Widgets menu APIs that are carefully #optimized for maximum pain and inefficiency. Blocks eliminate the #wxWidgets non-orthoganality, but they are going away so do it the hard way. menuName = widget.GetLabel() menu = widget.GetMenu() while True: widget = menu menu = widget.GetParent() if menu is not None: for item in menu.GetMenuItems(): if item.IsSubMenu() and item.GetSubMenu() is widget: menuName = menu.GetLabelText (item.GetId()) + " > " + menuName break else: assert False, "Didn't find expected sub menu in menu item" else: break menuBar = widget.GetMenuBar() for index in xrange (menuBar.GetMenuCount()): if menuBar.GetMenu (index) is widget: menuName = menuBar.GetLabelTop (index) + " > " + menuName break else: assert False, "Didn't find expected menu in menuBar" | 54365191d9124ad2bb57765333cf2d45402592cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/54365191d9124ad2bb57765333cf2d45402592cb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4469,
1832,
30,
309,
11216,
316,
2879,
29690,
1133,
2016,
30,
309,
11216,
422,
315,
27226,
18,
24427,
56,
67,
7305,
6877,
309,
365,
18,
12846,
310,
4021,
353,
599,
30,
365,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
4469,
1832,
30,
309,
11216,
316,
2879,
29690,
1133,
2016,
30,
309,
11216,
422,
315,
27226,
18,
24427,
56,
67,
7305,
6877,
309,
365,
18,
12846,
310,
4021,
353,
599,
30,
365,
18,
1... |
1. If the structure is equal to 'chessboard', a structure is | 1. If the metric is equal to 'chessboard', a metric is | def distance_transform_cdt(input, structure = 'chessboard', return_distances = True, return_indices = False, distances = None, indices = None): """Distance transform for chamfer type of transforms. The structure determines the type of chamfering that is done. If the structure is equal to 'cityblock' a structure is generated using generate_binary_structure with a squared distance equal to 1. If the structure is equal to 'chessboard', a structure is generated using generate_binary_structure with a squared distance equal to the rank of the array. These choices correspond to the common interpretations of the cityblock and the chessboard distance metrics in two dimensions. In addition to the distance transform, the feature transform can be calculated. In this case the index of the closest background element is returned along the first axis of the result. The return_distances, and return_indices flags can be used to indicate if the distance transform, the feature transform, or both must be returned. The distances and indices arguments can be used to give optional output arrays that must be of the correct size and type (both int32). """ if (not return_distances) and (not return_indices): msg = 'at least one of distances/indices must be specified' raise RuntimeError, msg ft_inplace = isinstance(indices, numpy.ndarray) dt_inplace = isinstance(distances, numpy.ndarray) input = numpy.asarray(input) if structure == 'cityblock': rank = input.ndim structure = generate_binary_structure(rank, 1) elif structure == 'chessboard': rank = input.ndim structure = generate_binary_structure(rank, rank) else: try: structure = numpy.asarray(structure) except: raise RuntimeError, 'invalid structure provided' for s in structure.shape: if s != 3: raise RuntimeError, 'structure sizes must be equal to 3' if not structure.flags.contiguous: structure = structure.copy() if dt_inplace: if distances.dtype.type != numpy.int32: raise RuntimeError, 'distances must be of int32 type' if distances.shape != input.shape: raise RuntimeError, 'distances has wrong shape' dt = distances dt[...] = numpy.where(input, -1, 0).astype(numpy.int32) else: dt = numpy.where(input, -1, 0).astype(numpy.int32) rank = dt.ndim if return_indices: sz = numpy.product(dt.shape,axis=0) ft = numpy.arange(sz, dtype = numpy.int32) ft.shape = dt.shape else: ft = None _nd_image.distance_transform_op(structure, dt, ft) dt = dt[tuple([slice(None, None, -1)] * rank)] if return_indices: ft = ft[tuple([slice(None, None, -1)] * rank)] _nd_image.distance_transform_op(structure, dt, ft) dt = dt[tuple([slice(None, None, -1)] * rank)] if return_indices: ft = ft[tuple([slice(None, None, -1)] * rank)] ft = numpy.ravel(ft) if ft_inplace: if indices.dtype.type != numpy.int32: raise RuntimeError, 'indices must of int32 type' if indices.shape != (dt.ndim,) + dt.shape: raise RuntimeError, 'indices has wrong shape' tmp = indices else: tmp = numpy.indices(dt.shape, dtype = numpy.int32) for ii in range(tmp.shape[0]): rtmp = numpy.ravel(tmp[ii, ...])[ft] rtmp.shape = dt.shape tmp[ii, ...] = rtmp ft = tmp # construct and return the result result = [] if return_distances and not dt_inplace: result.append(dt) if return_indices and not ft_inplace: result.append(ft) if len(result) == 2: return tuple(result) elif len(result) == 1: return result[0] else: return None | eb496ec9285627c61d69cd83f49719a3d9b46e74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/eb496ec9285627c61d69cd83f49719a3d9b46e74/morphology.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3888,
67,
6547,
67,
4315,
88,
12,
2630,
16,
3695,
273,
296,
343,
403,
3752,
2187,
327,
67,
25834,
273,
1053,
16,
327,
67,
6836,
273,
1083,
16,
12491,
273,
599,
16,
4295,
273,
599,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3888,
67,
6547,
67,
4315,
88,
12,
2630,
16,
3695,
273,
296,
343,
403,
3752,
2187,
327,
67,
25834,
273,
1053,
16,
327,
67,
6836,
273,
1083,
16,
12491,
273,
599,
16,
4295,
273,
599,
46... |
os.chdir(tmpfile) bb.note("Fetch " + loc) bb.debug(1, "Running %s" % svncmd) myret = os.system(svncmd) if myret != 0: try: os.rmdir(tmpfile) except OSError: pass raise FetchError(module) os.chdir(os.path.join(tmpfile, os.path.dirname(module))) | os.chdir(pkgdir) | def go(self, d, urls = []): """Fetch urls""" if not urls: urls = self.urls | ab90f57a74abd774ce3b274f35ad5517448ba031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/ab90f57a74abd774ce3b274f35ad5517448ba031/svn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
12,
2890,
16,
302,
16,
6903,
273,
5378,
4672,
3536,
5005,
6903,
8395,
309,
486,
6903,
30,
6903,
273,
365,
18,
10518,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
12,
2890,
16,
302,
16,
6903,
273,
5378,
4672,
3536,
5005,
6903,
8395,
309,
486,
6903,
30,
6903,
273,
365,
18,
10518,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
security.add_option('--no-database-list', action="store_false", dest='list_db', default=True, help="disable the ability to return the list of databases") | security.add_option('--no-database-list', action="store_false", dest='list_db', help="disable the ability to return the list of databases") | def __init__(self, fname=None): self.options = { 'email_from':False, 'xmlrpc_interface': '', # this will bind the server to all interfaces 'xmlrpc_port': 8069, 'netrpc_interface': '', 'netrpc_port': 8070, 'xmlrpcs_interface': '', # this will bind the server to all interfaces 'xmlrpcs_port': 8071, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'xmlrpcs': True, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': '1', 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ 'test_file' : False, 'test_disable' : False, 'test_commit' : False, 'static_http_enable': False, 'static_http_document_root': None, 'static_http_url_prefix': None, } | 6849735d632bc3232089bcba161bf3eaa621c1e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/6849735d632bc3232089bcba161bf3eaa621c1e5/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
2902,
7452,
67,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
2902,
7452,
67,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326... |
texts["parent"] = FormatName(entry_infos["name"]) | texts["parent"] = UnDigitName(FormatName(entry_infos["name"])) | def GenerateFileContent(Node, headerfilepath, pointers_dict = {}): """ pointers_dict = {(Idx,Sidx):"VariableName",...} """ global type global internal_types global default_string_size texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"] = Node.GetNodeName() texts["NodeID"] = Node.GetNodeID() texts["NodeType"] = Node.GetNodeType() texts["Description"] = Node.GetNodeDescription() texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 default_string_size = Node.GetDefaultStringSize() # Compiling lists of indexes rangelist = [idx for idx in Node.GetIndexes() if 0 <= idx <= 0x260] listIndex = [idx for idx in Node.GetIndexes() if 0x1000 <= idx <= 0xFFFF] communicationlist = [idx for idx in Node.GetIndexes() if 0x1000 <= idx <= 0x11FF] sdolist = [idx for idx in Node.GetIndexes() if 0x1200 <= idx <= 0x12FF] pdolist = [idx for idx in Node.GetIndexes() if 0x1400 <= idx <= 0x1BFF] variablelist = [idx for idx in Node.GetIndexes() if 0x2000 <= idx <= 0xBFFF] | c5d0276330de6fd9354f9d4b92a677d004d804da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11017/c5d0276330de6fd9354f9d4b92a677d004d804da/gen_cfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
25391,
12,
907,
16,
1446,
10561,
16,
13857,
67,
1576,
273,
2618,
4672,
3536,
13857,
67,
1576,
273,
288,
12,
4223,
16,
55,
3465,
13,
2773,
21519,
3113,
2777,
97,
3536,
2552,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6654,
25391,
12,
907,
16,
1446,
10561,
16,
13857,
67,
1576,
273,
2618,
4672,
3536,
13857,
67,
1576,
273,
288,
12,
4223,
16,
55,
3465,
13,
2773,
21519,
3113,
2777,
97,
3536,
2552,
618,
... |
self.qmenu.add_separator() | calibrationmenu.add_separator() | def __init__(self,master): self.colorMaps = ColorMaps.ColorMaps('colormaps.txt') self.xrdwin=xrdwin=master xrdwin.title("""The Area Diffraction Machine""") #Displays | 4e3a55b2f27548d89b6b6c2da9223ba25a460b8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8973/4e3a55b2f27548d89b6b6c2da9223ba25a460b8a/AreaDiffractionMachine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7525,
4672,
365,
18,
3266,
8903,
273,
5563,
8903,
18,
2957,
8903,
2668,
1293,
535,
6679,
18,
5830,
6134,
365,
18,
92,
13623,
8082,
33,
92,
13623,
8082,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7525,
4672,
365,
18,
3266,
8903,
273,
5563,
8903,
18,
2957,
8903,
2668,
1293,
535,
6679,
18,
5830,
6134,
365,
18,
92,
13623,
8082,
33,
92,
13623,
8082,
3... |
mems = memp.stdout.readline() host.memory = int(mems) corep = subprocess.Popen("xm info | awk '/^nr_cpus/ { print $3 }' ", shell = True, stdout = subprocess.PIPE) cores = corep.stdout.readline() host.cores = int(cores) | for line in infopipe.stdout.readline(): if line.startswith("total_memory"): host.memory = int((line.split(':'))[1]) if line.startswith("nr_cpus"): host.cores = int((line.split(':'))[1]) | def getHostInfo(self, service): host = Host() host.id = service.id host.name = socket.gethostname() memp = subprocess.Popen("xm info | awk '/^total_memory/ { print $3 }' ", shell = True, stdout = subprocess.PIPE) mems = memp.stdout.readline() host.memory = int(mems) corep = subprocess.Popen("xm info | awk '/^nr_cpus/ { print $3 }' ", shell = True, stdout = subprocess.PIPE) cores = corep.stdout.readline() host.cores = int(cores) host.up = True host.decayed = False host.version = version return host | 787afd97a19dbc056f066117a0e80a968ac780eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5161/787afd97a19dbc056f066117a0e80a968ac780eb/xenpv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8580,
966,
12,
2890,
16,
1156,
4672,
1479,
273,
4893,
1435,
1479,
18,
350,
273,
1156,
18,
350,
1479,
18,
529,
273,
2987,
18,
75,
546,
669,
529,
1435,
1663,
84,
273,
6652,
18,
52,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8580,
966,
12,
2890,
16,
1156,
4672,
1479,
273,
4893,
1435,
1479,
18,
350,
273,
1156,
18,
350,
1479,
18,
529,
273,
2987,
18,
75,
546,
669,
529,
1435,
1663,
84,
273,
6652,
18,
52,
319... |
childNode = Variables(tokenizer, staticContext, forBlock) | childNode.append(Variables(tokenizer, staticContext, forBlock)) | def Statement(tokenizer, staticContext): """Parses a Statement.""" tokenType = tokenizer.get(True) builder = staticContext.builder # Cases for statements ending in a right curly return early, avoiding the # common semicolon insertion magic after this switch. if tokenType == "function": # "declared_form" extends funDecls of staticContext, "statement_form" doesn'tokenizer. if len(staticContext.statementStack) > 1: kind = "statement_form" else: kind = "declared_form" return FunctionDefinition(tokenizer, staticContext, True, kind) elif tokenType == "left_curly": node = Statements(tokenizer, staticContext) tokenizer.mustMatch("right_curly") return node elif tokenType == "if": node = builder.IF_build(tokenizer) builder.IF_setCondition(node, ParenExpression(tokenizer, staticContext)) staticContext.statementStack.append(node) builder.IF_setThenPart(node, Statement(tokenizer, staticContext)) if tokenizer.match("else"): comments = tokenizer.getComments() elsePart = Statement(tokenizer, staticContext) builder.COMMENTS_add(elsePart, node, comments) builder.IF_setElsePart(node, elsePart) staticContext.statementStack.pop() builder.IF_finish(node) return node elif tokenType == "switch": # This allows CASEs after a "default", which is in the standard. node = builder.SWITCH_build(tokenizer) builder.SWITCH_setDiscriminant(node, ParenExpression(tokenizer, staticContext)) staticContext.statementStack.append(node) tokenizer.mustMatch("left_curly") tokenType = tokenizer.get() while tokenType != "right_curly": if tokenType == "default": if node.defaultIndex >= 0: raise SyntaxError("More than one switch default", tokenizer) childNode = builder.DEFAULT_build(tokenizer) builder.SWITCH_setDefaultIndex(node, len(node)-1) tokenizer.mustMatch("colon") builder.DEFAULT_initializeStatements(childNode, tokenizer) while True: tokenType=tokenizer.peek(True) if tokenType == "case" or tokenType == "default" or tokenType == "right_curly": break builder.DEFAULT_addStatement(childNode, Statement(tokenizer, staticContext)) builder.DEFAULT_finish(childNode) elif tokenType == "case": childNode = builder.CASE_build(tokenizer) builder.CASE_setLabel(childNode, Expression(tokenizer, staticContext)) tokenizer.mustMatch("colon") builder.CASE_initializeStatements(childNode, tokenizer) while True: tokenType=tokenizer.peek(True) if tokenType == "case" or tokenType == "default" or tokenType == "right_curly": break builder.CASE_addStatement(childNode, Statement(tokenizer, staticContext)) builder.CASE_finish(childNode) else: raise SyntaxError("Invalid switch case", tokenizer) builder.SWITCH_addCase(node, childNode) tokenType = tokenizer.get() staticContext.statementStack.pop() builder.SWITCH_finish(node) return node elif tokenType == "for": node = builder.FOR_build(tokenizer) forBlock = None if tokenizer.match("identifier") and tokenizer.token.value == "each": builder.FOR_rebuildForEach(node) tokenizer.mustMatch("left_paren") tokenType = tokenizer.peek() childNode = None if tokenType != "semicolon": staticContext.inForLoopInit = True if tokenType == "var" or tokenType == "const": tokenizer.get() childNode = Variables(tokenizer, staticContext) elif tokenType == "let": tokenizer.get() if tokenizer.peek() == "left_paren": childNode = LetBlock(tokenizer, staticContext, False) else: # Let in for head, we need to add an implicit block # around the rest of the for. forBlock = builder.BLOCK_build(tokenizer, staticContext.blockId) staticContext.blockId += 1 staticContext.statementStack.append(forBlock) childNode = Variables(tokenizer, staticContext, forBlock) else: childNode = Expression(tokenizer, staticContext) staticContext.inForLoopInit = False if childNode and tokenizer.match("in"): builder.FOR_rebuildForIn(node) builder.FOR_setObject(node, Expression(tokenizer, staticContext), forBlock) if childNode.type == "var" or childNode.type == "let": if len(childNode) != 1: raise SyntaxError("Invalid for..in left-hand side", tokenizer) builder.FOR_setIterator(node, childNode[0], childNode, forBlock) else: builder.FOR_setIterator(node, childNode, None, forBlock) else: builder.FOR_setSetup(node, childNode) tokenizer.mustMatch("semicolon") if node.isEach: raise SyntaxError("Invalid for each..in loop") if tokenizer.peek() == "semicolon": builder.FOR_setCondition(node, None) else: builder.FOR_setCondition(node, Expression(tokenizer, staticContext)) tokenizer.mustMatch("semicolon") if tokenizer.peek() == "right_paren": builder.FOR_setUpdate(node, None) else: builder.FOR_setUpdate(node, Expression(tokenizer, staticContext)) tokenizer.mustMatch("right_paren") builder.FOR_setBody(node, nest(tokenizer, staticContext, node, Statement)) if forBlock: builder.BLOCK_finish(forBlock) staticContext.statementStack.pop() builder.FOR_finish(node) return node elif tokenType == "while": node = builder.WHILE_build(tokenizer) builder.WHILE_setCondition(node, ParenExpression(tokenizer, staticContext)) builder.WHILE_setBody(node, nest(tokenizer, staticContext, node, Statement)) builder.WHILE_finish(node) return node elif tokenType == "do": node = builder.DO_build(tokenizer) builder.DO_setBody(node, nest(tokenizer, staticContext, node, Statement, "while")) builder.DO_setCondition(node, ParenExpression(tokenizer, staticContext)) builder.DO_finish(node) if not staticContext.ecma3OnlyMode: # <script language="JavaScript"> (without version hints) may need # automatic semicolon insertion without a newline after do-while. # See http://bugzilla.mozilla.org/show_bug.cgi?id=238945. tokenizer.match("semicolon") return node # NO RETURN elif tokenType == "break" or tokenType == "continue": if tokenType == "break": node = builder.BREAK_build(tokenizer) else: node = builder.CONTINUE_build(tokenizer) if tokenizer.peekOnSameLine() == "identifier": tokenizer.get() if tokenType == "break": builder.BREAK_setLabel(node, tokenizer.token.value) else: builder.CONTINUE_setLabel(node, tokenizer.token.value) statementStack = staticContext.statementStack i = len(statementStack) label = node.label if hasattr(node, "label") else None if label: while True: i -= 1 if i < 0: raise SyntaxError("Label not found", tokenizer) if getattr(statementStack[i], "label", None) == label: break # # Both break and continue to label need to be handled specially # within a labeled loop, so that they target that loop. If not in # a loop, then break targets its labeled statement. Labels can be # nested so we skip all labels immediately enclosing the nearest # non-label statement. # while i < len(statementStack) - 1 and statementStack[i+1].type == "label": i += 1 if i < len(statementStack) - 1 and getattr(statementStack[i+1], "isLoop", False): i += 1 elif tokenType == "continue": raise SyntaxError("Invalid continue", tokenizer) else: while True: i -= 1 if i < 0: if tokenType == "break": raise SyntaxError("Invalid break") else: raise SyntaxError("Invalid continue") if getattr(statementStack[i], "isLoop", False) or (tokenType == "break" and statementStack[i].type == "switch"): break if tokenType == "break": builder.BREAK_setTarget(node, statementStack[i]) builder.BREAK_finish(node) else: builder.CONTINUE_setTarget(node, statementStack[i]) builder.CONTINUE_finish(node) # NO RETURN elif tokenType == "try": node = builder.TRY_build(tokenizer) builder.TRY_setTryBlock(node, Block(tokenizer, staticContext)) while tokenizer.match("catch"): childNode = builder.CATCH_build(tokenizer) tokenizer.mustMatch("left_paren") nextTokenType = tokenizer.get() if nextTokenType == "left_bracket" or nextTokenType == "left_curly": # Destructured catch identifiers. tokenizer.unget() builder.CATCH_setVarName(childNode, DestructuringExpression(tokenizer, staticContext, True)) elif nextTokenType == "identifier": builder.CATCH_setVarName(childNode, tokenizer.token.value) else: raise SyntaxError("Missing identifier in catch", tokenizer) if tokenizer.match("if"): if staticContext.ecma3OnlyMode: raise SyntaxError("Illegal catch guard", tokenizer) if node.getChildrenLength() > 0 and not node.getUnrelatedChildren()[0].guard: raise SyntaxError("Guarded catch after unguarded", tokenizer) builder.CATCH_setGuard(childNode, Expression(tokenizer, staticContext)) else: builder.CATCH_setGuard(childNode, None) tokenizer.mustMatch("right_paren") builder.CATCH_setBlock(childNode, Block(tokenizer, staticContext)) builder.CATCH_finish(childNode) builder.TRY_addCatch(node, childNode) builder.TRY_finishCatches(node) if tokenizer.match("finally"): builder.TRY_setFinallyBlock(node, Block(tokenizer, staticContext)) if node.getChildrenLength() == 0 and not hasattr(node, "finallyBlock"): raise SyntaxError("Invalid try statement", tokenizer) builder.TRY_finish(node) return node elif tokenType == "catch" or tokenType == "finally": raise SyntaxError(tokens[tokenType] + " without preceding try") elif tokenType == "throw": node = builder.THROW_build(tokenizer) builder.THROW_setException(node, Expression(tokenizer, staticContext)) builder.THROW_finish(node) # NO RETURN elif tokenType == "return": node = returnOrYield(tokenizer, staticContext) # NO RETURN elif tokenType == "with": node = builder.WITH_build(tokenizer) builder.WITH_setObject(node, ParenExpression(tokenizer, staticContext)) builder.WITH_setBody(node, nest(tokenizer, staticContext, node, Statement)) builder.WITH_finish(node) return node elif tokenType == "var" or tokenType == "const": node = Variables(tokenizer, staticContext) # NO RETURN elif tokenType == "let": if tokenizer.peek() == "left_paren": node = LetBlock(tokenizer, staticContext, True) else: node = Variables(tokenizer, staticContext) # NO RETURN elif tokenType == "debugger": node = builder.DEBUGGER_build(tokenizer) # NO RETURN elif tokenType == "newline" or tokenType == "semicolon": node = builder.SEMICOLON_build(tokenizer) builder.SEMICOLON_setExpression(node, None) builder.SEMICOLON_finish(tokenizer) return node else: if tokenType == "identifier": tokenType = tokenizer.peek() # Labeled statement. if tokenType == "colon": label = tokenizer.token.value statementStack = staticContext.statementStack i = len(statementStack)-1 while i >= 0: if getattr(statementStack[i], "label", None) == label: raise SyntaxError("Duplicate label") i -= 1 tokenizer.get() node = builder.LABEL_build(tokenizer) builder.LABEL_setLabel(node, label) builder.LABEL_setStatement(node, nest(tokenizer, staticContext, node, Statement)) builder.LABEL_finish(node) return node # Expression statement. # We unget the current token to parse the expression as a whole. node = builder.SEMICOLON_build(tokenizer) tokenizer.unget() builder.SEMICOLON_setExpression(node, Expression(tokenizer, staticContext)) node.end = node.expression.end builder.SEMICOLON_finish(node) # NO RETURN MagicalSemicolon(tokenizer) return node | 19bafda0b448fd11967e4cae01844c2254735dc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/19bafda0b448fd11967e4cae01844c2254735dc3/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8056,
12,
2316,
1824,
16,
760,
1042,
4672,
3536,
6656,
279,
8056,
12123,
225,
22302,
273,
10123,
18,
588,
12,
5510,
13,
2089,
273,
760,
1042,
18,
9574,
225,
468,
385,
3304,
364,
6317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8056,
12,
2316,
1824,
16,
760,
1042,
4672,
3536,
6656,
279,
8056,
12123,
225,
22302,
273,
10123,
18,
588,
12,
5510,
13,
2089,
273,
760,
1042,
18,
9574,
225,
468,
385,
3304,
364,
6317,
... |
this = apply(_quickfix.new_TargetSubID, args) | this = _quickfix.new_TargetSubID(*args) | def __init__(self, *args): this = apply(_quickfix.new_TargetSubID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
2326,
1676,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
2326,
1676,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
3... |
self.add_command_line(self._hklin) self.add_command_line(scaout) | def run(self): if not self._hklin: raise RuntimeError, 'hklin not defined' | 1c7c052a9e74611d6f999a5aa1be8ac5cba47efd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3290/1c7c052a9e74611d6f999a5aa1be8ac5cba47efd/Mtz2sca.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
309,
486,
365,
6315,
76,
79,
7511,
30,
1002,
7265,
16,
296,
76,
79,
7511,
486,
2553,
11,
2,
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,
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,
1086,
12,
2890,
4672,
309,
486,
365,
6315,
76,
79,
7511,
30,
1002,
7265,
16,
296,
76,
79,
7511,
486,
2553,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
if self.inObject not in ["form", None]: raise ValueError, "can't go in form already in object %s" % self.inObject | def inForm(self): """specify that we are in a form xobject (disable page features, etc)""" if self.inObject not in ["form", None]: raise ValueError, "can't go in form already in object %s" % self.inObject self.inObject = "form" # don't need to do anything else, I think... | aec89ad214a41f1dc932452c20049685fb169686 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/aec89ad214a41f1dc932452c20049685fb169686/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
1204,
12,
2890,
4672,
3536,
2793,
1164,
716,
732,
854,
316,
279,
646,
619,
1612,
261,
8394,
1363,
4467,
16,
5527,
15574,
565,
365,
18,
267,
921,
273,
315,
687,
6,
468,
2727,
1404,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
1204,
12,
2890,
4672,
3536,
2793,
1164,
716,
732,
854,
316,
279,
646,
619,
1612,
261,
8394,
1363,
4467,
16,
5527,
15574,
565,
365,
18,
267,
921,
273,
315,
687,
6,
468,
2727,
1404,... | |
self.consumed_sources = {} for c in parents: self.consumed_sources.update(c.consumed_sources) | ignored = [ self.moves.update(p.moves) for p in parents ] if len(parents) == 1: self.consumed_sources = parents[0].consumed_sources else: self.consumed_sources = {} for c in parents: self.consumed_sources.update(c.consumed_sources) | def __init__( self , target_type , size # how many of that type are in the group. , parents = () , generator = None): """ >>> g1 = TargetTypeGroup('x', 1) >>> assert not g1.extra_targets >>> assert g1.consumed_sources == { g1:1 } >>> g2 = TargetTypeGroup('x', 1) >>> g3 = TargetTypeGroup('x', 1, [g1,g2]) >>> assert g1 in g3.consumed_sources >>> assert g2 in g3.consumed_sources >>> assert not g3 in g3.consumed_sources """ self.target_type = target_type self.size = size self.parents = parents self.generator = generator self.cost = reduce(lambda x,y:x + y.cost, parents, 1) self.siblings = None self.id = TargetTypeGroup.instances self.ambiguous = reduce(lambda x,y: x or y.ambiguous and 1, parents, None) self.generators = { generator : 1 } # it doesn't hurt to store None here ignored = [ self.generators.update(p.generators) for p in parents ] self.__constituents = None self.__extra_targets = None TargetTypeGroup.instances += 1 | 250809e90cc9f96d82b078629a0900bb6c705750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/250809e90cc9f96d82b078629a0900bb6c705750/generators_prototype.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
269,
1018,
67,
723,
269,
963,
4202,
468,
3661,
4906,
434,
716,
618,
854,
316,
326,
1041,
18,
269,
6298,
273,
1832,
269,
4456,
273,
599,
4672,
3536,
4080,
314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
269,
1018,
67,
723,
269,
963,
4202,
468,
3661,
4906,
434,
716,
618,
854,
316,
326,
1041,
18,
269,
6298,
273,
1832,
269,
4456,
273,
599,
4672,
3536,
4080,
314,... |
if not acc.name: rel_set = acc.getRelationSet() | rel_set = acc.getRelationSet() if rel_set: | def _ldtpize_accessible(self, acc): label_acc = None if not acc.name: rel_set = acc.getRelationSet() for i, rel in enumerate(rel_set): if rel.getRelationType() == pyatspi.RELATION_LABELLED_BY: label_acc = rel.getTarget(i) break return abbreviated_roles.get(acc.getRole(), 'ukn'), \ (label_acc or acc).name.replace(' ', '').rstrip(':') | 5a0b4b813a00f56c2280fc3c41de7c7dee80ad5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11266/5a0b4b813a00f56c2280fc3c41de7c7dee80ad5e/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1236,
6834,
554,
67,
26037,
12,
2890,
16,
4078,
4672,
1433,
67,
8981,
273,
599,
1279,
67,
542,
273,
4078,
18,
588,
3963,
694,
1435,
309,
1279,
67,
542,
30,
364,
277,
16,
1279,
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,
389,
1236,
6834,
554,
67,
26037,
12,
2890,
16,
4078,
4672,
1433,
67,
8981,
273,
599,
1279,
67,
542,
273,
4078,
18,
588,
3963,
694,
1435,
309,
1279,
67,
542,
30,
364,
277,
16,
1279,
3... |
print "M5 revision %s:%s" % (defines.hgRev, defines.hgId) print "M5 commit date %s" % defines.hgDate | print "M5 revision %s" % defines.hgRev | def check_tracing(): if defines.TRACING_ON: return | feba8a17f6705686c3ab3e44862fcd9d96d29d0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7385/feba8a17f6705686c3ab3e44862fcd9d96d29d0b/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
20187,
13332,
309,
11164,
18,
4349,
2226,
1360,
67,
673,
30,
327,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
20187,
13332,
309,
11164,
18,
4349,
2226,
1360,
67,
673,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return True if the quaternion algebra is a division algebra (i.e. a ring, not necessarily commutative, in which every nonzero element is invertible). So if this returns False, the quaternion algebra is isomorphic to the 2x2 matrix algebra. | Return True if the quaternion algebra is a division algebra (i.e. every nonzero element in self is invertible), and False if the quaternion algebra is isomorphic to the 2x2 matrix algebra. | def is_division_algebra(self): """ Return True if the quaternion algebra is a division algebra (i.e. a ring, not necessarily commutative, in which every nonzero element is invertible). So if this returns False, the quaternion algebra is isomorphic to the 2x2 matrix algebra. EXAMPLES:: sage: QuaternionAlgebra(QQ,-5,-2).is_division_algebra() True sage: QuaternionAlgebra(1).is_division_algebra() False """ return self.discriminant() != 1 | d660c4f8d2907dbfdce396e1b8a469ef484c9b3c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d660c4f8d2907dbfdce396e1b8a469ef484c9b3c/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2892,
1951,
67,
287,
29087,
12,
2890,
4672,
3536,
2000,
1053,
309,
326,
26774,
524,
29087,
353,
279,
16536,
524,
29087,
261,
77,
18,
73,
18,
3614,
16966,
930,
316,
365,
353,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
67,
2892,
1951,
67,
287,
29087,
12,
2890,
4672,
3536,
2000,
1053,
309,
326,
26774,
524,
29087,
353,
279,
16536,
524,
29087,
261,
77,
18,
73,
18,
3614,
16966,
930,
316,
365,
353,
9... |
qpa.setPoint(0, *(oldPos + d0)) | qpa.setPoint(0, oldPos[0], oldPos[1]) | def _calculateEdgePoints(self, index, origEdgePoints): qpa = self._zoomedEdges[index] | 54ffb4bc4e99d33d7061e1f25f35fa20ad242ffa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/54ffb4bc4e99d33d7061e1f25f35fa20ad242ffa/mapdisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11162,
6098,
5636,
12,
2890,
16,
770,
16,
1647,
6098,
5636,
4672,
1043,
8774,
273,
365,
6315,
14932,
329,
10697,
63,
1615,
65,
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,
0,
0,
0,
0,
0,
0,
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,
11162,
6098,
5636,
12,
2890,
16,
770,
16,
1647,
6098,
5636,
4672,
1043,
8774,
273,
365,
6315,
14932,
329,
10697,
63,
1615,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"""Read 'input', apply quoted-printable decoding, and write to 'output'. | """Read 'input', apply quoted-printable decoding, and write to 'output'. | def decode(input, output): """Read 'input', apply quoted-printable decoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods.""" new = '' while 1: line = input.readline() if not line: break i, n = 0, len(line) if n > 0 and line[n-1] == '\n': partial = 0; n = n-1 # Strip trailing whitespace while n > 0 and line[n-1] in (' ', '\t'): n = n-1 else: partial = 1 while i < n: c = line[i] if c <> ESCAPE: new = new + c; i = i+1 elif i+1 == n and not partial: partial = 1; break elif i+1 < n and line[i+1] == ESCAPE: new = new + ESCAPE; i = i+2 elif i+2 < n and ishex(line[i+1]) and ishex(line[i+2]): new = new + chr(unhex(line[i+1:i+3])); i = i+3 else: # Bad escape sequence -- leave it in new = new + c; i = i+1 if not partial: output.write(new + '\n') new = '' if new: output.write(new) | 77249442a58b4afb561f7c8290d63bea85126d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77249442a58b4afb561f7c8290d63bea85126d9d/quopri.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
12,
2630,
16,
876,
4672,
3536,
1994,
296,
2630,
2187,
2230,
9298,
17,
1188,
429,
13547,
16,
471,
1045,
358,
296,
2844,
10332,
225,
296,
2630,
11,
471,
296,
2844,
11,
854,
1390,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2495,
12,
2630,
16,
876,
4672,
3536,
1994,
296,
2630,
2187,
2230,
9298,
17,
1188,
429,
13547,
16,
471,
1045,
358,
296,
2844,
10332,
225,
296,
2630,
11,
471,
296,
2844,
11,
854,
1390,
5... |
except ProgrammingError: | except MySQLdb.ProgrammingError: | def rollback(self): self.cnx.ping() self._set_character_set(self.cnx, 'utf8') try: self.cnx.rollback() except ProgrammingError: self._is_closed = True | 7b14ba610ed3370bfe69a5613fb5c061c9dcaf11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2831/7b14ba610ed3370bfe69a5613fb5c061c9dcaf11/mysql_backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8006,
12,
2890,
4672,
365,
18,
10305,
92,
18,
1382,
1435,
365,
6315,
542,
67,
11560,
67,
542,
12,
2890,
18,
10305,
92,
16,
296,
3158,
28,
6134,
775,
30,
365,
18,
10305,
92,
18,
20050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8006,
12,
2890,
4672,
365,
18,
10305,
92,
18,
1382,
1435,
365,
6315,
542,
67,
11560,
67,
542,
12,
2890,
18,
10305,
92,
16,
296,
3158,
28,
6134,
775,
30,
365,
18,
10305,
92,
18,
20050... |
if len(filter(LegalChars.__contains__, str)) == len(str): | if all(c in LegalChars for c in str): | def _quote(str, LegalChars=_LegalChars): # # If the string does not need to be double-quoted, # then just return the string. Otherwise, surround # the string in doublequotes and precede quote (with a \) # special characters. # if len(filter(LegalChars.__contains__, str)) == len(str): return str else: return '"' + _nulljoin( map(_Translator.get, str, str) ) + '"' | 593de0e69a8563efb372e859990eee4d4b07c18a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/593de0e69a8563efb372e859990eee4d4b07c18a/Cookie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6889,
12,
701,
16,
17167,
287,
7803,
33,
67,
30697,
7803,
4672,
468,
468,
971,
326,
533,
1552,
486,
1608,
358,
506,
1645,
17,
15179,
16,
468,
1508,
2537,
327,
326,
533,
18,
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,
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,
6889,
12,
701,
16,
17167,
287,
7803,
33,
67,
30697,
7803,
4672,
468,
468,
971,
326,
533,
1552,
486,
1608,
358,
506,
1645,
17,
15179,
16,
468,
1508,
2537,
327,
326,
533,
18,
225,
... |
bdeps[bin][pkgname] = [] | bdeps[barch][pkgname] = [] | def read_files(self): bdeps = dict() bprov = dict() for fname in self.files: bin = [x for x in fname.split('@') if x.startswith('binary-')][0][7:] if bin not in bdeps: bdeps[bin] = dict() bprov[bin] = dict() try: reader = gzip.GzipFile(fname) except: print("Failed to read file %s" % fname) raise Exception() continue for line in reader.readlines(): words = line.strip().split(':', 1) if words[0] == 'Package': pkgname = words[1].strip().rstrip() self.pkgnames.add(pkgname) elif words[0] == 'Depends': bdeps[bin][pkgname] = [] vindex = 0 for dep in words[1].split(','): raw_dep = re.sub('\(.*\)', '', dep) if '|' in raw_dep: dyn_dname = "choice-%s-%s-%s" % (pkgname, bin, vindex) vindex += 1 bdeps[bin][pkgname].append(dyn_dname) dyn_list = [x.strip() for x in raw_dep.split('|')] bprov[bin][dyn_dname] = set(dyn_list) else: raw_dep = raw_dep.rstrip().strip() bdeps[bin][pkgname].append(raw_dep) elif words[0] == 'Provides': for pkg in words[1].split(','): dname = pkg.rstrip().strip() if dname not in bprov[bin]: bprov[bin][dname] = set() bprov[bin][dname].add(pkgname) | fb209805adfc35c07e127215f4f828bd44151f00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/fb209805adfc35c07e127215f4f828bd44151f00/Packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
2354,
12,
2890,
4672,
324,
14877,
273,
2065,
1435,
324,
25529,
273,
2065,
1435,
364,
5299,
316,
365,
18,
2354,
30,
4158,
273,
306,
92,
364,
619,
316,
5299,
18,
4939,
2668,
36,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2354,
12,
2890,
4672,
324,
14877,
273,
2065,
1435,
324,
25529,
273,
2065,
1435,
364,
5299,
316,
365,
18,
2354,
30,
4158,
273,
306,
92,
364,
619,
316,
5299,
18,
4939,
2668,
36,... |
if accept == 'application/xml' and ' AppleWebKit/' in request.META.get('HTTP_USER_AGENT', ''): | if accept in ('application/xml', 'text/xml') and ' AppleWebKit/' in request.META.get('HTTP_USER_AGENT', ''): | def render(cls, request, context, template_name): if request.REQUEST.get('format') in cls.FORMATS: renderer = cls.FORMATS[request.REQUEST['format']] elif 'format' in request.REQUEST: return cls.not_acceptable(request) #elif request.is_ajax(): # renderer = cls.FORMATS['json'] elif request.META.get('HTTP_ACCEPT'): accepts = [a.split(';')[0].strip() for a in request.META['HTTP_ACCEPT'].split(',')] for accept in accepts: # WebKit's Accept header is broken. See # http://www.newmediacampaigns.com/page/webkit-team-admits-accept-header-error # and https://bugs.webkit.org/show_bug.cgi?id=27267 if accept == 'application/xml' and ' AppleWebKit/' in request.META.get('HTTP_USER_AGENT', ''): continue if accept in cls.FORMATS_BY_MIMETYPE: renderer = cls.FORMATS_BY_MIMETYPE[accept] try: return renderer(request, context, template_name) except NotImplementedError: pass else: response = HttpResponse("""\ | 89319783316179528e48d53dbbfe800caddad387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/89319783316179528e48d53dbbfe800caddad387/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
6429,
16,
590,
16,
819,
16,
1542,
67,
529,
4672,
309,
590,
18,
5519,
18,
588,
2668,
2139,
6134,
316,
2028,
18,
7254,
55,
30,
5690,
273,
2028,
18,
7254,
55,
63,
2293,
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,
1743,
12,
6429,
16,
590,
16,
819,
16,
1542,
67,
529,
4672,
309,
590,
18,
5519,
18,
588,
2668,
2139,
6134,
316,
2028,
18,
7254,
55,
30,
5690,
273,
2028,
18,
7254,
55,
63,
2293,
18,
... |
str, "\\N{%s}" % ("x" * 100000), 'unicode-escape', 'strict' | str, bytes("\\N{%s}" % ("x" * 100000)), 'unicode-escape', 'strict' | def test_strict_eror_handling(self): # bogus character name self.assertRaises( UnicodeError, str, "\\N{blah}", 'unicode-escape', 'strict' ) # long bogus character name self.assertRaises( UnicodeError, str, "\\N{%s}" % ("x" * 100000), 'unicode-escape', 'strict' ) # missing closing brace self.assertRaises( UnicodeError, str, "\\N{SPACE", 'unicode-escape', 'strict' ) # missing opening brace self.assertRaises( UnicodeError, str, "\\NSPACE", 'unicode-escape', 'strict' ) | 707e8061af537973977713681eab558b979fca31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/707e8061af537973977713681eab558b979fca31/test_ucn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13948,
67,
264,
280,
67,
26822,
12,
2890,
4672,
468,
324,
28774,
3351,
508,
365,
18,
11231,
12649,
6141,
12,
9633,
668,
16,
609,
16,
8422,
50,
95,
3083,
9795,
1532,
16,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13948,
67,
264,
280,
67,
26822,
12,
2890,
4672,
468,
324,
28774,
3351,
508,
365,
18,
11231,
12649,
6141,
12,
9633,
668,
16,
609,
16,
8422,
50,
95,
3083,
9795,
1532,
16,
296,
... |
self.CurrentIndexes.Append("0x%04X\t%s"%(index, self.IndexDictionary[index][0])) | self.CurrentIndexes.Append("0x%04X %s"%(index, self.IndexDictionary[index][0])) | def RefreshLists(self): self.PossibleIndexes.Clear() self.CurrentIndexes.Clear() self.AllList = [] for index in self.IndexDictionary.iterkeys(): if index not in self.CurrentList: self.AllList.append(index) self.AllList.sort() for index in self.AllList: self.PossibleIndexes.Append("0x%04X\t%s"%(index, self.IndexDictionary[index][0])) for index in self.CurrentList: if index in self.IndexDictionary: self.CurrentIndexes.Append("0x%04X\t%s"%(index, self.IndexDictionary[index][0])) | 8c439eb7ae202e60f4674b584401402a78ec673f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11017/8c439eb7ae202e60f4674b584401402a78ec673f/objdictedit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14179,
7432,
12,
2890,
4672,
365,
18,
13576,
8639,
18,
9094,
1435,
365,
18,
3935,
8639,
18,
9094,
1435,
365,
18,
1595,
682,
273,
5378,
364,
770,
316,
365,
18,
1016,
10905,
18,
2165,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14179,
7432,
12,
2890,
4672,
365,
18,
13576,
8639,
18,
9094,
1435,
365,
18,
3935,
8639,
18,
9094,
1435,
365,
18,
1595,
682,
273,
5378,
364,
770,
316,
365,
18,
1016,
10905,
18,
2165,
24... |
if k in non_permissions or not v: | if tag in non_permissions or not tag_value: | def getPermissionsDefinitions(self): """ \ returns a list of dictionaries. Each dict contains a key 'permission' with a string value and a key 'roles' with a list of strings as value. """ | 74aac3fbd88df8d0fb3fe2e021a7e05a7dbc2f59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/74aac3fbd88df8d0fb3fe2e021a7e05a7dbc2f59/XMIParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25021,
7130,
12,
2890,
4672,
3536,
521,
1135,
279,
666,
434,
16176,
18,
8315,
2065,
1914,
279,
498,
296,
9827,
11,
598,
279,
533,
460,
471,
279,
498,
296,
7774,
11,
598,
279,
666,
434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25021,
7130,
12,
2890,
4672,
3536,
521,
1135,
279,
666,
434,
16176,
18,
8315,
2065,
1914,
279,
498,
296,
9827,
11,
598,
279,
533,
460,
471,
279,
498,
296,
7774,
11,
598,
279,
666,
434,... |
shutil.rmtree( pilotWorkingDirectory ) | def _writePilotScript( self, workingDirectory, pilotOptions ): """ Prepare the script to execute the pilot For the moment it will do like Grid Pilots, a full DIRAC installation """ | d6b3bd172bdd65f632827808fa06347eb63e1ce6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/d6b3bd172bdd65f632827808fa06347eb63e1ce6/DIRACPilotDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
52,
22797,
3651,
12,
365,
16,
5960,
2853,
16,
293,
22797,
1320,
262,
30,
3536,
7730,
326,
2728,
358,
1836,
326,
293,
22797,
2457,
326,
10382,
518,
903,
741,
3007,
7145,
453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
52,
22797,
3651,
12,
365,
16,
5960,
2853,
16,
293,
22797,
1320,
262,
30,
3536,
7730,
326,
2728,
358,
1836,
326,
293,
22797,
2457,
326,
10382,
518,
903,
741,
3007,
7145,
453,
... | |
Bookmarks are saved URLs that operate very much like L{RecentFiles} shown in the Open Recent menu. The only differences are that the files are added only using the L{AddURLBookmark} action, and the files show up in the list in the order that they were added. | The File Cabinet is a list of saved URLs that operate very much like L{RecentFiles} shown in the Open Recent menu. The only differences are that the files are added only using the L{AddToFileCabinet} action, and the files show up in the list in the order that they were added. | def action(self, index=-1, multiplier=1): assert self.dprint("opening file %s" % (self.storage[index])) self.frame.open(self.storage[index]) | d31fbfc834159b6ce3ad2ea806caedd981ece285 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/d31fbfc834159b6ce3ad2ea806caedd981ece285/openrecent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
1815,
365,
18,
72,
1188,
2932,
3190,
310,
585,
738,
87,
6,
738,
261,
2890,
18,
5697,
63,
1615,
22643,
365,
18,
3789,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
1815,
365,
18,
72,
1188,
2932,
3190,
310,
585,
738,
87,
6,
738,
261,
2890,
18,
5697,
63,
1615,
22643,
365,
18,
3789,
18,
... |
rows = [{"name": bm, "builds": [{"url": ""} for b in builders]} for bm in benchmarks] for i in range(len(rows)): benchmark = benchmarks[i] builds = rows[i]["builds"] minr, maxr, bybuilder = benchmark_data(benchmark) for j in range(len(builders)): builder = builders[j] cell = builds[j] if len(bybuilder) > 0 and builder == bybuilder[0][0]: cell["url"] = benchmark_sparkline(bybuilder[0][2]) bybuilder = bybuilder[1:] | rows = [] for bm in benchmarks: row = {'name':bm, 'builders': []} for bl in builders: key = "single-%s-%s" % (bm, bl) url = memcache.get(key) row['builders'].append({'name': bl, 'url': url}) rows.append(row) | def compute(self, num): benchmarks, builders = benchmark_list() # Build empty grid, to be filled in. rows = [{"name": bm, "builds": [{"url": ""} for b in builders]} for bm in benchmarks] | 7678c5bfa10748d29696b11ac3b5b1392319159c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6483/7678c5bfa10748d29696b11ac3b5b1392319159c/gobuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
2890,
16,
818,
4672,
14128,
87,
16,
19916,
273,
14128,
67,
1098,
1435,
225,
468,
3998,
1008,
3068,
16,
358,
506,
6300,
316,
18,
2595,
273,
306,
16711,
529,
6877,
18829,
16,
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,
3671,
12,
2890,
16,
818,
4672,
14128,
87,
16,
19916,
273,
14128,
67,
1098,
1435,
225,
468,
3998,
1008,
3068,
16,
358,
506,
6300,
316,
18,
2595,
273,
306,
16711,
529,
6877,
18829,
16,
3... |
self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) | self.assertEqual(self._box._toc, {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) | def test_refresh(self): # Update the table of contents self.assertEqual(self._box._toc, {}) key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) self.assertEqual(self._box._toc, {}) self._box._refresh() self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) key2 = self._box.add(self._template % 2) self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) self._box._refresh() self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1), key2: os.path.join('new', key2)}) | fc9997a71def3361507ae020d7f678e347d8646b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/fc9997a71def3361507ae020d7f678e347d8646b/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9144,
12,
2890,
4672,
468,
2315,
326,
1014,
434,
2939,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
6315,
1391,
16,
2618,
13,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9144,
12,
2890,
4672,
468,
2315,
326,
1014,
434,
2939,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
6315,
1391,
16,
2618,
13,
498,
20,
273,
365,
6315,
2147,
18,
1289,
12,
2890... |
if get_verbose() >= 2: print "R[%02d].start %s"%(r+1,self.hex_str_vector(P)) | if get_verbose() >= 2: print "R[%02d].start %s"%(r+1, self.hex_str_vector(P)) | def __call__(self, P, K): r""" Encrypts the plaintext $P$ using the key $K$. | cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
453,
16,
1475,
4672,
436,
8395,
8594,
20261,
326,
11917,
271,
52,
8,
1450,
326,
498,
271,
47,
8,
18,
2,
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,
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,
1991,
972,
12,
2890,
16,
453,
16,
1475,
4672,
436,
8395,
8594,
20261,
326,
11917,
271,
52,
8,
1450,
326,
498,
271,
47,
8,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.goodID = self.origObjs[0].getID() self.objs = self.everything.map(self.mapToObject).filter(lambda x: x.oldID == self.goodID) | self.origObjs[0].good = True self.origObjs[1].good = False self.origObjs[2].good = False self.objs = self.everything.map(self.mapToObject).filter(lambda x: x.good) | def setUp(self): DDBObject.dd = DynamicDatabase() self.everything = DDBObject.dd | dd8ac30beaad320ef557c1b744053ffa850d703a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/dd8ac30beaad320ef557c1b744053ffa850d703a/databasetest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
463,
2290,
921,
18,
449,
273,
12208,
4254,
1435,
365,
18,
20434,
4274,
273,
463,
2290,
921,
18,
449,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
463,
2290,
921,
18,
449,
273,
12208,
4254,
1435,
365,
18,
20434,
4274,
273,
463,
2290,
921,
18,
449,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
application_pool = None | def history_cb(path, rev, pool): if authz.has_permission(path): history.append((path, rev)) | 67793a0354afb311c0006d2fbd0c9da8c2663d69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/67793a0354afb311c0006d2fbd0c9da8c2663d69/svn_fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4927,
67,
7358,
12,
803,
16,
5588,
16,
2845,
4672,
309,
18686,
18,
5332,
67,
9827,
12,
803,
4672,
4927,
18,
6923,
12443,
803,
16,
5588,
3719,
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,
4927,
67,
7358,
12,
803,
16,
5588,
16,
2845,
4672,
309,
18686,
18,
5332,
67,
9827,
12,
803,
4672,
4927,
18,
6923,
12443,
803,
16,
5588,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
raise wikipedia.Error(u'The category selected as >= %s elements, limit reached.' % cmlimit) | raise wikipedia.Error(u'The category selected has >= %s elements, limit reached.' % cmlimit) | def categoryAllElements(CatName, cmlimit = 5000, categories_parsed = []): #action=query&list=categorymembers&cmlimit=500&cmtitle=Category:License_tags """ Category to load all the elements in a category. Limit: 5000 elements. """ wikipedia.output("Loading %s..." % CatName) params = { 'action' :'query', 'list' :'categorymembers', 'cmlimit' :cmlimit, 'cmtitle' :CatName, } data = query.GetData(params, useAPI = True, encodeTitle = False) categories_parsed.append(CatName) try: members = data['query']['categorymembers'] except KeyError: if int(cmlimit) != 500: wikipedia.output(u'An Error occured, trying to reload the category.') return categoryAllElements(CatName, cmlimit = 500) else: raise wikipedia.Error(data) if len(members) == int(cmlimit): raise wikipedia.Error(u'The category selected as >= %s elements, limit reached.' % cmlimit) allmembers = members results = list() for subcat in members: ns = subcat['ns'] pageid = subcat['pageid'] title = subcat['title'] if ns == 14: if title not in categories_parsed: categories_parsed.append(title) (results_part, categories_parsed) = categoryAllElements(title, 5000, categories_parsed) allmembers.extend(results_part) for member in allmembers: ns = member['ns'] pageid = member['pageid'] title = member['title'] results.append(member) return (results, categories_parsed) | 3412c145869b9960c9c73bf648647ca62aec6ee4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/3412c145869b9960c9c73bf648647ca62aec6ee4/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3150,
1595,
3471,
12,
11554,
461,
16,
276,
781,
1038,
273,
20190,
16,
6477,
67,
10817,
273,
5378,
4672,
468,
1128,
33,
2271,
10,
1098,
33,
4743,
7640,
10,
71,
781,
1038,
33,
12483,
10,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3150,
1595,
3471,
12,
11554,
461,
16,
276,
781,
1038,
273,
20190,
16,
6477,
67,
10817,
273,
5378,
4672,
468,
1128,
33,
2271,
10,
1098,
33,
4743,
7640,
10,
71,
781,
1038,
33,
12483,
10,... |
((negzero, 0.0), (-inf, pi), 'divide'), ((0.0, 0.0), (-inf, 0.0), 'divide'), | ((-0., 0.), (-inf, pi), 'divide'), ((+0., 0.), (-inf, 0.), 'XXX divide'), | def test_clog(self): for p, v, e in [ ((negzero, 0.0), (-inf, pi), 'divide'), ((0.0, 0.0), (-inf, 0.0), 'divide'), # fails on OSX? ((1., inf), (inf, pi/2), ''), ((1., nan), (nan, nan), 'invalid-optional'), ((-inf, 1.), (inf, pi), ''), ((inf, 1.), (inf, 0.), ''), ((-inf, inf), (inf, 3*pi/4), ''), ((inf, inf), (inf, pi/4), ''), ((inf, nan), (inf, nan), ''), ((-inf, nan), (inf, nan), ''), ((nan, 1.), (nan, nan), 'invalid-optional'), ((nan, inf), (inf, nan), ''), ((+nan, nan), (nan, nan), ''), # raises 'invalid' on some platfs ]: yield self._check, np.log, p, v, e | 331cf00283cada1637511bde73d6ce640e9dbc46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/331cf00283cada1637511bde73d6ce640e9dbc46/test_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
1330,
12,
2890,
4672,
364,
293,
16,
331,
16,
425,
316,
306,
14015,
17,
20,
12990,
374,
18,
3631,
24927,
10625,
16,
4790,
3631,
296,
2892,
831,
19899,
14015,
15,
20,
12990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
1330,
12,
2890,
4672,
364,
293,
16,
331,
16,
425,
316,
306,
14015,
17,
20,
12990,
374,
18,
3631,
24927,
10625,
16,
4790,
3631,
296,
2892,
831,
19899,
14015,
15,
20,
12990... |
log = logging.getLogger() | def main(): parser = OptionParser() parser.add_option("--appname", action = "store", type = "string", dest = "app", default = os.path.join(SCRIPT_DIRECTORY, automation.DEFAULT_APP), help = "absolute path to application, overriding default") parser.add_option("--xre-path", action = "store", type = "string", dest = "xrePath", default = None, # default is set below help = "absolute path to directory containing XRE (probably xulrunner)") parser.add_option("--extra-profile-file", action = "append", dest = "extraProfileFiles", default = [], help = "copy specified files/dirs to testing profile") parser.add_option("--symbols-path", action = "store", type = "string", dest = "symbolsPath", default = automation.SYMBOLS_PATH, help = "absolute path to directory containing breakpad symbols") options, args = parser.parse_args() if len(args) != 1: print >>sys.stderr, "No reftest.list specified." sys.exit(1) options.app = getFullPath(options.app) if not os.path.exists(options.app): print """Error: Path %(app)s doesn't exist. | cc1645858044da9f25f129ea785d44cc779c896b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/cc1645858044da9f25f129ea785d44cc779c896b/runreftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
18862,
1435,
2082,
18,
1289,
67,
3482,
2932,
413,
2910,
529,
3113,
1301,
273,
315,
2233,
3113,
618,
273,
315,
1080,
3113,
1570,
273,
315,
2910,
3113,
805,
273,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2082,
273,
18862,
1435,
2082,
18,
1289,
67,
3482,
2932,
413,
2910,
529,
3113,
1301,
273,
315,
2233,
3113,
618,
273,
315,
1080,
3113,
1570,
273,
315,
2910,
3113,
805,
273,
11... | |
('search', (None, '(TO zork)')), | ('search', (None, 'SUBJECT', 'test')), | def print_log(): _mesg('last %d IMAP4 interactions:' % len(_cmd_log)) for secs,line in _cmd_log: _mesg(line, secs) | 66d451397577a7710902b75104839afc7ca05b81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66d451397577a7710902b75104839afc7ca05b81/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1330,
13332,
389,
26244,
75,
2668,
2722,
738,
72,
6246,
2203,
24,
23877,
2497,
738,
562,
24899,
4172,
67,
1330,
3719,
364,
18043,
16,
1369,
316,
389,
4172,
67,
1330,
30,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
67,
1330,
13332,
389,
26244,
75,
2668,
2722,
738,
72,
6246,
2203,
24,
23877,
2497,
738,
562,
24899,
4172,
67,
1330,
3719,
364,
18043,
16,
1369,
316,
389,
4172,
67,
1330,
30,
389,
... |
self.length = 338 - ((temp * .16) - 64) | self.length = (338 + self.y) - ((temp * .16) - 64) | def update_gauge(self,temp): temp = round(temp,2) if(self.scale == 'amb_F'): #Ambient Farenheit Scale self.length = 338 - ((temp * 3.2) - 48) self.dc.SetPen(wx.Pen('red', 4)) self.dc.DrawLine(self.x+58, 330, self.x+58, self.length) if(self.scale == 'kiln_F_H'): #Kiln Farenheit High Scale self.length = 338 - ((temp * .16) - 64) self.dc.SetPen(wx.Pen('red', 4)) self.dc.DrawLine(self.x+58, 330, self.x+58, self.length) return | 2a435186544ecbdffa555e4197d5db273ee1077e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12345/2a435186544ecbdffa555e4197d5db273ee1077e/wxthermo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
75,
8305,
12,
2890,
16,
5814,
4672,
1906,
273,
3643,
12,
5814,
16,
22,
13,
309,
12,
2890,
18,
5864,
422,
296,
2536,
67,
42,
11,
4672,
225,
468,
30706,
1979,
478,
7892,
580,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
67,
75,
8305,
12,
2890,
16,
5814,
4672,
1906,
273,
3643,
12,
5814,
16,
22,
13,
309,
12,
2890,
18,
5864,
422,
296,
2536,
67,
42,
11,
4672,
225,
468,
30706,
1979,
478,
7892,
580,... |
self.assertEqual(-(017777777777), -2147483647) | if platform_long_is_32_bits: self.assertEqual(-(017777777777), -2147483647) else: self.assertEqual(-(0777777777777777777777), -9223372036854775807) | def test_oct_baseline(self): # Baseline tests self.assertEqual(00, 0) self.assertEqual(020, 16) self.assertEqual(017777777777, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(00), 0) self.assertEqual(-(020), -16) self.assertEqual(-(017777777777), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-00, 0) self.assertEqual(-020, -16) self.assertEqual(-017777777777, -2147483647) | 9f9d6e6c1d506067db8a1309e91d568018bef591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9f9d6e6c1d506067db8a1309e91d568018bef591/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
5... |
print f | def locate(pattern, root=os.getcwd()): for path, dirs, files in os.walk(root): for filename in [os.path.abspath(os.path.join(path, filename)) for filename in files if fnmatch.fnmatch(filename, pattern)]: yield filename | bb9f063b2a1938147bc2fabe31d90194b87492bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/bb9f063b2a1938147bc2fabe31d90194b87492bf/asGrammar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10627,
12,
4951,
16,
1365,
33,
538,
18,
588,
11089,
1435,
4672,
364,
589,
16,
7717,
16,
1390,
316,
1140,
18,
11348,
12,
3085,
4672,
364,
1544,
316,
306,
538,
18,
803,
18,
5113,
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,
10627,
12,
4951,
16,
1365,
33,
538,
18,
588,
11089,
1435,
4672,
364,
589,
16,
7717,
16,
1390,
316,
1140,
18,
11348,
12,
3085,
4672,
364,
1544,
316,
306,
538,
18,
803,
18,
5113,
803,
... | |
self.max_adjustment.set_all( new_min, new_min, self.max_adjustment.upper, self.max_adjustment.step_increment, self.max_adjustment.page_increment, self.max_adjustment.page_size) | if new_max > self.max_adjustment.upper: self.max_adjustment.value = new_max self.max_adjustment.lower = new_max | def gui_refresh(self, *args): if self.layer is None: return | 30093beb2981ba47380749a3f1c597965f66f39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/30093beb2981ba47380749a3f1c597965f66f39e/gvrasterpropdlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13238,
67,
9144,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
6363,
353,
599,
30,
327,
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... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13238,
67,
9144,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
6363,
353,
599,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") check_bounds = hasattr(self, '_length_') if index.start is not None: | if hasattr(self, '_length_'): start, stop, step = index.indices(self._length_) else: step = index.step if step is None: step = 1 | def array_get_slice_params(self, index): if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") check_bounds = hasattr(self, '_length_') if index.start is not None: start = index.start if check_bounds and start < 0: start = 0 else: start = 0 if index.stop is not None: stop = index.stop if check_bounds and stop > self._length_: stop = self._length_ else: stop = self._length_ return start, stop | 1a3c140242fcb677422025d1343e7ddedc5703e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/1a3c140242fcb677422025d1343e7ddedc5703e4/array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
526,
67,
588,
67,
6665,
67,
2010,
12,
2890,
16,
770,
4672,
309,
3859,
12,
2890,
16,
2070,
2469,
4623,
4672,
787,
16,
2132,
16,
2235,
273,
770,
18,
6836,
12,
2890,
6315,
2469,
67,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
526,
67,
588,
67,
6665,
67,
2010,
12,
2890,
16,
770,
4672,
309,
3859,
12,
2890,
16,
2070,
2469,
4623,
4672,
787,
16,
2132,
16,
2235,
273,
770,
18,
6836,
12,
2890,
6315,
2469,
67,
13,... |
ret += "return %s;\n" % retval | ret += "return%s;\n" % retval | def getFailureString(retval, indent): assert indent > 0 ret = " " * (4 * indent) ret += "js_SetTraceableNativeFailed(cx);\n" ret += " " * (4 * indent) ret += "return %s;\n" % retval ret += " " * (4 * (indent - 1)) ret += "}\n" return ret | f54640901f9704aa02f15abc4882b5cd0254cf98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/f54640901f9704aa02f15abc4882b5cd0254cf98/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31673,
594,
780,
12,
18341,
16,
3504,
4672,
1815,
3504,
405,
374,
325,
273,
315,
315,
380,
261,
24,
380,
3504,
13,
325,
1011,
315,
2924,
67,
694,
3448,
429,
9220,
2925,
12,
71,
92,
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,
31673,
594,
780,
12,
18341,
16,
3504,
4672,
1815,
3504,
405,
374,
325,
273,
315,
315,
380,
261,
24,
380,
3504,
13,
325,
1011,
315,
2924,
67,
694,
3448,
429,
9220,
2925,
12,
71,
92,
2... |
HORIZON, depth, whitespaces | whitespaces, HORIZON, depth | def pns_sat_chunk ( articulated, horizon, chunks, articulators, CHUNK, whitespaces, HORIZON, depth ): bottom = len (articulators) # move down the stack of regexp until ... while articulators[depth].search (articulated) == None: depth += 1 if depth < bottom: continue # ... the end. return articulated # ... an articulation is found. if depth + 1 < bottom: # not yet at the bottom of the stack, recurse ... if len (articulated) > CHUNK: # chunk more ... for text in articulators[depth].split (articulated): if text.strip (whitespaces) == '': continue horizon.update (pns_sat_chunk ( text, set (), chunks, articulators, CHUNK, whitespaces, HORIZON, depth+1 )) return horizon # chunk no more, articulate ... name = pns_sat_re ( articulated, horizon, articulators, HORIZON, depth, whitespaces ) if name: chunks.append ((name, articulated)) return horizon # bottom of the stack reached, split ... names = articulators[depth].split (articulated) if len (names) > 1: name = pns_model.pns_name (netstring.encode (names), horizon) if name: chunks.append ((name, articulated)) elif len (names) > 0 and names[0]: chunks.append ((names[0], None)) return horizon | 54032e3eec2f2c6c72f0d22e246ddc5a287be8e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/54032e3eec2f2c6c72f0d22e246ddc5a287be8e1/pns_sat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2387,
67,
12973,
67,
6551,
261,
3688,
335,
11799,
16,
366,
20648,
16,
6055,
16,
3688,
335,
332,
3062,
16,
28096,
16,
28186,
16,
670,
11581,
673,
16,
3598,
262,
30,
5469,
273,
562,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
293,
2387,
67,
12973,
67,
6551,
261,
3688,
335,
11799,
16,
366,
20648,
16,
6055,
16,
3688,
335,
332,
3062,
16,
28096,
16,
28186,
16,
670,
11581,
673,
16,
3598,
262,
30,
5469,
273,
562,... |
assert(m0 == m3) | self.assertEqual(tuple(m0), m3) | def test_save_restore_state_for_ctm(self): gc = agg.GraphicsContextArray((100,100)) m0 = agg.translation_matrix(10.0,10.0) gc.set_ctm(m0) gc.save_state() m1 = agg.translation_matrix(5.0,5.0) gc.set_ctm(m1) m2 = gc.get_ctm() assert(m1 == m2) gc.restore_state() m3 = gc.get_ctm() assert(m0 == m3) | e47282ce7056af747cbd7b863b37854c3c1dd9d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/e47282ce7056af747cbd7b863b37854c3c1dd9d6/graphics_context_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5688,
67,
13991,
67,
2019,
67,
1884,
67,
299,
81,
12,
2890,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6625,
16,
6625,
3719,
312,
20,
273,
10421,
18,
10173,
67,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5688,
67,
13991,
67,
2019,
67,
1884,
67,
299,
81,
12,
2890,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12443,
6625,
16,
6625,
3719,
312,
20,
273,
10421,
18,
10173,
67,
56... |
x/(2*(x^2 - 1)^(1/4)*(x^2 + 1)^(3/4)) - (x*(x^2 + 1)^(1/4)/(2*(x^2 - 1)^(5/4))) | x/(2*(x^2 - 1)^(1/4)*(x^2 + 1)^(3/4)) - x*(x^2 + 1)^(1/4)/(2*(x^2 - 1)^(5/4)) | def derivative(self, *args): """ Returns the derivative of itself. If self has exactly one variable, then it differentiates with respect to that variable. If there is more than one variable in the expression, then you must explicitly supply a variable. If you supply a variable $x$ followed by a number $n$, then it will differentiate with respect to $n$ times with respect to $n$. | b3ba17c1357de84983fbf0c3d95f1ba232a95810 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b3ba17c1357de84983fbf0c3d95f1ba232a95810/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16417,
12,
2890,
16,
380,
1968,
4672,
3536,
2860,
326,
16417,
434,
6174,
18,
971,
365,
711,
8950,
1245,
2190,
16,
1508,
518,
3775,
16020,
598,
8762,
358,
716,
2190,
18,
971,
1915,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16417,
12,
2890,
16,
380,
1968,
4672,
3536,
2860,
326,
16417,
434,
6174,
18,
971,
365,
711,
8950,
1245,
2190,
16,
1508,
518,
3775,
16020,
598,
8762,
358,
716,
2190,
18,
971,
1915,
353,
... |
if confirmation.run() == 1: | if confirmation.run() == gtk.RESPONSE_OK: | def on_cache_clear_authentication_clicked(self, widget): confirmation = rabbitvcs.ui.dialog.Confirmation( _("Are you sure you want to clear your authentication information?") ) if confirmation.run() == 1: home_dir = rabbitvcs.util.helper.get_user_path() subpaths = [ '/.subversion/auth/svn.simple', '/.subversion/auth/svn.ssl.server', '/.subversion/auth/svn.username' ] for subpath in subpaths: path = "%s%s" % (home_dir, subpath) if os.path.exists(path): files = os.listdir(path) for filename in files: filepath = "%s/%s" % (path, filename) os.remove(filepath) | 4033be941027a3d9feda80cffb7d2034a4c052b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/4033be941027a3d9feda80cffb7d2034a4c052b1/settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2493,
67,
8507,
67,
12293,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
14296,
273,
767,
70,
3682,
18982,
18,
4881,
18,
12730,
18,
17597,
12,
389,
2932,
4704,
1846,
3071,
1846,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
67,
2493,
67,
8507,
67,
12293,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
14296,
273,
767,
70,
3682,
18982,
18,
4881,
18,
12730,
18,
17597,
12,
389,
2932,
4704,
1846,
3071,
1846,
25... |
""" | """ | def fl_show_choice(p1, p2, p3, p4, p5, p6, p7, p8): """ fl_show_choice(p1, p2, p3, p4, p5, p6, p7, p8) -> num. """ retval = _fl_show_choice(p1, p2, p3, p4, p5, p6, p7, p8) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
4500,
67,
11569,
12,
84,
21,
16,
293,
22,
16,
293,
23,
16,
293,
24,
16,
293,
25,
16,
293,
26,
16,
293,
27,
16,
293,
28,
4672,
3536,
1183,
67,
4500,
67,
11569,
12,
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,
1183,
67,
4500,
67,
11569,
12,
84,
21,
16,
293,
22,
16,
293,
23,
16,
293,
24,
16,
293,
25,
16,
293,
26,
16,
293,
27,
16,
293,
28,
4672,
3536,
1183,
67,
4500,
67,
11569,
12,
84,
... |
return list(set(map(lambda v: v.delegation, self.relevant_votes))) | return filter(lambda d: d is not None, list(set(map(lambda v: v.delegation, self.relevant_votes)))) | def _delegations(self): """ The set of delegations which have determined this decision, as per ``relevant_votes``. :returns: list of ``Delegation`` """ return list(set(map(lambda v: v.delegation, self.relevant_votes))) | c87be6e623d70f0e791a69d7916daf4a5211b99c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/c87be6e623d70f0e791a69d7916daf4a5211b99c/decision.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3771,
1332,
1012,
12,
2890,
4672,
3536,
1021,
444,
434,
11158,
1012,
1492,
1240,
11383,
333,
14604,
16,
487,
1534,
12176,
27719,
67,
27800,
68,
8338,
225,
294,
6154,
30,
666,
434,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3771,
1332,
1012,
12,
2890,
4672,
3536,
1021,
444,
434,
11158,
1012,
1492,
1240,
11383,
333,
14604,
16,
487,
1534,
12176,
27719,
67,
27800,
68,
8338,
225,
294,
6154,
30,
666,
434,
1... |
if c not in cache['byCountry']: del cache[c] else: | if c in cache['byCountry']: country_cache[c] = cache['byCountry'][c] | def collapse(d): """ collapses a dict {key:set(hostids)} into a set of hostids """ s = set() for country, hostids in d.iteritems(): for hostid in hostids: s.add(hostid) return s | d8ffc0b8b2d082a3e6e48e0f93e649f7302e8e7e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/d8ffc0b8b2d082a3e6e48e0f93e649f7302e8e7e/mirrorlist_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13627,
12,
72,
4672,
3536,
9262,
2420,
279,
2065,
288,
856,
30,
542,
12,
2564,
2232,
16869,
1368,
279,
444,
434,
1479,
2232,
3536,
272,
273,
444,
1435,
364,
5251,
16,
1479,
2232,
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,
13627,
12,
72,
4672,
3536,
9262,
2420,
279,
2065,
288,
856,
30,
542,
12,
2564,
2232,
16869,
1368,
279,
444,
434,
1479,
2232,
3536,
272,
273,
444,
1435,
364,
5251,
16,
1479,
2232,
316,
... |
if key == 'UID': | if key == 'uid': | def edit_event(self, context): if context.has_form_value('remove'): return self.remove(context) | 81410a9b1179862fa87ae58e8b1f34f2f6d9a1a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/81410a9b1179862fa87ae58e8b1f34f2f6d9a1a4/ical.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
2575,
12,
2890,
16,
819,
4672,
309,
819,
18,
5332,
67,
687,
67,
1132,
2668,
4479,
11,
4672,
327,
365,
18,
4479,
12,
2472,
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,
3874,
67,
2575,
12,
2890,
16,
819,
4672,
309,
819,
18,
5332,
67,
687,
67,
1132,
2668,
4479,
11,
4672,
327,
365,
18,
4479,
12,
2472,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print "XXX", name | def testScripts(complete, just_print, module="orange", directory="."): """Test the scripts in the given directory.""" global error_status if sys.platform == "win32" and sys.executable[-6:].upper() != "_D.EXE": import win32process, win32api win32process.SetPriorityClass(win32api.GetCurrentProcess(), 64) caller_directory = os.getcwd() os.chdir(directory) for dir in os.listdir("."): if not os.path.isdir(dir) or dir in [".svn", "cvs", "datasets", "widgets", "processed"] or (directories and not dir in directories): continue os.chdir(dir) outputsdir = "%s/results/%s/%s" % (regtestdir, module, dir) if not os.path.exists(outputsdir): os.mkdir(outputsdir) if os.path.exists("exclude-from-regression.txt"): dont_test = [x.strip() for x in file("exclude-from-regression.txt").readlines()] else: dont_test = [] test_set = [] names = [name for name in os.listdir('.') if (testFiles and name in testFiles) or (not testFiles and name[-3:]==".py") and (not name in dont_test)] names.sort() if names: print "-" * 79 print "Directory '%s'" % dir print # test_set includes all the scripts (file, status) to be tested for name in names: if not os.path.exists("%s/%s.txt" % (outputsdir, name)): # past result not available test_set.append((name, "new")) else: # past result available for state in states: if os.path.exists("%s/%s.%s.%s.%s.txt" % \ (outputsdir, name, platform, pyversion, state)): test_set.append((name, state)) # current result already on disk break else: if os.path.exists("%s/%s.%s.%s.random1.txt" % \ (outputsdir, name, platform, pyversion)): test_set.append((name, "random")) elif complete: test_set.append((name, "OK")) else: dont_test.append(name) if just_print: for name, lastResult in test_set: print "%s: %s" % (name, lastResult) else: if dont_test: print "Skipped: %s\n" % ", ".join(dont_test) for name, lastResult in test_set: print "XXX", name print "%s (%s): " % (name, lastResult == "new" and lastResult or ("last: %s" % lastResult)), for state in ["crash", "error", "new", "changed", "random1", "random2"]: remname = "%s/%s.%s.%s.%s.txt" % \ (outputsdir, name, platform, pyversion, state) if os.path.exists(remname): os.remove(remname) titerations = re_israndom.search(open(name, "rt").read()) and 1 or iterations os.spawnl(os.P_WAIT, sys.executable, "-c", regtestdir+"/xtest1.py", name, `titerations`, outputsdir) result = open("xtest1_report", "rt").readline().rstrip() or "crash" error_status = max(error_status, states.index(result)) os.remove("xtest1_report") os.chdir("..") os.chdir(caller_directory) | f5223eee259bf2ce004d720bfd822c4589bbc345 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/f5223eee259bf2ce004d720bfd822c4589bbc345/xtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
15041,
12,
6226,
16,
2537,
67,
1188,
16,
1605,
1546,
280,
726,
3113,
1867,
1546,
1199,
4672,
3536,
4709,
326,
8873,
316,
326,
864,
1867,
12123,
2552,
555,
67,
2327,
309,
2589,
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,
1842,
15041,
12,
6226,
16,
2537,
67,
1188,
16,
1605,
1546,
280,
726,
3113,
1867,
1546,
1199,
4672,
3536,
4709,
326,
8873,
316,
326,
864,
1867,
12123,
2552,
555,
67,
2327,
309,
2589,
18,
... | |
if self.limitNumber: results = results[:self.itemCount] | if self.getLimitNumber(): results = results[:self.getItemCount()] | def queryCatalog(self, REQUEST=None, **kw): """Invoke the catalog using our criteria to augment any passed in query before calling the catalog. """ q = self.buildQuery() if q is None: # empty query - do not show anything return [] kw.update( q ) pcatalog = getToolByName( self, 'portal_catalog' ) results = pcatalog.searchResults(REQUEST, **kw) if self.limitNumber: results = results[:self.itemCount] return results | a06fc1c2fea12aca07ef9858f342e24c8519c10a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/a06fc1c2fea12aca07ef9858f342e24c8519c10a/ATTopic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
9769,
12,
2890,
16,
12492,
33,
7036,
16,
2826,
9987,
4672,
3536,
10969,
326,
6222,
1450,
3134,
3582,
358,
18260,
1281,
2275,
316,
843,
1865,
4440,
326,
6222,
18,
3536,
1043,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
843,
9769,
12,
2890,
16,
12492,
33,
7036,
16,
2826,
9987,
4672,
3536,
10969,
326,
6222,
1450,
3134,
3582,
358,
18260,
1281,
2275,
316,
843,
1865,
4440,
326,
6222,
18,
3536,
1043,
273,
36... |
if verbose: print "email_text: " + str(email_text) | if verbose and simulate: print "email_text: " + str(email_text) | def emailer(rate, verbose): """This will load all the users each day/week/month, and send them emails.""" # remap the FREQUENCY variable from the model so the human keys relate back # to the indices rates = {} for r in FREQUENCY: rates[r[1].lower()] = r[0] RATE = rates[rate] # sphinx likes time in UnixTime format, which the below accomplishes. Sadly, # there doesn't appear to be an easier way to do this. The output can be # tested in the shell with: date --date="2010-04-16" +%s today = datetime.date.today() unixTimeToday = int(time.mktime(today.timetuple())) unixTimesPastWeek = [] unixTimesPastMonth = [] i = 0 while i < 7: unixTimesPastWeek.append(unixTimeToday - (86400 * i)) i += 1 i = 0 while i < calendar.mdays[datetime.date.today().month]: unixTimesPastMonth.append(unixTimeToday - (86400 * i)) i += 1 EMAIL_SUBJECT = 'New hits for your alert at CourtListener.com' EMAIL_SENDER = 'no-reply@courtlistener.com' # query all users with alerts of the desired frequency # use the distinct method to only return one instance of each person. userProfiles = UserProfile.objects.filter(alert__alertFrequency = RATE).distinct() if verbose: print "today: " + str(today) print "unixTimeToday: " + str(unixTimeToday) print "unixTimesPastWeek: " + str(unixTimesPastWeek) print "unixTimesPastMonth: " + str(unixTimesPastMonth) print "userProfiles (with " + rate + " alerts): " + str(userProfiles) # for each user with a daily, weekly or monthly alert... for userProfile in userProfiles: #...get their alerts... alerts = userProfile.alert.filter(alertFrequency = RATE) if verbose: print rate + " alerts for user " + userProfile.user.email + ": " + str(alerts) hits = [] # ...and iterate over their alerts. for alert in alerts: if RATE == 'dly': # query the alert queryset = Document.search.query(alert.alertText) results = queryset.set_options(mode="SPH_MATCH_EXTENDED2")\ .filter(datefiled=unixTimeToday) elif RATE == 'wly' and today.weekday() == 6: # if it's a weekly alert and today is Sunday queryset = Document.search.query(alert.alertText) results = queryset.set_options(mode="SPH_MATCH_EXTENDED2")\ .filter(datefiled=unixTimesPastWeek) elif RATE == 'mly' and today.day == 19: # if it's a monthly alert and today is the first of the month queryset = Document.search.query(alert.alertText) results = queryset.set_options(mode="SPH_MATCH_EXTENDED2")\ .filter(datefiled=unixTimesPastMonth) elif RATE == "off": pass if verbose: print "There were " + str(results.count()) + \ " hits for the alert \"" + alert.alertText + \ "\". Here are the first 0-20: " + str(results) # hits is a multidimensional array. Ugh. # it consists of alerts, paired with a list of documents, of the form: # [[alert1, [hit1, hit2, hit3, hit4]], [alert2, [hit1, hit2]]] if results.count() > 0: # very important! if you don't do the slicing here, you'll only # get the first 20 hits. also very frustrating! alertWithResults = [alert, results[0:results.count()]] hits.append(alertWithResults) # set the hit date to today alert.lastHitDate = datetime.date.today() alert.save() if verbose: print "alertWithResults: " + alertWithResults print "hits: " + hits elif alert.sendNegativeAlert: # if they want an alert even when no hits. alertWithResults = [alert, "None"] hits.append(alertWithResults) if verbose: print "Sending results for negative alert, " + alert.alertText + "." print "alertWithResults: " + str(alertWithResults) print "hits: " + str(hits) if len(hits) > 0: # either the hits var has the value "None", or it has hits. if userProfile.plaintextPreferred: # send a plaintext email. txtTemplate = loader.get_template('emails/email.txt') c = Context({ 'hits': hits, }) email_text = txtTemplate.render(c) if verbose: print "email_text: " + str(email_text) send_mail( EMAIL_SUBJECT, email_text, EMAIL_SENDER, [userProfile.user.email], fail_silently=False) else: # send a multi-part email txtTemplate = loader.get_template('emails/email.txt') htmlTemplate = loader.get_template('emails/email.html') c = Context({ 'hits': hits, }) email_text = txtTemplate.render(c) html_text = htmlTemplate.render(c) if verbose: print "email_text: " + str(email_text) print "html_text: " + str(html_text) msg = EmailMultiAlternatives(EMAIL_SUBJECT, email_text, EMAIL_SENDER, [userProfile.user.email]) msg.attach_alternative(html_text, "text/html") msg.send(fail_silently=False) return "Done" | 1f5e6c5fae22950c23d4f7747cf9e0f4219d4af4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6762/1f5e6c5fae22950c23d4f7747cf9e0f4219d4af4/send_emails.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2699,
264,
12,
5141,
16,
3988,
4672,
3536,
2503,
903,
1262,
777,
326,
3677,
1517,
2548,
19,
10741,
19,
7496,
16,
471,
1366,
2182,
14255,
12123,
468,
21674,
326,
478,
862,
3500,
26325,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2699,
264,
12,
5141,
16,
3988,
4672,
3536,
2503,
903,
1262,
777,
326,
3677,
1517,
2548,
19,
10741,
19,
7496,
16,
471,
1366,
2182,
14255,
12123,
468,
21674,
326,
478,
862,
3500,
26325,
21... |
self.key_pressed, Qt.DirectConnection) | self.mouse_released, Qt.DirectConnection) | def __init__(self, parent=None): QComboBox.__init__(self, parent) self.line_edit = SearchLineEdit(self) self.setLineEdit(self.line_edit) self.connect(self.line_edit, SIGNAL('key_pressed(PyQt_PyObject)'), self.key_pressed, Qt.DirectConnection) self.connect(self.line_edit, SIGNAL('mouse_released(PyQt_PyObject)'), self.key_pressed, Qt.DirectConnection) self.setEditable(True) self.help_state = True self.as_you_type = True self.prev_search = '' self.timer = None self.setInsertPolicy(self.NoInsert) self.setMaxCount(self.MAX_COUNT) | c1eceec7e782540dadac5ad5c62470cc506d382f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/c1eceec7e782540dadac5ad5c62470cc506d382f/search_box.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
4672,
2238,
22199,
16186,
2738,
972,
12,
2890,
16,
982,
13,
365,
18,
1369,
67,
4619,
273,
5167,
1670,
4666,
12,
2890,
13,
365,
18,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
33,
7036,
4672,
2238,
22199,
16186,
2738,
972,
12,
2890,
16,
982,
13,
365,
18,
1369,
67,
4619,
273,
5167,
1670,
4666,
12,
2890,
13,
365,
18,
542,
... |
os.makedirs(os.path.join(self.config['core'], 'SoarLibrary\\bin\\tcl_sml_clientinterface')) | def source(self): if os.path.exists(self.config['source']): logging.debug('Removing old source tree: %s' % self.config['source']) shutil.rmtree(self.config['source']) logging.info('Checking out source tree.') os.system('svn export -q %s %s' % (self.config['soarurl'], self.config['source'])) logging.info('Removing globs from source that are not to be distributed with the release.') for root, dirs, files in os.walk(self.config['source']): for glob in self.config['remove']: #matched = fnmatch.filter(dirs, glob) matched = [n for n in dirs if fnmatch.fnmatchcase(n, glob)] for x in matched: dirs.remove(x) logging.debug('Removing %s' % os.path.join(root, x)) shutil.rmtree(os.path.join(root, x)) #matched = fnmatch.filter(files, glob) matched = [n for n in files if fnmatch.fnmatchcase(n, glob)] for x in matched: logging.debug('Removing %s' % os.path.join(root, x)) os.remove(os.path.join(root, x)) if os.path.exists(self.config['core']): logging.debug('Removing old core tree: %s' % self.config['core']) shutil.rmtree(self.config['core']) logging.info('Copying globs from working tree to core.') for root, dirs, files in os.walk('.'): for glob in self.config['copycoreglobs']: #matched = fnmatch.filter(dirs, glob) matched = [n for n in dirs if fnmatch.fnmatchcase(n, glob)] for x in matched: dirs.remove(x) src = os.path.join(root, x) dst = os.path.join(self.config['core'], src) logging.debug('%s -dir-> %s' % (src, dst)) # Make sure parent directory exists dstdir = os.path.join(self.config['core'], root) if not os.path.exists(dstdir): os.makedirs(dstdir) shutil.copytree(src,dst) #matched = fnmatch.filter(files, glob) matched = [n for n in files if fnmatch.fnmatchcase(n, glob)] for x in matched: src = os.path.join(root, x) dst = os.path.join(self.config['core'], src) logging.debug('%s -file-> %s' % (src, dst)) | 5c5f450ae997356b938bab1bb923db66343a7415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7008/5c5f450ae997356b938bab1bb923db66343a7415/installergen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1084,
12,
2890,
4672,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
1425,
3292,
3168,
3546,
4672,
2907,
18,
4148,
2668,
18939,
1592,
1084,
2151,
30,
738,
87,
11,
738,
365,
18,
1425,
3292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1084,
12,
2890,
4672,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
1425,
3292,
3168,
3546,
4672,
2907,
18,
4148,
2668,
18939,
1592,
1084,
2151,
30,
738,
87,
11,
738,
365,
18,
1425,
3292... | |
new.data = new.data * other | new.data = new.data ** other | def __pow__(self, other): if isinstance(other, type(3)): raise NotImplementedError elif isscalar(other): new = self.copy() new.data = new.data * other new._dtypechar = new.data.dtypechar new.ftype = _transtabl[new._dtypechar] return new else: ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." dtypechar = _coerce_rules[(self._dtypechar,ocs._dtypechar)] nnz1, nnz2 = self.nnz, ocs.nnz data1, data2 = _convert_data(self.data[:nnz1], ocs.data[:nnz2], dtypechar) func = getattr(sparsetools,_transtabl[dtypechar]+'cscmul') c,rowc,ptrc,ierr = func(data1,self.rowind[:nnz1],self.indptr,data2,ocs.rowind[:nnz2],ocs.indptr) if ierr: raise ValueError, "Ran out of space (but shouldn't have happened)." M, N = self.shape return csc_matrix.Construct(c,(rowc,ptrc),M=M,N=N) | a2bf57fc75113a68b861da7355c48c019c1ddc40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a2bf57fc75113a68b861da7355c48c019c1ddc40/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
23509,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
618,
12,
23,
3719,
30,
1002,
11206,
1327,
3385,
3473,
12,
3011,
4672,
394,
273,
365,
18,
3530,
1435,
394,
18,
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,
1652,
1001,
23509,
972,
12,
2890,
16,
1308,
4672,
309,
1549,
12,
3011,
16,
618,
12,
23,
3719,
30,
1002,
11206,
1327,
3385,
3473,
12,
3011,
4672,
394,
273,
365,
18,
3530,
1435,
394,
18,
892,
... |
x = [ZZ._coerce_(a) for a in x.list()] | x = [ZZ(a) for a in x.list()] | def __init__(self, parent, x=None, check=True, is_gen=False, construct=False): Polynomial.__init__(self, parent, is_gen=is_gen) | e25567e4497baa8ca6e7374c750b2e6f0906c1f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/e25567e4497baa8ca6e7374c750b2e6f0906c1f8/polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
33,
8381,
16,
4872,
33,
8381,
4672,
6730,
13602,
16186,
2738,
972,
12,
2890,
16,
982,
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,
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,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
33,
8381,
16,
4872,
33,
8381,
4672,
6730,
13602,
16186,
2738,
972,
12,
2890,
16,
982,
16,... |
if os.geteuid() != 0: | parser = option_parser() opts = parser.parse_args()[0] if not opts.no_root and os.geteuid() != 0: | def post_install(): if os.geteuid() != 0: print >> sys.stderr, 'You must be root to run this command.' sys.exit(1) setup_udev_rules() setup_completion() setup_desktop_integration() try: from PyQt4 import Qt if Qt.PYQT_VERSION < int('0x40301', 16): print 'WARNING: You need PyQt >= 4.3.1 for the GUI. You have', Qt.PYQT_VERSION_STR, '\nYou may experience crashes or other strange behavior.' except ImportError: print 'WARNING: You do not have PyQt4 installed. The GUI will not work.' | 45abfd50d363c2402f8a1c54ab39710c64d8866e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/45abfd50d363c2402f8a1c54ab39710c64d8866e/linux.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
5425,
13332,
2082,
273,
1456,
67,
4288,
1435,
1500,
273,
2082,
18,
2670,
67,
1968,
1435,
63,
20,
65,
225,
309,
486,
1500,
18,
2135,
67,
3085,
471,
1140,
18,
588,
73,
1911,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1603,
67,
5425,
13332,
2082,
273,
1456,
67,
4288,
1435,
1500,
273,
2082,
18,
2670,
67,
1968,
1435,
63,
20,
65,
225,
309,
486,
1500,
18,
2135,
67,
3085,
471,
1140,
18,
588,
73,
1911,
... |
Try to convert the overconvergent modular form f into an element of self. An error will be raised if this is | Try to convert the overconvergent modular form `f` into an element of self. An error will be raised if this is | def _coerce_from_ocmf(self, f): r""" Try to convert the overconvergent modular form f into an element of self. An error will be raised if this is obviously nonsense. | d7c9d61652cabcfb658c91a720989214f7a469bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d7c9d61652cabcfb658c91a720989214f7a469bd/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2894,
2765,
67,
2080,
67,
504,
16126,
12,
2890,
16,
284,
4672,
436,
8395,
6161,
358,
1765,
326,
1879,
591,
502,
75,
319,
681,
2490,
646,
1375,
74,
68,
1368,
392,
930,
434,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2894,
2765,
67,
2080,
67,
504,
16126,
12,
2890,
16,
284,
4672,
436,
8395,
6161,
358,
1765,
326,
1879,
591,
502,
75,
319,
681,
2490,
646,
1375,
74,
68,
1368,
392,
930,
434,
365,
... |
if os.path.exists(lyricname): buffer.set_text(file(lyricname).read()) else: buffer.set_text(_("No lyrics found.\n\nYou can click the " "Download button to have Quod Libet search " "for lyrics online. You can also enter them " "yourself and click save.")) | if os.path.exists(lyricname): buffer.set_text(file(lyricname).read()) else: buffer.set_text(_("No lyrics found for this song.")) | def __init__(self, song): super(LyricsPane, self).__init__(spacing=12) self.set_border_width(12) view = gtk.TextView() sw = gtk.ScrolledWindow() sw.add(view) refresh = qltk.Button(_("_Download"), gtk.STOCK_CONNECT) save = gtk.Button(stock=gtk.STOCK_SAVE) delete = gtk.Button(stock=gtk.STOCK_DELETE) add = gtk.Button(stock=gtk.STOCK_EDIT) view.set_wrap_mode(gtk.WRAP_WORD) sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | d7d989eee4287bf2720dbb59f3ae1a9c98cef3f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/d7d989eee4287bf2720dbb59f3ae1a9c98cef3f5/lyrics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
17180,
4672,
2240,
12,
48,
93,
1512,
87,
8485,
16,
365,
2934,
972,
2738,
972,
12,
14080,
33,
2138,
13,
365,
18,
542,
67,
8815,
67,
2819,
12,
2138,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17180,
4672,
2240,
12,
48,
93,
1512,
87,
8485,
16,
365,
2934,
972,
2738,
972,
12,
14080,
33,
2138,
13,
365,
18,
542,
67,
8815,
67,
2819,
12,
2138,
13,
... |
return prosite_re.match(pattern) is not None | x = prosite_re.match(pattern) if x is None: return 0 if string.find(pattern, "[<", 1) != -1: return 0 if string.find(pattern, ">]", 0, len(pattern)-2) != -1: return 0 return 1 | def verify_pattern(pattern): """returns 1 if the Prosite pattern is syntactically correct, else 0""" return prosite_re.match(pattern) is not None | 18dbba155bba07951da5424ebe81cc1b94eea170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/18dbba155bba07951da5424ebe81cc1b94eea170/Pattern.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
67,
4951,
12,
4951,
4672,
3536,
6154,
404,
309,
326,
1186,
4256,
1936,
353,
1393,
496,
621,
6478,
3434,
16,
469,
374,
8395,
619,
273,
450,
4256,
67,
266,
18,
1916,
12,
4951,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3929,
67,
4951,
12,
4951,
4672,
3536,
6154,
404,
309,
326,
1186,
4256,
1936,
353,
1393,
496,
621,
6478,
3434,
16,
469,
374,
8395,
619,
273,
450,
4256,
67,
266,
18,
1916,
12,
4951,
13,
... |
def rangeitem(s, p, o, self=self, qstore=self, callback=callback): | def rangeitem(s, p, o, self=self, qstore=self, possibleSubject=possibleSubject): | def rangeitem(s, p, o, self=self, qstore=self, callback=callback): for type in qstore.transitiveSubTypes(o): qstore.visit(possibleSubject, None, QueryStore.TYPE, type) | 28a0546b07a14f0133c902e5c54c8cbdb368251c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7049/28a0546b07a14f0133c902e5c54c8cbdb368251c/query.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1048,
1726,
12,
87,
16,
293,
16,
320,
16,
365,
33,
2890,
16,
1043,
2233,
33,
2890,
16,
3323,
6638,
33,
12708,
6638,
4672,
364,
618,
316,
1043,
2233,
18,
2338,
3720,
1676,
2016,
12,
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,
1048,
1726,
12,
87,
16,
293,
16,
320,
16,
365,
33,
2890,
16,
1043,
2233,
33,
2890,
16,
3323,
6638,
33,
12708,
6638,
4672,
364,
618,
316,
1043,
2233,
18,
2338,
3720,
1676,
2016,
12,
8... |
if data.name[idx] != 'l_'+nm+'_joint': | if data.name[idx] != self.joint_names_list[1][i]: | def joint_states_cb(self, data): arm_angles = [[], []] arm_efforts = [[], []] r_jt_idx_list = [17, 18, 16, 20, 19, 21, 22] l_jt_idx_list = [31, 32, 30, 34, 33, 35, 36] for i,nm in enumerate(self.joint_nm_list): idx = r_jt_idx_list[i] if data.name[idx] != 'r_'+nm+'_joint': raise RuntimeError('joint angle name does not match. Expected: %s, Actual: %s i: %d'%('r_'+nm+'_joint', data.name[idx], i)) arm_angles[0] += [data.position[idx]] arm_efforts[0] += [data.effort[idx]] | 812b08c1aa99cf5f182bafa2b2c1b6d3e2757142 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/812b08c1aa99cf5f182bafa2b2c1b6d3e2757142/pr2_arms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15916,
67,
7992,
67,
7358,
12,
2890,
16,
501,
4672,
23563,
67,
12356,
273,
12167,
6487,
5378,
65,
23563,
67,
17098,
499,
87,
273,
12167,
6487,
5378,
65,
436,
67,
78,
88,
67,
3465,
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,
15916,
67,
7992,
67,
7358,
12,
2890,
16,
501,
4672,
23563,
67,
12356,
273,
12167,
6487,
5378,
65,
23563,
67,
17098,
499,
87,
273,
12167,
6487,
5378,
65,
436,
67,
78,
88,
67,
3465,
67,
... |
"""Return values for form inpurt.""" | """Return values for form input.""" | def getValues(request, argument): """Return values for form inpurt.""" values = request.args.get(argument.name, None) if values: try: return argument.coerce(values) except formmethod.InputError: return values return argument.default | 4fcf3974af001e6becd57d1555de5170b6788478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4fcf3974af001e6becd57d1555de5170b6788478/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13500,
12,
2293,
16,
1237,
4672,
3536,
990,
924,
364,
646,
810,
12123,
924,
273,
590,
18,
1968,
18,
588,
12,
3446,
18,
529,
16,
599,
13,
309,
924,
30,
775,
30,
327,
1237,
18,
2894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13500,
12,
2293,
16,
1237,
4672,
3536,
990,
924,
364,
646,
810,
12123,
924,
273,
590,
18,
1968,
18,
588,
12,
3446,
18,
529,
16,
599,
13,
309,
924,
30,
775,
30,
327,
1237,
18,
2894,
... |
gpsstate = self.gps.GetResourcePolicy("GPS") if gpsstate == "auto": | gpspolicy = self.gps.GetResourcePolicy("GPS") if gpspolicy == "auto": | def createView(self): try: self.gps = getDbusObject (self.dbus, "org.freesmartphone.ousaged", "/org/freesmartphone/Usage", "org.freesmartphone.Usage") except: label = elementary.Label(self.window) label.label_set(_("can't connect to dbus")) return label | cdee0f1f551ee1cca10ae68b4d7d8495539bba50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11428/cdee0f1f551ee1cca10ae68b4d7d8495539bba50/shr_gps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15193,
12,
2890,
4672,
775,
30,
365,
18,
75,
1121,
273,
2343,
9274,
921,
261,
2890,
18,
1966,
407,
16,
315,
3341,
18,
74,
5312,
81,
485,
10540,
18,
1481,
11349,
3113,
2206,
3341,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15193,
12,
2890,
4672,
775,
30,
365,
18,
75,
1121,
273,
2343,
9274,
921,
261,
2890,
18,
1966,
407,
16,
315,
3341,
18,
74,
5312,
81,
485,
10540,
18,
1481,
11349,
3113,
2206,
3341,
19,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.