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
print db[y][0] + "\t" + db[y][1] + "\t\t" + db[y][2] + "\t"
print db[y][0] + "\t" + db[y][2] + "\t\t" + db[y][1] + "\t"
def main(): """ This program is used to generate the menu in enlightenment for the pentoo livecd Future version _might_ support other VM like gnome or others but kde :-) """ try: readcsv() except: print >> sys.stderr, "cannot read csv file" return -1 if options.listsupported: listdb() return 0 if options.simulate: print star + "Starting simulation" if options.listonly: print star + "Listing supported packages installed" print "Package\t\tIcon file\t\tMenu category" pkginstalled = [] pkginstalled = listpackages(PORTDIR) notthere = [] menu = etree.parse("applications.menu") root_menu = menu.getroot() for y in range(db.__len__()): if pkginstalled.__contains__(db[y][0]): if options.listonly: print db[y][0] + "\t" + db[y][1] + "\t\t" + db[y][2] + "\t" else: # calls makemenuentry file.eap, menu category for single_entry in db[y][1].split(" "): try: make_menu_entry(root_menu, single_entry, db[y][2]) except: print >> sys.stderr, "Can't find " + single_entry + " in " + APPSDIR return -1 else: notthere.append(db[y][0]) # settermenv() if options.vverbose: # Final move, show the unfound icons in the db print warn + "Missing applications :" print star + "The following applications are available but not installed" for i in range(notthere.__len__()): print arrow + notthere[i] #print etree.tostring(root_menu, pretty_print=True) genxml(menu)
11ed63ffe18625c6a1c8114bd10db3db6b9e5573 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7161/11ed63ffe18625c6a1c8114bd10db3db6b9e5573/genmenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 1220, 5402, 353, 1399, 358, 2103, 326, 3824, 316, 570, 5099, 275, 475, 364, 326, 293, 319, 5161, 328, 427, 557, 72, 9108, 1177, 389, 81, 750, 67, 2865, 1308, 8251, 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, 2774, 13332, 3536, 1220, 5402, 353, 1399, 358, 2103, 326, 3824, 316, 570, 5099, 275, 475, 364, 326, 293, 319, 5161, 328, 427, 557, 72, 9108, 1177, 389, 81, 750, 67, 2865, 1308, 8251, 3...
*host = strdup (address)
*host = strdup(address)
static def split_address(char const *address, char **host, int *port): char *colon = strrchr (address, ':') if colon: *host = malloc (colon - address + 1) strncpy (*host, address, colon - address) (*host)[colon - address] = '\0' *port = atoi (colon + 1) else: *host = strdup (address) *port = 0
592872e308788b926d7358eb0ec411e83ee451d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/592872e308788b926d7358eb0ec411e83ee451d0/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 1652, 1416, 67, 2867, 12, 3001, 1866, 380, 2867, 16, 1149, 2826, 2564, 16, 509, 380, 655, 4672, 1149, 380, 22667, 273, 13736, 15182, 261, 2867, 16, 3921, 13, 309, 13336, 30, 380, 2564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 760, 1652, 1416, 67, 2867, 12, 3001, 1866, 380, 2867, 16, 1149, 2826, 2564, 16, 509, 380, 655, 4672, 1149, 380, 22667, 273, 13736, 15182, 261, 2867, 16, 3921, 13, 309, 13336, 30, 380, 2564, ...
p = Integer(p)
if not isinstance(p, Integer): p = Integer(p) if not isinstance(prec, Integer): prec = Integer(prec) if not isinstance(halt, Integer): halt = Integer(halt)
def Qp(p, prec = 20, type = 'capped-rel', print_mode = None, halt = 40, names = None, check = True): """ A creation function for p-adic fields. INPUT: p -- integer: the p in Q_p prec -- integer (default: 20) the precision cap of the field. Individual elements keep track of their own precision. type -- string (default: 'capped-rel') see Notes print_mode -- string (default: None) the print mode OUTPUT: the corresponding p-adic field EXAMPLES: sage: K = Qp(5); a = K(4); a 4 + O(5^20) #sage: L = Qp(5, 10, type = 'lazy'); b = L(2); b #2 + O(5^10) #sage: a + b #1 + 5 + O(5^20) NOTES: values of type: 'capped-rel' -> pAdicFieldCappedRelative. This is the default, considers precision as the precision of the unit part. Tracks precision of individual elements, but bounds the precision of any element with a precision cap. 'lazy' -> pAdicFieldLazy. Uses lazy elements so that additional precision can be requested during a computation. There is some amount of performance penalty because of this ability. values of print_mode: Leaving print_mode as None uses the global default print mode. Other allowable values are: 'val-unit' -- elements are displayed as p^k*u 'terse' -- elements are displayed as an integer in base 10 or the quotient of an integer by a power of p (still in base 10) 'series' -- elements are displayed as series in p 'digits' -- elements are displayed as a string of base p digits 'bars' -- elements are displayed as a string of base p digits with separators For more details and more control, see sage.rings.padics.padic_printing or look at padic_printing.<tab> from the command line. """ if check: p = Integer(p) if not p.is_prime(): raise ValueError, "p must be prime" if not isinstance(prec, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(prec, (int, long)): prec = Integer(prec) if not isinstance(halt, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(halt, (int, long)): halt = Integer(halt) if names is None: name = str(p) elif isinstance(names, tuple): name = names[0] else: name = str(names) if type != 'lazy': key = (p, prec, type, name, print_mode) else: key = (p, prec, halt, name, print_mode) if padic_field_cache.has_key(key): K = padic_field_cache[key]() if K != None: return K if (type == 'capped-rel'): K = pAdicFieldCappedRelative(p, prec, print_mode, name) elif (type == 'lazy'): raise NotImplementedError, "lazy p-adics need more work. Sorry." K = pAdicFieldLazy(p, prec, print_mode, halt, name) else: raise ValueError, "type must be either 'capped-rel' or 'lazy'" padic_field_cache[key] = weakref.ref(K) return K
52b1691f211d5745f1620cd0a7f20ac04ca573c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/52b1691f211d5745f1620cd0a7f20ac04ca573c9/factory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2238, 84, 12, 84, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 2878, 2187, 1172, 67, 3188, 273, 599, 16, 18389, 273, 8063, 16, 1257, 273, 599, 16, 866, 273, 1053, 4672, 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, 2238, 84, 12, 84, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 2878, 2187, 1172, 67, 3188, 273, 599, 16, 18389, 273, 8063, 16, 1257, 273, 599, 16, 866, 273, 1053, 4672, 3...
del sys.path[1]
sys.path.remove(dirpath)
def get_extensions(self, dirname): """Load python extensions
ec63b7e73dd33e0888d98e7541f0424a2475a331 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ec63b7e73dd33e0888d98e7541f0424a2475a331/instance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9489, 12, 2890, 16, 4283, 4672, 3536, 2563, 5790, 4418, 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, ...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9489, 12, 2890, 16, 4283, 4672, 3536, 2563, 5790, 4418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
IP_LIST = r"\*|localhost|((\*|[01]?\d\d?|2[04]\d|25[0-5])\.(\*|[01]?\d" \ r"\d?|2[04]\d|25[0-5])\.(\*|[01]?\d\d?|2[04]\d|25[0-5])\.(\*" \ r"|[01]?\d\d?|2[04]\d|25[0-5]),?)+"
IP_LIST = r"\*|localhost|((\*|[01]?\d\d?|2[0-4]\d|25[0-5])\.(\*|[01]?\d" \ r"\d?|2[0-4]\d|25[0-5])\.(\*|[01]?\d\d?|2[0-4]\d|25[0-5])\.(\*" \ r"|[01]?\d\d?|2[0-4]\d|25[0-5]),?)+"
def output_for_docs(self, section=None, option=None): '''Return output suitable for inserting into documentation for the available options.''' return self._display_nice(section, option, 'as_documentation_string')
757cbb4c7315c7a2f9ffbb495f81cff528e1684f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/757cbb4c7315c7a2f9ffbb495f81cff528e1684f/OptionsClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 67, 1884, 67, 8532, 12, 2890, 16, 2442, 33, 7036, 16, 1456, 33, 7036, 4672, 9163, 990, 876, 10631, 364, 21079, 1368, 7323, 364, 326, 2319, 702, 1093, 6309, 327, 365, 6315, 5417, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 67, 1884, 67, 8532, 12, 2890, 16, 2442, 33, 7036, 16, 1456, 33, 7036, 4672, 9163, 990, 876, 10631, 364, 21079, 1368, 7323, 364, 326, 2319, 702, 1093, 6309, 327, 365, 6315, 5417, 6...
self.alert(u'Informasjonen om firmaet ditt må være fullstendig'+\ u'før du kan fylle inn fakturaen.\n'+ str(e).decode("utf8"))
self.alert(u'Informasjonen om firmaet ditt må være fullstendig '+\ u'før du fyller ut fakturaer.\n'+ e.message)
def nyFaktura(self, kunde = None, ordrelinje = None): # sjekk at firmainfo er fullstendig utfylt (så feiler vi ikke senere) try: self.firma.sjekkData() except FirmainfoFeil,e: self.alert(u'Informasjonen om firmaet ditt må være fullstendig'+\ u'før du kan fylle inn fakturaen.\n'+ str(e).decode("utf8")) self.visFirmaOppsett() return False if kunde is not None: self.gui.fakturaFaktaMottaker.clear() self.gui.fakturaFaktaMottaker.addItem(unicode(kunde), QtCore.QVariant(kunde)) self.gui.fakturaVareliste.setFocus() else: self.gui.fakturaFaktaMottaker.setEnabled(True) self.gui.fakturaFaktaMottaker.clear() kunder = 0 for k in self.faktura.hentKunder(): self.gui.fakturaFaktaMottaker.addItem(unicode(k), QtCore.QVariant(k)) kunder += 1 if kunder == 0: # ingen kunder registrert self.gui.fakturaTab.setCurrentIndex(1) self.lastKunde() self.alert(u'Du må registrere minst én kunde før du fyller inn fakturaen') return self.gui.fakturaFaktaMottaker.setFocus() self.gui.fakturaFaktaTekst.setPlainText("") self.gui.fakturaVareliste.clearContents() self.leggVareTilOrdre(rad=0) # legg til tom rad self.gui.fakturaFaktaDato.setDate(QtCore.QDate.currentDate()) self.gui.fakturaFaktaLeveringsdato.setDate(QtCore.QDate.currentDate()) self.gui.fakturaFaktaLeveringsdato.setEnabled(False) forfall = QtCore.QDate(QtCore.QDate.currentDate()) self.gui.fakturaFaktaForfall.setDate(forfall.addDays(self.firma.forfall)) self.gui.fakturaHandlinger.hide() self.gui.fakturaFaktaOverstyr.setChecked(False) self.gui.fakturaAlternativer.hide() self.gui.fakturaDetaljer.hide() self.gui.fakturaFakta.show()
1af89a0ea394c9b5c3ac17354b869722e5b9bf68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3611/1af89a0ea394c9b5c3ac17354b869722e5b9bf68/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15308, 42, 581, 88, 21401, 12, 2890, 16, 417, 318, 323, 273, 599, 16, 4642, 2878, 267, 78, 73, 273, 599, 4672, 468, 30252, 3839, 79, 622, 284, 3985, 28935, 6445, 1983, 334, 409, 360, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15308, 42, 581, 88, 21401, 12, 2890, 16, 417, 318, 323, 273, 599, 16, 4642, 2878, 267, 78, 73, 273, 599, 4672, 468, 30252, 3839, 79, 622, 284, 3985, 28935, 6445, 1983, 334, 409, 360, ...
elif component == 'record' and path[0] == 'multiedit':
elif component == 'record' and path and path[0] == 'multiedit':
def answer(req, form): """Accessing collections cached pages.""" # Accessing collections: this is for accessing the # cached page on top of each collection.
1cded413c338c6df641b4f19843e0710100dfd33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/1cded413c338c6df641b4f19843e0710100dfd33/websearch_webinterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5803, 12, 3658, 16, 646, 4672, 3536, 1862, 310, 6980, 3472, 4689, 12123, 468, 5016, 310, 6980, 30, 333, 353, 364, 19531, 326, 468, 3472, 1363, 603, 1760, 434, 1517, 1849, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5803, 12, 3658, 16, 646, 4672, 3536, 1862, 310, 6980, 3472, 4689, 12123, 468, 5016, 310, 6980, 30, 333, 353, 364, 19531, 326, 468, 3472, 1363, 603, 1760, 434, 1517, 1849, 18, 2, -100, ...
return S_OK([])
return S_OK( [] )
def __findSubdirMissingMeta(self,meta): """ Find directories not having the given meta datum defined """ result = self.__findSubdirByMeta(meta,'Any') if not result['OK']: return result dirList = result['Value'] table = self.dtree.getTreeTable() dirString = ','.join( [ str(x) for x in dirList ] ) req = 'SELECT DirID FROM %s WHERE DirID NOT IN ( %s )' % (table,dirString) result = self._query(req) if not result['OK']: return result if not result['Value']: return S_OK([]) dirList = [ x[0] for x in result['Value'] ] return S_OK(dirList)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 1676, 1214, 4841, 2781, 12, 2890, 16, 3901, 4672, 3536, 4163, 6402, 486, 7999, 326, 864, 2191, 12059, 2553, 3536, 563, 273, 365, 16186, 4720, 1676, 1214, 858, 2781, 12, 3901, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 1676, 1214, 4841, 2781, 12, 2890, 16, 3901, 4672, 3536, 4163, 6402, 486, 7999, 326, 864, 2191, 12059, 2553, 3536, 563, 273, 365, 16186, 4720, 1676, 1214, 858, 2781, 12, 3901, ...
def sendWMSAccounting(self):
def sendWMSAccounting(self,status='',minorStatus=''):
def sendWMSAccounting(self): """Send WMS accounting data. """ self.accountingReport.setEndTime() #CPUTime and ExecTime if 'CPU' in EXECUTION_RESULT: utime, stime, cutime, cstime, elapsed = EXECUTION_RESULT['CPU'] else: utime, stime, cutime, cstime, elapsed = os.times() cpuTime = utime + stime + cutime + cstime execTime = elapsed #Fill the data acData = { 'User' : self.owner, 'UserGroup' : self.userGroup, 'JobGroup' : self.jobGroup, 'JobType' : self.jobType, 'JobClass' : self.jobClass, 'ProcessingType' : self.processingType, 'FinalMajorStatus' : self.wmsMajorStatus, 'FinalMinorStatus' : self.wmsMinorStatus, 'CPUTime' : cpuTime, 'NormCPUTime' : cpuTime * gConfig.getValue ( "/LocalSite/CPUScalingFactor", 0.0 ), 'ExecTime' : execTime, 'InputDataSize' : self.inputDataSize, 'OutputDataSize' : self.outputDataSize, 'InputDataFiles' : self.inputDataFiles, 'OutputDataFiles' : self.outputDataFiles, 'DiskSpace' : self.diskSpaceConsumed, 'InputSandBoxSize' : self.inputSandboxSize, 'OutputSandBoxSize' : self.outputSandboxSize, 'ProcessedEvents' : self.processedEvents } self.log.verbose('Accounting Report is:') self.log.verbose(acData) self.accountingReport.setValuesFromDict( acData ) self.accountingReport.commit()
dff16d89a6631901a0ee4617bbbb50f7ffa86553 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dff16d89a6631901a0ee4617bbbb50f7ffa86553/JobWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 59, 3537, 3032, 310, 12, 2890, 16, 2327, 2218, 2187, 17364, 1482, 2218, 11, 4672, 3536, 3826, 678, 3537, 2236, 310, 501, 18, 3536, 365, 18, 4631, 310, 4820, 18, 542, 25255, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 59, 3537, 3032, 310, 12, 2890, 16, 2327, 2218, 2187, 17364, 1482, 2218, 11, 4672, 3536, 3826, 678, 3537, 2236, 310, 501, 18, 3536, 365, 18, 4631, 310, 4820, 18, 542, 25255, 1435, ...
self.statemachine.node += self.unindentwarning()
self.statemachine.node += self.unindent_warning('Explicit markup')
def explicitlist(self, blankfinish): """ Create a nested state machine for a series of explicit markup constructs (including anonymous hyperlink targets). """ offset = self.statemachine.lineoffset + 1 # next line newlineoffset, blankfinish = self.nestedlistparse( self.statemachine.inputlines[offset:], inputoffset=self.statemachine.abslineoffset() + 1, node=self.statemachine.node, initialstate='Explicit', blankfinish=blankfinish) self.gotoline(newlineoffset) if not blankfinish: self.statemachine.node += self.unindentwarning()
ce0c24195139efc8334ce9dec2c49af5e21c1202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/ce0c24195139efc8334ce9dec2c49af5e21c1202/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5515, 1098, 12, 2890, 16, 7052, 13749, 4672, 3536, 1788, 279, 4764, 919, 5228, 364, 279, 4166, 434, 5515, 9813, 15725, 261, 31348, 13236, 9512, 1232, 5774, 2934, 3536, 1384, 273, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5515, 1098, 12, 2890, 16, 7052, 13749, 4672, 3536, 1788, 279, 4764, 919, 5228, 364, 279, 4166, 434, 5515, 9813, 15725, 261, 31348, 13236, 9512, 1232, 5774, 2934, 3536, 1384, 273, 365, 18, ...
setting_id = context and context.get('active_id', context.get('setting_id')) or False
setting_id = context and context.get('setting_id', context.get('active_id')) or False
def write(self, cr, uid, ids, vals, context=None): if context is None: context = {} setting_id = context and context.get('active_id', context.get('setting_id')) or False acc_obj = self.pool.get('hr.evaluation.values') crit_obj = self.pool.get('hr.evaluation.criteria') set_obj = self.pool.get('hr.evaluation.setting') for grid in self.browse(cr, uid, ids, context=context): rules = [] model_id = grid.id perms_rel = ['form_id', 'criteria_id', 'text_criteria', 'rating', 'employee_id'] for val in vals: if not setting_id or (not val.startswith('val_q_') and not val.startswith('rating_')): res = super(hr_evaluation_form, self).write(cr, uid, ids, {val: vals[val]}, context) continue #current_setting = set_obj.browse(cr, uid, setting_id) current_setting = set_obj.browse(cr, uid, grid.setting_id.id) for crit in current_setting.criteria_ids: data_new = {} rules = acc_obj.search(cr, uid, [('form_id', '=', grid.id), ('criteria_id', '=', crit.id)]) if not rules: data_new.update({ 'form_id': grid.id, 'employee_id': vals.get('employee_id'), 'val_question': vals.get('val_q_%d'%crit.id), 'rating': vals.get('rating_%d'%crit.id), 'criteria_id': crit.id}) rule_id = [acc_obj.create(cr, uid, data_new)] else: rules_br = acc_obj.browse(cr, uid, rules, context=context) for rule in rules_br: for val in vals: if 'rating_' == val[0:7]: if rule.criteria_id.id == int(val[7:]): data_new['rating'] = vals[val] acc_obj.write(cr, uid, [rule.id], data_new, context=context) elif 'val_q_' == val[0:6]: if rule.criteria_id.id == int(val[6:]): data_new['val_question'] = vals[val] acc_obj.write(cr, uid, [rule.id], data_new, context=context)
47d595f4e6005d000673a8388bf785d930dc81fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/47d595f4e6005d000673a8388bf785d930dc81fa/evaluation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 3637, 67, 350, 273, 819, 471, 819, 18, 588, 2668, 8920, 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, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 3637, 67, 350, 273, 819, 471, 819, 18, 588, 2668, 8920, 67, ...
print "Set with", request['environ']['paste.auth_tkt.set_user']
def do_process(self, request): """Handle the redirect from the OpenID server. """ oidconsumer = self.oidconsumer
7e89f5cbbada5d86ffc72de4fd2f46eacaa48278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/7e89f5cbbada5d86ffc72de4fd2f46eacaa48278/open_id.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2567, 12, 2890, 16, 590, 4672, 3536, 3259, 326, 3136, 628, 326, 25781, 1438, 18, 3536, 7764, 13230, 273, 365, 18, 839, 13230, 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, 0, 0, 0, 0, 0, 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, 741, 67, 2567, 12, 2890, 16, 590, 4672, 3536, 3259, 326, 3136, 628, 326, 25781, 1438, 18, 3536, 7764, 13230, 273, 365, 18, 839, 13230, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
SpecializedSetup<%(name)s, 0>();
SpecializedSetup<%(name)s, 0>(true);
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 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, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
db_added.sort_name.set("%s %04f" % (metadata.series, metadata.series_index))
db_added.sort_name.set("%s %s" % (metadata.series, series_index))
def _update_iTunes_metadata(self, metadata, db_added, lb_added, this_book): ''' ''' if DEBUG: self.log.info(" ITUNES._update_iTunes_metadata()")
0b1ac482a5e01cc3cfbd0d8c2ce57cd015499a7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/0b1ac482a5e01cc3cfbd0d8c2ce57cd015499a7d/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
return self.find_factor(n, B1=4+floor(B1/2), **kwds)
return self.find_factor(n, B1=4+floor(float(B1)/2), **kwds)
def find_factor(self, n, factor_digits=None, B1=2000, **kwds): """ Splits off a single factor of n. See ECM.factor() """ if not 'c' in kwds: kwds['c'] = 1000000000 if not 'I' in kwds: kwds['I'] = 1 if not factor_digits is None: B1 = self.recommended_B1(factor_digits); kwds['one'] = '' kwds['cofdec'] = '' self.__cmd = self._ECM__startup_cmd(B1, None, kwds) child = pexpect.spawn(self.__cmd)
d0b459e5a57c91eabccd257b526321e159fcbc64 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d0b459e5a57c91eabccd257b526321e159fcbc64/ecm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6812, 12, 2890, 16, 290, 16, 5578, 67, 16649, 33, 7036, 16, 605, 21, 33, 17172, 16, 2826, 25577, 4672, 3536, 5385, 87, 3397, 279, 2202, 5578, 434, 290, 18, 2164, 7773, 49, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6812, 12, 2890, 16, 290, 16, 5578, 67, 16649, 33, 7036, 16, 605, 21, 33, 17172, 16, 2826, 25577, 4672, 3536, 5385, 87, 3397, 279, 2202, 5578, 434, 290, 18, 2164, 7773, 49, ...
return [v.name for v in self.graph.getargs()]
return [LOCALVAR % v.name for v in self.graph.getargs()]
def argnames(self): return [v.name for v in self.graph.getargs()]
a489248c71cf1c040180bf5a68654706a1cd4aa2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/a489248c71cf1c040180bf5a68654706a1cd4aa2/funcgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 1973, 12, 2890, 4672, 327, 306, 90, 18, 529, 364, 331, 316, 365, 18, 4660, 18, 588, 1968, 1435, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 1973, 12, 2890, 4672, 327, 306, 90, 18, 529, 364, 331, 316, 365, 18, 4660, 18, 588, 1968, 1435, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
and input.character() == self.weight().chi()): return self(self._qsr(input.qexp(self.prec())))
and input.character().primitive_character() == self.weight().chi().primitive_character()): p = ZZ(self.prime()) nu = (input.level() == 1 and p/(p+1)) or (1 / (p + 1) * p**(2 - input.level().valuation(p))) if self.radius() > nu: raise ValueError, "Form is not overconvergent enough (form is only %s-overconvergent)" % nu else: return self(self._qsr(input.q_expansion(self.prec())))
def __call__(self, input): r""" Create an element of this space. Allowable inputs are:
c8cd75e98ec3124979cc2d0934a36c3cec53656f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/c8cd75e98ec3124979cc2d0934a36c3cec53656f/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if b in linkhuge_wordsizes: run_test(p, b, cmd, pre, desc) else: skip_test(p, b, cmd, pre, desc) def combine(a, b): """ Concatenate strings a and b with a space between only if needed. """ if len(b) != 0: return a + " " + b else: return a def elflink_test(cmd, pre=""):
if b in linkhuge_wordsizes: run_test(p, b, cmd, **env) else: skip_test(p, b, cmd, **env) def elflink_test(cmd, **env):
def do_elflink_test(cmd, pre="", desc=""): """ Run an elflink test case, skipping known-bad configurations. """ for p in pagesizes: for b in wordsizes_by_pagesize[p]: if b in linkhuge_wordsizes: run_test(p, b, cmd, pre, desc) else: skip_test(p, b, cmd, pre, desc)
637db55c57379f6e4c69d320ca16f9b05c873e3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3715/637db55c57379f6e4c69d320ca16f9b05c873e3f/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19079, 1232, 67, 3813, 12, 4172, 16, 675, 1546, 3113, 3044, 1546, 6, 4672, 3536, 1939, 392, 415, 74, 1232, 1842, 648, 16, 14195, 4846, 17, 8759, 10459, 18, 3536, 364, 293, 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, 741, 67, 19079, 1232, 67, 3813, 12, 4172, 16, 675, 1546, 3113, 3044, 1546, 6, 4672, 3536, 1939, 392, 415, 74, 1232, 1842, 648, 16, 14195, 4846, 17, 8759, 10459, 18, 3536, 364, 293, 316...
self.urls.set_child_text(self.url) self.load()
if self.file_column_callback(self.url) == "dir": self.urls.set_child_text(self.url) self.load() else: self._open([self.url])
def on_row_activated(self, treeview, data, col): path = self.list_table.get_selected_row_items(0)[0] if path == "..": path = self.url.split("/")[0:-1] self.url = "/".join(path) else: self.url = path
773c25364950fdd657498c3ca28d6ac1c52d9086 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/773c25364950fdd657498c3ca28d6ac1c52d9086/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 492, 67, 18836, 12, 2890, 16, 2151, 1945, 16, 501, 16, 645, 4672, 589, 273, 365, 18, 1098, 67, 2121, 18, 588, 67, 8109, 67, 492, 67, 3319, 12, 20, 25146, 20, 65, 309, 589,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 492, 67, 18836, 12, 2890, 16, 2151, 1945, 16, 501, 16, 645, 4672, 589, 273, 365, 18, 1098, 67, 2121, 18, 588, 67, 8109, 67, 492, 67, 3319, 12, 20, 25146, 20, 65, 309, 589,...
order=None, desc=0, group=None, groupdesc=0, verbose=0, limit=None):
order=None, desc=0, group=None, groupdesc=0, verbose=0, limit=None):
def __init__(self, env, report=None, constraints=None, cols=None, order=None, desc=0, group=None, groupdesc=0, verbose=0, limit=None): self.env = env self.id = report # if not None, it's the corresponding saved query self.constraints = constraints or {} self.order = order self.desc = desc self.group = group self.groupdesc = groupdesc self.limit = limit self.verbose = verbose self.fields = TicketSystem(self.env).get_ticket_fields() field_names = [f['name'] for f in self.fields] self.explicit_cols = [c for c in cols or [] if c in field_names] self.cols = [] # lazily initialized
d7bf122f16a1c677077f12aec282c8ccd306bee0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/d7bf122f16a1c677077f12aec282c8ccd306bee0/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1550, 16, 2605, 33, 7036, 16, 6237, 33, 7036, 16, 5347, 33, 7036, 16, 1353, 33, 7036, 16, 3044, 33, 20, 16, 1041, 33, 7036, 16, 1041, 5569, 33, 20, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1550, 16, 2605, 33, 7036, 16, 6237, 33, 7036, 16, 5347, 33, 7036, 16, 1353, 33, 7036, 16, 3044, 33, 20, 16, 1041, 33, 7036, 16, 1041, 5569, 33, 20, 1...
try: socket.getpeername(self) except socket_error as e: if e.errno != errno.ENOTCONN: raise self._sslobj = None else:
self._closed = False self._sslobj = None if connected:
def __init__(self, sock=None, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version=PROTOCOL_SSLv23, ca_certs=None, do_handshake_on_connect=True, family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None, suppress_ragged_eofs=True, ciphers=None):
f7389f38f01b99b617424d33f2aa73251416d857 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/f7389f38f01b99b617424d33f2aa73251416d857/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 33, 7036, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 16, 1438, 67, 5564, 33, 8381, 16, 3320, 67, 25782, 33, 22367, 67, 9826, 16, 5832, 67, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7313, 33, 7036, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 16, 1438, 67, 5564, 33, 8381, 16, 3320, 67, 25782, 33, 22367, 67, 9826, 16, 5832, 67, 158...
for name in backends[key].get_name(): self.assert_ (type(name) is str)
self.assert_ (type(backends[key].get_name()) is str)
def test_get_name(self): for key in sorted(backends): for name in backends[key].get_name(): self.assert_ (type(name) is str)
f118d902e540dae90c54f2a02de15e63d4d3cea2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/f118d902e540dae90c54f2a02de15e63d4d3cea2/CleanerBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 67, 529, 12, 2890, 4672, 364, 498, 316, 3115, 12, 823, 5839, 4672, 364, 508, 316, 18015, 63, 856, 8009, 588, 67, 529, 13332, 365, 18, 11231, 67, 261, 723, 12, 529, 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, 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, 588, 67, 529, 12, 2890, 4672, 364, 498, 316, 3115, 12, 823, 5839, 4672, 364, 508, 316, 18015, 63, 856, 8009, 588, 67, 529, 13332, 365, 18, 11231, 67, 261, 723, 12, 529, 13,...
icon2.set_info_simple("media-player", "12345", "media-player")
icon2.set_info("media-player", "1234", ["icon1", "icon2"], ["gnome-main-menu", "media-player"]) icon2.set_state("icon2")
def show_hide_tooltip(tooltip): if (tooltip.flags() & gtk.VISIBLE) == 0: tooltip.update_position() tooltip.show() else: tooltip.hide() return True # timer repeats
0f36df89110d7c2a411583773ad808d1541132c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/0f36df89110d7c2a411583773ad808d1541132c1/test-awn-tooltip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 11248, 67, 19798, 12, 19798, 4672, 309, 261, 19798, 18, 7133, 1435, 473, 22718, 18, 29588, 13, 422, 374, 30, 11915, 18, 2725, 67, 3276, 1435, 11915, 18, 4500, 1435, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 11248, 67, 19798, 12, 19798, 4672, 309, 261, 19798, 18, 7133, 1435, 473, 22718, 18, 29588, 13, 422, 374, 30, 11915, 18, 2725, 67, 3276, 1435, 11915, 18, 4500, 1435, 469, 30, ...
mydict = super(TaggableObject, self).ToDict()
mydict = super(Cluster, self).ToDict()
def ToDict(self): """Custom function for cluster.
b60ae2caf73e26977632ed6ebbcb76b5fa8c493e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/b60ae2caf73e26977632ed6ebbcb76b5fa8c493e/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2974, 5014, 12, 2890, 4672, 3536, 3802, 445, 364, 2855, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2974, 5014, 12, 2890, 4672, 3536, 3802, 445, 364, 2855, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
mode_dropdown.append([oai_set_m1,'selected',modes[oai_set_m1]])
mode_dropdown_m1 = [[oai_set_m1, 'selected', modes[oai_set_m1]]]
def input_form(oai_set_name, oai_set_spec, oai_set_collection, oai_set_description, oai_set_definition, oai_set_reclist, oai_set_p1, oai_set_f1,oai_set_m1, oai_set_p2, oai_set_f2,oai_set_m2, oai_set_p3, oai_set_f3, oai_set_m3, oai_set_op1, oai_set_op2, ln=CFG_SITE_LANG): """""" modes = { 'r' : 'Regular Expression', 'a' : 'All of the words', 'y' : 'Any of the words', 'e' : 'Exact phrase', 'p' : 'Partial phrase' } mode_dropdown = [['r','',modes['r']], ['e','',modes['e']], ['p','',modes['p']], ['a','',modes['a']], ['y','',modes['y']], ['','','']] operators = { 'a' : 'AND', 'o' : 'OR', 'n' : 'AND NOT', } mode_operators_1 = [['a','',operators['a']], ['o','',operators['o']], ['n','',operators['n']], ['a','','']] mode_operators_2 = [['a','',operators['a']], ['o','',operators['o']], ['n','',operators['n']], ['a','','']] text = "<br />" text += "<table><tr><td>" text += input_text(ln = CFG_SITE_LANG, title = "OAI Set spec:", name = "oai_set_spec", value = oai_set_spec) text += "</td></tr><tr><td>" text += input_text(ln = CFG_SITE_LANG, title = "OAI Set name:", name = "oai_set_name", value = oai_set_name) text += "</td></tr><tr><td>&nbsp;</td></tr><tr><td>"
7a8eb43801d63077912a0768faa8d315c74d8d58 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/7a8eb43801d63077912a0768faa8d315c74d8d58/oaiarchiveadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 67, 687, 12, 83, 10658, 67, 542, 67, 529, 16, 320, 10658, 67, 542, 67, 2793, 16, 320, 10658, 67, 542, 67, 5548, 16, 320, 10658, 67, 542, 67, 3384, 16, 320, 10658, 67, 542, 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, 810, 67, 687, 12, 83, 10658, 67, 542, 67, 529, 16, 320, 10658, 67, 542, 67, 2793, 16, 320, 10658, 67, 542, 67, 5548, 16, 320, 10658, 67, 542, 67, 3384, 16, 320, 10658, 67, 542, 67,...
def _getItem(self, item): gkeys = item._prop_map_get_.keys() pkeys = item._prop_map_put_.keys() print "\n [ ",
def _getItem(self, item, indent=0): try: gkeys = item._prop_map_get_.keys() pkeys = item._prop_map_put_.keys() except: print "[ a ms:weirdThing ] return print "\n", " "*indent, " [ ", need_semicolon = 0
def _getItem(self, item): gkeys = item._prop_map_get_.keys() pkeys = item._prop_map_put_.keys() print "\n [ ", for k in range(len(gkeys)): key = gkeys[k] _w = (key in pkeys) # Is this writable? if not _w : pass # print " # Read only:", key else: if key == "End": pass # Breakpoint me! @@ ;-) x = item.__getattr__(key) if x != "": print "%-32s %s" % (key, _toString(x)), if k < len(gkeys)-1: print ";\n ", print " . ]"
b41ab7370cca9e46bf680305b26be2cc912e6fc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/b41ab7370cca9e46bf680305b26be2cc912e6fc8/lookout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1180, 12, 2890, 16, 761, 16, 3504, 33, 20, 4672, 775, 30, 314, 2452, 273, 761, 6315, 5986, 67, 1458, 67, 588, 27799, 2452, 1435, 293, 2452, 273, 761, 6315, 5986, 67, 1458, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 1180, 12, 2890, 16, 761, 16, 3504, 33, 20, 4672, 775, 30, 314, 2452, 273, 761, 6315, 5986, 67, 1458, 67, 588, 27799, 2452, 1435, 293, 2452, 273, 761, 6315, 5986, 67, 1458, ...
done = 0 while not done:
while 1:
def run_pw (command, timeout=-1, withexitstatus=0, password=''): """This is just like pexpect.run(), but adds automatic password sending. This sits in a loop and waits for either 'password' or EOF. Whenever it sees 'password' it will send the given password and then go back to waiting. When it sees EOF it will return. """ if timeout == -1: child = spawn(command, maxread=2000) else: child = spawn(command, timeout=timeout, maxread=2000) done = 0 while not done: index = child.expect (['(?i)password', EOF]) if index == 1: done = 1 else: child.sendline(password) if withexitstatus: child.close() return (child.before, child.exitstatus) else: return child.before
279f29a5f4095210201b073a35f0a270f5e91698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/279f29a5f4095210201b073a35f0a270f5e91698/pexpect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 14921, 261, 3076, 16, 2021, 29711, 21, 16, 598, 8593, 2327, 33, 20, 16, 2201, 2218, 11, 4672, 3536, 2503, 353, 2537, 3007, 293, 12339, 18, 2681, 9334, 1496, 4831, 5859, 2201, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 67, 14921, 261, 3076, 16, 2021, 29711, 21, 16, 598, 8593, 2327, 33, 20, 16, 2201, 2218, 11, 4672, 3536, 2503, 353, 2537, 3007, 293, 12339, 18, 2681, 9334, 1496, 4831, 5859, 2201, ...
self._config.dicom_filenames[:] = lb.GetStrings()[:]
if self._config.dicom_filenames[:] == lb.GetStrings()[:]: return False else: self._config.dicom_filenames[:] = lb.GetStrings()[:] return True
def view_to_config(self): lb = self._view_frame.dicom_files_lb # just clear out the current list # and copy everything self._config.dicom_filenames[:] = lb.GetStrings()[:]
fd9d88561b145dd071322681fddf6a6e36b83e8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/fd9d88561b145dd071322681fddf6a6e36b83e8a/DICOMReader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 869, 67, 1425, 12, 2890, 4672, 7831, 273, 365, 6315, 1945, 67, 3789, 18, 15859, 362, 67, 2354, 67, 20404, 225, 468, 2537, 2424, 596, 326, 783, 666, 468, 471, 1610, 7756, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 869, 67, 1425, 12, 2890, 4672, 7831, 273, 365, 6315, 1945, 67, 3789, 18, 15859, 362, 67, 2354, 67, 20404, 225, 468, 2537, 2424, 596, 326, 783, 666, 468, 471, 1610, 7756, 365,...
if self.only_classes(rvalue_node, ('list',)):
if i < 2 and self.only_classes(rvalue_node, ('tuple2',)): sel = ['__getfirst__()', '__getsecond__()'][i] elif self.getfast(rvalue_node):
def get_selector(self, temp, item, i): rvalue_node = getgx().item_rvalue[item] sel = '__getitem__(%d)' % i if self.only_classes(rvalue_node, ('list',)): sel = '__getfast__(%d)' % i elif i < 2 and self.only_classes(rvalue_node, ('tuple2',)): sel = ['__getfirst__()', '__getsecond__()'][i] return '%s->%s' % (temp, sel)
2fe64b4573c97899a8c7e0d0697fc4a129f632f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6661/2fe64b4573c97899a8c7e0d0697fc4a129f632f1/cpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9663, 12, 2890, 16, 1906, 16, 761, 16, 277, 4672, 436, 1132, 67, 2159, 273, 336, 75, 92, 7675, 1726, 67, 86, 1132, 63, 1726, 65, 357, 273, 4940, 31571, 972, 9275, 72, 2506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9663, 12, 2890, 16, 1906, 16, 761, 16, 277, 4672, 436, 1132, 67, 2159, 273, 336, 75, 92, 7675, 1726, 67, 86, 1132, 63, 1726, 65, 357, 273, 4940, 31571, 972, 9275, 72, 2506, ...
for method in get_callables(class_): stub = test_stub(method, module, class_.__name__ ) stubs['%s.%s.%s' % names_of(module, class_, method) ] = stub for function in functions: fname = '%s.%s' % names_of(module, function) stub = test_stub(function, module) stubs[fname] = stub
stubs.update( make_stubs(get_callables(class_), module, class_) ) stubs.update(make_stubs(all_callables - classes, module))
def module_stubs(module): stubs = {} classes = get_callables(module, isclass, check_where_defined = 1) functions = get_callables(module, check_where_defined = 1) - classes for class_ in classes: for method in get_callables(class_): stub = test_stub(method, module, class_.__name__ ) stubs['%s.%s.%s' % names_of(module, class_, method) ] = stub for function in functions: fname = '%s.%s' % names_of(module, function) stub = test_stub(function, module) stubs[fname] = stub return stubs
2b6b7ca41174137cbb11abbffdb525dfaa8cc717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/2b6b7ca41174137cbb11abbffdb525dfaa8cc717/gen_stubs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 67, 31960, 12, 2978, 4672, 7168, 87, 273, 2618, 225, 3318, 273, 336, 67, 1991, 1538, 12, 2978, 16, 28209, 16, 866, 67, 6051, 67, 2178, 273, 404, 13, 4186, 273, 336, 67, 1991, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 67, 31960, 12, 2978, 4672, 7168, 87, 273, 2618, 225, 3318, 273, 336, 67, 1991, 1538, 12, 2978, 16, 28209, 16, 866, 67, 6051, 67, 2178, 273, 404, 13, 4186, 273, 336, 67, 1991, 1...
stats['away']['days'] = (stats['years'][stats['topyear']])/3.66 stats['home']['days'] = (366-stats['years'][stats['topyear']])/3.66
stats['away']['days'] = (stats['years'][stats['topyear']]['duration'])/3.66 stats['home']['days'] = (366-stats['years'][stats['topyear']]['duration'])/3.66
def build_stats(trip_list, traveller_info): # TODO break this apart and/or do similar things in subroutines # TODO build more year metadata stats = {'countries': {}, 'cities': {}, 'years': {}, 'home': { 'trips': 0, 'duration':0, }, 'away': { 'trips': 0, 'duration':0, }, 'future': 0, 'types': {}, 'ordered': {}, } home_country = traveller_info['home_city']['country'] for trip in trip_list: # skip if not a past trip if trip['status'] != "Past": if trip['status'] == "Ongoing": stats['current'] = trip['city']['name'] else: stats['future'] += 1 continue # how long (simple version...) # TODO never double count date duration = trip['finishdate'] - trip['startdate'] # build country data country = trip['city']['country'] display = country inline = country # special casing! if not country.find("United"): # TODO there's something wrong here... inline = "the "+country # TODO and this should be a hash anyway if not country.find("Hong Kong"): display = "Hong Kong" inline = "Hong Kong" # stuff info into the data structure if not country in stats['countries']: stats['countries'][country] = { 'duration': 0, 'trips': 0, 'display':display, 'inline':inline, 'code':trip['city']['country_code'], 'rgb':md5.new(country).hexdigest()[0:6]} stats['countries'][country]['duration'] += duration.days stats['countries'][country]['trips'] += 1 if not trip['return_transport_type'] in stats['types']: stats['types'][trip['return_transport_type']] = {'trips':0} stats['types'][trip['return_transport_type']]['trips'] += 0.5 if not trip['outgoing_transport_type'] in stats['types']: stats['types'][trip['outgoing_transport_type']] = {'trips':0} stats['types'][trip['outgoing_transport_type']]['trips'] += 0.5 if (country == home_country): stats['home']['trips'] += 1; stats['home']['duration'] += duration.days else: stats['away']['trips'] += 1; stats['away']['duration'] += duration.days # build city data city = trip['city']['name'] rgb = trip['city']['rgb'] if not city in stats['cities']: stats['cities'][city] = { 'duration': 0, 'trips': 0, 'rgb':rgb, 'country':country} stats['cities'][city]['duration'] += duration.days stats['cities'][city]['trips'] += 1 # build year data year = trip['startdate'].year if not year in stats['years']: stats['years'][year] = 0 if year == trip['finishdate'].year: stats['years'][year] += duration.days else: if trip['finishdate'].year - year == 1: # spans a single year boundary, and is therefore Sane # if there's *anyone* who has a trip spanning two, they can bloody # well write this themselves. Otherwise, assume they mean they're # living there now. Onwards... year_end = datetime(year, 12, 31) stats['years'][year] += (year_end-trip['startdate']).days year = trip['finishdate'].year year_start = datetime(year, 1, 1) if not year in stats['years']: stats['years'][year] = 0 stats['years'][year] += (trip['finishdate']-year_start).days # do we want to supply full-blown cross-cut stats? maybe later... # reorder final stats stats['ordered']['years'] = sorted(stats['years']) stats['ordered']['years'].reverse() stats['ordered']['types'] = sorted(stats['types'], lambda x, y: (int(stats['types'][y]['trips']))-(int(stats['types'][x]['trips']))) stats['ordered']['years_by_trip'] = sorted(stats['years'], lambda x, y: (stats['years'][y])-(stats['years'][x])) stats['ordered']['countries'] = sorted(stats['countries'], lambda x, y: (stats['countries'][y]['duration'])-(stats['countries'][x]['duration'])) stats['ordered']['cities'] = sorted(stats['cities'], lambda x, y: (stats['cities'][y]['duration'])-(stats['cities'][x]['duration'])) start = 160 stats['rgb'] = stats['countries'][stats['ordered']['countries'][0]]['rgb'] stats['rgb_start'] = "%x%x%x" % (start, start, start) # scale country stats for map (including colours) topcountry = stats['ordered']['countries'][0] topduration = stats['countries'][topcountry]['duration'] r = stats['rgb'][0:2]; g = stats['rgb'][2:4]; b = stats['rgb'][4:6] for country in stats['countries'].keys(): scaled = 100*stats['countries'][country]['duration']/topduration sr = (scaled*(int(r, 16)-start)/100)+start sg = (scaled*(int(g, 16)-start)/100)+start sb = (scaled*(int(b, 16)-start)/100)+start stats['countries'][country]['scaled'] = scaled stats['countries'][country]['rgb_scaled'] = "%x%x%x" % (sr, sg, sb) # scale transport types toptype = stats['ordered']['types'][0] toptrip = int(stats['types'][toptype]['trips']) for type in stats['types'].keys(): stats['types'][type]['scaled'] = 100*int(stats['types'][type]['trips'])/toptrip # scale days on trips stats['topyear'] = stats['ordered']['years_by_trip'][0] stats['away']['days'] = (stats['years'][stats['topyear']])/3.66 stats['home']['days'] = (366-stats['years'][stats['topyear']])/3.66 return stats
1c67bb5808334c681c6ba34ea3f5485a4f220770 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/1c67bb5808334c681c6ba34ea3f5485a4f220770/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 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, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 19...
"""This class is an asyncore.disptacher subclass. It creates a socket resulting from the connection to a remote user-port, dispatching it to DTPHandler.
"""This class is an asyncore.disptacher subclass. It creates a socket resulting from the connection to a remote user-port, dispatching it to DTPHandler.
def close(self): debug("PassiveDTP.close()") asyncore.dispatcher.close(self)
e1763c9db15d5d6d781646fb0678f3c70d95867a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/e1763c9db15d5d6d781646fb0678f3c70d95867a/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 1198, 2932, 6433, 688, 9081, 52, 18, 4412, 1435, 7923, 4326, 479, 18, 18495, 18, 4412, 12, 2890, 13, 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, 1746, 12, 2890, 4672, 1198, 2932, 6433, 688, 9081, 52, 18, 4412, 1435, 7923, 4326, 479, 18, 18495, 18, 4412, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
MAXSDK = {} MAXSDKCS = {}
def parseopts(args): global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,PPGAME global COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE longopts = [ "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","ppgame=","quiet","verbose", "complete","version=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--prefix"): PREFIX=value elif (option=="--compiler"): COMPILER=value elif (option=="--directx-sdk"): DIRECTXSDK=value elif (option=="--thirdparty"): THIRDPARTY=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--ppgame"): PPGAME=value elif (option=="--complete"): COMPLETE=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
49e4024ed3d68e09fca79a863ccb48b661f7050e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/49e4024ed3d68e09fca79a863ccb48b661f7050e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
def download(self, url, path):
def download(url, path):
def download(self, url, path): """ Download url and store it at path """ f = None g = None try: f = urllib.urlopen(url) g = open(path, 'wb') copyobj(f, g) finally: if f: f.close() if g: g.close()
86603d2facf8767a09b622a032e173fe518ddb13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11095/86603d2facf8767a09b622a032e173fe518ddb13/agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 718, 16, 589, 4672, 3536, 13059, 880, 471, 1707, 518, 622, 589, 3536, 284, 273, 599, 314, 273, 599, 775, 30, 284, 273, 11527, 18, 295, 18589, 12, 718, 13, 314, 273, 1696, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4224, 12, 718, 16, 589, 4672, 3536, 13059, 880, 471, 1707, 518, 622, 589, 3536, 284, 273, 599, 314, 273, 599, 775, 30, 284, 273, 11527, 18, 295, 18589, 12, 718, 13, 314, 273, 1696, 1...
env['LANG'] = 'C'
env['LC_ALL'] = 'C'
def test_undecodable_code(self): # Raise SkipTest() if sys.executable is not encodable to ascii test.support.workaroundIssue8611()
bbdca40f4241bd0560e2a0b447b5713a9e918ce9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/bbdca40f4241bd0560e2a0b447b5713a9e918ce9/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 323, 1559, 429, 67, 710, 12, 2890, 4672, 468, 20539, 6611, 4709, 1435, 309, 2589, 18, 17751, 353, 486, 17755, 429, 358, 11384, 1842, 18, 13261, 18, 1252, 12716, 12956, 529...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 323, 1559, 429, 67, 710, 12, 2890, 4672, 468, 20539, 6611, 4709, 1435, 309, 2589, 18, 17751, 353, 486, 17755, 429, 358, 11384, 1842, 18, 13261, 18, 1252, 12716, 12956, 529...
selected = id_boxes_adjust_points(image, up, down, line_up, line_down, x_var, iwidth)
selected = id_boxes_adjust_points(image, up, down, line_up, line_down, x_var, iwidth)
def id_boxes_adjust(image, corners_up, corners_down, line_up, line_down, x_var, iwidth): for i in range(0, len(corners_up)): up = corners_up[i] down = corners_down[i] selected = id_boxes_adjust_points(image, up, down, line_up, line_down, x_var, iwidth) if selected is not None: corners_up[i] = selected[0] corners_down[i] = selected[1] else: return False return True
861a96cd1a91667a006e7df9cbcff5900d5beea8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12267/861a96cd1a91667a006e7df9cbcff5900d5beea8/imageproc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 612, 67, 15918, 67, 13362, 12, 2730, 16, 18398, 67, 416, 16, 18398, 67, 2378, 16, 980, 67, 416, 16, 980, 67, 2378, 16, 619, 67, 1401, 16, 277, 2819, 4672, 364, 277, 316, 1048, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 612, 67, 15918, 67, 13362, 12, 2730, 16, 18398, 67, 416, 16, 18398, 67, 2378, 16, 980, 67, 416, 16, 980, 67, 2378, 16, 619, 67, 1401, 16, 277, 2819, 4672, 364, 277, 316, 1048, 12, ...
filetype = "sourcecode.c.cpp"
if file.filename[-2:] == '.c': filetype = "sourcecode.c.c" else: filetype = "sourcecode.cpp.cpp" elif isinstance(file, mak.sources.datasource): filetype = "sourcecode." elif isinstance(file, mak.sources.lexsource): filetype = "sourcecode.lex" elif isinstance(file, mak.sources.yaccsource): filetype = "sourcecode.yacc"
def pbxFileRefTree(self, tree, path=''): w = self.file.write for name,dir in tree.directories.iteritems(): self.pbxFileRefTree(dir, os.path.join(path, tree.prefix)) for file in tree.files: filename = os.path.join(path, tree.prefix, file.filename) if isinstance(file, mak.sources.hsource): filetype = "sourcecode.c.h" elif isinstance(file, mak.sources.cppsource): filetype = "sourcecode.c.cpp" else: filetype = "sourcecode.c.h" w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = %s;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = \"<group>\";\n\t};\n" % (file.id, filetype, os.path.split(filename)[1], filename))
a60ebba76722784f18efcbe8160429b6fe069496 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/a60ebba76722784f18efcbe8160429b6fe069496/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6386, 92, 812, 1957, 2471, 12, 2890, 16, 2151, 16, 589, 2218, 11, 4672, 341, 273, 365, 18, 768, 18, 2626, 364, 508, 16, 1214, 316, 2151, 18, 15121, 18, 2165, 3319, 13332, 365, 18, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6386, 92, 812, 1957, 2471, 12, 2890, 16, 2151, 16, 589, 2218, 11, 4672, 341, 273, 365, 18, 768, 18, 2626, 364, 508, 16, 1214, 316, 2151, 18, 15121, 18, 2165, 3319, 13332, 365, 18, 57...
obj = self.parse_mediaproperties(data)
obj = self._parse_mediaproperties(data)
def parse_objects(self, stream):
47877dfb08c6f43c07b0e458250fb48397a0d7e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5551/47877dfb08c6f43c07b0e458250fb48397a0d7e6/realmedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6911, 12, 2890, 16, 1407, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6911, 12, 2890, 16, 1407, 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,...
logStats = os.stat(self.logPath)
self.logStats = os.stat(self.logPath)
def isModified(self): """ Checks if the log file has been modified using os.stat(). """ try: logStats = os.stat(self.logPath) except OSError: self.logSys.error("Unable to get stat on "+self.logPath) sys.exit(-1) if self.lastModTime == logStats.st_mtime: return False else: self.logSys.debug(self.logPath+" has been modified") self.lastModTime = logStats.st_mtime return True
064ef28dc45fe8e09a8e3dd8833516dc9cfa9868 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12171/064ef28dc45fe8e09a8e3dd8833516dc9cfa9868/logreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22502, 12, 2890, 4672, 3536, 13074, 309, 326, 613, 585, 711, 2118, 4358, 1450, 1140, 18, 5642, 7675, 3536, 775, 30, 365, 18, 1330, 4195, 273, 1140, 18, 5642, 12, 2890, 18, 1330, 743, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22502, 12, 2890, 4672, 3536, 13074, 309, 326, 613, 585, 711, 2118, 4358, 1450, 1140, 18, 5642, 7675, 3536, 775, 30, 365, 18, 1330, 4195, 273, 1140, 18, 5642, 12, 2890, 18, 1330, 743, 1...
return self._parse_response(h.getfile())
return self.parse_response(h.getfile())
def request(self, host, handler, request_body, verbose=0): # issue XML-RPC request
717c083e8d78cf3814a496284c28748834f2bf91 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/717c083e8d78cf3814a496284c28748834f2bf91/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 5672, 3167, 17, 8087, 590, 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, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 5672, 3167, 17, 8087, 590, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
templateRegex = re.compile(r'\{\{ *([Tt]emplate:|[mM][sS][gG]:)?' + pattern + '\s*(?P<parameters>\|.+?)? *}}', re.DOTALL)
templateRegex = re.compile(r'\{\{ *([Tt]emplate:|[mM][sS][gG]:)?' + pattern + '\s*(?P<parameters>\|.+?|) *}}', re.DOTALL)
def run(self): """ Starts the robot's action. """ # regular expression to find the original template. # {{vfd}} does the same thing as {{Vfd}}, so both will be found. # The old syntax, {{msg:vfd}}, will also be found. # The group 'parameters' will either match the parameters, or an # empty string if there are none.
2d19eaac22e3b2562aae3ff9af9a7fe3897930c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/2d19eaac22e3b2562aae3ff9af9a7fe3897930c0/template.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 30620, 326, 14386, 1807, 1301, 18, 3536, 468, 6736, 2652, 358, 1104, 326, 2282, 1542, 18, 468, 10179, 90, 8313, 9090, 1552, 326, 1967, 7757, 487, 10179, 58, 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, 1086, 12, 2890, 4672, 3536, 30620, 326, 14386, 1807, 1301, 18, 3536, 468, 6736, 2652, 358, 1104, 326, 2282, 1542, 18, 468, 10179, 90, 8313, 9090, 1552, 326, 1967, 7757, 487, 10179, 58, 8...
return True
if bug_downloaded: return True else: return False return False
def FetchBugsDebian(self, PackageName, Filename=None): try: import debianbts except ImportError: return False if Filename != None: try: file_handle = open(Filename, 'a') except IOError: sys.exit(1) (num_of_bugs, header, self.bugs_list) = debianbts.get_reports(PackageName) if num_of_bugs: for x in self.bugs_list: (sub_bugs_header, sub_bugs_list) = x for BugType in self.bugTypes: if BugType in sub_bugs_header: bug_flag = 0 break bug_flag = 1 if bug_flag: bug_downloaded = True for x in sub_bugs_list: break_bugs = x.split(':') bug_num = string.lstrip(break_bugs[0], '#') data = debianbts.get_report(bug_num, followups=True) if Filename == None: self.fileName = PackageName + "." + bug_num file_handle = open(self.fileName, 'w') else: file_handle = open(Filename, 'a') file_handle.write(data[0] + "\n\n") for x in data[1]: file_handle.write(x) file_handle.write("\n") file_handle.write("\n" * 3) file_handle.flush() file_handle.close() if self.lock: self.AddToArchive(self.ArchiveFile) return True
43ad714260de26301e9353209005b0a6d420abe3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12499/43ad714260de26301e9353209005b0a6d420abe3/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 31559, 758, 70, 2779, 12, 2890, 16, 7508, 461, 16, 16671, 33, 7036, 4672, 225, 775, 30, 1930, 18202, 2779, 70, 3428, 1335, 11308, 30, 327, 1083, 225, 309, 16671, 480, 599, 30, 77...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8065, 31559, 758, 70, 2779, 12, 2890, 16, 7508, 461, 16, 16671, 33, 7036, 4672, 225, 775, 30, 1930, 18202, 2779, 70, 3428, 1335, 11308, 30, 327, 1083, 225, 309, 16671, 480, 599, 30, 77...
print "URL error: %s / %s" % (url, arg)
error("URL error: %s / %s" % (url, arg))
def __init__(self, url): """ """
df982418feb2fee96037cb0fe13fcf2215c639bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/df982418feb2fee96037cb0fe13fcf2215c639bd/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 880, 4672, 3536, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 880, 4672, 3536, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self.dec.get_state() == flac.decoder.FLAC__FILE_DECODER_END_OF_FILE:
if self.dec.get_state() ==flac.decoder.FLAC__FILE_DECODER_END_OF_FILE:
def next(self): if self.stopped: raise StopIteration if self.dec.get_state() == flac.decoder.FLAC__FILE_DECODER_END_OF_FILE: self.dec.finish() raise StopIteration if not self.dec.process_single(): self.dec.finish() raise StopIteration pos = self.dec.get_decode_position() return int(self.length * (float(pos) / self._size))
9d329de988483a368dbddc7dd4c323659bd4465b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/9d329de988483a368dbddc7dd4c323659bd4465b/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 309, 365, 18, 24228, 30, 1002, 16179, 309, 365, 18, 4924, 18, 588, 67, 2019, 1435, 422, 2242, 1077, 18, 21070, 18, 19054, 2226, 972, 3776, 67, 1639, 9086, 654, 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, 1024, 12, 2890, 4672, 309, 365, 18, 24228, 30, 1002, 16179, 309, 365, 18, 4924, 18, 588, 67, 2019, 1435, 422, 2242, 1077, 18, 21070, 18, 19054, 2226, 972, 3776, 67, 1639, 9086, 654, 67...
if vals['state']:
if 'state' in vals and vals['state']:
def write(self, cr, uid, ids, vals, context=None): if 'default_bank' in vals and vals['default_bank'] == True: partner_bank = self.pool.get('res.partner.bank').browse(cr, uid, ids)[0] partner_id = partner_bank.partner_id.id if vals['state']: state = vals['state'] else: state = partner_bank.state sql = "UPDATE res_partner_bank SET default_bank='0' WHERE partner_id=%i AND default_bank='1' AND state='%s' AND id<>%i" % (partner_id, state, ids[0]) cr.execute(sql) return super(res_partner_bank, self).write(cr, uid, ids, vals, context=context)
6645b0fd328b27609c10f43a98d1c00193addc6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9833/6645b0fd328b27609c10f43a98d1c00193addc6e/payment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 296, 1886, 67, 10546, 11, 316, 5773, 471, 5773, 3292, 1886, 67, 10546, 3546, 422, 1053, 30, 19170,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 296, 1886, 67, 10546, 11, 316, 5773, 471, 5773, 3292, 1886, 67, 10546, 3546, 422, 1053, 30, 19170,...
def wrapped_fn(*args, **kargs): wrapped_fn.cache = self return self.fetch(fn, *args, **kargs) return wrapped_fn
self.cache.fn = fn return self.cache
def wrapped_fn(*args, **kargs): wrapped_fn.cache = self return self.fetch(fn, *args, **kargs)
2355828a58c7929e11ae58a88a6ffb902ba065ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6604/2355828a58c7929e11ae58a88a6ffb902ba065ba/cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5805, 67, 4293, 30857, 1968, 16, 2826, 79, 1968, 4672, 5805, 67, 4293, 18, 2493, 225, 273, 365, 327, 365, 18, 5754, 12, 4293, 16, 380, 1968, 16, 2826, 79, 1968, 13, 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, 1, 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, 5805, 67, 4293, 30857, 1968, 16, 2826, 79, 1968, 4672, 5805, 67, 4293, 18, 2493, 225, 273, 365, 327, 365, 18, 5754, 12, 4293, 16, 380, 1968, 16, 2826, 79, 1968, 13, 2, -100, -100, -1...
env["INSTANCE_NIC%d_HWADDR" % idx] = mac
env["INSTANCE_NIC%d_MAC" % idx] = mac
def _BuildInstanceHookEnv(name, primary_node, secondary_nodes, os_type, status, memory, vcpus, nics): """Builds instance related env variables for hooks This builds the hook environment from individual variables. @type name: string @param name: the name of the instance @type primary_node: string @param primary_node: the name of the instance's primary node @type secondary_nodes: list @param secondary_nodes: list of secondary nodes as strings @type os_type: string @param os_type: the name of the instance's OS @type status: boolean @param status: the should_run status of the instance @type memory: string @param memory: the memory size of the instance @type vcpus: string @param vcpus: the count of VCPUs the instance has @type nics: list @param nics: list of tuples (ip, bridge, mac) representing the NICs the instance has @rtype: dict @return: the hook environment for this instance """ if status: str_status = "up" else: str_status = "down" env = { "OP_TARGET": name, "INSTANCE_NAME": name, "INSTANCE_PRIMARY": primary_node, "INSTANCE_SECONDARIES": " ".join(secondary_nodes), "INSTANCE_OS_TYPE": os_type, "INSTANCE_STATUS": str_status, "INSTANCE_MEMORY": memory, "INSTANCE_VCPUS": vcpus, } if nics: nic_count = len(nics) for idx, (ip, bridge, mac) in enumerate(nics): if ip is None: ip = "" env["INSTANCE_NIC%d_IP" % idx] = ip env["INSTANCE_NIC%d_BRIDGE" % idx] = bridge env["INSTANCE_NIC%d_HWADDR" % idx] = mac else: nic_count = 0 env["INSTANCE_NIC_COUNT"] = nic_count return env
2c2690c9ea4e5b51fb878a325f9b0046370e23b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/2c2690c9ea4e5b51fb878a325f9b0046370e23b4/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3116, 1442, 5394, 3491, 12, 529, 16, 3354, 67, 2159, 16, 9946, 67, 4690, 16, 1140, 67, 723, 16, 1267, 16, 3778, 16, 331, 20696, 16, 290, 2102, 4672, 3536, 7746, 791, 3746, 1550, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3116, 1442, 5394, 3491, 12, 529, 16, 3354, 67, 2159, 16, 9946, 67, 4690, 16, 1140, 67, 723, 16, 1267, 16, 3778, 16, 331, 20696, 16, 290, 2102, 4672, 3536, 7746, 791, 3746, 1550, ...
if term == "linux":
if term == "linux" or "":
def find_term(self): term = os.getenv("TERM") if term == "linux": if which("gconftool-2"): term = Popen(["gconftool-2", "-g", "/desktop/gnome/applications/terminal/exec"], stdout=PIPE).communicate()[0].strip() else: term = 'xterm' else: if term == "rxvt" and not which(term): term = "urxvt" return term
9fe5890023db219b21a1acc9464cdacb949fc54e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6497/9fe5890023db219b21a1acc9464cdacb949fc54e/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6408, 12, 2890, 4672, 2481, 273, 1140, 18, 588, 3074, 2932, 15176, 7923, 309, 2481, 422, 315, 20132, 6, 578, 1408, 30, 309, 1492, 2932, 75, 3923, 6738, 17, 22, 6, 4672, 2481,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6408, 12, 2890, 4672, 2481, 273, 1140, 18, 588, 3074, 2932, 15176, 7923, 309, 2481, 422, 315, 20132, 6, 578, 1408, 30, 309, 1492, 2932, 75, 3923, 6738, 17, 22, 6, 4672, 2481,...
} double getClock() { long sec; double secx; struct tms realbuf; times(&realbuf); secx = ( realbuf.tms_stime + realbuf.tms_utime ) / (float) CLOCKS_PER_SEC; return ((double) secx);
#ifdef __APPLE__
8244749441a2eaaf348e0a4cdf1aab008c28d867 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8417/8244749441a2eaaf348e0a4cdf1aab008c28d867/skeleton_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 1001, 7215, 900, 972, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 1001, 7215, 900, 972, 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...
Rot.__init__(this, axis = axis, angle = math.pi) class Refl(Transform):
Rot3.__init__(this, axis = axis, angle = math.pi) class Refl3(Transform3):
def __init__(this, axis): Rot.__init__(this, axis = axis, angle = math.pi)
01766ba4dd04bc77b0640dd736c36fcde5c8bc17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14814/01766ba4dd04bc77b0640dd736c36fcde5c8bc17/GeomTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2211, 16, 2654, 4672, 15697, 16186, 2738, 972, 12, 2211, 16, 2654, 273, 2654, 16, 5291, 273, 4233, 18, 7259, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2211, 16, 2654, 4672, 15697, 16186, 2738, 972, 12, 2211, 16, 2654, 273, 2654, 16, 5291, 273, 4233, 18, 7259, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
for d in range(ndays): ns_day = {} params = '%sdate=%s&timetable=%s'\ % (base_param, Date.encode(day), index) ns_day['url'] = '%s%s' % (base_url, params) ns_day['events'] = self.get_events(day, method, timetable, resource_name=resource_name, show_conflicts=show_conflicts) ns_days.append(ns_day)
for d in range(7): if d < ndays: ns_day = {} params = '%sdate=%s&timetable=%s'\ % (base_param, Date.encode(day), index) ns_day['url'] = '%s%s' % (base_url, params) ns_day['events'] = self.get_events(day, method, timetable, resource_name=resource_name, show_conflicts=show_conflicts) ns_days.append(ns_day)
def get_timetables_ns(self, start, method='weekly_view', resource_name=None, ndays=7, show_conflicts=False): ns = [] # Initialize url and parameters base_url = ';edit_event_form?' if resource_name: base_url = '%s/;edit_event_form?' % resource_name base_param = '' if method: base_param = '&method=%s&' % method # Get timetables timetables = self.get_timetables() # For each defined timetable for index, timetable in enumerate(timetables): tt_start, tt_end = timetable['start'], timetable['end'] day = start ns_timetable = {} ns_timetable['timetable'] = Time.encode(tt_start, False) + ' - ' +\ Time.encode(tt_end, False) # ndays days ns_days = [] for d in range(ndays): ns_day = {} params = '%sdate=%s&timetable=%s'\ % (base_param, Date.encode(day), index) ns_day['url'] = '%s%s' % (base_url, params) ns_day['events'] = self.get_events(day, method, timetable, resource_name=resource_name, show_conflicts=show_conflicts) ns_days.append(ns_day) day = day + timedelta(1) ns_timetable['days'] = ns_days ns.append(ns_timetable) return ns
8b3d80dd13cc1911cfe173d373417817ba1798b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/8b3d80dd13cc1911cfe173d373417817ba1798b4/ical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8584, 278, 1538, 67, 2387, 12, 2890, 16, 787, 16, 707, 2218, 10741, 715, 67, 1945, 2187, 1058, 67, 529, 33, 7036, 16, 290, 9810, 33, 27, 16, 2405, 67, 20340, 87, 33, 8381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8584, 278, 1538, 67, 2387, 12, 2890, 16, 787, 16, 707, 2218, 10741, 715, 67, 1945, 2187, 1058, 67, 529, 33, 7036, 16, 290, 9810, 33, 27, 16, 2405, 67, 20340, 87, 33, 8381, ...
txtfile = os.path.join(mm_cfg.PREFIX, 'archives/private',
txtfile = os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR,
def html_TOC_entry(self, arch): # Check to see if the archive is gzip'd or not txtfile = os.path.join(mm_cfg.PREFIX, 'archives/private', self.maillist.internal_name(), arch + '.txt') gzfile = txtfile + '.gz' templ = '<td><A href="%(url)s">[ %(fmt)sText%(sz)s]</a></td>' # which exists? .txt.gz first, then .txt if os.path.exists(gzfile): file = gzfile url = arch + '.txt.gz' fmt = "Gzip'd " elif os.path.exists(txtfile): file = txtfile url = arch + '.txt' fmt = '' else: # neither found? file = None # in Python 1.5.2 we have an easy way to get the size if file: try: size = os.path.getsize(file) except AttributeError: # getsize() probably does this anyway ;-) size = os.stat(file)[6] if size < 1000: sz = ' %d bytes ' % size elif size < 1000000: sz = ' %d KB ' % (size / 1000) else: sz = ' %d MB ' % (size / 1000000) # GB?? :-) textlink = templ % {'url': url, 'fmt': fmt, 'sz' : sz} else: # there's no archive file at all... hmmm. textlink = '' return self.TOC_entry_tmpl % { 'archive': arch, 'textlink': textlink }
36306c89df51b3f471815325986e1b3d9b5cd9a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/36306c89df51b3f471815325986e1b3d9b5cd9a1/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 4296, 39, 67, 4099, 12, 2890, 16, 6637, 4672, 468, 2073, 358, 2621, 309, 326, 5052, 353, 10331, 14271, 578, 486, 6463, 768, 273, 1140, 18, 803, 18, 5701, 12, 7020, 67, 7066, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1729, 67, 4296, 39, 67, 4099, 12, 2890, 16, 6637, 4672, 468, 2073, 358, 2621, 309, 326, 5052, 353, 10331, 14271, 578, 486, 6463, 768, 273, 1140, 18, 803, 18, 5701, 12, 7020, 67, 7066, ...
if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None
def retry_http_basic_auth(self, host, req, realm): if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None user,pw = self.passwd.find_user_password(realm, host) if pw: raw = "%s:%s" % (user, pw) auth = base64.encodestring(raw).strip() req.add_header(self.header, 'Basic %s' % auth) resp = self.parent.open(req) self.__current_realm = None return resp else: self.__current_realm = None return None
479d224bbcd6d456b2b35514bc272be9a92e5143 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/479d224bbcd6d456b2b35514bc272be9a92e5143/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 2505, 67, 13240, 67, 1944, 12, 2890, 16, 1479, 16, 1111, 16, 11319, 4672, 729, 16, 14921, 273, 365, 18, 24002, 18, 4720, 67, 1355, 67, 3664, 12, 24056, 16, 1479, 13, 309, 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, 3300, 67, 2505, 67, 13240, 67, 1944, 12, 2890, 16, 1479, 16, 1111, 16, 11319, 4672, 729, 16, 14921, 273, 365, 18, 24002, 18, 4720, 67, 1355, 67, 3664, 12, 24056, 16, 1479, 13, 309, 8...
defFormat = "%.1f",
defFormat = "%0.1f",
def createStdWdg(self): """Create the standard widgets. """ sr = self.sr self.starPosWdgSet = [] for ii in range(2): letter = ("X", "Y")[ii] wdgLabel = "Star Pos %s" % (letter,) starPosWdg = RO.Wdg.FloatEntry( master = sr.master, minValue = 0, maxValue = 5000, helpText = "Star %s position on full frame" % (letter,), helpURL = self.helpURL, ) if self.canSetStarPos: self.gr.gridWdg(wdgLabel, starPosWdg, "pix") self.starPosWdgSet.append((starPosWdg, wdgLabel)) self.expTimeWdg = RO.Wdg.FloatEntry( sr.master, minValue = self.guideModel.gcamInfo.minExpTime, maxValue = self.guideModel.gcamInfo.maxExpTime, defValue = self.guideModel.gcamInfo.defExpTime, defFormat = "%.1f", defMenu = "Default", minMenu = "Minimum", helpText = "Exposure time", helpURL = self.helpURL, ) self.gr.gridWdg("Exposure Time", self.expTimeWdg, "sec") self.centroidRadWdg = RO.Wdg.IntEntry( master = sr.master, minValue = 5, maxValue = 1024, defValue = self.defRadius, defMenu = "Default", helpText = "Centroid radius; don't skimp", helpURL = self.helpURL, ) self.gr.gridWdg("Centroid Radius", self.centroidRadWdg, "arcsec", sticky="ew")
bdc20e03649e5a498573c69cad551b250ac0bc28 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6236/bdc20e03649e5a498573c69cad551b250ac0bc28/BaseFocusScript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 10436, 59, 72, 75, 12, 2890, 4672, 3536, 1684, 326, 4529, 10965, 18, 3536, 9133, 273, 365, 18, 11254, 365, 18, 10983, 1616, 59, 72, 75, 694, 273, 5378, 364, 6072, 316, 1048, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 10436, 59, 72, 75, 12, 2890, 4672, 3536, 1684, 326, 4529, 10965, 18, 3536, 9133, 273, 365, 18, 11254, 365, 18, 10983, 1616, 59, 72, 75, 694, 273, 5378, 364, 6072, 316, 1048, 12, ...
retval += "%s %s\n" % (fn.name, f.value) return retval
s += "%s %s\n" % (fn.name, f.value) return s
def __str__(self): """Walk the entire packet and pretty print the values of the fields.""" s = self._descr[self.type] + "\n" for fn in self._layout: f = self._fieldnames[fn.name] if fn.name == "flags": bs = bsprintf(f.value, self._flagbits) retval += "%s %s\n" % (fn.name, bs) else: retval += "%s %s\n" % (fn.name, f.value) return retval
c3cf37b524efe354edc9f034e3cd8e40ce910d6f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/c3cf37b524efe354edc9f034e3cd8e40ce910d6f/bsdrtmsg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3536, 9463, 326, 7278, 4414, 471, 7517, 1172, 326, 924, 434, 326, 1466, 12123, 272, 273, 365, 6315, 28313, 63, 2890, 18, 723, 65, 397, 1548, 82, 6, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 2890, 4672, 3536, 9463, 326, 7278, 4414, 471, 7517, 1172, 326, 924, 434, 326, 1466, 12123, 272, 273, 365, 6315, 28313, 63, 2890, 18, 723, 65, 397, 1548, 82, 6, 364,...
yield '<h2>Build log:</h2>'
yield '<h2>Build log:</h2>\n'
def view_build(myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" # ensure the params are valid before using them assert host in hosts, "unknown host %s" % host assert compiler in compilers, "unknown compiler %s" % compiler assert tree in trees, "not a build tree %s" % tree uname = "" cflags = "" config = "" build = db.get_build(tree, host, compiler, rev) age_mtime = build.age_mtime() (revision, revision_time) = build.revision_details() status = build_status(myself, tree, host, compiler, rev) if rev: assert re.match("^[0-9a-fA-F]*$", rev) log = build.read_log() err = build.read_err() if log: log = cgi.escape(log) m = re.search("(.*)", log) if m: uname = m.group(1) m = re.search("CFLAGS=(.*)", log) if m: cflags = m.group(1) m = re.search("configure options: (.*)", log) if m: config = m.group(1) if err: err = cgi.escape(err) yield '<h2>Host information:</h2>' host_web_file = "../web/%s.html" % host if os.path.exists(host_web_file): yield util.FileLoad(host_web_file) yield "<table class='real'>" yield "<tr><td>Host:</td><td><a href='%s?function=View+Host;host=%s;tree=%s;"\ "compiler=%s#'>%s</a> - %s</td></tr>" % (myself, host, tree, compiler, host, hosts[host]) yield "<tr><td>Uname:</td><td>%s</td></tr>" % uname yield "<tr><td>Tree:</td><td>%s</td></tr>" % tree_link(myself, tree) yield "<tr><td>Build Revision:</td><td>%s</td></tr>" % revision_link(myself, revision, tree) yield "<tr><td>Build age:</td><td><div class='age'>%s</div></td></tr>" % red_age(age_mtime) yield "<tr><td>Status:</td><td>%s</td></tr>" % status yield "<tr><td>Compiler:</td><td>%s</td></tr>" % compiler yield "<tr><td>CFLAGS:</td><td>%s</td></tr>" % cflags yield "<tr><td>configure options:</td><td>%s</td></tr>" % config yield "".join(show_oldrevs(myself, tree, host, compiler)) # check the head of the output for our magic string rev_var = "" if rev: rev_var = ";revision=%s" % rev yield "<div id='log'>" if not plain_logs: yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s"\ ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript,"\ " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var) yield "<div id='actionList'>" # These can be pretty wide -- perhaps we need to # allow them to wrap in some way? if err == "": yield "<h2>No error log available</h2>" else: yield "<h2>Error log:</h2>" yield make_collapsible_html('action', "Error Output", "\n%s" % err, "stderr-0") if log == "": yield "<h2>No build log available</h2>" else: yield "<h2>Build log:</h2>" yield print_log_pretty(log) yield "<p><small>Some of the above icons derived from the <a href='http://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>" yield "</div>" else: yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s;"\ "compiler=%s%s' title='Switch to colourful, javascript-enabled, styled"\ " view'>Enhanced View</a></p>" % (myself, host, tree, compiler, rev_var) if err == "": yield "<h2>No error log available</h2>" else: yield '<h2>Error log:</h2>' yield '<div id="errorLog"><pre>%s</pre></div>' % err if log == "": yield '<h2>No build log available</h2>' else: yield '<h2>Build log:</h2>' yield '<div id="buildLog"><pre>%s</pre></div>' % log yield '</div>'
aded61733b040c3e2918f7cb5990b12cebe2244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/aded61733b040c3e2918f7cb5990b12cebe2244e/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 3510, 12, 4811, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 468, 3387, 326, 859, 854, 923, 186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1476, 67, 3510, 12, 4811, 2890, 16, 2151, 16, 1479, 16, 5274, 16, 5588, 16, 7351, 67, 10011, 33, 8381, 4672, 3536, 1945, 1245, 1361, 316, 7664, 8395, 468, 3387, 326, 859, 854, 923, 186...
os.lseek(fd, size, os.SEEK_SET)
os.lseek(fd, size, 0)
def testBigZip(self): """Verify that we can download a 1GB file.
7ef629f84fed4060c4fe83ea85a04df42c7c1079 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/7ef629f84fed4060c4fe83ea85a04df42c7c1079/downloads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9901, 9141, 12, 2890, 4672, 3536, 8097, 716, 732, 848, 4224, 279, 404, 5887, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 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, 1842, 9901, 9141, 12, 2890, 4672, 3536, 8097, 716, 732, 848, 4224, 279, 404, 5887, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
rsp['reply']['related_hrefs']['screenshot-comments']
rsp['reply']['child_hrefs']['screenshot-comments']
def test_post_reply_with_screenshot_comment(self): """Testing the POST reviewrequests/<id>/reviews/<id>/replies/<id>/screenshot-comments/ API""" comment_text = "My Comment Text" x, y, w, h = 10, 10, 20, 20
b914ddb694ddf4f2780c426b866d95b9f8cb38b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/b914ddb694ddf4f2780c426b866d95b9f8cb38b6/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2767, 67, 10629, 67, 1918, 67, 29435, 67, 3469, 12, 2890, 4672, 3536, 22218, 326, 5485, 10725, 11420, 28177, 350, 16893, 266, 7061, 28177, 350, 16893, 266, 5259, 28177, 350, 1689...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2767, 67, 10629, 67, 1918, 67, 29435, 67, 3469, 12, 2890, 4672, 3536, 22218, 326, 5485, 10725, 11420, 28177, 350, 16893, 266, 7061, 28177, 350, 16893, 266, 5259, 28177, 350, 1689...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 268) else quickfix.IntField.__init__(self, 268, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 9470, 13, 469, 30, 9549, 904, 18, 1702, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 9470, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 273...
Intercepts a response with a particular status code and returns the
Intercepts a response with a particular status code and returns the
def forward(app, codes): """ Intercepts a response with a particular status code and returns the content from a specified URL instead. The arguments are: ``app`` The WSGI application or middleware chain. ``codes`` A dictionary of integer status codes and the URL to be displayed if the response uses that code. For example, you might want to create a static file to display a "File Not Found" message at the URL ``/error404.html`` and then use ``forward`` middleware to catch all 404 status codes and display the page you created. In this example ``app`` is your exisiting WSGI applicaiton:: from paste.errordocument import forward app = forward(app, codes={404:'/error404.html'}) """ for code in codes: if not isinstance(code, int): raise TypeError('All status codes should be type int. ' '%s is not valid'%repr(code)) def error_codes_mapper(code, message, environ, global_conf, codes): if codes.has_key(code): return codes[code] else: return None #return _StatusBasedRedirect(app, error_codes_mapper, codes=codes) return RecursiveMiddleware( StatusBasedForward( app, error_codes_mapper, codes=codes, ) )
15e51654e469e87a6974e46969e8ec1295937f96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11400/15e51654e469e87a6974e46969e8ec1295937f96/errordocument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5104, 12, 2910, 16, 6198, 4672, 3536, 5294, 956, 87, 279, 766, 598, 279, 6826, 1267, 981, 471, 1135, 326, 913, 628, 279, 1269, 1976, 3560, 18, 225, 1021, 1775, 854, 30, 225, 12176, 291...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5104, 12, 2910, 16, 6198, 4672, 3536, 5294, 956, 87, 279, 766, 598, 279, 6826, 1267, 981, 471, 1135, 326, 913, 628, 279, 1269, 1976, 3560, 18, 225, 1021, 1775, 854, 30, 225, 12176, 291...
def send_to (self, data, addr, flags=0):
def send_to(self, data, addr, flags=0):
def send_to (self, data, addr, flags=0): self._checkClosed() if self._sslobj: raise ValueError("send_to not allowed on instances of %s" % self.__class__) else: return socket.send_to(self, data, addr, flags)
e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 12, 2890, 16, 501, 16, 3091, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 4661, 67, 869, 486, 2935, 603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 67, 869, 12, 2890, 16, 501, 16, 3091, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 4661, 67, 869, 486, 2935, 603, ...
PROXYREQ_PROXY = 1 PROXYREQ_REVERSE = 2
PROXYREQ_PROXY = 1 PROXYREQ_REVERSE = 2
def init(): """ This function is called by the server at startup time """ return CallBack()
3de9a0d15ba9eb7275476985ecfc3381876d7703 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/3de9a0d15ba9eb7275476985ecfc3381876d7703/apache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 13332, 3536, 1220, 445, 353, 2566, 635, 326, 1438, 622, 11850, 813, 3536, 225, 327, 3049, 2711, 1435, 225, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1208, 13332, 3536, 1220, 445, 353, 2566, 635, 326, 1438, 622, 11850, 813, 3536, 225, 327, 3049, 2711, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""testutils - test_web_page_content() and expected_link argument"""
"""testutils - test_web_page_content() and expected_link argument"""
def test_twpc_expected_link_arg(self): """testutils - test_web_page_content() and expected_link argument""" # should find link to ALEPH: self.assertEqual([], test_web_page_content(weburl, expected_link_target=weburl+"/collection/ALEPH")) # should find link entitled ISOLDE: self.assertEqual([], test_web_page_content(weburl, expected_link_label="ISOLDE")) # should find link to ISOLDE entitled ISOLDE: self.assertEqual([], test_web_page_content("http://localhost/", expected_link_target=weburl+"/collection/ISOLDE", expected_link_label="ISOLDE")) # should not find link to ALEPH entitled ISOLDE: errmsgs = test_web_page_content(weburl, expected_link_target=weburl+"/collection/ALEPH", expected_link_label="ISOLDE") if errmsgs[0].find(" does not contain link to ") > -1: pass else: self.fail("Should not find link to ALEPH entitled ISOLDE.") return
ddd7dce5e471b3d5a9995e0154f6f1472e17bb31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1634/ddd7dce5e471b3d5a9995e0154f6f1472e17bb31/testutils_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11246, 2436, 67, 3825, 67, 1232, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2665, 67, 1232, 1237, 8395, 468, 1410, 1104, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11246, 2436, 67, 3825, 67, 1232, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2665, 67, 1232, 1237, 8395, 468, 1410, 1104, ...
def open_message(*e):
def open_message(e=None):
def open_message(*e): global viewer sel = scanbox.curselection() if len(sel) != 1: if len(sel) > 1: msg = "Please open one message at a time" else: msg = "Please select a message to open" dialog(root, "Can't Open Message", msg, "", 0, "OK") return cursor = scanbox['cursor'] scanbox['cursor'] = 'watch' tk.call('update', 'idletasks') i = sel[0] line = scanbox.get(i) if scanparser.match(line) >= 0: num = string.atoi(scanparser.group(1)) m = mhf.openmessage(num) if viewer: viewer.destroy() from MimeViewer import MimeViewer viewer = MimeViewer(bot, '+%s/%d' % (folder, num), m) viewer.pack() viewer.show() scanbox['cursor'] = cursor
f8442295cc823189215e9c74aac6b19c125c7466 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f8442295cc823189215e9c74aac6b19c125c7466/mbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 2150, 12, 73, 33, 7036, 4672, 2552, 14157, 357, 273, 4135, 2147, 18, 1397, 10705, 1435, 309, 562, 12, 1786, 13, 480, 404, 30, 309, 562, 12, 1786, 13, 405, 404, 30, 1234, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 2150, 12, 73, 33, 7036, 4672, 2552, 14157, 357, 273, 4135, 2147, 18, 1397, 10705, 1435, 309, 562, 12, 1786, 13, 480, 404, 30, 309, 562, 12, 1786, 13, 405, 404, 30, 1234, 27...
self.xNorm2 = self.stepNorm = xNorm2
self.xNorm2 = xNorm2 self.stepNorm = sqrt(xNorm2)
def Solve(self): if self.A is not None: if self.factorize and not self.factorized: self.Factorize() if self.b is not None: self.FindFeasible()
9a84f38d2f7a724227ffb3b2d290c5397b2a57c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/9a84f38d2f7a724227ffb3b2d290c5397b2a57c2/ppcg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 5390, 12, 2890, 4672, 309, 365, 18, 37, 353, 486, 599, 30, 309, 365, 18, 6812, 554, 471, 486, 365, 18, 6812, 1235, 30, 365, 18, 6837, 554, 1435, 309, 365, 18, 70, 353, 486, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 348, 5390, 12, 2890, 4672, 309, 365, 18, 37, 353, 486, 599, 30, 309, 365, 18, 6812, 554, 471, 486, 365, 18, 6812, 1235, 30, 365, 18, 6837, 554, 1435, 309, 365, 18, 70, 353, 486, 59...
if mp3.tags.has_key('POPM'): rating = int(mp3.tags['POPM'] * (0.39215686274509803))
popm = mp3.tags.getall('POPM') if popm != None: rating = int(popm[0].rating * (0.39215686274509803))
def handle_rating(self, mp3, d): try: if mp3.tags.has_key('POPM'): rating = int(mp3.tags['POPM'] * (0.39215686274509803)) d.append(do('daap.songuserrating', rating)) except: pass
48c51844de737d575ddaad162d7509099079d1d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8691/48c51844de737d575ddaad162d7509099079d1d3/mp3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 17326, 12, 2890, 16, 6749, 23, 16, 302, 4672, 775, 30, 1843, 81, 273, 6749, 23, 18, 4156, 18, 588, 454, 2668, 2419, 12728, 6134, 309, 1843, 81, 480, 599, 30, 13953, 273, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 17326, 12, 2890, 16, 6749, 23, 16, 302, 4672, 775, 30, 1843, 81, 273, 6749, 23, 18, 4156, 18, 588, 454, 2668, 2419, 12728, 6134, 309, 1843, 81, 480, 599, 30, 13953, 273, 50...
f = map(equify, f)
variables = reduce(lambda g1, g2: g1.union(g2), [set(g.variables()) for g in f], set([])) f = [equify(g, variables) for g in f]
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol): r""" \code{region_plot} takes a boolean function of two variables, $f(x,y)$ and plots the region where f is True over the specified xrange and yrange as demonstrated below. region_plot(f, (xmin, xmax), (ymin, ymax), ...) INPUT: f -- a boolean function of two variables (xmin, xmax) -- 2-tuple, the range of x values OR 3-tuple (x,xmin,xmax) (ymin, ymax) -- 2-tuple, the range of y values OR 3-tuple (y,ymin,ymax) plot_points -- integer (default: 25); number of points to plot in each direction of the grid incol -- a color (default: 'blue'), the color inside the region outcol -- a color (default: 'white'), the color of the outside of the region bordercol -- a color (default: None), the color of the border (incol if not specified) EXAMPLES: Here we plot a simple function of two variables: sage: x,y = var('x,y') sage: region_plot(cos(x^2+y^2) <= 0, (x, -3, 3), (y, -3, 3)) Here we play with the colors: sage: region_plot(x^2+y^3 < 2, (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray') An even more complicated plot: sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10), incol='yellow', bordercol='black', plot_points=100) A plot with more than one condition: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2)) Since it doesn't look very good, let's increase plot_points: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) #long time Here is anoher plot: sage: region_plot(x*(x-1)*(x+1)+y^2<0, (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) If we want to keep only the region where x is positive: sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) Here we have a cut circle: sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) #long time """ from sage.plot.plot import Graphics, setup_for_eval_on_grid if not isinstance(f, (list, tuple)): f = [f] f = map(equify, f) g, xstep, ystep, xrange, yrange = setup_for_eval_on_grid(f, xrange, yrange, plot_points) xy_data_arrays = map(lambda g: [[g(x, y) for x in xsrange(xrange[0], xrange[1], xstep)] for y in xsrange(yrange[0], yrange[1], ystep)], g) xy_data_array = map(lambda *rows: map(lambda *vals: mangle_neg(vals), *rows), *xy_data_arrays) from matplotlib.colors import ListedColormap incol = rgbcolor(incol) outcol = rgbcolor(outcol) cmap = ListedColormap([incol, outcol]) cmap.set_over(outcol) cmap.set_under(incol) g = Graphics() g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, contours=[-1e307, 0, 1e307], cmap=cmap, fill=True))) if bordercol is not None: bordercol = rgbcolor(bordercol) g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, contours=[0], cmap=[bordercol], fill=False))) return g
22fa7dda7576e5ff502de8f13ac26c3e31896176 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/22fa7dda7576e5ff502de8f13ac26c3e31896176/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3020, 67, 4032, 12, 74, 16, 12314, 16, 677, 3676, 16, 3207, 67, 4139, 16, 316, 1293, 16, 596, 1293, 16, 5795, 1293, 4672, 436, 8395, 521, 710, 95, 6858, 67, 4032, 97, 5530, 279, 1250...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3020, 67, 4032, 12, 74, 16, 12314, 16, 677, 3676, 16, 3207, 67, 4139, 16, 316, 1293, 16, 596, 1293, 16, 5795, 1293, 4672, 436, 8395, 521, 710, 95, 6858, 67, 4032, 97, 5530, 279, 1250...
self.assertRaises(client.ServerError, self.db.get, 'foo', rev=old_rev)
doc = 'fail' try: doc = self.db.get('foo', rev=old_rev) except client.ServerError: doc = None assert doc is None
def test_doc_revs(self): doc = {'bar': 42} self.db['foo'] = doc old_rev = doc['_rev'] doc['bar'] = 43 self.db['foo'] = doc new_rev = doc['_rev']
689b000f1001988328e907aaf5501ad5f0798b82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9373/689b000f1001988328e907aaf5501ad5f0798b82/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2434, 67, 266, 6904, 12, 2890, 4672, 997, 273, 13666, 3215, 4278, 14856, 97, 365, 18, 1966, 3292, 11351, 3546, 273, 997, 1592, 67, 9083, 273, 997, 3292, 67, 9083, 3546, 997, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2434, 67, 266, 6904, 12, 2890, 4672, 997, 273, 13666, 3215, 4278, 14856, 97, 365, 18, 1966, 3292, 11351, 3546, 273, 997, 1592, 67, 9083, 273, 997, 3292, 67, 9083, 3546, 997, ...
log.debug('in checkToRecord')
if DEBUG: log.debug('in checkToRecord')
def checkToRecord(self): log.debug('in checkToRecord') rec_cmd = None rec_prog = None cleaned = None scheduledRecordings = self.getScheduledRecordings()
f5737db8bd118592997fea5a5e16fdbead535f3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f5737db8bd118592997fea5a5e16fdbead535f3a/recordserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 9755, 2115, 899, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 9755, 2115, 899, 273...
default=0, help="debug level")
action="store_true", help="enable debug logging")
def _add_common_options(self): """ Add options that apply to all sub-commands. """ self.parser.add_option("--debug", dest="debug", default=0, help="debug level")
ea266321bf76f5afad6520c4e55739b65581b365 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/ea266321bf76f5afad6520c4e55739b65581b365/GrinderCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 6054, 67, 2116, 12, 2890, 4672, 3536, 1436, 702, 716, 2230, 358, 777, 720, 17, 7847, 18, 3536, 365, 18, 4288, 18, 1289, 67, 3482, 2932, 413, 4148, 3113, 1570, 1546, 4148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 1289, 67, 6054, 67, 2116, 12, 2890, 4672, 3536, 1436, 702, 716, 2230, 358, 777, 720, 17, 7847, 18, 3536, 365, 18, 4288, 18, 1289, 67, 3482, 2932, 413, 4148, 3113, 1570, 1546, 4148...
""" if _debug: print "\t%s: Called setZLabel() in Plot()" % rendererName
@type label: string """ debugMsg("Called setZLabel() in Plot()")
def setZLabel(self,label): """ Set the label of the z-axis
525240b057c0121c2cab7772950af46d6399ad7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/525240b057c0121c2cab7772950af46d6399ad7e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 62, 2224, 12, 2890, 16, 1925, 4672, 3536, 1000, 326, 1433, 434, 326, 998, 17, 4890, 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, ...
[ 1, 1, 1, 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, 444, 62, 2224, 12, 2890, 16, 1925, 4672, 3536, 1000, 326, 1433, 434, 326, 998, 17, 4890, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return test_name, stub def names_of(*args): return tuple(map(lambda o: o.__name__, args))
return unit_name, stub def make_stubs(seq, module, class_=None): return dict( test_stub(f, module, class_) for f in seq )
def test_stub(f, module, parent_class = None): test_name = 'test_%s' % f.__name__ unit_name = '%s.' % module.__name__ if parent_class: unit_name += '%s.' % parent_class unit_name += f.__name__ stub = STUB_TEMPLATE.render ( test_name = test_name, comments = py_comment(getdoc(f) or ''), unitname = unit_name, ) return test_name, stub
2b6b7ca41174137cbb11abbffdb525dfaa8cc717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/2b6b7ca41174137cbb11abbffdb525dfaa8cc717/gen_stubs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12847, 12, 74, 16, 1605, 16, 982, 67, 1106, 273, 599, 4672, 1842, 67, 529, 273, 296, 3813, 10185, 87, 11, 738, 284, 16186, 529, 972, 2836, 67, 529, 273, 1995, 87, 1093, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12847, 12, 74, 16, 1605, 16, 982, 67, 1106, 273, 599, 4672, 1842, 67, 529, 273, 296, 3813, 10185, 87, 11, 738, 284, 16186, 529, 972, 2836, 67, 529, 273, 1995, 87, 1093, 738...
this = apply(_quickfix.new_Side, args)
this = _quickfix.new_Side(*args)
def __init__(self, *args): this = apply(_quickfix.new_Side, 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, 8895, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8895, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 221...
return ExprCall( ExprSelect(self.protocol.managerVar(actorexpr), '->', self.protocol.removeManageeMethod().name), args=[ _protocolId(self.protocol.decl.type), actorexpr ])
removefunc = self.protocol.removeManageeMethod() if manager is not None: removefunc = ExprSelect(manager, '->', removefunc.name) return ExprCall(removefunc, args=[ _protocolId(ipdltype), actorexpr ])
def callRemoveActor(self, actorexpr): if not self.protocol.decl.type.isManaged(): return Whitespace('// unmanaged protocol')
5a7843888bd14ee319a059aea3c708fe1563d5e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/5a7843888bd14ee319a059aea3c708fe1563d5e1/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 3288, 17876, 12, 2890, 16, 1328, 479, 92, 683, 4672, 309, 486, 365, 18, 8373, 18, 8840, 18, 723, 18, 291, 10055, 13332, 327, 3497, 5211, 2668, 759, 640, 19360, 1771, 6134, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 3288, 17876, 12, 2890, 16, 1328, 479, 92, 683, 4672, 309, 486, 365, 18, 8373, 18, 8840, 18, 723, 18, 291, 10055, 13332, 327, 3497, 5211, 2668, 759, 640, 19360, 1771, 6134, 2, -100...
fitsinId = request.POST['FitsinId']
taskId = request.POST['TaskId']
def getReprocessingParams(self, request): """ Returns all information for reprocessing an image (so that it can be added to the shopping cart). Information needed: related image ID, flat, mask and reg data path, resultsOutputDir """
cfcfcf6404796a43733b6c544e84111ce5cd6ead /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/cfcfcf6404796a43733b6c544e84111ce5cd6ead/qualityfitsin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 10632, 1370, 12, 2890, 16, 590, 4672, 3536, 2860, 777, 1779, 364, 283, 10632, 392, 1316, 261, 2048, 716, 518, 848, 506, 3096, 358, 326, 12122, 1382, 7035, 2934, 15353, 3577, 30, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 10632, 1370, 12, 2890, 16, 590, 4672, 3536, 2860, 777, 1779, 364, 283, 10632, 392, 1316, 261, 2048, 716, 518, 848, 506, 3096, 358, 326, 12122, 1382, 7035, 2934, 15353, 3577, 30, 37...
connection = self.refresh_http_connection(host, self.secure)
connection = self.refresh_http_connection(host, self.is_secure)
def _mexe(self, method, path, data, headers, host=None, sender=None): """ mexe - Multi-execute inside a loop, retrying multiple times to handle transient Internet errors by simply trying again. Also handles redirects.
09e7d4c5dd3e2e8fc4d925e79739eab40cdb9a4a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/09e7d4c5dd3e2e8fc4d925e79739eab40cdb9a4a/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 81, 14880, 12, 2890, 16, 707, 16, 589, 16, 501, 16, 1607, 16, 1479, 33, 7036, 16, 5793, 33, 7036, 4672, 3536, 312, 14880, 300, 5991, 17, 8837, 4832, 279, 2798, 16, 21081, 3229, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 81, 14880, 12, 2890, 16, 707, 16, 589, 16, 501, 16, 1607, 16, 1479, 33, 7036, 16, 5793, 33, 7036, 4672, 3536, 312, 14880, 300, 5991, 17, 8837, 4832, 279, 2798, 16, 21081, 3229, ...
self.setMaxlag()
def login(self, username, password = False, remember = True): """ Login to the site remember - currently unused """ if not password: from getpass import getpass password = getpass() data = { "action" : "login", "lgname" : username, "lgpassword" : password } self.setMaxlag(120) req = api.APIRequest(self, data) info = req.query() self.setMaxlag() if info['login']['result'] == "Success": self.username = username else: try: print info['login']['result'] except: print info['error']['code'] print info['error']['info'] params = { 'action': 'query', 'meta': 'userinfo', 'uiprop': 'rights' } req = api.APIRequest(self, params) info = req.query() user_rights = info['query']['userinfo']['rights'] if 'apihighlimits' in user_rights: self.limit = 5000
303b1fb30187f94bebd077256d4e1acde33dfb70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10544/303b1fb30187f94bebd077256d4e1acde33dfb70/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 2718, 16, 2201, 273, 1083, 16, 11586, 273, 1053, 4672, 3536, 11744, 358, 326, 2834, 11586, 300, 4551, 10197, 3536, 225, 309, 486, 2201, 30, 628, 31889, 1930, 31889, 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, 3925, 12, 2890, 16, 2718, 16, 2201, 273, 1083, 16, 11586, 273, 1053, 4672, 3536, 11744, 358, 326, 2834, 11586, 300, 4551, 10197, 3536, 225, 309, 486, 2201, 30, 628, 31889, 1930, 31889, 2...
builddirlen = len(topbuilddir) if self.macros.lib == 'lib': builddirlen += 2
def preProcess(self): self.invariantsubtrees = [x[0] for x in self.invariantinclusions] # see if we can do debuginfo self.debuginfo = False # we need this for the debuginfo case self.dm = macros.Macros() self.dm.update(self.macros) # we need to start searching from just below the build directory topbuilddir = '/'.join(self.macros.builddir.split('/')[:-1]) builddirlen = len(topbuilddir) if self.macros.lib == 'lib': # we don't want debug info on one arch and not another, so # make sure there is always enough room builddirlen += 2 if self.tryDebuginfo and\ 'eu-strip' in self.macros.strip and \ 'debugedit' in self.macros and \ util.checkPath(self.macros.debugedit) and \ len(self.macros.debugsrcdir) <= builddirlen: self.debuginfo = True self.debugfiles = set() self.dm.topbuilddir = topbuilddir
f64e40412805b171799da68abb15dbbaa096c651 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/f64e40412805b171799da68abb15dbbaa096c651/destdirpolicy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2227, 12, 2890, 4672, 365, 18, 267, 8688, 1717, 17204, 273, 306, 92, 63, 20, 65, 364, 619, 316, 365, 18, 267, 8688, 267, 25364, 65, 468, 2621, 309, 732, 848, 741, 1198, 1376, 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, 675, 2227, 12, 2890, 4672, 365, 18, 267, 8688, 1717, 17204, 273, 306, 92, 63, 20, 65, 364, 619, 316, 365, 18, 267, 8688, 267, 25364, 65, 468, 2621, 309, 732, 848, 741, 1198, 1376, 36...
def get_file(self, path, revision=0):
def get_file(self, path, revision): if revision == BZRTool.PRE_CREATION_TIMESTAMP: return '' local_datetime = self._revision_timestamp_to_local(revision)
def get_file(self, path, revision=0): p = subprocess.Popen(['bzr', 'cat', '-r', str(revision), str(self.repository.path) + '/' + path], stderr=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) contents = p.stdout.read() errmsg = p.stderr.read() failure = p.wait()
93014d9144d249956356c8503d567a6b3a46409b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/93014d9144d249956356c8503d567a6b3a46409b/bzr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 12, 2890, 16, 589, 16, 6350, 4672, 309, 6350, 422, 605, 62, 54, 6364, 18, 3670, 67, 5458, 2689, 67, 17201, 30, 327, 875, 282, 1191, 67, 6585, 273, 365, 6315, 13057, 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, 336, 67, 768, 12, 2890, 16, 589, 16, 6350, 4672, 309, 6350, 422, 605, 62, 54, 6364, 18, 3670, 67, 5458, 2689, 67, 17201, 30, 327, 875, 282, 1191, 67, 6585, 273, 365, 6315, 13057, 67,...
if hasattr(ext, "cxx"): self.compiler.set_executable("compiler", ext.cxx) self.compiler.set_executable("compiler_so", ext.cxx)
cxx = None if (sys.version_info[1] < 3 or self.compiler.compiler_type in ["mingw32"]): cxx = sysconfig.get_config_vars("CXX") if os.environ.has_key("CXX"): cxx = os.environ["CXX"] if cxx: self.compiler.set_executable("compiler", cxx) self.compiler.set_executable("compiler_so", cxx)
def build_extension(self, ext): """Work around distutils bug which uses the C compiler for C++ code. """ if hasattr(ext, "language") and ext.language == "c++": # fix for before 2.2 only -- need to set the compiler to C++ if hasattr(ext, "cxx"): self.compiler.set_executable("compiler", ext.cxx) self.compiler.set_executable("compiler_so", ext.cxx) self.compiler.set_executable("linker_so", ext.cxx + ["-shared"]) else: # fix for 2.3 self.compiler.compiler_so = self.compiler.compiler_cxx else: self.compiler.compiler_so = self._original_compiler_so
930f61997ffa88dc280f57ba69c083f4921509b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/930f61997ffa88dc280f57ba69c083f4921509b8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 6447, 12, 2890, 16, 1110, 4672, 3536, 2421, 6740, 2411, 5471, 7934, 1492, 4692, 326, 385, 5274, 364, 385, 9904, 981, 18, 3536, 309, 3859, 12, 408, 16, 315, 4923, 7923, 471, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 67, 6447, 12, 2890, 16, 1110, 4672, 3536, 2421, 6740, 2411, 5471, 7934, 1492, 4692, 326, 385, 5274, 364, 385, 9904, 981, 18, 3536, 309, 3859, 12, 408, 16, 315, 4923, 7923, 471, 1...
"""Return a ``MapperOption`` that will convert the column property of the given name into a non-deferred (regular column) load.
"""Return a ``MapperOption`` that will convert the column property of the given name into a non-deferred (regular column) load.
def undefer(*keys): """Return a ``MapperOption`` that will convert the column property of the given name into a non-deferred (regular column) load. Used with ``query.options()``. """ return strategies.DeferredOption(keys, defer=False)
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 18974, 30857, 2452, 4672, 3536, 990, 279, 12176, 4597, 1895, 10335, 716, 903, 1765, 326, 1057, 1272, 434, 326, 864, 508, 1368, 279, 1661, 17, 26622, 261, 16819, 1057, 13, 1262, 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, 640, 18974, 30857, 2452, 4672, 3536, 990, 279, 12176, 4597, 1895, 10335, 716, 903, 1765, 326, 1057, 1272, 434, 326, 864, 508, 1368, 279, 1661, 17, 26622, 261, 16819, 1057, 13, 1262, 18, ...
lines = rv.split("\n") if lines: oldCol = self.col self.line += len(lines)-1 if len(lines) > 1: self.col = len(lines[-1]) else: self.col += len(lines[0]) if self.lineLengths and oldCol > 0: self.lineLengths[-1] += len(lines[0]) lines = lines[1:-1] else: lines = lines[:-1] for line in lines: self.lineLengths.append(len(line)) self.queue = self.queue[i:]
def charsUntil(self, characters, opposite = False): """ Returns a string of characters from the stream up to but not including any character in characters or EOF. characters can be any container that supports the in method being called on it. """
ce54311bb9e5825c30bc926217c240b4ddfc3c31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9368/ce54311bb9e5825c30bc926217c240b4ddfc3c31/inputstream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5230, 9716, 12, 2890, 16, 3949, 16, 20759, 273, 1083, 4672, 3536, 2860, 279, 533, 434, 3949, 628, 326, 1407, 731, 358, 1496, 486, 6508, 1281, 3351, 316, 3949, 578, 6431, 18, 3949, 848, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5230, 9716, 12, 2890, 16, 3949, 16, 20759, 273, 1083, 4672, 3536, 2860, 279, 533, 434, 3949, 628, 326, 1407, 731, 358, 1496, 486, 6508, 1281, 3351, 316, 3949, 578, 6431, 18, 3949, 848, ...
self.colorspaces.pack(side = TOP, fill=X)
self.colorspaces.pack(side = TOP, fill=X, pady=3)
def init(self, master): PluginPanel.init(self, master) top = TFrame(self.panel, style='FlatFrame', borderwidth=10) top.pack(side = TOP, fill=BOTH) self.cs_name = StringVar(top) self.cs_name.set(RGB) label = TLabel(top, text=_("Colorspace:")+" ") label.pack(side = TOP, anchor=W) self.colorspaces = TCombobox(top, state='readonly', postcommand = self.set_cs, values=self.make_cs_list(), width=14, style='ComboNormal', textvariable=self.cs_name) self.colorspaces.pack(side = TOP, fill=X) button = UpdatedButton(top, text = _("Apply"), command = self.apply_colorspace, sensitivecb = self.is_selection) button.pack(side = BOTTOM, expand = 1, fill = X) self.Subscribe(SELECTION, button.Update)
cdde1ae919da90fdc7fcfc900630bf21956911bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/cdde1ae919da90fdc7fcfc900630bf21956911bf/csconverter_plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4171, 4672, 6258, 5537, 18, 2738, 12, 2890, 16, 4171, 13, 1760, 273, 399, 3219, 12, 2890, 18, 13916, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 33, 2163, 13, 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, 1208, 12, 2890, 16, 4171, 4672, 6258, 5537, 18, 2738, 12, 2890, 16, 4171, 13, 1760, 273, 399, 3219, 12, 2890, 18, 13916, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 33, 2163, 13, 17...
if item.regex.maxLength() is not None: self.regex_patterns.append(item) self._need_commit = True else: regex = makePrintable(str(item.regex), 'ASCII', to_unicode=True)
if item.regex.maxLength() is None: raise ValueError("Regular expression with no maximum size has forbidden") self.regex_patterns.append(item) self._need_commit = True
def addRegex(self, regex, user=None): item = RegexPattern(regex, user) if item.regex.maxLength() is not None: self.regex_patterns.append(item) self._need_commit = True else: regex = makePrintable(str(item.regex), 'ASCII', to_unicode=True) #warning("Skip invalid regex pattern (%s)" % regex)
9f838e085ed2b42ee9d6b3325d65f3fe55b8061e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/9f838e085ed2b42ee9d6b3325d65f3fe55b8061e/pattern.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6628, 12, 2890, 16, 3936, 16, 729, 33, 7036, 4672, 761, 273, 15078, 3234, 12, 7584, 16, 729, 13, 309, 761, 18, 7584, 18, 1896, 1782, 1435, 353, 486, 599, 30, 365, 18, 7584, 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, 527, 6628, 12, 2890, 16, 3936, 16, 729, 33, 7036, 4672, 761, 273, 15078, 3234, 12, 7584, 16, 729, 13, 309, 761, 18, 7584, 18, 1896, 1782, 1435, 353, 486, 599, 30, 365, 18, 7584, 67, ...
g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
g['BINDIR'] = os.path.dirname(os.path.realpath(sys.executable))
def _init_nt(): """Initialize the module as appropriate for NT""" g = {} # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) global _config_vars _config_vars = g
5cf64d8c9f90bb0ece6895895e93def9c1bcc05e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5cf64d8c9f90bb0ece6895895e93def9c1bcc05e/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 496, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 20064, 8395, 314, 273, 2618, 468, 444, 5337, 3799, 6402, 314, 3292, 14484, 1639, 882, 3546, 273, 336, 67, 8103, 67, 2941...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 496, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 20064, 8395, 314, 273, 2618, 468, 444, 5337, 3799, 6402, 314, 3292, 14484, 1639, 882, 3546, 273, 336, 67, 8103, 67, 2941...
initialcount=191
initialcount=192
def initialize_glyphs(): global initial_glyphs, initialcount, count for number in initial_glyphs: toto="_00%02d" % int(number) initial_glyphs.insert(0,toto) initial_glyphs.remove(number) if font_name=="gregorio": glyphs_to_append=("_1025", "_2561") initialcount=191 elif font_name=="parmesan": glyphs_to_append=("_1025", "_2561") initialcount=191 elif font_name=="greciliae": glyphs_to_append=("_2561", "_1025", "_0075", "_0076", "_0078", "_0080") initialcount=198 elif font_name=="gregoria": glyphs_to_append=("_2561", "_1025") initialcount=178 for glyphnumber in glyphs_to_append: initial_glyphs.append(glyphnumber) count=initialcount
9649c62be4a7f79fb3a207e9908dac013896d62c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7096/9649c62be4a7f79fb3a207e9908dac013896d62c/squarize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 19426, 87, 13332, 2552, 2172, 67, 19426, 87, 16, 2172, 1883, 16, 1056, 364, 1300, 316, 2172, 67, 19426, 87, 30, 268, 6302, 1546, 67, 713, 9, 3103, 72, 6, 738, 509, 12, 2696...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4046, 67, 19426, 87, 13332, 2552, 2172, 67, 19426, 87, 16, 2172, 1883, 16, 1056, 364, 1300, 316, 2172, 67, 19426, 87, 30, 268, 6302, 1546, 67, 713, 9, 3103, 72, 6, 738, 509, 12, 2696...
self.config["browser"]["bg_color_enable"] = True
self.config["browser"]["bg_color_enable"] = self.priv["bg_color_enable"]
def on_delete(self, widget, user_data): # Get configuration values tag_sidebar = self.sidebar.get_property("visible") closed_pane = self.closed_pane.get_property("visible") quickadd_pane = self.quickadd_pane.get_property("visible") # Populate configuration dictionary self.config["browser"] = {} self.config["browser"]["width"] = self.priv["window_width"] self.config["browser"]["height"] = self.priv["window_height"] self.config["browser"]["x_pos"] = self.priv["window_xpos"] self.config["browser"]["y_pos"] = self.priv["window_ypos"] self.config["browser"]["tag_pane"] = tag_sidebar self.config["browser"]["closed_task_pane"] = closed_pane self.config["browser"]["quick_add"] = quickadd_pane self.config["browser"]["bg_color_enable"] = True
2b74b05abd954fda1cdc070ed73e713c982bac80 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/2b74b05abd954fda1cdc070ed73e713c982bac80/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3733, 12, 2890, 16, 3604, 16, 729, 67, 892, 4672, 225, 468, 968, 1664, 924, 1047, 67, 26417, 282, 273, 365, 18, 26417, 18, 588, 67, 4468, 2932, 8613, 7923, 4375, 67, 29009, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3733, 12, 2890, 16, 3604, 16, 729, 67, 892, 4672, 225, 468, 968, 1664, 924, 1047, 67, 26417, 282, 273, 365, 18, 26417, 18, 588, 67, 4468, 2932, 8613, 7923, 4375, 67, 29009, ...
self.assertEquals("uncleanfilename",
self.assertEquals("uncleanfilename",
def getIt(path, cd=None): response = { 'path': path, 'redirected-url': 'http://example.com' + path } if cd: response['content-disposition'] = cd return client.getFilenameFromResponse(response)
4011da037c62b509416a1c376c7db9540b22aa70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/4011da037c62b509416a1c376c7db9540b22aa70/httpclienttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7193, 12, 803, 16, 7976, 33, 7036, 4672, 766, 273, 288, 296, 803, 4278, 589, 16, 296, 7590, 329, 17, 718, 4278, 296, 2505, 2207, 8236, 18, 832, 11, 397, 589, 289, 309, 7976, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7193, 12, 803, 16, 7976, 33, 7036, 4672, 766, 273, 288, 296, 803, 4278, 589, 16, 296, 7590, 329, 17, 718, 4278, 296, 2505, 2207, 8236, 18, 832, 11, 397, 589, 289, 309, 7976, 30,...
b * 1431655766
b * (maxsize//3 + 1)
def test_alloc_overflow(self): a = array.array('d', [-1]*65536) try: a *= 65536 except MemoryError: pass else: self.fail("a *= 2**16 didn't raise MemoryError") b = array.array('d', [ 2.71828183, 3.14159265, -1]) try: b * 1431655766 except MemoryError: pass else: self.fail("a * 1431655766 didn't raise MemoryError")
c5327ae32af9c711e00448582d178ccb7aabffd5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/c5327ae32af9c711e00448582d178ccb7aabffd5/test_array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9853, 67, 11512, 12, 2890, 4672, 279, 273, 526, 18, 1126, 2668, 72, 2187, 23059, 21, 5772, 26, 2539, 5718, 13, 775, 30, 279, 6413, 28652, 1335, 9251, 668, 30, 1342, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9853, 67, 11512, 12, 2890, 4672, 279, 273, 526, 18, 1126, 2668, 72, 2187, 23059, 21, 5772, 26, 2539, 5718, 13, 775, 30, 279, 6413, 28652, 1335, 9251, 668, 30, 1342, 469, 30, ...
fiscalyear_clause = ','.join([str(x) for x in fiscalyear_ids])
fiscalyear_clause = (','.join([str(x) for x in fiscalyear_ids])) or '0'
def _query_get(self, cr, uid, obj='l', context={}): fiscalyear_obj = self.pool.get('account.fiscalyear') if not context.get('fiscalyear', False): fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')]) fiscalyear_clause = ','.join([str(x) for x in fiscalyear_ids]) else: fiscalyear_clause = '%s' % context['fiscalyear'] if context.get('periods', False): ids = ','.join([str(x) for x in context['periods']]) return obj+".active AND "+obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) AND id in (%s))" % (fiscalyear_clause, ids) else: return obj+".active AND "+obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s))" % (fiscalyear_clause,)
6c1e77f6a4d32d2b39a62d4bd44d2a8b438442e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6c1e77f6a4d32d2b39a62d4bd44d2a8b438442e3/account_move_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1081, 2218, 80, 2187, 819, 12938, 4672, 15324, 771, 6874, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 74, 291, 771, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2271, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1081, 2218, 80, 2187, 819, 12938, 4672, 15324, 771, 6874, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 74, 291, 771, 6...
self.catalog.setAuthenticationID('/O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Andrei Tsaregorodtsev')
self.catalog.setAuthorizationId('/O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Andrei Tsaregorodtsev')
def __getLFCClient(self): """Gets the LFC client instance """ try: self.catalog = LcgFileCatalogClient() self.catalog.setAuthenticationID('/O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Andrei Tsaregorodtsev') return S_OK() except Exception,x: errStr = "TransformationDB.__getLFCClient: Failed to create LcgFileCatalogClient" gLogger.exception(errStr, lException=x) return S_ERROR(errStr)
4bb48d51c0d50cc6adcc57150087e0962ab00686 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4bb48d51c0d50cc6adcc57150087e0962ab00686/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 48, 4488, 1227, 12, 2890, 4672, 3536, 3002, 326, 511, 4488, 1004, 791, 3536, 775, 30, 365, 18, 7199, 273, 511, 26275, 812, 9769, 1227, 1435, 365, 18, 7199, 18, 542, 6063, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 48, 4488, 1227, 12, 2890, 4672, 3536, 3002, 326, 511, 4488, 1004, 791, 3536, 775, 30, 365, 18, 7199, 273, 511, 26275, 812, 9769, 1227, 1435, 365, 18, 7199, 18, 542, 6063, 54...
orange.registerFileType("C50", None, toC50, [".names", ".data", ".test"])
orange.registerFileType("C50", None, toC50, [".names", ".data", ".test"])
def toR(filename,t): if string.upper(filename[-2:]) == ".R": filename = filename[:-2] f = open(filename+'.R','w') atyp = [] aord = [] labels = [] as = [] for a in t.domain.attributes: as.append(a) as.append(t.domain.classVar) for a in as: labels.append(str(a.name)) atyp.append(a.varType) aord.append(a.ordered) f.write('data <- data.frame(\n') for i in xrange(len(labels)): if atyp[i] == 2: # continuous f.write('"%s" = c('%(labels[i])) for j in xrange(len(t)): if t[j][i].isSpecial(): f.write('NA') else: f.write(str(t[j][i])) if (j == len(t)-1): f.write(')') else: f.write(',') elif atyp[i] == 1: # discrete if aord[i]: # ordered f.write('"%s" = ordered('%labels[i]) else: f.write('"%s" = factor('%labels[i]) f.write('levels=c('%(labels[i])) for j in xrange(len(as[i].values)): f.write('"x%s"'%(as[i].values[j])) if j == len(as[i].values)-1: f.write('),c(') else: f.write(',') for j in xrange(len(t)): if t[j][i].isSpecial(): f.write('NA') else: f.write('"x%s"'%str(t[j][i])) if (j == len(t)-1): f.write('))') else: f.write(',') else: raise "Unknown attribute type." if (i < len(labels)-1): f.write(',\n') f.write(')\n')
e48a6567ef98cfa80ae418bf83be395c3106ca9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/e48a6567ef98cfa80ae418bf83be395c3106ca9f/orngIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 54, 12, 3459, 16, 88, 4672, 309, 533, 18, 5797, 12, 3459, 18919, 22, 30, 5717, 422, 3552, 54, 6877, 1544, 273, 1544, 10531, 17, 22, 65, 284, 273, 1696, 12, 3459, 6797, 18, 54, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 54, 12, 3459, 16, 88, 4672, 309, 533, 18, 5797, 12, 3459, 18919, 22, 30, 5717, 422, 3552, 54, 6877, 1544, 273, 1544, 10531, 17, 22, 65, 284, 273, 1696, 12, 3459, 6797, 18, 54, ...
def check_facts(fact): found_facts[fact[0]] = fact[1]
def check_facts(parent, facts): found_facts[facts[0]] = facts[1]
def check_facts(fact): found_facts[fact[0]] = fact[1]
865a6c573696c978b03350a0688e03bea0a6195c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/865a6c573696c978b03350a0688e03bea0a6195c/test_facts_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 27023, 12, 3493, 4672, 1392, 67, 27023, 63, 3493, 63, 20, 13563, 273, 5410, 63, 21, 65, 2, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 27023, 12, 3493, 4672, 1392, 67, 27023, 63, 3493, 63, 20, 13563, 273, 5410, 63, 21, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
config.tv = ConfigSubsection(); config.tv.lastservice = configElement("config.tv.lastservice", configText, "", 0); config.tv.lastroot = configElement("config.tv.lastroot", configText, "", 0);
def __init__(self, session): ChannelSelectionBase.__init__(self,session) ChannelSelectionEdit.__init__(self) ChannelSelectionEPG.__init__(self)
e131b75fd194db84a37f2395b5ab88093e09192f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/e131b75fd194db84a37f2395b5ab88093e09192f/ChannelSelection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 4672, 5307, 6233, 2171, 16186, 2738, 972, 12, 2890, 16, 3184, 13, 5307, 6233, 4666, 16186, 2738, 972, 12, 2890, 13, 5307, 6233, 10541, 43, 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, 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, 1339, 4672, 5307, 6233, 2171, 16186, 2738, 972, 12, 2890, 16, 3184, 13, 5307, 6233, 4666, 16186, 2738, 972, 12, 2890, 13, 5307, 6233, 10541, 43, 16186, 273...
newFrame.size.width = 516
newFrame.size.height = 110
def adjustContent(self, videoWindow, animate): newFrame = self.window().frame() if videoWindow.is_fullscreen: self.playbackControls.setHidden_(NO) newFrame.size.width = 824 else: self.playbackControls.setHidden_(YES) newFrame.size.width = 516 newFrame.origin.x = self.getHorizontalPosition(videoWindow, newFrame.size.width) self.window().setFrame_display_animate_(newFrame, YES, animate)
89d9138373ff2ef66014f5b54b00c65e984fba71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/89d9138373ff2ef66014f5b54b00c65e984fba71/overlay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5765, 1350, 12, 2890, 16, 6191, 3829, 16, 14671, 4672, 394, 3219, 273, 365, 18, 5668, 7675, 3789, 1435, 309, 6191, 3829, 18, 291, 67, 2854, 9252, 30, 365, 18, 1601, 823, 16795, 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, 5765, 1350, 12, 2890, 16, 6191, 3829, 16, 14671, 4672, 394, 3219, 273, 365, 18, 5668, 7675, 3789, 1435, 309, 6191, 3829, 18, 291, 67, 2854, 9252, 30, 365, 18, 1601, 823, 16795, 18, 542...
self.problem(u"%s: %s gives duplicate interwiki on same site %s" % (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True))) if globalvar.autonomous: self.todo = [] return
wikipedia.output(u"NOTE: %s: %s gives duplicate interwiki on same site %s" % (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True)))
def workDone(self, counter): """ This is called by a worker to tell us that the promised work was completed as far as possible. The only argument is an instance of a counter class, that has methods minus() and plus() to keep counts of the total work todo. """ # Loop over all the pages that should have been taken care of for page in self.pending: # Mark the page as done self.done.append(page)
3c98355a5ba484241f70324847be4ac1aa3e2b32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/3c98355a5ba484241f70324847be4ac1aa3e2b32/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 1220, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 1220, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
if node.nodeType==Node.ELEMENT_NODE and self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node
if node.nodeType==Node.ELEMENT_NODE: if self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node
def appendChild( self, node ): if node.nodeType==Node.ELEMENT_NODE and self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node Node.appendChild( self, node ) return node
ce88db02303409ae8b19f8aaf5e540c2f99f47c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce88db02303409ae8b19f8aaf5e540c2f99f47c1/minidom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 365, 16, 756, 262, 30, 309, 756, 18, 2159, 559, 631, 907, 18, 10976, 67, 8744, 30, 309, 365, 18, 5457, 1046, 30, 1002, 3580, 16, 315, 11710, 1668, 2186, 24729, 6, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 365, 16, 756, 262, 30, 309, 756, 18, 2159, 559, 631, 907, 18, 10976, 67, 8744, 30, 309, 365, 18, 5457, 1046, 30, 1002, 3580, 16, 315, 11710, 1668, 2186, 24729, 6, 469, 30, ...
warrior=m.make('Tom Harrowe', type='guard',xyz=(uniform(-1,14),uniform(-18,-27),village_height),sex='male',face=[0.7,-0.7,0])
warrior=m.make('Tom Harrowe', type='guard',xyz=(uniform(-1,14),uniform(-18,-27),village_height),sex='male',face=directions[randint(0,7)])
def default(mapeditor):
2b4c12d65db58d1782f011f2603afda9626e8060 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/2b4c12d65db58d1782f011f2603afda9626e8060/define_world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 1458, 9177, 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, 805, 12, 1458, 9177, 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, -1...
"file_ext": ["xm", ], "mime": ('audio/xm', 'audio/x-xm', 'audio/module-xm', 'audio/mod', 'audio/x-mod', ),
"file_ext": ("xm",), "mime": ('audio/xm', 'audio/x-xm', 'audio/module-xm', 'audio/mod', 'audio/x-mod'),
def createDescription(self): return "'%s' by '%s'" % ( self["title"].value, self["tracker_name"].value)
fe4f82e04a0cd9087db7d881c9525475169fac45 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/fe4f82e04a0cd9087db7d881c9525475169fac45/xm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3291, 12, 2890, 4672, 327, 22288, 87, 11, 635, 1995, 87, 4970, 738, 261, 365, 9614, 2649, 6, 8009, 1132, 16, 365, 9614, 16543, 67, 529, 6, 8009, 1132, 13, 2, 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, 752, 3291, 12, 2890, 4672, 327, 22288, 87, 11, 635, 1995, 87, 4970, 738, 261, 365, 9614, 2649, 6, 8009, 1132, 16, 365, 9614, 16543, 67, 529, 6, 8009, 1132, 13, 2, -100, -100, -100, -...
if 'point' in entry: x,y = entry.point.split(' ') elif 'georss_point' in entry: x,y = entry.georss_point.split(' ')
point = entry.get('georss_point') or entry.get('point') if point: x, y = point.split(' ')
def main(argv=None): logger.info("Starting add_news") if argv: url = argv[0] else: url = 'http://search.boston.com/search/api?q=*&sort=-articleprintpublicationdate&subject=massachusetts&scope=bonzai' schema_slug = 'local-news' try: schema = Schema.objects.get(slug=schema_slug) except Schema.DoesNotExist: print "Schema (%s): DoesNotExist" % schema_slug sys.exit(1) f = feedparser.parse(url) for entry in f.entries: try: item = NewsItem.objects.get(title=entry.title, description=entry.description) print "Already have %r (id %d)" % (item.title, item.id) except NewsItem.DoesNotExist: item = NewsItem() try: item.schema = schema item.title = convert_entities(entry.title) item.description = convert_entities(entry.description) item.url = entry.link item.location_name = entry.get('x-calconnect-street') or entry.get('georss_featurename') item.item_date = datetime.datetime(*entry.updated_parsed[:6]) item.pub_date = datetime.datetime(*entry.updated_parsed[:6]) # feedparser bug: depending on which parser it magically uses, # we either get the xml namespace in the key name, or we don't. if 'point' in entry: x,y = entry.point.split(' ') elif 'georss_point' in entry: x,y = entry.georss_point.split(' ') else: # Fall back on geocoding. text = item.title + ' ' + item.description try: x, y = quick_dirty_fallback_geocode(text, parse=True) except GeocodingException: logger.debug("Geocoding exception on %r:" % text) log_exception(level=logging.DEBUG) continue if None in (x, y): logger.debug("couldn't geocode '%s...'" % item.title[:30]) continue item.location = Point((float(y), float(x))) if item.location.x == 0.0 and item.location.y == 0.0: # There's a lot of these. Maybe attempt to # parse and geocode if we haven't already? logger.info("Skipping %r as it has bad location 0,0" % item.title) continue if not item.location_name: # Fall back to reverse-geocoding. from ebpub.geocoder import reverse try: block, distance = reverse.reverse_geocode(item.location) logger.debug(" Reverse-geocoded point to %r" % block.pretty_name) item.location_name = block.pretty_name except reverse.ReverseGeocodeError: logger.debug(" Failed to reverse geocode %s for %r" % (item.location.wkt, item.title)) item.location_name = u'' item.save() logger.info("Saved: %s" % item.title) except: logger.error("Warning: couldn't save %r. Traceback:" % item.title) log_exception() logger.info("Finished add_news")
8784b516d6fbe9940e580877cac0558941b88d25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/8784b516d6fbe9940e580877cac0558941b88d25/add_news.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 1194, 18, 1376, 2932, 11715, 527, 67, 18443, 7923, 309, 5261, 30, 880, 273, 5261, 63, 20, 65, 469, 30, 880, 273, 296, 2505, 2207, 3072, 18, 70, 669, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 19485, 33, 7036, 4672, 1194, 18, 1376, 2932, 11715, 527, 67, 18443, 7923, 309, 5261, 30, 880, 273, 5261, 63, 20, 65, 469, 30, 880, 273, 296, 2505, 2207, 3072, 18, 70, 669, ...