code
stringlengths
9
256k
<s> import djclick as click <EOL> @ click . group ( invoke_without_command = True ) <EOL> def main ( ) : <EOL> click . echo ( '<STR_LIT>' ) <EOL> @ main . command ( ) <EOL> def subcmd1 ( ) : <EOL> click . echo ( '<STR_LIT>' ) <EOL> @ main . command ( name = '<STR_LIT>' ) <EOL> def subcmd2 ( ) : <EOL> click . echo ( '<S...
<s> """<STR_LIT>""" <EOL> import os <EOL> import configparser <EOL> import importlib <EOL> from collections import defaultdict <EOL> PACKAGE = '<STR_LIT>' <EOL> LOCAL_CONFIG = '<STR_LIT>' . format ( PACKAGE ) <EOL> DEFAULT_CONFIG = os . path . join ( os . path . dirname ( __file__ ) , <EOL> '<STR_LIT>' ) <EOL> SYSTEM_C...
<s> """<STR_LIT>""" <EOL> from jinja2 . _compat import imap , text_type , PY2 , implements_to_string <EOL> class TemplateError ( Exception ) : <EOL> """<STR_LIT>""" <EOL> if PY2 : <EOL> def __init__ ( self , message = None ) : <EOL> if message is not None : <EOL> message = text_type ( message ) . encode ( '<STR_LIT:utf...
<s> import gc <EOL> import sys <EOL> import unittest <EOL> from markupsafe import Markup , escape , escape_silent <EOL> from markupsafe . _compat import text_type <EOL> class MarkupTestCase ( unittest . TestCase ) : <EOL> def test_adding ( self ) : <EOL> unsafe = '<STR_LIT>' <EOL> safe = Markup ( '<STR_LIT>' ) <EOL> as...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , division , unicode_literals <EOL> from . html5parser import HTMLParser , parse , parseFragment <EOL> from . treebuilders import getTreeBuilder <EOL> from . treewalkers import getTreeWalker <EOL> from . serializer import serialize <EOL> __all__ = [ "<STR...
<s> from __future__ import absolute_import , division , unicode_literals <EOL> from genshi . core import QName <EOL> from genshi . core import START , END , XML_NAMESPACE , DOCTYPE , TEXT <EOL> from genshi . core import START_NS , END_NS , START_CDATA , END_CDATA , PI , COMMENT <EOL> from . import _base <EOL> from . . ...
<s> '''<STR_LIT>''' <EOL> from ndg . httpsclient . ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT <EOL> from ndg . httpsclient . subj_alt_name import SubjectAltName as BaseSubjectAltName <EOL> import OpenSSL . SSL <EOL> from pyasn1 . codec . der import decoder as der_decoder <EOL> from pyasn1 . type import univ , c...
<s> from pip . basecommand import Command , SUCCESS <EOL> from pip . exceptions import CommandError <EOL> class HelpCommand ( Command ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> usage = """<STR_LIT>""" <EOL> summary = '<STR_LIT>' <EOL> def run ( self , options , args ) : <EOL> from pip . commands import co...
<s> from __future__ import with_statement <EOL> from itertools import chain <EOL> import datetime <EOL> import sys <EOL> import warnings <EOL> import threading <EOL> import time as mod_time <EOL> from redis . _compat import ( b , basestring , bytes , imap , iteritems , iterkeys , <EOL> itervalues , izip , long , native...
<s> r'''<STR_LIT>''' <EOL> from __future__ import print_function <EOL> import sys <EOL> import inspect <EOL> import getopt <EOL> from os . path import basename <EOL> from werkzeug . _compat import iteritems <EOL> argument_types = { <EOL> bool : '<STR_LIT>' , <EOL> str : '<STR_LIT:string>' , <EOL> int : '<STR_LIT>' , <E...
<s> fileName = "<STR_LIT>" <EOL> accessMode = "<STR_LIT:w>" <EOL> myFile = open ( fileName , accessMode ) <EOL> myFile . write ( "<STR_LIT>" ) <EOL> myFile . write ( "<STR_LIT>" ) <EOL> myFile . write ( "<STR_LIT>" ) <EOL> myFile . write ( "<STR_LIT>" ) <EOL> myFile . write ( "<STR_LIT>" ) <EOL> myFile . write ( "<STR_...
<s> __author__ = '<STR_LIT>' <EOL> __all__ = [ "<STR_LIT>" , "<STR_LIT>" ] </s>
<s> loader = """<STR_LIT>""" </s>
<s> """<STR_LIT>""" <EOL> import datetime <EOL> import imaplib <EOL> import sys <EOL> import unittest <EOL> from imap_cli import search <EOL> from imap_cli import tests <EOL> class SearchTests ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> imaplib . IMAP4_SSL = tests . ImapConnectionMock ( ) <EOL> def test_...
<s> '''<STR_LIT>''' <EOL> import os <EOL> import sys <EOL> import logging <EOL> import re <EOL> import numpy <EOL> from datetime import datetime , time <EOL> from osgeo import gdal , gdalconst <EOL> from time import sleep <EOL> import gc <EOL> from agdc import Stacker <EOL> from EOtools . utils import log_multiline <EO...
<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import datetime <EOL> import re <EOL> import logging <EOL> import argparse <EOL> from os . path import basename <EOL> from osgeo import gdal <EOL> from EOtools . execute import execute <EOL> from agdc . abstract_ingester import AbstractIngester <EOL> from modis...
<s> """<STR_LIT>""" <EOL> import re <EOL> import os <EOL> import numpy as np <EOL> import logging <EOL> import sys <EOL> import unittest <EOL> import dbutil <EOL> from EOtools . execute import execute <EOL> from abstract_ingester import AbstractIngester <EOL> from abstract_ingester import IngesterDataCube <EOL> from la...
<s> """<STR_LIT>""" <EOL> import os <EOL> import dj_database_url <EOL> BASE_DIR = os . path . dirname ( os . path . dirname ( __file__ ) ) <EOL> SECRET_KEY = '<STR_LIT>' <EOL> DEBUG = True <EOL> TEMPLATE_DEBUG = True <EOL> ALLOWED_HOSTS = [ ] <EOL> INSTALLED_APPS = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_...
<s> from django . db import models <EOL> from stream_django . activity import Activity <EOL> class Tweet ( Activity , models . Model ) : <EOL> @ property <EOL> def activity_time ( self ) : <EOL> return None <EOL> @ property <EOL> def activity_object_attr ( self ) : <EOL> return self <EOL> @ property <EOL> def activity_...
<s> from django import template <EOL> from . . core import ( get_country , get_country_name , <EOL> get_country_code , get_city , get_lat_lon ) <EOL> register = template . Library ( ) <EOL> @ register . filter <EOL> def country_of_request ( request ) : <EOL> return get_country ( request ) <EOL> @ register . filter <EOL...
<s> import os <EOL> import sys <EOL> import colorama <EOL> from . import metadata <EOL> METADATA = metadata <EOL> PATHS = { } <EOL> PATHS [ "<STR_LIT>" ] = os . path . expanduser ( "<STR_LIT>" ) <EOL> PATHS [ "<STR_LIT>" ] = os . path . join ( PATHS [ "<STR_LIT>" ] , "<STR_LIT>" ) <EOL> PATHS [ "<STR_LIT>" ] = os . pat...
<s> from django . contrib import admin <EOL> from zebra . conf import options <EOL> if options . ZEBRA_ENABLE_APP : <EOL> from zebra . models import Customer , Plan , Subscription <EOL> admin . site . register ( Customer ) <EOL> admin . site . register ( Plan ) <EOL> admin . site . register ( Subscription ) </s>
<s> """<STR_LIT>""" <EOL> import logging <EOL> from src import auth <EOL> class ComputeEngine ( object ) : <EOL> """<STR_LIT>""" <EOL> AUTH_SCOPE = '<STR_LIT>' <EOL> API_VERSION = '<STR_LIT>' <EOL> def __init__ ( self , project_id ) : <EOL> """<STR_LIT>""" <EOL> self . project_id = project_id <EOL> self . computeengine...
<s> """<STR_LIT>""" <EOL> import json <EOL> import uuid <EOL> from google . appengine . api import users <EOL> from google . appengine . ext import ndb <EOL> from lib . crud import crud_model <EOL> from src . model import user <EOL> class Pipeline ( crud_model . CrudNdbModel ) : <EOL> """<STR_LIT>""" <EOL> parent_model...
<s> """<STR_LIT>""" <EOL> from src . hadoop import hadoop_csv_transformer <EOL> from src . pipelines import pipeline <EOL> class HadoopCsvMatchReplace ( pipeline . Pipeline ) : <EOL> """<STR_LIT>""" <EOL> @ staticmethod <EOL> def GetHelp ( ) : <EOL> return """<STR_LIT>""" <EOL> def run ( self , config ) : <EOL> """<STR...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import logging <EOL> import re <EOL> import unittest <EOL> from google . cloud . dataflow . pipeline import Pipeline <EOL> from google . cloud . dataflow . pvalue import AsDict <EOL> from google . cloud . dataflow . pvalue import AsIter as AllOf <EO...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import argparse <EOL> import logging <EOL> import sys <EOL> import google . cloud . dataflow as df <EOL> from google . cloud . dataflow import coders <EOL> from google . cloud . dataflow . typehints import typehints <EOL> from google . cloud . dataf...
<s> """<STR_LIT>""" <EOL> from apitools . base . py import extra_types <EOL> def _get_typed_value_descriptor ( obj ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( obj , basestring ) : <EOL> type_name = '<STR_LIT>' <EOL> elif isinstance ( obj , bool ) : <EOL> type_name = '<STR_LIT>' <EOL> elif isinstance ( obj , int ) :...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import collections <EOL> import itertools <EOL> import logging <EOL> from google . cloud . dataflow import coders <EOL> from google . cloud . dataflow import error <EOL> from google . cloud . dataflow . pvalue import EmptySideInput <EOL> from google...
<s> """<STR_LIT>""" <EOL> import functools <EOL> import inspect <EOL> import unittest <EOL> import google . cloud . dataflow . typehints as typehints <EOL> from google . cloud . dataflow . typehints import Any <EOL> from google . cloud . dataflow . typehints import is_consistent_with <EOL> from google . cloud . dataflo...
<s> """<STR_LIT>""" <EOL> import json <EOL> import logging <EOL> import sys <EOL> import threading <EOL> import unittest <EOL> from google . cloud . dataflow . worker import logger <EOL> class PerThreadLoggingContextTest ( unittest . TestCase ) : <EOL> def thread_check_attribute ( self , name ) : <EOL> self . assertFal...
<s> """<STR_LIT>""" <EOL> import abc <EOL> import logging <EOL> from perfkitbenchmarker import flags <EOL> from perfkitbenchmarker import resource <EOL> from perfkitbenchmarker . configs import option_decoders <EOL> from perfkitbenchmarker . configs import spec <EOL> FLAGS = flags . FLAGS <EOL> STANDARD = '<STR_LIT>' <...
<s> """<STR_LIT>""" <EOL> import csv <EOL> import io <EOL> import logging <EOL> from perfkitbenchmarker import configs <EOL> from perfkitbenchmarker import flags <EOL> from perfkitbenchmarker import sample <EOL> from perfkitbenchmarker import vm_util <EOL> from perfkitbenchmarker . linux_packages import netperf <EOL> f...
<s> """<STR_LIT>""" <EOL> def YumInstall ( vm ) : <EOL> """<STR_LIT>""" <EOL> vm . InstallPackages ( '<STR_LIT>' ) <EOL> def AptInstall ( vm ) : <EOL> """<STR_LIT>""" <EOL> vm . InstallPackages ( '<STR_LIT>' ) </s>
<s> """<STR_LIT>""" <EOL> def YumInstall ( vm ) : <EOL> """<STR_LIT>""" <EOL> vm . InstallPackages ( '<STR_LIT>' ) <EOL> def AptInstall ( vm ) : <EOL> """<STR_LIT>""" <EOL> vm . InstallPackages ( '<STR_LIT>' ) </s>
<s> """<STR_LIT>""" <EOL> import shlex <EOL> import string <EOL> import random <EOL> import os <EOL> try : <EOL> import paramiko <EOL> except ImportError : <EOL> paramiko = None <EOL> from perfkitbenchmarker import flags <EOL> from perfkitbenchmarker import vm_util <EOL> ALI_PREFIX = [ '<STR_LIT>' ] <EOL> ROOT = '<STR_...
<s> """<STR_LIT>""" <EOL> import json <EOL> from perfkitbenchmarker import disk <EOL> from perfkitbenchmarker import flags <EOL> from perfkitbenchmarker . providers . gcp import util <EOL> from perfkitbenchmarker . providers import GCP <EOL> FLAGS = flags . FLAGS <EOL> PD_STANDARD = '<STR_LIT>' <EOL> PD_SSD = '<STR_LIT...
<s> """<STR_LIT>""" <EOL> from collections import deque <EOL> import os <EOL> import pkg_resources <EOL> from perfkitbenchmarker import errors <EOL> _BRANCH_ROOT_DIR = os . path . dirname ( os . path . dirname ( __file__ ) ) <EOL> def _CheckRequirements ( requirements_file_path ) : <EOL> """<STR_LIT>""" <EOL> with open...
<s> from perfkitbenchmarker import flags <EOL> flags . FLAGS ( [ ] ) </s>
<s> """<STR_LIT>""" <EOL> import logging <EOL> import os <EOL> import unittest <EOL> from perfkitbenchmarker import sample <EOL> from perfkitbenchmarker import test_util <EOL> from perfkitbenchmarker . linux_benchmarks import mysql_service_benchmark <EOL> class MySQLServiceBenchmarkTestCase ( unittest . TestCase , <EOL...
<s> """<STR_LIT>""" <EOL> import unittest <EOL> from perfkitbenchmarker import stages <EOL> class RunStageParserTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . _parser = stages . RunStageParser ( ) <EOL> def testEmpty ( self ) : <EOL> with self . assertRaises ( ValueError ) : <EOL> self . _pa...
<s> """<STR_LIT>""" <EOL> import sys <EOL> import re <EOL> import codecs <EOL> from traceback import format_exception_only <EOL> try : <EOL> from collections import deque <EOL> except ImportError : <EOL> deque = None <EOL> from werkzeug . utils import escape <EOL> from werkzeug . _compat import iteritems , PY2 , text_t...
<s> import logging <EOL> import os <EOL> version = os . environ . get ( '<STR_LIT>' , '<STR_LIT>' ) . split ( '<STR_LIT:.>' ) [ <NUM_LIT:0> ] <EOL> if ( __name__ == '<STR_LIT>' <EOL> and version != '<STR_LIT>' ) : <EOL> msg = ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> ...
<s> """<STR_LIT>""" <EOL> from __future__ import with_statement <EOL> __all__ = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] <EOL> import pipeline <EOL> from pipeline import common as pipeline_common <EOL> from google . appengine . api...
<s> """<STR_LIT>""" <EOL> import collections <EOL> import unittest <EOL> from mapreduce import output_writers <EOL> from mapreduce import parameters <EOL> from mapreduce import test_support <EOL> from testlib import testutil <EOL> from mapreduce . api import map_job <EOL> from mapreduce . api . map_job import sample_in...
<s> import unittest <EOL> from mapreduce import context <EOL> from mapreduce import errors <EOL> from mapreduce import model <EOL> from mapreduce import output_writers <EOL> from mapreduce import records <EOL> from testlib import testutil <EOL> try : <EOL> import cloudstorage <EOL> enable_cloudstorage_tests = True <EOL...
<s> """<STR_LIT>""" <EOL> from admin_handlers import * <EOL> import webapp2 <EOL> application = webapp2 . WSGIApplication ( <EOL> [ <EOL> ( '<STR_LIT>' , AdminHandler ) , <EOL> ( '<STR_LIT>' , CreateProductHandler ) , <EOL> ( '<STR_LIT>' , DeleteProductHandler ) <EOL> ] , <EOL> debug = True ) </s>
<s> """<STR_LIT>""" <EOL> __all__ = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> import collections <EOL> import logging <EOL> import os <EOL> import urlparse <EOL> from . import api_utils <EOL> from . import errors <EOL> from . import rest_api <EOL> try : <EOL> from google . appengine . api import urlfetch <EOL> ...
<s> """<STR_LIT>""" <EOL> import sys <EOL> from cfg import cfg <EOL> import common <EOL> def main ( ) : <EOL> common . setup ( ) <EOL> if len ( sys . argv ) != <NUM_LIT:2> : <EOL> print '<STR_LIT>' . format ( common . script_name ( ) ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> num_slaves = int ( sys . argv [ <NUM_LIT:1> ]...
<s> """<STR_LIT>""" <EOL> import os <EOL> import re <EOL> from gcimagebundlelib import linux <EOL> class Fedora ( linux . LinuxPlatform ) : <EOL> """<STR_LIT>""" <EOL> @ staticmethod <EOL> def IsThisPlatform ( root = '<STR_LIT:/>' ) : <EOL> release_file = root + '<STR_LIT>' <EOL> if os . path . exists ( release_file ) ...
<s> """<STR_LIT>""" <EOL> import cgi <EOL> import cStringIO <EOL> import datetime <EOL> import pickle <EOL> from . google_imports import namespace_manager <EOL> from . google_imports import datastore_types <EOL> from . google_test_imports import unittest <EOL> from . import blobstore <EOL> from . import model <EOL> fro...
<s> """<STR_LIT>""" <EOL> import logging <EOL> import tempfile <EOL> from . google_imports import apiproxy_stub_map <EOL> from . google_imports import datastore <EOL> from . google_imports import datastore_pbs <EOL> from . google_imports import datastore_rpc <EOL> from . google_test_imports import cloud_datastore_v1_re...
<s> """<STR_LIT>""" <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> import datetime <EOL> import json <EOL> from endpoints import protojson <EOL> from protorpc import messages <EOL> from protorpc import util as protorpc_util <EOL> from google . appengine...
<s> """<STR_LIT>""" <EOL> from gcloud . bigquery . client import Client <EOL> from gcloud . bigquery . connection import Connection <EOL> from gcloud . bigquery . dataset import Dataset <EOL> from gcloud . bigquery . table import SchemaField <EOL> from gcloud . bigquery . table import Table <EOL> SCOPE = Connection . S...
<s> """<STR_LIT>""" <EOL> from pkg_resources import get_distribution <EOL> from grpc . beta import implementations <EOL> from gcloud . bigtable . _generated import bigtable_cluster_data_pb2 as data_pb2 <EOL> from gcloud . bigtable . _generated import bigtable_cluster_service_pb2 <EOL> from gcloud . bigtable . _generate...
<s> """<STR_LIT>""" <EOL> from gcloud . datastore . batch import Batch <EOL> from gcloud . datastore . connection import Connection <EOL> from gcloud . datastore . client import Client <EOL> from gcloud . datastore . entity import Entity <EOL> from gcloud . datastore . key import Key <EOL> from gcloud . datastore . que...
<s> import unittest2 <EOL> class TestClient ( unittest2 . TestCase ) : <EOL> PROJECT = '<STR_LIT>' <EOL> ZONE_NAME = '<STR_LIT>' <EOL> def _getTargetClass ( self ) : <EOL> from gcloud . dns . client import Client <EOL> return Client <EOL> def _makeOne ( self , * args , ** kw ) : <EOL> return self . _getTargetClass ( ) ...
<s> """<STR_LIT>""" <EOL> import collections <EOL> from gcloud . monitoring . label import LabelDescriptor <EOL> class MetricKind ( object ) : <EOL> """<STR_LIT>""" <EOL> GAUGE = '<STR_LIT>' <EOL> DELTA = '<STR_LIT>' <EOL> CUMULATIVE = '<STR_LIT>' <EOL> class ValueType ( object ) : <EOL> """<STR_LIT>""" <EOL> BOOL = '<...
<s> """<STR_LIT>""" <EOL> from gcloud . client import Client as BaseClient <EOL> from gcloud . iterator import Iterator <EOL> from gcloud . resource_manager . connection import Connection <EOL> from gcloud . resource_manager . project import Project <EOL> class Client ( BaseClient ) : <EOL> """<STR_LIT>""" <EOL> _conne...
<s> import unittest2 <EOL> class Test__httplib2_debug_level ( unittest2 . TestCase ) : <EOL> def _getTargetClass ( self ) : <EOL> from gcloud . streaming . http_wrapper import _httplib2_debug_level <EOL> return _httplib2_debug_level <EOL> def _makeOne ( self , * args , ** kw ) : <EOL> return self . _getTargetClass ( ) ...
<s> import time <EOL> import unittest2 <EOL> from gcloud import _helpers <EOL> from gcloud . environment_vars import TESTS_PROJECT <EOL> from gcloud import logging <EOL> from system_test_utils import unique_resource_id <EOL> _RESOURCE_ID = unique_resource_id ( '<STR_LIT:->' ) <EOL> DEFAULT_METRIC_NAME = '<STR_LIT>' % (...
<s> from flask import Flask <EOL> from flask . ext . sqlalchemy import SQLAlchemy <EOL> builtin_list = list <EOL> db = SQLAlchemy ( ) <EOL> def init_app ( app ) : <EOL> db . init_app ( app ) <EOL> def from_sql ( row ) : <EOL> """<STR_LIT>""" <EOL> data = row . __dict__ . copy ( ) <EOL> data [ '<STR_LIT:id>' ] = row . i...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import os <EOL> import pkgutil <EOL> import sys <EOL> import tempfile <EOL> import gslib . exception <EOL> coverage_outfile = os . getenv ( '<STR_LIT>' , None ) <EOL> if coverage_outfile : <EOL> try : <EOL> import coverage <EOL> coverage_controller ...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from gslib . help_provider import HelpProvider <EOL> _DETAILED_HELP_TEXT = ( """<STR_LIT>""" ) <EOL> class CommandOptions ( HelpProvider ) : <EOL> """<STR_LIT>""" <EOL> help_spec = HelpProvider . HelpSpec ( <EOL> help_name = '<STR_LIT>' , <EOL> help...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import calendar <EOL> from collections import defaultdict <EOL> from collections import namedtuple <EOL> import contextlib <EOL> import cStringIO <EOL> import datetime <EOL> import httplib <EOL> import json <EOL> import logging <EOL> import math <EO...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import os <EOL> import pkgutil <EOL> import gslib . cloud_api <EOL> from gslib . daisy_chain_wrapper import DaisyChainWrapper <EOL> from gslib . storage_url import StorageUrlFromString <EOL> import gslib . tests . testcase as testcase <EOL> from gsl...
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from gslib . cs_api_map import ApiSelector <EOL> from gslib . exception import NO_URLS_MATCHED_TARGET <EOL> import gslib . tests . testcase as testcase <EOL> from gslib . tests . testcase . integration_testcase import SkipForS3 <EOL> from gslib . te...
<s> """<STR_LIT>""" <EOL> import os <EOL> script = os . environ [ '<STR_LIT>' ] <EOL> if script == '<STR_LIT>' : <EOL> os . system ( "<STR_LIT>" ) <EOL> elif script == '<STR_LIT>' : <EOL> os . system ( "<STR_LIT>" ) <EOL> else : <EOL> print "<STR_LIT>" % script </s>
<s> """<STR_LIT>""" <EOL> import base64 <EOL> import os <EOL> import time <EOL> import urlparse <EOL> from google . appengine . api import apiproxy_stub <EOL> from google . appengine . api import blobstore <EOL> from google . appengine . api import datastore <EOL> from google . appengine . api import datastore_errors <...
<s> """<STR_LIT>""" <EOL> __all__ = [ '<STR_LIT>' ] <EOL> from google . appengine . api import apiproxy_stub <EOL> from google . appengine . api . files import file_service_pb <EOL> class TestFileServiceStub ( apiproxy_stub . APIProxyStub ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> super ( TestFileSer...
<s> from google . net . proto import ProtocolBuffer <EOL> import array <EOL> import dummy_thread as thread <EOL> __pychecker__ = """<STR_LIT>""" <EOL> if hasattr ( ProtocolBuffer , '<STR_LIT>' ) : <EOL> _extension_runtime = True <EOL> _ExtendableProtocolMessage = ProtocolBuffer . ExtendableProtocolMessage <EOL> else : ...
<s> """<STR_LIT>""" <EOL> import logging <EOL> import re <EOL> RESERVED_INTERNAL_PORTS = range ( <NUM_LIT> , <NUM_LIT> ) <EOL> RESERVED_HOST_PORTS = [ <NUM_LIT> , <EOL> <NUM_LIT> , <EOL> <NUM_LIT> , <EOL> <NUM_LIT> , <EOL> ] + RESERVED_INTERNAL_PORTS <EOL> RESERVED_DOCKER_PORTS = [ <NUM_LIT> , <EOL> <NUM_LIT> , <EOL> <...
<s> """<STR_LIT>""" <EOL> import array <EOL> import struct <EOL> from google . net . proto import ProtocolBuffer <EOL> _MAX_UNSIGNED_BYTE = <NUM_LIT:255> <EOL> _MAX_LONG_BYTES = <NUM_LIT:8> <EOL> _MAX_INLINE = ( _MAX_UNSIGNED_BYTE - ( <NUM_LIT:2> * _MAX_LONG_BYTES ) ) / <NUM_LIT:2> <EOL> _MIN_INLINE = - _MAX_INLINE <EO...
<s> """<STR_LIT>""" <EOL> import inspect <EOL> import sys <EOL> from google . appengine . api import validation <EOL> from google . appengine . api import yaml_builder <EOL> from google . appengine . api import yaml_listener <EOL> from google . appengine . api import yaml_object <EOL> from google . appengine . ext . bu...
<s> from deferred import * <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
<s> """<STR_LIT>""" <EOL> from google . appengine . datastore import datastore_query <EOL> from google . appengine . datastore import datastore_rpc <EOL> from google . appengine . ext import db <EOL> from google . appengine . ext import key_range <EOL> from google . appengine . ext . mapreduce import json_util <EOL> fr...
<s> """<STR_LIT>""" <EOL> import base64 <EOL> import collections <EOL> import logging <EOL> import os <EOL> import re <EOL> from google . appengine . ext . mapreduce import main <EOL> from google . appengine . ext . mapreduce import model <EOL> from google . appengine . ext . webapp import mock_webapp <EOL> _LOGGING_LE...
<s> """<STR_LIT>""" <EOL> import logging <EOL> import os <EOL> import warnings <EOL> if os . environ . get ( '<STR_LIT>' ) == '<STR_LIT>' : <EOL> import google . appengine . _internal . django . template . loader <EOL> from google . appengine . _internal import django <EOL> else : <EOL> from google . appengine . ext im...
<s> """<STR_LIT>""" <EOL> import csv <EOL> import errno <EOL> import getopt <EOL> import imp <EOL> import logging <EOL> import os <EOL> import Queue <EOL> import re <EOL> import shutil <EOL> import signal <EOL> import StringIO <EOL> import sys <EOL> import threading <EOL> import time <EOL> import traceback <EOL> import...
<s> """<STR_LIT>""" <EOL> import logging <EOL> import endpoints <EOL> from protorpc import message_types <EOL> from protorpc import messages <EOL> from protorpc import remote <EOL> class TestRequest ( messages . Message ) : <EOL> """<STR_LIT>""" <EOL> name = messages . StringField ( <NUM_LIT:1> ) <EOL> number = message...
<s> """<STR_LIT>""" <EOL> import cgi <EOL> import collections <EOL> import cStringIO <EOL> import functools <EOL> import httplib <EOL> import logging <EOL> import math <EOL> import os . path <EOL> import random <EOL> import re <EOL> import string <EOL> import threading <EOL> import time <EOL> import urllib <EOL> import...
<s> """<STR_LIT>""" <EOL> import os <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> import time <EOL> if hasattr ( time , '<STR_LIT>' ) : <EOL> time . tzset ( ) <EOL> import __builtin__ <EOL> if '<STR_LIT>' in __builtin__ . __dict__ : <EOL> WindowsError = WindowsError <EOL> else : <EOL> class WindowsError ( Exce...
<s> """<STR_LIT>""" <EOL> from google . net . proto2 . python . internal import api_implementation <EOL> from google . net . proto2 . python . public import descriptor as descriptor_mod <EOL> from google . net . proto2 . python . public import message <EOL> _FieldDescriptor = descriptor_mod . FieldDescriptor <EOL> if a...
<s> __version__ = '<STR_LIT>' </s>
<s> import main <EOL> import mock <EOL> import webtest <EOL> def test_app ( testbed ) : <EOL> app = webtest . TestApp ( main . app ) <EOL> with mock . patch ( '<STR_LIT>' ) as fetch_mock : <EOL> result_mock = mock . Mock ( ) <EOL> result_mock . status_code = <NUM_LIT:200> <EOL> result_mock . content = '<STR_LIT:{}>' <E...
<s> """<STR_LIT>""" <EOL> from google . appengine . api import images <EOL> from google . appengine . ext import ndb <EOL> import webapp2 <EOL> class Photo ( ndb . Model ) : <EOL> title = ndb . StringProperty ( ) <EOL> full_size_image = ndb . BlobProperty ( ) <EOL> class Thumbnailer ( webapp2 . RequestHandler ) : <EOL>...
<s> from google . appengine . ext import vendor <EOL> vendor . add ( '<STR_LIT>' ) </s>
<s> from google . appengine . ext import ndb <EOL> import snippets <EOL> def test_set_in_process_cache_policy ( testbed ) : <EOL> def policy ( key ) : <EOL> return <NUM_LIT:1> == <NUM_LIT:1> <EOL> snippets . set_in_process_cache_policy ( policy ) <EOL> assert policy == ndb . get_context ( ) . get_cache_policy ( ) <EOL>...
<s> import main <EOL> import pytest <EOL> @ pytest . fixture <EOL> def app ( testbed ) : <EOL> main . app . config [ '<STR_LIT>' ] = True <EOL> return main . app . test_client ( ) <EOL> def test_index ( app ) : <EOL> rv = app . get ( '<STR_LIT:/>' ) <EOL> assert '<STR_LIT>' in rv . data <EOL> assert rv . status == '<ST...
<s> """<STR_LIT>""" <EOL> import argparse <EOL> from googleapiclient . discovery import build <EOL> from googleapiclient . errors import HttpError <EOL> from oauth2client . client import GoogleCredentials <EOL> def main ( project_id ) : <EOL> credentials = GoogleCredentials . get_application_default ( ) <EOL> bigquery_...
<s> """<STR_LIT>""" <EOL> import argparse <EOL> import base64 <EOL> import os <EOL> from cryptography import x509 <EOL> from cryptography . hazmat . backends import default_backend <EOL> from cryptography . hazmat . primitives import hashes <EOL> from cryptography . hazmat . primitives . asymmetric import padding <EOL>...
<s> import datetime <EOL> import logging <EOL> import os <EOL> import socket <EOL> from flask import Flask , request <EOL> from gcloud import datastore <EOL> app = Flask ( __name__ ) <EOL> def is_ipv6 ( addr ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> socket . inet_pton ( socket . AF_INET6 , addr ) <EOL> return True <E...
<s> import logging <EOL> import os <EOL> from flask import Flask , render_template , request <EOL> import sendgrid <EOL> SENDGRID_API_KEY = os . environ [ '<STR_LIT>' ] <EOL> SENDGRID_SENDER = os . environ [ '<STR_LIT>' ] <EOL> app = Flask ( __name__ ) <EOL> @ app . route ( '<STR_LIT:/>' ) <EOL> def index ( ) : <EOL> r...
<s> """<STR_LIT>""" <EOL> import argparse <EOL> import filecmp <EOL> import tempfile <EOL> from googleapiclient import discovery <EOL> from googleapiclient import http <EOL> from oauth2client . client import GoogleCredentials <EOL> ENCRYPTION_KEY = '<STR_LIT>' <EOL> KEY_HASH = '<STR_LIT>' <EOL> ANOTHER_ENCRYPTION_KEY =...
<s> """<STR_LIT>""" <EOL> from random import choice <EOL> import Image <EOL> import ImageDraw <EOL> import ImageFilter <EOL> import ImageFont <EOL> import ImageOps <EOL> import settings <EOL> quotes = [ quote . strip ( ) for quote in open ( settings . QUOTES_FILE_LOCATION , <EOL> '<STR_LIT:r>' ) . readlines ( ) ] <EOL>...
<s> """<STR_LIT>""" <EOL> import webapp2 <EOL> import logging <EOL> import re <EOL> from datetime import datetime <EOL> from datetime import date <EOL> import urllib2 <EOL> from google . appengine . api import taskqueue <EOL> from google . appengine . api import mail <EOL> from google . appengine . api import app_ident...
<s> from __future__ import print_function <EOL> import unittest <EOL> import inspect <EOL> import imp <EOL> import wrapt <EOL> from compat import PY2 , PY3 , exec_ <EOL> DECORATORS_CODE = """<STR_LIT>""" <EOL> decorators = imp . new_module ( '<STR_LIT>' ) <EOL> exec_ ( DECORATORS_CODE , decorators . __dict__ , decorato...
<s> from __future__ import absolute_import , print_function , unicode_literals , division <EOL> import json <EOL> import pkgutil <EOL> try : <EOL> from collections import OrderedDict <EOL> except ImportError as e : <EOL> from ordereddict import OrderedDict <EOL> from sc2reader . log_utils import loggable <EOL> ABIL_LOO...
<s> from __future__ import absolute_import , print_function , unicode_literals , division <EOL> import sc2reader <EOL> from sc2reader . factories . plugins . replay import toJSON <EOL> def main ( ) : <EOL> import argparse <EOL> parser = argparse . ArgumentParser ( description = "<STR_LIT>" ) <EOL> parser . add_argument...
<s> import os <EOL> from setuptools import setup <EOL> from sys import platform <EOL> with open ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' , '<STR_LIT>' ) ) as f : <EOL> VERSION = None <EOL> code = compile ( f . read ( ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> exec ( code ) <EOL> assert VERSION <EO...