code
stringlengths
9
256k
<s> import unittest <EOL> from xml . etree import ElementTree <EOL> from recurlytests import xml <EOL> class TestRecurly ( unittest . TestCase ) : <EOL> def test_hello ( self ) : <EOL> import recurly <EOL> def test_xml ( self ) : <EOL> import recurly <EOL> account = recurly . Account ( ) <EOL> account . username = '<ST...
<s> import sys <EOL> import argparse <EOL> import itertools <EOL> import collections <EOL> import push . hosts <EOL> import push . utils <EOL> __all__ = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> class MutatingAction ( argparse . Action ) : <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> self . type_to_mutate = kwarg...
<s> from health_messages import Health_Message as HM <EOL> import health_protocol as HP <EOL> import health_libs as HL <EOL> import logging <EOL> class Health_Bench ( ) : <EOL> logger = logging . getLogger ( __name__ ) <EOL> message = HM ( ) <EOL> socket = <NUM_LIT:0> <EOL> def initialize ( self ) : <EOL> return <EOL> ...
<s> '''<STR_LIT:U+0020>''' <EOL> from __future__ import print_function <EOL> import os <EOL> import copy <EOL> import pprint <EOL> import subprocess <EOL> import sys <EOL> _DEBUG = os . getenv ( '<STR_LIT>' , None ) is not None <EOL> ARGS_OPTS = [ '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<ST...
<s> try : <EOL> from setuptools import setup , find_packages <EOL> except ImportError : <EOL> from ez_setup import use_setuptools <EOL> use_setuptools ( ) <EOL> from setuptools import setup , find_packages <EOL> try : <EOL> import multiprocessing <EOL> except : <EOL> pass <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> ...
<s> import logging <EOL> import zope <EOL> from imgfac . OSDelegate import OSDelegate <EOL> from imgfac . BaseImage import BaseImage <EOL> from imgfac . TargetImage import TargetImage <EOL> class MockOS ( object ) : <EOL> zope . interface . implements ( OSDelegate ) <EOL> def __init__ ( self ) : <EOL> self . log = logg...
<s> from zope . interface import Interface <EOL> class CloudDelegate ( Interface ) : <EOL> """<STR_LIT>""" <EOL> def push_image_to_provider ( self , builder , provider , credentials , target , target_image , parameters ) : <EOL> """<STR_LIT>""" <EOL> def snapshot_image_on_provider ( self , builder , provider , credenti...
<s> def prop ( attr , doc = None , ro = None ) : <EOL> def fget ( self ) : <EOL> return getattr ( self , attr ) <EOL> def fset ( self , value ) : <EOL> setattr ( self , attr , value ) <EOL> def fdel ( self ) : <EOL> delattr ( self , attr ) <EOL> return property ( fget , fset if not ro else None , fdel if not ro else No...
<s> import os <EOL> from os import path <EOL> import sys <EOL> import time <EOL> import traceback <EOL> import urllib <EOL> import urllib2 <EOL> import urlparse <EOL> from combine import Package , File , log <EOL> class URI : <EOL> def __init__ ( self , uri , package = None , format = None , target = None ) : <EOL> sel...
<s> from datetime import datetime , timedelta <EOL> from urllib import urlencode , quote_plus <EOL> import django . core . mail <EOL> from django . conf import settings <EOL> from django . contrib . auth import REDIRECT_FIELD_NAME <EOL> from django . contrib . auth . models import User <EOL> from django . contrib . sit...
<s> """<STR_LIT>""" <EOL> import unittest <EOL> import yaml <EOL> from chassis . services import cache <EOL> def get_config_yaml ( ) : <EOL> """<STR_LIT>""" <EOL> config_file = open ( '<STR_LIT>' , '<STR_LIT:r>' ) <EOL> return yaml . load ( config_file ) or { } <EOL> class CacheTest ( unittest . TestCase ) : <EOL> """<...
<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>' , self . gf ( '<STR_LIT>' ) ( default = <NUM_LIT:1> ) , ...
<s> from flask import render_template , request <EOL> from buchner . helpers import json_requested , jsonify <EOL> def register_error_handlers ( app ) : <EOL> """<STR_LIT>""" <EOL> app . register_error_handler ( <NUM_LIT> , not_found ) <EOL> app . register_error_handler ( <NUM_LIT> , internal_server_error ) <EOL> def j...
<s> import re <EOL> from flask import _request_ctx_stack as stack <EOL> class Mobility ( object ) : <EOL> def __init__ ( self , app = None ) : <EOL> if app is not None : <EOL> self . init_app ( app ) <EOL> else : <EOL> self . app = None <EOL> def init_app ( self , app ) : <EOL> self . app = app <EOL> app . config . set...
<s> import os <EOL> import sys <EOL> sys . path . append ( os . path . abspath ( os . path . join ( __file__ , '<STR_LIT>' ) ) ) <EOL> from ovsdb_client import OVSDBClient <EOL> stamps = [ <EOL> { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT:url>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' <EOL> ...
<s> import sys <EOL> from hashlib import md5 <EOL> from datetime import datetime <EOL> import pyme . core , pyme . constants . sig <EOL> import yaml <EOL> class CryptUtilException ( Exception ) : <EOL> pass <EOL> def getPassphrase ( hint , desc , prev_bad ) : <EOL> print "<STR_LIT>" % ( hint , desc , prev_bad ) <EOL> s...
<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> __email__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' </s>
<s> from __future__ import unicode_literals <EOL> import itertools as it , operator as op , functools as ft <EOL> from datetime import datetime <EOL> from os . path import exists , join <EOL> import calendar <EOL> from django . conf import settings <EOL> from django . conf . urls import include , url <EOL> from django ...
<s> from http_api . view import CView <EOL> NOT_NULL = True <EOL> ALLOW_NULL = False <EOL> class Plugin ( object ) : <EOL> """<STR_LIT>""" <EOL> codes = { } <EOL> parameters = ( ) <EOL> def __init__ ( self , params ) : <EOL> """<STR_LIT>""" <EOL> def init_view ( self , view_class , method ) : <EOL> """<STR_LIT>""" <EOL...
<s> import unittest <EOL> import arff <EOL> try : <EOL> from StringIO import StringIO <EOL> except ImportError : <EOL> from io import StringIO <EOL> OBJ = { <EOL> '<STR_LIT:description>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> import platform <EOL> import ctypes <EOL> from ctypes . wintypes import HANDLE , LPVOID , LONG , LPARAM , WPARAM , UINT <EOL> CallWindowProc = ctypes . windll . user32 . CallWindowProcW <EOL> if platform ....
<s> import sys <EOL> import os <EOL> import numpy as np <EOL> import calculate_wups <EOL> import nn <EOL> def decodeQuestion ( <EOL> modelInput , <EOL> questionIdict ) : <EOL> sentence = '<STR_LIT>' <EOL> for t in range ( <NUM_LIT:1> , modelInput . shape [ <NUM_LIT:0> ] ) : <EOL> if modelInput [ t , <NUM_LIT:0> ] == <N...
<s> from stage import * <EOL> class Normalize ( Stage ) : <EOL> def __init__ ( self , <EOL> outputDim , <EOL> mean , <EOL> std , <EOL> name = None , <EOL> inputNames = None , <EOL> outputdEdX = True ) : <EOL> Stage . __init__ ( self , <EOL> name = name , <EOL> inputNames = inputNames , <EOL> outputDim = outputDim , <EO...
<s> """<STR_LIT>""" <EOL> import os <EOL> os . environ . setdefault ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> from django . core . wsgi import get_wsgi_application <EOL> application = get_wsgi_application ( ) </s>
<s> from __future__ import absolute_import , unicode_literals <EOL> from config . template_middleware import TemplateResponse <EOL> from gaecookie . decorator import no_csrf <EOL> from gaepermission . decorator import login_not_required <EOL> @ login_not_required <EOL> @ no_csrf <EOL> def index ( ) : <EOL> return Templ...
<s> from __future__ import absolute_import , unicode_literals <EOL> from base import GAETestCase <EOL> from gaepermission import facade <EOL> from routes . permission import home , admin <EOL> class HomeTests ( GAETestCase ) : <EOL> def test_render ( self ) : <EOL> response = home . index ( ) <EOL> self . assert_can_re...
<s> import sys , os <EOL> parent = os . path . dirname ( os . path . dirname ( __file__ ) ) <EOL> sys . path . append ( os . path . abspath ( parent ) ) <EOL> wd = os . getcwd ( ) <EOL> os . chdir ( parent ) <EOL> os . system ( '<STR_LIT>' % sys . executable ) <EOL> os . chdir ( wd ) <EOL> for item in os . listdir ( pa...
<s> import unittest <EOL> class Test_get_api ( unittest . TestCase ) : <EOL> def _callFUT ( self , environ ) : <EOL> from repoze . who . api import get_api <EOL> return get_api ( environ ) <EOL> def test___call___empty_environ ( self ) : <EOL> environ = { } <EOL> api = self . _callFUT ( environ ) <EOL> self . assertTru...
<s> from prob18 import raw_xor <EOL> from prob1 import hexToRaw , rawToHex <EOL> from prob28 import sha1_from_github <EOL> import threading <EOL> import webserver <EOL> import time <EOL> import socket <EOL> import os <EOL> from prob17 import setByte <EOL> '''<STR_LIT>''' <EOL> BLOCKSIZE = <NUM_LIT:64> ; <EOL> DELAY = <...
<s> """<STR_LIT>""" <EOL> import collections <EOL> try : <EOL> from urllib . request import URLopener <EOL> except ImportError : <EOL> from urllib import URLopener <EOL> from . list_base_with_index import ListBaseWithIndex <EOL> from . resource import Resource , ChangeTypeError <EOL> from . sitemap import Sitemap <EOL>...
<s> import sys <EOL> import unittest <EOL> try : <EOL> import BytesIO as io <EOL> except ImportError : <EOL> import io <EOL> sys . path . insert ( <NUM_LIT:0> , '<STR_LIT:.>' ) <EOL> from resync . resource import Resource <EOL> from resync . resource_list import ResourceList <EOL> from resync . capability_list import C...
<s> """<STR_LIT>""" <EOL> import logging <EOL> class LoggingMixin : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , pub_handler , log_level ) : <EOL> """<STR_LIT>""" <EOL> self . _logger = logging . getLogger ( ) <EOL> self . _logger . addHandler ( pub_handler ) <EOL> self . _logger . setLevel ( log_level ) </s>
<s> """<STR_LIT>""" <EOL> from spyder . core . sink import AbstractCrawlUriSink <EOL> class MySink ( AbstractCrawlUriSink ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , settings ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_successful_crawl ( self , curi ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def pr...
<s> import unittest <EOL> import time <EOL> from spyder . core . sqlitequeues import SQLiteSingleHostUriQueue , UriNotFound <EOL> class SqliteQueuesTest ( unittest . TestCase ) : <EOL> def test_adding_works ( self ) : <EOL> uri = ( "<STR_LIT>" , "<STR_LIT>" , int ( time . time ( ) * <NUM_LIT:1000> ) , <EOL> int ( time ...
<s> import threading <EOL> import telnetlib <EOL> from routersploit import ( <EOL> exploits , <EOL> wordlists , <EOL> print_status , <EOL> print_error , <EOL> LockedIterator , <EOL> print_success , <EOL> print_table , <EOL> boolify , <EOL> multi , <EOL> ) <EOL> class Exploit ( exploits . Exploit ) : <EOL> """<STR_LIT>"...
<s> import re <EOL> from routersploit import ( <EOL> exploits , <EOL> print_success , <EOL> print_status , <EOL> print_error , <EOL> random_text , <EOL> sanitize_url , <EOL> http_request , <EOL> mute , <EOL> ) <EOL> class Exploit ( exploits . Exploit ) : <EOL> """<STR_LIT>""" <EOL> __info__ = { <EOL> '<STR_LIT:name>' :...
<s> import logging <EOL> from celery import Celery <EOL> from django . conf import settings <EOL> from django . contrib . auth import login <EOL> from django . contrib . auth . models import User <EOL> from django . contrib . sites . models import Site <EOL> from django . core . exceptions import ObjectDoesNotExist <EO...
<s> class Transport ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , url , * args , ** kwargs ) : <EOL> self . url = url <EOL> def get_root ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def get_path ( self , path , * args , ** kwargs ) : <EOL> """<STR_LIT>""" ...
<s> from __future__ import print_function , unicode_literals <EOL> import logging <EOL> from rbtools . commands import Command <EOL> class Logout ( Command ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> author = '<STR_LIT>' <EOL> option_list = [ <EOL> Command . server_options , <EOL> ] <EOL> def main ( self )...
<s> import sys <EOL> try : <EOL> from setuptools import setup , find_packages <EOL> except ImportError : <EOL> from ez_setup import use_setuptools <EOL> use_setuptools ( ) <EOL> from setuptools import setup , find_packages <EOL> from rbtools import get_package_version , is_release , VERSION <EOL> PACKAGE_NAME = '<STR_L...
<s> import os <EOL> import sys <EOL> from datetime import datetime <EOL> sys . path . append ( os . path . abspath ( '<STR_LIT>' ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( os . path . join ( __file__ , '<STR_LIT:..>' , '<STR_LIT:..>' , '<STR_LIT:..>' ) ) ) <EOL> sys . path . insert ( <NUM_LIT:0...
<s> from __future__ import unicode_literals <EOL> import logging <EOL> from django . db . models import Manager <EOL> from django . utils import six <EOL> from djblets . db . managers import ConcurrencyManager <EOL> from reviewboard . accounts . trophies import get_registered_trophy_types <EOL> class ProfileManager ( M...
<s> from __future__ import unicode_literals <EOL> import os <EOL> import shutil <EOL> import tempfile <EOL> from django . conf import settings <EOL> from django . forms import ValidationError <EOL> from djblets . siteconfig . models import SiteConfiguration <EOL> from reviewboard . admin import checks <EOL> from review...
<s> from __future__ import unicode_literals <EOL> from django_evolution . mutations import AddField <EOL> from django . db import models <EOL> MUTATIONS = [ <EOL> AddField ( '<STR_LIT>' , '<STR_LIT>' , models . BooleanField , <EOL> initial = False ) <EOL> ] </s>
<s> from __future__ import unicode_literals <EOL> from django_evolution . mutations import ChangeField <EOL> MUTATIONS = [ <EOL> ChangeField ( '<STR_LIT>' , '<STR_LIT>' , initial = None , max_length = <NUM_LIT> ) , <EOL> ChangeField ( '<STR_LIT>' , '<STR_LIT>' , initial = None , max_length = <NUM_LIT> ) <EOL> ] </s>
<s> from __future__ import unicode_literals <EOL> from optparse import make_option <EOL> from django . core . management . base import BaseCommand <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from djblets . extensions . models import RegisteredExtension <EOL> class Command ( BaseCommand ) : <...
<s> from __future__ import unicode_literals , absolute_import <EOL> import logging <EOL> from django import forms <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> try : <EOL> from jira . client import JIRA as JIRAClient <EOL> from jira . exceptions import JIRAError <EOL> has_jira = True <EOL> exc...
<s> from __future__ import unicode_literals <EOL> from reviewboard . hostingsvcs . tests . testcases import ServiceTests <EOL> class TracTests ( ServiceTests ) : <EOL> """<STR_LIT>""" <EOL> service_name = '<STR_LIT>' <EOL> fixtures = [ '<STR_LIT>' ] <EOL> def test_service_support ( self ) : <EOL> """<STR_LIT>""" <EOL> ...
<s> from __future__ import unicode_literals <EOL> from django_evolution . mutations import AddField <EOL> from django . db import models <EOL> MUTATIONS = [ <EOL> AddField ( '<STR_LIT>' , '<STR_LIT>' , models . BooleanField , initial = False ) <EOL> ] </s>
<s> from __future__ import unicode_literals <EOL> from django . core . exceptions import ObjectDoesNotExist <EOL> from django . db import models <EOL> from django . db . models import Q <EOL> from django . utils import timezone <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> from django . ...
<s> from __future__ import unicode_literals <EOL> import calendar <EOL> from datetime import datetime , timedelta <EOL> import re <EOL> import time <EOL> try : <EOL> from bzrlib import bzrdir , revisionspec <EOL> from bzrlib . errors import BzrError , NotBranchError <EOL> from bzrlib . transport import register_lazy_tr...
<s> from __future__ import unicode_literals <EOL> import os <EOL> import subprocess <EOL> from django . utils import six <EOL> from djblets . util . filesystem import is_exe_in_path <EOL> from reviewboard . diffviewer . parser import DiffParser <EOL> from reviewboard . scmtools . core import SCMTool <EOL> from reviewbo...
<s> from __future__ import unicode_literals <EOL> import logging <EOL> from django . conf import settings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from paramiko . hostkeys import HostKeyEntry <EOL> import paramiko <EOL> from reviewboard . ssh . errors import UnsupportedSSHKeyError <EOL> c...
<s> from __future__ import unicode_literals <EOL> from django . db . models import Q <EOL> from django . template . defaultfilters import timesince <EOL> from django . utils import six <EOL> from djblets . util . decorators import augment_method_from <EOL> from reviewboard . reviews . models import FileAttachmentCommen...
<s> from __future__ import unicode_literals <EOL> from django . core . exceptions import ObjectDoesNotExist <EOL> from djblets . webapi . errors import DOES_NOT_EXIST <EOL> from reviewboard . webapi . resources import resources <EOL> from reviewboard . webapi . resources . base_patched_file import BasePatchedFileResour...
<s> from __future__ import unicode_literals <EOL> from djblets . webapi . decorators import webapi_response_errors <EOL> from djblets . webapi . errors import NOT_LOGGED_IN , PERMISSION_DENIED <EOL> from reviewboard . webapi . base import WebAPIResource <EOL> from reviewboard . webapi . decorators import ( webapi_check...
<s> from __future__ import unicode_literals <EOL> from django . utils import six <EOL> from reviewboard . webapi . resources import resources <EOL> from reviewboard . webapi . tests . base import BaseWebAPITestCase <EOL> from reviewboard . webapi . tests . mimetypes import file_attachment_comment_list_mimetype <EOL> fr...
<s> from __future__ import unicode_literals <EOL> from django . utils import six <EOL> from reviewboard . webapi . resources import resources <EOL> from reviewboard . webapi . tests . base import BaseWebAPITestCase <EOL> from reviewboard . webapi . tests . mimetypes import screenshot_comment_list_mimetype <EOL> from re...
<s> try : <EOL> from django . conf . urls import url , patterns <EOL> except ImportError : <EOL> from django . conf . urls . defaults import url , patterns <EOL> from friendship . views import view_friends , friendship_add_friend , friendship_accept , friendship_reject , friendship_cancel , friendship_request_list , fr...
<s> from django . core . exceptions import ValidationError <EOL> from django . test import TestCase <EOL> from tos . compat import get_runtime_user_model <EOL> from tos . models import ( <EOL> NoActiveTermsOfService , <EOL> TermsOfService , <EOL> UserAgreement , <EOL> has_user_agreed_latest_tos , <EOL> ) <EOL> class Te...
<s> """<STR_LIT>""" <EOL> __ver_major__ = <NUM_LIT:0> <EOL> __ver_minor__ = <NUM_LIT:5> <EOL> __ver_patch__ = <NUM_LIT:1> <EOL> __ver_sub__ = "<STR_LIT>" <EOL> __version__ = "<STR_LIT>" % ( __ver_major__ , __ver_minor__ , __ver_patch__ , __ver_sub__ ) <EOL> import sys <EOL> import re <EOL> import copy <EOL> from xml . ...
<s> REDIS_HOST = '<STR_LIT:127.0.0.1>' <EOL> REDIS_PORT = <NUM_LIT> <EOL> RPC_HOST = '<STR_LIT:127.0.0.1>' <EOL> RPC_PORT = <NUM_LIT> <EOL> SAFE_UA_MODE = True <EOL> UA_ALLOW = [ '<STR_LIT>' ] <EOL> SAFE_TOKEN_MODE = False <EOL> TOKEN_ALLOW = [ '<STR_LIT>' ] <EOL> REMOTE_IP_MODE = False <EOL> REMOTE_ALLOW = [ '<STR_LIT...
<s> import sys <EOL> import traceback <EOL> from . import bootstrap , Client <EOL> from . compat import unittest <EOL> class RemoteTestCase ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> config = None <EOL> reload_test = True <EOL> reload_modules = [ ] <EOL> cache_client = True <EOL> start_proc = True <EOL> _cac...
<s> import mock <EOL> import traceback <EOL> from . import BaseTests <EOL> from goless import backends <EOL> test_backends = dict ( <EOL> stackless = lambda : '<STR_LIT>' , <EOL> gevent = lambda : '<STR_LIT>' , <EOL> ) <EOL> class CalcBackendTests ( BaseTests ) : <EOL> def calc ( self , name , testbackends = test_backe...
<s> """<STR_LIT>""" <EOL> def interactive ( ) : <EOL> """<STR_LIT>""" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> import sys <EOL> def excepthook ( etype , evalue , tb ) : <EOL> print '<STR_LIT>' <EOL> sys . excepthook = excepthook <EOL> <NUM_LIT:1> + '<STR_LIT:1>' </s>
<s> """<STR_LIT>""" <EOL> from client_2 import start_process , create_client , sendrecv , SETCMD <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> SETCMD ( '<STR_LIT>' ) <EOL> proc = start_process ( ) <EOL> sock = create_client ( ) <EOL> goteval = sendrecv ( sock , ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> print '<STR_LIT>...
<s> from maya import OpenMayaRender <EOL> renderer = OpenMayaRender . MHardwareRenderer <EOL> glFT = renderer . theRenderer ( ) . glFunctionTable ( ) <EOL> class Shape ( object ) : <EOL> def coords ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ ] <EOL> def draw ( self , m3dview ) : <EOL> m3dview . beginGL ( ) <EOL> fo...
<s> """<STR_LIT>""" <EOL> __title__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> __author__ = '<STR_LIT>' <EOL> __author_email__ = '<STR_LIT>' <EOL> __license__ = '<STR_LIT>' <EOL> __copyright__ = '<STR_LIT>' <EOL> __description__ = '<STR_LIT>' <EOL> __url__ = '<STR_LIT>' <EOL> import logging <EOL> import os <EO...
<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import pandas as pd <EOL> from sklearn . preprocessing import LabelEncoder <EOL> import argparse <EOL> from update_checker import update_check <EOL> from . _version import __version__ <EOL> update_checked = False <EOL> def autoclean ( input_dataframe...
<s> import os <EOL> import re <EOL> from distribute_setup import use_setuptools ; use_setuptools ( ) <EOL> from setuptools import setup <EOL> rel_file = lambda * args : os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , * args ) <EOL> def read_from ( filename ) : <EOL> fp = open ( filename ) ...
<s> """<STR_LIT>""" <EOL> from . . convention import satoshi_to_mbtc <EOL> from . . serialize . bitcoin_streamer import parse_struct , stream_struct <EOL> from . pay_to import script_obj_from_address , script_obj_from_script <EOL> from . script import tools <EOL> from . . networks import DEFAULT_NETCODES <EOL> class Tx...
<s> import unittest <EOL> import doctest <EOL> import pycoin . tx . script . microcode <EOL> def load_tests ( loader , tests , ignore ) : <EOL> tests . addTests ( doctest . DocTestSuite ( pycoin . tx . script . microcode ) ) <EOL> return tests </s>
<s> import os <EOL> from collections import namedtuple <EOL> import groundstation . objects . object_factory as object_factory <EOL> from groundstation . objects . update_object import UpdateObject <EOL> from groundstation . objects . root_object import RootObject <EOL> import logger <EOL> log = logger . getLogger ( __...
<s> import os <EOL> import time <EOL> import hashlib <EOL> import logger <EOL> log = logger . getLogger ( __name__ ) <EOL> from packed_keys import PackedKeys , NoKeysRef <EOL> from gizmo_factory import GizmoFactory , InvalidGizmoError <EOL> from request_registry import RequestRegistry <EOL> from groundstation . gref im...
<s> from support . handler_fixture import StationHandlerTestCase <EOL> from groundstation . proto . channel_list_pb2 import ChannelList <EOL> from groundstation . transfer . response_handlers import handle_describechannels <EOL> from groundstation . gref import Gref , Tip <EOL> from groundstation . objects . root_objec...
<s> import time <EOL> from support . station_fixture import StationTestCase <EOL> from groundstation . deferred import Deferred , defer_until <EOL> class TestStationDeferreds ( StationTestCase ) : <EOL> def test_ready_deferred ( self ) : <EOL> now = time . time ( ) <EOL> deferred = Deferred ( now - <NUM_LIT:10> , None ...
<s> from suplemon import helpers <EOL> from suplemon . linelight . color_map import color_map <EOL> class Syntax : <EOL> def get_comment ( self ) : <EOL> return ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def get_color ( self , raw_line ) : <EOL> color = color_map [ "<STR_LIT>" ] <EOL> line = raw_line . strip ( ) <EOL> keyword...
<s> """<STR_LIT>""" <EOL> import os <EOL> import logging <EOL> try : <EOL> import xml . etree . cElementTree as ET <EOL> except : <EOL> import xml . etree . ElementTree as ET <EOL> scope_to_pair = { <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT:string>" : <NUM_LIT> , <EOL> "<STR_LIT>" ...
<s> import asyncore <EOL> import random <EOL> import socket <EOL> import sys <EOL> import time <EOL> from . import connection <EOL> from . . import coins , protocol , util <EOL> from . . util . bootstrap import DNSSeeder <EOL> __all__ = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> ] <EOL> PUBLI...
<s> import hashlib <EOL> import hmac <EOL> import math <EOL> import os <EOL> import struct <EOL> from . hash import hash <EOL> from . import aesctr <EOL> MODE_READ = '<STR_LIT:r>' <EOL> MODE_WRITE = '<STR_LIT:w>' <EOL> BLOCK_SIZE = <NUM_LIT> <EOL> class InvalidScryptFileFormat ( Exception ) : pass <EOL> class ScryptFil...
<s> """<STR_LIT>""" <EOL> import cgi <EOL> import math <EOL> from google . appengine . api import memcache <EOL> from google . appengine . api import users <EOL> import django . template <EOL> import django . utils . safestring <EOL> from django . core . urlresolvers import reverse <EOL> from codereview import auth_uti...
<s> '''<STR_LIT>''' <EOL> import os <EOL> import re <EOL> import ast <EOL> import mmap <EOL> import time <EOL> import fnmatch <EOL> import logging <EOL> import weakref <EOL> import itertools <EOL> import htmlentitydefs <EOL> from ast import Load , Store , Param <EOL> from StringIO import StringIO <EOL> from functools i...
<s> from __future__ import unicode_literals <EOL> from django . db import models , migrations <EOL> class Migration ( migrations . Migration ) : <EOL> dependencies = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] <EOL> operations = [ <EOL> migrations . CreateModel ( <EOL> name = '<STR_LIT>' , <EOL> fields = [ <EOL> ( ...
<s> import json <EOL> import urllib <EOL> import requests <EOL> from . . http . api_response import ApiResponse <EOL> from . . http . client import Client as HttpClient <EOL> class Client ( HttpClient ) : <EOL> def __init__ ( self , registry ) : <EOL> self . _registry = registry <EOL> def load_response ( self , request...
<s> """<STR_LIT>""" <EOL> import sys <EOL> def main ( filename ) : <EOL> chars = { '<STR_LIT>' : <NUM_LIT:0> , '<STR_LIT>' : <NUM_LIT:1> , '<STR_LIT>' : <NUM_LIT:2> } <EOL> with open ( filename ) as f , open ( "<STR_LIT>" , "<STR_LIT:w>" ) as f_lexicon , open ( "<STR_LIT>" , "<STR_LIT:w>" ) as f_words , open ( "<STR_LI...
<s> from __future__ import print_function <EOL> import pycuda . autoinit <EOL> import pycuda . driver as drv <EOL> import numpy <EOL> from pycuda . compiler import SourceModule <EOL> mod = SourceModule ( """<STR_LIT>""" ) <EOL> multiply_them = mod . get_function ( "<STR_LIT>" ) <EOL> a = numpy . random . randn ( <NUM_L...
<s> """<STR_LIT>""" <EOL> import copy <EOL> import logging <EOL> import numpy <EOL> from theano . gof import Container , Variable , generic , utils <EOL> _logger = logging . getLogger ( '<STR_LIT>' ) <EOL> __docformat__ = '<STR_LIT>' <EOL> class SharedVariable ( Variable ) : <EOL> """<STR_LIT>""" <EOL> container = None...
<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> from copy import copy <EOL> import os <EOL> import sys <EOL> import logging <EOL> import numpy <EOL> import theano <EOL> from theano import config <EOL> from theano . compat import PY3 <EOL> from theano . compat import izip <EOL> from six import stri...
<s> import unittest <EOL> from nose . plugins . skip import SkipTest <EOL> import numpy <EOL> import theano <EOL> import theano . gof . op as op <EOL> from six import string_types <EOL> from theano . gof . type import Type , Generic <EOL> from theano . gof . graph import Apply , Variable <EOL> import theano . tensor as...
<s> from __future__ import print_function <EOL> __docformat__ = '<STR_LIT>' <EOL> import difflib <EOL> import operator <EOL> import os <EOL> import string <EOL> from subprocess import Popen , PIPE <EOL> import sys <EOL> import tabnanny <EOL> import tokenize <EOL> try : <EOL> import argparse <EOL> except ImportError : <...
<s> from __future__ import print_function <EOL> import copy <EOL> import logging <EOL> import sys <EOL> import numpy <EOL> from six import iteritems <EOL> from six . moves import StringIO , xrange <EOL> import theano <EOL> from theano import gof , Type , Apply <EOL> from theano import tensor , scalar , config <EOL> fro...
<s> import os <EOL> import numpy <EOL> from theano import Op , Apply , Type , Variable <EOL> from theano import tensor , config <EOL> from theano . gradient import grad_undefined <EOL> from theano . tensor . basic import Alloc , Join , Split <EOL> from theano . gof import HideC <EOL> from theano . gof . utils import Me...
<s> import numpy <EOL> import six . moves . copyreg as copyreg <EOL> from six import iteritems <EOL> import warnings <EOL> import theano <EOL> from theano . tensor . type import TensorType <EOL> from theano . tensor . var import _tensor_py_operators <EOL> from theano import Type , Variable , Constant , tensor , config ...
<s> import errno <EOL> import logging <EOL> import os <EOL> import sys <EOL> import warnings <EOL> import numpy <EOL> import theano <EOL> from theano import config <EOL> from theano . compat import reload <EOL> from theano . gof . compilelock import get_lock , release_lock <EOL> from theano . gof import cmodule <EOL> _...
<s> """<STR_LIT>""" <EOL> import logging <EOL> import textwrap <EOL> import sys <EOL> import os <EOL> from theano import config <EOL> from theano . gof . cmodule import GCC_compiler <EOL> _logger = logging . getLogger ( '<STR_LIT>' ) <EOL> def detect_macos_sdot_bug ( ) : <EOL> """<STR_LIT>""" <EOL> _logger . debug ( '<...
<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import warnings <EOL> import numpy <EOL> import theano <EOL> from theano import config , gof , printing , scalar <EOL> from theano . compat import imap <EOL> from theano . printing import pprint <EOL> from theano . tensor import basic as tensor <EOL>...
<s> from itertools import product <EOL> import unittest <EOL> import six . moves . builtins as builtins <EOL> import numpy <EOL> import theano <EOL> import theano . tensor as tensor <EOL> from theano . tests import unittest_tools as utt <EOL> from theano . tensor . signal . pool import ( Pool , pool_2d , <EOL> MaxPoolG...
<s> from __future__ import print_function <EOL> import numpy <EOL> import pickle <EOL> from theano . tests import unittest_tools as utt <EOL> from theano . tensor . raw_random import * <EOL> from theano . tensor import ( raw_random , ivector , dvector , iscalar , dcol , <EOL> dtensor3 ) <EOL> from theano import tensor ...
<s> """<STR_LIT>""" <EOL> from theano . compat import OrderedDict <EOL> from six import iteritems <EOL> from theano . compile . sharedvalue import SharedVariable <EOL> import logging <EOL> import warnings <EOL> __authors__ = "<STR_LIT>" <EOL> __copyright__ = "<STR_LIT>" <EOL> __license__ = "<STR_LIT>" <EOL> __contact__...
<s> import pickle <EOL> import numpy <EOL> from nose . tools import assert_raises_regexp <EOL> import theano <EOL> from numpy . testing import assert_allclose <EOL> from theano import tensor <EOL> from theano import function <EOL> from blocks . bricks import Rectifier , Tanh <EOL> from blocks . bricks . conv import ( C...