This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PyObject * | |
string_concatenate(PyObject *v, PyObject *w, | |
PyFrameObject *f, unsigned char *next_instr) | |
{ | |
/* This function implements 'variable += expr' when both arguments | |
are strings. */ | |
Py_ssize_t v_len = PyString_GET_SIZE(v); | |
Py_ssize_t w_len = PyString_GET_SIZE(w); | |
Py_ssize_t new_len = v_len + w_len; | |
if (new_len < 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=''' | |
def test_join(): | |
data = [] | |
for i in range(1000000): | |
data.append('addddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeewweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeerwerwerwerwetrwegfsghklujsahdflkiuahfgluhewihrlwelfhlwuhfawhrgfiuhagrliwrwreqwerqwerwefsdfasdfasdfasdfdsfddddddddddddddddeeeeeeeewwwwwwwwwwwwwddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd') | |
return ''.join(data) | |
test_join() | |
''' | |
b = ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ | |
# This is the sshd server system-wide configuration file. See | |
# sshd_config(5) for more information. | |
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin | |
# The strategy used for options in the default sshd_config shipped with | |
# OpenSSH is to specify options with their default value where | |
# possible, but leave them commented. Uncommented options change a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The fast_function() function optimize calls for which no argument | |
tuple is necessary; the objects are passed directly from the stack. | |
For the simplest case -- a function that takes only positional | |
arguments and is called with only positional arguments -- it | |
inlines the most primitive frame setup code from | |
PyEval_EvalCodeEx(), which vastly reduces the checks that must be | |
done before evaluating the frame. | |
*/ | |
static PyObject * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
PyFrame_FastToLocals(PyFrameObject *f) | |
{ | |
/* Merge fast locals into f->f_locals */ | |
PyObject *locals, *map; | |
PyObject **fast; | |
PyObject *error_type, *error_value, *error_traceback; | |
PyCodeObject *co; | |
Py_ssize_t j; | |
int ncells, nfreevars; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_func(): | |
value = 's' | |
def test(): | |
print value | |
return test | |
import dis | |
dis.dis(get_func) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import weakref | |
class Case1(object): | |
def __del__(self): | |
print 'del case1' | |
class Case2(object): | |
_instance = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <seccomp.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import sys | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
from PySide.QtWebKit import * | |
import random | |
app = QApplication(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A(object): | |
def __init__(self, parent=None): | |
super(A, self).__init__() | |
print 'init A class' | |
class B(object): | |
def __init__(self, parent=None): | |
super(B, self).__init__() | |
print 'init B class' | |
OlderNewer