rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
assert_equal(stats.ttest_1samp([0,0,0], 0), (1.0, 0.42264973081037421)) | assert_almost_equal(stats.ttest_1samp([0,0,0], 0), (1.0, 0.42264973081037421)) | def test_ttest_1samp_new(): n1, n2, n3 = (10,15,20) rvn1 = stats.norm.rvs(loc=5,scale=10,size=(n1,n2,n3)) rvn2 = stats.norm.rvs(loc=5,scale=10,size=(n1,n2,n3)) #check multidimensional array and correct axis handling #deterministic rvn1 and rvn2 would be better as in test_ttest_rel t1,p1 = stats.ttest_1samp(rvn1[:,:,:], np.ones((n2,n3)),axis=0) t2,p2 = stats.ttest_1samp(rvn1[:,:,:], 1,axis=0) t3,p3 = stats.ttest_1samp(rvn1[:,0,0], 1) assert_array_almost_equal(t1,t2, decimal=14) assert_almost_equal(t1[0,0],t3, decimal=14) assert_equal(t1.shape, (n2,n3)) t1,p1 = stats.ttest_1samp(rvn1[:,:,:], np.ones((n1,n3)),axis=1) t2,p2 = stats.ttest_1samp(rvn1[:,:,:], 1,axis=1) t3,p3 = stats.ttest_1samp(rvn1[0,:,0], 1) assert_array_almost_equal(t1,t2, decimal=14) assert_almost_equal(t1[0,0],t3, decimal=14) assert_equal(t1.shape, (n1,n3)) t1,p1 = stats.ttest_1samp(rvn1[:,:,:], np.ones((n1,n2)),axis=2) t2,p2 = stats.ttest_1samp(rvn1[:,:,:], 1,axis=2) t3,p3 = stats.ttest_1samp(rvn1[0,0,:], 1) assert_array_almost_equal(t1,t2, decimal=14) assert_almost_equal(t1[0,0],t3, decimal=14) assert_equal(t1.shape, (n1,n2)) #test zero division problem t,p = stats.ttest_1samp([0,0,0], 1) assert_equal((np.abs(t),p), (np.inf, 0)) assert_equal(stats.ttest_1samp([0,0,0], 0), (1.0, 0.42264973081037421)) #check that nan in input array result in nan output anan = np.array([[1,np.nan],[-1,1]]) assert_equal(stats.ttest_1samp(anan, 0),([0, np.nan], [1,np.nan])) | db4f6d373865b26d61c0b3e1dfd4b7281529bfe1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12971/db4f6d373865b26d61c0b3e1dfd4b7281529bfe1/test_stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
748,
395,
67,
21,
87,
931,
67,
2704,
13332,
290,
21,
16,
290,
22,
16,
290,
23,
273,
261,
2163,
16,
3600,
16,
3462,
13,
5633,
82,
21,
273,
3177,
18,
7959,
18,
4962,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
748,
395,
67,
21,
87,
931,
67,
2704,
13332,
290,
21,
16,
290,
22,
16,
290,
23,
273,
261,
2163,
16,
3600,
16,
3462,
13,
5633,
82,
21,
273,
3177,
18,
7959,
18,
4962,
87,
... |
bar = ctypes_copy(foo) | bar = copy(foo) | def test_copy(self): foo = _Foo(2, 5.0) bar = ctypes_copy(foo) foo.x = 0 foo.y = 0 self.assertEqual(bar.x, 2) self.assertAlmostEqual(bar.y, 5.0) | dad42569e252396b4d652d82b52b091aabe761cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/dad42569e252396b4d652d82b52b091aabe761cb/test_multiprocessing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3530,
12,
2890,
4672,
8431,
273,
389,
42,
5161,
12,
22,
16,
1381,
18,
20,
13,
4653,
273,
1610,
12,
11351,
13,
8431,
18,
92,
273,
374,
8431,
18,
93,
273,
374,
365,
18,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3530,
12,
2890,
4672,
8431,
273,
389,
42,
5161,
12,
22,
16,
1381,
18,
20,
13,
4653,
273,
1610,
12,
11351,
13,
8431,
18,
92,
273,
374,
8431,
18,
93,
273,
374,
365,
18,
112... |
def br(radius, T=28, eta28C=2.00139e-3, detadT=-0.03): | def br(radius, T=28, eta28C=2.00139e-3, detadT=-0.03e-3): | def br(radius, T=28, eta28C=2.00139e-3, detadT=-0.03): """Brownian time is the time for a particle to diffuse over it\'s own radius (in meters)""" return const.pi * (eta28C+(T-28)*detadT) * (radius**3) / (const.k * const.C2K(T)) | 185dcdb3234b26175d68b7a6d0a03d1bb664f77b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3150/185dcdb3234b26175d68b7a6d0a03d1bb664f77b/experiment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5186,
12,
11282,
16,
399,
33,
6030,
16,
14251,
6030,
39,
33,
22,
18,
713,
24347,
73,
17,
23,
16,
302,
1167,
56,
29711,
20,
18,
4630,
73,
17,
23,
4672,
3536,
38,
26253,
2779,
813,
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,
5186,
12,
11282,
16,
399,
33,
6030,
16,
14251,
6030,
39,
33,
22,
18,
713,
24347,
73,
17,
23,
16,
302,
1167,
56,
29711,
20,
18,
4630,
73,
17,
23,
4672,
3536,
38,
26253,
2779,
813,
3... |
self.length = self._stream.getFormat("!L")[0] | self.length = self._stream.getFormat("!uint32") | def _findSize(self): self._stream.seek(self.addr) if self._str_type == "Pascal16": self.length = self._stream.getFormat("!H")[0] self._size = 2 + self.length self.eol = "" return if self._str_type == "Pascal32": self.length = self._stream.getFormat("!L")[0] self._size = 4 + self.length self.eol = "" return if self._str_type == "AutoLine": self._size = self._stream.searchLength(StringChunk.regex_eol_nr, True) assert self._size != -1 self._stream.seek(self.addr + self._size-1) self.eol = self._stream.getN(1) if self.eol == "\r" and self._stream.read(1) == "\n": self.eol = "\r\n" self._size = self._size + 1 self.length = self._size - len(self.eol) return | 8bba2a708c142f8920d424f64163bc4f208227bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/8bba2a708c142f8920d424f64163bc4f208227bf/chunk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
1225,
12,
2890,
4672,
365,
6315,
3256,
18,
16508,
12,
2890,
18,
4793,
13,
309,
365,
6315,
701,
67,
723,
422,
315,
52,
345,
771,
2313,
6877,
365,
18,
2469,
273,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4720,
1225,
12,
2890,
4672,
365,
6315,
3256,
18,
16508,
12,
2890,
18,
4793,
13,
309,
365,
6315,
701,
67,
723,
422,
315,
52,
345,
771,
2313,
6877,
365,
18,
2469,
273,
365,
6315,
... |
proc.wait() | ExitCode = proc.wait() | def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection script - prepare local DBS query script required parameters --samples <textfile> : list of RelVal sample parameter-sets in plain text file, one sample per line, # marks comment --version <processing version> : processing version (v1, v2, ... ) --DBSURL <URL> : URL of the local DBS (http://cmsdbsprod.cern.ch/cms_dbs_prod_local_07/servlet/DBSServlet, http://cmssrv46.fnal.gov:8080/DBS126/servlet/DBSServlet) optional parameters : --lumi <number> : initial run for generation (default: 666666), set it to 777777 for high statistics samples --event <number> : initial event number --help (-h) : help --debug (-d) : debug statements """ # default try: version = os.environ.get("CMSSW_VERSION") except: print '' print 'CMSSW version cannot be determined from $CMSSW_VERSION' sys.exit(2) try: architecture = os.environ.get("SCRAM_ARCH") except: print '' print 'CMSSW architecture cannot be determined from $SCRAM_ARCH' sys.exit(2) samples = None processing_version = None initial_run = "666666" initial_event = None debug = 0 DBSURL = None try: opts, args = getopt.getopt(argv, "", ["help", "debug", "samples=", "version=", "DBSURL=", "event=", "lumi="]) except getopt.GetoptError: print main.__doc__ sys.exit(2) # check command line parameter for opt, arg in opts : if opt == "--help" : print main.__doc__ sys.exit() elif opt == "--debug" : debug = 1 elif opt == "--samples" : samples = arg elif opt == "--version" : processing_version = arg | 47397be0ad25e900c8367cb1b05a7d6e187b915f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/47397be0ad25e900c8367cb1b05a7d6e187b915f/prepareRelValWorkflows.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
13,
294,
3536,
225,
2911,
1971,
3053,
13815,
87,
225,
2911,
31738,
364,
20269,
4929,
434,
4275,
3053,
5216,
225,
300,
1109,
585,
19918,
6166,
4668,
4364,
364,
404,
334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13,
294,
3536,
225,
2911,
1971,
3053,
13815,
87,
225,
2911,
31738,
364,
20269,
4929,
434,
4275,
3053,
5216,
225,
300,
1109,
585,
19918,
6166,
4668,
4364,
364,
404,
334,
... |
return scal(a, gz), sum(mul(x, gz)) | return scale(a, gz), sum(mul(x, gz)) | def grad(x, a, gz): return scal(a, gz), sum(mul(x, gz)) | 9b27c788e7d2134a6d684c944022349650aa3cb2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/9b27c788e7d2134a6d684c944022349650aa3cb2/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6058,
12,
92,
16,
279,
16,
14136,
4672,
327,
8292,
12,
69,
16,
14136,
3631,
2142,
12,
16411,
12,
92,
16,
14136,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6058,
12,
92,
16,
279,
16,
14136,
4672,
327,
8292,
12,
69,
16,
14136,
3631,
2142,
12,
16411,
12,
92,
16,
14136,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
regex = self._getWildcardRegex(readingStr) return lambda translation: regex.search(translation) is not None | regex = self._getWildcardRegex(searchStr) return lambda translation: (translation is not None and regex.search(translation) is not None) | def getMatchFunction(self, searchStr): if self.hasWildcardCharacters(searchStr): regex = self._getWildcardRegex(readingStr) return lambda translation: regex.search(translation) is not None else: # simple routine is faster return SimpleTranslationSearchStrategy.getMatchFunction(self, searchStr) | 8eda7e44b6e5f62bd4ae39818919ef55fe08117c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/8eda7e44b6e5f62bd4ae39818919ef55fe08117c/dictionary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2060,
2083,
12,
2890,
16,
1623,
1585,
4672,
309,
365,
18,
5332,
12121,
11600,
12,
3072,
1585,
4672,
3936,
273,
365,
6315,
588,
12121,
6628,
12,
3072,
1585,
13,
327,
3195,
4794,
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,
2060,
2083,
12,
2890,
16,
1623,
1585,
4672,
309,
365,
18,
5332,
12121,
11600,
12,
3072,
1585,
4672,
3936,
273,
365,
6315,
588,
12121,
6628,
12,
3072,
1585,
13,
327,
3195,
4794,
30,
... |
def information(self, text = None, id = 0): self.setState("Info", text, id) if text and type(text) == str and not self.widgetStateHandler: self.printEvent("Info", text) def warning(self, text = "", id = 0): self.setState("Warning", text, id) if text and type(text) == str and not self.widgetStateHandler: self.printEvent("Warning", text) def error(self, text = "", id = 0): self.setState("Error", text, id) if text and type(text) == str and not self.widgetStateHandler: self.printEvent("Error", text) def setState(self, stateType, text, id): if type(text) == int: id = text; text = "" | def information(self, id = 0, text = None): self.setState("Info", id, text) def warning(self, id = 0, text = ""): self.setState("Warning", id, text) def error(self, id = 0, text = ""): self.setState("Error", id, text) def setState(self, stateType, id, text): if type(id) == str: text = id; id = 0 | def information(self, text = None, id = 0): self.setState("Info", text, id) if text and type(text) == str and not self.widgetStateHandler: self.printEvent("Info", text) | 0e491378e71212a6a34471826031736d4a3a8cd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0e491378e71212a6a34471826031736d4a3a8cd6/OWBaseWidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1779,
12,
2890,
16,
977,
273,
599,
16,
612,
273,
374,
4672,
365,
18,
542,
1119,
2932,
966,
3113,
977,
16,
612,
13,
309,
977,
471,
618,
12,
955,
13,
422,
609,
471,
486,
365,
18,
658... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1779,
12,
2890,
16,
977,
273,
599,
16,
612,
273,
374,
4672,
365,
18,
542,
1119,
2932,
966,
3113,
977,
16,
612,
13,
309,
977,
471,
618,
12,
955,
13,
422,
609,
471,
486,
365,
18,
658... |
if (pkglist.count(pkg)==0): return(0); if (OMIT.count(pkg)): return(0); return(1); | if (pkglist.count(pkg)==0): return(0) if (OMIT.count(pkg)): return(0) return(1) | def PkgSelected(pkglist, pkg): if (pkglist.count(pkg)==0): return(0); if (OMIT.count(pkg)): return(0); return(1); | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
453,
14931,
7416,
12,
10657,
1098,
16,
3475,
4672,
309,
261,
10657,
1098,
18,
1883,
12,
10657,
13,
631,
20,
4672,
327,
12,
20,
13,
309,
261,
1872,
1285,
18,
1883,
12,
10657,
3719,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
453,
14931,
7416,
12,
10657,
1098,
16,
3475,
4672,
309,
261,
10657,
1098,
18,
1883,
12,
10657,
13,
631,
20,
4672,
327,
12,
20,
13,
309,
261,
1872,
1285,
18,
1883,
12,
10657,
3719,
30,
... |
self._win.attron(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addnstr('- '*(self.width//2), self.width) self._win.attroff(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addstr('\n') | self.addnstr('- '*(self.width//2-1)+'-', self.width, curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) | def write_line_separator(self): """ """ self._win.attron(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addnstr('- '*(self.width//2), self.width) self._win.attroff(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addstr('\n') | 9f4474be20ec73e9722da1d7f66c1c3dd3f52c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/9f4474be20ec73e9722da1d7f66c1c3dd3f52c22/windows.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1369,
67,
11287,
12,
2890,
4672,
3536,
3536,
365,
6315,
8082,
18,
1747,
265,
12,
1397,
2420,
18,
3266,
67,
6017,
12,
7997,
18,
10989,
67,
12917,
67,
5151,
67,
4550,
3719,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1369,
67,
11287,
12,
2890,
4672,
3536,
3536,
365,
6315,
8082,
18,
1747,
265,
12,
1397,
2420,
18,
3266,
67,
6017,
12,
7997,
18,
10989,
67,
12917,
67,
5151,
67,
4550,
3719,
365... |
self.toolbar_show = True self.statusbar_show = True self.fullscreen_mode = False self.opendialogpath = "" self.zoom_quality = gtk.gdk.INTERP_BILINEAR self.recursive = False self.verbose = False self.image_loaded = False self.open_all_images = False | self.toolbar_show = True self.statusbar_show = True self.fullscreen_mode = False self.opendialogpath = "" self.zoom_quality = gtk.gdk.INTERP_BILINEAR self.recursive = False self.verbose = False self.image_loaded = False self.open_all_images = False | def __init__(self): | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
dict((key, dict(refList._iterHistory(version, newVersion) for key, refList in value.iteritems()))) | dict((key, dict(refList._iterHistory(version, newVersion))) for key, refList in value.iteritems()) | def _collectChanges(self, view, flag, dirties, newChanges, changes, indexChanges, version, newVersion): | 44d3ca2c6d398892e452284ed1e7d39a48a06318 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/44d3ca2c6d398892e452284ed1e7d39a48a06318/Values.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14676,
7173,
12,
2890,
16,
1476,
16,
2982,
16,
1577,
88,
606,
16,
394,
7173,
16,
3478,
16,
770,
7173,
16,
1177,
16,
28906,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14676,
7173,
12,
2890,
16,
1476,
16,
2982,
16,
1577,
88,
606,
16,
394,
7173,
16,
3478,
16,
770,
7173,
16,
1177,
16,
28906,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
f = open (Target,'w') f.write(Lines) | f = open (Target,'wb') f.write(NewLines) | def TrimR8SourceCode(Source, Target): EdkLogger.verbose("\t%s -> %s" % (Source, Target)) CreateDirectory(os.path.dirname(Target)) f = open (Source,'r') # read whole file Lines = f.read() f.close() NewLines = None for Re,Repl in gImportCodePatterns: if NewLines == None: NewLines = Re.sub(Repl, Lines) else: NewLines = Re.sub(Repl, NewLines) # save all lines if trimmed if NewLines == Lines: return f = open (Target,'w') f.write(Lines) f.close() | cb603a77ec1ea772622cc074901f8b75d8a61279 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/cb603a77ec1ea772622cc074901f8b75d8a61279/Trim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7105,
54,
28,
1830,
1085,
12,
1830,
16,
5916,
4672,
512,
2883,
3328,
18,
11369,
31458,
88,
9,
87,
317,
738,
87,
6,
738,
261,
1830,
16,
5916,
3719,
1788,
2853,
12,
538,
18,
803,
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,
7105,
54,
28,
1830,
1085,
12,
1830,
16,
5916,
4672,
512,
2883,
3328,
18,
11369,
31458,
88,
9,
87,
317,
738,
87,
6,
738,
261,
1830,
16,
5916,
3719,
1788,
2853,
12,
538,
18,
803,
18,
... |
print "sending", message | print "sending UDP:", message | def make_message(command, host, port, data=''): """format message to be sent via service_api""" message = "%s %s:%d %s"% (command, host, port, data) print "sending", message return message | cf33b4c91ed5d02ad93ec4dad579b5289aa82e45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/cf33b4c91ed5d02ad93ec4dad579b5289aa82e45/network.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2150,
12,
3076,
16,
1479,
16,
1756,
16,
501,
2218,
11,
4672,
3536,
2139,
883,
358,
506,
3271,
3970,
1156,
67,
2425,
8395,
883,
273,
2213,
87,
738,
87,
5319,
72,
738,
87,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2150,
12,
3076,
16,
1479,
16,
1756,
16,
501,
2218,
11,
4672,
3536,
2139,
883,
358,
506,
3271,
3970,
1156,
67,
2425,
8395,
883,
273,
2213,
87,
738,
87,
5319,
72,
738,
87,
28... |
keyval = 'entry_exit' sysID = self.xmlU.generateSysID(keyval) date_for_entry_exit_id = EE.participation_dates_start_date entry_exit_date_object_format = self.fixDate(date_for_entry_exit_id) sysID = sysID + str(entry_exit_date_object_format) recID = self.xmlU.generateRecID(keyval) entry_exit = ET.SubElement(entry_exits, "entry_exit") entry_exit.attrib["record_id"] = recID entry_exit.attrib["system_id"] = sysID entry_exit.attrib["odbid"] = "%s" % self.configurationRec.odbid entry_exit.attrib["date_added"] = datetime.now().isoformat() entry_exit.attrib["date_updated"] = datetime.now().isoformat() self.customizeEntryExit(entry_exit, EE) return entry_exit | keyval = 'entry_exit' sysID = self.xmlU.generateSysID(keyval) date_for_entry_exit_id = EE.participation_dates_start_date entry_exit_date_object_format = self.fixDate(date_for_entry_exit_id) sysID = sysID + str(entry_exit_date_object_format) recID = self.xmlU.generateRecID(keyval) entry_exit = ET.SubElement(entry_exits, "entry_exit") entry_exit.attrib["record_id"] = recID entry_exit.attrib["system_id"] = sysID entry_exit.attrib["odbid"] = "%s" % self.configurationRec.odbid entry_exit.attrib["date_added"] = datetime.now().isoformat() entry_exit.attrib["date_updated"] = datetime.now().isoformat() self.customizeEntryExit(entry_exit, EE) return entry_exit | def createEntryExit(self, entry_exits, EE): | 47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1622,
6767,
12,
2890,
16,
1241,
67,
338,
1282,
16,
512,
41,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1622,
6767,
12,
2890,
16,
1241,
67,
338,
1282,
16,
512,
41,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
keysdict = { 65471:self.OnRecordingView, 65472:self.OnCompactMixView, 65535:self.OnDelete, 65288:self.OnDelete, } | if 'GDK_CONTROL_MASK' in event.state.value_names: keysdict = { 120:self.OnCut, 99: self.OnCopy, 118:self.OnPaste, } else: keysdict = { 65471:self.OnRecordingView, 65472:self.OnCompactMixView, 65535:self.OnDelete, 65288:self.OnDelete, } | def OnKeyPress(self, widget, event): keysdict = { 65471:self.OnRecordingView, # F2 - Recording View 65472:self.OnCompactMixView, # F3 - Compact Mix View 65535:self.OnDelete, # delete key - remove selected item 65288:self.OnDelete, # backspace key } | 3d3aeac89342debcaaccae9544b21cf1ad337aa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/3d3aeac89342debcaaccae9544b21cf1ad337aa8/Jokosher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
653,
11840,
12,
2890,
16,
3604,
16,
871,
4672,
225,
1311,
1576,
273,
288,
1666,
6564,
11212,
30,
2890,
18,
1398,
21037,
1767,
16,
468,
478,
22,
300,
868,
4643,
4441,
1666,
6564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
653,
11840,
12,
2890,
16,
3604,
16,
871,
4672,
225,
1311,
1576,
273,
288,
1666,
6564,
11212,
30,
2890,
18,
1398,
21037,
1767,
16,
468,
478,
22,
300,
868,
4643,
4441,
1666,
6564,
... |
innertext = text[:brace] else: target = text if typ == 'option' and text[0] in '-/': | title = text[:brace] if typ in ('data', 'exc', 'func', 'class', 'const', 'attr', 'meth', 'mod'): if titleistarget: title = _fix_parens(typ, title.lstrip('.~'), env) if target.endswith('()'): target = target[:-2] if target[0:1] == '.': target = target[1:] pnode['refspecific'] = True elif target[0:1] == '~': target = target[1:] dot = target.rfind('.') if dot != -1: title = target[dot+1:] elif typ == 'option' and target[0] in '-/': | def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): env = inliner.document.settings.env text = utils.unescape(text) if typ in ('func', 'meth', 'cfunc'): if text.endswith('()'): # remove parentheses text = text[:-2] if env.config.add_function_parentheses: # add them back to all occurrences if configured text += '()' # if the first character is a bang, don't cross-reference at all if text[0:1] == '!': text = text[1:] return [innernodetypes.get(typ, nodes.literal)( rawtext, text, classes=['xref'])], [] # we want a cross-reference, create the reference node pnode = addnodes.pending_xref(rawtext, reftype=typ, refcaption=False, modname=env.currmodule, classname=env.currclass) # we may need the line number for warnings pnode.line = lineno innertext = text # special actions for Python object cross-references if typ in ('data', 'exc', 'func', 'class', 'const', 'attr', 'meth', 'mod'): # if the first character is a dot, search more specific namespaces first # else search builtins first if text[0:1] == '.': text = text[1:] pnode['refspecific'] = True # if the first character is a tilde, don't display the module/class parts # of the contents elif text[0:1] == '~': text = text[1:] dot = text.rfind('.') if dot != -1: innertext = text[dot+1:] # look if explicit title and target are given brace = text.find('<') if brace != -1: pnode['refcaption'] = True m = caption_ref_re.match(text) if m: target = m.group(2) innertext = m.group(1) else: # fallback: everything after '<' is the target target = text[brace+1:] innertext = text[:brace] # else, generate target from title else: target = text # some special cases if typ == 'option' and text[0] in '-/': # strip option marker from target target = target[1:] if typ == 'term': # normalize whitespace in definition terms (if the term reference is # broken over a line, a newline will be in text) target = ws_re.sub(' ', target).lower() else: # remove all whitespace to avoid referencing problems target = ws_re.sub('', target) pnode['reftarget'] = target pnode += innernodetypes.get(typ, nodes.literal)(rawtext, innertext, classes=['xref']) return [pnode], [] | 36de4b4a23bfc0ab78333fd659e40ccdd4749e5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/36de4b4a23bfc0ab78333fd659e40ccdd4749e5e/roles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
7540,
822,
74,
67,
4615,
12,
12846,
16,
1831,
955,
16,
977,
16,
7586,
16,
316,
7511,
264,
16,
702,
28793,
913,
33,
8526,
4672,
1550,
273,
316,
7511,
264,
18,
5457,
18,
4272,
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,
619,
7540,
822,
74,
67,
4615,
12,
12846,
16,
1831,
955,
16,
977,
16,
7586,
16,
316,
7511,
264,
16,
702,
28793,
913,
33,
8526,
4672,
1550,
273,
316,
7511,
264,
18,
5457,
18,
4272,
18,... |
self._get_wbuf_len() >= self._wbufsize): | self._wbuf_len >= self._wbufsize): | def write(self, data): data = str(data) # XXX Should really reject non-string non-buffers if not data: return self._wbuf.append(data) if (self._wbufsize == 0 or self._wbufsize == 1 and '\n' in data or self._get_wbuf_len() >= self._wbufsize): self.flush() | 2405d8e801725dfaf701dfef6918f660cbd96ac5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/2405d8e801725dfaf701dfef6918f660cbd96ac5/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
501,
4672,
501,
273,
609,
12,
892,
13,
468,
11329,
9363,
8654,
4925,
1661,
17,
1080,
1661,
17,
28101,
309,
486,
501,
30,
327,
365,
6315,
91,
4385,
18,
6923,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
501,
4672,
501,
273,
609,
12,
892,
13,
468,
11329,
9363,
8654,
4925,
1661,
17,
1080,
1661,
17,
28101,
309,
486,
501,
30,
327,
365,
6315,
91,
4385,
18,
6923,
12,
8... |
if event.has_data(): rw += self.DATA_ICON_WIDTH | def _calc_rects(self, events): """ Calculate rectangles for all events. | fa3ce46904c0daee377b1bd2f5d859d9bdd66699 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/fa3ce46904c0daee377b1bd2f5d859d9bdd66699/drawing_default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
67,
2607,
87,
12,
2890,
16,
2641,
4672,
3536,
9029,
4917,
12356,
364,
777,
2641,
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,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
67,
2607,
87,
12,
2890,
16,
2641,
4672,
3536,
9029,
4917,
12356,
364,
777,
2641,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
if debug: dumpasn1(cms) | def verify(cms, ta): """Verify the signature of a chunk of CMS. Returns the plaintext on success. If OpenSSL CLI tool reports anything other than successful verification, we raise an exception. """ if debug: dumpasn1(cms) ta_filename = "cms.tmp.ta.pem" f = open(ta_filename, "w") f.write(ta.get_PEM()) f.close() i,o,e = os.popen3(("openssl", "smime", "-verify", "-inform", "DER", "-binary", "-CAfile", ta_filename)) i.write(cms) i.close() plaintext = o.read() o.close() status = e.read() e.close() os.unlink(ta_filename) if status == "Verification successful\n": return plaintext else: raise rpki.exceptions.CMSVerificationFailed, "CMS verification failed with status %s" % status | 07c8719034f1d5086e733cb3f8461bf5c4ae934c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/119/07c8719034f1d5086e733cb3f8461bf5c4ae934c/cms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
12,
6851,
16,
13561,
4672,
3536,
8097,
326,
3372,
434,
279,
2441,
434,
16621,
18,
225,
2860,
326,
11917,
603,
2216,
18,
225,
971,
21859,
8276,
5226,
10557,
6967,
1308,
2353,
6873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
12,
6851,
16,
13561,
4672,
3536,
8097,
326,
3372,
434,
279,
2441,
434,
16621,
18,
225,
2860,
326,
11917,
603,
2216,
18,
225,
971,
21859,
8276,
5226,
10557,
6967,
1308,
2353,
6873,
... | |
self.isClosing = True | isClosing = True | def readResponse(self, command, args): """Reads the POP3 server's response. Also sets self.isClosing to True if the server closes the socket, which tells found_terminator() to close when the response has been sent. """ isMulti = self.isMultiline(command, args) responseLines = [] isFirstLine = True while True: line = self.serverFile.readline() if not line: # The socket's been closed by the server, probably by QUIT. self.isClosing = True break elif not isMulti or (isFirstLine and line.startswith('-ERR')): # A single-line response. responseLines.append(line) break elif line == '.\r\n': # The termination line. responseLines.append(line) break else: # A normal line - append it to the response and carry on. responseLines.append(line) isFirstLine = False return ''.join(responseLines) | 2c2119a1ca15b490c9dbbaf612e7be0e189c1b7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/2c2119a1ca15b490c9dbbaf612e7be0e189c1b7e/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26694,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
7483,
326,
26839,
23,
1438,
1807,
766,
18,
225,
8080,
1678,
365,
18,
291,
15745,
358,
1053,
309,
326,
1438,
13445,
326,
2987,
16,
1492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26694,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
7483,
326,
26839,
23,
1438,
1807,
766,
18,
225,
8080,
1678,
365,
18,
291,
15745,
358,
1053,
309,
326,
1438,
13445,
326,
2987,
16,
1492,
... |
navmenuid='login') | navmenuid='youraccount') | def login(self, req, form): args = wash_urlargd(form, { 'p_un': (str, None), 'p_pw': (str, None), 'login_method': (str, None), 'action': (str, ''), 'referer': (str, '')}) | 4c876fe64fb130207f0be345ae26cff77b07aac9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/4c876fe64fb130207f0be345ae26cff77b07aac9/websession_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1111,
16,
646,
4672,
833,
273,
341,
961,
67,
718,
3175,
72,
12,
687,
16,
288,
296,
84,
67,
318,
4278,
261,
701,
16,
599,
3631,
296,
84,
67,
14921,
4278,
261,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1111,
16,
646,
4672,
833,
273,
341,
961,
67,
718,
3175,
72,
12,
687,
16,
288,
296,
84,
67,
318,
4278,
261,
701,
16,
599,
3631,
296,
84,
67,
14921,
4278,
261,
70... |
field_name = self.ls_assigned.get_value(self.iter_assigned,1) | field_name = self.ls_assigned.get_value(self.iter_assigned, 1) | def _clicked(self, widget, event=None, data=None): if widget == self.b_cancel: self.gtk.get_widget('d_import').hide() self.gtk.get_widget('d_import').response(gtk.RESPONSE_CANCEL) if widget == self.b_back: if self.nb_pages.get_current_page() == 1: self.nb_pages.prev_page() | 8dd23db0ad40a315c4c2431088bf2a98189408a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2687/8dd23db0ad40a315c4c2431088bf2a98189408a8/CSV.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7475,
329,
12,
2890,
16,
3604,
16,
871,
33,
7036,
16,
501,
33,
7036,
4672,
309,
3604,
422,
365,
18,
70,
67,
10996,
30,
365,
18,
4521,
79,
18,
588,
67,
6587,
2668,
72,
67,
5666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7475,
329,
12,
2890,
16,
3604,
16,
871,
33,
7036,
16,
501,
33,
7036,
4672,
309,
3604,
422,
365,
18,
70,
67,
10996,
30,
365,
18,
4521,
79,
18,
588,
67,
6587,
2668,
72,
67,
5666... |
self.macroStack.pop() | self.popMacro() | def do_useMacro(self, macroName, macroExpr, compiledSlots, block): if not self.metal: self.interpret(block) return macro = self.engine.evaluateMacro(macroExpr) if macro is self.Default: self.interpret(block) return if not isCurrentVersion(macro): raise METALError("macro %s has incompatible version %s" % (`macroName`, `getProgramVersion(macro)`), self.position) mode = getProgramMode(macro) if mode != (self.html and "html" or "xml"): raise METALError("macro %s has incompatible mode %s" % (`macroName`, `mode`), self.position) if len(self.macroStack) >= self.stackLimit: raise METALError("macro nesting limit (%d) exceeded " "by macro %s" % (self.stackLimit, `macroName`)) self.macroStack.append((macroName, compiledSlots)) self.interpret(macro) self.macroStack.pop() | 16e9bae32a04e1cc90bd99d273eafe765aba3b03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/16e9bae32a04e1cc90bd99d273eafe765aba3b03/TALInterpreter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1202,
17392,
12,
2890,
16,
11522,
461,
16,
11522,
4742,
16,
7743,
16266,
16,
1203,
4672,
309,
486,
365,
18,
10578,
287,
30,
365,
18,
24713,
12,
2629,
13,
327,
11522,
273,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1202,
17392,
12,
2890,
16,
11522,
461,
16,
11522,
4742,
16,
7743,
16266,
16,
1203,
4672,
309,
486,
365,
18,
10578,
287,
30,
365,
18,
24713,
12,
2629,
13,
327,
11522,
273,
365,... |
if not (contour or plotfield or matrixplot) and axes: if frame: xmin, xmax = self.__xmin, self.__xmax ymin, ymax = self.__ymin, self.__ymax subplot.set_xlim([xmin - 0.05*abs(xmax - xmin), xmax + 0.05*abs(xmax - xmin)]) subplot.set_ylim([ymin - 0.05*abs(ymax - ymin), ymax + 0.05*abs(ymax - ymin)]) sage_axes.add_xy_frame_axes(subplot, xmin, xmax, ymin, ymax, axes_with_no_ticks=True, axes_label=axes_label) else: xmin,xmax,ymin,ymax = self._prepare_axes(xmin, xmax, ymin, ymax) subplot.set_xlim(xmin, xmax) subplot.set_ylim(ymin, ymax) sage_axes.add_xy_axes(subplot, xmin, xmax, ymin, ymax, axes_label=axes_label) elif (contour or plotfield): | if not (contour or plotfield or matrixplot) and axes: if frame: | def save(self, filename=None, xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, figure=None, sub=None, savenow=True, dpi=DEFAULT_DPI, axes=True, axes_label=None, fontsize=None, frame=False, verify=True): """ Save the graphics to an image file of type: PNG, PS, EPS, SVG, SOBJ, depending on the file extension you give the filename. Extension types can be: '.png', '.ps', '.eps', '.svg', and '.sobj' (for a SAGE object you can load later). | 2890cec1ce0f2d0e5e5f6a1921da4451ec15d4c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/2890cec1ce0f2d0e5e5f6a1921da4451ec15d4c4/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1544,
33,
7036,
16,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
7837,
33,
7036,
16,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1544,
33,
7036,
16,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
7837,
33,
7036,
16,
7... |
return True else: return False | return existed | def remove_section(self, section): """Remove a file section.""" if section in self.__sections: del self.__sections[section] return True else: return False | 490cbf56868a5118b635128d808b569527adaab6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/490cbf56868a5118b635128d808b569527adaab6/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3288,
279,
585,
2442,
12123,
309,
2442,
316,
365,
16186,
11657,
30,
1464,
365,
16186,
11657,
63,
3464,
65,
327,
1053,
469,
30,
327,
1083,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3464,
12,
2890,
16,
2442,
4672,
3536,
3288,
279,
585,
2442,
12123,
309,
2442,
316,
365,
16186,
11657,
30,
1464,
365,
16186,
11657,
63,
3464,
65,
327,
1053,
469,
30,
327,
1083,
... |
def endTagColgroup(self, token): if self.ignoreEndTagColgroup(): assert self.parser.innerHTML self.parser.parseError() else: self.tree.openElements.pop() self.parser.phase = self.parser.phases["inTable"] def endTagCol(self, token): self.parser.parseError("no-end-tag", {"name": "col"}) def endTagOther(self, token): ignoreEndTag = self.ignoreEndTagColgroup() self.endTagColgroup(impliedTagToken("colgroup")) if not ignoreEndTag: self.parser.phase.processEndTag(token) class InTableBodyPhase(Phase): def __init__(self, parser, tree): Phase.__init__(self, parser, tree) self.startTagHandler = utils.MethodDispatcher([ ("html", self.startTagHtml), ("tr", self.startTagTr), (("td", "th"), self.startTagTableCell), (("caption", "col", "colgroup", "tbody", "tfoot", "thead"), self.startTagTableOther) ]) self.startTagHandler.default = self.startTagOther self.endTagHandler = utils.MethodDispatcher([ (("tbody", "tfoot", "thead"), self.endTagTableRowGroup), ("table", self.endTagTable), (("body", "caption", "col", "colgroup", "html", "td", "th", "tr"), self.endTagIgnore) ]) self.endTagHandler.default = self.endTagOther def clearStackToTableBodyContext(self): while self.tree.openElements[-1].name not in ("tbody", "tfoot", "thead", "html"): self.tree.openElements.pop() if self.tree.openElements[-1].name == "html": assert self.parser.innerHTML def processEOF(self): self.parser.phases["inTable"].processEOF() def processSpaceCharacters(self, token): self.parser.phases["inTable"].processSpaceCharacters(token) def processCharacters(self, token): self.parser.phases["inTable"].processCharacters(token) def startTagTr(self, token): self.clearStackToTableBodyContext() self.tree.insertElement(token) self.parser.phase = self.parser.phases["inRow"] def startTagTableCell(self, token): self.parser.parseError("unexpected-cell-in-table-body", {"name": token["name"]}) self.startTagTr(impliedTagToken("tr", "StartTag")) self.parser.phase.processStartTag(token) def startTagTableOther(self, token): if (self.tree.elementInScope("tbody", variant="table") or self.tree.elementInScope("thead", variant="table") or self.tree.elementInScope("tfoot", variant="table")): self.clearStackToTableBodyContext() self.endTagTableRowGroup( impliedTagToken(self.tree.openElements[-1].name)) self.parser.phase.processStartTag(token) else: assert self.parser.innerHTML self.parser.parseError() def startTagOther(self, token): self.parser.phases["inTable"].processStartTag(token) def endTagTableRowGroup(self, token): if self.tree.elementInScope(token["name"], variant="table"): self.clearStackToTableBodyContext() self.tree.openElements.pop() self.parser.phase = self.parser.phases["inTable"] else: | def startTagTableOther(self, token): if (self.tree.elementInScope("tbody", variant="table") or self.tree.elementInScope("thead", variant="table") or self.tree.elementInScope("tfoot", variant="table")): self.clearStackToTableBodyContext() self.endTagTableRowGroup( impliedTagToken(self.tree.openElements[-1].name)) self.parser.phase.processStartTag(token) else: assert self.parser.innerHTML self.parser.parseError() def startTagOther(self, token): self.parser.phases["inTable"].processStartTag(token) def endTagTableRowGroup(self, token): if self.tree.elementInScope(token["name"], variant="table"): self.clearStackToTableBodyContext() self.tree.openElements.pop() self.parser.phase = self.parser.phases["inTable"] else: self.parser.parseError("unexpected-end-tag-in-table-body", {"name": token["name"]}) def endTagTable(self, token): if (self.tree.elementInScope("tbody", variant="table") or self.tree.elementInScope("thead", variant="table") or self.tree.elementInScope("tfoot", variant="table")): self.clearStackToTableBodyContext() self.endTagTableRowGroup( impliedTagToken(self.tree.openElements[-1].name)) self.parser.phase.processEndTag(token) else: assert self.parser.innerHTML self.parser.parseError() def endTagIgnore(self, token): | def endTagColgroup(self, token): if self.ignoreEndTagColgroup(): # innerHTML case assert self.parser.innerHTML self.parser.parseError() else: self.tree.openElements.pop() self.parser.phase = self.parser.phases["inTable"] | d34b631d2e45870e85a6b7e5f824aa96f5632111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/d34b631d2e45870e85a6b7e5f824aa96f5632111/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
914,
1655,
12,
2890,
16,
1147,
4672,
309,
365,
18,
6185,
25633,
914,
1655,
13332,
468,
14129,
648,
1815,
365,
18,
4288,
18,
7872,
4870,
365,
18,
4288,
18,
2670,
668,
1435,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29765,
914,
1655,
12,
2890,
16,
1147,
4672,
309,
365,
18,
6185,
25633,
914,
1655,
13332,
468,
14129,
648,
1815,
365,
18,
4288,
18,
7872,
4870,
365,
18,
4288,
18,
2670,
668,
1435,
469,
... |
self.seriouslangs = biglangs4 | self.seriouslangs = self.biglangs4 | def __init__(self): family.Family.__init__(self) self.name = 'wiktionary' self.langs = { 'minnan':'zh-min-nan.wiktionary.org', 'nb':'no.wiktionary.org', 'zh-cn':'zh.wiktionary.org', 'zh-tw':'zh.wiktionary.org' } for lang in self.knownlanguages: self.langs[lang] = lang+'.wiktionary.org' # Most namespaces are inherited from family.Family. self.namespaces[4] = { '_default': u'Wiktionary', } self.namespaces[5] = { '_default': u'Wiktionary talk', 'de': u'Wiktionary Diskussion', 'pt': u'Wiktionary Discussão', 'es': u'Wiktionary Discusión', } | 651937642b433ffb0d404dd2d9ac8b476f95b1c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/651937642b433ffb0d404dd2d9ac8b476f95b1c9/wiktionary_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
24252,
814,
11,
365,
18,
4936,
87,
273,
288,
296,
1154,
13569,
11,
2497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
24252,
814,
11,
365,
18,
4936,
87,
273,
288,
296,
1154,
13569,
11,
2497,... |
self.log = self.TESTLOG | self.log = BiskitTest.TESTLOG self.verbosity = BiskitTest.VERBOSITY | def setUp( self ): self.local = self.__module__ == '__main__' self.log = self.TESTLOG | 4c19e08506a9ff4be6773ecd6bf934adadeda8a2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/4c19e08506a9ff4be6773ecd6bf934adadeda8a2/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
365,
262,
30,
365,
18,
3729,
273,
225,
365,
16186,
2978,
972,
422,
4940,
5254,
7250,
365,
18,
1330,
273,
365,
18,
16961,
4842,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
365,
262,
30,
365,
18,
3729,
273,
225,
365,
16186,
2978,
972,
422,
4940,
5254,
7250,
365,
18,
1330,
273,
365,
18,
16961,
4842,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print "->", msg | if self.verbose: print "-> '%s'" % msg | def send_message(self, msg): if self.control: print "->", msg self.control.sendall(msg + "\n") # KLUDGE: wait so that Hatari output comes before next prompt time.sleep(0.2) return True else: print "ERROR: no Hatari (control socket)" return False | 17b32a160c1759df43b716d874f6daaf4cf028d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8501/17b32a160c1759df43b716d874f6daaf4cf028d0/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
2150,
12,
2890,
16,
1234,
4672,
309,
365,
18,
7098,
30,
309,
365,
18,
11369,
30,
1172,
315,
2122,
1995,
87,
4970,
738,
1234,
365,
18,
7098,
18,
4661,
454,
12,
3576,
397,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2150,
12,
2890,
16,
1234,
4672,
309,
365,
18,
7098,
30,
309,
365,
18,
11369,
30,
1172,
315,
2122,
1995,
87,
4970,
738,
1234,
365,
18,
7098,
18,
4661,
454,
12,
3576,
397,
15... |
def __init__(self, sensor, hotstack): | def __init__(self, sensor, compute_expression, hotstack): | def __init__(self, sensor, hotstack): self.initpath = "/proc/sys/dev/sensors/" self.senspath = self.getSensorPath() self.sensor = sensor self.hotstack = hotstack self.washot = False | d4bead8f4304ca81687cb0fe137a4c581dbf6103 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d4bead8f4304ca81687cb0fe137a4c581dbf6103/idlebar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
10583,
16,
3671,
67,
8692,
16,
12811,
3772,
4672,
365,
18,
2738,
803,
273,
2206,
9381,
19,
9499,
19,
5206,
19,
87,
12575,
4898,
365,
18,
87,
773,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
10583,
16,
3671,
67,
8692,
16,
12811,
3772,
4672,
365,
18,
2738,
803,
273,
2206,
9381,
19,
9499,
19,
5206,
19,
87,
12575,
4898,
365,
18,
87,
773,
803,
... |
if sign == -1: strBody = '-' + strBody | if sign: strBody = '-' + strBody | def format(self, num): # positivize the numbers absNum = abs(num) if absNum == num: sign = 1 else: sign = -1 intPart, fracPart = divmod(absNum, 1.0) strInt = str(long(intPart)) if self.thousandSeparator is not None: strNew = '' while strInt: left, right = strInt[0:-3], strInt[-3:] if left == '': #strNew = self.thousandSeparator + right + strNew strNew = right + strNew else: strNew = self.thousandSeparator + right + strNew strInt = left strInt = strNew places, sep = self.decimalPlaces, self.decimalSeparator strip = places<=0 if places and strip: places = -places pattern = '%0.' + str(places) + 'f' strFrac = sep + (pattern % fracPart)[2:] if strip: while strFrac and strFrac[-1] in ['0',sep]: strFrac = strFrac[:-1] strBody = strInt + strFrac if sign == -1: strBody = '-' + strBody if self.prefix: strBody = self.prefix + strBody if self.suffix: strBody = strBody + self.suffix return strBody | 858a685ee925d25155edc66bb91066bef359c541 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/858a685ee925d25155edc66bb91066bef359c541/formatters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
818,
4672,
468,
949,
305,
427,
554,
326,
5600,
2417,
2578,
273,
2417,
12,
2107,
13,
309,
2417,
2578,
422,
818,
30,
1573,
273,
404,
469,
30,
1573,
273,
300,
21,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
818,
4672,
468,
949,
305,
427,
554,
326,
5600,
2417,
2578,
273,
2417,
12,
2107,
13,
309,
2417,
2578,
422,
818,
30,
1573,
273,
404,
469,
30,
1573,
273,
300,
21,
225... |
def __init__(self): """ >>> import re, geoip >>> a = geoip.chunzhen() >>> r = re.compile(a.regex) >>> r.match('geoip ') and True or False False >>> r.match('geoip a') and True or False False >>> r.match('geoip a.') and True or False False >>> r.match('geoip a.b') and True or False False >>> r.match('geoip 1') and True or False False >>> r.match('geoip 1.') and True or False False >>> r.match('geoip 1.0') and True or False True >>> r.match('geoip 1.1') and True or False True >>> r.match('geoip 1.1.0') and True or False True >>> r.match('geoip 1.1.1') and True or False True >>> r.match('geoip 1.1.1.1') and True or False True >>> r.match('geoip 1.0.0.1') and True or False True >>> r.match('geoip 1.1.1.1.1') and True or False False >>> r.match('geoip 255.1.1.1') and True or False False >>> r.match('geoip 1.255.1.1') and True or False False >>> r.match('geoip 1.1.255.1') and True or False False >>> r.match('geoip 1.1.1.255') and True or False False >>> r.match('geoip 1.1.1.0') and True or False False >>> r.match('geoip 0.1.1.1') and True or False False >>> r.match('geoip 1.1.1.a') and True or False False >>> """ num0_254 = '(?:25[0-4]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)' num1_254 = '(?:25[0-4]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?)' ipv4part = '(?:%s(?:\.%s){1,2}(?:\.%s)?)' % (num1_254, num0_254, num1_254) | def __init__(self): """ >>> import re, geoip >>> a = geoip.chunzhen() >>> r = re.compile(a.regex) >>> r.match('geoip ') and True or False False >>> r.match('geoip a') and True or False False >>> r.match('geoip a.') and True or False False >>> r.match('geoip a.b') and True or False False >>> r.match('geoip 1') and True or False False >>> r.match('geoip 1.') and True or False False >>> r.match('geoip 1.0') and True or False True >>> r.match('geoip 1.1') and True or False True >>> r.match('geoip 1.1.0') and True or False True >>> r.match('geoip 1.1.1') and True or False True >>> r.match('geoip 1.1.1.1') and True or False True >>> r.match('geoip 1.0.0.1') and True or False True >>> r.match('geoip 1.1.1.1.1') and True or False False >>> r.match('geoip 255.1.1.1') and True or False False >>> r.match('geoip 1.255.1.1') and True or False False >>> r.match('geoip 1.1.255.1') and True or False False >>> r.match('geoip 1.1.1.255') and True or False False >>> r.match('geoip 1.1.1.0') and True or False False >>> r.match('geoip 0.1.1.1') and True or False False >>> r.match('geoip 1.1.1.a') and True or False False >>> """ num0_254 = '(?:25[0-4]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)' num1_254 = '(?:25[0-4]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?)' ipv4part = '(?:%s(?:\.%s){1,2}(?:\.%s)?)' % (num1_254, num0_254, num1_254) | def __init__(self): """ | 0caf5a57fb7d5c962d91b5d29cb400b2d3eae008 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10749/0caf5a57fb7d5c962d91b5d29cb400b2d3eae008/geoip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
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,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
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,
-1... |
sys.stderr.write(py_exc.msg) | sys.stderr.write(py_exc.msg + '\n') | def compile(file, cfile=None, dfile=None, doraise=False): """Byte-compile one Python source file to Python bytecode. Arguments: file: source filename cfile: target filename; defaults to source with 'c' or 'o' appended ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo) dfile: purported filename; defaults to source (this is the filename that will show up in error messages) doraise: flag indicating whether or not an exception should be raised when a compile error is found. If an exception occurs and this flag is set to False, a string indicating the nature of the exception will be printed, and the function will return to the caller. If an exception occurs and this flag is set to True, a PyCompileError exception will be raised. Note that it isn't necessary to byte-compile Python modules for execution efficiency -- Python itself byte-compiles a module when it is loaded, and if it can, writes out the bytecode to the corresponding .pyc (or .pyo) file. However, if a Python installation is shared between users, it is a good idea to byte-compile all modules upon installation, since other users may not be able to write in the source directories, and thus they won't be able to write the .pyc/.pyo file, and then they would be byte-compiling every module each time it is loaded. This can slow down program start-up considerably. See compileall.py for a script/module that uses this module to byte-compile all installed files (or all files in selected directories). """ f = open(file, 'U') try: timestamp = long(os.fstat(f.fileno()).st_mtime) except AttributeError: timestamp = long(os.stat(file).st_mtime) codestring = f.read() f.close() if codestring and codestring[-1] != '\n': codestring = codestring + '\n' try: codeobject = __builtin__.compile(codestring, dfile or file,'exec') except Exception,err: py_exc = PyCompileError(err.__class__,err.args,dfile or file) if doraise: raise py_exc else: sys.stderr.write(py_exc.msg) return if cfile is None: cfile = file + (__debug__ and 'c' or 'o') fc = open(cfile, 'wb') fc.write('\0\0\0\0') wr_long(fc, timestamp) marshal.dump(codeobject, fc) fc.flush() fc.seek(0, 0) fc.write(MAGIC) fc.close() set_creator_type(cfile) | e537d6e93e0b5c37a96090df9ec831bd1bf8e2fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e537d6e93e0b5c37a96090df9ec831bd1bf8e2fb/py_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
12,
768,
16,
276,
768,
33,
7036,
16,
302,
768,
33,
7036,
16,
302,
10610,
784,
33,
8381,
4672,
3536,
3216,
17,
11100,
1245,
6600,
1084,
585,
358,
6600,
22801,
18,
225,
13599,
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,
4074,
12,
768,
16,
276,
768,
33,
7036,
16,
302,
768,
33,
7036,
16,
302,
10610,
784,
33,
8381,
4672,
3536,
3216,
17,
11100,
1245,
6600,
1084,
585,
358,
6600,
22801,
18,
225,
13599,
30,
... |
self.add_watch(join(self.repo.root, topdir), self.mask) | self.add_watch(join(self.wprefix, topdir), self.mask) | def scan(self, topdir=''): ds = self.repo.dirstate._map.copy() self.add_watch(join(self.repo.root, topdir), self.mask) for root, dirs, files in walk(self.repo, topdir): for d in dirs: self.add_watch(join(root, d), self.mask) wroot = root[len(self.wprefix):] for fn in files: wfn = join(wroot, fn) self.updatefile(wfn, self.getstat(wfn)) ds.pop(wfn, None) wtopdir = topdir if wtopdir and wtopdir[-1] != '/': wtopdir += '/' for wfn, state in ds.iteritems(): if not wfn.startswith(wtopdir): continue try: st = self.stat(wfn) except OSError: status = state[0] self.deletefile(wfn, status) else: self.updatefile(wfn, st) self.check_deleted('!') self.check_deleted('r') | 6ff83483504ce4a234866df36ef34927cd9c7a4f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/6ff83483504ce4a234866df36ef34927cd9c7a4f/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
1760,
1214,
2218,
11,
4672,
3780,
273,
365,
18,
7422,
18,
72,
920,
340,
6315,
1458,
18,
3530,
1435,
365,
18,
1289,
67,
7585,
12,
5701,
12,
2890,
18,
91,
3239,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
1760,
1214,
2218,
11,
4672,
3780,
273,
365,
18,
7422,
18,
72,
920,
340,
6315,
1458,
18,
3530,
1435,
365,
18,
1289,
67,
7585,
12,
5701,
12,
2890,
18,
91,
3239,
16,... |
return self.parentdocs[0] | return moduledoc __STRING_TESTLIST_PATTERN = compile_ast_matcher(""" (testlist (test (and_test (not_test (comparison (expr (xor_expr (and_expr (shift_expr (arith_expr (term (factor (power (atom STRING:stringval))))))))))))))""") def handle_special_module_vars(self, moduledoc): docformat_ast = self._module_var_ast(moduledoc, '__docformat__') if docformat_ast is not None: match, vars = self.__STRING_TESTLIST_PATTERN.match(docformat_ast) if match: moduledoc.docformat = eval(vars['stringval']) if moduledoc.children.has_key('__docformat__'): del moduledoc.children['__docformat__'] public_names_ast = self._module_var_ast(moduledoc, '__all__') if public_names_ast is not None: pass if moduledoc.children.has_key('__all__'): del moduledoc.children['__all__'] def _module_var_ast(self, moduledoc, name): variabledoc = moduledoc.children.get(name) if variabledoc is None: return None valuedoc = variabledoc.valuedoc if not isinstance(valuedoc, ValueDoc): return None return valuedoc.ast | def parse(self, filename): """ Parse the given python module, and return a C{ModuleDoc} containing its API documentation. @param filename: The filename of the module to parse. @type filename: C{string} @rtype: L{ModuleDoc} """ # Find the basedir of the package & the full module name. (basedir, module_name) = _find_module_from_filename(filename) | d4b62290bc22e63f8cc96e7c77bc6b16300b943b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d4b62290bc22e63f8cc96e7c77bc6b16300b943b/docparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1544,
4672,
3536,
2884,
326,
864,
5790,
1605,
16,
471,
327,
279,
385,
95,
3120,
1759,
97,
4191,
2097,
1491,
7323,
18,
225,
632,
891,
1544,
30,
1021,
1544,
434,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1544,
4672,
3536,
2884,
326,
864,
5790,
1605,
16,
471,
327,
279,
385,
95,
3120,
1759,
97,
4191,
2097,
1491,
7323,
18,
225,
632,
891,
1544,
30,
1021,
1544,
434,
326,... |
self.pieceHasher = self._new() | self.pieceHasher = self._newSHA1() | def update(self, data): """Add more data to the file hasher.""" if self.result is None: if self.done: raise HashError, "Already done, you can't add more data after calling digest() or verify()" if self.fileHasher is None: raise HashError, "file hasher not initialized" if not self.pieceHasher and self.size + len(data) > PIECE_SIZE: # Hash up to the piece size self.fileHasher.update(data[:(PIECE_SIZE - self.size)]) data = data[(PIECE_SIZE - self.size):] self.size = PIECE_SIZE self.pieceSize = 0 | 2f7adb1f817f4863e22f7a4aa26bb1aa59a83ac6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/665/2f7adb1f817f4863e22f7a4aa26bb1aa59a83ac6/Hash.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
501,
4672,
3536,
986,
1898,
501,
358,
326,
585,
15764,
12123,
309,
365,
18,
2088,
353,
599,
30,
309,
365,
18,
8734,
30,
1002,
2474,
668,
16,
315,
9430,
2731,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
501,
4672,
3536,
986,
1898,
501,
358,
326,
585,
15764,
12123,
309,
365,
18,
2088,
353,
599,
30,
309,
365,
18,
8734,
30,
1002,
2474,
668,
16,
315,
9430,
2731,
16,
... |
sage: EllipticCurve([-1, 1/4]).padic_E2(3001, 3, algorithm="sqrtp") | sage: EllipticCurve([-1, 1/4]).padic_E2(3001, 3, algorithm="sqrtp") | def padic_E2(self, p, prec=20, check=False, check_hypotheses=True, algorithm="auto"): r""" Returns the value of the $p$-adic modular form $E2$ for $(E, \omega)$ where $\omega$ is the usual invariant differential $dx/(2y + a_1 x + a_3)$. | 63521542caa47f4e41a79d0dad57595d4006d6a7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/63521542caa47f4e41a79d0dad57595d4006d6a7/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
41,
22,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
16,
4886,
1546,
6079,
6,
4672,
436,
8395,
2860,
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,
4627,
335,
67,
41,
22,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
16,
4886,
1546,
6079,
6,
4672,
436,
8395,
2860,
3... |
sockthread.set_daemon(True) | sockthread.daemon = True | def main(del_exitfunc=False): """Start the Python execution server in a subprocess In the Python subprocess, RPCServer is instantiated with handlerclass MyHandler, which inherits register/unregister methods from RPCHandler via the mix-in class SocketIO. When the RPCServer 'server' is instantiated, the TCPServer initialization creates an instance of run.MyHandler and calls its handle() method. handle() instantiates a run.Executive object, passing it a reference to the MyHandler object. That reference is saved as attribute rpchandler of the Executive instance. The Executive methods have access to the reference and can pass it on to entities that they command (e.g. RemoteDebugger.Debugger.start_debugger()). The latter, in turn, can call MyHandler(SocketIO) register/unregister methods via the reference to register and unregister themselves. """ global exit_now global quitting global no_exitfunc no_exitfunc = del_exitfunc port = 8833 #time.sleep(15) # test subprocess not responding if sys.argv[1:]: port = int(sys.argv[1]) sys.argv[:] = [""] sockthread = threading.Thread(target=manage_socket, name='SockThread', args=((LOCALHOST, port),)) sockthread.set_daemon(True) sockthread.start() while 1: try: if exit_now: try: exit() except KeyboardInterrupt: # exiting but got an extra KBI? Try again! continue try: seq, request = rpc.request_queue.get(block=True, timeout=0.05) except queue.Empty: continue method, args, kwargs = request ret = method(*args, **kwargs) rpc.response_queue.put((seq, ret)) except KeyboardInterrupt: if quitting: exit_now = True continue except SystemExit: raise except: type, value, tb = sys.exc_info() try: print_exception() rpc.response_queue.put((seq, None)) except: # Link didn't work, print same exception to __stderr__ traceback.print_exception(type, value, tb, file=sys.__stderr__) exit() else: continue | ca2ee0cba3df798b1d280959ee47fed853edc2f8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/ca2ee0cba3df798b1d280959ee47fed853edc2f8/run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
3771,
67,
8593,
644,
33,
8381,
4672,
3536,
1685,
326,
6600,
4588,
1438,
316,
279,
6652,
225,
657,
326,
6600,
6652,
16,
8295,
2081,
353,
17651,
598,
1838,
1106,
8005,
1503,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
3771,
67,
8593,
644,
33,
8381,
4672,
3536,
1685,
326,
6600,
4588,
1438,
316,
279,
6652,
225,
657,
326,
6600,
6652,
16,
8295,
2081,
353,
17651,
598,
1838,
1106,
8005,
1503,
16,
... |
url = "%s/++edittile++%s?id=%s&ls" % (self.context.absolute_url(), | url = "%s/++edittile++%s?id=%s&tiledata=%s" % (self.context.absolute_url(), | def handleAdd(self, action): data, errors = self.extractData() if errors: self.status = self.formErrorsMessage return typeName = self.tileType.__name__ tileId = data.pop('id', None) # Traverse to a new tile in the context, with no data tile = self.context.restrictedTraverse('@@' + typeName) tile.id = tileId dataManager = ITileDataManager(tile) dataManager.set(data) notify(ObjectCreatedEvent(tile)) # Get the tile URL, possibly with encoded data self.tileURL = absoluteURL(tile, tile.request) #IStatusMessage(self.request).addStatusMessage( #_(u"Tile saved to ${url}", mapping={'url': self.tileURL}), #type=u'info') IStatusMessage(self.request).addStatusMessage(_(u"Tile Saved")) tileInfoJson = {} tileInfoJson['tileURL'] = self.tileURL tileInfoJson['type'] = typeName tileInfoJson['id'] = tile.id url = "%s/++edittile++%s?id=%s&ls" % (self.context.absolute_url(), typeName, tile.id, json.dumps(tileInfoJson)) # Adding the form input to the url #for item in tile.request.form.keys(): #url += "&%s=%s" % (item, tile.request.form.get(item)) self.request.response.redirect(url) | 36864cc20cc1fb1c3c6ad04d1618dddbc101d88a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12277/36864cc20cc1fb1c3c6ad04d1618dddbc101d88a/add.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
986,
12,
2890,
16,
1301,
4672,
501,
16,
1334,
273,
365,
18,
8004,
751,
1435,
309,
1334,
30,
365,
18,
2327,
273,
365,
18,
687,
4229,
1079,
327,
225,
8173,
273,
365,
18,
15368,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
986,
12,
2890,
16,
1301,
4672,
501,
16,
1334,
273,
365,
18,
8004,
751,
1435,
309,
1334,
30,
365,
18,
2327,
273,
365,
18,
687,
4229,
1079,
327,
225,
8173,
273,
365,
18,
15368,
5... |
def writexml(self, writer): writer.write("<?%s %s?>" % (self.target, self.data)) | def writexml(self, writer, indent="", addindent="", newl=""): writer.write("%s<?%s %s?>%s" % (indent,self.target, self.data, newl)) | def writexml(self, writer): writer.write("<?%s %s?>" % (self.target, self.data)) | 2e6c591820a1112a2e8d88ebeec8241ccf2b5bcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2e6c591820a1112a2e8d88ebeec8241ccf2b5bcc/minidom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
338,
781,
12,
2890,
16,
2633,
4672,
2633,
18,
2626,
2932,
12880,
9,
87,
738,
87,
35,
2984,
738,
261,
2890,
18,
3299,
16,
365,
18,
892,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
338,
781,
12,
2890,
16,
2633,
4672,
2633,
18,
2626,
2932,
12880,
9,
87,
738,
87,
35,
2984,
738,
261,
2890,
18,
3299,
16,
365,
18,
892,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
help="sync deps for the specified (comma-separated) " "platform(s); 'all' will sync all platforms") | help="override deps for the specified (comma-separated) " "platform(s); 'all' will process all deps_os " "references") | def CMDsync(parser, args): """Checkout/update all modules.""" parser.add_option("--force", action="store_true", help="force update even for unchanged modules") parser.add_option("--nohooks", action="store_true", help="don't run hooks after the update is complete") parser.add_option("-r", "--revision", action="append", dest="revisions", metavar="REV", default=[], help="Enforces revision/hash for the primary solution. " "To modify a secondary solution, use it at least once " "for the primary solution and then use the format " "solution@rev/hash, e.g. -r src@123") parser.add_option("--head", action="store_true", help="skips any safesync_urls specified in " "configured solutions and sync to head instead") parser.add_option("--delete_unversioned_trees", action="store_true", help="delete any unexpected unversioned trees " "that are in the checkout") parser.add_option("--reset", action="store_true", help="resets any local changes before updating (git only)") parser.add_option("--deps", dest="deps_os", metavar="OS_LIST", help="sync deps for the specified (comma-separated) " "platform(s); 'all' will sync all platforms") parser.add_option("--manually_grab_svn_rev", action="store_true", help="Skip svn up whenever possible by requesting " "actual HEAD revision from the repository") (options, args) = parser.parse_args(args) client = GClient.LoadCurrentConfig(options) if not client: raise gclient_utils.Error("client not configured; see 'gclient config'") if not options.head: solutions = client.GetVar('solutions') if solutions: first = True for s in solutions: if s.get('safesync_url', None): # rip through revisions and make sure we're not over-riding # something that was explicitly passed has_key = False r_first = True for r in options.revisions: if (first and r_first) or r.split('@', 1)[0] == s['name']: has_key = True break r_first = False if not has_key: handle = urllib.urlopen(s['safesync_url']) rev = handle.read().strip() handle.close() if len(rev): options.revisions.append(s['name']+'@'+rev) first = False if options.verbose: # Print out the .gclient file. This is longer than if we just printed the # client dict, but more legible, and it might contain helpful comments. print(client.ConfigContent()) return client.RunOnDeps('update', args) | e3a9d563841ff7bafa084e00f2d50dbf0fb06adc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/e3a9d563841ff7bafa084e00f2d50dbf0fb06adc/gclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18052,
8389,
12,
4288,
16,
833,
4672,
3536,
18581,
19,
2725,
777,
4381,
12123,
2082,
18,
1289,
67,
3482,
2932,
413,
5734,
3113,
1301,
1546,
2233,
67,
3767,
3113,
2809,
1546,
5734,
1089,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18052,
8389,
12,
4288,
16,
833,
4672,
3536,
18581,
19,
2725,
777,
4381,
12123,
2082,
18,
1289,
67,
3482,
2932,
413,
5734,
3113,
1301,
1546,
2233,
67,
3767,
3113,
2809,
1546,
5734,
1089,
... |
blooditem.decay = 1 | basedef = wolfpack.charbase(corpse.charbaseid) | cc1c1c62b51c74873b3b4487d44bf8d1f34b96d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/cc1c1c62b51c74873b3b4487d44bf8d1f34b96d2/blades.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1026,
536,
273,
341,
355,
74,
2920,
18,
3001,
1969,
12,
3850,
84,
307,
18,
3001,
1969,
350,
13,
225,
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,
1026,
536,
273,
341,
355,
74,
2920,
18,
3001,
1969,
12,
3850,
84,
307,
18,
3001,
1969,
350,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
None, [cty.POINTER(FL_OBJECT), cty.c_int], | None, [cty.POINTER(FL_OBJECT), cty.c_int], | def fl_set_choice_fontstyle(ob, style): """ fl_set_choice_fontstyle(ob, style) """ _fl_set_choice_fontstyle(ob, style) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11569,
67,
5776,
4060,
12,
947,
16,
2154,
4672,
3536,
1183,
67,
542,
67,
11569,
67,
5776,
4060,
12,
947,
16,
2154,
13,
3536,
225,
389,
2242,
67,
542,
67,
11569,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11569,
67,
5776,
4060,
12,
947,
16,
2154,
4672,
3536,
1183,
67,
542,
67,
11569,
67,
5776,
4060,
12,
947,
16,
2154,
13,
3536,
225,
389,
2242,
67,
542,
67,
11569,
67... |
self.update(model, selector(kwargs['sender'])) signals.post_save.connect(on_related_update, sender=related) signals.post_delete.connect(on_related_update, sender=related) | self.update(model, selector(kwargs['instance'])) signals.post_save.connect(on_related_update, sender=related, weak=False) signals.post_delete.connect(on_related_update, sender=related, weak=False) | def on_related_update(**kwargs): self.update(model, selector(kwargs['sender'])) | 5169e27a53b50532668322a7815e10f81057c3eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14726/5169e27a53b50532668322a7815e10f81057c3eb/observer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
9243,
67,
2725,
12,
636,
4333,
4672,
365,
18,
2725,
12,
2284,
16,
3451,
12,
4333,
3292,
15330,
3546,
3719,
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,
603,
67,
9243,
67,
2725,
12,
636,
4333,
4672,
365,
18,
2725,
12,
2284,
16,
3451,
12,
4333,
3292,
15330,
3546,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.SetOptionValue(val*1000) | self.SetOptionValue(int(val*1000.0)) | def UpdateValue_FromControl(self): buf_size = 100 buf = win32gui.PyMakeBuffer(buf_size) nchars = win32gui.SendMessage(self.GetControl(), win32con.WM_GETTEXT, buf_size, buf) str_val = buf[:nchars] val = int(str_val) if val < 0 or val > 10: raise ValueError, "Value must be between 0 and 10" self.SetOptionValue(val*1000) | 11e93f4c563ffce482b8f022f8b9f659289d488b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/11e93f4c563ffce482b8f022f8b9f659289d488b/dialog_map.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
620,
67,
1265,
3367,
12,
2890,
4672,
1681,
67,
1467,
273,
2130,
1681,
273,
5657,
1578,
20292,
18,
9413,
6464,
1892,
12,
4385,
67,
1467,
13,
290,
7549,
273,
5657,
1578,
20292,
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,
2315,
620,
67,
1265,
3367,
12,
2890,
4672,
1681,
67,
1467,
273,
2130,
1681,
273,
5657,
1578,
20292,
18,
9413,
6464,
1892,
12,
4385,
67,
1467,
13,
290,
7549,
273,
5657,
1578,
20292,
18,
... |
devRoot = urlparse.urlunparse( ( urlRes.scheme, "%s@%s" % ( self.svnUser, urlRes.netloc ), urlRes.path, urlRes.params, urlRes.query, urlRes.fragment ) ) | urlRes[1] = "%s@%s" % ( self.svnUser, urlRes[1] ) devRoot = urlparse.urlunparse( urlRes ) | def __getDevCmdBase( self, path ): devRoot = self.getDevPath( path ) isHTTPS = False urlRes = urlparse.urlparse( devRoot ) args = [] if urlRes.scheme == "https": isHTTPS = True | df118ae2e7d9d1070c259cf9647b97d738f5f26a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/df118ae2e7d9d1070c259cf9647b97d738f5f26a/Distribution.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
8870,
5931,
2171,
12,
365,
16,
589,
262,
30,
4461,
2375,
273,
365,
18,
588,
8870,
743,
12,
589,
262,
353,
18657,
273,
1083,
880,
607,
273,
15185,
18,
718,
2670,
12,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
588,
8870,
5931,
2171,
12,
365,
16,
589,
262,
30,
4461,
2375,
273,
365,
18,
588,
8870,
743,
12,
589,
262,
353,
18657,
273,
1083,
880,
607,
273,
15185,
18,
718,
2670,
12,
4461,
... |
if subset_ids == None: subset_ids = [ obj['id'] for obj in objects ] | if subset_ids is None: subset_ids = self.getIdsSubset(objects) | def moveObjectsByDelta(self, ids, delta, subset_ids=None, suppress_events=False): """ Move specified sub-objects by delta. """ if type(ids) is str: ids = (ids,) min_position = 0 objects = list(self._objects) if subset_ids == None: subset_ids = [ obj['id'] for obj in objects ] else: subset_ids = list(subset_ids) # unify moving direction if delta > 0: ids = list(ids) ids.reverse() subset_ids.reverse() counter = 0 | 764bd81e86a7366bbb9cc712d991c1d7011b4e36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/764bd81e86a7366bbb9cc712d991c1d7011b4e36/OrderSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
4710,
858,
9242,
12,
2890,
16,
3258,
16,
3622,
16,
7931,
67,
2232,
33,
7036,
16,
12257,
67,
5989,
33,
8381,
4672,
3536,
9933,
1269,
720,
17,
6911,
635,
3622,
18,
3536,
309,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
4710,
858,
9242,
12,
2890,
16,
3258,
16,
3622,
16,
7931,
67,
2232,
33,
7036,
16,
12257,
67,
5989,
33,
8381,
4672,
3536,
9933,
1269,
720,
17,
6911,
635,
3622,
18,
3536,
309,
618,
... |
security.declareProtected(permissions.ModifyPortalContent, | security.declareProtected(CMFCorePermissions.ModifyPortalContent, | def __setitem__(self, name, field): assert name == field.getName() self.addField(field) | b9a35d44b511b5a532334179a24412a4695367d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9a35d44b511b5a532334179a24412a4695367d1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
508,
16,
652,
4672,
1815,
508,
422,
652,
18,
17994,
1435,
365,
18,
1289,
974,
12,
1518,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
508,
16,
652,
4672,
1815,
508,
422,
652,
18,
17994,
1435,
365,
18,
1289,
974,
12,
1518,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
import pprint for info in SeeClickFixNewsFeedScraper().raw_data(): pprint.pprint(info['detail']) | SeeClickFixNewsFeedScraper().display_data() | def save(self, old_record, list_record, detail_record): attributes = detail_record.pop('attributes', None) self.create_or_update(old_record, attributes, **detail_record) | 97a52757a27606c092907cae58b1231589874383 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/97a52757a27606c092907cae58b1231589874383/seeclickfix_retrieval.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1592,
67,
3366,
16,
666,
67,
3366,
16,
7664,
67,
3366,
4672,
1677,
273,
7664,
67,
3366,
18,
5120,
2668,
4350,
2187,
599,
13,
365,
18,
2640,
67,
280,
67,
2725,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1592,
67,
3366,
16,
666,
67,
3366,
16,
7664,
67,
3366,
4672,
1677,
273,
7664,
67,
3366,
18,
5120,
2668,
4350,
2187,
599,
13,
365,
18,
2640,
67,
280,
67,
2725,
12,... |
"default": "xmms -e $", \ | "default": "xdg-open $", \ | def __init__(self, filename): self.config_lock = thread.allocate_lock() self.config_lock.acquire() self.frame = None self.filename = filename self.parser = ConfigParser.ConfigParser() self.parser.read([self.filename]) LOGDIR=os.path.join(self.filename.rsplit(os.sep, 1)[0], "logs") self.sections = { | d98e6e2c81c2a320ee477a00afb7522ee3404178 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/d98e6e2c81c2a320ee477a00afb7522ee3404178/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1544,
4672,
365,
18,
1425,
67,
739,
273,
2650,
18,
16247,
67,
739,
1435,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
365,
18,
3789,
273,
599,
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,
1001,
2738,
972,
12,
2890,
16,
1544,
4672,
365,
18,
1425,
67,
739,
273,
2650,
18,
16247,
67,
739,
1435,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
365,
18,
3789,
273,
599,
365,
18... |
class TestProgram: | class TestProgram(object): | def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): self.stream.write("FAILED (") failed, errored = map(len, (result.failures, result.errors)) if failed: self.stream.write("failures=%d" % failed) if errored: if failed: self.stream.write(", ") self.stream.write("errors=%d" % errored) self.stream.writeln(")") else: self.stream.writeln("OK") return result | f64c3e352b01b2c5c40815e4240b2d73462e2ba7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/f64c3e352b01b2c5c40815e4240b2d73462e2ba7/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1842,
4672,
315,
1997,
326,
864,
1842,
648,
578,
1842,
11371,
1199,
563,
273,
365,
6315,
6540,
1253,
1435,
8657,
273,
813,
18,
957,
1435,
1842,
12,
2088,
13,
2132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16,
1842,
4672,
315,
1997,
326,
864,
1842,
648,
578,
1842,
11371,
1199,
563,
273,
365,
6315,
6540,
1253,
1435,
8657,
273,
813,
18,
957,
1435,
1842,
12,
2088,
13,
2132,
... |
comment.append('[%s Yahoo cache]' % re.sub('&appid=[^&]*','', urllib.unquote(cache_url))) | comment.append('[%s Yahoo cache]' % re.sub('&appid=[^&]*','', urllib2.unquote(cache_url))) | def add_in_urllist(url, add_item, engine, cache_url = None): if (engine == 'google' and config.copyright_check_in_source_google) or \ (engine == 'yahoo' and config.copyright_check_in_source_yahoo) or \ (engine == 'msn' and config.copyright_check_in_source_msn): check_in_source = True else: check_in_source = False if check_in_source or config.copyright_show_date or config.copyright_show_length: s = None cache = False # list to store date, length, cache URL comment = list() try: s = WebPage(add_item) except URL_exclusion: pass except NoWebPage: cache = True if s: # Before of add url in result list, perform the check in source if check_in_source: if s.check_in_source(): return if config.copyright_show_date: date = s.lastmodified() if date: if date[:3] != time.localtime()[:3]: comment.append("%s/%s/%s" % (date[2], date[1], date[0])) unit = 'bytes' if config.copyright_show_length: length = s.length() if length: # convert in kilobyte length /= 1024 unit = 'KB' if length > 1024: # convert in megabyte length /= 1024 unit = 'MB' if length > 0: comment.append("%d %s" % (length, unit)) if cache: if cache_url: if engine == 'google': comment.append('[http://www.google.com/search?sourceid=navclient&q=cache:%s Google cache]' % short_url(add_item)) elif engine == 'yahoo': #cache = False comment.append('[%s Yahoo cache]' % re.sub('&appid=[^&]*','', urllib.unquote(cache_url))) elif engine == 'msn': comment.append('[%s Live cache]' % re.sub('&lang=[^&]*','', cache_url)) else: comment.append('[http://web.archive.org/*/%s archive.org]' % short_url(add_item)) for i in range(len(url)): if add_item in url[i]: if engine not in url[i][1]: if url[i][2]: comment = url[i][2] url[i] = (add_item, url[i][1] + ', ' + engine, comment) return url.append((add_item, engine, comment)) return | 902bc2fa79257790ddfb8b1987e8f0ae11014725 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/902bc2fa79257790ddfb8b1987e8f0ae11014725/copyright.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
267,
67,
718,
1098,
12,
718,
16,
527,
67,
1726,
16,
4073,
16,
1247,
67,
718,
273,
599,
4672,
225,
309,
261,
8944,
422,
296,
9536,
11,
471,
642,
18,
29187,
67,
1893,
67,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
267,
67,
718,
1098,
12,
718,
16,
527,
67,
1726,
16,
4073,
16,
1247,
67,
718,
273,
599,
4672,
225,
309,
261,
8944,
422,
296,
9536,
11,
471,
642,
18,
29187,
67,
1893,
67,
26... |
log.msg('%s: fetchGroup()' % self.ip) self.sendLine('GROUP %s' % group) | """fetchGroup(self, groupName) Get group information for the specified group from the server. gotGroup() is called on success, getGroupFailed() on failure. """ self.sendLine('GROUP %s' % (group,)) | def fetchGroup(self, group): log.msg('%s: fetchGroup()' % self.ip) self.sendLine('GROUP %s' % group) self._newState(None, self.getGroupFailed, self._headerGroup) | 985ff3035a15b42df933b663791277355aa6409d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/985ff3035a15b42df933b663791277355aa6409d/nntp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
1114,
12,
2890,
16,
1041,
4672,
3536,
5754,
1114,
12,
2890,
16,
11619,
13,
225,
968,
1041,
1779,
364,
326,
1269,
1041,
628,
326,
1438,
18,
225,
2363,
1114,
1435,
353,
2566,
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,
2158,
1114,
12,
2890,
16,
1041,
4672,
3536,
5754,
1114,
12,
2890,
16,
11619,
13,
225,
968,
1041,
1779,
364,
326,
1269,
1041,
628,
326,
1438,
18,
225,
2363,
1114,
1435,
353,
2566,
603,
... |
lastNode.parent.childNodes.remove(lastNode) | lastNode.parent.removeChild(lastNode) | def endTagFormatting(self, name): """The much-feared adoption agency algorithm""" # XXX I don't like while True + break... too much # possibility of infinite loops while True: # Step 1 paragraph 1 afeElement = self.parser.elementInActiveFormattingElements(name) if not afeElement or (afeElement in self.parser.openElements and not self.parser.elementInScope(afeElement.name)): self.parser.parseError() return | 4a9afa5240a765a75eb29592887545baf51a5215 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/4a9afa5240a765a75eb29592887545baf51a5215/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23974,
12,
2890,
16,
508,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
11329,
467,
2727,
1404,
3007,
1323,
1053,
397,
898,
2777,
4885,
9816,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29765,
23974,
12,
2890,
16,
508,
4672,
3536,
1986,
9816,
17,
3030,
2258,
1261,
3482,
1737,
2075,
4886,
8395,
468,
11329,
467,
2727,
1404,
3007,
1323,
1053,
397,
898,
2777,
4885,
9816,
468,... |
if self.props.wrap_width != cell_area.width: | if not 0 <= cell_area.width - self.props.wrap_width <= 1: print cell_area.width | def do_render(self, window, widget, background_area, cell_area, expose_area, flags): if self.props.wrap_width != cell_area.width: self.props.wrap_width = cell_area.width self.column.queue_resize() | 696cc8ce62abdc047b1b07d8e7bc0195ef470540 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/696cc8ce62abdc047b1b07d8e7bc0195ef470540/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5902,
12,
2890,
16,
2742,
16,
3604,
16,
5412,
67,
5036,
16,
2484,
67,
5036,
16,
15722,
67,
5036,
16,
2943,
4672,
225,
309,
486,
374,
1648,
2484,
67,
5036,
18,
2819,
300,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5902,
12,
2890,
16,
2742,
16,
3604,
16,
5412,
67,
5036,
16,
2484,
67,
5036,
16,
15722,
67,
5036,
16,
2943,
4672,
225,
309,
486,
374,
1648,
2484,
67,
5036,
18,
2819,
300,
365... |
bug_num = each_bug.split( '.' )[1] | bug_num = each_bug.split( '.' )[-2] | def list_bugs(dictList): ''' Takes a dictionary of key,value pair where: key => filename value => subject string ''' log.msg( "\n\nFollowing are the list of bugs present.\n" ) for each_bug in dictList.keys(): bug_num = each_bug.split( '.' )[1] bug_subject = dictList[each_bug] log.msg( "%s\t%s\n" % ( bug_num, bug_subject ) ) | 2b1fdf487a25b5266a12bcd93ebfb4716889d0ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/2b1fdf487a25b5266a12bcd93ebfb4716889d0ab/AptOfflineCoreLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
19381,
12,
1576,
682,
4672,
9163,
23004,
279,
3880,
434,
498,
16,
1132,
3082,
1625,
30,
498,
516,
1544,
460,
516,
3221,
533,
9163,
613,
18,
3576,
12,
1548,
82,
64,
82,
8328,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
666,
67,
19381,
12,
1576,
682,
4672,
9163,
23004,
279,
3880,
434,
498,
16,
1132,
3082,
1625,
30,
498,
516,
1544,
460,
516,
3221,
533,
9163,
613,
18,
3576,
12,
1548,
82,
64,
82,
8328,
... |
def upgrade_token(self, token=None, url=atom.http_core.Uri.parse_uri): | def upgrade_token(self, token=None, url=atom.http_core.Uri.parse_uri( 'https://www.google.com/accounts/AuthSubSessionToken')): | def upgrade_token(self, token=None, url=atom.http_core.Uri.parse_uri): """Asks the Google auth server for a multi-use AuthSub token. | 9a245cb886297a554f78381cc824e04fadebdfda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/9a245cb886297a554f78381cc824e04fadebdfda/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8400,
67,
2316,
12,
2890,
16,
1147,
33,
7036,
16,
880,
33,
7466,
18,
2505,
67,
3644,
18,
3006,
18,
2670,
67,
1650,
12,
296,
4528,
2207,
5591,
18,
9536,
18,
832,
19,
13739,
19,
1730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8400,
67,
2316,
12,
2890,
16,
1147,
33,
7036,
16,
880,
33,
7466,
18,
2505,
67,
3644,
18,
3006,
18,
2670,
67,
1650,
12,
296,
4528,
2207,
5591,
18,
9536,
18,
832,
19,
13739,
19,
1730,
... |
key[0] not in self.contribs or key[1] not in self.statistics: | key[0] not in self.choices or key[1] not in self.statistics: | def __setitem__(self, key, value): if len(key) != 2 or \ key[0] not in self.contribs or key[1] not in self.statistics: raise IndexError self.payoffs[(key[0], key[1])] = value | 5b71669e95cb1e59558f3b550ecd43f33998cb0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12755/5b71669e95cb1e59558f3b550ecd43f33998cb0b/msgame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
309,
562,
12,
856,
13,
480,
576,
578,
521,
498,
63,
20,
65,
486,
316,
365,
18,
11937,
578,
498,
63,
21,
65,
486,
316,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
309,
562,
12,
856,
13,
480,
576,
578,
521,
498,
63,
20,
65,
486,
316,
365,
18,
11937,
578,
498,
63,
21,
65,
486,
316,
365,
... |
ERROR_DIR_NOT_SUPPORTED = 50 | ERROR_NOT_SUPPORTED = 50 | def _datetime2filetime(dtime): """Convert a FILETIME struct info datetime.datetime object.""" if dtime is None: return libdokan.FILETIME(0,0) if dtime == DATETIME_ZERO: return libdokan.FILETIME(0,0) return _timestamp2filetime(_datetime2timestamp(dtime)) | de36bf4ac3c2e00d4f853964c0f3379ce7efad59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/de36bf4ac3c2e00d4f853964c0f3379ce7efad59/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6585,
22,
7540,
2374,
12,
72,
957,
4672,
3536,
2723,
279,
7527,
4684,
1958,
1123,
3314,
18,
6585,
733,
12123,
309,
302,
957,
353,
599,
30,
327,
2561,
72,
601,
304,
18,
3776,
4684,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6585,
22,
7540,
2374,
12,
72,
957,
4672,
3536,
2723,
279,
7527,
4684,
1958,
1123,
3314,
18,
6585,
733,
12123,
309,
302,
957,
353,
599,
30,
327,
2561,
72,
601,
304,
18,
3776,
4684,... |
"(Monday - Friday) or the day in the cycle?") | " (Monday - Friday) or the day in the cycle?") | def next(self): session = self.getSessionData() if session['similar_days']: return SimpleSlotEntryStep(self.context, self.request) else: if session['cycle'] == 'weekly': return WeeklySlotEntryStep(self.context, self.request) else: return SequentialModelStep(self.context, self.request) | 603db6eab58b78a5d92e8f1bda9541fad1c87739 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/603db6eab58b78a5d92e8f1bda9541fad1c87739/ttwizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
1339,
273,
365,
18,
588,
2157,
751,
1435,
309,
1339,
3292,
22985,
67,
9810,
3546,
30,
327,
4477,
8764,
1622,
4160,
12,
2890,
18,
2472,
16,
365,
18,
2293,
13,
469,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1339,
273,
365,
18,
588,
2157,
751,
1435,
309,
1339,
3292,
22985,
67,
9810,
3546,
30,
327,
4477,
8764,
1622,
4160,
12,
2890,
18,
2472,
16,
365,
18,
2293,
13,
469,... |
print "action=", action | def list_files(self): """List files by previously-defined actions (those actions which list files for deletion)""" for action in self.actions: print "action=", action action_type = action[0] action_path = action[1] if 'list_children' == action_type: rootpath = os.path.expanduser(action_path) directories = action[2] for pathname in children_in_directory(rootpath, directories): yield pathname elif 'list_file' == action_type: pathname = os.path.expanduser(action_path) if os.path.lexists(pathname): yield pathname elif 'list_glob' == action_type: for pathname in glob.iglob(os.path.expanduser(action_path)): yield pathname else: raise RuntimeError("Unknown action type: '%s'" % action_type) | ea9d91e3dc4bdb14657264caf943542757e2922c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/ea9d91e3dc4bdb14657264caf943542757e2922c/Action.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
3536,
682,
1390,
635,
7243,
17,
2178,
4209,
261,
451,
2584,
4209,
1492,
666,
1390,
364,
10899,
15574,
364,
1301,
316,
365,
18,
4905,
30,
1301,
67,
723,
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,
666,
67,
2354,
12,
2890,
4672,
3536,
682,
1390,
635,
7243,
17,
2178,
4209,
261,
451,
2584,
4209,
1492,
666,
1390,
364,
10899,
15574,
364,
1301,
316,
365,
18,
4905,
30,
1301,
67,
723,
2... | |
document.cookie = \"%s\" | document.cookie = \"%s\"; | def js_output(self, attrs=None): # Print javascript return """ <SCRIPT LANGUAGE="JavaScript"> <!-- begin hiding document.cookie = \"%s\" // end hiding --> </script> """ % ( self.OutputString(attrs), ) | 03a33ea3a85f9f2ed158f678295b7605f2f9721a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/03a33ea3a85f9f2ed158f678295b7605f2f9721a/Cookie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3828,
67,
2844,
12,
2890,
16,
3422,
33,
7036,
4672,
468,
3038,
11341,
327,
3536,
411,
10885,
24748,
1546,
16634,
6441,
5719,
413,
2376,
366,
10415,
1668,
18,
8417,
273,
22049,
87,
2412,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3828,
67,
2844,
12,
2890,
16,
3422,
33,
7036,
4672,
468,
3038,
11341,
327,
3536,
411,
10885,
24748,
1546,
16634,
6441,
5719,
413,
2376,
366,
10415,
1668,
18,
8417,
273,
22049,
87,
2412,
... |
clauses.append(dictionaryTable.c.HeadwordSimplified == headwordStr) | clauses.append(self.headwordSearchStrategy.getWhereClause( dictionaryTable.c.HeadwordSimplified, headwordStr)) filters.append((['HeadwordSimplified'], self.headwordSearchStrategy.getMatchFunction(headwordStr))) | def _getHeadwordSearch(self, headwordStr, **options): filters = [ (['HeadwordSimplified'], lambda headword: headword == headwordStr), (['HeadwordTraditional'], lambda headword: headword == headwordStr)] | 7768f0434aecc2e353c85a4406b0b7da401f6ea2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/7768f0434aecc2e353c85a4406b0b7da401f6ea2/dictionary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1414,
1095,
2979,
12,
2890,
16,
910,
1095,
1585,
16,
2826,
2116,
4672,
3415,
273,
306,
261,
3292,
1414,
1095,
24490,
939,
17337,
3195,
910,
1095,
30,
910,
1095,
422,
910,
1095,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1414,
1095,
2979,
12,
2890,
16,
910,
1095,
1585,
16,
2826,
2116,
4672,
3415,
273,
306,
261,
3292,
1414,
1095,
24490,
939,
17337,
3195,
910,
1095,
30,
910,
1095,
422,
910,
1095,... |
if normalize: pointweight /= float(len(data)) | if normalize: pointweight /= float(len(data)) | def printusage(): import sys print 'Usage: 1Dbinning.py -f data_file \\' print ' -o output_file \\' print ' {-bins NUM} \\' print ' {-binrange NUM-NUM} \\' print ' {-normalize} \\' print ' {-gnuplot script_name}' sys.exit() | 6331d08b3547dcf5a4c768f1a0fc2804612581e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8376/6331d08b3547dcf5a4c768f1a0fc2804612581e1/1Dbinning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
9167,
13332,
1930,
2589,
1172,
296,
5357,
30,
404,
4331,
267,
2093,
18,
2074,
300,
74,
501,
67,
768,
3639,
1736,
11,
1172,
296,
10792,
300,
83,
876,
67,
768,
1377,
1736,
11,
1172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
9167,
13332,
1930,
2589,
1172,
296,
5357,
30,
404,
4331,
267,
2093,
18,
2074,
300,
74,
501,
67,
768,
3639,
1736,
11,
1172,
296,
10792,
300,
83,
876,
67,
768,
1377,
1736,
11,
1172... |
idxNamesBlacklist = [] for dictName in param: self.__addCol(self.mappingBlacklist, dictName, mappingTypeBlacklist.get(dictName), colsBlacklist, colsCreateBlacklist, idxNamesBlacklist) if type(retcolsBlacklist) == type([]): for dictName in retcolsBlacklist: self.__addCol(self.mappingBlacklist, dictName, mappingTypeBlacklist.get(dictName), colsBlacklist, colsCreateBlacklist) | for dictName in self.param: colName = self.mappingBlacklist.get(dictName, dictName) self.wherecolsBlacklist.append(colName) if colName in colsBlacklist: continue colType = mappingTypeBlacklist.get(dictName) if colType == None or colType == '': colType = 'VARCHAR(255)' colsBlacklist.append(colName) colsCreateBlacklist.append("`%s` %s" % (colName, colType)) if type(self.retcolsBlacklist) == type([]): for dictName in self.retcolsBlacklist: colName = self.mappingBlacklist.get(dictName, dictName) if colName in colsBlacklist: continue colType = mappingTypeBlacklist.get(dictName) if colType == None or colType == '': colType = 'VARCHAR(255)' colsBlacklist.append(colName) colsCreateBlacklist.append("`%s` %s" % (colName, colType)) | def start(self): if self.factory == None: raise ParamError("this module need reference to fatory and database connection pool") | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print 'encrypting image' | print 'Encrypting image' | def encrypt_image(file): print 'encrypting image' enc_file = '%s.part' % (file.replace('.tar.gz', '')) key = (hex(BN.rand(16 * 8))[2:34]).replace('L', 'c') print 'key: %s' % (key) iv = (hex(BN.rand(16 * 8))[2:34]).replace('L', 'c') print 'iv: %s' % (iv) k=EVP.Cipher(alg='aes_128_cbc', key=unhexlify(key), iv=unhexlify(iv), op=1) in_file = open(file) out_file = open(enc_file, "wb") encrypt_file(k, in_file, out_file) in_file.close() out_file.close() bundled_size = os.path.getsize(enc_file) return enc_file, key, iv, bundled_size | e404856079339a2c03e832ed19656e02a0c590b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12707/e404856079339a2c03e832ed19656e02a0c590b2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7347,
67,
2730,
12,
768,
4672,
1172,
296,
13129,
310,
1316,
11,
2446,
67,
768,
273,
1995,
87,
18,
2680,
11,
738,
261,
768,
18,
2079,
2668,
18,
11718,
18,
9764,
2187,
875,
3719,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7347,
67,
2730,
12,
768,
4672,
1172,
296,
13129,
310,
1316,
11,
2446,
67,
768,
273,
1995,
87,
18,
2680,
11,
738,
261,
768,
18,
2079,
2668,
18,
11718,
18,
9764,
2187,
875,
3719,
225,
... |
version = "1.0" with JSContext(Global()) as ctxt: | version = "1.0" with JSContext(Global()) as ctxt: | def testGlobal(self): class Global(JSClass): version = "1.0" with JSContext(Global()) as ctxt: vars = ctxt.locals # getter self.assertEquals(Global.version, str(vars.version)) self.assertEquals(Global.version, str(ctxt.eval("version"))) self.assertEquals(None, ctxt.eval("nonexists")) # setter self.assertEquals(2.0, float(ctxt.eval("version = 2.0"))) self.assertEquals(2.0, float(vars.version)) | 550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5160,
12,
2890,
4672,
667,
8510,
12,
6479,
797,
4672,
1177,
273,
315,
21,
18,
20,
6,
225,
598,
6756,
1042,
12,
5160,
10756,
487,
14286,
30,
4153,
273,
14286,
18,
17977,
225,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5160,
12,
2890,
4672,
667,
8510,
12,
6479,
797,
4672,
1177,
273,
315,
21,
18,
20,
6,
225,
598,
6756,
1042,
12,
5160,
10756,
487,
14286,
30,
4153,
273,
14286,
18,
17977,
225,
468,... |
figure_frame.figure.set_dpi(self.dpi.value) | def display(self, workspace): figure_frame = workspace.create_or_find_figure() figure_frame.clf() figure_frame.figure.set_dpi(self.dpi.value) self.display_on_figure(workspace, figure_frame.figure) | edc598b9bdc386736a3751d962a840353fbc9c99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/edc598b9bdc386736a3751d962a840353fbc9c99/displaydataonimage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
12,
2890,
16,
6003,
4672,
7837,
67,
3789,
273,
6003,
18,
2640,
67,
280,
67,
4720,
67,
19675,
1435,
7837,
67,
3789,
18,
830,
74,
1435,
365,
18,
5417,
67,
265,
67,
19675,
12,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2562,
12,
2890,
16,
6003,
4672,
7837,
67,
3789,
273,
6003,
18,
2640,
67,
280,
67,
4720,
67,
19675,
1435,
7837,
67,
3789,
18,
830,
74,
1435,
365,
18,
5417,
67,
265,
67,
19675,
12,
149... | |
self.bounceMail(REQUEST) | def checkMail(self, REQUEST): # Check for ip, loops and spam. # Check for correct IP mtahosts = self.getValueFor('mtahosts') if mtahosts: if 'HTTP_X_FORWARDED_FOR' in self.REQUEST.environ.keys(): REMOTE_IP = self.REQUEST.environ['HTTP_X_FORWARDED_FOR'] else: REMOTE_IP = self.REQUEST.environ['REMOTE_ADDR'] | a4fba702f2b4ef389d637a1ad4596ea69f966fcf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6274/a4fba702f2b4ef389d637a1ad4596ea69f966fcf/XWFMailingList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
6759,
12,
2890,
16,
12492,
4672,
468,
2073,
364,
2359,
16,
14075,
471,
24824,
18,
225,
468,
2073,
364,
3434,
2971,
312,
2351,
11588,
273,
365,
18,
24805,
1290,
2668,
1010,
69,
11588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
6759,
12,
2890,
16,
12492,
4672,
468,
2073,
364,
2359,
16,
14075,
471,
24824,
18,
225,
468,
2073,
364,
3434,
2971,
312,
2351,
11588,
273,
365,
18,
24805,
1290,
2668,
1010,
69,
11588... | |
Tag.objects.update_tags(instance, "") | if instance._get_pk_val() is None: delattr(instance, "__%s_save_defered_tags" % self.name) else: Tag.objects.update_tags(instance, "") | def __delete__(self, instance): """ Clear all of an object's tags. """ if instance is None: raise AttributeError("%s can only be cleared on instances." % self.name) Tag.objects.update_tags(instance, "") | 91bb4f7abfb9bbcc538cd88e93eef86afb398f18 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3660/91bb4f7abfb9bbcc538cd88e93eef86afb398f18/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
972,
12,
2890,
16,
791,
4672,
3536,
10121,
777,
434,
392,
733,
1807,
2342,
18,
3536,
309,
791,
353,
599,
30,
1002,
6394,
27188,
87,
848,
1338,
506,
16054,
603,
3884,
1199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
972,
12,
2890,
16,
791,
4672,
3536,
10121,
777,
434,
392,
733,
1807,
2342,
18,
3536,
309,
791,
353,
599,
30,
1002,
6394,
27188,
87,
848,
1338,
506,
16054,
603,
3884,
1199,
... |
self.tiireview_serv.createAssignment("tii-unit-test", tiiasnnid, opts) tiiresult = self.tiireview_serv.getAssignment("tii-unit-test", tiiasnnid) | self.tiireview_serv.createAssignment(tiisiteid, tiiasnnid, opts) tiiresult = self.tiireview_serv.getAssignment(tiisiteid, tiiasnnid) | def testCheckAgainstInstitutionRepository(self): """ institution_check / searchinstitution values of 0 to not check against institutional repository, 1 check against it. """ opts = HashMap() opts.put('institution_check','1') tiiasnnid = "/unittests/useinstitution/"+str(uuid.uuid1()) # Test creating an assignment checked against Journals self.tiireview_serv.createAssignment("tii-unit-test", tiiasnnid, opts) tiiresult = self.tiireview_serv.getAssignment("tii-unit-test", tiiasnnid) self.assertEquals(str(tiiresult['object']['searchinstitution']),str('1')) | 63c15d9c9b1090a570c367a1552444d43bc1162b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3642/63c15d9c9b1090a570c367a1552444d43bc1162b/turnitin-tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1564,
23530,
334,
382,
14278,
3305,
12,
2890,
4672,
3536,
1804,
305,
1421,
67,
1893,
342,
1623,
267,
14278,
924,
434,
374,
358,
486,
866,
5314,
1804,
305,
1421,
287,
3352,
16,
404,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1564,
23530,
334,
382,
14278,
3305,
12,
2890,
4672,
3536,
1804,
305,
1421,
67,
1893,
342,
1623,
267,
14278,
924,
434,
374,
358,
486,
866,
5314,
1804,
305,
1421,
287,
3352,
16,
404,... |
help="high order address bit to use for numa mapping") | help="high order address bit to use for numa mapping. " \ "0 = highest bit, not specified = lowest bit") | def define_options(parser): # ruby network options parser.add_option("--topology", type="string", default="Crossbar", help="check src/mem/ruby/network/topologies for complete set") parser.add_option("--mesh-rows", type="int", default=1, help="the number of rows in the mesh topology") parser.add_option("--garnet-network", type="string", default=none, help="'fixed'|'flexible'") # ruby mapping options parser.add_option("--numa-high-bit", type="int", default=none, help="high order address bit to use for numa mapping") # ruby sparse memory options parser.add_option("--use-map", action="store_true", default=False) parser.add_option("--map-levels", type="int", default=4) # ruby debug cmd line options parser.add_option("--ruby-debug", action="store_true", default=False) parser.add_option("--ruby-debug-cycle", type="int", default=1) protocol = buildEnv['PROTOCOL'] exec "import %s" % protocol eval("%s.define_options(parser)" % protocol) | 593ae7457e0bd1150a08535ee6c79d52a0dfd175 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6787/593ae7457e0bd1150a08535ee6c79d52a0dfd175/Ruby.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4426,
67,
2116,
12,
4288,
4672,
468,
22155,
2483,
702,
2082,
18,
1289,
67,
3482,
2932,
413,
25572,
3113,
618,
1546,
1080,
3113,
805,
1546,
13941,
3215,
3113,
2809,
1546,
1893,
1705,
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,
4426,
67,
2116,
12,
4288,
4672,
468,
22155,
2483,
702,
2082,
18,
1289,
67,
3482,
2932,
413,
25572,
3113,
618,
1546,
1080,
3113,
805,
1546,
13941,
3215,
3113,
2809,
1546,
1893,
1705,
19,
... |
Raises the given exception type in the context of this thread. If the thread is busy in a system call (time.sleep(), socket.accept(), ...) the exception is simply ignored. If you are sure that your exception should terminate the thread, one way to ensure that it works is: t = InterruptableThread(...) ... t.raise_exception(SomeException) while t.isAlive(): time.sleep(0.1) t.raise_exception(SomeException) If the exception is to be caught by the thread, you need a way to check that your thread has caught it. CAREFUL : this method is executed in the context of the caller thread, to raise an exception in the context of the thread represented by this instance. | def raise_exception(self, exctype): """ Raises the given exception type in the context of this thread. | 848318d570fb2ae180c415d178999a9a3a724172 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/848318d570fb2ae180c415d178999a9a3a724172/thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
67,
4064,
12,
2890,
16,
431,
12387,
4672,
3536,
20497,
326,
864,
1520,
618,
316,
326,
819,
434,
333,
2650,
18,
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,
1002,
67,
4064,
12,
2890,
16,
431,
12387,
4672,
3536,
20497,
326,
864,
1520,
618,
316,
326,
819,
434,
333,
2650,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if func.GetInfo('needs_size'): | if func.GetInfo('needs_size') and not func.name.endswith('Bucket'): | def InitFunction(self, func): """Add or adjust anything type specific for this function.""" if func.GetInfo('needs_size'): func.AddCmdArg(DataSizeArgument('data_size')) | 2297c9a1cce6c17803191d6b953d360c43fc8d75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2297c9a1cce6c17803191d6b953d360c43fc8d75/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
986,
578,
5765,
6967,
618,
2923,
364,
333,
445,
12123,
309,
1326,
18,
967,
966,
2668,
20600,
67,
1467,
6134,
471,
486,
1326,
18,
529,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
986,
578,
5765,
6967,
618,
2923,
364,
333,
445,
12123,
309,
1326,
18,
967,
966,
2668,
20600,
67,
1467,
6134,
471,
486,
1326,
18,
529,
18,
58... |
"id" : 128, "bug_id" : 42, "url" : "http://example.com/128", "is_obsolete" : False, "is_patch" : True, "review" : "+", "reviewer_email" : "foo@bar.com", "commit-queue" : "+", "committer_email" : "non-committer@example.com", "attacher_email" : "eric@webkit.org", } | "id": 128, "bug_id": 42, "url": "http://example.com/128", "is_obsolete": False, "is_patch": True, "review": "+", "reviewer_email": "foo@bar.com", "commit-queue": "+", "committer_email": "non-committer@example.com", "attacher_email": "eric@webkit.org", } | def _id_to_object_dictionary(*objects): dictionary = {} for thing in objects: dictionary[thing["id"]] = thing return dictionary | c40aa4d55730657b1c744e6ea677416c5bf4f7d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/c40aa4d55730657b1c744e6ea677416c5bf4f7d9/mock_bugzillatool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
350,
67,
869,
67,
1612,
67,
15556,
30857,
6911,
4672,
3880,
273,
2618,
364,
7757,
316,
2184,
30,
3880,
63,
4274,
9614,
350,
11929,
65,
273,
7757,
327,
3880,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
350,
67,
869,
67,
1612,
67,
15556,
30857,
6911,
4672,
3880,
273,
2618,
364,
7757,
316,
2184,
30,
3880,
63,
4274,
9614,
350,
11929,
65,
273,
7757,
327,
3880,
225,
2,
-100,
-100,
-1... |
"Wrap <pre> tags around some text and escape it with web.escapehtml." | "Wrap <pre> tags around some text and HTML-escape it." | def PRE(text): "Wrap <pre> tags around some text and escape it with web.escapehtml." return "<pre>"+escape(text)+"</pre>" | 1235bf9723a60f372fe5785d8f85ca12be8c6b6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1235bf9723a60f372fe5785d8f85ca12be8c6b6c/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7071,
12,
955,
4672,
315,
2964,
411,
1484,
34,
2342,
6740,
2690,
977,
471,
3982,
17,
6939,
518,
1199,
327,
3532,
1484,
2984,
15,
6939,
12,
955,
13,
9078,
1757,
1484,
2984,
225,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7071,
12,
955,
4672,
315,
2964,
411,
1484,
34,
2342,
6740,
2690,
977,
471,
3982,
17,
6939,
518,
1199,
327,
3532,
1484,
2984,
15,
6939,
12,
955,
13,
9078,
1757,
1484,
2984,
225,
2,
-100... |
assert fn(sys.maxint) == 4*sys.maxint | assert fn(2147483647) == 4*2147483647 | def f(i): return 4*i | 24c7ed1876cbae538c0ce500eff46c73043d04ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/24c7ed1876cbae538c0ce500eff46c73043d04ad/test_typed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
12,
77,
4672,
327,
1059,
14,
77,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
284,
12,
77,
4672,
327,
1059,
14,
77,
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,
-... |
def setData(self,data): | def setData(self,*dataList): | def setData(self,data): """ Set data to Plot | cabe0e42f63d89377d02755d4bdbc6d01bb6e301 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/cabe0e42f63d89377d02755d4bdbc6d01bb6e301/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
14,
892,
682,
4672,
3536,
1000,
501,
358,
15211,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
14,
892,
682,
4672,
3536,
1000,
501,
358,
15211,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
TargetAdd('libpandamesa.dll', opts=['NOVERSION', 'GLUT']) | TargetAdd('libpandamesa.dll', opts=['MODULE', 'GLUT']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 887a0daf013e7534275435efa59da5f00db28cc7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/887a0daf013e7534275435efa59da5f00db28cc7/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
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,
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,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
import dummy_thread as thread | import dummy_threading as threading | def __init__(self, maxsize=0): """Initialize a queue object with a given maximum size. | a3002703c147de35193af30e3a73b4e7695ecc17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a3002703c147de35193af30e3a73b4e7695ecc17/Queue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
22959,
33,
20,
4672,
3536,
7520,
279,
2389,
733,
598,
279,
864,
4207,
963,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
22959,
33,
20,
4672,
3536,
7520,
279,
2389,
733,
598,
279,
864,
4207,
963,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
c.execute("""update groups set wordnet='%s' where grp=?"""%(data), t) | c.execute("""update groups set wordnet="%s" where grp=?"""%(data), t) | def save_wordnet(self, word, data): conn = sqlite3.connect(db_file_path) c = conn.cursor() t = (word,) if word in self.list_groups(): c.execute("""update groups set wordnet='%s' where grp=?"""%(data), t) else: c.execute("""update word_groups set wordnet='%s' where word=?"""%(data), t) conn.commit() c.close() conn.close() | 8f3acae2f8bc5581b5ba3c68cc4ada8f0e1617a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10994/8f3acae2f8bc5581b5ba3c68cc4ada8f0e1617a9/wordgroupz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1095,
2758,
12,
2890,
16,
2076,
16,
501,
4672,
1487,
273,
16184,
23,
18,
3612,
12,
1966,
67,
768,
67,
803,
13,
276,
273,
1487,
18,
9216,
1435,
268,
273,
261,
1095,
16,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1095,
2758,
12,
2890,
16,
2076,
16,
501,
4672,
1487,
273,
16184,
23,
18,
3612,
12,
1966,
67,
768,
67,
803,
13,
276,
273,
1487,
18,
9216,
1435,
268,
273,
261,
1095,
16,
13,
... |
buf = struct.pack("%ds" % BLOCKSIZE, "".join(parts)) | buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts)) | def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), stn(MAGIC, 6), stn(VERSION, 2), stn(self.uname, 32), stn(self.gname, 32), itn(self.devmajor, 8, posix), itn(self.devminor, 8, posix), stn(self.prefix, 155) ] | 3354f285b958bbe8fa99b0091fcd4335251dec71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3354f285b958bbe8fa99b0091fcd4335251dec71/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
4385,
12,
2890,
16,
16366,
33,
8381,
4672,
3536,
990,
279,
8232,
1446,
1203,
487,
279,
13908,
1160,
533,
18,
3536,
2140,
273,
306,
384,
82,
12,
2890,
18,
529,
16,
2130,
3631,
518,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4385,
12,
2890,
16,
16366,
33,
8381,
4672,
3536,
990,
279,
8232,
1446,
1203,
487,
279,
13908,
1160,
533,
18,
3536,
2140,
273,
306,
384,
82,
12,
2890,
18,
529,
16,
2130,
3631,
518,... |
return addinfo(fp, headers) | return addinfourl(fp, headers, self.openedurl) | def http_error_default(self, url, fp, errcode, errmsg, headers): return addinfo(fp, headers) | e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
1886,
12,
2890,
16,
880,
16,
4253,
16,
393,
710,
16,
17460,
16,
1607,
4672,
327,
527,
1376,
12,
7944,
16,
1607,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
1886,
12,
2890,
16,
880,
16,
4253,
16,
393,
710,
16,
17460,
16,
1607,
4672,
327,
527,
1376,
12,
7944,
16,
1607,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
else: host_info[s[0].strip()] = s[1].strip() host_info['cpus'] = cpus uptime = open('/proc/uptime', 'r').readline().split(' ') host_info['uptime'] = uptime[0] meminfo = open('/proc/meminfo', 'r').readlines() for line in meminfo: s = line.split(':') if s != ['\n']: | def get_host_info(self, platform): host_info = {} host_info['os'] = platform if platform in ('linux', 'linux2', 'cygwin'): cpuinfo = open('/proc/cpuinfo','r').readlines() cpus = 0 for line in cpuinfo: if 'processor' in line: cpus += 1 s = line.split(':') if s != ['\n']: if s[0] == 'MemTotal': mem_total = int(int(s[1].split()[0].strip()) / 1024) host_info[s[0].strip()] = mem_total elif s[0] == 'MemFree': mem_free = int(int(s[1].split()[0].strip()) / 1024) host_info[s[0].strip()] = mem_free else: host_info[s[0].strip()] = s[1].strip() host_info['cpus'] = cpus uptime = open('/proc/uptime', 'r').readline().split(' ') host_info['uptime'] = uptime[0] | 32e28acd18d973667754a0b24ad5a7d159c456c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/32e28acd18d973667754a0b24ad5a7d159c456c4/hostinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2564,
67,
1376,
12,
2890,
16,
4072,
4672,
1479,
67,
1376,
273,
2618,
1479,
67,
1376,
3292,
538,
3546,
273,
4072,
309,
4072,
316,
7707,
20132,
2187,
296,
20132,
22,
2187,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2564,
67,
1376,
12,
2890,
16,
4072,
4672,
1479,
67,
1376,
273,
2618,
1479,
67,
1376,
3292,
538,
3546,
273,
4072,
309,
4072,
316,
7707,
20132,
2187,
296,
20132,
22,
2187,
296,
... | |
cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS | if self.copyDefaultWhiteChars: cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS | def copy( self ): """Make a copy of this ParserElement. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element.""" cpy = copy.copy( self ) cpy.parseAction = self.parseAction[:] cpy.ignoreExprs = self.ignoreExprs[:] cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS return cpy | e17b3f04da3d48afb1a048439af40e6778502eea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/e17b3f04da3d48afb1a048439af40e6778502eea/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
365,
262,
30,
3536,
6464,
279,
1610,
434,
333,
6783,
1046,
18,
225,
19256,
364,
9364,
3775,
1109,
4209,
364,
326,
1967,
5811,
1936,
16,
1450,
13200,
434,
326,
2282,
1109,
930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
12,
365,
262,
30,
3536,
6464,
279,
1610,
434,
333,
6783,
1046,
18,
225,
19256,
364,
9364,
3775,
1109,
4209,
364,
326,
1967,
5811,
1936,
16,
1450,
13200,
434,
326,
2282,
1109,
930,
... |
csServers = gConfig.getValue( "/DIRAC/Extensions", [] ) pilotOptions.append( '-e %s' % ",".join( extensions ) ) | extensionsList = gConfig.getValue( "/DIRAC/Extensions", [] ) pilotOptions.append( '-e %s' % ",".join( extensionsList ) ) | def _getPilotOptions( self, taskQueueDict, pilotsToSubmit ): | b3fea09928ea1d468fb62244003cc0bd49a09770 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/b3fea09928ea1d468fb62244003cc0bd49a09770/PilotDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
52,
22797,
1320,
12,
365,
16,
1562,
3183,
5014,
16,
24970,
6968,
774,
11620,
262,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
52,
22797,
1320,
12,
365,
16,
1562,
3183,
5014,
16,
24970,
6968,
774,
11620,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def join(self, timeout): | def join(self, timeout=None): | def join(self, timeout): """ overrides the join method. """ Thread.join(self, timeout) | ecbfcb770b267ddeba6610b510ad2c5092658128 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/ecbfcb770b267ddeba6610b510ad2c5092658128/MTRunner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
2021,
33,
7036,
4672,
3536,
9515,
326,
1233,
707,
18,
3536,
4884,
18,
5701,
12,
2890,
16,
2021,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1233,
12,
2890,
16,
2021,
33,
7036,
4672,
3536,
9515,
326,
1233,
707,
18,
3536,
4884,
18,
5701,
12,
2890,
16,
2021,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
toc = list(obj.getTOCSelectOptions(current=obj)) | toc = obj.getTOCSelectOptions(current=obj) | def getNextItem(self, obj): toc = list(obj.getTOCSelectOptions(current=obj)) use_next = False for item in toc: if use_next: if item == toc[-1]: # last item has no next one return None else: return item if item['current']: use_next = True | b7e2e6f11ffc51bad01f9615916e5130d12dbd10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12082/b7e2e6f11ffc51bad01f9615916e5130d12dbd10/nextprevious.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6927,
1180,
12,
2890,
16,
1081,
4672,
17919,
273,
1081,
18,
588,
4296,
39,
3391,
1320,
12,
2972,
33,
2603,
13,
999,
67,
4285,
273,
1083,
364,
761,
316,
17919,
30,
309,
999,
67,
4285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6927,
1180,
12,
2890,
16,
1081,
4672,
17919,
273,
1081,
18,
588,
4296,
39,
3391,
1320,
12,
2972,
33,
2603,
13,
999,
67,
4285,
273,
1083,
364,
761,
316,
17919,
30,
309,
999,
67,
4285,
... |
v[what.aname] = v[what.aname].append(value) | v[what.aname].append(value) | def parse(self, elt, ps): #if elt.localName != self.pname: # elt = elt.getElementsByTagName(self.pname)[0] self.checkname(elt, ps) if self.type and \ self.checktype(elt, ps) not in [ self.type, (None,None) ]: raise EvaluateException('Struct has wrong type', ps.Backtrace(elt)) href = _find_href(elt) if href: if _children(elt): raise EvaluateException('Struct has content and HREF', ps.Backtrace(elt)) elt = ps.FindLocalHREF(href, elt) c = _child_elements(elt) count = len(c) if self.nilled(elt, ps): return None if count > self.lenofwhat and not self.hasextras: raise EvaluateException('Too many sub-elements', ps.Backtrace(elt)) | 072f70e844216de46af3928641328e0471b1ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/072f70e844216de46af3928641328e0471b1ba91/TCcompound.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
11572,
16,
4250,
4672,
468,
430,
11572,
18,
3729,
461,
480,
365,
18,
84,
529,
30,
468,
565,
11572,
273,
11572,
18,
588,
3471,
10401,
12,
2890,
18,
84,
529,
25146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
11572,
16,
4250,
4672,
468,
430,
11572,
18,
3729,
461,
480,
365,
18,
84,
529,
30,
468,
565,
11572,
273,
11572,
18,
588,
3471,
10401,
12,
2890,
18,
84,
529,
25146,
... |
from right, and `Fetch From Right` and `Fetch From Right` if | from right, and `Fetch From Left` and `Fetch From Right` if | def split_string(self, string, separator=None, max_split=-1): """Splits the `string` using `separator` as a delimiter string. | 8e19b0260e8e0908f5eba06a11af1a2f864cfe54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/8e19b0260e8e0908f5eba06a11af1a2f864cfe54/String.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
1080,
12,
2890,
16,
533,
16,
4182,
33,
7036,
16,
943,
67,
4939,
29711,
21,
4672,
3536,
16582,
326,
1375,
1080,
68,
1450,
1375,
11287,
68,
487,
279,
5654,
533,
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,
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,
1416,
67,
1080,
12,
2890,
16,
533,
16,
4182,
33,
7036,
16,
943,
67,
4939,
29711,
21,
4672,
3536,
16582,
326,
1375,
1080,
68,
1450,
1375,
11287,
68,
487,
279,
5654,
533,
18,
2,
-100,
... |
braceInfo = eval(cfg.Read('braces')) | braceInfo = readPyValFromConfig(cfg, 'braces') | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.GetFirstGroup() while cont: if val != groupPrefix and len(val) >= 5 and val[:5] == 'style': if len(val) > gpLen and val[:gpLen] == groupPrefix: predefStyleGroupNames.append(val) else: otherLangStyleGroupNames.append(val) cont, val, idx = cfg.GetNextGroup(idx) # read in common elements commonDefs = eval(cfg.Read(commonDefsFile)) assert type(commonDefs) is type({}), \ 'Common definitions (%s) not a valid dict'%commonDefsFile commonStyleIdNames = eval(cfg.Read('common.styleidnames')) assert type(commonStyleIdNames) is type({}), \ 'Common definitions (%s) not a valid dict'%'common.styleidnames' # Lang spesific settings cfg.SetPath(lang) styleIdNames = eval(cfg.Read('styleidnames')) assert type(commonStyleIdNames) is type({}), \ 'Not a valid dict [%s] styleidnames)'%lang styleIdNames.update(commonStyleIdNames) braceInfo = eval(cfg.Read('braces')) assert type(commonStyleIdNames) is type({}), \ 'Not a valid dict [%s] braces)'%lang displaySrc = cfg.Read('displaysrc') lexer = eval(cfg.Read('lexer')) keywords = cfg.Read('keywords') cfg.SetPath('') # read in current styles styles = readStylesFromConfig(cfg, groupPrefix) # read in predefined styles predefStyleGroups = {} for group in predefStyleGroupNames: predefStyleGroups[group] = readStylesFromConfig(cfg, group) # read in all other style sections otherLangStyleGroups = {} for group in otherLangStyleGroupNames: otherLangStyleGroups[group] = readStylesFromConfig(cfg, group) return (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
22102,
12,
1425,
812,
16,
3303,
4672,
2776,
273,
7075,
812,
809,
12,
3729,
5359,
33,
1425,
812,
16,
2154,
33,
27226,
7203,
67,
8001,
67,
14922,
67,
3776,
13,
2776,
18,
694,
12271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22102,
12,
1425,
812,
16,
3303,
4672,
2776,
273,
7075,
812,
809,
12,
3729,
5359,
33,
1425,
812,
16,
2154,
33,
27226,
7203,
67,
8001,
67,
14922,
67,
3776,
13,
2776,
18,
694,
12271... |
song = QueuedPlay.objects.all()[0] | queued_play = QueuedPlay.objects.all()[0] song = queued_play.song | def next_song(): """ """ song = None if QueuedPlay.objects.count() > 0: song = QueuedPlay.objects.all()[0] return song | 5408bd1ac1c327be53e3a832c3b3e433a6d93bbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10992/5408bd1ac1c327be53e3a832c3b3e433a6d93bbc/playlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
816,
75,
13332,
3536,
3536,
17180,
273,
599,
309,
27949,
5957,
11765,
18,
6911,
18,
1883,
1435,
405,
374,
30,
12234,
67,
1601,
273,
27949,
5957,
11765,
18,
6911,
18,
454,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
816,
75,
13332,
3536,
3536,
17180,
273,
599,
309,
27949,
5957,
11765,
18,
6911,
18,
1883,
1435,
405,
374,
30,
12234,
67,
1601,
273,
27949,
5957,
11765,
18,
6911,
18,
454,
1435,... |
representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate). | representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the second part of the reduction step (the second coordinate). | def _coset_reduction_data_second_coord(G): """ Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate). | ee19a19f73bdcdc6c0b1860d28d316c82faa2cd5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ee19a19f73bdcdc6c0b1860d28d316c82faa2cd5/congroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14445,
278,
67,
1118,
4062,
67,
892,
67,
8538,
67,
5732,
12,
43,
4672,
3536,
8155,
501,
1399,
364,
23789,
326,
7378,
4987,
278,
23174,
434,
392,
930,
434,
348,
48,
67,
22,
12,
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,
14445,
278,
67,
1118,
4062,
67,
892,
67,
8538,
67,
5732,
12,
43,
4672,
3536,
8155,
501,
1399,
364,
23789,
326,
7378,
4987,
278,
23174,
434,
392,
930,
434,
348,
48,
67,
22,
12,
6... |
this = apply(_quickfix.new_ConfirmType, args) | this = _quickfix.new_ConfirmType(*args) | def __init__(self, *args): this = apply(_quickfix.new_ConfirmType, 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,
11269,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
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,
11269,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
1... |
return PDF_VIEWER | return "native-execute " + PDF_VIEWER | def pdf_viewer(): viewer() return PDF_VIEWER | 0a027a20e0463e897aaa8cbbe7bdfa517e861658 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/0a027a20e0463e897aaa8cbbe7bdfa517e861658/viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8169,
67,
25256,
13332,
14157,
1435,
327,
315,
13635,
17,
8837,
315,
397,
12667,
67,
12145,
654,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8169,
67,
25256,
13332,
14157,
1435,
327,
315,
13635,
17,
8837,
315,
397,
12667,
67,
12145,
654,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def _intertConflicts(self, rpm_id, header): name = header[RPM.RPMTAG_CONFLICTNAME] flags = header[RPM.RPMTAG_CONFLICTFLAGS] vers = header[RPM.RPMTAG_CONFLICTVERSION] | def _insertConflicts(self, rpm_id, header): name = header[RPM.CONFLICTNAME] flags = header[RPM.CONFLICTFLAGS] vers = header[RPM.CONFLICTVERSION] | def _intertConflicts(self, rpm_id, header): name = header[RPM.RPMTAG_CONFLICTNAME] flags = header[RPM.RPMTAG_CONFLICTFLAGS] vers = header[RPM.RPMTAG_CONFLICTVERSION] | 6014113d22e21912656bbeda22b8bd5be54c6adb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5092/6014113d22e21912656bbeda22b8bd5be54c6adb/currentdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2761,
88,
30897,
12,
2890,
16,
25228,
67,
350,
16,
1446,
4672,
508,
273,
1446,
63,
54,
12728,
18,
54,
52,
6152,
1781,
67,
14497,
29280,
1985,
65,
2943,
273,
1446,
63,
54,
12728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2761,
88,
30897,
12,
2890,
16,
25228,
67,
350,
16,
1446,
4672,
508,
273,
1446,
63,
54,
12728,
18,
54,
52,
6152,
1781,
67,
14497,
29280,
1985,
65,
2943,
273,
1446,
63,
54,
12728,
... |
d.append( int( random.uniform( 0, 2**32 - 1 ) ) ) | d.append( int( random.uniform( UIntData().minValue, UIntData().maxValue ) ) ) | def testUInt( self ) : random.seed( 14 ) s = RadixSort() d = UIntVectorData() for i in range( 0, 10000 ): d.append( int( random.uniform( 0, 2**32 - 1 ) ) ) idx = s.sort( d ) self.assertEqual( len(idx), 10000 ) for i in range( 1, 10000 ): self.assert_( d[ idx[ i ] ] >= d[ idx[ i - 1 ] ] ) | 1d386b5bd2f496a33a8bc30399a9bc141ea76e25 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/1d386b5bd2f496a33a8bc30399a9bc141ea76e25/RadixSortTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14342,
12,
365,
262,
294,
225,
2744,
18,
12407,
12,
5045,
262,
225,
272,
273,
16378,
697,
4416,
1435,
225,
302,
273,
29810,
5018,
751,
1435,
225,
364,
277,
316,
1048,
12,
374,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14342,
12,
365,
262,
294,
225,
2744,
18,
12407,
12,
5045,
262,
225,
272,
273,
16378,
697,
4416,
1435,
225,
302,
273,
29810,
5018,
751,
1435,
225,
364,
277,
316,
1048,
12,
374,
16... |
project_list = env.MSVSProject(target=solution_name + env['MSVSPROJECTSUFFIX'], srcs=sources + headers + others + resources, incs=[], misc=[], resources=[], auto_build_solution=0, MSVSCLEANCOM='hammer.bat -c MODE=all', MSVSBUILDCOM='hammer.bat MODE=all', MSVSREBUILD='hammer.bat -c MODE=all;' 'hammer.bat MODE=all', buildtarget=build_targets, variant=variants) | project_list = env.MSVSProject( target=solution_name + env['MSVSPROJECTSUFFIX'], srcs=sources + headers + others + resources, incs=[], misc=[], resources=[], auto_build_solution=0, MSVSCLEANCOM='hammer.bat -c MODE=all', MSVSBUILDCOM='hammer.bat MODE=all', MSVSREBUILD='hammer.bat -c MODE=all; hammer.bat MODE=all', buildtarget=build_targets, variant=variants) | def Solution(env, solution_name, environments, exclude_pattern=None, extra_build_targets=None): """Builds an MSVS solution containing all projects underneath build/win. Args: solution_name: Name of the solution. environments: List of environments for variants. Only the first one will be used to build the solutions/projects. exclude_pattern: Files matching this pattern will not be added to the projects and solution. extra_build_targets: Dict of extra build targets, indexed by target name. Each extra build target will be given its own empty project. """ # Provide an empty dict for the set of extra targets, by default. if extra_build_targets is None: extra_build_targets = dict() # Fail if not on windows for now. if sys.platform not in ['win32', 'cygwin']: print ('*** Solution file generation skipped ' '(not supported on this platform).') return # Add in the msvs tool. env.Tool('msvs') # Pick out variants variants = [e['BUILD_TYPE'] for e in environments] # Pick out build targets build_targets = [e.subst('$TARGET_ROOT') for e in environments] # pick out sources, headers, and resources sources, headers, resources, others = env.GatherInputs( [SCons.Script.Dir('.')], ['.+\\.(c|cc|m|mm|cpp)$', # source files '.+\\.(h|hh|hpp)$', # header files '.+\\.(rc)$', # resource files '.*'], # all other files exclude_pattern=exclude_pattern, ) # Build main Visual Studio Project file project_list = env.MSVSProject(target=solution_name + env['MSVSPROJECTSUFFIX'], srcs=sources + headers + others + resources, incs=[], misc=[], resources=[], auto_build_solution=0, MSVSCLEANCOM='hammer.bat -c MODE=all', MSVSBUILDCOM='hammer.bat MODE=all', MSVSREBUILD='hammer.bat -c MODE=all;' 'hammer.bat MODE=all', buildtarget=build_targets, variant=variants) # Collect other projects for e in extra_build_targets: # Explicitly create a node for target, so SCons will expand env variables. build_target = env.File(extra_build_targets[e]) # Create an empty project that only has a build target. project_list += env.MSVSProject(target='projects/' + e + '/' + e + env['MSVSPROJECTSUFFIX'], srcs=[], incs=[], resources=[], misc=[], auto_build_solution=0, MSVSCLEANCOM='rem', MSVSBUILDCOM='rem', MSVSREBUILD='rem', buildtarget=build_target, variant=variants[0]) # Build Visual Studio Solution file. solution =env.MSVSSolution(target=solution_name + env['MSVSSOLUTIONSUFFIX'], projects=project_list, variant=variants) # Explicitly add dependencies. env.Depends(solution, project_list) return solution | 98c01eda0df03da5b7a611edc5698b1ebb075967 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/98c01eda0df03da5b7a611edc5698b1ebb075967/visual_studio_solution.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29172,
12,
3074,
16,
6959,
67,
529,
16,
15900,
16,
4433,
67,
4951,
33,
7036,
16,
2870,
67,
3510,
67,
11358,
33,
7036,
4672,
3536,
7746,
392,
9238,
14640,
6959,
4191,
777,
10137,
3613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29172,
12,
3074,
16,
6959,
67,
529,
16,
15900,
16,
4433,
67,
4951,
33,
7036,
16,
2870,
67,
3510,
67,
11358,
33,
7036,
4672,
3536,
7746,
392,
9238,
14640,
6959,
4191,
777,
10137,
3613,
... |
next_item_logo = """<img src="http://pcuds36.cern.ch/img/wb-next-item.png" />""" | next_item_logo = """<img src="%s/img/wb-next-item.png" />""" % (CFG_SITE_URL,) | def tmpl_basket_single_item_footer(self, bskid, selected_category, selected_topic, selected_group, previous_item_recid, next_item_recid, ln=CFG_SITE_LANG): """Template for basket's single item footer display.""" | 21fbd39770d792689a5af9cad650e20c36ad4f24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/21fbd39770d792689a5af9cad650e20c36ad4f24/webbasket_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
26219,
67,
7526,
67,
1726,
67,
14723,
12,
2890,
16,
7081,
79,
350,
16,
3170,
67,
4743,
16,
3170,
67,
10476,
16,
3170,
67,
1655,
16,
2416,
67,
1726,
67,
3927,
350,
16,
1024... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10720,
67,
26219,
67,
7526,
67,
1726,
67,
14723,
12,
2890,
16,
7081,
79,
350,
16,
3170,
67,
4743,
16,
3170,
67,
10476,
16,
3170,
67,
1655,
16,
2416,
67,
1726,
67,
3927,
350,
16,
1024... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.