code
stringlengths
9
256k
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from jupyter_client . channels import major_protocol_version <EOL> from ipython_genutils . py3compat import string_types , iteritems <EOL> import zmq <EOL> from traitlets import ( <EOL> Any , Instance , Type , <EOL> ) <EOL> from . channelsabc import...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import atexit <EOL> import errno <EOL> from threading import Thread <EOL> import time <EOL> from zmq import ZMQError <EOL> from zmq . eventloop import ioloop , zmqstream <EOL> from traitlets import Type , Instance <EOL> from jupyter_client . channel...
<s> import requests <EOL> from ... . tests . base import NBViewerTestCase , FormatHTMLMixin <EOL> class URLTestCase ( NBViewerTestCase ) : <EOL> def test_url ( self ) : <EOL> url = self . url ( '<STR_LIT>' ) <EOL> r = requests . get ( url ) <EOL> self . assertEqual ( r . status_code , <NUM_LIT:200> ) <EOL> self . asser...
<s> """<STR_LIT>""" <EOL> import json <EOL> from http . client import responses <EOL> from tornado import web <EOL> from . . handlers import BaseHandler <EOL> from . . utils import url_path_join <EOL> class APIHandler ( BaseHandler ) : <EOL> def check_referer ( self ) : <EOL> """<STR_LIT>""" <EOL> host = self . request...
<s> """<STR_LIT>""" <EOL> from binascii import b2a_hex <EOL> import errno <EOL> import hashlib <EOL> from hmac import compare_digest <EOL> import os <EOL> import socket <EOL> from threading import Thread <EOL> import uuid <EOL> import warnings <EOL> from tornado import web , gen , ioloop <EOL> from tornado . httpclient...
<s> import operator <EOL> from abc import ABCMeta , abstractmethod <EOL> from flask . _compat import with_metaclass <EOL> class Requirement ( with_metaclass ( ABCMeta ) ) : <EOL> """<STR_LIT>""" <EOL> @ abstractmethod <EOL> def fulfill ( self , user , request ) : <EOL> return NotImplemented <EOL> def __call__ ( self , ...
<s> from __future__ import division <EOL> import numpy as np <EOL> import scipy as sp <EOL> from operator import itemgetter <EOL> from scipy . spatial . distance import euclidean <EOL> from dml . tool import Heap <EOL> class KDNode : <EOL> def __init__ ( self , x , y , l ) : <EOL> self . x = x <EOL> self . y = y <EOL> ...
<s> """<STR_LIT:U+0020>""" <EOL> import numpy as np <EOL> import scipy as sp <EOL> from . sigmoid import sigmoid <EOL> from . normalize import normalize , disnormalize , normalize_by_extant , featurenormal <EOL> from . sign import sign <EOL> from . pca import pca , projectData , recoverData <EOL> from . displayData imp...
<s> from dml . tool import Heap <EOL> def cmp ( aa , bb ) : <EOL> return aa < bb <EOL> a = Heap ( ) <EOL> a . insert ( <NUM_LIT> ) <EOL> a . insert ( <NUM_LIT> ) <EOL> a . insert ( <NUM_LIT> ) <EOL> a . insert ( <NUM_LIT:30> ) <EOL> a . insert ( <NUM_LIT> ) <EOL> a . insert ( <NUM_LIT> ) <EOL> a . insert ( <NUM_LIT> ) ...
<s> import pickle , sys , os <EOL> import pygame as pg <EOL> from . . import setup , tools , tilerender <EOL> from . . import observer <EOL> from . . import constants as c <EOL> import death <EOL> if sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> : <EOL> import cPickle <EOL> pickle = cPickle <EOL> class Menu ( tools...
<s> import django <EOL> try : <EOL> from django . conf . urls import url , patterns <EOL> except ImportError : <EOL> from django . conf . urls . defaults import url , patterns <EOL> from actstream import feeds <EOL> urlpatterns = [ <EOL> url ( r'<STR_LIT>' , <EOL> feeds . CustomJSONActivityFeed . as_view ( name = '<STR...
<s> import os <EOL> import sys <EOL> from datetime import datetime <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( __file__ ...
<s> from django . core . management . base import BaseCommand <EOL> from native_tags . registry import register <EOL> class Command ( BaseCommand ) : <EOL> def usage ( self , exe ) : <EOL> return '<STR_LIT>' % exe <EOL> def handle ( self , * buckets , ** kwargs ) : <EOL> for bucket , items in register . items ( ) : <EO...
<s> """<STR_LIT>""" <EOL> import tabulate <EOL> import time <EOL> from collections import OrderedDict <EOL> from jut import config <EOL> from jut . api import auth , accounts , data_engine <EOL> from jut . common import info , error <EOL> from jut . commands import configs <EOL> from jut . exceptions import JutExceptio...
<s> from __future__ import print_function <EOL> from os . path import abspath , dirname , join , isfile <EOL> import sys <EOL> sys . path . append ( abspath ( dirname ( dirname ( __file__ ) ) ) ) <EOL> from utils . data_stats import DataStats <EOL> from utils . data_paths import DATA_DIR_PATH <EOL> from utils . data_io...
<s> FAKE_IP = "<STR_LIT>" <EOL> MAC_ADDR = "<STR_LIT>" <EOL> from scapy . all import srp , Ether , ARP <EOL> from unittest . case import SkipTest <EOL> from logging_tcp_socket import LoggingTCPSocket <EOL> import time <EOL> import socket <EOL> from teeceepee . tcp_listener import TCPListener <EOL> RUN = True <EOL> try ...
<s> from ipodio . track import Track <EOL> from ipodio . database import Playlist <EOL> from expects import expect <EOL> from mockito import mock , when , verify , any <EOL> from mamba import describe , context , before <EOL> with describe ( Playlist ) as _ : <EOL> with context ( '<STR_LIT>' ) : <EOL> def should_have_a...
<s> import os <EOL> import random <EOL> import time <EOL> import uuid <EOL> from flask import ( <EOL> Flask , <EOL> request , <EOL> render_template , <EOL> session , <EOL> redirect , <EOL> url_for , <EOL> jsonify , <EOL> current_app <EOL> ) <EOL> from celery import Celery <EOL> from flask . ext . socketio import ( <EOL...
<s> from __future__ import absolute_import , unicode_literals <EOL> import unittest <EOL> import six <EOL> from wechatpy . replies import TextReply , create_reply <EOL> class CreateReplyTestCase ( unittest . TestCase ) : <EOL> def test_create_reply_with_text_not_render ( self ) : <EOL> text = '<STR_LIT:test>' <EOL> rep...
<s> from __future__ import absolute_import , unicode_literals <EOL> from wechatpy . client . api . base import BaseWeChatAPI <EOL> from wechatpy . client . api . merchant . category import MerchantCategory <EOL> from wechatpy . client . api . merchant . stock import MerchantStock <EOL> from wechatpy . client . api . me...
<s> from __future__ import absolute_import , unicode_literals <EOL> from wechatpy . pay . api . redpack import WeChatRedpack <EOL> from wechatpy . pay . api . transfer import WeChatTransfer <EOL> from wechatpy . pay . api . coupon import WeChatCoupon <EOL> from wechatpy . pay . api . order import WeChatOrder <EOL> from...
<s> from __future__ import print_function <EOL> import os , zipfile , io , platform <EOL> import sys , tempfile <EOL> import subprocess <EOL> from appdirs import AppDirs <EOL> import shutil <EOL> ZIP_MODE = zipfile . ZIP_STORED <EOL> DEBUG = False <EOL> def replace_right ( source , target , replacement , replacements =...
<s> from django . core . management . base import BaseCommand , CommandError <EOL> from django . test . client import RequestFactory <EOL> from django . conf import settings <EOL> from django . core . urlresolvers import reverse <EOL> from ladder . models import Season <EOL> from ladder . views import season as season_...
<s> from distutils . core import setup <EOL> setup ( name = '<STR_LIT>' , <EOL> maintainer = '<STR_LIT>' , <EOL> maintainer_email = '<STR_LIT>' , <EOL> version = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> packages = [ '<STR_LIT>' ] ) </s>
<s> from sys import version_info <EOL> if version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> : <EOL> from sys import maxint <EOL> else : <EOL> from sys import maxsize as maxint <EOL> from itertools import chain <EOL> from . iters import map , range <EOL> class Stream ( object ) : <EOL> __slots__ = ( "<STR_LIT>" , "<STR_LIT>" ...
<s> import numpy as np <EOL> import scipy . io as sio <EOL> import matplotlib . pyplot as plt <EOL> import ann <EOL> import data as files <EOL> matfn = u'<STR_LIT>' <EOL> data = sio . loadmat ( matfn ) <EOL> train_data = np . float64 ( data [ '<STR_LIT>' ] ) / <NUM_LIT:255> <EOL> train_result = np . float64 ( data [ '<...
<s> import os <EOL> import sys <EOL> from distutils . core import setup <EOL> try : <EOL> f = open ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) ) <EOL> description = f . read ( ) <EOL> f . close ( ) <EOL> except IOError : <EOL> description = '<STR_LIT>' <EOL> try : <EOL> license = open ( '<STR_...
<s> """<STR_LIT>""" <EOL> from functools import wraps <EOL> from google . appengine . api import users <EOL> from flask import redirect , request , abort <EOL> def login_required ( func ) : <EOL> """<STR_LIT>""" <EOL> @ wraps ( func ) <EOL> def decorated_view ( * args , ** kwargs ) : <EOL> if not users . get_current_us...
<s> from setuptools import setup , find_packages <EOL> version = "<STR_LIT>" <EOL> requires = [ <EOL> "<STR_LIT>" , <EOL> ] <EOL> with open ( "<STR_LIT>" ) as f : <EOL> readme = f . read ( ) <EOL> setup ( <EOL> name = "<STR_LIT>" , <EOL> version = version , <EOL> description = "<STR_LIT>" , <EOL> long_description = rea...
<s> class TreeNode : <EOL> def __init__ ( self , x ) : <EOL> self . val = x <EOL> self . left = None <EOL> self . right = None <EOL> class Solution : <EOL> def postorderTraversal ( self , root ) : <EOL> dummy = TreeNode ( <NUM_LIT:0> ) <EOL> dummy . left = root <EOL> result , cur = [ ] , dummy <EOL> while cur : <EOL> i...
<s> class TreeNode : <EOL> def __init__ ( self , x ) : <EOL> self . val = x <EOL> self . left = None <EOL> self . right = None <EOL> class ListNode : <EOL> def __init__ ( self , x ) : <EOL> self . val = x <EOL> self . next = None <EOL> class Solution : <EOL> head = None <EOL> def sortedListToBST ( self , head ) : <EOL>...
<s> class Solution : <EOL> def findMin ( self , num ) : <EOL> low , high = <NUM_LIT:0> , len ( num ) <EOL> while low < high - <NUM_LIT:1> and num [ low ] >= num [ high - <NUM_LIT:1> ] : <EOL> mid = low + ( high - low ) / <NUM_LIT:2> <EOL> if num [ mid ] > num [ low ] : <EOL> low = mid + <NUM_LIT:1> <EOL> elif num [ mid...
<s> class TrieNode : <EOL> def __init__ ( self ) : <EOL> self . is_string = False <EOL> self . leaves = { } <EOL> class Trie : <EOL> def __init__ ( self ) : <EOL> self . root = TrieNode ( ) <EOL> def insert ( self , word ) : <EOL> cur = self . root <EOL> for c in word : <EOL> if not c in cur . leaves : <EOL> cur . leav...
<s> class Solution ( object ) : <EOL> def lengthOfLongestSubstringKDistinct ( self , s , k ) : <EOL> """<STR_LIT>""" <EOL> longest , start , distinct_count , visited = <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , [ <NUM_LIT:0> for _ in xrange ( <NUM_LIT> ) ] <EOL> for i , char in enumerate ( s ) : <EOL> if visited [ ord (...
<s> class Solution ( object ) : <EOL> def findMinHeightTrees ( self , n , edges ) : <EOL> """<STR_LIT>""" <EOL> if n == <NUM_LIT:1> : <EOL> return [ <NUM_LIT:0> ] <EOL> neighbors = collections . defaultdict ( set ) <EOL> for u , v in edges : <EOL> neighbors [ u ] . add ( v ) <EOL> neighbors [ v ] . add ( u ) <EOL> pre_...
<s> class Solution ( object ) : <EOL> def generatePalindromes ( self , s ) : <EOL> """<STR_LIT>""" <EOL> cnt = collections . Counter ( s ) <EOL> mid = '<STR_LIT>' . join ( k for k , v in cnt . iteritems ( ) if v % <NUM_LIT:2> ) <EOL> chars = '<STR_LIT>' . join ( k * ( v / <NUM_LIT:2> ) for k , v in cnt . iteritems ( ) ...
<s> class TreeNode : <EOL> def __init__ ( self , x ) : <EOL> self . val = x <EOL> self . left = None <EOL> self . right = None <EOL> def __repr__ ( self ) : <EOL> if self : <EOL> serial = [ ] <EOL> queue = [ self ] <EOL> while queue : <EOL> cur = queue [ <NUM_LIT:0> ] <EOL> if cur : <EOL> serial . append ( cur . val ) ...
<s> class TreeNode : <EOL> def __init__ ( self , x ) : <EOL> self . val = x <EOL> self . left = None <EOL> self . right = None <EOL> class Solution : <EOL> def isSameTree ( self , p , q ) : <EOL> if p is None and q is None : <EOL> return True <EOL> if p is not None and q is not None : <EOL> return p . val == q . val an...
<s> class Solution ( object ) : <EOL> def myAtoi ( self , str ) : <EOL> """<STR_LIT>""" <EOL> INT_MAX = <NUM_LIT> <EOL> INT_MIN = - <NUM_LIT> <EOL> result = <NUM_LIT:0> <EOL> if not str : <EOL> return result <EOL> i = <NUM_LIT:0> <EOL> while i < len ( str ) and str [ i ] == "<STR_LIT:U+0020>" : <EOL> i += <NUM_LIT:1> <...
<s> class Solution : <EOL> def isAnagram ( self , s , t ) : <EOL> if len ( s ) != len ( t ) : <EOL> return False <EOL> count = { } <EOL> for c in s : <EOL> if c . lower ( ) in count : <EOL> count [ c . lower ( ) ] += <NUM_LIT:1> <EOL> else : <EOL> count [ c . lower ( ) ] = <NUM_LIT:1> <EOL> for c in t : <EOL> if c . lo...
<s> from django . contrib import admin <EOL> from django_bitcoin import models <EOL> class TransactionAdmin ( admin . ModelAdmin ) : <EOL> """<STR_LIT>""" <EOL> list_display = ( '<STR_LIT:address>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> readonly_fields = ( '<STR_LIT:address>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> class Bitc...
<s> import datetime <EOL> from south . db import db <EOL> from south . v2 import SchemaMigration <EOL> from django . db import models <EOL> class Migration ( SchemaMigration ) : <EOL> def forwards ( self , orm ) : <EOL> db . add_column ( '<STR_LIT>' , '<STR_LIT>' , <EOL> self . gf ( '<STR_LIT>' ) ( to = orm [ '<STR_LIT...
<s> from setuptools import setup <EOL> import os <EOL> import platform <EOL> import pdfparanoia <EOL> long_description = open ( os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" ) ) . read ( ) <EOL> if platform . python_version ( ) >= "<STR_LIT>" : <EOL> dependencies = [ "<STR_LIT>" ] <EOL> else : <EOL>...
<s> from __future__ import unicode_literals <EOL> from django . db import models , migrations <EOL> class Migration ( migrations . Migration ) : <EOL> def ensure_http_prefix_contact ( apps , schema_editor ) : <EOL> Contact = apps . get_model ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> for contact in Contact . objects . exclude...
<s> from django . conf . urls import patterns , include , url <EOL> from django . contrib import admin <EOL> admin . autodiscover ( ) <EOL> urlpatterns = patterns ( '<STR_LIT>' , <EOL> url ( r'<STR_LIT>' , '<STR_LIT>' , name = '<STR_LIT>' ) , <EOL> url ( r'<STR_LIT>' , include ( '<STR_LIT>' ) ) , <EOL> url ( r'<STR_LIT...
<s> from __future__ import division , absolute_import , print_function , unicode_literals <EOL> import os <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , '<STR_LIT:..>' ) <EOL> DEBUG = TEMPLATE_DEBUG = True <EOL> DATABASES = { <EOL> '<STR_LIT:default>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' ...
<s> import os <EOL> import sys <EOL> import logging <EOL> import traceback <EOL> from optparse import OptionParser <EOL> import shutil <EOL> from ksscommand import KssCommand , KssCommandException , KssCommandOptException <EOL> import __cmd__ <EOL> try : <EOL> import karesansui <EOL> from karesansui import __version__ ...
<s> import os <EOL> import sys <EOL> import logging <EOL> import fcntl <EOL> from optparse import OptionParser <EOL> from ksscommand import KssCommand , KssCommandException , KssCommandOptException <EOL> import __cmd__ <EOL> try : <EOL> import karesansui <EOL> from karesansui import __version__ <EOL> from karesansui . ...
<s> from karesansui . lib . const import MACHINE_ATTRIBUTE <EOL> from karesansui . db . model . machine import Machine <EOL> from karesansui . db . model . machine2jobgroup import Machine2Jobgroup <EOL> from sqlalchemy import or_ , and_ <EOL> def findbyall ( session , machine_name = None , created_start = None , <EOL> ...
<s> import re <EOL> import os <EOL> import pwd <EOL> import web <EOL> import karesansui <EOL> from karesansui . lib . rest import Rest , auth <EOL> from karesansui . lib . virt . virt import KaresansuiVirtException , KaresansuiVirtConnection <EOL> from karesansui . lib . merge import MergeGuest <EOL> from karesansui . ...
<s> """<STR_LIT>""" <EOL> import os <EOL> import web <EOL> import socket <EOL> from karesansui . lib . rest import Rest , auth <EOL> from karesansui . lib . log . config import LogViewConfigParam <EOL> from karesansui . lib . const import LOG_VIEW_XML_FILE , DEFAULT_LANGS <EOL> from karesansui . lib . utils import json...
<s> import os <EOL> import os . path <EOL> import imghdr <EOL> import web <EOL> import karesansui <EOL> from karesansui . lib . rest import Rest , auth <EOL> from karesansui . lib . checker import Checker , CHECK_EMPTY , CHECK_VALID , CHECK_LENGTH , CHECK_MIN , CHECK_MAX <EOL> from karesansui . lib . const import ICON_...
<s> import os <EOL> import re <EOL> import sys <EOL> from karesansui . lib . dict_op import DictOp <EOL> from karesansui . lib . parser . base . comment_deal_parser import commentDealParser as Parser <EOL> from karesansui . lib . utils import preprint_r <EOL> """<STR_LIT>""" <EOL> PARSER_HOSTS_CONF = "<STR_LIT>" <EOL> ...
<s> """<STR_LIT>""" <EOL> import sys <EOL> import os <EOL> import logging <EOL> import traceback <EOL> import signal <EOL> import Queue <EOL> from pysilhouette import PROCERROR , PROCSUCCESS <EOL> from pysilhouette . log import reload_conf <EOL> from pysilhouette . prep import readconf , getopts , chkopts , parse_conf ...
<s> from __future__ import absolute_import <EOL> from __future__ import unicode_literals <EOL> from pkg_resources import parse_version <EOL> import pickle <EOL> import os <EOL> import subprocess <EOL> import time <EOL> try : <EOL> import ujson as json <EOL> except : <EOL> import json <EOL> COMPATIBLE_DAT_VERSION = '<ST...
<s> """<STR_LIT>""" <EOL> from kameleon_mcmc . distribution . Distribution import Distribution <EOL> from kameleon_mcmc . distribution . Flower import Flower <EOL> from numpy import sqrt <EOL> class Ring ( Flower ) : <EOL> def __init__ ( self , variance = <NUM_LIT> , radius = <NUM_LIT> , dimension = <NUM_LIT:2> ) : <EO...
<s> """<STR_LIT>""" <EOL> from numpy . lib . twodim_base import eye <EOL> from numpy . ma . core import zeros <EOL> import os <EOL> import sys <EOL> from kameleon_mcmc . distribution . Banana import Banana <EOL> from kameleon_mcmc . experiments . SingleChainExperiment import SingleChainExperiment <EOL> from kameleon_mc...
<s> """<STR_LIT>""" <EOL> from kameleon_mcmc . gp . GPTools import GPTools <EOL> from kameleon_mcmc . gp . GaussianProcess import GaussianProcess <EOL> from kameleon_mcmc . gp . covariance . SquaredExponentialCovariance import SquaredExponentialCovariance <EOL> from kameleon_mcmc . gp . inference . LaplaceApproximation...
<s> from kameleon_mcmc . mcmc . samplers . KameleonWindow import KameleonWindow <EOL> from numpy . ma . core import sqrt , exp , log <EOL> class KameleonWindowLearnScale ( KameleonWindow ) : <EOL> def __init__ ( self , distribution , kernel , nu2 = <NUM_LIT:0.1> , gamma = None , sample_discard = <NUM_LIT> , num_samples...
<s> """<STR_LIT>""" <EOL> from numpy import zeros , ones , asarray , log , inf <EOL> import numpy <EOL> from numpy . linalg . linalg import norm <EOL> from numpy . random import rand , randint <EOL> import unittest <EOL> from kameleon_mcmc . distribution . Distribution import Sample <EOL> from kameleon_mcmc . distribut...
<s> '''<STR_LIT>''' <EOL> from nose . tools import assert_equals , assert_is_instance , assert_is_not_none , assert_list_equal <EOL> import numpy as np <EOL> import dataset_utils as du <EOL> class TestTrainValSplitFromNames : <EOL> def test_split_empty ( self ) : <EOL> train_idx , val_idx = du . get_train_val_split_fro...
<s> '''<STR_LIT>''' <EOL> import os <EOL> import numpy as np <EOL> CAFFE_ROOT = '<STR_LIT>' <EOL> if CAFFE_ROOT is not None : <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( CAFFE_ROOT , '<STR_LIT>' ) ) <EOL> import caffe <EOL> def make_fully_conv ( path_model_src , <EOL> path_weights_src ...
<s> from sklearn . base import BaseEstimator , TransformerMixin <EOL> from sklearn . utils import gen_batches <EOL> from scipy . linalg import eigh <EOL> from scipy . linalg import svd <EOL> import numpy as np <EOL> class EigZCA ( BaseEstimator , TransformerMixin ) : <EOL> def __init__ ( self , n_components = None , bi...
<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> from google . apputils import basetest <EOL> from google . protobuf import unittest_mset_pb2 <EOL> from google . protobuf import unittest_pb2 <EOL> from google . protobuf . internal import encoder <EOL> from google . protobuf . internal import missing_enum_values...
<s> import os <EOL> import sys <EOL> from optparse import OptionParser <EOL> parser = OptionParser ( ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" , <EOL> dest = "<STR_LIT>" , <EOL> default = "<STR_LIT>" , <EOL> help = """<STR_LIT>""" <EOL> ) <EOL> options , positional_args = parser...
<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import SCons . compat <EOL> import os <EOL> import signal <EOL> import SCons . Errors <EOL> explicit_stack_size = None <EOL> default_stack_size = <NUM_LIT> <EOL> interrupt_msg = '<STR_LIT>' <EOL> class InterruptState ( object ) : <EOL> def __init__ ( self ) : <...
<s> __revision__ = "<STR_LIT>" <EOL> import SCons . Node . FS <EOL> import SCons . Scanner <EOL> def only_dirs ( nodes ) : <EOL> is_Dir = lambda n : isinstance ( n . disambiguate ( ) , SCons . Node . FS . Dir ) <EOL> return list ( filter ( is_Dir , nodes ) ) <EOL> def DirScanner ( ** kw ) : <EOL> """<STR_LIT>""" <EOL> ...
<s> __revision__ = "<STR_LIT>" <EOL> __doc__ = """<STR_LIT>""" <EOL> import os <EOL> import SCons . Errors <EOL> import SCons . Util <EOL> from common import debug , get_output , is_win64 , normalize_env , parse_output , read_reg <EOL> import SCons . Tool . MSCommon . vc <EOL> class VisualStudio ( object ) : <EOL> """<...
<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import SCons . Defaults <EOL> import SCons . Scanner . Fortran <EOL> import SCons . Tool <EOL> import SCons . Util <EOL> from SCons . Tool . FortranCommon import add_all_to_env , add_f90_to_env <EOL> compilers = [ '<STR_LIT>' ] <EOL> def generate ( env ) : <EOL...
<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import os . path <EOL> import SCons . Action <EOL> import SCons . Builder <EOL> import SCons . Node . FS <EOL> import SCons . Tool . javac <EOL> import SCons . Util <EOL> def emit_java_headers ( target , source , env ) : <EOL> """<STR_LIT>""" <EOL> class_suffix...
<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> from SCons . Tool . packaging import stripinstallbuilder , putintopackageroot <EOL> def package ( env , target , source , PACKAGEROOT , ** kw ) : <EOL> bld = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> bld . set_suffix ( '<STR_LIT>' ) <EOL> target , source = puti...
<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> class _CmdRunner ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , command , commandstr = None ) : <EOL> self . out = None <EOL> self . err = None <EOL> self . status = None <EOL> self . command = command <EOL> self . commandstr = commandstr <EOL> ...
<s> """<STR_LIT>""" <EOL> from nuitka import Options <EOL> from nuitka . __past__ import iterItems <EOL> from nuitka . PythonVersions import python_version <EOL> from . import Contexts , Emission , Helpers <EOL> from . AttributeCodes import ( <EOL> generateAssignmentAttributeCode , <EOL> generateAttributeLookupCode , <...
<s> """<STR_LIT>""" <EOL> from nuitka . ModuleRegistry import getUncompiledNonTechnicalModules <EOL> from . import ConstantCodes <EOL> from . Indentation import indented <EOL> from . templates . CodeTemplatesLoader import ( <EOL> template_metapath_loader_body , <EOL> template_metapath_loader_bytecode_module_entry , <EO...
<s> """<STR_LIT>""" <EOL> template_metapath_loader_compiled_module_entry = """<STR_LIT>""" <EOL> template_metapath_loader_compiled_package_entry = """<STR_LIT>""" <EOL> template_metapath_loader_shlib_module_entry = """<STR_LIT>""" <EOL> template_metapath_loader_bytecode_module_entry = """<STR_LIT>""" <EOL> template_met...
<s> """<STR_LIT>""" <EOL> from nuitka . Builtins import calledWithBuiltinArgumentNamesDecorator <EOL> from nuitka . optimizations import BuiltinOptimization <EOL> from . NodeBases import ( <EOL> ExpressionBuiltinSingleArgBase , <EOL> ExpressionChildrenHavingBase , <EOL> StatementChildrenHavingBase <EOL> ) <EOL> class E...
<s> """<STR_LIT>""" <EOL> from nuitka import Options , Tracing , TreeXML , Variables <EOL> from nuitka . __past__ import iterItems <EOL> from nuitka . Constants import isCompileTimeConstantValue <EOL> from nuitka . containers . odict import OrderedDict <EOL> from nuitka . PythonVersions import python_version <EOL> from...
<s> """<STR_LIT>""" <EOL> import shutil <EOL> from nuitka . plugins . PluginBase import NuitkaPluginBase <EOL> from nuitka . PythonVersions import python_version <EOL> from nuitka . utils . SharedLibraries import locateDLL <EOL> from nuitka . utils . Utils import basename , getOS , joinpath <EOL> class NuitkaPluginPopu...
<s> """<STR_LIT>""" <EOL> from nuitka import Options <EOL> from nuitka . nodes . AssignNodes import ( <EOL> ExpressionTargetTempVariableRef , <EOL> ExpressionTempVariableRef , <EOL> StatementAssignmentVariable , <EOL> StatementReleaseVariable <EOL> ) <EOL> from nuitka . nodes . BuiltinRefNodes import ExpressionBuiltinE...
<s> x = ( { <NUM_LIT:1> , } ) <EOL> print x </s>
<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import os , sys <EOL> print ( "<STR_LIT>" , __doc__ ) <EOL> print ( "<STR_LIT>" , os . path . basename ( __file__ ) ) <EOL> print ( "<STR_LIT>" , __builtins__ ) <EOL> print ( "<STR_LIT>" , __debug__ ) <EOL> print ( "<STR_LIT>" , __builtins__ . __debu...
<s> from __future__ import print_function <EOL> import os , sys , subprocess , tempfile , shutil <EOL> nuitka1 = sys . argv [ <NUM_LIT:1> ] <EOL> nuitka2 = sys . argv [ <NUM_LIT:2> ] <EOL> search_mode = len ( sys . argv ) > <NUM_LIT:3> and sys . argv [ <NUM_LIT:3> ] == "<STR_LIT>" <EOL> start_at = sys . argv [ <NUM_LIT...
<s> module_value1 = <NUM_LIT:5> <EOL> module_value2 = <NUM_LIT:3> <EOL> class C : <EOL> def __init__ ( self ) : <EOL> self . s = '<STR_LIT:2>' * <NUM_LIT> <EOL> def increment ( self ) : <EOL> additiv = '<STR_LIT:*>' * <NUM_LIT:1000> <EOL> self . s += additiv <EOL> return additiv <EOL> def calledRepeatedly ( ) : <EOL> m...
<s> def someFunction ( rounds ) : <EOL> class c : <EOL> pass <EOL> for i in xrange ( rounds ) : <EOL> c . a = <NUM_LIT:2> <EOL> c . b = <NUM_LIT:3> <EOL> c . c = <NUM_LIT:4> <EOL> x = c . a <EOL> x = c . b <EOL> x = c . c <EOL> c . a = <NUM_LIT:2> <EOL> c . b = <NUM_LIT:3> <EOL> c . c = <NUM_LIT:4> <EOL> x = c . a <EOL...
<s> trials = [ <NUM_LIT:1> ] * <NUM_LIT> <EOL> def read_local ( trials = trials ) : <EOL> v_local = <NUM_LIT:1> <EOL> for t in trials : <EOL> v_local ; v_local ; v_local ; v_local ; v_local <EOL> v_local ; v_local ; v_local ; v_local ; v_local <EOL> v_local ; v_local ; v_local ; v_local ; v_local <EOL> v_local ; v_loca...
<s> print ( "<STR_LIT>" ) </s>
<s> print ( "<STR_LIT>" , __name__ ) </s>
<s> def g ( ) : <EOL> for a in range ( <NUM_LIT:3> ) : <EOL> yield a <EOL> return <NUM_LIT:7> <EOL> print ( "<STR_LIT>" , list ( g ( ) ) ) </s>
<s> import numpy as np <EOL> import operator <EOL> from sklearn . metrics import roc_auc_score <EOL> from sklearn . cross_validation import StratifiedKFold <EOL> from sklearn . preprocessing import MinMaxScaler <EOL> from sklearn . externals import joblib <EOL> """<STR_LIT>""" <EOL> def ranking ( score ) : <EOL> """<ST...
<s> """<STR_LIT>""" <EOL> import copy <EOL> import itertools <EOL> import socket <EOL> import struct <EOL> import array <EOL> class Error ( Exception ) : <EOL> pass <EOL> class UnpackError ( Error ) : <EOL> pass <EOL> class NeedData ( UnpackError ) : <EOL> pass <EOL> class PackError ( Error ) : <EOL> pass <EOL> class _...
<s> """<STR_LIT>""" <EOL> import dpkt <EOL> import ppp <EOL> from decorators import deprecated <EOL> PPPoE_PADI = <NUM_LIT> <EOL> PPPoE_PADO = <NUM_LIT> <EOL> PPPoE_PADR = <NUM_LIT> <EOL> PPPoE_PADS = <NUM_LIT> <EOL> PPPoE_PADT = <NUM_LIT> <EOL> PPPoE_SESSION = <NUM_LIT> <EOL> class PPPoE ( dpkt . Packet ) : <EOL> __hd...
<s> import random , socket <EOL> import dpkt <EOL> import ping <EOL> class DNSPing ( ping . Ping ) : <EOL> def __init__ ( self ) : <EOL> ping . Ping . __init__ ( self ) <EOL> self . op . add_option ( '<STR_LIT>' , dest = '<STR_LIT>' , type = '<STR_LIT:string>' , <EOL> default = socket . gethostname ( ) . split ( '<STR_...
<s> """<STR_LIT>""" <EOL> from pycopia . QA import core <EOL> from pycopia import proctools <EOL> class TestCondition ( object ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def __init__ ( self , cmdline = None , environ = No...
<s> """<STR_LIT>""" <EOL> import ezmail <EOL> KEYWORDS = { <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT:version>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT...
<s> """<STR_LIT>""" <EOL> import operator <EOL> class UserLong ( object ) : <EOL> def __init__ ( self , data = <NUM_LIT:0> L ) : <EOL> self . data = long ( data ) <EOL> def __cmp__ ( self , other ) : <EOL> if isinstance ( other , UserLong ) : <EOL> return cmp ( self . data , other . data ) <EOL> elif isinstance ( other...
<s> """<STR_LIT>""" <EOL> import sys <EOL> from pycopia . mibs import SNMPv2_MIB <EOL> from pycopia . SNMP import Manager <EOL> MIBNAMES = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ,...
<s> """<STR_LIT>""" <EOL> import itertools <EOL> import pycurl <EOL> from pycopia import aid <EOL> from pycopia import urlparse <EOL> from pycopia . WWW import useragents <EOL> from pycopia . inet import httputils <EOL> DEFAULT_UA = "<STR_LIT>" <EOL> DEFAULT_LANGUAGE = "<STR_LIT>" <EOL> DEFAULT_ENCODING = "<STR_LIT:utf...
<s> import sys , os <EOL> from glob import glob <EOL> from setuptools import setup , find_packages <EOL> NAME = "<STR_LIT>" <EOL> VERSION = "<STR_LIT:1.0>" <EOL> import platutils <EOL> platinfo = platutils . get_platform ( ) <EOL> if platinfo . is_linux ( ) : <EOL> WEBSITE = os . environ . get ( "<STR_LIT>" , "<STR_LIT...
<s> import pycopia . XML . POM <EOL> attribUnique_3882054017216351376 = pycopia . XML . POM . XMLAttribute ( u'<STR_LIT>' , pycopia . XML . POM . Enumeration ( ( u'<STR_LIT:true>' , u'<STR_LIT:false>' ) ) , <NUM_LIT> , u'<STR_LIT:true>' ) <EOL> attribSrc_3443572122774772041 = pycopia . XML . POM . XMLAttribute ( u'<STR...
<s> """<STR_LIT>""" <EOL> import sys <EOL> import re <EOL> uses_relative = [ '<STR_LIT>' , '<STR_LIT:http>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT:file>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> uses_netloc = [ '<S...