rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
set_cache_size(n) | context.cache_size = n | def set_cache_size(n): context.cache_size = n | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
def test_new(self): | def test_bad_new(self): | def test_new(self): with raises(TypeError, "cannot create 'djvu.decode.Document' instances"): Document() | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
assert_equal(type(message.message), str) | assert_equal(type(message.message), str) | def test_nonexistent(self): context = Context() with raises(JobFailed): document = context.new_document(FileUri('__nonexistent__')) message = context.get_message() assert_equal(type(message), ErrorMessage) assert_equal(type(message.message), str) # TODO: check if 'Unrecognized DjVu Message' in message.message: assert_e... | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
class test_pixel_formats: def test_new(self): | class test_pixel_formats(): def test_bad_new(self): | def test_export_ps(self): context = Context() document = context.new_document(FileUri(images + 'test0.djvu')) message = document.get_message() assert_equal(type(message), DocInfoMessage) assert_true(document.decoding_done) assert_false(document.decoding_error) assert_equal(document.decoding_status, JobOK) assert_equal(... | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
class test_page_jobs: def test_new(self): | class test_page_jobs(): def test_bad_new(self): | def test_packed_bits(self): pf = PixelFormatPackedBits('<') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('<')") assert_equal(pf.bpp, 1) pf = PixelFormatPackedBits('>') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('>')") assert_equal(pf.bpp, 1) | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
def test_new(self): | def test_bad_new(self): | def test_new(self): with raises(TypeError, "cannot create 'djvu.decode.Message' instances"): Message() | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
def test_bad_construction(self): | def test_bad_new(self): | def test_bad_construction(self): with raises(TypeError, "Argument 'document' has incorrect type (expected djvu.decode.Document, got NoneType)"): Stream(None, 42) | 23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py |
changelog = open(os.path.join('doc', 'changelog')) | if sys.version_info >= (3, 0): extra = dict(encoding='UTF-8') else: extra = {} changelog = open(os.path.join('doc', 'changelog'), **extra) | def get_version(): changelog = open(os.path.join('doc', 'changelog')) try: return changelog.readline().split()[1].strip('()') finally: changelog.close() | c9e6e5ea686b8d6988bdad121f59550b0938e120 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/c9e6e5ea686b8d6988bdad121f59550b0938e120/setup.py |
assert have_pyrex | assert have_pyrex == cython_needed | def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module | 934d35b14588579e28f87189b86f393a90a568d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/934d35b14588579e28f87189b86f393a90a568d6/setup.py |
for n in -100, 0, 1 << 32: | for n in -100, 0, (1 + sys.maxint) * 2: | def set_cache_size(n): context.cache_size = n | 1dc357094a32e7e523187a37838075eecc4bf9d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/1dc357094a32e7e523187a37838075eecc4bf9d6/decode.py |
for n in 1, 100, 1 << 10, 1 << 20, (1 << 32) -1: | n = 1 while n < 3 * sys.maxint: | def set_cache_size(n): context.cache_size = n | 1dc357094a32e7e523187a37838075eecc4bf9d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/1dc357094a32e7e523187a37838075eecc4bf9d6/decode.py |
>>> page_job.render(RENDER_COLOR, (0, 0, 100000, 100000), (0, 0, 100000, 100000), PixelFormatRgb(), 8) | >>> x = int((sys.maxint//2) ** 0.5) >>> page_job.render(RENDER_COLOR, (0, 0, x, x), (0, 0, x, x), PixelFormatRgb(), 8) | def test_decode(): r''' >>> context = Context() >>> document = context.new_document(FileUri(images + 'test1.djvu')) >>> message = document.get_message() >>> type(message) == DocInfoMessage True >>> page_job = document.pages[0].decode() >>> page_job.is_done True >>> type(page_job) == PageJob True >>> page_job.is_done Tr... | 1dc357094a32e7e523187a37838075eecc4bf9d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/1dc357094a32e7e523187a37838075eecc4bf9d6/decode.py |
changelog = file(os.path.join('doc', 'changelog')) | changelog = open(os.path.join('doc', 'changelog')) | def get_version(): changelog = file(os.path.join('doc', 'changelog')) try: return changelog.readline().split()[1].strip('()') finally: changelog.close() | fbb8466649e9005d146396d24e84fb91b0f5d5e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/fbb8466649e9005d146396d24e84fb91b0f5d5e8/setup.py |
from setuptools.extension import Extension | from setuptools.extension import Extension, have_pyrex assert have_pyrex del have_pyrex | def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module | 36282bc1374df38df16c55db619804c606bc604d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/36282bc1374df38df16c55db619804c606bc604d/setup.py |
from distutils.extension import Extension, have_pyrex assert have_pyrex del have_pyrex | from distutils.extension import Extension | def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module | 36282bc1374df38df16c55db619804c606bc604d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/36282bc1374df38df16c55db619804c606bc604d/setup.py |
"Returns True to carry on or erase and False to maintain" if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False if os.path.ismount(path): | "Returns True to carry on or erase and False to maintain" if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False if os.path.ismount(path) and path != self.homedir: | def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False | 22402be8c9e687a268ba384a5fd0ddf6e932fb57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/22402be8c9e687a268ba384a5fd0ddf6e932fb57/TFuser_frozen.py |
path = path[len(self.homedir)+1:] if len(path) <= 0: return True for filter in self.filters: if re.search(filter[1],path) != None: action = filter[0] if action == ACTION_KEEP: debug('Keep path: ' + path,DEBUG_HIGH) return False elif action == ACTION_LOST: debug('Lost path: ' + path,DEBUG_HIGH) move(path, sel... | path = path[len(self.homedir)+1:] if len(path) <= 0: return True for filter in self.filters: if re.search(filter[1],path) != None: action = filter[0] if action == ACTION_KEEP: debug('Keep path: ' + path,DEBUG_HIGH) return False elif action == ACTION_LOST: debug('Lost path: ' + path,DEBUG_HIGH) move(path, sel... | def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False | 22402be8c9e687a268ba384a5fd0ddf6e932fb57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/22402be8c9e687a268ba384a5fd0ddf6e932fb57/TFuser_frozen.py |
print "Debug L: "+ str(text.encode('utf-8')) | print "Debug L: "+ text | def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ... | 990f55bf193b984bc987e2c88e849aae26422f8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/990f55bf193b984bc987e2c88e849aae26422f8b/TFglobals.py |
print "Debug M: "+ str(text.encode('utf-8')) | print "Debug M: "+ text | def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ... | 990f55bf193b984bc987e2c88e849aae26422f8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/990f55bf193b984bc987e2c88e849aae26422f8b/TFglobals.py |
print "Debug H: "+ str(text.encode('utf-8')) | print "Debug H: "+ text | def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ... | 990f55bf193b984bc987e2c88e849aae26422f8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/990f55bf193b984bc987e2c88e849aae26422f8b/TFglobals.py |
print "Warning: "+ str(text.encode('utf-8')) | print "Warning: "+ text | def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ str(text.encode('utf-8')) return print "Error : "+ str(text.encode('utf-8')) except: print "Error : Can't print error message" | 990f55bf193b984bc987e2c88e849aae26422f8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/990f55bf193b984bc987e2c88e849aae26422f8b/TFglobals.py |
print "Error : "+ str(text.encode('utf-8')) | print "Error : "+ text | def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ str(text.encode('utf-8')) return print "Error : "+ str(text.encode('utf-8')) except: print "Error : Can't print error message" | 990f55bf193b984bc987e2c88e849aae26422f8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/990f55bf193b984bc987e2c88e849aae26422f8b/TFglobals.py |
raise LexerError(errline, ((line, pos), (line, len(errline)))) | raise LexerError(errline, ((line, pos + 1), (line, len(errline)))) | def match_specs(specs, str, i, (line, pos)): for spec in specs: m = spec.re.match(str, i) if m is not None: value = m.group() nls = value.count(u'\n') n_line = line + nls if nls == 0: n_pos = pos + len(value) else: n_pos = len(value) - value.rfind(u'\n') - 1 return Token(spec.type, value, ((line, pos), (n_line, n_pos))... | 83a136303d0833bbcbbd3b4aac9391a6e0390f4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11574/83a136303d0833bbcbbd3b4aac9391a6e0390f4c/lexer.py |
CC_FLAGS = "-g -Wall -Wfatal-errors -Werror" | CC_FLAGS = "-g -Wall -Werror" | def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
DEFINES += ['IMAGES_USE_LIBPNG'] | DEFINES += ['IMAGES_USE_LIBPNG', 'NO_CAIRO'] | def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
'ole32', 'msvcp60', 'Msimg32', 'png', 'z', 'opengl32', 'glu32', 'cairo' | 'ole32', 'msvcp60', 'Msimg32', 'opengl32', 'glu32', 'png', 'z' | def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
def Glob(pattern): | def Glob(pattern): | def Glob(pattern): # needed because glob.glob() is buggy on Windows 95: # things like tests/t*.nim won't work global _baseDir (head, tail) = os.path.split(Path(pattern)) result = [] if os.path.exists(head): try: os.chdir(os.path.join(_baseDir, head)) try: for f in glob.glob(tail): result.append(os.path.join(head, f)) e... | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
ccflags += " -fPIC" linkflags += " -shared -fPIC" | if getHost() == "windows": linkflags += " -shared" else: ccflags += " -fPIC" linkflags += " -shared -fPIC" | def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) linkCmd = "" for f in files: Exec(Subs("$# -c $# -o $# $#... | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
Exec(Subs("$ | c = Changed(f, f) if c.check() or force: Exec(Subs("$ c.success() | def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) linkCmd = "" for f in files: Exec(Subs("$# -c $# -o $# $#... | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
ccflags += ccflags + " -Iclaro" | ccflags += ccflags + " -Iinclude" | def cmd_examples(ccflags): ccflags += ccflags + " -Iclaro" Compile("build/hello", ["examples/helloworld/hello.c"], ccflags) Compile("build/radio", ["examples/radio/radio.c"], ccflags) Compile("build/combo", ["examples/combo/combo.c"], ccflags) Compile("build/layout_test", ["examples/layout/layout_test.c"], ccflags) Com... | cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14850/cd5a0d1493d4b1ce86e83d89c7b7c4d37f816d44/koch.py |
raise self.ConnectionError(*exc.args) | raise ConnectionError(*exc.args) | def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise self.ConnectionError(*exc.args) except socket.timeout, exc: raise self.ConnectionTime... | d1fc5b2c96ecc726251c3ba71de42ed81aff1c54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/d1fc5b2c96ecc726251c3ba71de42ed81aff1c54/connection.py |
raise self.ConnectionTimeoutError(*exc.args) | raise ConnectionTimeoutError(*exc.args) | def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise self.ConnectionError(*exc.args) except socket.timeout, exc: raise self.ConnectionTime... | d1fc5b2c96ecc726251c3ba71de42ed81aff1c54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/d1fc5b2c96ecc726251c3ba71de42ed81aff1c54/connection.py |
print "Trying to disconnect." | def disconnect(self, conf=None): """ Disconnect from the server, if connected. """ print "Trying to disconnect." if self._sock is None: return try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() | 608ea866c93b48cfb63ce30c03d8223d8ea4aa43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/608ea866c93b48cfb63ce30c03d8223d8ea4aa43/connection.py | |
print repr(self.connection.connected) | def disconnect(self, conf=None, extra_headers=None): """Disconnect from the server.""" print repr(self.connection.connected) if self.connection.connected: disconnect = frame.DisconnectFrame(extra_headers=extra_headers) result = self.send_frame(disconnect) self.connection.disconnect() return result | c9b0a740c5a9ad1fe4a33a7c4742e5423a201de5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/c9b0a740c5a9ad1fe4a33a7c4742e5423a201de5/simplex.py | |
subscribe clients, since the message messages are received by a separate thread. | subscribe clients, since a listener thread needs to be able to share the *same* socket with other publisher thread(s). | def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values() | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py |
This class is notably not thread-safe. You need to use external mechanisms to guard access to connections. This is typically accomplished by using a thread-safe connection pool implementation (e.g. L{stompclient.connection.ThreadLocalConnectionPool}). | This class provides some basic synchronization to avoid threads stepping on eachother. Specifically the following activities are each protected by [their own] C{threading.RLock} instances: - connect() and disconnect() methods (share a lock). - read() - send() It is assumed that send() and recv() should be allowed to h... | def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values() | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py |
self._connect_lock = threading.RLock() self._send_lock = threading.RLock() self._read_lock = threading.RLock() | def __init__(self, host, port=61613, socket_timeout=None): self.host = host self.port = port self.socket_timeout = socket_timeout self._sock = None self._buffer = FrameBuffer() self._connected = threading.Event() | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py | |
if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionError(*exc.args) sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) sock.settime... | with self._connect_lock: if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionError(*exc.args) sock.setsockopt(socket.SOL_TCP, socket.TCP... | def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionErr... | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py |
if self._sock is None: raise NotConnectedError() try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() self._connected.clear() | with self._connect_lock: if self._sock is None: raise NotConnectedError() try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() self._connected.clear() | def disconnect(self, conf=None): """ Disconnect from the server, if connected. @raise NotConnectedError: If the connection is not currently connected. """ if self._sock is None: raise NotConnectedError() try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() self._connected.clear() | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py |
self.connect() try: self._sock.sendall(str(frame)) except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() raise ConnectionError("Error %s while writing to socket. %s." % e.args) | with self._send_lock: self.connect() try: self._sock.sendall(str(frame)) except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() raise ConnectionError("Error %s while writing to socket. %s." % e.args) | def send(self, frame): """ Sends the specified frame to STOMP server. @param frame: The frame to send to server. @type frame: L{stompclient.frame.Frame} """ self.connect() try: self._sock.sendall(str(frame)) except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() raise ConnectionError("Error %s while wr... | e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py |
begdata = 900 + (nchannels * 75) enddata = self.info["eventtablepos"] nsamples = ((enddata - begdata)/self.info["nchannels"])/2 self.info["nsamples"] = nsamples | def load_setup(self): """Loads CNT metadata from header.""" self.info = {} self.file.seek(0) self.info["rev"] = self.get('12s') self.info["nextfile"] = self.get('l') self.info["prevfile"] = self.get('L') self.info["type"] = self.get('b') self.info["id"] = se... | 75d5fe98789cdb6b5e63b3fb51077cd7bed8b396 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/75d5fe98789cdb6b5e63b3fb51077cd7bed8b396/cnt2h5.py | |
shape = (2, len(self.events)) | shape = (len(self.events), 2) | def save_events(self): self.get_event_table() self.load_events() shape = (2, len(self.events)) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for event in self.events: ca[:, even... | 1b6e038f4e967279ef6a4002b992f9c3de579942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/1b6e038f4e967279ef6a4002b992f9c3de579942/cnt2h5.py |
for event in self.events: ca[:, event.event_id] = [event.stimtype, event.offset] | for i, event in enumerate(self.events): ca[i, :] = [event.stimtype, event.offset] | def save_events(self): self.get_event_table() self.load_events() shape = (2, len(self.events)) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for event in self.events: ca[:, even... | 1b6e038f4e967279ef6a4002b992f9c3de579942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/1b6e038f4e967279ef6a4002b992f9c3de579942/cnt2h5.py |
def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"]) return point | 1b6e038f4e967279ef6a4002b992f9c3de579942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/1b6e038f4e967279ef6a4002b992f9c3de579942/cnt2h5.py | ||
sys.exit() CNTData(cnt_filename) | sys.exit(0) else: print cnt_filename CNTData(cnt_filename) | def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"]) return point | 1b6e038f4e967279ef6a4002b992f9c3de579942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/1b6e038f4e967279ef6a4002b992f9c3de579942/cnt2h5.py |
begdata = 900 + (nchannels * 75) | begdata = 900 + (self.info["nchannels"] * 75) | def load_setup(self): """Loads CNT metadata from header.""" self.info = {} self.file.seek(0) self.info["rev"] = self.get('12s') self.info["nextfile"] = self.get('l') self.info["prevfile"] = self.get('L') self.info["type"] = self.get('b') self.info["id"] = se... | 3954745d12d5e3e6b0e99faa0391e09d615fdca9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14831/3954745d12d5e3e6b0e99faa0391e09d615fdca9/cnt2h5.py |
needs = p._str.split()[1:] | needs = p._str.split() | def check(self, *args, **kwds): _rpmts.check(self, *args, **kwds) | c93142a2b4278347be32e1c02915ff5aef1b2c1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1057/c93142a2b4278347be32e1c02915ff5aef1b2c1a/transaction.py |
self.ndiffAssertEqual(f(s), '\n'.join(['case when foo = 1 then 2', ' when foo = 3 then 4', ' else 5', | self.ndiffAssertEqual(f(s), '\n'.join(['case', ' when foo = 1 then 2', ' when foo = 3 then 4', ' else 5', | def test_case(self): f = lambda sql: sqlparse.format(sql, reindent=True) s = 'case when foo = 1 then 2 when foo = 3 then 4 else 5 end' self.ndiffAssertEqual(f(s), '\n'.join(['case when foo = 1 then 2', ' when foo = 3 then 4', ' else 5', 'end'])) | f5086aacc638ef077d01542e1a636f2bbd9aa7ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/f5086aacc638ef077d01542e1a636f2bbd9aa7ba/test_format.py |
if x.next()(t): | if next(x)(t): | def _consume_cycle(tl, i): x = itertools.cycle(( lambda y: (y.match(T.Punctuation, '.') or y.ttype is T.Operator), lambda y: (y.ttype in (T.String.Symbol, T.Name, T.Wildcard)))) for t in tl.tokens[i:]: if x.next()(t): yield t else: raise StopIteration | b995d5ef8ba9caa5f09bfdaed868f0321547c83d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/b995d5ef8ba9caa5f09bfdaed868f0321547c83d/grouping.py |
return unicode(self).encode('utf-8') | return self.value or '' | def __str__(self): return unicode(self).encode('utf-8') | 16b9b09222313e6cf45cd4daa313fd0f951f6a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/16b9b09222313e6cf45cd4daa313fd0f951f6a94/sql.py |
def __unicode__(self): return self.value or '' | def __repr__(self): short = self._get_repr_value() return '<%s \'%s\' at 0x%07x>' % (self._get_repr_name(), short, id(self)) | 16b9b09222313e6cf45cd4daa313fd0f951f6a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/16b9b09222313e6cf45cd4daa313fd0f951f6a94/sql.py | |
def __unicode__(self): return ''.join(unicode(x) for x in self.flatten()) | def __unicode__(self): return ''.join(unicode(x) for x in self.flatten()) | 16b9b09222313e6cf45cd4daa313fd0f951f6a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/16b9b09222313e6cf45cd4daa313fd0f951f6a94/sql.py | |
return unicode(self).encode('utf-8') | return ''.join('%s' % x for x in self.flatten()) | def __str__(self): return unicode(self).encode('utf-8') | 16b9b09222313e6cf45cd4daa313fd0f951f6a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/16b9b09222313e6cf45cd4daa313fd0f951f6a94/sql.py |
data['proc_time'] = '%.3f' % proc_time or 0.0 | data['proc_time'] = '%.3f' % (proc_time or 0.0) | def index(request): output = None data = {} proc_time = None if request.method == 'POST': logging.debug(request.POST) form = FormOptions(request.POST, request.FILES) if form.is_valid(): start = time.time() output = format_sql(form, format=request.POST.get('format', 'html')) proc_time = time.time()-start else: form = Fo... | 92f767b05e7ccda6d62190fb6aa425557240dcff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/92f767b05e7ccda6d62190fb6aa425557240dcff/views.py |
unittest.TextTestRunner(verbosity=2).run(suite) | return unittest.TextTestRunner(verbosity=2).run(suite) | def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue... | b252592eb40263994317d88ced43ddc4669a4975 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/b252592eb40263994317d88ced43ddc4669a4975/run_tests.py |
main(args) | result = main(args) if not result.wasSuccessful(): return_code = 1 else: return_code = 0 sys.exit(return_code) | def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue... | b252592eb40263994317d88ced43ddc4669a4975 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11268/b252592eb40263994317d88ced43ddc4669a4975/run_tests.py |
usage() | __usage() | def build_tree(search_path, outdir): """Build a directory tree under outdir containing symlinks to all LV2 extensions found in search_path, such that the symlink paths correspond to the extension URIs.""" for bundle in __bundles(search_path): # Load manifest into model manifest = RDF.Model() parser = RDF.Parser(name="g... | 02456d35bb05c4a82de7e269629314762cb4be3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10901/02456d35bb05c4a82de7e269629314762cb4be3d/lv2include.py |
print_usage() | usage() | def usage(): print """Usage: lv2compatgen.py DATA | 95556f633fd03fb5cdf9baac1a8621325278dd90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10901/95556f633fd03fb5cdf9baac1a8621325278dd90/lv2compatgen.py |
path = os.path.join(release_dir, 'lv2-%s-%s.0.tar.gz' % (b, rev)) subprocess.call(['tar', '-czf', path, os.path.join(outdir, '%s.lv2' % b)]) | path = os.path.join(os.path.abspath(release_dir), 'lv2-%s-%s.0.tar.gz' % (b, rev)) subprocess.call(['tar', '--exclude-vcs', '-czf', path, bundle[bundle.find('/') + 1:]], cwd=dir) | def gendoc(specgen_dir, bundle_dir, ttl_filename, html_filename): subprocess.call([os.path.join(specgen_dir, 'lv2specgen.py'), os.path.join(bundle_dir, ttl_filename), os.path.join(specgen_dir, 'template.html'), os.path.join(specgen_dir, 'style.css'), os.path.join(out_base, html_filename), os.path.join('..', 'doc'), '-i... | 817c726bd43a74e9800f38c4f9d5f06652e01b3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10901/817c726bd43a74e9800f38c4f9d5f06652e01b3c/gendoc.py |
self.setConfig(self._retrieveConfig()) self.__cfgModified = False | try: self.setConfig(self._retrieveConfig()) self.__cfgModified = False except: logger().error(traceback.format_exc()) | def retrieveConfig(self): """ retrieves original configuration from vermont instance and replaces current configurations, both original and dynamic """ logger().debug("VermontInstance.retrieveConfig()") self.setConfig(self._retrieveConfig()) self.__cfgModified = False | 9746e2a9b5896a04cc1437199eb098d3f2759558 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13005/9746e2a9b5896a04cc1437199eb098d3f2759558/VermontInstance.py |
for name, old_kind_details in cwd: | for name, old_kind_details in cwd.iteritems(): | def _gather_deleted_dir(self, path, dirdict): # List what the tree thought it had as deletes. pending = [(path, dirdict)] while pending: dirname, cwd = pending.pop(-1) for name, old_kind_details in cwd: path = dirname and ('%s/%s' % (dirname, name)) or name if type(old_kind_details) is dict: pending.append((path, old_k... | 64b7786bb78b5d010c4f864b6c2806c7cdd6f789 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/64b7786bb78b5d010c4f864b6c2806c7cdd6f789/journals.py |
cwd[name][1]) | old_kind_details) | def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme... | b9e78e3ff3f622a593342c9e3460e41acfb5dca5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/b9e78e3ff3f622a593342c9e3460e41acfb5dca5/journals.py |
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme... | b9e78e3ff3f622a593342c9e3460e41acfb5dca5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/b9e78e3ff3f622a593342c9e3460e41acfb5dca5/journals.py | ||
self.journal.add(path, 'replace', (cwd[name][1], new_kind_details)) | old_kind_details = cwd[name] if type(old_kind_details) is dict: old_kind_details = ('dir',) if old_kind_details != new_kind_details: self.journal.add(path, 'replace', (old_kind_details, new_kind_details)) | def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme... | b9e78e3ff3f622a593342c9e3460e41acfb5dca5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/b9e78e3ff3f622a593342c9e3460e41acfb5dca5/journals.py |
if content[0] != dir: | if content[0] != 'dir': | def replay(self): """Replay the journal.""" adds = [] deletes = [] replaces = [] for path, (action, content) in self.journal.paths.iteritems(): if action == 'new': adds.append((path, content)) elif action == 'del': deletes.append((path, content)) elif action == 'replace': replaces.append((path, content[0], content[1]))... | 4bb6d68347d3a0751c3a200515e1190e3efcf739 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/4bb6d68347d3a0751c3a200515e1190e3efcf739/journals.py |
realpath = self.sourcedir.local_abspath(path) | realpath = self.contentdir.local_abspath(path) | def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content. | 044901dd7b5364fd9cdd5f831ec1ceedabac2104 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/044901dd7b5364fd9cdd5f831ec1ceedabac2104/journals.py |
temppath = self.contentdir.local_abspath(tempname) | def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content. | 044901dd7b5364fd9cdd5f831ec1ceedabac2104 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/044901dd7b5364fd9cdd5f831ec1ceedabac2104/journals.py | |
os.utime(tempname, (content.mtime, content.mtime)) | os.utime(temppath, (content.mtime, content.mtime)) | def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content. | 044901dd7b5364fd9cdd5f831ec1ceedabac2104 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/044901dd7b5364fd9cdd5f831ec1ceedabac2104/journals.py |
temppath = self.contentdir.local_abspath(tempname) | def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content. | bf8f0c7b1fb9bfa76ca3dd92e5fa76e9049053a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/bf8f0c7b1fb9bfa76ca3dd92e5fa76e9049053a5/journals.py | |
except OSError, e: if e.errno != errno.ENOENT: raise self.ui.output_log(4, __name__, 'Failed to set mtime for %r' % (temppath,)) | def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content. | bf8f0c7b1fb9bfa76ca3dd92e5fa76e9049053a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6323/bf8f0c7b1fb9bfa76ca3dd92e5fa76e9049053a5/journals.py | |
requires = ['webit', 'gtk', 'gobject', 'keybinder', 'pynotify'], | requires = ['webkit', 'gtk', 'gobject', 'keybinder', 'pynotify'], | def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ] | c915abb5c94d11233226b2ffe38c2a57c1271c03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/c915abb5c94d11233226b2ffe38c2a57c1271c03/setup.py |
packages = ['hotot'], | packages = ['hotot'], | def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ] | c915abb5c94d11233226b2ffe38c2a57c1271c03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/c915abb5c94d11233226b2ffe38c2a57c1271c03/setup.py |
print raw_json | def crack_request(params): raw_json = urllib.unquote(params[1]) print raw_json request_info = dict([(k.encode('utf8'), v) for k, v in json.loads(raw_json).items()]) args = ( request_info['uuid'] , request_info['method'] , request_info['url'] , request_info['params'] , request_info['headers']) th = threading.Thread(targ... | 23fc88395eeabdbf76c38880141679286e7e6b12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/23fc88395eeabdbf76c38880141679286e7e6b12/agent.py | |
libwebkit = ctypes.CDLL('libwebkit-1.0.so.2') | try: libwebkit = ctypes.CDLL('libwebkit-1.0.so.2') pass except: libwebkit = ctypes.CDLL('libwebkitgtk-1.0.so.0.2.0') pass | def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =... | b73cc0de5d2d3af07555b613dc3417eeb94f8dc1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/b73cc0de5d2d3af07555b613dc3417eeb94f8dc1/agent.py |
print 'error: webkit_set_proxy_uri' | exctype, value = sys.exc_info()[:2] print 'error: webkit_set_proxy_uri: (%s, %s)' % (exctype,value) | def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =... | b73cc0de5d2d3af07555b613dc3417eeb94f8dc1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/b73cc0de5d2d3af07555b613dc3417eeb94f8dc1/agent.py |
gobject.idle_add(os.system, 'aplay -q "%s"' % utils.get_sound('notify')) | subprocess.Popen(['aplay', '-q', '-N', utils.get_sound('notify')]) | def crack_system(params): if params[1] == 'notify' or params[1] == 'notify_with_sound': if not get_prefs('use_native_notify'): return summary = urllib.unquote(params[2]) body = urllib.unquote(params[3]) notify.update(summary, body) notify.show() if params[1] == 'notify_with_sound': gobject.idle_add(os.system, 'aplay -q... | 24aaa73b8e8e7d47001f4abd36dec1220bca2e46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/24aaa73b8e8e7d47001f4abd36dec1220bca2e46/agent.py |
$(' | $('.version').text('%s'); | def apply_config(): version = 'ver %s (%s)'% (hotot.__version__, hotot.__codename__) exts_enabled = json.dumps(get_prefs('exts_enabled')) webv.execute_script(''' $('#version').text('%s'); ext.exts_enabled = %s; ''' % (version , exts_enabled)) apply_prefs() pass | 74eccfd09ddcbe622a677c0d056483bd548dcb1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/74eccfd09ddcbe622a677c0d056483bd548dcb1f/agent.py |
msg = 'Unknow Errors ... ' | msg = 'Unknown Errors ... ' | def request(uuid, method, url, params={}, headers={},files=[],additions=''): scripts = '' try: if (method == 'POST'): result = _post(url, params, headers, files, additions) else: result = _get(url, params, headers) pass except urllib2.HTTPError, e: msg = 'Unknow Errors ... ' if http_code_msg_table.has_key(e.getcode()):... | 27e5b2974d95db0afe34b35f0e2d7fb12f34ec94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/27e5b2974d95db0afe34b35f0e2d7fb12f34ec94/agent.py |
settings.set_property('enable-universal-access-from-file-uris', True) settings.set_property('enable-file-access-from-file-uris', True) settings.set_property('enable-page-cache', True) settings.set_property('tab-key-cycles-through-elements', True) settings.set_property('enable-default-context-menu', False) | try: settings.set_property('enable-universal-access-from-file-uris', True) settings.set_property('enable-default-context-menu', False) settings.set_property('enable-page-cache', True) settings.set_property('tab-key-cycles-through-elements', True) settings.set_property('enable-file-access-from-file-uris', True) except: ... | def __init__(self): WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard() | 0c513311fd97a154287cec628191f28957ec2a28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/0c513311fd97a154287cec628191f28957ec2a28/view.py |
mitem_resume.connect('activate', self.on_trayicon_activate); | mitem_resume.connect('activate', self.on_trayicon_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
mitem_prefs.connect('activate', self.on_mitem_prefs_activate); | mitem_prefs.connect('activate', self.on_mitem_prefs_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
mitem_about.connect('activate', self.on_mitem_about_activate); | mitem_about.connect('activate', self.on_mitem_about_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
mitem_quit.connect('activate', self.on_mitem_quit_activate); | mitem_quit.connect('activate', self.on_mitem_quit_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
mitem_resume.connect('activate', self.on_mitem_resume_activate); | mitem_resume.connect('activate', self.on_mitem_resume_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
mitem_prefs.connect('activate', self.on_mitem_prefs_activate); | mitem_prefs.connect('activate', self.on_mitem_prefs_activate) | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
self.btn_update.connect('clicked', self.on_btn_update_clicked) | self.btn_update.connect('clicked', self.on_btn_update_clicked) | def build_inputw(self): # input window self.inputw = gtk.Window() self.inputw.set_default_size(300, 10) self.inputw.set_position(gtk.WIN_POS_CENTER) self.inputw.set_title(_("What's happening?")) hbox = gtk.HBox() | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
pass | def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() pass self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() pass self.window.present() self.webv.grab_focus() | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py | |
pass | def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() pass self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() pass self.window.present() self.webv.grab_focus() | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py | |
config.loads(); | config.loads() | def main(): global HAS_INDICATOR gtk.gdk.threads_init() config.loads(); config.load_sys_conf() if not config.sys_get('use_ubuntu_indicator'): HAS_INDICATOR = False try: import dl libc = dl.open('/lib/libc.so.6') libc.call('prctl', 15, 'hotot', 0, 0, 0) except: pass agent.init_notify() app = Hotot() agent.app = app if H... | 1b72b0ee57eb1ab604e64b31b416cae895174552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/1b72b0ee57eb1ab604e64b31b416cae895174552/hotot.py |
settings.set_property('tab-key-cycles-through-elements', False) | settings.set_property('tab-key-cycles-through-elements', True) | def __init__(self): webkit.WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard() | 67265dac701ebe344c06feba3a4f133c971b6d1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/67265dac701ebe344c06feba3a4f133c971b6d1e/view.py |
gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") | gtk.window_set_default_icon_from_file( config.abspath + '/imgs/ic64_hotot.png') self.window.set_icon_from_file( config.abspath + '/imgs/ic64_hotot.png') | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") self.window.set_default_size(750, 550) self.window.set_title("Hotot") self.window.set_position(gtk.WIN_POS_CENTER) | 9802804dfe6904627c76394ce7f741b4ce0cc413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/9802804dfe6904627c76394ce7f741b4ce0cc413/hotot.py |
self.window.set_title("Hotot") | self.window.set_title('Hotot') | def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") self.window.set_default_size(750, 550) self.window.set_title("Hotot") self.window.set_position(gtk.WIN_POS_CENTER) | 9802804dfe6904627c76394ce7f741b4ce0cc413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/9802804dfe6904627c76394ce7f741b4ce0cc413/hotot.py |
libwebkit = ctypes.CDLL('libwebkitgtk-1.0.so.0.2.0') | libwebkit = ctypes.CDLL('libwebkitgtk-1.0.so.0') | def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =... | 7ce0bf5559df53e2c5dfe2c41dc1d882367eeed6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/7ce0bf5559df53e2c5dfe2c41dc1d882367eeed6/agent.py |
gobject.idle_add(webv.execute_script, "new Image().src='http://mobile.twitter.com/';") | gobject.idle_add(webv.execute_script, "new Image().src='http://google.com/';") | def apply_proxy_setting(): if get_prefs('use_http_proxy'): proxy_uri = "https://%s:%s" % ( get_prefs('http_proxy_host') , get_prefs('http_proxy_port')) webkit_set_proxy_uri(proxy_uri) pass else: webkit_set_proxy_uri("") pass gobject.idle_add(webv.execute_script, "new Image().src='http://mobile.twitter.com/';") pass | 62a11bd7e52d5776189f53020c94ea4f7dc2a31d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/62a11bd7e52d5776189f53020c94ea4f7dc2a31d/agent.py |
font_family_list = [ff.get_name() for ff in gtk.gdk.pango_context_get().list_families()] | font_family_list = [ff.get_name() for ff in gtk.gdk.pango_context_get().list_families()] | def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk... | 5809ece3927e3465e8dd31b73155df07b0e0e5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/5809ece3927e3465e8dd31b73155df07b0e0e5c2/agent.py |
, font_family_list, font_family_used, font_size | , json.dumps(font_family_list), font_family_used, font_size | def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk... | 5809ece3927e3465e8dd31b73155df07b0e0e5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/5809ece3927e3465e8dd31b73155df07b0e0e5c2/agent.py |
requires = ['webit', 'gtk', 'gobject', 'keybinder', 'pynotify'], | requires = ['webkit', 'gtk', 'gobject', 'keybinder', 'pynotify'], | def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ] | d41f0ce76328fde390b38b6c716b596f91dbc34c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/d41f0ce76328fde390b38b6c716b596f91dbc34c/setup.py |
packages = ['hotot'], | packages = ['hotot'], | def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ] | d41f0ce76328fde390b38b6c716b596f91dbc34c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/d41f0ce76328fde390b38b6c716b596f91dbc34c/setup.py |
config.set(app.active_profile, 'api_base', 'https://identi.ca/api/') | set_prefs('api_base', 'https://identi.ca/api/') | def select_config(protocol): if protocol == 'identica': config.set(app.active_profile, 'api_base', 'https://identi.ca/api/') execute_script("lib.twitterapi.api_base='https://identi.ca/api/'") pass | 0e11c559f44fe5f6356e01709078f66e6285f2ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/0e11c559f44fe5f6356e01709078f66e6285f2ac/agent.py |
return DEFAULT_SCREEN_NAME | return json.dumps(DEFAULT_SCREEN_NAME) | def get_screen_name(webv): if CAN_EVAL_SCRIPT: return webv.ctx().EvaluateScript(''' utility.DB.json(utility.DB.auto_complete_list) ''') else: return DEFAULT_SCREEN_NAME | e70541e19e93df0b1f661503444d9c615233cb30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/e70541e19e93df0b1f661503444d9c615233cb30/db.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.