rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.projectfile = "" self.___id_list = []
self.projectfile = "" self.___id_list = []
def __init__(self): Monitored.__init__(self) self.author = "" #the author of this project self.name = "" #the name of this project self.projectfile = "" # the name of the project file, complete with path self.___id_list = [] #the list of IDs that have already been used, to avoid collisions self.instruments = [] #the list of instruments held by this project self.graveyard = [] # The place where deleted instruments are kept, to later be retrieved by undo functions #used to delete copied audio files if the event that uses them is not saved in the project file self.deleteOnCloseAudioFiles = [] # WARNING: any paths in this list will be deleted on exit! self.clipboardList = [] #The list containing the events to cut/copy self.viewScale = 25.0 # View scale as pixels per second self.viewStart= 0.0 # View offset in seconds self.soloInstrCount = 0 #number of solo instruments (to know if others must be muted) self.IsPlaying = False #True if we are currently playing self.IsExporting = False #True if we are currently exporting to a file self.clickbpm = 120 #the number of beats per minute that the click track will play self.clickEnabled = False #True is the click track is currently enabled self.RedrawTimeLine = False #True if the timeline's background should be fully redrawn on the next update #Keys are instruments which are recording; values are 3-tuples of the event being recorded, the recording bin and bus handler id self.recordingEvents = {} #Dict containing recording information for each recording instrument self.volume = 0.5 #The volume setting for the entire project self.level = 0.0 #The level of the entire project as reported by the gstreamer element
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 9041, 20425, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 4161, 273, 1408, 1082, 202, 7, 5787, 2869, 434, 333, 1984, 365, 18, 529, 273, 1408, 9506, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 9041, 20425, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 4161, 273, 1408, 1082, 202, 7, 5787, 2869, 434, 333, 1984, 365, 18, 529, 273, 1408, 9506, 20...
ShortField("hopcount", None),
ByteField("hopcount", None),
def hashret(self): return struct.pack("!I", self.trid)[1:3]
6636d6295201c197f9f68b85d1096f2beef010e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/6636d6295201c197f9f68b85d1096f2beef010e0/dhcp6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1651, 1349, 12, 2890, 4672, 327, 1958, 18, 2920, 2932, 5, 45, 3113, 365, 18, 313, 350, 25146, 21, 30, 23, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1651, 1349, 12, 2890, 4672, 327, 1958, 18, 2920, 2932, 5, 45, 3113, 365, 18, 313, 350, 25146, 21, 30, 23, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self["EditSettingsButton"].setPixmapNum(1)
self["DNSInfo_Text"].setForegroundColorNum(1) self["EditSettingsButton"].setPixmapNum(1) self["EditSettings_Text"].setForegroundColorNum(2)
def setActiveButton(self,button): if button == 1: self["EditSettingsButton"].setPixmapNum(0) self["NetworkInfo"].setPixmapNum(0) self["AdapterInfo"].setPixmapNum(1) if button == 2: self["AdapterInfo"].setPixmapNum(0) self["DhcpInfo"].setPixmapNum(0) self["NetworkInfo"].setPixmapNum(1) if button == 3: self["NetworkInfo"].setPixmapNum(0) self["IPInfo"].setPixmapNum(0) self["DhcpInfo"].setPixmapNum(1) if button == 4: self["DhcpInfo"].setPixmapNum(0) self["DNSInfo"].setPixmapNum(0) self["IPInfo"].setPixmapNum(1) if button == 5: self["IPInfo"].setPixmapNum(0) self["EditSettingsButton"].setPixmapNum(0) self["DNSInfo"].setPixmapNum(1) if button == 6: self["DNSInfo"].setPixmapNum(0) self["EditSettingsButton"].setPixmapNum(1) self["AdapterInfo"].setPixmapNum(0)
94917f32471fd6fa65d9c014107b849f58bcdd09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/94917f32471fd6fa65d9c014107b849f58bcdd09/NetworkSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20669, 3616, 12, 2890, 16, 5391, 4672, 309, 3568, 422, 404, 30, 365, 9614, 4666, 2628, 3616, 6, 8009, 542, 21816, 1458, 2578, 12, 20, 13, 365, 9614, 3906, 966, 6, 8009, 542, 21816, 145...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20669, 3616, 12, 2890, 16, 5391, 4672, 309, 3568, 422, 404, 30, 365, 9614, 4666, 2628, 3616, 6, 8009, 542, 21816, 1458, 2578, 12, 20, 13, 365, 9614, 3906, 966, 6, 8009, 542, 21816, 145...
if self._skill == SKILL_DETECT_HIDDEN:
if False:
def _on_target_request(self, allow_ground, target_id, flags): if not self._target_locked: return
826ecad5c830fe4e3d6c4d3c168985ee0a64a224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5518/826ecad5c830fe4e3d6c4d3c168985ee0a64a224/training.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 3299, 67, 2293, 12, 2890, 16, 1699, 67, 2915, 16, 1018, 67, 350, 16, 2943, 4672, 309, 486, 365, 6315, 3299, 67, 15091, 30, 327, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 3299, 67, 2293, 12, 2890, 16, 1699, 67, 2915, 16, 1018, 67, 350, 16, 2943, 4672, 309, 486, 365, 6315, 3299, 67, 15091, 30, 327, 2, -100, -100, -100, -100, -100, -100, -...
def w_get_frame(space, self):
def w_get_frame(space, w_self): self = space.interp_w(AppGreenlet, w_self)
def w_get_frame(space, self): if not self.has_ever_run or space.is_true(self.w_dead): return space.w_None try: return self.framestack.top(0) except IndexError: return space.w_None
fbc6eff872a83065c4601c3d34616f7fde2abe39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/fbc6eff872a83065c4601c3d34616f7fde2abe39/interp_greenlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 67, 588, 67, 3789, 12, 2981, 16, 341, 67, 2890, 4672, 365, 273, 3476, 18, 24940, 67, 91, 12, 3371, 21453, 1810, 16, 341, 67, 2890, 13, 309, 486, 365, 18, 5332, 67, 6084, 67, 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, 341, 67, 588, 67, 3789, 12, 2981, 16, 341, 67, 2890, 4672, 365, 273, 3476, 18, 24940, 67, 91, 12, 3371, 21453, 1810, 16, 341, 67, 2890, 13, 309, 486, 365, 18, 5332, 67, 6084, 67, 2...
self.__grid = 'OSG'
self.__Grid = 'OSG'
def get_grid(self): if self.__grid == None: val = self.__getConfigAttribute('Grid') if val == None or val == r'': self.__grid = 'OSG' else: self.__grid = val return self.__grid
1e1fb5e1c5e512763a36851eaf4e00b6e01a9d12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/637/1e1fb5e1c5e512763a36851eaf4e00b6e01a9d12/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5222, 12, 2890, 4672, 309, 365, 16186, 5222, 422, 599, 30, 1244, 273, 365, 16186, 588, 809, 1499, 2668, 6313, 6134, 309, 1244, 422, 599, 578, 1244, 422, 436, 11, 4278, 365, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5222, 12, 2890, 4672, 309, 365, 16186, 5222, 422, 599, 30, 1244, 273, 365, 16186, 588, 809, 1499, 2668, 6313, 6134, 309, 1244, 422, 599, 578, 1244, 422, 436, 11, 4278, 365, 16...
depsToJsonFile(lookupUsingDeps(packages), depsLogConf)
depsToJsonFile(classDepsIter, depsLogConf)
def usingDeps(depsLogConf):
d1325a630dd674037a9e9c9ee82994269849d10d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/d1325a630dd674037a9e9c9ee82994269849d10d/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1450, 14430, 12, 14877, 1343, 3976, 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...
[ 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, 1450, 14430, 12, 14877, 1343, 3976, 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, ...
try:
if hasattr(self, "_npkeys"):
def nef_partitions(self, keep_symmetric=False, keep_products=True, keep_projections=True, hodge_numbers=False): r""" Return the sequence of NEF-partitions for this polytope. INPUT: - ``keep_symmetric`` - (default: False) if True, "-s" option will be passed to nef.x in order to keep symmetric partitions; - ``keep_products`` - (default: True) if True, "-D" option will be passed to nef.x in order to keep product partitions; - ``keep_projections`` - (default: True) if True, "-P" option will be passed to nef.x in order to keep projection partitions; - ``hodge_numbers`` - (default: False) if False, "-p" option will be passed to nef.x in order to skip Hodge numbers computation, which takes a lot of time. EXAMPLES: NEF-partitions of the 4-dimensional octahedron:: sage: o = lattice_polytope.octahedron(4) sage: o.nef_partitions() [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0] (projection) ] Now we omit projections:: sage: o.nef_partitions(keep_projections=False) [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0] ] At present, Hodge numbers cannot be computed for a given NEF-partition:: sage: o.nef_partitions()[1].hodge_numbers() Traceback (most recent call last): ... NotImplementedError: use nef_partitions(hodge_numbers=True)! But they can be obtained from nef.x for all partitions at once. Partitions will be exactly the same:: sage: o.nef_partitions(hodge_numbers=True) [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0] (projection) ] Now it is possible to get Hodge numbers:: sage: o.nef_partitions(hodge_numbers=True)[1].hodge_numbers() [20] Since NEF-partitions are cached, Hodge numbers are accessible after the first request, even if you do not specify hodge_numbers anymore:: sage: o.nef_partitions()[1].hodge_numbers() [20] We illustrate removal of symmetric partitions on a diamond:: sage: o = lattice_polytope.octahedron(2) sage: o.nef_partitions() [ [1, 0, 1, 0] (direct product), [1, 1, 0, 0], [1, 1, 1, 0] (projection) ] sage: o.nef_partitions(keep_symmetric=True) [ [1, 1, 0, 1] (projection), [1, 0, 1, 1] (projection), [1, 0, 0, 1], [0, 1, 1, 1] (projection), [0, 1, 0, 1] (direct product), [0, 0, 1, 1], [1, 1, 1, 0] (projection) ] NEF-partitions can be computed only for reflexive polytopes:: sage: m = matrix(ZZ, [[1, 0, 0, -1, 0, 0], ... [0, 1, 0, 0, -1, 0], ... [0, 0, 2, 0, 0, -1]]) ... sage: p = LatticePolytope(m) sage: p.nef_partitions() Traceback (most recent call last): ... ValueError: The given polytope is not reflexive! Polytope: A lattice polytope: 3-dimensional, 6 vertices. """ if not self.is_reflexive(): raise ValueError, ("The given polytope is not reflexive!\n" + "Polytope: %s") % self keys = "-N -V" if keep_symmetric: keys += " -s" if keep_products: keys += " -D" if keep_projections: keys += " -P" if not hodge_numbers: keys += " -p" try: oldkeys = self._npkeys if oldkeys == keys: return self._nef_partitions if not (hodge_numbers and oldkeys.find("-p") != -1 or keep_symmetric and oldkeys.find("-s") == -1 or not keep_symmetric and oldkeys.find("-s") != -1 or keep_projections and oldkeys.find("-P") == -1 or keep_products and oldkeys.find("-D") == -1): # Select only necessary partitions return Sequence([p for p in self._nef_partitions if (keep_projections or not p._is_projection) and (keep_products or not p._is_product)], cr=True) except AttributeError: pass self._read_nef_partitions(self.nef_x(keys)) self._npkeys = keys return self._nef_partitions
fed9c78dbec4c51b85d18e30657ed2839f3e41b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/fed9c78dbec4c51b85d18e30657ed2839f3e41b0/lattice_polytope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1073, 74, 67, 21275, 12, 2890, 16, 3455, 67, 8117, 6899, 33, 8381, 16, 3455, 67, 18736, 33, 5510, 16, 3455, 67, 19183, 87, 33, 5510, 16, 366, 369, 908, 67, 13851, 33, 8381, 4672, 436...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1073, 74, 67, 21275, 12, 2890, 16, 3455, 67, 8117, 6899, 33, 8381, 16, 3455, 67, 18736, 33, 5510, 16, 3455, 67, 19183, 87, 33, 5510, 16, 366, 369, 908, 67, 13851, 33, 8381, 4672, 436...
es.server.queuecmd('es_xfire %d weapon_%s kill' % (userid, weapon))
es.server.queuecmd('es_xfire %d %s kill' % (userid, weapon))
def round_start(event_var): # Retrieve a random userid userid = es.getuserid() # ========================================================================= # Disable Buyzones # ========================================================================= es.server.queuecmd('es_xfire %d func_buyzone Disable' %userid) # ========================================================================= # Remove weapons from the map # ========================================================================= list_noStrip = [x.strip() for x in str(gg_map_strip_exceptions).split(',')] if list_noStrip: for weapon in getWeaponList('#all'): # Make sure that the admin doesn't want the weapon left on the map if weapon in list_noStrip: continue # Remove the weapon from the map es.server.queuecmd('es_xfire %d weapon_%s kill' % (userid, weapon)) else: es.server.queuecmd('es_xfire %d weapon_* kill' %userid) # ========================================================================= # Equip players with a knife and possibly item_kevalr or item_assaultsuit # ========================================================================= equipPlayer()
70f8a07eafcd9f850c95d27be6a828b1850bf20c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4555/70f8a07eafcd9f850c95d27be6a828b1850bf20c/gungame51.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 1937, 12, 2575, 67, 1401, 4672, 468, 10708, 279, 2744, 6709, 6709, 273, 5001, 18, 588, 8339, 1435, 225, 468, 422, 16296, 12275, 468, 10639, 605, 9835, 14203, 468, 422, 16296, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3643, 67, 1937, 12, 2575, 67, 1401, 4672, 468, 10708, 279, 2744, 6709, 6709, 273, 5001, 18, 588, 8339, 1435, 225, 468, 422, 16296, 12275, 468, 10639, 605, 9835, 14203, 468, 422, 16296, 1...
""" I = ([f.homogenize(var) for f in self.gens()]) P = I[0].parent() return P.ideal(I)
sage: I = Ideal([x^2*y + z^3 + y^2*x, x + y^2 + 1]) sage: I.homogenize() Ideal (x^2*y + x*y^2 + z^3, y^2 + x*h + h^2) of Multivariate Polynomial Ring in x, y, z, h over Finite Field of size 2 """ I = [f.homogenize(var) for f in self.gens()] P = max(I, key=lambda x: x.parent().ngens()).parent() return P.ideal([P(f) for f in I])
def homogenize(self, var='h'): """ Return homogeneous ideal spanned by the homogeneous polynomials generated by homogenizing the generators of this ideal.
0e87e951c87ccdda6a4a8ddce8f33e4e833fa742 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0e87e951c87ccdda6a4a8ddce8f33e4e833fa742/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13995, 19409, 554, 12, 2890, 16, 569, 2218, 76, 11, 4672, 3536, 2000, 13995, 30075, 1481, 23349, 1694, 10041, 635, 326, 13995, 30075, 1481, 16991, 87, 4374, 635, 13995, 19409, 6894, 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, 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, 13995, 19409, 554, 12, 2890, 16, 569, 2218, 76, 11, 4672, 3536, 2000, 13995, 30075, 1481, 23349, 1694, 10041, 635, 326, 13995, 30075, 1481, 16991, 87, 4374, 635, 13995, 19409, 6894, 326, 1...
self.log.verbose('Submitting generic pilots for TaskQueue %s' % taskQueueDict['TaskQueueID'] ) ownerDN = self.genericPilotDN
self.log.verbose( 'Submitting generic pilots for TaskQueue %s' % taskQueueDict['TaskQueueID'] ) ownerDN = self.genericPilotDN
def _getPilotOptions( self, taskQueueDict, pilotsToSubmit ):
65482708e833fd2f044badf2f7e0684898d23e4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/65482708e833fd2f044badf2f7e0684898d23e4b/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...
'''try to map an arbitrary arg to a color instance'''
'''try to map an arbitrary arg to a color instance >>> toColor('rgb(128,0,0)')==toColor('rgb(50%,0%,0%)') True >>> toColor('rgb(50%,0%,0%)')!=Color(0.5,0,0,1) True >>> toColor('hsl(0,100%,50%)')==toColor('rgb(255,0,0)') True >>> toColor('hsl(-120,100%,50%)')==toColor('rgb(0,0,255)') True >>> toColor('hsl(120,100%,50%)')==toColor('rgb(0,255,0)') True >>> toColor('rgba(255,0,0,0.5)')==Color(1,0,0,0.5) True '''
def toColor(arg,default=None): '''try to map an arbitrary arg to a color instance''' if isinstance(arg,Color): return arg if isinstance(arg,(tuple,list)): assert 3<=len(arg)<=4, 'Can only convert 3 and 4 sequences to color' assert 0<=min(arg) and max(arg)<=1 return len(arg)==3 and Color(arg[0],arg[1],arg[2]) or CMYKColor(arg[0],arg[1],arg[2],arg[3]) elif isinstance(arg,basestring): C = cssParse(arg) if C: return C C = getAllNamedColors() s = arg.lower() if C.has_key(s): return C[s] try: return toColor(eval(arg)) except: pass try: return HexColor(arg) except: if default is None: raise ValueError('Invalid color value %r' % arg) return default
87d919c0240e04a8f9ebdeb9379d3922ec29774c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3878/87d919c0240e04a8f9ebdeb9379d3922ec29774c/colors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 2957, 12, 3175, 16, 1886, 33, 7036, 4672, 9163, 698, 358, 852, 392, 11078, 1501, 358, 279, 2036, 791, 4080, 358, 2957, 2668, 10948, 12, 10392, 16, 20, 16, 20, 2506, 13, 631, 869, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2957, 12, 3175, 16, 1886, 33, 7036, 4672, 9163, 698, 358, 852, 392, 11078, 1501, 358, 279, 2036, 791, 4080, 358, 2957, 2668, 10948, 12, 10392, 16, 20, 16, 20, 2506, 13, 631, 869, ...
srpm_tasks = self.call('listTasks', {'opts':{'parent': task_id, 'method': 'buildSRPMFromSCM'}})
srpm_tasks = self.call('listTasks', { 'opts':{ 'parent': task_id, 'method': 'buildSRPMFromSCM', }})
def call_get_latest_changelog(self, resource_path, _cookies=None, build_id=None, task_id=None, state=None): build_id = int(build_id); task_id = int(task_id); state = int(state);
0114ae5de894350cf673a533fb04d5d766086186 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/0114ae5de894350cf673a533fb04d5d766086186/kojiconnector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 588, 67, 13550, 67, 24083, 12970, 12, 2890, 16, 1058, 67, 803, 16, 389, 16240, 33, 7036, 16, 1361, 67, 350, 33, 7036, 16, 1562, 67, 350, 33, 7036, 16, 919, 33, 7036, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 588, 67, 13550, 67, 24083, 12970, 12, 2890, 16, 1058, 67, 803, 16, 389, 16240, 33, 7036, 16, 1361, 67, 350, 33, 7036, 16, 1562, 67, 350, 33, 7036, 16, 919, 33, 7036, 4672, ...
f = urlopen(url, req)
f = urlopen(url, req, TIMEOUT)
def _test_urls(self, urls, handlers, retry=True): import time import logging debug = logging.getLogger("test_urllib2").debug
5d69c7d950ff9f07fa2956903547d5ac257d4c2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/5d69c7d950ff9f07fa2956903547d5ac257d4c2a/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 67, 10518, 12, 2890, 16, 6903, 16, 4919, 16, 3300, 33, 5510, 4672, 1930, 813, 1930, 2907, 1198, 273, 2907, 18, 588, 3328, 2932, 3813, 67, 718, 2941, 22, 20387, 4148, 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, 389, 3813, 67, 10518, 12, 2890, 16, 6903, 16, 4919, 16, 3300, 33, 5510, 4672, 1930, 813, 1930, 2907, 1198, 273, 2907, 18, 588, 3328, 2932, 3813, 67, 718, 2941, 22, 20387, 4148, 2, -100...
self.add_latex_line(f.code,"SUBFIGURES") self.add_latex_line("\label{%s}"%f.label,"SUBFIGURES")
self.add_latex_line(f.subfigure_code(),"SUBFIGURES") self.add_latex_line("\label{%s}"%f.name,"SUBFIGURES")
def conclude(self): if not globals_vars.special_exit() : self.add_latex_line("\psset{xunit="+str(self.xunit)+",yunit="+str(self.yunit)+"}","BEFORE SUBFIGURES") for f in self.SSfigures : self.add_latex_line("\subfigure["+f.caption+"]{%","SUBFIGURES") self.add_latex_line(f.code,"SUBFIGURES") self.add_latex_line("\label{%s}"%f.label,"SUBFIGURES") self.add_latex_line("} % Closing subfigure "+str(self.SSfigures.index(f)+1),"SUBFIGURES") self.add_latex_line("%","SUBFIGURES") after_all=r"""\caption{%s}\label{%s} \end{figure} """%(self.caption,self.label) self.add_latex_line(after_all,"AFTER ALL") self.contenu = DicoSeparatorToCode(self.separator_dico)
0e5989507cfbbb4ca0ffeef018b67a364df9a1f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5111/0e5989507cfbbb4ca0ffeef018b67a364df9a1f8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 1571, 12, 2890, 4672, 309, 486, 10941, 67, 4699, 18, 9371, 67, 8593, 1435, 294, 365, 18, 1289, 67, 26264, 67, 1369, 31458, 1121, 542, 95, 92, 4873, 1546, 15, 701, 12, 2890, 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, 356, 1571, 12, 2890, 4672, 309, 486, 10941, 67, 4699, 18, 9371, 67, 8593, 1435, 294, 365, 18, 1289, 67, 26264, 67, 1369, 31458, 1121, 542, 95, 92, 4873, 1546, 15, 701, 12, 2890, 18, ...
else:
else:
def xmlrpc_computersMenuSet(self, menus): """ Set computers imaging boot menu.
08f9f9f2b6e4ae7b43bccc3fa2701f37dad047f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/08f9f9f2b6e4ae7b43bccc3fa2701f37dad047f8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31811, 67, 13406, 414, 4599, 694, 12, 2890, 16, 21374, 4672, 3536, 1000, 5305, 414, 709, 5755, 4835, 3824, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 31811, 67, 13406, 414, 4599, 694, 12, 2890, 16, 21374, 4672, 3536, 1000, 5305, 414, 709, 5755, 4835, 3824, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if ln==f90: ln = self.compiler_f90[0]
if ln == f90: ln = self.compiler_f90[0]
def get_linker_so(self): """Linker command to build shared libraries.""" f77 = self.executables.get('compiler_f77') if f77 is not None: f77 = f77[0] ln = self.executables.get('linker_so') if ln is not None: ln = ln[0] if ln==f77: ln = self.compiler_f77[0] else: f90 = self.executables.get('compiler_f90') if f90 is not None: f90 = f90[0] if ln==f90: ln = self.compiler_f90[0] return ln
888d6eddcb686d7b4b502b34be35be9acec84f6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/888d6eddcb686d7b4b502b34be35be9acec84f6b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1232, 264, 67, 2048, 12, 2890, 4672, 3536, 2098, 264, 1296, 358, 1361, 5116, 14732, 12123, 284, 4700, 273, 365, 18, 4177, 322, 1538, 18, 588, 2668, 9576, 67, 74, 4700, 6134, 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, 336, 67, 1232, 264, 67, 2048, 12, 2890, 4672, 3536, 2098, 264, 1296, 358, 1361, 5116, 14732, 12123, 284, 4700, 273, 365, 18, 4177, 322, 1538, 18, 588, 2668, 9576, 67, 74, 4700, 6134, 3...
self.resources = []
def __init__(self, archive_filename): self.archive_filename = archive_filename
15b79dab64e9d35a840423eaa436a6e35feb7b63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12927/15b79dab64e9d35a840423eaa436a6e35feb7b63/bb9_course.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5052, 67, 3459, 4672, 365, 18, 10686, 67, 3459, 273, 5052, 67, 3459, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5052, 67, 3459, 4672, 365, 18, 10686, 67, 3459, 273, 5052, 67, 3459, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elements of `G`
elements of `G` which describes the morphism
sage: def phi_on_basis(i): return Y.monomial(abs(i))
5954041b2f4d0b7b778e95dc99d8036966e4f641 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5954041b2f4d0b7b778e95dc99d8036966e4f641/modules_with_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 7706, 67, 265, 67, 23774, 12, 77, 4672, 327, 1624, 18, 2586, 11496, 12, 5113, 12, 77, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 7706, 67, 265, 67, 23774, 12, 77, 4672, 327, 1624, 18, 2586, 11496, 12, 5113, 12, 77, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print "URL Error:",e.reason , downloadurl
print "URL Error:",e.reason , url
def download_file(filename,url): global options if options.dryrun : global download_list download_info = "download %s %s" % (filename, url) download_list.append(download_info) return True print 'Downloading ' + filename global headers req = urllib2.Request(url, None, headers) try: response = urllib2.urlopen(req) CHUNK = 128 * 1024 size = 0 filesize = -1 last_time = time.time() last_size = size fp = open(filename, 'wb') while True: chunk = response.read(CHUNK) if not chunk: break if size == 0 and chunk.find('<div id="sign_in_box">') != -1: # our urllib2 cookies have gone awol - login again login(False) req = urllib2.Request(url, None, headers) response = urllib2.urlopen(req) chunk = response.read(CHUNK) if chunk.find('<div id="sign_in_box">') != -1: # still broken - give up on this one print "*** ERROR trying to download %s" % (filename) break; if size == 0: info = response.info() if 'Content-Length' in info: filesize = int(info['Content-Length']) else: print "*** HTTP response did not contain 'Content-Length' when expected" print info break fp.write(chunk) size += len(chunk) now = time.time() if options.progress and now-last_time > 20: rate = (size-last_size)/(now-last_time) estimate = "" if filesize > 0 and rate > 0: remaining_seconds = (filesize-size)/rate if remaining_seconds > 110: remaining = "%d minutes" % (remaining_seconds/60) else: remaining = "%d seconds" % remaining_seconds estimate = "- %d%% est. %s" % ((100*size/filesize), remaining) print "- %d Kb (%d Kb/s) %s" % (size/1024, (rate/1024)+0.5, estimate) last_time = now last_size = size fp.close() if options.progress: now = time.time() print "- Completed %s - %d Kb in %d seconds" % (filename, (filesize/1024)+0.5, now-last_time) #handle errors except urllib2.HTTPError, e: print "HTTP Error:",e.code , downloadurl return False except urllib2.URLError, e: print "URL Error:",e.reason , downloadurl return False return True
37aeedd1d8317cbb63146acc7676ba5b9c773177 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4206/37aeedd1d8317cbb63146acc7676ba5b9c773177/downloadkit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 768, 12, 3459, 16, 718, 4672, 2552, 702, 309, 702, 18, 25011, 2681, 294, 2552, 4224, 67, 1098, 4224, 67, 1376, 273, 315, 7813, 738, 87, 738, 87, 6, 738, 261, 3459, 16, 880,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 768, 12, 3459, 16, 718, 4672, 2552, 702, 309, 702, 18, 25011, 2681, 294, 2552, 4224, 67, 1098, 4224, 67, 1376, 273, 315, 7813, 738, 87, 738, 87, 6, 738, 261, 3459, 16, 880,...
namespace_constraint=Wildcard.IntensionalIntersection(agd_wildcards + [local_wildcard.namespaceConstraint()]), annotation=local_wildcard.annotation())
namespace_constraint=Wildcard.IntensionalIntersection(agd_constraints + [local_wildcard.namespaecConstraint()]), annotation=local_wildcard.annotation(), schema=wxs)
def CompleteWildcard (cls, attribute_groups, any_attribute, local_wildcard): # Non-absent wildcard properties of attribute groups agd_wildcards = [] for agd in attribute_groups: if agd.attributeWildcard() is not None: agd_wildcards.append(agd.attributeWildcard())
c7c8dd0f784b5326200a7d1de52860232e5ad012 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/c7c8dd0f784b5326200a7d1de52860232e5ad012/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14575, 12121, 261, 6429, 16, 1566, 67, 4650, 16, 1281, 67, 4589, 16, 1191, 67, 22887, 4672, 468, 3858, 17, 5113, 319, 8531, 1790, 434, 1566, 3252, 1737, 72, 67, 22887, 87, 273, 5378, 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, 14575, 12121, 261, 6429, 16, 1566, 67, 4650, 16, 1281, 67, 4589, 16, 1191, 67, 22887, 4672, 468, 3858, 17, 5113, 319, 8531, 1790, 434, 1566, 3252, 1737, 72, 67, 22887, 87, 273, 5378, 3...
filenames = glob.glob(self.TMP_DIR + "/*/results.txt")
filenames = glob.glob(self.temp_dir + "/*/results.txt")
def Analyze(self, check_sanity=False): # Glob all the results files in the "testing.tmp" directory filenames = glob.glob(self.TMP_DIR + "/*/results.txt")
09a4f701e8a53003ff9f43042db088214ef61594 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/09a4f701e8a53003ff9f43042db088214ef61594/valgrind_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1922, 9508, 12, 2890, 16, 866, 67, 87, 10417, 33, 8381, 4672, 468, 18901, 777, 326, 1686, 1390, 316, 326, 315, 3813, 310, 18, 5645, 6, 1867, 9066, 273, 4715, 18, 10581, 12, 2890, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1922, 9508, 12, 2890, 16, 866, 67, 87, 10417, 33, 8381, 4672, 468, 18901, 777, 326, 1686, 1390, 316, 326, 315, 3813, 310, 18, 5645, 6, 1867, 9066, 273, 4715, 18, 10581, 12, 2890, 18, ...
code = CODE_WRAP % (lang, self._escape(m.group('code')))
func = FUNCTION_TAG % m.group('lang') code = CODE_WRAP % (func, lang, self._escape(m.group('code')))
def run(self, lines): """ Match and store Fenced Code Blocks in the HtmlStash. """ text = "\n".join(lines) while 1: m = FENCED_BLOCK_RE.search(text) if m: lang = '' if m.group('lang'): lang = LANG_TAG % m.group('lang') code = CODE_WRAP % (lang, self._escape(m.group('code'))) placeholder = self.markdown.htmlStash.store(code, safe=True) text = '%s\n%s\n%s'% (text[:m.start()], placeholder, text[m.end():]) else: break return text.split("\n")
efaabec1279bfee5da09fd5480e596c1ec4e0259 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14687/efaabec1279bfee5da09fd5480e596c1ec4e0259/fenced_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 2362, 4672, 3536, 4639, 471, 1707, 478, 802, 72, 3356, 22713, 316, 326, 5430, 510, 961, 18, 3536, 977, 273, 1548, 82, 9654, 5701, 12, 3548, 13, 1323, 404, 30, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2362, 4672, 3536, 4639, 471, 1707, 478, 802, 72, 3356, 22713, 316, 326, 5430, 510, 961, 18, 3536, 977, 273, 1548, 82, 9654, 5701, 12, 3548, 13, 1323, 404, 30, 312, ...
"""Call a stored database procedure with the given name. The sequence of parameters must contain one entry for each argument that the procedure expects. The result of the call is returned as modified copy of the input sequence. Input parameters are left untouched, output and input/output parameters replaced with possibly new values. The procedure may also provide a result set as output, which is then available through the standard fetchXXX() methods. """
"Call a stored database procedure with the given name."
def callproc(self, procname, parameters=None): """Call a stored database procedure with the given name.
932ac550f3a72350d92bf3089014e79481193cb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/932ac550f3a72350d92bf3089014e79481193cb0/dbapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9381, 12, 2890, 16, 5418, 529, 16, 1472, 33, 7036, 4672, 3536, 1477, 279, 4041, 2063, 12131, 598, 326, 864, 508, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9381, 12, 2890, 16, 5418, 529, 16, 1472, 33, 7036, 4672, 3536, 1477, 279, 4041, 2063, 12131, 598, 326, 864, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: G = SymmetricGroup(16)
sage: G = SymmetricGroup(16)
def __contains__(self, item): """ Returns boolean value of "item in self" EXAMPLES:: sage: G = SymmetricGroup(16) sage: g = G.gen(0) sage: h = G.gen(1) sage: g^7*h*g*h in G True sage: G = SymmetricGroup(4) sage: g = G((1,2,3,4)) sage: h = G((1,2)) sage: H = PermutationGroup([[(1,2,3,4)], [(1,2),(3,4)]]) sage: g in H True sage: h in H False """ try: item = self(item, check=True) except: return False return True
895e1ae73086b953ed8633605c018ded03126ea2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/895e1ae73086b953ed8633605c018ded03126ea2/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12298, 972, 12, 2890, 16, 761, 4672, 3536, 2860, 1250, 460, 434, 315, 1726, 316, 365, 6, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 611, 273, 10042, 6899, 1114, 12, 2313, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12298, 972, 12, 2890, 16, 761, 4672, 3536, 2860, 1250, 460, 434, 315, 1726, 316, 365, 6, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 611, 273, 10042, 6899, 1114, 12, 2313, 1...
pass
continue
def finite(x): return not isinf(x) and not isnan(x)
4e3164d4ffaedfb4013075d390ae4495c72679f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/4e3164d4ffaedfb4013075d390ae4495c72679f8/test_direct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25922, 12, 92, 4672, 327, 486, 353, 10625, 12, 92, 13, 471, 486, 16796, 12, 92, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25922, 12, 92, 4672, 327, 486, 353, 10625, 12, 92, 13, 471, 486, 16796, 12, 92, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return "context.throw('return', '', output)"
return "context.throw('return', '', Reference(output.getvalue()))"
def return_(self): # [% RETURN %] return "context.throw('return', '', output)" # \$output in Perl
2f690578bd6ee4e422e65c5128f4e8c6d02f217b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/2f690578bd6ee4e422e65c5128f4e8c6d02f217b/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 12, 2890, 4672, 225, 468, 9799, 14780, 738, 65, 327, 315, 2472, 18, 12849, 2668, 2463, 2187, 10226, 6268, 12, 2844, 18, 588, 1132, 10756, 2225, 225, 468, 8015, 2844, 316, 5722, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 12, 2890, 4672, 225, 468, 9799, 14780, 738, 65, 327, 315, 2472, 18, 12849, 2668, 2463, 2187, 10226, 6268, 12, 2844, 18, 588, 1132, 10756, 2225, 225, 468, 8015, 2844, 316, 5722, ...
setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None)
def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) try: p = subprocess.Popen(cmdline, close_fds=True, preexec_fn=setsid) return (p.poll() is None) except OSError: return False
384b608aeb32db1017935599fa5e0c61e4d02b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/384b608aeb32db1017935599fa5e0c61e4d02b07/webbrowser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 22877, 273, 306, 2890, 18, 529, 65, 397, 306, 3175, 18, 2079, 27188, 87, 3113, 880, 13, 364, 1501, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 22877, 273, 306, 2890, 18, 529, 65, 397, 306, 3175, 18, 2079, 27188, 87, 3113, 880, 13, 364, 1501, 316, ...
msg = self.reporter.info( 'Possible title underline, too short for the title.\n' "Treating it as ordinary text because it's so short.", line=lineno) self.parent += msg
if self.state_machine.match_titles: msg = self.reporter.info( 'Possible title underline, too short for the title.\n' "Treating it as ordinary text because it's so short.", line=lineno) self.parent += msg
def underline(self, match, context, next_state): """Section title.""" lineno = self.state_machine.abs_line_number() if not self.state_machine.match_titles: blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.severe( 'Unexpected section title.', nodes.literal_block(blocktext, blocktext), line=lineno) self.parent += msg return [], next_state, [] title = context[0].rstrip() underline = match.string.rstrip() source = title + '\n' + underline messages = [] if len(title) > len(underline): if len(underline) < 4: msg = self.reporter.info( 'Possible title underline, too short for the title.\n' "Treating it as ordinary text because it's so short.", line=lineno) self.parent += msg raise statemachine.TransitionCorrection('text') else: blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.warning( 'Title underline too short.', nodes.literal_block(blocktext, blocktext), line=lineno) messages.append(msg) style = underline[0] context[:] = [] self.section(title, source, style, lineno - 1, messages) return [], next_state, []
6efeba3a10bf8b099509bb076c92bca3c03947f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/6efeba3a10bf8b099509bb076c92bca3c03947f5/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25985, 12, 2890, 16, 845, 16, 819, 16, 1024, 67, 2019, 4672, 3536, 5285, 2077, 12123, 7586, 273, 365, 18, 2019, 67, 9149, 18, 5113, 67, 1369, 67, 2696, 1435, 309, 486, 365, 18, 2019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25985, 12, 2890, 16, 845, 16, 819, 16, 1024, 67, 2019, 4672, 3536, 5285, 2077, 12123, 7586, 273, 365, 18, 2019, 67, 9149, 18, 5113, 67, 1369, 67, 2696, 1435, 309, 486, 365, 18, 2019, ...
for files in task['globalSandbox'].split(','):
for ifile in task['globalSandbox'].split(','):
def collectionApiJdl( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n' jdl += 'AllowZippedISB = true;\n' jdl += 'ZippedISB = "%s";\n' % self.zippedISB
10841cca17b60c4a62273d634a02591928a21901 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/10841cca17b60c4a62273d634a02591928a21901/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1849, 3064, 46, 5761, 12, 365, 16, 1562, 16, 8433, 2218, 11, 262, 30, 3536, 1361, 279, 1849, 525, 5761, 12779, 358, 506, 7681, 635, 326, 18200, 5656, 1491, 1560, 471, 14758, 1473, 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, 1849, 3064, 46, 5761, 12, 365, 16, 1562, 16, 8433, 2218, 11, 262, 30, 3536, 1361, 279, 1849, 525, 5761, 12779, 358, 506, 7681, 635, 326, 18200, 5656, 1491, 1560, 471, 14758, 1473, 326, ...
countDict['Total']=total return S_OK(countDict) def __addFilesToTransformation(self,transID,fileIDs,connection=False): req = "SELECT FileID from TransformationFiles WHERE TransformationID = %d AND FileID IN (%s);" % (transID,intListToString(fileIDs)) res = self._query(req,connection)
countDict['Total'] = total return S_OK( countDict ) def __addFilesToTransformation( self, transID, fileIDs, connection = False ): req = "SELECT FileID from TransformationFiles WHERE TransformationID = %d AND FileID IN (%s);" % ( transID, intListToString( fileIDs ) ) res = self._query( req, connection )
def getTransformationFilesCount(self,transName,field,selection={},connection=False): """ Get the number of files in the TransformationFiles table grouped by the supplied field """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] selection['TransformationID'] = transID if field not in self.TRANSFILEPARAMS: return S_ERROR("Supplied field not in TransformationFiles table") res = self.getCounters('TransformationFiles',['TransformationID',field],selection) if not res['OK']: return res countDict = {} total=0 for attrDict,count in res['Value']: countDict[attrDict[field]]=count total += count countDict['Total']=total return S_OK(countDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 2697, 1380, 12, 2890, 16, 2338, 461, 16, 1518, 16, 10705, 28793, 4071, 33, 8381, 4672, 3536, 968, 326, 1300, 434, 1390, 316, 326, 21274, 2697, 1014, 10303, 635, 326, 4580, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15292, 2697, 1380, 12, 2890, 16, 2338, 461, 16, 1518, 16, 10705, 28793, 4071, 33, 8381, 4672, 3536, 968, 326, 1300, 434, 1390, 316, 326, 21274, 2697, 1014, 10303, 635, 326, 4580, 65...
"rint", "trunc", "exp2", "log2", "hypot", "atan2", "pow"]
"rint", "trunc", "exp2", "log2", "hypot", "atan2", "pow", "copysign"]
def check_api_version(apiversion, codegen_dir): """Emits a MismacthCAPIWarning if the C API version needs updating.""" curapi_hash, api_hash = get_api_versions(apiversion, codegen_dir) # If different hash, it means that the api .txt files in # codegen_dir have been updated without the API version being # updated. Any modification in those .txt files should be reflected # in the api and eventually abi versions. # To compute the checksum of the current API, use # code_generators/cversions.py script if not curapi_hash == api_hash: msg = "API mismatch detected, the C API version " \ "numbers have to be updated. Current C api version is %d, " \ "with checksum %s, but recorded checksum for C API version %d in " \ "codegen_dir/cversions.txt is %s. If functions were added in the " \ "C API, you have to update C_API_VERSION in %s." warnings.warn(msg % (apiversion, curapi_hash, apiversion, api_hash, __file__), MismatchCAPIWarning)
a7cfefdb02ea7ed0cff5671e367d1c6e2d428e74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/a7cfefdb02ea7ed0cff5671e367d1c6e2d428e74/setup_common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2425, 67, 1589, 12, 438, 427, 722, 16, 23198, 67, 1214, 4672, 3536, 1514, 1282, 279, 490, 6228, 621, 76, 39, 2557, 6210, 309, 326, 385, 1491, 1177, 4260, 9702, 12123, 662, 242...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2425, 67, 1589, 12, 438, 427, 722, 16, 23198, 67, 1214, 4672, 3536, 1514, 1282, 279, 490, 6228, 621, 76, 39, 2557, 6210, 309, 326, 385, 1491, 1177, 4260, 9702, 12123, 662, 242...
stdin_isatty = sys.stdin.isatty() if stdin_isatty:
user_interaction = sys.stdin.isatty() and sys.stdout.isatty() if user_interaction:
def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % __version__) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="append", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="append", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="append", dest="group", help="run command on a group of nodes") optgrp.add_option("-X", action="append", dest="exgroup", help="exclude nodes from this group") parser.add_option_group(optgrp) # Output behaviour optgrp = optparse.OptionGroup(parser, "Output behaviour") optgrp.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") optgrp.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") optgrp.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") optgrp.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") optgrp.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") optgrp.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") parser.add_option_group(optgrp) # Copy optgrp = optparse.OptionGroup(parser, "File copying") optgrp.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") optgrp.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") optgrp.add_option("-p", action="store_true", dest="preserve_flag", help="preserve modification times and modes") parser.add_option_group(optgrp) # Ssh options optgrp = optparse.OptionGroup(parser, "Ssh options") optgrp.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") optgrp.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") optgrp.add_option("-o", "--options", action="store", dest="options", help="can be used to give ssh options") optgrp.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="float") optgrp.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="float") parser.add_option_group(optgrp) (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", options.fanout) if options.user: config.set_main("ssh_user", options.user) if options.options: config.set_main("ssh_options", options.options) if options.connect_timeout: config.set_main("connect_timeout", options.connect_timeout) if options.command_timeout: config.set_main("command_timeout", options.command_timeout) # # Compute the nodeset # if options.nodes: nodeset_base = NodeSet.fromlist(options.nodes) if options.exclude: nodeset_exclude = NodeSet.fromlist(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: for grp in options.group: command = config.get_nodes_group_command(grp) task.shell(command, key="group") if options.exgroup: for grp in options.exgroup: command = config.get_nodes_group_command(grp) task.shell(command, key="exgroup") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(['all', 'group']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Adding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) for buf, keys in task.iter_buffers(['exgroup']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Excluding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_exclude.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout()) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) # Set detailed timeout values connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) task.set_info("default_stderr", True) # Set timeout at worker level when command_timeout is defined. if command_timeout > 0: timeout = command_timeout else: timeout = -1 # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%.1f " \ "cmd=%.1f] %s" % (nodeset_base, task.info("fanout"), task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0, options.preserve_flag) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" clush_exit(1) rc = 0 if options.maxrc: # instead of clush return code, return commands retcode rc = task.max_retcode() if task.num_timeout() > 0: rc = 255 clush_exit(rc)
8d4826c99ac3e77899532cb1f0d53c5830ae09c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/8d4826c99ac3e77899532cb1f0d53c5830ae09c2/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
url=laUrl(url)
url = laUrl(url)
def getCachePath(self, cachePrefix, url, negative=False): if isinstance(url, str): url=laUrl(url) cacheDir = self.getCacheDir(cachePrefix, negative=negative) cachePath = os.sep.join((cacheDir, url.filePath(not negative))) return os.path.normpath(cachePath)
1e12dbf19c102412586abff4beb891b720849ba7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/1e12dbf19c102412586abff4beb891b720849ba7/lookaside.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8577, 743, 12, 2890, 16, 1247, 2244, 16, 880, 16, 6092, 33, 8381, 4672, 309, 1549, 12, 718, 16, 609, 4672, 880, 273, 7125, 1489, 12, 718, 13, 19946, 273, 365, 18, 588, 29582, 12, 249...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8577, 743, 12, 2890, 16, 1247, 2244, 16, 880, 16, 6092, 33, 8381, 4672, 309, 1549, 12, 718, 16, 609, 4672, 880, 273, 7125, 1489, 12, 718, 13, 19946, 273, 365, 18, 588, 29582, 12, 249...
print (j)*yw,":", (i)*xw,":", (j+1)*yw,":", (i+1) * xw cr.rectangle((j)*xw, (i)*yw, xw, yw)
cr.rectangle((i)*xw, (j)*yw, xw, yw)
def draw(self, cr, width, height): # Fill the background with gray color = 0.5 xw = height/(self.sizex+1) print height, ", ", self.sizex yw = width/(self.sizey+1) print "Divider: ", xw, ", ", yw for i in range(0,self.sizey): for j in range(0,self.sizex): if(color==0.0): color=1.0 else: color=0.0 cr.set_source_rgb(color, 1-color, 0.5) print (j)*yw,":", (i)*xw,":", (j+1)*yw,":", (i+1) * xw cr.rectangle((j)*xw, (i)*yw, xw, yw) cr.fill()
b16d79f1148a2603cc9a5a75e31e64280ffb6acc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12032/b16d79f1148a2603cc9a5a75e31e64280ffb6acc/tactile_sensor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 4422, 16, 1835, 16, 2072, 4672, 468, 14192, 326, 5412, 598, 16937, 2036, 273, 374, 18, 25, 619, 91, 273, 2072, 19, 12, 2890, 18, 87, 452, 338, 15, 21, 13, 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, 3724, 12, 2890, 16, 4422, 16, 1835, 16, 2072, 4672, 468, 14192, 326, 5412, 598, 16937, 2036, 273, 374, 18, 25, 619, 91, 273, 2072, 19, 12, 2890, 18, 87, 452, 338, 15, 21, 13, 1172, ...
return self.set_filename(path)
return self.set_current_name(os.path.basename(path))
def set_name(self, path): """Set either filename or current name."""
779a018a76931b1d689504a3ba193db55c18f910 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12852/779a018a76931b1d689504a3ba193db55c18f910/save.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 529, 12, 2890, 16, 589, 4672, 3536, 694, 3344, 1544, 578, 783, 508, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 529, 12, 2890, 16, 589, 4672, 3536, 694, 3344, 1544, 578, 783, 508, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
t = self.terms.getTerm(value)
t = self.vocabulary.terms.getTerm(value)
def __init__(self, field, source, request): super(TranslatableSourceSelectWidget, self).__init__( field, source, request) self.displays = {} # value --> (display, token) self.order = [] # values in sorted order
8f96e3cc3eb936f56cdaeedf92169f9d4488a49b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9637/8f96e3cc3eb936f56cdaeedf92169f9d4488a49b/widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 652, 16, 1084, 16, 590, 4672, 2240, 12, 24299, 1830, 3391, 4609, 16, 365, 2934, 972, 2738, 972, 12, 652, 16, 1084, 16, 590, 13, 365, 18, 5417, 87, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 652, 16, 1084, 16, 590, 4672, 2240, 12, 24299, 1830, 3391, 4609, 16, 365, 2934, 972, 2738, 972, 12, 652, 16, 1084, 16, 590, 13, 365, 18, 5417, 87, 273,...
@setting(11, 'Resistances', returns=['*(v[Ohm], t)'])
@setting(11, 'Resistances', returns='*(v[Ohm], t)')
def temperatures(self, c): """Read channel temperatures.
ca09465af7cd0d53cd2656a51c12b3b3003818f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7016/ca09465af7cd0d53cd2656a51c12b3b3003818f7/lakeshore370.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1022, 457, 2790, 12, 2890, 16, 276, 4672, 3536, 1994, 1904, 1022, 457, 2790, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1022, 457, 2790, 12, 2890, 16, 276, 4672, 3536, 1994, 1904, 1022, 457, 2790, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return ((enc.name == other.name) and (enc.vector == other.vector))
return ((self.name == other.name) and (self.vector == other.vector))
def isEqual(self, other): return ((enc.name == other.name) and (enc.vector == other.vector))
87bd4b5e0e2ed740fa9ce21945bf1d33ba07f10e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/87bd4b5e0e2ed740fa9ce21945bf1d33ba07f10e/pdfmetrics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21614, 12, 2890, 16, 1308, 4672, 327, 14015, 1331, 18, 529, 422, 1308, 18, 529, 13, 471, 261, 1331, 18, 7737, 422, 1308, 18, 7737, 3719, 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, 21614, 12, 2890, 16, 1308, 4672, 327, 14015, 1331, 18, 529, 422, 1308, 18, 529, 13, 471, 261, 1331, 18, 7737, 422, 1308, 18, 7737, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -1...
libraries = ["ginac"]), \
libraries = ["pynac"]), \
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
7104a64d40580a78cf5c406703e35d8011c30a59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7104a64d40580a78cf5c406703e35d8011c30a59/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 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, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS -fPIC' % dialect)
if env['PLATFORM'] == 'posix': env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS -fPIC' % dialect)
def generate(env): """Add Builders and construction variables for ifort to an Environment.""" # ifort supports Fortran 90 and Fortran 95 # Additionally, ifort recognizes more file extensions. fscan = FortranScan("FORTRANPATH") SCons.Tool.SourceFileScanner.add_scanner('.i', fscan) SCons.Tool.SourceFileScanner.add_scanner('.i90', fscan) if not env.has_key('FORTRANFILESUFFIXES'): env['FORTRANFILESUFFIXES'] = ['.i'] else: env['FORTRANFILESUFFIXES'].append('.i') if not env.has_key('F90FILESUFFIXES'): env['F90FILESUFFIXES'] = ['.i90'] else: env['F90FILESUFFIXES'].append('.i90') add_all_to_env(env) fc = 'ifort' for dialect in ['F77', 'F90', 'FORTRAN', 'F95']: env['%s' % dialect] = fc env['SH%s' % dialect] = '$%s' % dialect env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS -fPIC' % dialect) if env['PLATFORM'] == 'win32': # On Windows, the ifort compiler specifies the object on the # command line with -object:, not -o. Massage the necessary # command-line construction variables. for dialect in ['F77', 'F90', 'FORTRAN', 'F95']: for var in ['%sCOM' % dialect, '%sPPCOM' % dialect, 'SH%sCOM' % dialect, 'SH%sPPCOM' % dialect]: env[var] = string.replace(env[var], '-o $TARGET', '-object:$TARGET') env['FORTRANMODDIRPREFIX'] = "/module:" else: env['FORTRANMODDIRPREFIX'] = "-module "
7b3464b3a3c416d33d3b6f1dafaa076558c1c519 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/7b3464b3a3c416d33d3b6f1dafaa076558c1c519/ifort.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 309, 499, 358, 392, 7518, 12123, 468, 309, 499, 6146, 2457, 13171, 8566, 471, 2457, 13171, 16848, 468, 26775, 16, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 309, 499, 358, 392, 7518, 12123, 468, 309, 499, 6146, 2457, 13171, 8566, 471, 2457, 13171, 16848, 468, 26775, 16, 309, ...
def _recursive_sub(self, kwds): return self
def _recursive_sub(self, kwds): return self
2a839b3d50866729418f3c87713bc3adb8f65bac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2a839b3d50866729418f3c87713bc3adb8f65bac/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 67, 1717, 12, 2890, 16, 17149, 4672, 327, 365, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 67, 1717, 12, 2890, 16, 17149, 4672, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
matcha= zeros_like(x.astype(int))
matcha= zeros_like(x)
def stiffline_match(x, xa): matcha= zeros_like(x.astype(int)) for ii,xx in enumerate(x): indx = argmin((xa-xx)**2) if xx < xa[indx]: indx -= 1 matcha[ii] = indx+(xx-xa[indx])/(xa[indx+1]-xa[indx]) return matcha
77584d5d988b57c9e19f1c5bb695f072f7aa3bbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11440/77584d5d988b57c9e19f1c5bb695f072f7aa3bbf/crossvalidate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 3048, 1369, 67, 1916, 12, 92, 16, 14139, 4672, 845, 69, 33, 4922, 67, 5625, 12, 92, 13, 364, 6072, 16, 5279, 316, 4241, 12, 92, 4672, 24732, 273, 27546, 12443, 6995, 17, 5279, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 384, 3048, 1369, 67, 1916, 12, 92, 16, 14139, 4672, 845, 69, 33, 4922, 67, 5625, 12, 92, 13, 364, 6072, 16, 5279, 316, 4241, 12, 92, 4672, 24732, 273, 27546, 12443, 6995, 17, 5279, 1...
def highlightSong(self, newindex): if newindex == self.songindex: return if self.songindex>0: item = self.GetItem(self.songindex) item.SetFont(self.default_font) self.SetItem(item) self.songindex = newindex if newindex > 0: item = self.GetItem(self.songindex) item.SetFont(self.bold_font) self.SetItem(item) self.EnsureVisible(newindex)
def highlightSong(self, newindex): if newindex == self.songindex: return if self.songindex>0: item = self.GetItem(self.songindex) item.SetFont(self.default_font) self.SetItem(item) self.songindex = newindex if newindex > 0: item = self.GetItem(self.songindex) item.SetFont(self.bold_font) self.SetItem(item) self.EnsureVisible(newindex)
dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9/mpd_major_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8839, 55, 932, 12, 2890, 16, 394, 1615, 4672, 309, 394, 1615, 422, 365, 18, 816, 75, 1615, 30, 327, 225, 309, 365, 18, 816, 75, 1615, 34, 20, 30, 761, 273, 365, 18, 967, 1180, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8839, 55, 932, 12, 2890, 16, 394, 1615, 4672, 309, 394, 1615, 422, 365, 18, 816, 75, 1615, 30, 327, 225, 309, 365, 18, 816, 75, 1615, 34, 20, 30, 761, 273, 365, 18, 967, 1180, 12, ...
def _read_ref_voltage(self)
def _read_ref_voltage(self):
def _read_ref_voltage(self) return self._read_eeprom(16,19)
4d80acbbbe202127ce2871669554725dec6e29f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13215/4d80acbbbe202127ce2871669554725dec6e29f6/pyoptical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1734, 67, 26340, 12, 2890, 4672, 327, 365, 6315, 896, 67, 2661, 520, 12, 2313, 16, 3657, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1734, 67, 26340, 12, 2890, 4672, 327, 365, 6315, 896, 67, 2661, 520, 12, 2313, 16, 3657, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
LIBFFI_LDFLAGS=[ '-L%s/lib'%LIBFFI_BASE, '-lffi',
LIBFFI_LDFLAGS=[ '-L%s/lib'%LIBFFI_BASE, '-lffi',
def subprocess(taskName, cmd, validRes=None): print "Performing task: %s" % (taskName,) fd = os.popen(cmd, 'r') for ln in fd.xreadlines(): sys.stdout.write(ln) res = fd.close() if res is not validRes: sys.stderr.write("Task '%s' failed [%d]\n"%(taskName, res)) sys.exit(1)
c7327c87d5a2f44301555206c46d8ef6ed97cf84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c7327c87d5a2f44301555206c46d8ef6ed97cf84/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6652, 12, 4146, 461, 16, 1797, 16, 923, 607, 33, 7036, 4672, 1172, 315, 4990, 310, 1562, 30, 738, 87, 6, 738, 261, 4146, 461, 16, 13, 5194, 273, 1140, 18, 84, 3190, 12, 4172, 16, 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, 6652, 12, 4146, 461, 16, 1797, 16, 923, 607, 33, 7036, 4672, 1172, 315, 4990, 310, 1562, 30, 738, 87, 6, 738, 261, 4146, 461, 16, 13, 5194, 273, 1140, 18, 84, 3190, 12, 4172, 16, 2...
assert sys.getrefcount(res) == 2 assert res == 1.0
assert_equal(sys.getrefcount(res),2) assert_equal(res,1.0)
def check_double(self,level=5): code = """ py::object val = 1.0; return_val = val; """ res = inline_tools.inline(code) assert sys.getrefcount(res) == 2 assert res == 1.0
267b08d9c3e7613c126729a179f4503c91625e9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7416/267b08d9c3e7613c126729a179f4503c91625e9c/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9056, 12, 2890, 16, 2815, 33, 25, 4672, 981, 273, 3536, 2395, 2866, 1612, 1244, 273, 404, 18, 20, 31, 327, 67, 1125, 273, 1244, 31, 3536, 400, 273, 6370, 67, 6642, 18, 10047...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 9056, 12, 2890, 16, 2815, 33, 25, 4672, 981, 273, 3536, 2395, 2866, 1612, 1244, 273, 404, 18, 20, 31, 327, 67, 1125, 273, 1244, 31, 3536, 400, 273, 6370, 67, 6642, 18, 10047...
def process_form(mlist, doc): form = cgi.FieldStorage()
def process_form(mlist, doc, cgidata, lang):
def process_form(mlist, doc): form = cgi.FieldStorage() error = 0 results = '' # Preliminaries done, actual processing of the form input below. if form.has_key("language"): language = form["language"].value else: language = mlist.preferred_language os.environ['LANG'] = language if form.has_key("UserOptions") or \ form.has_key("info") and \ not form.has_key("email"): # then # Go to user options section. if not form.has_key("info"): doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("You must supply your email address."))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format(bgcolor="#ffffff") return addr = form['info'].value member = mlist.FindUser(addr) if not member: doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("%s has no subscribed addr <i>%s</i>.") % (mlist.real_name, addr))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format(bgcolor="#ffffff") return call_script(mlist, member, 'options') # should never get here! assert 0 if not form.has_key("email"): error = 1 results = results + _("You must supply a valid email address.<br>") # # define email so we don't get a NameError below # with if email == mlist.GetListEmail() -scott # email = "" else: email = form["email"].value remote = remote_addr() if email == mlist.GetListEmail(): error = 1 if remote: remote = _("Web site ") + remote else: remote = _("unidentified origin") badremote = "\n\tfrom " + remote syslog("mischief", "Attempt to self subscribe %s:%s" % (email, badremote)) results = results + _("You must not subscribe a list to itself!<br>") if not form.has_key("pw") or not form.has_key("pw-conf"): error = 1 results = (results + _("You must supply a valid password, and confirm it.<br>")) else: pw = form["pw"].value pwc = form["pw-conf"].value if not error and pw <> pwc: error = 1 results = results + _("Your passwords did not match.<br>") if form.has_key("digest"): try: digest = int(form['digest'].value) except ValueError: # TBD: Hmm, this shouldn't happen digest = 0 else: digest = mlist.digest_is_default if not mlist.digestable: digest = 0 elif not mlist.nondigestable: digest = 1 if not error: try: if mlist.FindUser(email): raise Errors.MMAlreadyAMember, email if digest: digesting = " digest" else: digesting = "" mlist.AddMember(email, pw, digest, remote, language) # # check for all the errors that mlist.AddMember can throw # options on the web page for this cgi # except Errors.MMBadEmailError: results = results + (_("Mailman won't accept the given email " "address as a valid address. (Does it " "have an @ in it???)<p>")) except Errors.MMListError: results = results + (_("The list is not fully functional, and " "can not accept subscription requests.<p>")) except Errors.MMSubscribeNeedsConfirmation: results = results + (_("Confirmation from your email address is " "required, to prevent anyone from " "subscribing you without permission. " "Instructions are being " "sent to you at %s. Please note your " "subscription will not start until you " "confirm your subscription.") % email) except Errors.MMNeedApproval, x: results = results + (_("Subscription was <em>deferred</em> " "because %s. Your request has been " "forwarded to the list administrator. " "You will receive email informing you " "of the moderator's decision when they " "get to your request.<p>") % x) except Errors.MMHostileAddress: results = results + (_("Your subscription is not allowed because " "the email address you gave is insecure.<p>")) except Errors.MMAlreadyAMember: results = results + _("You are already subscribed!<p>") # # these shouldn't happen, but if someone's futzing with the cgi # they might -scott # except Errors.MMCantDigestError: results = results + \ _("No one can subscribe to the digest of this list!") except Errors.MMMustDigestError: results = results + \ _("This list only supports digest subscriptions!") else: results = results + \ _("You have been successfully subscribed to %s.") % \ (mlist.real_name) PrintResults(mlist, results, doc, language)
b121e4076f4c5d170d07eefd6361b44bbafc2f9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/b121e4076f4c5d170d07eefd6361b44bbafc2f9f/subscribe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 687, 12, 781, 376, 16, 997, 16, 14947, 350, 396, 16, 3303, 4672, 555, 273, 374, 1686, 273, 875, 225, 468, 453, 2878, 381, 267, 5646, 2731, 16, 3214, 4929, 434, 326, 646, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 687, 12, 781, 376, 16, 997, 16, 14947, 350, 396, 16, 3303, 4672, 555, 273, 374, 1686, 273, 875, 225, 468, 453, 2878, 381, 267, 5646, 2731, 16, 3214, 4929, 434, 326, 646, 81...
if username != "acl_users": if username in map(lambda x: x.getId(), self.getUsers()): REQUEST.set('username', username)
if userid != "acl_users": usr = self.getUserById(userid) if usr: REQUEST.set('username', userid)
def manage_workspace(self, REQUEST): """ manage_workspace(self, REQUEST) => Overrided to allow direct user or group traversal via the left tree view. """ path = string.split(REQUEST.PATH_INFO, '/')[:-1] username = path[-1]
582391e7eba55a45e438da01565e2bf05acad909 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/582391e7eba55a45e438da01565e2bf05acad909/GroupUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 14915, 12, 2890, 16, 12492, 4672, 3536, 10680, 67, 14915, 12, 2890, 16, 12492, 13, 516, 531, 1107, 13898, 358, 1699, 2657, 729, 578, 1041, 15940, 3970, 326, 2002, 2151, 1476, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10680, 67, 14915, 12, 2890, 16, 12492, 4672, 3536, 10680, 67, 14915, 12, 2890, 16, 12492, 13, 516, 531, 1107, 13898, 358, 1699, 2657, 729, 578, 1041, 15940, 3970, 326, 2002, 2151, 1476, ...
8209
8209
def padic_height_pairing_matrix(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic $p$-adic height pairing matrix of this curve with respect to the basis self.gens() for the Mordell-Weil group for a given odd prime p of good ordinary reduction.
14f1fc8cda9bf39915df8b02111ef05d810ed99a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/14f1fc8cda9bf39915df8b02111ef05d810ed99a/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 67, 6017, 310, 67, 5667, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4210, 67, 6017, 310, 67, 5667, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281...
pygame.mixer.init(22050, size, channels) try:
try: pygame.mixer.init(22050, size, channels) except pygame.error:
def check_sound(size, channels, test_data): pygame.mixer.init(22050, size, channels) try: # Not all sizes are supported on all systems. __, sz, __ = pygame.mixer.get_init() if sz == size: srcarr = array(test_data, self.array_dtypes[size]) snd = pygame.sndarray.make_sound(srcarr) arr = pygame.sndarray.samples(snd) self.failUnless(alltrue(arr == srcarr), "size: %i\n%s\n%s" % (size, arr, test_data)) finally: pygame.mixer.quit()
26f0f1ab97778715a15aeab725141d302356d888 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/26f0f1ab97778715a15aeab725141d302356d888/sndarray_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 29671, 12, 1467, 16, 5750, 16, 1842, 67, 892, 4672, 775, 30, 2395, 13957, 18, 14860, 264, 18, 2738, 12, 27246, 3361, 16, 963, 16, 5750, 13, 1335, 2395, 13957, 18, 1636, 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, 866, 67, 29671, 12, 1467, 16, 5750, 16, 1842, 67, 892, 4672, 775, 30, 2395, 13957, 18, 14860, 264, 18, 2738, 12, 27246, 3361, 16, 963, 16, 5750, 13, 1335, 2395, 13957, 18, 1636, 30, ...
io_events = poller.poll(timeout)
io_events = poller.poll(None)
def Run(self, handle_sigchld=True, handle_sigterm=True, stop_on_empty=False): """Runs the mainloop.
577c90a3dbe81bb3cca5c97f19e6877a8bbdc5c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/577c90a3dbe81bb3cca5c97f19e6877a8bbdc5c9/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 1640, 67, 7340, 343, 1236, 33, 5510, 16, 1640, 67, 7340, 6408, 33, 5510, 16, 2132, 67, 265, 67, 5531, 33, 8381, 4672, 3536, 9361, 326, 2774, 6498, 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, 1939, 12, 2890, 16, 1640, 67, 7340, 343, 1236, 33, 5510, 16, 1640, 67, 7340, 6408, 33, 5510, 16, 2132, 67, 265, 67, 5531, 33, 8381, 4672, 3536, 9361, 326, 2774, 6498, 18, 2, -100, -1...
elif data0 == 105:
elif data0 == MAGIC_LARGE_TUPLE:
def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == 97: # small_integer_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == 98: # integer_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(i), data[5:]) elif data0 == 99: # float_ext if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == 100: # atom_ext if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == 101: # reference_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == 102: # port_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == 103: # pid_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == 104: # small_tuple_ext if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 105: # large_tuple_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 106: # nil_ext: return (ErlList([]), data[1:]) elif data0 == 107: # string_ext if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == 108: # list_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData) elif data0 == 109: # binary_ext if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == 110: # small_big_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == 111: # large_big_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == 78: # new_cache if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == 67: # cached_atom if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == 114: # new_reference_ext if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) id = [id0] remainingData = remainingData[4:] for i in idLen: i = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] return (ErlRef(node, creation, id), remainingData) elif data0 == 117: # fun_ext if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen, remainingData4) if freeVars == None: return (None, data) return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data)
f5a33431908f2d30884e237b626d15ed55b2f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/f5a33431908f2d30884e237b626d15ed55b2f169/erl_term.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
if item.isActive:
deleted = False for accountData in self.deletions: if accountData['item'] == item.itsUUID: deleted = True break if item.isActive and not deleted:
def __FetchFormData(self, panelType, panel, data): for field in PANELS[panelType]['fields'].keys(): fieldInfo = PANELS[panelType]['fields'][field] if fieldInfo['type'] == 'radioEnumeration' : # a radio button group is handled differently, since there # are multiple wx controls controlling a single attribute. for (button, value) in fieldInfo['buttons'].iteritems(): if value == data[field]: control = wx.xrc.XRCCTRL(panel, button) control.SetValue(True) break continue control = wx.xrc.XRCCTRL(panel, field) valueType = PANELS[panelType]['fields'][field]['type'] if valueType == "string": control.SetValue(data[field]) elif valueType == "boolean": control.SetValue(data[field]) elif valueType == "currentPointer": try: # On GTK if you want to have a radio button which can # be set to False, you really need to create a second # radio button and set that guy's value to True, thus # setting the visible button to False: if data[field]: control.SetValue(True) else: hidden = wx.xrc.XRCCTRL(panel, "%s_HIDDEN" % field) hidden.SetValue(True) except: pass elif valueType == "itemRef": items = [] count = 0 index = -1 uuid = data[field] kind = PANELS[panelType]['fields'][field]['kind'] for item in KindQuery().run([self.view.findPath(kind)]): if item.isActive: items.append(item) if item.itsUUID == uuid: index = count count += 1
73a6315c11defc5f92b5357f09de41c150264ed5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/73a6315c11defc5f92b5357f09de41c150264ed5/AccountPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5005, 30079, 12, 2890, 16, 6594, 559, 16, 6594, 16, 501, 4672, 364, 652, 316, 453, 1258, 2247, 55, 63, 13916, 559, 23962, 2821, 29489, 2452, 13332, 225, 22518, 273, 453, 1258, 2247...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5005, 30079, 12, 2890, 16, 6594, 559, 16, 6594, 16, 501, 4672, 364, 652, 316, 453, 1258, 2247, 55, 63, 13916, 559, 23962, 2821, 29489, 2452, 13332, 225, 22518, 273, 453, 1258, 2247...
A shape is compatible when it has three dimensions (width, height,
A shape is compatible when it has three dimensions (width, height,
def spatialDimensions(cls): "number of spatial dimensions (useful for distinguishing RGBImage and ScalarVolume)" return 2
7142b8e8a5aa0e21c28f74980abb0be6e15b7601 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12582/7142b8e8a5aa0e21c28f74980abb0be6e15b7601/arraytypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15010, 10796, 12, 6429, 4672, 315, 2696, 434, 15010, 5769, 261, 1202, 2706, 364, 23926, 310, 11510, 2040, 471, 15791, 4545, 2225, 327, 576, 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, 0, 0, 0, 0, 0, 0, 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, 15010, 10796, 12, 6429, 4672, 315, 2696, 434, 15010, 5769, 261, 1202, 2706, 364, 23926, 310, 11510, 2040, 471, 15791, 4545, 2225, 327, 576, 2, -100, -100, -100, -100, -100, -100, -100, -10...
return h_value("%s:%s" % (k,s)) def make_urp_hash(username,realm,passwd):
return _h_value("%s:%s" % (k,s)) def _make_urp_hash(username,realm,passwd):
def kd_value(k,s): """KD function of the DIGEST-MD5 algorithm. :Parameters: - `k`: a string. - `s`: a string. :Types: - `k`: `str` - `s`: `str` :return: MD5 sum of the strings joined with ':'. :returntype: `str`""" return h_value("%s:%s" % (k,s))
1e1db4225095c220966b09e2e9bd16f3ebaf7760 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/1e1db4225095c220966b09e2e9bd16f3ebaf7760/digest_md5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 72, 67, 1132, 12, 79, 16, 87, 4672, 3536, 47, 40, 445, 434, 326, 24313, 11027, 17, 6188, 25, 4886, 18, 225, 294, 2402, 30, 300, 1375, 79, 68, 30, 279, 533, 18, 300, 1375, 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, 417, 72, 67, 1132, 12, 79, 16, 87, 4672, 3536, 47, 40, 445, 434, 326, 24313, 11027, 17, 6188, 25, 4886, 18, 225, 294, 2402, 30, 300, 1375, 79, 68, 30, 279, 533, 18, 300, 1375, 87, ...
['sage/gsl/interpolation.pyx'], libraries = ['gsl', BLAS, BLAS2], define_macros=[('GSL_DISABLE_DEPRECATED','1')])
['sage/gsl/interpolation.pyx'], libraries = ['gsl', BLAS, BLAS2], define_macros=[('GSL_DISABLE_DEPRECATED','1')])
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
697d48ce28ff4d12606adf26a8fb095216c31678 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/697d48ce28ff4d12606adf26a8fb095216c31678/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 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, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
return None
raise AssertionError("Unknown IncrementalSave node " + node)
def LoadFromString(string): doc = xml.parseString(string) node = doc.firstChild if node == "Action": return Action.LoadFromString(string) elif node == "NewEvent": return NewEvent.LoadFromString(string) elif node == "StartDownload": return StartDownload.LoadFromString(string) elif node == "CompleteDownload": return CompleteDownload.LoadFromString(string) return None
68f561deef28b6cb0ef8d9cff44db074cd30b067 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10033/68f561deef28b6cb0ef8d9cff44db074cd30b067/IncrementalSave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 9193, 12, 1080, 4672, 997, 273, 2025, 18, 2670, 780, 12, 1080, 13, 756, 273, 997, 18, 3645, 1763, 309, 756, 422, 315, 1803, 6877, 327, 4382, 18, 2563, 9193, 12, 1080, 13, 1327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4444, 9193, 12, 1080, 4672, 997, 273, 2025, 18, 2670, 780, 12, 1080, 13, 756, 273, 997, 18, 3645, 1763, 309, 756, 422, 315, 1803, 6877, 327, 4382, 18, 2563, 9193, 12, 1080, 13, 1327, ...
str += '<dl>\n'
if (isinstance(vval, UID)): str += ('<code>%s</code> = %s\n' % (vname, self._uid_to_href(vval))) vval = vtyp = None
def _var_details(self, variables, container, heading='Variable Details'): """ @return: The HTML code for a variable details table. This is used by L{_module_to_html} to describe the variables in a module; and by L{_class_to_html} to describe instance variables and class variables. @rtype: C{string} """ variables = self._sort(variables) if len(variables) == 0: return '' str = self._table_header(heading, 'details')+'</table>'
de8498c8efa790d4615edc664395ae04afd746a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/de8498c8efa790d4615edc664395ae04afd746a1/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1401, 67, 6395, 12, 2890, 16, 3152, 16, 1478, 16, 11053, 2218, 3092, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 2190, 3189, 1014, 18, 225, 1220, 353, 1399, 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, 1401, 67, 6395, 12, 2890, 16, 3152, 16, 1478, 16, 11053, 2218, 3092, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 2190, 3189, 1014, 18, 225, 1220, 353, 1399, 6...
return [string.join(myparts[:-1],"-"),myparts[-1],"0"]
return [string.join(myparts[:-1],"-"),myparts[-1],"r0"]
def pkgsplit(mypkg): global ERRPKG ERRPKG="" myparts=string.split(mypkg,'-') if len(myparts)<2: ERRPKG="Not enough \"-\" characters." return None if revverify(myparts[-1]): if ververify(myparts[-2]): if len(myparts)==2: ERRPKG="Found rev and version, but no package name." return None else: for x in myparts[:-2]: if ververify(x): ERRPKG=x+" shouldn't look like a version part." return None #names can't have versiony looking parts return [string.join(myparts[:-2],"-"),myparts[-2],myparts[-1]] else: ERRPKG="Found revision but "+myparts[-2]+" does not appear to be a valid version." return None elif ververify(myparts[-1]): if len(myparts)==1: ERRPKG="Found version, but no package name." return None else: for x in myparts[:-1]: if ververify(x): ERRPKG=x+" shouldn't look like a version part." return None return [string.join(myparts[:-1],"-"),myparts[-1],"0"] else: ERRPKG=myparts[-1]+" doesn't appear to be a version or rev string." return None
eab1f140c1ed9ad3b99140ae7390b416dd1f4a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/eab1f140c1ed9ad3b99140ae7390b416dd1f4a76/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16922, 1127, 12, 81, 879, 14931, 4672, 2552, 10359, 8784, 43, 10359, 8784, 43, 1546, 6, 312, 879, 485, 87, 33, 1080, 18, 4939, 12, 81, 879, 14931, 11189, 17, 6134, 309, 562, 12, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16922, 1127, 12, 81, 879, 14931, 4672, 2552, 10359, 8784, 43, 10359, 8784, 43, 1546, 6, 312, 879, 485, 87, 33, 1080, 18, 4939, 12, 81, 879, 14931, 11189, 17, 6134, 309, 562, 12, 81, ...
m.set(world.id, terrain={'points' : points})
minx=0 miny=0 minz=0 maxx=0 maxy=0 maxz=0 for i in points.values(): x = i[0] y = i[1] z = i[2] if not minx or x < minx: minx = x if not miny or y < miny: miny = y if not minz or z < minz: minz = z if not maxx or x > maxx: maxx = x if not maxy or y > maxy: maxy = y if not maxz or z > maxz: maxz = z m.set(world.id, terrain={'points' : points}, name="moraf", bbox=[minx * 64, miny * 64, minz, maxx * 64, maxy * 64, maxz])
def modify_terrain(mapeditor):
ed82d02137efd633e3af5e6712f2a5cff4dca524 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/ed82d02137efd633e3af5e6712f2a5cff4dca524/define_world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 67, 387, 7596, 12, 1458, 9177, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 5612, 67, 387, 7596, 12, 1458, 9177, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif 'AC_INIT([libtorrent-rasterbar]' in l and filename.endiswith('.in'):
elif 'AC_INIT([libtorrent-rasterbar]' in l and name.endswith('.in'):
def substitute_file(name): subst = '' f = open(name) for l in f: if '#define LIBTORRENT_VERSION_MAJOR' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_MAJOR %d\n' % version[0] elif '#define LIBTORRENT_VERSION_MINOR' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_MINOR %d\n' % version[1] if '#define LIBTORRENT_VERSION_TINY' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_TINY %d\n' % version[2] elif '#define LIBTORRENT_VERSION' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION "%d.%d.%d.%d"\n' % (version[0], version[1], version[2], version[3]) elif 'AC_INIT([libtorrent-rasterbar]' in l and filename.endiswith('.in'): l = 'AC_INIT([libtorrent-rasterbar], [%d.%d.%d], [arvid@cs.umu.se])\n' % (version[0], version[1], version[2]) elif 'set (VERSION ' in l and filename.endiswith('.in'): l = 'set (VERSION "%d.%d.%d")\n' % (version[0], version[1], version[2]) elif ':Version: ' in l and filename.endiswith('.rst'): l = ':Version: %d.%d.%d\n' % (version[0], version[1], version[2]) elif 'VERSION = ' in l and filename.endiswith('Jamfile'): l = 'VERSION = %d.%d.%d ;\n' % (version[0], version[1], version[2]) subst += l f.close() open(name, 'w+').write(subst)
ade9727b186357c72ab7a1eff51f29f4426775f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6320/ade9727b186357c72ab7a1eff51f29f4426775f8/set_version.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14811, 67, 768, 12, 529, 4672, 27750, 273, 875, 284, 273, 1696, 12, 529, 13, 364, 328, 316, 284, 30, 309, 2946, 11255, 23983, 56, 916, 7480, 67, 5757, 67, 26976, 916, 11, 316, 328, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14811, 67, 768, 12, 529, 4672, 27750, 273, 875, 284, 273, 1696, 12, 529, 13, 364, 328, 316, 284, 30, 309, 2946, 11255, 23983, 56, 916, 7480, 67, 5757, 67, 26976, 916, 11, 316, 328, 4...
'User' : 'unknown', 'UserGroup' : 'unknown', 'JobGroup' : 'unknown', 'JobType' : 'unknown', 'JobClass' : 'unknown', 'ProcessingType' : 'unknown',
'User' : self.owner, 'UserGroup' : self.userGroup, 'JobGroup' : self.jobGroup, 'JobType' : self.jobType, 'JobClass' : self.jobClass, 'ProcessingType' : self.processingType,
def sendWMSAccounting(self): """Send WMS accounting data. """ self.accountingReport.setEndTime() #CPUTime and ExecTime if 'CPU' in EXECUTION_RESULT: utime, stime, cutime, cstime, elapsed = EXECUTION_RESULT['CPU'] else: utime, stime, cutime, cstime, elapsed = os.times() cpuTime = utime + stime + cutime + cstime execTime = elapsed #Fill the data acData = { 'User' : 'unknown', 'UserGroup' : 'unknown', 'JobGroup' : 'unknown', 'JobType' : 'unknown', 'JobClass' : 'unknown', 'ProcessingType' : 'unknown', 'FinalMajorStatus' : self.wmsMajorStatus, 'FinalMinorStatus' : self.wmsMinorStatus, #La "chicha" 'CPUTime' : cpuTime, 'NormCPUTime' : cpuTime * gConfig.getValue ( "/LocalSite/CPUScalingFactor", 0.0 ), 'ExecTime' : execTime, #FIXME: Fill all that data 'InputDataSize' : 0, 'OutputDataSize' : 0, 'InputDataFiles' : 0, 'OutputDataFiles' : 0, 'DiskSpace' : 0, 'InputSandBoxSize' : 0, 'OutputSandBoxSize' : 0, 'ProcessedEvents' : 0, } self.accountingReport.setValuesFromDict( acData ) self.accountingReport.commit()
b03e51b6437930714ea21108f8c3e6e5dd0ccb3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/b03e51b6437930714ea21108f8c3e6e5dd0ccb3f/JobWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 59, 3537, 3032, 310, 12, 2890, 4672, 3536, 3826, 678, 3537, 2236, 310, 501, 18, 3536, 365, 18, 4631, 310, 4820, 18, 542, 25255, 1435, 468, 15222, 950, 471, 3889, 950, 309, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 59, 3537, 3032, 310, 12, 2890, 4672, 3536, 3826, 678, 3537, 2236, 310, 501, 18, 3536, 365, 18, 4631, 310, 4820, 18, 542, 25255, 1435, 468, 15222, 950, 471, 3889, 950, 309, 296, 1...
self[atom.name] = cdata.short(data[16:18])
self[atom.name] = cdata.short_be(data[16:18])
def __parse_tempo(self, atom, data): self[atom.name] = cdata.short(data[16:18])
3efbb847d5bdc82baeaed8ffac1dcf6d65035531 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1845/3efbb847d5bdc82baeaed8ffac1dcf6d65035531/m4a.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 67, 874, 1631, 12, 2890, 16, 3179, 16, 501, 4672, 365, 63, 7466, 18, 529, 65, 273, 20712, 18, 6620, 12, 892, 63, 2313, 30, 2643, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 67, 874, 1631, 12, 2890, 16, 3179, 16, 501, 4672, 365, 63, 7466, 18, 529, 65, 273, 20712, 18, 6620, 12, 892, 63, 2313, 30, 2643, 5717, 2, -100, -100, -100, -100, -100, -1...
testDate = False
testDate = ""
def main(argv=None): exePath = executablePath configPath = configFilePath output = "" title = defaultTitle branch = "" testDate = False verbose = False buildid = "" if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "hve:c:t:b:o:i:d", ["help", "verbose", "executablePath=", "configFilePath=", "title=", "branch=", "output=", "id=", "testDate"]) except getopt.error, msg: raise Usage(msg) # option processing for option, value in opts: if option in ("-v", "--verbose"): verbose = True if option in ("-h", "--help"): raise Usage(help_message) if option in ("-e", "--executablePath"): exePath = value if option in ("-c", "--configFilePath"): configPath = value if option in ("-t", "--title"): title = value if option in ("-b", "--branch"): branch = value if option in ("-o", "--output"): output = value if option in ("-i", "--id"): buildid = value if option in ("-d", "--testDate"): testDate = True except Usage, err: print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) print >> sys.stderr, "\t for help use --help" return 2 configurator = PerfConfigurator(title=title, executablePath=exePath, configFilePath=configPath, buildid=buildid, branch=branch, verbose=verbose, testDate=testDate, outputName=output) try: configurator.writeConfigFile() except Configuration, err: print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) return 5 return 0
063bd9031798da0e2a14de0d8709374c574f5f99 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/063bd9031798da0e2a14de0d8709374c574f5f99/PerfConfigurator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 15073, 743, 273, 9070, 743, 16012, 273, 642, 5598, 876, 273, 1408, 2077, 273, 805, 4247, 3803, 273, 1408, 1842, 1626, 273, 1408, 3988, 273, 1083, 1361, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 15073, 743, 273, 9070, 743, 16012, 273, 642, 5598, 876, 273, 1408, 2077, 273, 805, 4247, 3803, 273, 1408, 1842, 1626, 273, 1408, 3988, 273, 1083, 1361, 3...
print '\t-d\tdirectory for CGIs, defaults to %s' % cgidir
print '\t-c\tdirectory for CGIs, defaults to %s' % cgidir
def usage(): print 'usage: zope-install [-n] [-p perms] [-u user] [-g group] [-d dir] [-c cgidir] instancename' print print '\t-n\tshow what would be done, but don\'t actually do it' print '\t-p\tmanager permissions, in the form' print '\t\tusername:plaintextpassword[:domain-restrinction]' print '\t\teg: "root:mypass" or "root:mypass:*.mydomain.com' print '\t-u\tusername to run as, default to Apache\'s user' print '\t-g\tgroupname to run as, default to Apache\'s group' print '\t-d\tdirectory for instance, defaults to %s/instancename' % zopedata print '\t-d\tdirectory for CGIs, defaults to %s' % cgidir sys.exit(1)
d44c776a9d138bfe918edc514780e87e71ae8386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1882/d44c776a9d138bfe918edc514780e87e71ae8386/zope-install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 9167, 30, 998, 1306, 17, 5425, 23059, 82, 65, 23059, 84, 13793, 65, 23059, 89, 729, 65, 23059, 75, 1041, 65, 23059, 72, 1577, 65, 23059, 71, 14947, 350, 481, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 13332, 1172, 296, 9167, 30, 998, 1306, 17, 5425, 23059, 82, 65, 23059, 84, 13793, 65, 23059, 89, 729, 65, 23059, 75, 1041, 65, 23059, 72, 1577, 65, 23059, 71, 14947, 350, 481, 65...
if hasattr(posix, 'chown'): def test_chown(self): os.unlink(test_support.TESTFN) self.assertRaises(OSError, posix.chown, test_support.TESTFN, -1, -1) open(test_support.TESTFN, 'w').close() if os.getuid() == 0: try: ent = pwd.getpwnam('nfsnobody') posix.chown(test_support.TESTFN, ent.pw_uid, ent.pw_gid) except KeyError: pass else: self.assertRaises(OSError, posix.chown, test_support.TESTFN, 0, 0) posix.chown(test_support.TESTFN, os.getuid(), os.getgid())
def _test_all_chown_common(self, chown_func, first_param): """Common code for chown, fchown and lchown tests.""" if os.getuid() == 0: try: ent = pwd.getpwnam('nfsnobody') chown_func(first_param, ent.pw_uid, ent.pw_gid) except KeyError: pass else: self.assertRaises(OSError, chown_func, first_param, 0, 0) chown_func(first_param, os.getuid(), os.getgid()) @unittest.skipUnless(hasattr(posix, 'chown'), "test needs os.chown()") def test_chown(self): os.unlink(test_support.TESTFN) self.assertRaises(OSError, posix.chown, test_support.TESTFN, -1, -1) open(test_support.TESTFN, 'w').close() self._test_all_chown_common(posix.chown, test_support.TESTFN) @unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()") def test_fchown(self): os.unlink(test_support.TESTFN) test_file = open(test_support.TESTFN, 'w') try: fd = test_file.fileno() self._test_all_chown_common(posix.fchown, fd) finally: test_file.close() @unittest.skipUnless(hasattr(posix, 'lchown'), "test needs os.lchown()") def test_lchown(self): os.unlink(test_support.TESTFN) os.symlink('/tmp/dummy-symlink-target', test_support.TESTFN) self._test_all_chown_common(posix.lchown, test_support.TESTFN)
def test_stat(self): if hasattr(posix, 'stat'): self.assertTrue(posix.stat(test_support.TESTFN))
dd107936120d540cc6ce2e7fb150f69e0126b6f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/dd107936120d540cc6ce2e7fb150f69e0126b6f2/test_posix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5642, 12, 2890, 4672, 309, 3859, 12, 24463, 16, 296, 5642, 11, 4672, 365, 18, 11231, 5510, 12, 24463, 18, 5642, 12, 3813, 67, 13261, 18, 16961, 19793, 3719, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5642, 12, 2890, 4672, 309, 3859, 12, 24463, 16, 296, 5642, 11, 4672, 365, 18, 11231, 5510, 12, 24463, 18, 5642, 12, 3813, 67, 13261, 18, 16961, 19793, 3719, 2, -100, -100, -1...
voicemailPeriodInSeconds = state_machine.to_seconds( **{defaults["voicemail"][1]: defaults["voicemail"][0],} )
if defaults["voicemail"][0] == state_machine.UpdateStateMachine.INFINITE_PERIOD: voicemailPeriodInSeconds = state_machine.UpdateStateMachine.INFINITE_PERIOD else: voicemailPeriodInSeconds = state_machine.to_seconds( **{defaults["voicemail"][1]: defaults["voicemail"][0],} )
def __init__(self, cookiePath = None, defaults = None): if defaults is None: defaults = self._DEFAULTS else: for key, (quant, unit) in defaults.iteritems(): if quant == 0: defaults[key] = self._DEFAULTS[key] elif quant < 0: defaults[key] = state_machine.INFINITE_PERIOD self._username = None self._password = None
6fd8c075d389b9f4e4be90ac3b3707611c9dccbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/6fd8c075d389b9f4e4be90ac3b3707611c9dccbe/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3878, 743, 273, 599, 16, 3467, 273, 599, 4672, 309, 3467, 353, 599, 30, 3467, 273, 365, 6315, 5280, 55, 469, 30, 364, 498, 16, 261, 17753, 16, 2836, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3878, 743, 273, 599, 16, 3467, 273, 599, 4672, 309, 3467, 353, 599, 30, 3467, 273, 365, 6315, 5280, 55, 469, 30, 364, 498, 16, 261, 17753, 16, 2836, 13...
@interactive def find_file_other_window(self): file = self._base_find_file()
@rawprefixed def find_file_other_window(self, prefix): file = self._base_find_file(prefix)
def find_file(self): file = self._base_find_file() if file is not None: lisp.find_file(file.real_path)
9cf664963c810017265be6070f855c2ebf9d1e00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8283/9cf664963c810017265be6070f855c2ebf9d1e00/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 768, 12, 2890, 4672, 585, 273, 365, 6315, 1969, 67, 4720, 67, 768, 1435, 309, 585, 353, 486, 599, 30, 328, 23831, 18, 4720, 67, 768, 12, 768, 18, 7688, 67, 803, 13, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 768, 12, 2890, 4672, 585, 273, 365, 6315, 1969, 67, 4720, 67, 768, 1435, 309, 585, 353, 486, 599, 30, 328, 23831, 18, 4720, 67, 768, 12, 768, 18, 7688, 67, 803, 13, 2, -1...
package_dir = {'': '..'},
package_dir = {'reportlab': '.'},
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="info@reportlab.com", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
3d98c85095bfb26ef062b09b88057d05b3f35850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/3d98c85095bfb26ef062b09b88057d05b3f35850/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 8961, 12692, 273, 5378, 3875, 12, 508, 1546, 4820, 7411, 3113, 1177, 1546, 21, 18, 3600, 18, 23, 3113, 2477, 1546, 4820, 7411, 12667, 9377, 8513, 3113, 2869, 1546, 1986, 800, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 8961, 12692, 273, 5378, 3875, 12, 508, 1546, 4820, 7411, 3113, 1177, 1546, 21, 18, 3600, 18, 23, 3113, 2477, 1546, 4820, 7411, 12667, 9377, 8513, 3113, 2869, 1546, 1986, 800, ...
self.tb_button=gtk.ToolButton() self.tb_button.set_label("Start") self.tb_button.set_icon_name('hamster-applet') self.tb_button.set_tooltip_text("Start a new activity in Hamster Time Tracker based on the selected task") self.tb_button.connect('clicked', self.browser_cb, plugin_api)
self.button=gtk.ToolButton() self.button.set_label("Start") self.button.set_icon_name('hamster-applet') self.button.set_tooltip_text("Start a new activity in Hamster Time Tracker based on the selected task") self.button.connect('clicked', self.browser_cb, plugin_api)
def activate(self, plugin_api): self.menu_item = gtk.MenuItem("Start task in Hamster") self.menu_item.connect('activate', self.browser_cb, plugin_api) self.tb_button=gtk.ToolButton() self.tb_button.set_label("Start") self.tb_button.set_icon_name('hamster-applet') self.tb_button.set_tooltip_text("Start a new activity in Hamster Time Tracker based on the selected task") self.tb_button.connect('clicked', self.browser_cb, plugin_api) # add a menu item to the menu bar plugin_api.AddMenuItem(self.menu_item) # saves the separator's index to later remove it self.separator = plugin_api.AddToolbarItem(gtk.SeparatorToolItem()) # add a item (button) to the ToolBar plugin_api.AddToolbarItem(self.tb_button)
7172602e6dde54005cdbf7139d595e8248bd20d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/7172602e6dde54005cdbf7139d595e8248bd20d0/hamster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 1909, 67, 2425, 4672, 365, 18, 5414, 67, 1726, 273, 22718, 18, 12958, 2932, 1685, 1562, 316, 670, 301, 8190, 7923, 365, 18, 5414, 67, 1726, 18, 3612, 2668, 10014, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10235, 12, 2890, 16, 1909, 67, 2425, 4672, 365, 18, 5414, 67, 1726, 273, 22718, 18, 12958, 2932, 1685, 1562, 316, 670, 301, 8190, 7923, 365, 18, 5414, 67, 1726, 18, 3612, 2668, 10014, ...
print "parent_path: ", parent_path print "file_name: ", file_name print "true_mwk_file; ", true_mwk_file
def unindex(self): if(os.path.isdir(self.file)): split_file_name = os.path.split(self.file) file_name = split_file_name[-1:][0] parent_path = os.pathsep.join(split_file_name[0:-1]) true_mwk_file = os.path.join(self.file,file_name) print "parent_path: ", parent_path print "file_name: ", file_name print "true_mwk_file; ", true_mwk_file aside_path = os.path.join(parent_path, file_name + ".aside") os.rename( self.file, aside_path) #print "rename %s to %s" % ( self.file, aside_path) os.rename( os.path.join(aside_path, file_name), os.path.join(parent_path,file_name) ) #print "rename %s to %s" % ( os.path.join(aside_path, file_name), os.path.join(parent_path,file_name) ) os.system("rm -rf %s" % aside_path) #print "remove %s" % aside_path else: raise IndexingException("Attempt to re-index a file that has not yet been indexed")
1614807a7909f2be0994cf300cab897c4e4f8b85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12313/1614807a7909f2be0994cf300cab897c4e4f8b85/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 1615, 12, 2890, 4672, 309, 12, 538, 18, 803, 18, 291, 1214, 12, 2890, 18, 768, 3719, 30, 1416, 67, 768, 67, 529, 273, 1140, 18, 803, 18, 4939, 12, 2890, 18, 768, 13, 585, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 1615, 12, 2890, 4672, 309, 12, 538, 18, 803, 18, 291, 1214, 12, 2890, 18, 768, 3719, 30, 1416, 67, 768, 67, 529, 273, 1140, 18, 803, 18, 4939, 12, 2890, 18, 768, 13, 585, 67, ...
if not settings_dict:
if not settings_dict.get('NAME',''):
def _get_pool (self): """ Get the connection pool or create it if it doesnt exist Add thread lock to prevent server initial heavy load creating multiple pools """ if not hasattr (self.__class__, '_pool'): lock = thread.allocate_lock() lock.acquire() if not hasattr (self.__class__, '_pool'): if DATABASE_EXTRAS['threaded']: Database.OPT_Threading = 1 else: Database.OPT_Threading = 0 # Use 1.2 style dict if its there, else make one try: settings_dict = self.creation.connection.settings_dict except: settings_dict = None if not settings_dict: settings_dict = {'HOST':settings.DATABASE_HOST, 'PORT':settings.DATABASE_PORT, 'NAME':settings.DATABASE_NAME, 'USER':settings.DATABASE_USER, 'PASSWORD':settings.DATABASE_PASSWORD, } if len(settings_dict.get('HOST','').strip()) == 0: settings_dict['HOST'] = 'localhost' if len(settings_dict.get('PORT','').strip()) != 0: dsn = Database.makedsn(settings_dict['HOST'], int(settings_dict['PORT']), settings_dict.get('NAME','')) else: dsn = settings_dict.get('NAME','')
300c020d4e43b63e85ada4e85fd62f0d9766f633 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7222/300c020d4e43b63e85ada4e85fd62f0d9766f633/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6011, 261, 2890, 4672, 3536, 968, 326, 1459, 2845, 578, 752, 518, 309, 518, 31272, 1005, 1436, 2650, 2176, 358, 5309, 1438, 2172, 3904, 23935, 1262, 4979, 3229, 16000, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 6011, 261, 2890, 4672, 3536, 968, 326, 1459, 2845, 578, 752, 518, 309, 518, 31272, 1005, 1436, 2650, 2176, 358, 5309, 1438, 2172, 3904, 23935, 1262, 4979, 3229, 16000, 3536, ...
self.locks = {}
self.locks = locks
def __init__(self,backend,parameters,refresh_cllbck) : self.backend = backend self.dic = parameters self.tasks = {} self.time = time.time() self.refresh = refresh_cllbck self.locks = {} self.tosleep = 0
fb7f0d508074137043da484113a61a40849d87c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/fb7f0d508074137043da484113a61a40849d87c0/datastore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9993, 16, 3977, 16, 9144, 67, 830, 20404, 363, 13, 294, 365, 18, 9993, 273, 4221, 365, 18, 15859, 273, 1472, 365, 18, 9416, 273, 2618, 365, 18, 957, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9993, 16, 3977, 16, 9144, 67, 830, 20404, 363, 13, 294, 365, 18, 9993, 273, 4221, 365, 18, 15859, 273, 1472, 365, 18, 9416, 273, 2618, 365, 18, 957, 27...
self.prepset = True
def populate_fdom_optionmenu(self): menu = gtk.Menu() faildoms = self.model_builder.getFailoverDomains() if len(faildoms) == 0: m = gtk.MenuItem(NONE_PLACEHOLDER) m.show() menu.append(m) else: m = gtk.MenuItem(NONE_PLACEHOLDER) m.show() menu.append(m) for fdom in faildoms: m = gtk.MenuItem(fdom.getName()) m.show() menu.append(m) self.prepset = True self.svc_fdom_optionmenu.set_menu(menu)
f188c0129f00d6eb47c578b6a5b48472ca2539fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3879/f188c0129f00d6eb47c578b6a5b48472ca2539fd/ServiceController.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 67, 8313, 362, 67, 3482, 5414, 12, 2890, 4672, 3824, 273, 22718, 18, 4599, 1435, 11087, 545, 25390, 273, 365, 18, 2284, 67, 9574, 18, 588, 26329, 15531, 1435, 309, 562, 12, 507, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6490, 67, 8313, 362, 67, 3482, 5414, 12, 2890, 4672, 3824, 273, 22718, 18, 4599, 1435, 11087, 545, 25390, 273, 365, 18, 2284, 67, 9574, 18, 588, 26329, 15531, 1435, 309, 562, 12, 507, ...
wikipedia.output(u"Unexpected error occurred trying to save [[%s]]: %s" % (redir.title(), error))
wikipedia.output( u"Unexpected error occurred trying to save [[%s]]: %s" % (redir.title(), error))
def fix_1_double_redirect(self, redir_name): redir = wikipedia.Page(self.site, redir_name) # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % redir.title()) newRedir = redir redirList = [] # bookkeeping to detect loops while True: redirList.append(u'%s:%s' % (newRedir.site().lang, newRedir.sectionFreeTitle())) try: targetPage = newRedir.getRedirectTarget() except wikipedia.IsNotRedirectPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s is not a redirect.' % redir.aslink()) break #do nothing elif len(redirList) == 2: wikipedia.output( u'Skipping: Redirect target %s is not a redirect.' % newRedir.aslink()) break # do nothing except wikipedia.SectionError: wikipedia.output( u'Warning: Redirect target section %s doesn\'t exist.' % newRedir.aslink()) except wikipedia.BadTitle, e: # str(e) is in the format 'BadTitle: [[Foo]]' wikipedia.output( u'Warning: Redirect target %s is not a valid page title.' % str(e)[10:]) #sometimes this error occures. Invalid Title starting with a '#' except wikipedia.InvalidTitle, err: wikipedia.output(u'Warning: %s' % err) break except wikipedia.NoPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s does not exist.' % redir.aslink()) break else: if self.always: wikipedia.output( u"Skipping: Redirect target %s doesn't exist." % newRedir.aslink()) break # skip if automatic else: wikipedia.output( u"Warning: Redirect target %s doesn't exist." % newRedir.aslink()) except wikipedia.ServerError: wikipedia.output(u'Skipping: Server Error') break else: wikipedia.output( u' Links to: %s.' % targetPage.aslink()) if targetPage.site() != self.site: wikipedia.output(u'Warning: redirect target (%s) is on a different site.' % (targetPage.aslink())) if self.always: break # skip if automatic # watch out for redirect loops if redirList.count(u'%s:%s' % (targetPage.site().lang, targetPage.sectionFreeTitle()) ) > 0: wikipedia.output( u'Warning: Redirect target %s forms a redirect loop.' % targetPage.aslink()) break ###xqt doesn't work. edits twice! try: content = targetPage.get(get_redirect=True) except wikipedia.SectionError: content = wikipedia.Page( targetPage.site(), targetPage.sectionFreeTitle() ).get(get_redirect=True) if targetPage.site().lang in sd_template \ and targetPage.site().lang in sd_tagging_sum: wikipedia.output(u"Tagging redirect for deletion") # Delete the two redirects content = wikipedia.translate(targetPage.site().lang, sd_template)+"\n"+content summ = wikipedia.translate(targetPage.site().lang, sd_tagging_sum) targetPage.put(content, summ) redir.put(content, summ) else: break # TODO Better implement loop redirect else: newRedir = targetPage continue # try: oldText = redir.get(get_redirect=True) except wikipedia.BadTitle: wikipedia.output(u"Bad Title Error") break text = self.site.redirectRegex().sub( '#%s %s' % (self.site.redirect( True ), targetPage.aslink()), oldText) if text == oldText: break summary = wikipedia.translate(self.site, msg_double) % targetPage.aslink() wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text, summary) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output(u"Saving page [[%s]] prevented by spam filter: %s" % (redir.title(), error.url)) except wikipedia.PageNotSaved, error: wikipedia.output(u"Saving page [[%s]] failed: %s" % (redir.title(), error)) except wikipedia.NoUsername: wikipedia.output(u"Page [[%s]] not saved; sysop privileges required." % redir.title()) except wikipedia.Error, error: wikipedia.output(u"Unexpected error occurred trying to save [[%s]]: %s" % (redir.title(), error)) break
c499f5c4d7eb66e6b361af0a88786c3f2ea91f11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c499f5c4d7eb66e6b361af0a88786c3f2ea91f11/redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 21, 67, 9056, 67, 7590, 12, 2890, 16, 225, 283, 1214, 67, 529, 4672, 283, 1214, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 283, 1214, 67, 529, 13, 468, 9674, 326, 2077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2917, 67, 21, 67, 9056, 67, 7590, 12, 2890, 16, 225, 283, 1214, 67, 529, 4672, 283, 1214, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 283, 1214, 67, 529, 13, 468, 9674, 326, 2077, ...
subdirs = ['dom', 'gfx', 'widget', 'commandhandler']
def allIsDir(directory, subdirs): for subdir in subdirs: if not os.path.isdir(os.path.join(directory, subdir)): return False return True
06a01ae812b082d2afa4149584a57243cdf95272 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/06a01ae812b082d2afa4149584a57243cdf95272/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 2520, 1621, 12, 5149, 16, 720, 8291, 4672, 364, 16921, 316, 720, 8291, 30, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 5149, 16, 16921, 3719, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 777, 2520, 1621, 12, 5149, 16, 720, 8291, 4672, 364, 16921, 316, 720, 8291, 30, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 5149, 16, 16921, 3719, 30, 327...
settings = OptionParser([LaTeXWriter()]).get_default_values() document.settings = settings
if self.settings is None: settings = OptionParser([LaTeXWriter()]).get_default_values() self.__class__.settings = settings document.settings = self.settings
def __init__(self, document, docstring_linker): # Set the document's settings. settings = OptionParser([LaTeXWriter()]).get_default_values() document.settings = settings
3f16b7248f049c04190bbdc6bfca917c0b9caa2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/3f16b7248f049c04190bbdc6bfca917c0b9caa2e/restructuredtext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 16, 14525, 67, 1232, 264, 4672, 468, 1000, 326, 1668, 1807, 1947, 18, 1947, 273, 18862, 3816, 30745, 21575, 60, 2289, 1435, 65, 2934, 588, 67, 1886, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 16, 14525, 67, 1232, 264, 4672, 468, 1000, 326, 1668, 1807, 1947, 18, 1947, 273, 18862, 3816, 30745, 21575, 60, 2289, 1435, 65, 2934, 588, 67, 1886, ...
sympy.pretty_print(t_res.other)
def K_nR1(G, N): ext_strech_var_str=None if N==0: diffs=[None,] extra_diff_multiplier = 1 elif N==2: extra_diff_multiplier = 0.5 ext_moment_atoms_str = FindExtMomentAtoms(G) if len(ext_moment_atoms_str)==1: ext_strech_var_str = "%s_strech_var"%ext_moment_atoms_str[0] ext_moment_path = [(i[0],i[1],ext_strech_var_str) for i in FindExtMomentPath(G,ext_moment_atoms_str)] for idx in ext_moment_path: if idx[1]=="L": line = G.lines[idx[0]] if 'strech' not in line.__dict__: line.strech=dict() line.strech[ext_strech_var_str]=ext_moment_atoms_str elif idx[1]=="N": node = G.nodes[idx[0]] if 'strech' not in node.__dict__: node.strech=dict() node.strech[ext_strech_var_str]=ext_moment_atoms_str diffs = [i for i in rggrf.utils.xSelections(ext_moment_path,N)] else: raise ValueError, "no or complex external momenta, atoms: %s"%ext_moment_atoms_str else: raise ValueError, " Unknown operation : K%s"%N extra_strech_multiplier=1.
c194c60177d4d47593f64602a0d01be93ecd2b9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4941/c194c60177d4d47593f64602a0d01be93ecd2b9f/phi3R.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1475, 67, 82, 54, 21, 12, 43, 16, 423, 4672, 225, 1110, 67, 334, 266, 343, 67, 1401, 67, 701, 33, 7036, 309, 423, 631, 20, 30, 15250, 22850, 7036, 16, 65, 2870, 67, 5413, 67, 20538...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1475, 67, 82, 54, 21, 12, 43, 16, 423, 4672, 225, 1110, 67, 334, 266, 343, 67, 1401, 67, 701, 33, 7036, 309, 423, 631, 20, 30, 15250, 22850, 7036, 16, 65, 2870, 67, 5413, 67, 20538...
Keywords are width, height, startx and starty
Keywords are width, height, startx and starty:
def setup(**geometry): """ Sets the size and position of the main window. Keywords are width, height, startx and starty width: either a size in pixels or a fraction of the screen. Default is 50% of screen. height: either the height in pixels or a fraction of the screen. Default is 75% of screen. Setting either width or height to None before drawing will force use of default geometry as in older versions of turtle.py startx: starting position in pixels from the left edge of the screen. Default is to center window. Setting startx to None is the default and centers window horizontally on screen. starty: starting position in pixels from the top edge of the screen. Default is to center window. Setting starty to None is the default and centers window vertically on screen. Examples: >>> setup (width=200, height=200, startx=0, starty=0) sets window to 200x200 pixels, in upper left of screen >>> setup(width=.75, height=0.5, startx=None, starty=None) sets window to 75% of screen by 50% of screen and centers >>> setup(width=None) forces use of default geometry as in older versions of turtle.py """ global _width, _height, _startx, _starty width = geometry.get('width',_width) if width >= 0 or width == None: _width = width else: raise ValueError, "width can not be less than 0" height = geometry.get('height',_height) if height >= 0 or height == None: _height = height else: raise ValueError, "height can not be less than 0" startx = geometry.get('startx', _startx) if startx >= 0 or startx == None: _startx = _startx else: raise ValueError, "startx can not be less than 0" starty = geometry.get('starty', _starty) if starty >= 0 or starty == None: _starty = starty else: raise ValueError, "startx can not be less than 0" if _root and _width and _height: if 0 < _width <= 1: _width = _root.winfo_screenwidth() * +width if 0 < _height <= 1: _height = _root.winfo_screenheight() * _height # center window on screen if _startx is None: _startx = (_root.winfo_screenwidth() - _width) / 2 if _starty is None: _starty = (_root.winfo_screenheight() - _height) / 2 _root.geometry("%dx%d+%d+%d" % (_width, _height, _startx, _starty))
2f78f5f24bbebaa221e0245d191d08fd2cb01422 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2f78f5f24bbebaa221e0245d191d08fd2cb01422/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 636, 14330, 4672, 3536, 11511, 326, 963, 471, 1754, 434, 326, 2774, 2742, 18, 225, 1929, 3753, 854, 1835, 16, 2072, 16, 787, 92, 471, 787, 93, 30, 225, 1835, 30, 3344, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 636, 14330, 4672, 3536, 11511, 326, 963, 471, 1754, 434, 326, 2774, 2742, 18, 225, 1929, 3753, 854, 1835, 16, 2072, 16, 787, 92, 471, 787, 93, 30, 225, 1835, 30, 3344, 279, ...
reference_index=None, group_sequences=True) :
reference_index=None) :
def __init__ (self, pdb_sequences, pdb_names, pdb_offsets, reference_sequence=None, reference_sequence_name="sequence", reference_sequence_offset=0, reference_index=None, group_sequences=True) : adopt_init_args(self, locals()) n_models = len(pdb_sequences) assert ((n_models >= 1) and (n_models==len(pdb_names)==len(pdb_offsets))) use_pdb_sequence = False if (reference_sequence is not None) : assert (reference_index is None) else : use_pdb_sequence = True if (reference_index is None) : reference_index = 0 reference_sequence = pdb_sequences[reference_index] reference_sequence_name = pdb_names[reference_index] reference_sequence_offset = pdb_offsets[reference_index] fasta = "\n".join([ ">%s\n%s" % (n,s) for n,s in zip(pdb_names, pdb_sequences) ]) if (not use_pdb_sequence) : ref_seq_fasta = ">%s\n%s" % (reference_sequence_name, reference_sequence) fasta = ref_seq_fasta + "\n" + fasta self.muscle_aln = get_muscle_alignment(fasta, group_sequences) assert (self.muscle_aln is not None) self._lookup_table = {} i_ref = self.muscle_aln.names.index(reference_sequence_name) self._reference_alignment = self.muscle_aln.alignments[i_ref] assert (i_ref is not None) for i, name in enumerate(self.muscle_aln.names) : if (i == i_ref) : self._lookup_table[name] = None else : i_pdb = self.pdb_names.index(name) aln = self.muscle_aln.alignments[i] j = k = 0 new_resseqs = [] for res1, res2 in zip(aln, self._reference_alignment) : if (res2 != '-') : k += 1 if (res1 == '-') : continue else : if (res2 == '-') : new_resseqs.append(None) else : new_resseqs.append(k - reference_sequence_offset) j += 1 assert (j == len(new_resseqs)) self._lookup_table[name] = new_resseqs
3eb3f6089b79fe2dd71e2e745cfad8867b0a321a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/3eb3f6089b79fe2dd71e2e745cfad8867b0a321a/msa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 10892, 67, 17190, 16, 10892, 67, 1973, 16, 10892, 67, 16542, 16, 2114, 67, 6178, 33, 7036, 16, 2114, 67, 6178, 67, 529, 1546, 6178, 3113, 2114, 67, 6178...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 10892, 67, 17190, 16, 10892, 67, 1973, 16, 10892, 67, 16542, 16, 2114, 67, 6178, 33, 7036, 16, 2114, 67, 6178, 67, 529, 1546, 6178, 3113, 2114, 67, 6178...
self.class_sizes = populate_type_cache(graphs, self.cpu)
self._class_sizes = populate_type_cache(graphs, self.cpu) if not cpu.translate_support_code: self.class_sizes = self._class_sizes
def __init__(self, portal_graph, graphs, cpu, stats, options): self.portal_graph = portal_graph self.cpu = cpu self.stats = stats self.options = options self.compiled_merge_points = r_dict(history.mp_eq, history.mp_hash) # { greenkey: list-of-MergePoints }
e316cfb1d41e8f3da09cf484e1bb541adc4f1db9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/e316cfb1d41e8f3da09cf484e1bb541adc4f1db9/pyjitpl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11899, 67, 4660, 16, 19422, 16, 8326, 16, 3177, 16, 702, 4672, 365, 18, 24386, 67, 4660, 273, 11899, 67, 4660, 365, 18, 11447, 273, 8326, 365, 18, 5296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11899, 67, 4660, 16, 19422, 16, 8326, 16, 3177, 16, 702, 4672, 365, 18, 24386, 67, 4660, 273, 11899, 67, 4660, 365, 18, 11447, 273, 8326, 365, 18, 5296, ...
self.add_to_search_index( id=log_line_id, text=u" ".join(line['text'] for line in chunk['lines']), speakers=speakers, )
def index(self): current_labels = {} current_transcript_page = None current_page = 1 current_page_lines = 0 last_act = None previous_log_line_id = None launch_time = int(self.redis_conn.get("launch_time:%s" % self.mission_name)) acts = list(Act.Query(self.redis_conn, self.mission_name)) for chunk in self.parser.get_chunks(): timestamp = chunk['timestamp'] log_line_id = "%s:%i" % (self.transcript_name, timestamp) # See if there's transcript page info, and update it if so if chunk['meta'].get('_page', 0): current_transcript_page = int(chunk["meta"]['_page']) if current_transcript_page: self.redis_conn.set("log_line:%s:page" % log_line_id, current_transcript_page) # Look up the act for act in acts: if act.includes(timestamp): break else: raise RuntimeError("No act for timestamp %i" % timestamp) # If we've filled up the current page, go to a new one if current_page_lines >= self.LINES_PER_PAGE or (last_act is not None and last_act != act): current_page += 1 current_page_lines = 0 last_act = act # First, create a record with some useful information self.redis_conn.hmset( "log_line:%s:info" % log_line_id, { "offset": chunk['offset'], "page": current_page, "transcript_page": current_transcript_page, "act": act.number, "utc_time": launch_time + timestamp, } ) # Create the doubly-linked list structure if previous_log_line_id: self.redis_conn.hset( "log_line:%s:info" % log_line_id, "previous", previous_log_line_id, ) self.redis_conn.hset( "log_line:%s:info" % previous_log_line_id, "next", log_line_id, ) previous_log_line_id = log_line_id # Also store the text for line in chunk['lines']: self.redis_conn.rpush( "log_line:%s:lines" % log_line_id, "%(speaker)s: %(text)s" % line, ) # Store any images for i, image in enumerate(chunk['meta'].get("_images", [])): # Make the image id image_id = "%s:%s" % (log_line_id, i) # Push it onto the images list self.redis_conn.rpush( "log_line:%s:images" % log_line_id, image_id, ) # Store the image data self.redis_conn.hmset( "image:%s" % image_id, image, ) # Add that logline ID for the people involved speakers = set([ line['speaker'] for line in chunk['lines'] ]) for speaker in speakers: self.redis_conn.sadd("speaker:%s" % speaker, log_line_id) # And add this logline to search index self.add_to_search_index( id=log_line_id, text=u" ".join(line['text'] for line in chunk['lines']), speakers=speakers, ) # Add it to the index for this page self.redis_conn.rpush("page:%s:%i" % (self.transcript_name, current_page), log_line_id) # Add it into the transcript and everything sets self.redis_conn.zadd("log_lines:%s" % self.mission_name, log_line_id, chunk['timestamp']) self.redis_conn.zadd("transcript:%s" % self.transcript_name, log_line_id, chunk['timestamp']) # Read the new labels into current_labels if '_labels' in chunk['meta']: for label, endpoint in chunk['meta']['_labels'].items(): if endpoint is not None and label not in current_labels: current_labels[label] = endpoint elif label in current_labels: current_labels[label] = max( current_labels[label], endpoint ) elif endpoint is None: self.redis_conn.sadd("label:%s" % label, log_line_id) # Expire any old labels for label, endpoint in current_labels.items(): if endpoint < chunk['timestamp']: del current_labels[label] # Apply any surviving labels for label in current_labels: self.redis_conn.sadd("label:%s" % label, log_line_id) self.redis_conn.sadd("log_line:%s:labels" % log_line_id, label) # Increment the number of log lines we've done current_page_lines += len(chunk['lines'])
ab76bdb1f1ef500b848ddbbac06fea8bb1421d80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13780/ab76bdb1f1ef500b848ddbbac06fea8bb1421d80/indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 4672, 783, 67, 5336, 273, 2618, 783, 67, 27257, 67, 2433, 273, 599, 783, 67, 2433, 273, 404, 783, 67, 2433, 67, 3548, 273, 374, 1142, 67, 621, 273, 599, 2416, 67, 1330...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 770, 12, 2890, 4672, 783, 67, 5336, 273, 2618, 783, 67, 27257, 67, 2433, 273, 599, 783, 67, 2433, 273, 404, 783, 67, 2433, 67, 3548, 273, 374, 1142, 67, 621, 273, 599, 2416, 67, 1330...
EXAMPLES:
EXAMPLES::
def push_and_share(self, v): r""" Push a value onto the virtual machine's stack; also mark it as shared for sage_input if we are in pedantic mode.
3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 67, 464, 67, 14419, 12, 2890, 16, 331, 4672, 436, 8395, 8547, 279, 460, 10170, 326, 5024, 5228, 1807, 2110, 31, 2546, 2267, 518, 487, 5116, 364, 272, 410, 67, 2630, 309, 732, 854...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 67, 464, 67, 14419, 12, 2890, 16, 331, 4672, 436, 8395, 8547, 279, 460, 10170, 326, 5024, 5228, 1807, 2110, 31, 2546, 2267, 518, 487, 5116, 364, 272, 410, 67, 2630, 309, 732, 854...
ui.status('Sending ', m['Subject'], ' ...\n')
def getaddrs(opt, prpt, default = None): addrs = opts[opt] or (ui.config('patchbomb', opt) or prompt(prpt, default = default)).split(',') return [a.strip() for a in addrs if a.strip()]
4e5dd7bec08b6597cd1a532fe0b76f86ccee8fa5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/4e5dd7bec08b6597cd1a532fe0b76f86ccee8fa5/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23305, 12, 3838, 16, 846, 337, 16, 805, 273, 599, 4672, 11755, 273, 1500, 63, 3838, 65, 578, 261, 4881, 18, 1425, 2668, 2272, 70, 16659, 2187, 2153, 13, 578, 6866, 12, 683, 337, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23305, 12, 3838, 16, 846, 337, 16, 805, 273, 599, 4672, 11755, 273, 1500, 63, 3838, 65, 578, 261, 4881, 18, 1425, 2668, 2272, 70, 16659, 2187, 2153, 13, 578, 6866, 12, 683, 337, ...
url = self.url(request, querystr, anchor=anchor)
url = self.url(request, querystr, anchor=anchor, relative=True)
def link_to_raw(self, request, text, querystr=None, anchor=None, **kw): """ core functionality of link_to, without the magic """ url = self.url(request, querystr, anchor=anchor) # escaping is done by link_tag -> formatter.url -> ._open() link = wikiutil.link_tag(request, url, text, formatter=getattr(self, 'formatter', None), **kw) return link
ed9d5eb5b1d1fd27c67830954f0269b70fef1e99 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/ed9d5eb5b1d1fd27c67830954f0269b70fef1e99/Page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 869, 67, 1899, 12, 2890, 16, 590, 16, 977, 16, 843, 701, 33, 7036, 16, 6984, 33, 7036, 16, 2826, 9987, 4672, 3536, 2922, 14176, 434, 1692, 67, 869, 16, 2887, 326, 8146, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 869, 67, 1899, 12, 2890, 16, 590, 16, 977, 16, 843, 701, 33, 7036, 16, 6984, 33, 7036, 16, 2826, 9987, 4672, 3536, 2922, 14176, 434, 1692, 67, 869, 16, 2887, 326, 8146, 353...
return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self))
return '<%s at %
def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: if type(self.addr) == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self)) except: pass
106bdd3b805ddc8dc30145f4e460cb9eaf044707 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/106bdd3b805ddc8dc30145f4e460cb9eaf044707/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 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, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 18,...
nodes.
vertices.
def interior_paths(self, start, end): """ Returns an exhaustive list of paths (also lists) through only interior nodes from vertex start to vertex end in the graph. Note -- start and end do not necessarily have to be boundary nodes. INPUT: start -- the vertex of the graph to search for paths from end -- the vertex of the graph to search for paths to EXAMPLES: sage: eg1 = Graph({0:[1,2], 1:[4], 2:[3,4], 4:[5], 5:[6]}) sage: eg1.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg2 = eg1.copy() sage: eg2.set_boundary([0,1,3]) sage: eg2.interior_paths(0,6) [[0, 2, 4, 5, 6]] sage: eg2.all_paths(0,6) [[0, 1, 4, 5, 6], [0, 2, 4, 5, 6]] sage: eg3 = graphs.PetersenGraph() sage: eg3.set_boundary([0,1,2,3,4]) sage: eg3.all_paths(1,4) [[1, 0, 4], [1, 0, 5, 8, 3, 2, 7, 9, 4], [1, 0, 5, 8, 3, 4], [1, 0, 5, 8, 6, 9, 4], [1, 0, 5, 8, 6, 9, 7, 2, 3, 4], [1, 0, 5, 7, 9, 4], [1, 0, 5, 7, 9, 6, 8, 3, 4], [1, 0, 5, 7, 2, 3, 8, 6, 9, 4], [1, 0, 5, 7, 2, 3, 4], [1, 2, 3, 8, 5, 0, 4], [1, 2, 3, 8, 5, 7, 9, 4], [1, 2, 3, 8, 6, 9, 4], [1, 2, 3, 8, 6, 9, 7, 5, 0, 4], [1, 2, 3, 4], [1, 2, 7, 9, 4], [1, 2, 7, 9, 6, 8, 3, 4], [1, 2, 7, 9, 6, 8, 5, 0, 4], [1, 2, 7, 5, 0, 4], [1, 2, 7, 5, 8, 3, 4], [1, 2, 7, 5, 8, 6, 9, 4], [1, 6, 8, 3, 2, 7, 9, 4], [1, 6, 8, 3, 2, 7, 5, 0, 4], [1, 6, 8, 3, 4], [1, 6, 8, 5, 0, 4], [1, 6, 8, 5, 7, 9, 4], [1, 6, 8, 5, 7, 2, 3, 4], [1, 6, 9, 4], [1, 6, 9, 7, 2, 3, 8, 5, 0, 4], [1, 6, 9, 7, 2, 3, 4], [1, 6, 9, 7, 5, 0, 4], [1, 6, 9, 7, 5, 8, 3, 4]] sage: eg3.interior_paths(1,4) [[1, 6, 8, 5, 7, 9, 4], [1, 6, 9, 4]] """ H = self.copy() for node in self.get_boundary(): if (node != start and node != end): H.delete_vertex(node) return H.all_paths(start, end)
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 4481, 12, 2890, 16, 787, 16, 679, 4672, 3536, 2860, 392, 19575, 641, 688, 666, 434, 2953, 261, 31144, 6035, 13, 3059, 1338, 26230, 2199, 628, 5253, 787, 358, 5253, 679, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 4481, 12, 2890, 16, 787, 16, 679, 4672, 3536, 2860, 392, 19575, 641, 688, 666, 434, 2953, 261, 31144, 6035, 13, 3059, 1338, 26230, 2199, 628, 5253, 787, 358, 5253, 679, 316, ...
else:
elif i in __timers:
def step( sleep = True, external = True ): # IDEA: Add parameter to specify max timeamount to spend in mainloop """Do one step forward in the main loop. First all timers are checked for expiration and if necessary the accociated callback function is called. After that the timer list is searched for the next timer that will expire. This will define the maximum timeout for the following select statement evaluating the registered sockets. Returning from the select statement the callback functions from the sockets reported by the select system call are invoked. As a final task in a notifier step all registered external dispatcher functions are invoked.""" # handle timers trash_can = [] _copy = __timers.copy() for i in _copy: interval, timestamp, callback = _copy[ i ] if interval + timestamp <= __millisecs(): retval = None # Update timestamp on timer before calling the callback to # prevent infinite recursion in case the callback calls # step(). __timers[ i ] = ( interval, __millisecs(), callback ) try: if not callback(): trash_can.append( i ) else: # Update timer's timestamp again to reflect callback # execution time. __timers[ i ] = ( interval, __millisecs(), callback ) except ( KeyboardInterrupt, SystemExit ), e: raise e except: log.exception( 'removed timer %d' % i ) trash_can.append( i ) # remove functions that returned false from scheduler trash_can.reverse() for r in trash_can: if __timers.has_key( r ): del __timers[ r ] # get minInterval for max timeout timeout = None if not sleep: timeout = 0 else: for t in __timers: interval, timestamp, callback = __timers[ t ] nextCall = interval + timestamp - __millisecs() if timeout == None or nextCall < timeout: if nextCall > 0: timeout = nextCall else: timeout = 0 if timeout == None: timeout = MIN_TIMER if __min_timer and __min_timer < timeout: timeout = __min_timer r = w = e = () try: r, w, e = select( __sockets[ IO_READ ].keys(), __sockets[ IO_WRITE ].keys(), __sockets[ IO_EXCEPT ].keys(), timeout / 1000.0 ) except ( ValueError, select_error ): log.exception( 'error in select' ) sys.exit( 1 ) for sl in ( ( r, IO_READ ), ( w, IO_WRITE ), ( e, IO_EXCEPT ) ): sockets, condition = sl # append all unknown sockets to check list for s in sockets: if not s in __current_sockets[ condition ]: __current_sockets[ condition ].append( s ) while len( __current_sockets[ condition ] ): sock = __current_sockets[ condition ].pop( 0 ) if ( isinstance( sock, socket.socket ) and \ sock.fileno() != -1 ) or \ ( isinstance( sock, socket._socketobject ) and \ sock.fileno() != -1 ) or \ ( isinstance( sock, file ) and sock.fileno() != -1 ) or \ ( isinstance( sock, int ) and sock != -1 ): if __sockets[ condition ].has_key( sock ): try: if not __sockets[ condition ][ sock ]( sock ): socket_remove( sock, condition ) except ( KeyboardInterrupt, SystemExit ), e: raise e except: log.exception( 'error in socket callback' ) sys.exit( 1 ) # handle external dispatchers if external: for disp in copy( __dispatchers ): disp()
22d58de26dee9786170990accbe906ed03619d35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/22d58de26dee9786170990accbe906ed03619d35/nf_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 5329, 273, 1053, 16, 3903, 273, 1053, 262, 30, 468, 1599, 41, 37, 30, 1436, 1569, 358, 4800, 943, 813, 8949, 358, 17571, 316, 2774, 6498, 3536, 3244, 1245, 2235, 5104, 316, 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, 2235, 12, 5329, 273, 1053, 16, 3903, 273, 1053, 262, 30, 468, 1599, 41, 37, 30, 1436, 1569, 358, 4800, 943, 813, 8949, 358, 17571, 316, 2774, 6498, 3536, 3244, 1245, 2235, 5104, 316, 3...
raise ParseError("Unterminated comment")
raise ParseError("Unterminated comment", self.filename, self.line)
def skip(self): input = self.source while (True): if len(input) > self.cursor: ch = input[self.cursor] else: return self.cursor += 1 if len(input) > self.cursor: next = input[self.cursor] else: next = None
2fa685f5ce194e94f1eacda95494c90f9115e401 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/2fa685f5ce194e94f1eacda95494c90f9115e401/Tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2488, 12, 2890, 4672, 810, 273, 365, 18, 3168, 225, 1323, 261, 5510, 4672, 309, 562, 12, 2630, 13, 405, 365, 18, 9216, 30, 462, 273, 810, 63, 2890, 18, 9216, 65, 469, 30, 327, 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, 2488, 12, 2890, 4672, 810, 273, 365, 18, 3168, 225, 1323, 261, 5510, 4672, 309, 562, 12, 2630, 13, 405, 365, 18, 9216, 30, 462, 273, 810, 63, 2890, 18, 9216, 65, 469, 30, 327, 225, ...
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=1):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 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, ...
[ 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: F4(0,0,0,1).branch(A2xA2, rule="extended")
sage: F4(0,0,0,1).branch(A2xA2, rule="extended")
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Willenbring, Stable branching rules for classical symmetric pairs, Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601-1626, McKay and Patera, Tables of Dimensions, Indices and Branching Rules for Representations of Simple Lie Algebras (Marcel Dekker, 1981), and Fauser, Jarvis, King and Wybourne, New branching rules induced by plethysm. J. Phys. A 39 (2006), no. 11, 2611--2655. INPUT: - ``chi`` - a character of G - ``R`` - the Weyl Character Ring of G - ``S`` - the Weyl Character Ring of H - ``rule`` - a set of r dominant weights in H where r is the rank of G. You may use a predefined rule by specifying rule = one of"levi", "automorphic", "symmetric", "extended", "triality" or "miscellaneous". The use of these rules will be explained next. After the examples we will explain how to write your own branching rules for cases that we have omitted. To explain the predefined rules we survey the most important branching rules. These may be classified into several cases, and once this is understood, the detailed classification can be read off from the Dynkin diagrams. Dynkin classified the maximal subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952). We will list give predefined rules that cover most cases where the branching rule is to a maximal subgroup. For convenience, we also give some branching rules to subgroups that are not maximal. For example, a Levi subgroup may or may not be maximal. LEVI TYPE. These can be read off from the Dynkin diagram. If removing a node from the Dynkin diagram produces another Dynkin diagram, there is a branching rule. Currently we require that the smaller diagram be connected. For these rules use the option rule="levi":: ['A',r] => ['A',r-1] ['B',r] => ['A',r-1] ['B',r] => ['B',r-1] ['C',r] => ['A',r-1] ['C',r] => ['C',r-1] ['D',r] => ['A',r-1] ['D',r] => ['D',r-1] ['E',r] => ['A',r-1] r = 7,8 ['E',r] => ['D',r-1] r = 6,7,8 ['E',r] => ['E',r-1] F4 => B3 F4 => C3 G2 => A1 (short root) Not all Levi subgroups are maximal subgroups. If the Levi is not maximal there may or may not be a preprogrammed rule="levi" for it. If there is not, the branching rule may still be obtained by going through an intermediate subgroup that is maximal using rule="extended". Thus the other Levi branching rule from G2 => A1 corresponding to the long root is available by first branching G2 => A_2 then A2 => A1. Similarly the branching rules to the Levi subgroup:: ['E',r] => ['A',r-1] r = 6,7,8 may be obtained by first branching E6=>A5xA1, E7=>A7 or E8=>A8. AUTOMORPHIC TYPE. If the Dynkin diagram has a symmetry, then there is an automorphism that is a special case of a branching rule. There is also an exotic "triality" automorphism of D4 having order 3. Use rule="automorphic" or (for D4) rule="triality":: ['A',r] => ['A',r] ['D',r] => ['D',r] E6 => E6 SYMMETRIC TYPE. Related to the automorphic type, when either the Dynkin diagram or the extended diagram has a symmetry there is a branching rule to the subalgebra (or subgroup) of invariants under the automorphism. Use rule="symmetric". The last branching rule, D4=>G2 is not to a maximal subgroup since D4=>B3=>G2, but it is included for convenience. :: ['A',2r+1] => ['B',r] ['A',2r] => ['C',r] ['A',2r] => ['D',r] ['D',r] => ['B',r-1] E6 => F4 D4 => G2 EXTENDED TYPE. If removing a node from the extended Dynkin diagram results in a Dynkin diagram, then there is a branching rule. Use rule="extended" for these. We will also use this classification for some rules that are not of this type, mainly involving type B, such as D6 => B3xB3. Here is the extended Dynkin diagram for D6:: 0 6 O O | | | | O---O---O---O---O 1 2 3 4 6 Removing the node 3 results in an embedding D3xD3 -> D6. This corresponds to the embedding SO(6)xSO(6) -> SO(12), and is of extended type. On the other hand the embedding SO(5)xSO(7)-->SO(12) (e.g. B2xB3 -> D6) cannot be explained this way but for uniformity is implemented under rule="extended". Using rule="extended" you can get any branching rule SO(n) => SO(a) x SO(b) x SO(c) x ... where n = a+b+c+ ... Sp(2n) => Sp(2a) x Sp(2b) x Sp(2c) x ... where n = a+b+c+ ... where O(a) = ['D',r] (a=2r) or ['B',r] (a=2r+1) and Sp(2r)=['C',r]. The following rules are implemented as special cases of rule="extended". :: E6 => A5xA1, A2xA2xA2 E7 => A7, D6xA1, A3xA3xA1 E8 => A8, D8, E7xA1, A4xA4, D5xA3, E6xA2 F4 => B4, C3xA1, A2xA2, A3xA1 G2 => A1xA1 Note that E8 has only a limited number of representations of reasonably low degree. TENSOR: There are branching rules: :: ['A', rs-1] => ['A',r-1] x ['A',s-1] ['B',2rs+r+s] => ['B',r] x ['B',s] ['D',2rs+s] => ['B',r] x ['D',s] ['D',2rs] => ['D',r] x ['D',s] ['D',2rs] => ['C',r] x ['C',s] ['C',2rs+s] => ['B',r] x ['C',s] ['C',2rs] => ['C',r] x ['D',s]. corresponding to the tensor product homomorphism. For type A, the homomorphism is GL(r) x GL(s) -> GL(rs). For the classical types, the relevant fact is that if V,W are orthogonal or symplectic spaces, that is, spaces endowed with symmetric or skew-symmetric bilinear forms, then V tensor W is also an orthogonal space (if V and W are both orthogonal or both symplectic) or symplectic (if one of V and W is orthogonal and the other symplectic). The corresponding branching rules are obtained using rule="tensor". SYMMETRIC POWER: The k-th symmetric and exterior power homomorphisms map GL(n) --> GL(binomial(n+k-1,k)) and GL(binomial(n,k)). The corresponding branching rules are not implemented but a special case is. The k-th symmetric power homomorphism SL(2) --> GL(k+1) has its image inside of SO(2r+1) if k=2r and inside of Sp(2r) if k=2r-1. Hence there are branching rules:: ['B',r] => A1 ['C',r] => A1 and these may be obtained using the rule "symmetric_power". MISCELLANEOUS: Use rule="miscellaneous" for the following rules:: B3 => G2 F4 => G2xA1 (not implemented yet) BRANCHING RULES FROM PLETHYSMS Nearly all branching rules G => H where G is of type A,B,C or D are covered by the preceding rules. The function branching_rules_from_plethysm covers the remaining cases. ISOMORPHIC TYPE: Although not usually referred to as a branching rule, the effects of the accidental isomorphisms may be handled using rule="isomorphic":: B2 => C2 C2 => B2 A3 => D3 D3 => A3 D2 => A1xA1 B1 => A1 C1 => A1 EXAMPLES: (Levi type) :: sage: A1 = WeylCharacterRing("A1") sage: A2 = WeylCharacterRing("A2") sage: A3 = WeylCharacterRing("A3") sage: A4 = WeylCharacterRing("A4") sage: A5 = WeylCharacterRing("A5") sage: B2 = WeylCharacterRing("B2") sage: B3 = WeylCharacterRing("B3") sage: B4 = WeylCharacterRing("B4") sage: C2 = WeylCharacterRing("C2") sage: C3 = WeylCharacterRing("C3") sage: D3 = WeylCharacterRing("D3") sage: D4 = WeylCharacterRing("D4") sage: D5 = WeylCharacterRing("D5") sage: G2 = WeylCharacterRing("G2") sage: F4 = WeylCharacterRing("F4",style="coroots") # long time sage: E6=WeylCharacterRing("E6",style="coroots") sage: D5=WeylCharacterRing("D5",style="coroots") sage: [B3(w).branch(A2,rule="levi") for w in B3.fundamental_weights()] [A2(0,0,-1) + A2(0,0,0) + A2(1,0,0), A2(0,-1,-1) + A2(0,0,-1) + A2(0,0,0) + A2(1,0,-1) + A2(1,0,0) + A2(1,1,0), A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)] The last example must be understood as follows. The representation of B3 being branched is spin, which is not a representation of SO(7) but of its double cover spin(7). The group A2 is really GL(3) and the double cover of SO(7) induces a cover of GL(3) that is trivial over SL(3) but not over the center of GL(3). The weight lattice for this GL(3) consists of triples (a,b,c) of half integers such that a-b and b-c are in `\ZZ`, and this is reflected in the last decomposition. :: sage: [C3(w).branch(A2,rule="levi") for w in C3.fundamental_weights()] [A2(0,0,-1) + A2(1,0,0), A2(0,-1,-1) + A2(1,0,-1) + A2(1,1,0), A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)] sage: [D4(w).branch(A3,rule="levi") for w in D4.fundamental_weights()] [A3(0,0,0,-1) + A3(1,0,0,0), A3(0,0,-1,-1) + A3(0,0,0,0) + A3(1,0,0,-1) + A3(1,1,0,0), A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2), A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)] sage: [B3(w).branch(B2,rule="levi") for w in B3.fundamental_weights()] [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)] sage: C3 = WeylCharacterRing(['C',3]) sage: [C3(w).branch(C2,rule="levi") for w in C3.fundamental_weights()] [2*C2(0,0) + C2(1,0), C2(0,0) + 2*C2(1,0) + C2(1,1), C2(1,0) + 2*C2(1,1)] sage: [D5(w).branch(D4,rule="levi") for w in D5.fundamental_weights()] [2*D4(0,0,0,0) + D4(1,0,0,0), D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0), D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)] sage: G2(1,0,-1).branch(A1,rule="levi") A1(0,-1) + A1(1,-1) + A1(1,0) sage: E6=WeylCharacterRing("E6",style="coroots") # long time sage: D5=WeylCharacterRing("D5",style="coroots") # long time sage: fw = E6.fundamental_weights() # long time sage: [E6(fw[i]).branch(D5,rule="levi") for i in [1,2,6]] # long time [D5(0,0,0,0,0) + D5(0,0,0,0,1) + D5(1,0,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(0,0,0,0,1) + D5(0,1,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(1,0,0,0,0)] sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: D6=WeylCharacterRing("D6",style="coroots") # long time sage: fw = E7.fundamental_weights() # long time sage: [E7(fw[i]).branch(D6,rule="levi") for i in [1,2,7]] # long time [3*D6(0,0,0,0,0,0) + 2*D6(0,0,0,0,1,0) + D6(0,1,0,0,0,0), 3*D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0) + 2*D6(0,0,1,0,0,0) + D6(1,0,0,0,1,0), D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0)] sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8=WeylCharacterRing("E8",style="coroots",cache=True) # long time sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule="levi") # long time 3*D7(0,0,0,0,0,0,0) + 2*D7(0,0,0,0,0,1,0) + 2*D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) + 2*D7(0,0,1,0,0,0,0) + D7(0,0,0,1,0,0,0) + D7(1,0,0,0,0,1,0) + D7(1,0,0,0,0,0,1) + D7(2,0,0,0,0,0,0) sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule="levi") # long time D7(0,0,0,0,0,0,0) + D7(0,0,0,0,0,1,0) + D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) sage: [F4(fw).branch(B3,rule="levi") for fw in F4.fundamental_weights()] # long time [B3(0,0,0) + 2*B3(1/2,1/2,1/2) + 2*B3(1,0,0) + B3(1,1,0), B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 5*B3(1,0,0) + 7*B3(1,1,0) + 3*B3(1,1,1) + 6*B3(3/2,1/2,1/2) + 2*B3(3/2,3/2,1/2) + B3(2,0,0) + 2*B3(2,1,0) + B3(2,1,1), 3*B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 4*B3(1,0,0) + 3*B3(1,1,0) + B3(1,1,1) + 2*B3(3/2,1/2,1/2), 3*B3(0,0,0) + 2*B3(1/2,1/2,1/2) + B3(1,0,0)] sage: [F4(fw).branch(C3,rule="levi") for fw in F4.fundamental_weights()] # long time [3*C3(0,0,0) + 2*C3(1,1,1) + C3(2,0,0), 3*C3(0,0,0) + 6*C3(1,1,1) + 4*C3(2,0,0) + 2*C3(2,1,0) + 3*C3(2,2,0) + C3(2,2,2) + C3(3,1,0) + 2*C3(3,1,1), 2*C3(1,0,0) + 3*C3(1,1,0) + C3(2,0,0) + 2*C3(2,1,0) + C3(2,1,1), 2*C3(1,0,0) + C3(1,1,0)] sage: A1xA1 = WeylCharacterRing("A1xA1") sage: [A3(hwv).branch(A1xA1,rule="levi") for hwv in A3.fundamental_weights()] [A1xA1(0,0,1,0) + A1xA1(1,0,0,0), A1xA1(0,0,1,1) + A1xA1(1,0,1,0) + A1xA1(1,1,0,0), A1xA1(1,0,1,1) + A1xA1(1,1,1,0)] sage: A1xB1=WeylCharacterRing("A1xB1",style="coroots") sage: [B3(x).branch(A1xB1,rule="levi") for x in B3.fundamental_weights()] [A1xB1(0,2) + 2*A1xB1(1,0), 3*A1xB1(0,0) + A1xB1(0,2) + 2*A1xB1(1,2) + A1xB1(2,0), 2*A1xB1(0,1) + A1xB1(1,1)] EXAMPLES: (Automorphic type, including D4 triality) :: sage: [A3(chi).branch(A3,rule="automorphic") for chi in A3.fundamental_weights()] [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)] sage: [D4(chi).branch(D4,rule="automorphic") for chi in D4.fundamental_weights()] [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)] sage: [D4(chi).branch(D4,rule="triality") for chi in D4.fundamental_weights()] [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)] EXAMPLES: (Symmetric type) :: sage: [w.branch(B2,rule="symmetric") for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]] [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)] sage: [A5(w).branch(C3,rule="symmetric") for w in A5.fundamental_weights()] [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)] sage: [A5(w).branch(D3,rule="symmetric") for w in A5.fundamental_weights()] [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)] sage: [D4(x).branch(B3,rule="symmetric") for x in D4.fundamental_weights()] [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] sage: [D4(x).branch(G2,rule="symmetric") for x in D4.fundamental_weights()] [G2(0,0,0) + G2(1,0,-1), 2*G2(1,0,-1) + G2(2,-1,-1), G2(0,0,0) + G2(1,0,-1), G2(0,0,0) + G2(1,0,-1)] sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] # long time [F4(0,0,0,0) + F4(0,0,0,1), F4(0,0,0,1) + F4(1,0,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(1,0,0,0) + 2*F4(0,0,1,0) + F4(1,0,0,1) + F4(0,1,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(0,0,0,0) + F4(0,0,0,1)] EXAMPLES: (Extended type) :: sage: [B3(x).branch(D3,rule="extended") for x in B3.fundamental_weights()] [D3(0,0,0) + D3(1,0,0), D3(1,0,0) + D3(1,1,0), D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)] sage: [G2(w).branch(A2, rule="extended") for w in G2.fundamental_weights()] [A2(0,0,0) + A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3), A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3) + A2(1,0,-1)] sage: [F4(fw).branch(B4,rule="extended") for fw in F4.fundamental_weights()] # long time [B4(1/2,1/2,1/2,1/2) + B4(1,1,0,0), B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2) + B4(3/2,3/2,1/2,1/2) + B4(2,1,1,0), B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0) + B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2), B4(0,0,0,0) + B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0)] sage: E6 = WeylCharacterRing("E6", style="coroots") # long time sage: A2xA2xA2=WeylCharacterRing("A2xA2xA2",style="coroots") sage: A5xA1=WeylCharacterRing("A5xA1",style="coroots") sage: G2 = WeylCharacterRing("G2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: F4 = WeylCharacterRing("F4",style="coroots") sage: A3xA1 = WeylCharacterRing("A3xA1", style="coroots") sage: A2xA2 = WeylCharacterRing("A2xA2", style="coroots") sage: A1xC3 = WeylCharacterRing("A1xC3",style="coroots") sage: E6(1,0,0,0,0,0).branch(A5xA1,rule="extended") # long time A5xA1(0,0,0,1,0,0) + A5xA1(1,0,0,0,0,1) sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule="extended") # long time A2xA2xA2(0,0,0,1,1,0) + A2xA2xA2(0,1,1,0,0,0) + A2xA2xA2(1,0,0,0,0,1) sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: A7=WeylCharacterRing("A7",style="coroots") # long time sage: E7(1,0,0,0,0,0,0).branch(A7,rule="extended") # long time A7(0,0,0,1,0,0,0) + A7(1,0,0,0,0,0,1) sage: E8=WeylCharacterRing("E8",cache=true,style="coroots") # long time sage: D8=WeylCharacterRing("D8",cache=true,style="coroots") # long time sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule="extended") # long time D8(0,0,0,0,0,0,1,0) + D8(0,1,0,0,0,0,0,0) sage: F4(1,0,0,0).branch(A1xC3,rule="extended") # long time A1xC3(0,2,0,0) + A1xC3(1,0,0,1) + A1xC3(2,0,0,0) sage: G2(0,1).branch(A1xA1, rule="extended") A1xA1(0,2) + A1xA1(2,0) + A1xA1(3,1) sage: F4(0,0,0,1).branch(A2xA2, rule="extended") # long time A2xA2(0,0,1,1) + A2xA2(0,1,0,1) + A2xA2(1,0,1,0) sage: F4(0,0,0,1).branch(A3xA1,rule="extended") # long time A3xA1(0,0,0,0) + A3xA1(0,0,0,2) + A3xA1(0,0,1,1) + A3xA1(0,1,0,0) + A3xA1(1,0,0,1) sage: D4=WeylCharacterRing("D4",style="coroots") sage: D2xD2=WeylCharacterRing("D2xD2",style="coroots") # We get D4 => A1xA1xA1xA1 by remembering that A1xA1 = D2. sage: [D4(fw).branch(D2xD2, rule="extended") for fw in D4.fundamental_weights()] [D2xD2(0,0,1,1) + D2xD2(1,1,0,0), D2xD2(0,0,2,0) + D2xD2(0,0,0,2) + D2xD2(2,0,0,0) + D2xD2(1,1,1,1) + D2xD2(0,2,0,0), D2xD2(1,0,0,1) + D2xD2(0,1,1,0), D2xD2(1,0,1,0) + D2xD2(0,1,0,1)] EXAMPLES: (Tensor type) :: sage: A5=WeylCharacterRing("A5", style="coroots") sage: A2xA1=WeylCharacterRing("A2xA1", style="coroots") sage: [A5(hwv).branch(A2xA1, rule="tensor") for hwv in A5.fundamental_weights()] [A2xA1(1,0,1), A2xA1(0,1,2) + A2xA1(2,0,0), A2xA1(0,0,3) + A2xA1(1,1,1), A2xA1(1,0,2) + A2xA1(0,2,0), A2xA1(0,1,1)] sage: B4=WeylCharacterRing("B4",style="coroots") sage: B1xB1=WeylCharacterRing("B1xB1",style="coroots") sage: [B4(f).branch(B1xB1,rule="tensor") for f in B4.fundamental_weights()] [B1xB1(2,2), B1xB1(0,2) + B1xB1(2,0) + B1xB1(2,4) + B1xB1(4,2), B1xB1(0,2) + B1xB1(0,6) + B1xB1(2,0) + B1xB1(2,2) + B1xB1(2,4) + B1xB1(4,2) + B1xB1(4,4) + B1xB1(6,0), B1xB1(1,3) + B1xB1(3,1)] sage: D4=WeylCharacterRing("D4",style="coroots") sage: C2xC1=WeylCharacterRing("C2xC1",style="coroots") sage: [D4(f).branch(C2xC1,rule="tensor") for f in D4.fundamental_weights()] [C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,2) + C2xC1(2,0,0), C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,0)] sage: C3=WeylCharacterRing("C3",style="coroots") sage: B1xC1=WeylCharacterRing("B1xC1",style="coroots") sage: [C3(f).branch(B1xC1,rule="tensor") for f in C3.fundamental_weights()] [B1xC1(2,1), B1xC1(2,2) + B1xC1(4,0), B1xC1(0,3) + B1xC1(4,1)] EXAMPLES: (Symmetric Power) :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: B3=WeylCharacterRing("B3",style="coroots") sage: C3=WeylCharacterRing("C3",style="coroots") sage: [B3(fw).branch(A1,rule="symmetric_power") for fw in B3.fundamental_weights()] [A1(6), A1(2) + A1(6) + A1(10), A1(0) + A1(6)] sage: [C3(fw).branch(A1,rule="symmetric_power") for fw in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] EXAMPLES: (Miscellaneous type) :: sage: G2 = WeylCharacterRing("G2") sage: [fw1, fw2, fw3] = B3.fundamental_weights() sage: B3(fw1+fw3).branch(G2, rule="miscellaneous") G2(1,0,-1) + G2(2,-1,-1) + G2(2,0,-2) EXAMPLES: (Isomorphic type) :: sage: [B2(x).branch(C2, rule="isomorphic") for x in B2.fundamental_weights()] [C2(1,1), C2(1,0)] sage: [C2(x).branch(B2, rule="isomorphic") for x in C2.fundamental_weights()] [B2(1/2,1/2), B2(1,0)] sage: [A3(x).branch(D3,rule="isomorphic") for x in A3.fundamental_weights()] [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)] sage: [D3(x).branch(A3,rule="isomorphic") for x in D3.fundamental_weights()] [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)] Here A3(x,y,z,w) can be understood as a representation of SL(4). The weights x,y,z,w and x+t,y+t,z+t,w+t represent the same representation of SL(4) - though not of GL(4) - since A3(x+t,y+t,z+t,w+t) is the same as A3(x,y,z,w) tensored with `det^t`. So as a representation of SL(4), A3(1/4,1/4,1/4,-3/4) is the same as A3(1,1,1,0). The exterior square representation SL(4) -> GL(6) admits an invariant symmetric bilinear form, so is a representation SL(4) -> SO(6) that lifts to an isomorphism SL(4) -> Spin(6). Conversely, there are two isomorphisms SO(6) -> SL(4), of which we've selected one. In cases like this you might prefer style="coroots". :: sage: A3 = WeylCharacterRing("A3",style="coroots") sage: D3 = WeylCharacterRing("D3",style="coroots") sage: [D3(fw) for fw in D3.fundamental_weights()] [D3(1,0,0), D3(0,1,0), D3(0,0,1)] sage: [D3(fw).branch(A3,rule="isomorphic") for fw in D3.fundamental_weights()] [A3(0,1,0), A3(0,0,1), A3(1,0,0)] sage: D2 = WeylCharacterRing("D2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: [D2(fw).branch(A1xA1,rule="isomorphic") for fw in D2.fundamental_weights()] [A1xA1(1,0), A1xA1(0,1)] EXAMPLES: (Branching rules from plethysms) This is a general rule that includes any branching rule from types A,B,C or D as a special case. Thus it could be used in place of the above rules and would give the same results. However it is most useful when branching from G to a maximal subgroup H such that rank(H) < rank(G)-1. We consider a homomorphism H --> G where G is one of SL(r+1), SO(2r+1), Sp(2r) or SO(2r). The function branching_rule_from_plethysm produces the corresponding branching rule. The main ingredient is the character chi of the representation of H that is the homomorphism to GL(r+1), GL(2r+1) or GL(2r). This rule is so powerful that it contains the other rules implemented above as special cases. First let us consider the symmetric fifth power representation of SL(2). :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: chi=A1([5]) sage: chi.degree() 6 sage: chi.frobenius_schur_indicator() -1 This confirms that the character has degree 6 and is symplectic, so it corresponds to a homomorphism SL(2) --> Sp(6), and there is a corresponding branching rule C3 => A1. :: sage: C3 = WeylCharacterRing("C3",style="coroots") sage: sym5rule = branching_rule_from_plethysm(chi,"C3") sage: [C3(hwv).branch(A1,rule=sym5rule) for hwv in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] This is identical to the results we would obtain using rule="symmetric_power". The next example gives a branching not available by other standard rules. :: sage: G2 = WeylCharacterRing("G2",style="coroots") sage: D7 = WeylCharacterRing("D7",style="coroots") sage: ad=G2(0,1); ad.degree(); ad.frobenius_schur_indicator() 14 1 sage: spin = D7(0,0,0,0,0,1,0); spin.degree() 64 sage: spin.branch(G2, rule=branching_rule_from_plethysm(ad, "D7")) G2(1,1) We have confirmed that the adjoint representation of G2 gives a homomorphism into SO(14), and that the pullback of the one of the two 64 dimensional spin representations to SO(14) is an irreducible representation of G2. BRANCHING FROM A REDUCIBLE ROOT SYSTEM If you are branching from a reducible root system, the rule is a list of rules, one for each component type in the root system. The rules in the list are given in pairs [type, rule], where type is the root system to be branched to, and rule is the branching rule. :: sage: D4 = WeylCharacterRing("D4",style="coroots") sage: D2xD2 = WeylCharacterRing("D2xD2",style="coroots") sage: A1xA1xA1xA1 = WeylCharacterRing("A1xA1xA1xA1",style="coroots") sage: rr = [["A1xA1","isomorphic"],["A1xA1","isomorphic"]] sage: [D4(fw) for fw in D4.fundamental_weights()] [D4(1,0,0,0), D4(0,1,0,0), D4(0,0,1,0), D4(0,0,0,1)] sage: [D4(fw).branch(D2xD2,rule="extended").branch(A1xA1xA1xA1,rule=rr) for fw in D4.fundamental_weights()] [A1xA1xA1xA1(0,0,1,1) + A1xA1xA1xA1(1,1,0,0), A1xA1xA1xA1(0,0,0,2) + A1xA1xA1xA1(0,0,2,0) + A1xA1xA1xA1(0,2,0,0) + A1xA1xA1xA1(1,1,1,1) + A1xA1xA1xA1(2,0,0,0), A1xA1xA1xA1(0,1,1,0) + A1xA1xA1xA1(1,0,0,1), A1xA1xA1xA1(0,1,0,1) + A1xA1xA1xA1(1,0,1,0)] WRITING YOUR OWN RULES Suppose you want to branch from a group G to a subgroup H. Arrange the embedding so that a Cartan subalgebra U of H is contained in a Cartan subalgebra T of G. There is thus a mapping from the weight spaces Lie(T)* --> Lie(U)*. Two embeddings will produce identical branching rules if they differ by an element of the Weyl group of H. The RULE is this map Lie(T)* = G.space() to Lie(U)* = H.space(), which you may implement as a function. As an example, let us consider how to implement the branching rule A3 => C2. Here H = C2 = Sp(4) embedded as a subgroup in A3 = GL(4). The Cartan subalgebra U consists of diagonal matrices with eigenvalues u1, u2, -u2, -u1. The C2.space() is the two dimensional vector spaces consisting of the linear functionals u1 and u2 on U. On the other hand Lie(T) is RR^4. A convenient way to see the restriction is to think of it as the adjoint of the map [u1,u2] -> [u1,u2,-u2,-u1], that is, [x0,x1,x2,x3] -> [x0-x3,x1-x2]. Hence we may encode the rule: :: def rule(x): return [x[0]-x[3],x[1]-x[2]] or simply: :: rule = lambda x : [x[0]-x[3],x[1]-x[2]] EXAMPLES:: sage: A3 = WeylCharacterRing(['A',3]) sage: C2 = WeylCharacterRing(['C',2]) sage: rule = lambda x : [x[0]-x[3],x[1]-x[2]] sage: branch_weyl_character(A3([1,1,0,0]),A3,C2,rule) C2(0,0) + C2(1,1) sage: A3(1,1,0,0).branch(C2, rule) == C2(0,0) + C2(1,1) True """ if type(rule) == str: rule = get_branching_rule(R._cartan_type, S._cartan_type, rule) elif R._cartan_type.is_compound(): Rtypes = R._cartan_type.component_types() Stypes = [CartanType(l[0]) for l in rule] rules = [l[1] for l in rule] ntypes = len(Rtypes) rule_list = [get_branching_rule(Rtypes[i], Stypes[i], rules[i]) for i in range(ntypes)] shifts = R._cartan_type._shifts def rule(x): yl = [] for i in range(ntypes): yl.append(rule_list[i](x[shifts[i]:shifts[i+1]])) return flatten(yl) mdict = {} for k in chi._mdict: if S._style == "coroots": if S._cartan_type.is_atomic() and S._cartan_type[0] == 'E': if S._cartan_type[1] == 6: h = S._space(rule(list(k.to_vector()))) h = S.coerce_to_e6(h) elif S._cartan_type[1] == 7: h = S.coerce_to_e7(S._space(rule(list(k.to_vector())))) else: h = S.coerce_to_sl(S._space(rule(list(k.to_vector())))) else: h = S._space(rule(list(k.to_vector()))) if h in mdict: mdict[h] += chi._mdict[k] else: mdict[h] = chi._mdict[k] hdict = S.char_from_weights(mdict) return WeylCharacter(S, hdict, mdict)
6242c71e9458efbf328be967e795e57a7ca2740b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6242c71e9458efbf328be967e795e57a7ca2740b/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 436, 8395, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 436, 8395, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041,...
def __init__(self, sock):
def __init__(self, sock, debuglevel=0):
def __init__(self, sock): self.fp = sock.makefile('rb', 0)
30f867423a6cc1c0c2fea742e76aa8e288028894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/30f867423a6cc1c0c2fea742e76aa8e288028894/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 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, 0, 0, 0, 0, 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, 7313, 16, 1198, 2815, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100...
print >> env_file, "setenv GLUE_PREFIX " + self.prefix print >> env_file, "setenv PATH " + self.install_scripts + ":${PATH}"
print >> env_file, "setenv GLUE_PREFIX " + glue_prefix print >> env_file, "setenv PATH " + glue_install_scripts + ":${PATH}"
def run(self):
ae44075ce5df81f6404c737cc4720f6c045115d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/ae44075ce5df81f6404c737cc4720f6c045115d1/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if tbl.find('.') < 0: tbl = "public." + tbl if tbl not in cur_list: self.log.info('%s already removed' % tbl) else: self.log.info("Removing %s" % tbl) self.provider_remove_table(tbl)
tbls = self.get_provider_table_list(skytools.fq_name(tbl)) for tbl in tbls: if tbl not in cur_list: self.log.info('%s already removed' % tbl) else: self.log.info("Removing %s" % tbl) self.provider_remove_table(tbl)
def provider_remove_tables(self, table_list): self.check_provider_queue()
284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14597/284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2893, 67, 4479, 67, 9373, 12, 2890, 16, 1014, 67, 1098, 4672, 365, 18, 1893, 67, 6778, 67, 4000, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2893, 67, 4479, 67, 9373, 12, 2890, 16, 1014, 67, 1098, 4672, 365, 18, 1893, 67, 6778, 67, 4000, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
dbl_click_call(t,t1,event)
dbl_click_call(t,t1,'OOO',event)
def dbl_click_ave(event): t=avetext.get('1.0',END) #Entire contents of text box t1=avetext.get('1.0',CURRENT) #Contents from start to cursor dbl_click_call(t,t1,event)
eb5a69e1b0ceab047b566c9698c9552defda2b37 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/eb5a69e1b0ceab047b566c9698c9552defda2b37/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 80, 67, 7475, 67, 836, 12, 2575, 4672, 268, 33, 842, 27830, 18, 588, 2668, 21, 18, 20, 2187, 4415, 13, 3639, 468, 14199, 577, 2939, 434, 977, 3919, 268, 21, 33, 842, 27830, 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, 1319, 80, 67, 7475, 67, 836, 12, 2575, 4672, 268, 33, 842, 27830, 18, 588, 2668, 21, 18, 20, 2187, 4415, 13, 3639, 468, 14199, 577, 2939, 434, 977, 3919, 268, 21, 33, 842, 27830, 18,...
from_addr = Configuration.FromAddress ):
from_addr = Configuration.FromAddress, **extended ):
def sendmail ( to_addrs, subj, msg, from_addr = Configuration.FromAddress ): """** <p>The general-purpose sendmail function, which is called by the STML &lt;:sendmail:&gt; tag, or directly by Python code.</p> <p><tt>to_addrs</tt> should be a list or tuple of email address strings. <tt>subj</tt> must be a string, although it may be empty. <tt>msg</tt> is a string containing the body of the message; it can be empty. <tt>from_addr</tt> is a single mail address string; it defaults to the value of the <tt>FromAddress</tt> variable in <tt>templating.conf</tt>.</p> <p>This function returns nothing on success, and raises a <code>MailError</code> on any mail failure.</p> """ # if they supplied only a string as to_Addrs (i.e. one address), # make it a list if type(to_addrs) == type(''): to_addrs = [to_addrs] # dispatch to correct function based on method if _method == 'relay': sendmail_smtp(to_addrs, subj, msg, from_addr) else: sendmail_pipe(to_addrs, subj, msg, from_addr)
5aaf09af19f1815efbe786252684a482132aa94b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/5aaf09af19f1815efbe786252684a482132aa94b/MailServices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 261, 358, 67, 23305, 16, 15333, 16, 1234, 16, 628, 67, 4793, 273, 4659, 18, 1265, 1887, 16, 2826, 14948, 262, 30, 3536, 636, 411, 84, 34, 1986, 7470, 17, 22987, 1366, 4408,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4408, 261, 358, 67, 23305, 16, 15333, 16, 1234, 16, 628, 67, 4793, 273, 4659, 18, 1265, 1887, 16, 2826, 14948, 262, 30, 3536, 636, 411, 84, 34, 1986, 7470, 17, 22987, 1366, 4408,...
print "recursive-exclude", dir, pattern num = exclude_pattern (self.files, pattern, prefix=dir) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir))
print "recursive-exclude", dir, string.join(pattern_list) for pattern in pattern_list: num = exclude_pattern (self.files, pattern, prefix=dir) if num == 0: template.warn \ (("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir))
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
21e295b8fbea21a3383b789b0f44d59a3c2c9d90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/21e295b8fbea21a3383b789b0f44d59a3c2c9d90/sdist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3202, 261, 2890, 4672, 3536, 1994, 471, 1109, 326, 5643, 1542, 585, 4141, 635, 296, 2890, 18, 3202, 11, 261, 407, 3452, 315, 9560, 30050, 18, 267, 20387, 225, 4389, 777, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3202, 261, 2890, 4672, 3536, 1994, 471, 1109, 326, 5643, 1542, 585, 4141, 635, 296, 2890, 18, 3202, 11, 261, 407, 3452, 315, 9560, 30050, 18, 267, 20387, 225, 4389, 777, 585, ...
print "boo"
def save_state(self): """ Save the current graphic's context state. This should always be paired with a restore_state """ self.gc.CGContextSaveGState() print "boo"
28b1d11f37a91b55f0ffaa6329a0314b18587c44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/28b1d11f37a91b55f0ffaa6329a0314b18587c44/backend_mac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 2019, 12, 2890, 4672, 3536, 7074, 326, 783, 19548, 1807, 819, 919, 18, 225, 1220, 1410, 3712, 506, 18066, 598, 279, 5217, 67, 2019, 3536, 365, 18, 13241, 18, 20585, 1042, 4755,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 2019, 12, 2890, 4672, 3536, 7074, 326, 783, 19548, 1807, 819, 919, 18, 225, 1220, 1410, 3712, 506, 18066, 598, 279, 5217, 67, 2019, 3536, 365, 18, 13241, 18, 20585, 1042, 4755,...
if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit"):
if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit" or sys.platform=="darwin"):
def CompileIgate(woutd,wsrc,opts): outbase = os.path.basename(woutd)[:-3] woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" wobj = FindLocation(outbase + "_igate.obj", []) srcdir = GetValueOption(opts, "SRCDIR:") module = GetValueOption(opts, "IMOD:") library = GetValueOption(opts, "ILIB:") ipath = GetListOption(opts, "DIR:") if (PkgSkip("PYTHON")): WriteFile(woutc,"") WriteFile(woutd,"") CompileCxx(wobj,woutc,opts) ConditionalWriteFile(woutd,"") return cmd = GetOutputDir()+"/bin/interrogate -srcdir "+srcdir+" -I"+srcdir cmd += ' -Dvolatile -Dmutable' if (COMPILER=="MSVC"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' #NOTE: this 1500 value is the version number for VC2008. cmd += ' -D_MSC_VER=1500 -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' #FIXME: allow 64-bits on OSX if (COMPILER=="LINUX") and (platform.architecture()[0]=="64bit") and (sys.platform!="darwin"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64' if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D__i386__' optlevel=GetOptimizeOption(opts) if (optlevel==1): cmd += ' -D_DEBUG' if (optlevel==2): cmd += ' -D_DEBUG' if (optlevel==3): cmd += ' -DFORCE_INLINING' if (optlevel==4): cmd += ' -DNDEBUG -DFORCE_INLINING' cmd += ' -oc ' + woutc + ' -od ' + woutd cmd += ' -fnames -string -refcount -assert -python-native' cmd += ' -S' + GetOutputDir() + '/include/parser-inc' for x in ipath: cmd += ' -I' + BracketNameWithQuotes(x) for (opt,dir) in INCDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' -S' + BracketNameWithQuotes(dir) for (opt,var,val) in DEFSYMBOLS: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' -D' + var + '=' + val building = GetValueOption(opts, "BUILDING:") if (building): cmd += " -DBUILDING_"+building cmd += ' -module ' + module + ' -library ' + library for x in wsrc: if (x.startswith("/")): cmd += ' ' + BracketNameWithQuotes(x) else: cmd += ' ' + BracketNameWithQuotes(os.path.basename(x)) oscmd(cmd) CompileCxx(wobj,woutc,opts) return
d0aa7ba749f2f45430d0f2ccf48beb02b7612d21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/d0aa7ba749f2f45430d0f2ccf48beb02b7612d21/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 45, 10115, 12, 91, 659, 72, 16, 4749, 1310, 16, 4952, 4672, 596, 1969, 273, 1140, 18, 803, 18, 13909, 12, 91, 659, 72, 13, 10531, 17, 23, 65, 341, 659, 71, 273, 968, 1447, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 45, 10115, 12, 91, 659, 72, 16, 4749, 1310, 16, 4952, 4672, 596, 1969, 273, 1140, 18, 803, 18, 13909, 12, 91, 659, 72, 13, 10531, 17, 23, 65, 341, 659, 71, 273, 968, 1447, 1...