code stringlengths 9 256k |
|---|
<s> """<STR_LIT>""" <EOL> __all__ = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_... |
<s> import pytest <EOL> import argparse <EOL> import inspect <EOL> from . import plugin_base <EOL> import collections <EOL> def pytest_addoption ( parser ) : <EOL> group = parser . getgroup ( "<STR_LIT>" ) <EOL> def make_option ( name , ** kw ) : <EOL> callback_ = kw . pop ( "<STR_LIT>" , None ) <EOL> if callback_ : <E... |
<s> import os <EOL> import sys <EOL> import time <EOL> import subprocess <EOL> import threading <EOL> from itertools import chain <EOL> from werkzeug . _internal import _log <EOL> from werkzeug . _compat import PY2 , iteritems , text_type <EOL> def _iter_module_files ( ) : <EOL> """<STR_LIT>""" <EOL> for module in list... |
<s> from . . import widgets <EOL> from . core import StringField , BooleanField <EOL> __all__ = ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' <EOL> ) <EOL> class TextField ( StringField ) : <EOL> """<STR_LIT>""" <EOL> class TextAreaField ( TextField ) : <E... |
<s> from __future__ import ( unicode_literals , absolute_import , <EOL> print_function , division ) <EOL> import sys <EOL> if sys . version_info . major == <NUM_LIT:2> : <EOL> reload ( sys ) <EOL> sys . setdefaultencoding ( '<STR_LIT:utf-8>' ) <EOL> from signal import signal , SIGPIPE , SIG_DFL <EOL> signal ( SIGPIPE ,... |
<s> from __future__ import division <EOL> import numpy as np <EOL> from . import common_args <EOL> from . import sobol_sequence <EOL> from . . util import scale_samples , nonuniform_scale_samples , read_param_file , compute_groups_matrix <EOL> def sample ( problem , N , calc_second_order = True ) : <EOL> """<STR_LIT>""... |
<s> import urllib3 <EOL> import certifi <EOL> http = urllib3 . PoolManager ( <EOL> cert_reqs = '<STR_LIT>' , <EOL> ca_certs = certifi . where ( ) , <EOL> ) <EOL> url = '<STR_LIT>' <EOL> headers = urllib3 . util . make_headers ( ) <EOL> headers [ '<STR_LIT>' ] = '<STR_LIT>' + '<STR_LIT>' <EOL> r = http . urlopen ( '<STR... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from config . settings . common import * <EOL> from celery . utils import LOG_LEVELS <EOL> LOGGING = { <EOL> '<STR_LIT:version>' : <NUM_LIT:1> , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:file>' : { <EOL> '<STR_LIT>' : '<STR_L... |
<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> """<STR_LIT>""" <EOL> from seed . data_importer . models import ImportFile , ImportRecord , ROW_DELIMITER <EOL> from seed . models import BuildingSnapshot , CanonicalBuilding , Project , ProjectBuilding , StatusLabel <EOL> from seed . functional . tests . base import LoggedInFunctionalTestCase , LoggedOutFunctional... |
<s> """<STR_LIT>""" <EOL> import copy <EOL> from unittest import TestCase <EOL> from seed . lib . mcm import cleaners , mapper <EOL> from mcm import mapper <EOL> from mcm . tests . utils import FakeModel <EOL> class TestMapper ( TestCase ) : <EOL> fake_mapping = { <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' ... |
<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 . RemoveField ( <EOL> model_name = '<STR_LIT>' , <EOL> name = '<STR_... |
<s> """<STR_LIT>""" <EOL> import datetime <EOL> import json <EOL> from django . core . urlresolvers import reverse_lazy <EOL> from django . test import TestCase <EOL> from seed . cleansing . models import Rules , CATEGORY_MISSING_MATCHING_FIELD , CATEGORY_MISSING_VALUES , CATEGORY_IN_RANGE_CHECKING <EOL> from seed . la... |
<s> """<STR_LIT>""" <EOL> from datetime import date <EOL> from django . conf import settings <EOL> from django . utils . http import int_to_base36 , base36_to_int <EOL> from django . utils . crypto import constant_time_compare , salted_hmac <EOL> from django . utils import six <EOL> class SignupTokenGenerator ( object ... |
<s> """<STR_LIT>""" <EOL> from django . core . management import call_command <EOL> from django . test . simple import DjangoTestSuiteRunner <EOL> from lettuce import after , before , step , world <EOL> from splinter . browser import Browser <EOL> from logging import getLogger <EOL> from selenium import webdriver <EOL>... |
<s> import numpy as np <EOL> from collections import OrderedDict <EOL> import theano . tensor as T <EOL> from . . interfaces import Optimizer <EOL> from . . utils import sharedX <EOL> class Adadelta ( Optimizer ) : <EOL> def __init__ ( self , loss , decay = <NUM_LIT> , epsilon = <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL... |
<s> """<STR_LIT>""" <EOL> from cheeseprism import event <EOL> from cheeseprism . desc import template <EOL> from cheeseprism . desc import updict <EOL> from functools import partial <EOL> from path import path <EOL> from pyramid import threadlocal <EOL> from pyramid . events import ApplicationCreated <EOL> from pyramid... |
<s> __author__ = '<STR_LIT>' <EOL> import mysql . connector <EOL> from mysql . connector import errorcode <EOL> import re <EOL> from datetime import datetime <EOL> from git import * <EOL> from gitquerier import GitQuerier <EOL> class Git2Db ( ) : <EOL> def __init__ ( self , db_name , git_repo_path , before_date , logge... |
<s> """<STR_LIT>""" <EOL> from stix . core import STIXHeader <EOL> from stix . common . vocabs import VocabString , PackageIntent <EOL> def main ( ) : <EOL> header = STIXHeader ( ) <EOL> header . package_intents . append ( PackageIntent . TERM_INDICATORS ) <EOL> non_default_value = VocabString ( "<STR_LIT>" ) <EOL> hea... |
<s> import sys <EOL> import cybox . bindings . cybox_core as cybox_core_binding <EOL> from mixbox . binding_utils import * <EOL> from stix . bindings import lookup_extension , register_extension <EOL> import stix . bindings . stix_common as stix_common_binding <EOL> import stix . bindings . data_marking as data_marking... |
<s> import stix <EOL> from stix . utils . deprecated import deprecated <EOL> from stix . common import InformationSource , StructuredTextList , VocabString <EOL> from stix . common . vocabs import PackageIntent <EOL> from stix . data_marking import Marking <EOL> import stix . bindings . stix_common as stix_common_bindi... |
<s> import stix <EOL> from stix . common import VocabString <EOL> from stix . common . vocabs import ImpactRating <EOL> import stix . bindings . incident as incident_binding <EOL> class DirectImpactSummary ( stix . Entity ) : <EOL> _namespace = "<STR_LIT>" <EOL> _binding = incident_binding <EOL> _binding_class = incide... |
<s> import unittest <EOL> from stix . test import EntityTestCase <EOL> from stix . common . kill_chains import ( <EOL> KillChain , KillChainPhase , KillChainPhaseReference , <EOL> KillChainPhasesReference , KillChains , lmco <EOL> ) <EOL> class KillChainTests ( EntityTestCase , unittest . TestCase ) : <EOL> klass = Kil... |
<s> import StringIO <EOL> import unittest <EOL> import lxml . etree <EOL> import stix <EOL> from stix . core import STIXPackage <EOL> from stix . utils import nsparser , silence_warnings <EOL> NSMAP = { <EOL> "<STR_LIT>" : "<STR_LIT:a>" , <EOL> "<STR_LIT>" : "<STR_LIT:b>" , <EOL> "<STR_LIT>" : "<STR_LIT:c>" <EOL> } <EO... |
<s> """<STR_LIT>""" <EOL> import importlib <EOL> from docopt import docopt <EOL> import glob <EOL> import re <EOL> import os <EOL> from defaults import Defaults <EOL> from azurectl_exceptions import ( <EOL> AzureUnknownServiceName , <EOL> AzureCommandNotLoaded , <EOL> AzureLoadCommandUndefined <EOL> ) <EOL> from versio... |
<s> from . . storage . container import Container <EOL> from . . defaults import Defaults <EOL> from . . azurectl_exceptions import ( <EOL> AzureStorageAccountCreateError , <EOL> AzureStorageAccountUpdateError , <EOL> AzureStorageAccountDeleteError , <EOL> AzureStorageAccountShowError , <EOL> AzureStorageAccountListErr... |
<s> import dateutil . parser <EOL> import sys <EOL> import mock <EOL> from mock import patch <EOL> from test_helper import * <EOL> from azurectl . commands . storage_disk import StorageDiskTask <EOL> class TestStorageDiskTask : <EOL> def setup ( self ) : <EOL> sys . argv = [ <EOL> sys . argv [ <NUM_LIT:0> ] , '<STR_LIT... |
<s> from google . appengine . ext import webapp <EOL> from google . appengine . ext . webapp import util <EOL> class MainHandler ( webapp . RequestHandler ) : <EOL> def get ( self ) : <EOL> self . response . headers . add_header ( "<STR_LIT>" , "<STR_LIT:*>" ) <EOL> self . response . out . write ( '<STR_LIT>' ) <EOL> d... |
<s> from google . appengine . ext import db <EOL> class FileStorage ( db . Model ) : <EOL> id = db . ByteStringProperty ( required = True ) <EOL> data = db . BlobProperty ( ) <EOL> msg = db . BlobProperty ( required = True ) <EOL> inserted = db . DateTimeProperty ( auto_now_add = True , indexed = True ) <EOL> blobkey =... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> from __future__ import unicode_literals <EOL> from builtins import str <EOL> import json <EOL> import pkg_resources <EOL> import re <EOL> import requests <EOL> import ... |
<s> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> from __future__ import unicode_literals <EOL> from collections import OrderedDict <EOL> from datetime import datetime as Datetime <EOL> from nose . tools import assert_raises <EOL> from mat... |
<s> '''<STR_LIT>''' <EOL> """<STR_LIT>""" <EOL> __copyright__ = "<STR_LIT>" <EOL> __status__ = "<STR_LIT>" </s>
|
<s> '''<STR_LIT>''' <EOL> _mode = None <EOL> _change_id = None <EOL> def init ( mode , change_id ) : <EOL> global _change_id <EOL> global _mode <EOL> _mode = mode <EOL> if _mode == None : <EOL> _mode = "<STR_LIT>" <EOL> _change_id = change_id <EOL> def in_production ( ) : <EOL> if _mode == "<STR_LIT>" : <EOL> return Tr... |
<s> from . protobuf2 import * </s>
|
<s> import glass <EOL> import configs <EOL> app = glass . Application ( <EOL> name = "<STR_LIT>" , <EOL> client_id = configs . CLIENT_ID , <EOL> client_secret = configs . CLIENT_SECRET <EOL> ) <EOL> @ app . subscriptions . login <EOL> def login ( user ) : <EOL> print "<STR_LIT>" % user . token <EOL> user . timeline . p... |
<s> import numpy as np <EOL> import pvl_tools <EOL> def pvl_haydavies1980 ( SurfTilt , SurfAz , DHI , DNI , HExtra , SunZen , SunAz ) : <EOL> '''<STR_LIT>''' <EOL> Vars = locals ( ) <EOL> Expect = { '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' ) ,... |
<s> from nose . tools import * <EOL> import numpy as np <EOL> import pandas as pd <EOL> import sys <EOL> import os <EOL> from . . import pvl_ephemeris <EOL> from . . import tmy <EOL> from . . import pvl_makelocationstruct <EOL> def test_inputs ( ) : <EOL> TMY , meta = tmy . readtmy3 ( filename = '<STR_LIT>' ) <EOL> DFo... |
<s> from django . conf import settings <EOL> SESSION_REDIS_HOST = getattr ( settings , '<STR_LIT>' , '<STR_LIT:localhost>' ) <EOL> SESSION_REDIS_PORT = getattr ( settings , '<STR_LIT>' , <NUM_LIT> ) <EOL> SESSION_REDIS_DB = getattr ( settings , '<STR_LIT>' , <NUM_LIT:0> ) <EOL> SESSION_REDIS_PREFIX = getattr ( settings... |
<s> """<STR_LIT>""" <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:1> , '<STR_LIT>' ) <EOL> import endpoints <EOL> from google . appengine . ext import ndb <EOL> from google . appengine . ext . ndb import msgprop <EOL> from protorpc import messages <EOL> from protorpc import message_types <EOL> from endpoints_pr... |
<s> from bs4 import BeautifulSoup <EOL> from argparse import ArgumentParser <EOL> from os import path <EOL> from zipfile import ZipFile , ZIP_DEFLATED <EOL> import hashlib <EOL> import sys <EOL> TEMPLATE_FILE = path . join ( path . realpath ( __file__ ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> AVD_PATH = path . expanduser (... |
<s> from baboon . common . eventbus import eventbus <EOL> from baboon . common . utils import exec_cmd <EOL> from baboon . common . logger import logger <EOL> @ logger <EOL> class Notifier ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , notif_cmd ) : <EOL> self . notif_cmd = notif_cmd <EOL> eventbus . re... |
<s> import os <EOL> from PyQt4 . QtCore import Qt , QDir , QFile , QRect , QSize <EOL> from PyQt4 . QtGui import ( QColor , QFileIconProvider , QFileSystemModel , <EOL> QListView , QMenu , QPen , QPixmap , QStyle , QStyledItemDelegate ) <EOL> class AttachmentItemDelegate ( QStyledItemDelegate ) : <EOL> def __init__ ( s... |
<s> URLS = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> class Service ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , bitbucket ) : <EOL> self . bitbucket = bitbuck... |
<s> import sys <EOL> import re <EOL> from . . core . parameterization import Parameterized <EOL> import numpy as np <EOL> import sympy as sym <EOL> from . . core . parameterization import Param <EOL> from sympy . utilities . lambdify import lambdastr , _imp_namespace , _get_namespace <EOL> from sympy . utilities . iter... |
<s> """<STR_LIT>""" <EOL> from . linear import Linear <EOL> import numpy as np <EOL> class sde_Linear ( Linear ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , input_dim , X , variances = None , ARD = False , active_dims = None , name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> super ( sde_Linear , self ) . __in... |
<s> """<STR_LIT>""" <EOL> import numpy as np <EOL> try : <EOL> from scipy import weave <EOL> def _psicomputations ( variance , lengthscale , Z , variational_posterior ) : <EOL> """<STR_LIT>""" <EOL> mu = variational_posterior . mean <EOL> S = variational_posterior . variance <EOL> gamma = variational_posterior . binary... |
<s> from . bernoulli import Bernoulli <EOL> from . exponential import Exponential <EOL> from . gaussian import Gaussian , HeteroscedasticGaussian <EOL> from . gamma import Gamma <EOL> from . poisson import Poisson <EOL> from . student_t import StudentT <EOL> from . likelihood import Likelihood <EOL> from . mixed_noise ... |
<s> import numpy as np <EOL> from . . core import Model <EOL> from paramz import ObsAr <EOL> from . . import likelihoods <EOL> class GPKroneckerGaussianRegression ( Model ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , X1 , X2 , Y , kern1 , kern2 , noise_var = <NUM_LIT:1.> , name = '<STR_LIT>' ) : <EOL> Model . _... |
<s> import unittest <EOL> import numpy as np <EOL> import GPy <EOL> from . . models import SparseGPLVM <EOL> class sparse_GPLVMTests ( unittest . TestCase ) : <EOL> def test_bias_kern ( self ) : <EOL> N , num_inducing , input_dim , D = <NUM_LIT:10> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:4> <EOL> X = np . random . rand ... |
<s> from . . import Tango <EOL> from plotly . graph_objs import Line <EOL> '''<STR_LIT>''' <EOL> data_1d = dict ( marker_kwargs = dict ( ) , marker = '<STR_LIT:x>' , color = '<STR_LIT>' ) <EOL> data_2d = dict ( marker = '<STR_LIT:o>' , cmap = '<STR_LIT>' , marker_kwargs = dict ( opacity = <NUM_LIT:1.> , size = '<STR_LI... |
<s> import numpy as np <EOL> def conf_matrix ( p , labels , names = [ '<STR_LIT:1>' , '<STR_LIT:0>' ] , threshold = <NUM_LIT> , show = True ) : <EOL> """<STR_LIT>""" <EOL> assert p . size == labels . size , "<STR_LIT>" <EOL> decision = np . ones ( ( labels . size , <NUM_LIT:1> ) ) <EOL> decision [ p < threshold ] = <NU... |
<s> import sys <EOL> import os <EOL> import shlex <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( '<STR_LIT>' ) ) <EOL> on_rtd = os . environ . get ( '<STR_LIT>' , None ) == '<STR_LIT:True>' <EOL> if on_rtd : <EOL> import subprocess <EOL> proc = subprocess . Popen ( "<STR_LIT>" , stdout = subprocess . P... |
<s> from . import irccat , console , run </s>
|
<s> import shopify <EOL> import code <EOL> import sys <EOL> import os <EOL> import os . path <EOL> import glob <EOL> import subprocess <EOL> import functools <EOL> import yaml <EOL> import six <EOL> def start_interpreter ( ** variables ) : <EOL> console = type ( '<STR_LIT>' + shopify . version . VERSION , ( code . Inte... |
<s> from . . base import ShopifyResource <EOL> class Location ( ShopifyResource ) : <EOL> pass </s>
|
<s> import time <EOL> import hmac <EOL> from hashlib import sha256 <EOL> try : <EOL> import simplejson as json <EOL> except ImportError : <EOL> import json <EOL> import re <EOL> from contextlib import contextmanager <EOL> from six . moves import urllib <EOL> import six <EOL> class ValidationException ( Exception ) : <E... |
<s> import shopify <EOL> from test . test_helper import TestCase <EOL> class VariantTest ( TestCase ) : <EOL> def test_get_variants ( self ) : <EOL> self . fake ( "<STR_LIT>" , method = '<STR_LIT:GET>' , body = self . load_fixture ( '<STR_LIT>' ) ) <EOL> v = shopify . Variant . find ( product_id = <NUM_LIT> ) <EOL> def... |
<s> import unittest <EOL> import partyparrot <EOL> class TestPartyParrot ( unittest . TestCase ) : <EOL> partyparrot_result = """<STR_LIT>""" <EOL> joy_result = """<STR_LIT>""" <EOL> def test_conversion ( self ) : <EOL> self . assertEqual ( <EOL> partyparrot . convert_str_to_emoji ( '<STR_LIT>' , emojis = [ '<STR_LIT>'... |
<s> import sys , os <EOL> sys . path . append ( os . path . abspath ( '<STR_LIT>' ) ) <EOL> extensions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> intersphinx_mapping = { '<STR_LIT>' : ( '<STR_LIT>' , None ) } <EOL> templates_path = [ '<STR_LIT>' ] <EOL> source_suffix = '<STR_LIT>' <EOL> master_doc = '<STR_LIT:index>' <EOL> ... |
<s> import io <EOL> import cairo <EOL> import cairocffi <EOL> from pycairo_to_cairocffi import _UNSAFE_pycairo_context_to_cairocffi <EOL> from cairocffi_to_pycairo import _UNSAFE_cairocffi_context_to_pycairo <EOL> import pango_example <EOL> def test ( ) : <EOL> cairocffi_context = cairocffi . Context ( cairocffi . PDFS... |
<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> from . import token_data <EOL> def tokenize_flat ( css_source , ignore_comments = True , <EOL> tokens_dispatch = token_data . TOKEN_DISPATCH , <EOL> unicode_unescape = token_data . UNICODE_UNESCAPE , <EOL> newline_unescape = token_data . NEWLINE_UN... |
<s> import unittest <EOL> import sys <EOL> import os . path <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( '<STR_LIT:..>' ) ) <EOL> from hcpsdk import ips <EOL> import init_tests as it <EOL> class TestHcpsdk_10_1_Ips ( unittest . TestCase ) : <EOL> def test_1_05_query_good_fqdn ( self ) : <EOL> """<STR... |
<s> """<STR_LIT>""" <EOL> __docformat__ = '<STR_LIT>' <EOL> import sys <EOL> is_64bits = sys . maxsize > <NUM_LIT:2> ** <NUM_LIT:32> <EOL> if is_64bits and sys . platform == "<STR_LIT>" : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> from skype import Skype <EOL> from callchannel import CallChannelManager <EOL> from e... |
<s> import sys <EOL> import Skype4Py <EOL> CallStatus = <NUM_LIT:0> <EOL> CallIsFinished = set ( [ Skype4Py . clsFailed , Skype4Py . clsFinished , Skype4Py . clsMissed , Skype4Py . clsRefused , Skype4Py . clsBusy , Skype4Py . clsCancelled ] ) ; <EOL> def AttachmentStatusText ( status ) : <EOL> return skype . Convert . ... |
<s> """<STR_LIT>""" <EOL> from pkgutil import extend_path <EOL> __path__ = extend_path ( __path__ , __name__ ) </s>
|
<s> from sqlalchemy . orm . query import Query <EOL> from sqlalchemy . orm . util import AliasedClass <EOL> from sqlalchemy . sql import ClauseElement , Join <EOL> from sqlalchemy . sql . selectable import FromGrouping <EOL> from sqlalchemy import cast , Boolean <EOL> from sqlalchemy . orm . util import _class_to_mappe... |
<s> import os <EOL> import sys <EOL> import unittest <EOL> import shutil <EOL> from iktomi import web <EOL> from iktomi . cli import app <EOL> from logging import Logger <EOL> from cStringIO import StringIO <EOL> import signal <EOL> from time import sleep <EOL> import subprocess <EOL> import urllib2 <EOL> try : <EOL> f... |
<s> import unittest , sys , inspect , cProfile <EOL> from iktomi . unstable . utils . functools import return_locals <EOL> class Tests ( unittest . TestCase ) : <EOL> def test_return_locals ( self ) : <EOL> def test_func ( a , b = <NUM_LIT:1> , * args , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> c = <NUM_LIT:2> <EOL> de... |
<s> '''<STR_LIT>''' <EOL> import httplib <EOL> import urllib <EOL> import sys , urllib2 , base64 <EOL> from MultipartPostHandler import MultipartPostHandler <EOL> from Constants import Uri , Params , ReqMethod <EOL> from ApiResponse import ApiResponse <EOL> class FileApiBase : <EOL> """<STR_LIT>""" <EOL> headers = { "<... |
<s> import itertools <EOL> import re <EOL> from django . utils import six <EOL> try : <EOL> from PIL import Image , ImageChops , ImageFilter <EOL> except ImportError : <EOL> import Image <EOL> import ImageChops <EOL> import ImageFilter <EOL> from easy_thumbnails import utils <EOL> def _compare_entropy ( start_slice , e... |
<s> """<STR_LIT>""" <EOL> from . settings import * <EOL> INSTALLED_APPS = INSTALLED_APPS [ : ] <EOL> INSTALLED_APPS . remove ( '<STR_LIT>' ) </s>
|
<s> __author__ = '<STR_LIT>' </s>
|
<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> from pypet . utils . decorators import deprecated <EOL> from pypet . pypetlogging import HasLogger <EOL> import pypet . compat as compat <EOL> from pypet . slots import HasSlots <EOL> class Annotations ( HasSlots ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = ( '<ST... |
<s> __author__ = '<STR_LIT>' <EOL> from pypet . tests . testutils . ioutils import unittest , run_suite , make_temp_dir , get_log_config , parse_args <EOL> from pypet . tests . testutils . data import TrajectoryComparator <EOL> from pypet import Environment <EOL> import time <EOL> import os <EOL> try : <EOL> import bri... |
<s> __author__ = '<STR_LIT>' <EOL> import getopt <EOL> import sys <EOL> import os <EOL> import sys <EOL> if ( sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> , <NUM_LIT:0> ) ) : <EOL> import unittest2 as unittest <EOL> else : <EOL> import unittest <EOL> from pypet . tests . testutils . ioutils import discover_tests , ... |
<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import importlib <EOL> import inspect <EOL> from pypet . naturalnaming import ResultGroup , ParameterGroup , DerivedParameterGroup , ConfigGroup , NNGroupNode , NNLeafNode <EOL> from pypet . parameter import BaseParameter , BaseResult , Parameter , Result , Array... |
<s> from common . dbconnect import db_connect <EOL> from common . entities import KippoSession , KippoInput <EOL> from canari . maltego . message import Field , UIMessage <EOL> from canari . framework import configure <EOL> __author__ = '<STR_LIT>' <EOL> __copyright__ = '<STR_LIT>' <EOL> __credits__ = [ ] <EOL> __licen... |
<s> import sys , os , time , json , random , string <EOL> import os <EOL> import time <EOL> import json <EOL> import random <EOL> import string <EOL> from django . conf import settings <EOL> from django . test import LiveServerTestCase <EOL> from selenium import webdriver <EOL> from selenium . webdriver . support . ui ... |
<s> """<STR_LIT>""" <EOL> import numpy as np <EOL> import theano <EOL> import theano . tensor as T <EOL> from blocks . bricks import application , Initializable , Random <EOL> import regression <EOL> import util <EOL> class DiffusionModel ( Initializable ) : <EOL> def __init__ ( self , <EOL> spatial_width , <EOL> n_col... |
<s> from sparkpost import SparkPost <EOL> sp = SparkPost ( ) <EOL> transmission_list = sp . transmissions . list ( ) <EOL> print ( transmission_list ) </s>
|
<s> import pytest <EOL> import responses <EOL> from sparkpost import SparkPost <EOL> from sparkpost import RecipientLists <EOL> from sparkpost . exceptions import SparkPostAPIException <EOL> def test_translate_keys_with_id ( ) : <EOL> t = RecipientLists ( '<STR_LIT>' , '<STR_LIT:key>' ) <EOL> results = t . _translate_k... |
<s> import copy <EOL> from six import string_types <EOL> def get_settings ( defaults , settings ) : <EOL> return dict ( copy . deepcopy ( defaults ) , ** settings ) <EOL> def pl_announce ( * args ) : <EOL> def inner ( cl ) : <EOL> cl . pl_announce = args <EOL> return cl <EOL> return inner <EOL> def pl_event ( * args ) ... |
<s> from __future__ import division <EOL> import math <EOL> class BaseVector ( object ) : <EOL> _internal_vec_type = list <EOL> def __init__ ( self , * values ) : <EOL> self . vector = self . _internal_vec_type ( values ) <EOL> def init ( self , * args ) : <EOL> BaseVector . __init__ ( self , * args ) <EOL> return self... |
<s> """<STR_LIT>""" <EOL> from beaker . cache import CacheManager <EOL> from beaker . util import parse_cache_config_options <EOL> class Globals ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , config ) : <EOL> """<STR_LIT>""" <EOL> self . cache = CacheManager ( ** parse_cache_config_options ( config ) ) ... |
<s> import logging <EOL> import unittest <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , '<STR_LIT>' ) <EOL> from nipap . backend import Nipap , NipapError , NipapInputError , NipapMissingInputError , NipapExtraneousInputError , NipapValueError <EOL> from nipap . authlib import SqliteAuth <EOL> from nipap . ... |
<s> """<STR_LIT>""" <EOL> import json <EOL> import os <EOL> import time <EOL> from threading import Thread <EOL> from multiprocessing import Process , Manager <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> with Manager ( ) as manager : <EOL> d = manager . dict ( ) <EOL> l = manager . list ( range ( <NUM_LIT:10> ) ) ... |
<s> import os <EOL> import json <EOL> from st2actions . runners . pythonrunner import Action <EOL> from st2common . content . utils import get_packs_base_paths <EOL> GITINFO_FILE = '<STR_LIT>' <EOL> class PackInfo ( Action ) : <EOL> def run ( self , pack ) : <EOL> packs_base_paths = get_packs_base_paths ( ) <EOL> pack_... |
<s> import abc <EOL> import importlib <EOL> import six <EOL> from st2actions import handlers <EOL> from st2common import log as logging <EOL> from st2common . constants . pack import DEFAULT_PACK_NAME <EOL> from st2common . exceptions . actionrunner import ActionRunnerCreateError <EOL> from st2common . util import acti... |
<s> import traceback <EOL> import unittest2 <EOL> from st2tests import config as test_config <EOL> test_config . parse_args ( ) <EOL> from st2actions import worker <EOL> from st2actions import scheduler <EOL> from st2actions . notifier import notifier <EOL> from st2common . constants import action as action_constants <... |
<s> from st2api . controllers . v1 . actions import ActionsController <EOL> from st2api . controllers . v1 . actionalias import ActionAliasController <EOL> from st2api . controllers . v1 . actionexecutions import ActionExecutionsController <EOL> from st2api . controllers . v1 . aliasexecution import ActionAliasExecutio... |
<s> import httplib <EOL> import mock <EOL> import st2common . bootstrap . actionsregistrar as actions_registrar <EOL> from tests import FunctionalTest <EOL> @ mock . patch ( '<STR_LIT>' , { } ) <EOL> class PacksViewsControllerTestCase ( FunctionalTest ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> super (... |
<s> import os <EOL> import unittest2 <EOL> from st2auth . backends import get_available_backends <EOL> BASE_DIR = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> class AuthenticationBackendsTestCase ( unittest2 . TestCase ) : <EOL> def test_flat_file_backend_is_available_by_default ( self ) : <EOL> avail... |
<s> from st2client . models import core <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> class ActionAlias ( core . Resource ) : <EOL> _alias = '<STR_LIT>' <EOL> _display_name = '<STR_LIT>' <EOL> _plural = '<STR_LIT>' <EOL> _plural_display_name = '<STR_LIT>' <EOL> _url_path = '<STR_LIT>' <EOL> _repr_attributes = [ '<S... |
<s> import os <EOL> import json <EOL> import mock <EOL> import tempfile <EOL> import requests <EOL> import logging <EOL> from tests import base <EOL> from st2client import shell <EOL> LOG = logging . getLogger ( __name__ ) <EOL> USERNAME = '<STR_LIT>' <EOL> PASSWORD = '<STR_LIT>' <EOL> HEADERS = { '<STR_LIT>' : '<STR_L... |
<s> TRIGGER_PAYLOAD_PREFIX = '<STR_LIT>' <EOL> RULE_TYPE_STANDARD = '<STR_LIT>' <EOL> RULE_TYPE_BACKSTOP = '<STR_LIT>' </s>
|
<s> from st2common . exceptions import StackStormBaseException <EOL> __all__ = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> class AccessDeniedError ( StackStormBaseException ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , message , user_db ) : <EOL> self . user_db = user_db <EOL> supe... |
<s> from st2common . models . api . base import BaseAPI <EOL> from st2common . models . db . sensor import SensorTypeDB <EOL> from st2common . models . utils import sensor_type_utils <EOL> class SensorTypeAPI ( BaseAPI ) : <EOL> model = SensorTypeDB <EOL> schema = { <EOL> '<STR_LIT:type>' : '<STR_LIT:object>' , <EOL> '... |
<s> import six <EOL> import string <EOL> from st2common . util import schema as util_schema <EOL> from st2common . models . api . notification import NotificationSubSchemaAPI <EOL> class Node ( object ) : <EOL> schema = { <EOL> "<STR_LIT:title>" : "<STR_LIT>" , <EOL> "<STR_LIT:description>" : "<STR_LIT>" , <EOL> "<STR_... |
<s> from st2common import log as logging <EOL> from st2common import transport <EOL> from st2common . models . db . trigger import triggertype_access , trigger_access , triggerinstance_access <EOL> from st2common . persistence . base import ( Access , ContentPackResource ) <EOL> from st2common . transport import utils ... |
<s> import logging <EOL> import st2common . config as config <EOL> from st2common . transport . bootstrap_utils import register_exchanges <EOL> def _setup ( ) : <EOL> config . parse_args ( ) <EOL> logging . basicConfig ( format = '<STR_LIT>' , <EOL> level = logging . DEBUG ) <EOL> def main ( ) : <EOL> _setup ( ) <EOL> ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.