code stringlengths 9 256k |
|---|
<s> import sys , os <EOL> extensions = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> templates_path = [ '<STR_LIT>' ] <EOL> source_suffix = '<STR_LIT>' <EOL> master_doc = '<STR_LIT:index>' <EOL> project = u'<STR_LIT>' <EOL> copyright = u'<STR_LIT>' <EOL> version = '<STR_LIT>' <EOL> release = '<STR_LIT>' <EOL> exclu... |
<s> from rest_framework import viewsets <EOL> from rest_framework import views <EOL> from rest_framework . permissions import IsAuthenticated <EOL> class DayWatchView ( ) : <EOL> """<STR_LIT>""" <EOL> permission_classes = ( IsAuthenticated , ) <EOL> def ex ( self , field ) : <EOL> return self . request . QUERY_PARAMS .... |
<s> import os <EOL> import warnings <EOL> import importlib <EOL> from datetime import datetime <EOL> from django . utils import timezone <EOL> from core . models import Run , ErrorLog , ITEM_MODEL <EOL> from core . utils import make_logger <EOL> from twisted . internet import reactor <EOL> from scrapy . crawler import ... |
<s> '''<STR_LIT>''' <EOL> import numpy as np <EOL> import scipy . sparse as sparse <EOL> def getresidual ( b , A , x , N ) : <EOL> '''<STR_LIT>''' <EOL> return b . reshape ( ( N , <NUM_LIT:1> ) ) - flexibleMmult ( A , x . reshape ( ( N , <NUM_LIT:1> ) ) ) <EOL> def flexibleMmult ( x , y ) : <EOL> '''<STR_LIT>''' <EOL> ... |
<s> from django import forms <EOL> class SignupForm ( forms . Form ) : <EOL> username = forms . CharField ( ) <EOL> email = forms . EmailField ( ) <EOL> first_name = forms . CharField ( ) <EOL> password1 = forms . CharField ( ) <EOL> def clean ( self ) : <EOL> data = self . cleaned_data <EOL> data [ '<STR_LIT:username>... |
<s> """<STR_LIT>""" <EOL> import os <EOL> import shutil <EOL> from pip . backwardcompat import urlparse , urllib <EOL> from pip . exceptions import BadCommand <EOL> from pip . log import logger <EOL> from pip . util import display_path , backup_dir , find_command , ask , rmtree <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT... |
<s> from fabric . api import local , cd <EOL> import os <EOL> PROJECT_ROOT = os . path . abspath ( os . path . dirname ( __file__ ) ) <EOL> def publish ( test = '<STR_LIT:yes>' ) : <EOL> '''<STR_LIT>''' <EOL> if test == '<STR_LIT:yes>' : <EOL> validate ( ) <EOL> from stream_framework import __version__ <EOL> tag_name =... |
<s> import pickle <EOL> from stream_framework . serializers . base import BaseSerializer , BaseAggregatedSerializer <EOL> class PickleSerializer ( BaseSerializer ) : <EOL> def loads ( self , serialized_activity ) : <EOL> activity = pickle . loads ( serialized_activity ) <EOL> return activity <EOL> def dumps ( self , ac... |
<s> from stream_framework . feeds . base import BaseFeed <EOL> from stream_framework . tests . utils import FakeActivity <EOL> from stream_framework . tests . utils import Pin <EOL> from stream_framework . verbs . base import Love as LoveVerb <EOL> import datetime <EOL> from mock import patch <EOL> import unittest <EOL... |
<s> from pandas import read_csv <EOL> iris2 = read_csv ( '<STR_LIT>' ) </s>
|
<s> """<STR_LIT>""" <EOL> from datetime import datetime <EOL> import unittest <EOL> from cube import time_utils <EOL> class TestMetric ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . now = datetime ( <NUM_LIT> , <NUM_LIT:7> , <NUM_LIT:6> , <NUM_LIT:20> , <NUM_LIT> , <NUM_LIT:16> , <NUM_LIT> ) <EOL> de... |
<s> import os <EOL> from healthcheck . storage import HealthCheck , Item , User , UserNotFoundError <EOL> def get_value ( key ) : <EOL> try : <EOL> value = os . environ [ key ] <EOL> except KeyError : <EOL> msg = u"<STR_LIT>" u"<STR_LIT>" . format ( key ) <EOL> raise Exception ( msg ) <EOL> return value <EOL> class Zab... |
<s> import unittest <EOL> import mock <EOL> from hm import managers , config <EOL> class BaseManagerTestCase ( unittest . TestCase ) : <EOL> def test_get_user_data_txt ( self ) : <EOL> manager = managers . BaseManager ( { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } ) <EOL> data = manager . get_user_data ( ) <EOL> self . as... |
<s> from django import forms <EOL> from django . core . exceptions import ObjectDoesNotExist <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from django . db import models <EOL> from django . utils . translation import ugettext as _ <EOL> from django . conf import settings <EOL> from django . co... |
<s> '''<STR_LIT>''' <EOL> import sys <EOL> import profile <EOL> import qstkutil . DataAccess as DA <EOL> import numpy as np <EOL> import time <EOL> import datetime as dt <EOL> def main ( ) : <EOL> da = DA . DataAccess ( DA . DataSource . NORGATE ) ; <EOL> symbol_list = list ( ) <EOL> symbol_list . append ( "<STR_LIT>" ... |
<s> '''<STR_LIT>''' <EOL> import DataAccessNew as da <EOL> import tables as pt <EOL> import numpy as np <EOL> from itertools import izip <EOL> import time <EOL> import dircache <EOL> def getStocks ( listOfPaths ) : <EOL> listOfStocks = list ( ) <EOL> print "<STR_LIT>" <EOL> fileExtensionToRemove = "<STR_LIT>" <EOL> for... |
<s> from capstone import * <EOL> from elftools . elf . elffile import ELFFile <EOL> from elftools . elf . sections import SymbolTableSection <EOL> import sys , os <EOL> import signals <EOL> class Disassembler ( ) : <EOL> memory = [ ] <EOL> def __init__ ( self , filename ) : <EOL> self . filename = filename <EOL> self .... |
<s> from pylons import response , request <EOL> from turbulenz_local . decorators import jsonify <EOL> from turbulenz_local . lib . servicestatus import ServiceStatus , InvalidStatus <EOL> from turbulenz_local . controllers import BaseController <EOL> class ServicestatusController ( BaseController ) : <EOL> @ classmeth... |
<s> from time import strftime , gmtime <EOL> from logging import getLogger <EOL> from os . path import dirname , join as path_join <EOL> from tornado . httpserver import HTTPServer <EOL> from tornado . ioloop import IOLoop <EOL> from tornado . web import Application , FallbackHandler <EOL> from tornado . wsgi import WS... |
<s> """<STR_LIT>""" <EOL> import math <EOL> __version__ = '<STR_LIT>' <EOL> PRECISION = <NUM_LIT> <EOL> def tidy ( m , tolerance = PRECISION ) : <EOL> def __tidy ( x , tolerance ) : <EOL> if abs ( x ) < tolerance : <EOL> return <NUM_LIT:0> <EOL> return x <EOL> return tuple ( [ __tidy ( x , tolerance ) for x in m ] ) <E... |
<s> """<STR_LIT>""" <EOL> from . mainwindow import MainWindow , QtUserInterface <EOL> from . config import QtControlsConfiguration <EOL> from . surfaceManager import QtSurfaceManager </s>
|
<s> """<STR_LIT>""" <EOL> import curses <EOL> class CursesControlsConfiguration ( ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( ) . __init__ ( ) <EOL> self . move_left = [ '<STR_LIT:4>' ] <EOL> self . move_up = [ '<STR_LIT>' ] <EOL> self . move_right = [ '<STR_LIT>' ] <EOL>... |
<s> """<STR_LIT>""" <EOL> from . spell import Spell <EOL> from . spellbook import SpellBook , SpellEntry </s>
|
<s> """<STR_LIT>""" <EOL> import collections <EOL> import logging <EOL> import random <EOL> class BSPSection ( ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , corner1 = None , corner2 = None , parent = None , <EOL> direction = None ) : <EOL> """<STR_LIT>""" <EOL> self . corner1 = corner1 <EOL> self . corner2 = co... |
<s> """<STR_LIT>""" <EOL> from hymn . types . either import Left , Right <EOL> from pyherc . aspects import log_debug , log_info <EOL> class WaitAction ( ) : <EOL> """<STR_LIT>""" <EOL> @ log_debug <EOL> def __init__ ( self , character , time_to_wait ) : <EOL> """<STR_LIT>""" <EOL> super ( ) . __init__ ( ) <EOL> self .... |
<s> """<STR_LIT>""" <EOL> from mockito import mock <EOL> from pyherc . data . effects import Poison <EOL> class PoisonBuilder ( ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( ) . __init__ ( ) <EOL> self . duration = <NUM_LIT:1> <EOL> self . frequency = <NUM_LIT:1> <EOL> self... |
<s> """<STR_LIT>""" <EOL> pass </s>
|
<s> """<STR_LIT>""" <EOL> from random import Random <EOL> from hamcrest import assert_that , equal_to , is_ , is_not <EOL> from mockito import any , mock , verify , when <EOL> from pyherc . ports import attack , set_action_factory <EOL> from pyherc . test . builders import ( ActionFactoryBuilder , CharacterBuilder , <E... |
<s> import zipfile , sys <EOL> def testAndroid ( file ) : <EOL> isAndroid = False <EOL> if zipfile . is_zipfile ( file ) : <EOL> hasClasses = False <EOL> hasManifest = False <EOL> zFile = zipfile . ZipFile ( file , "<STR_LIT:r>" ) <EOL> for name in zFile . namelist ( ) : <EOL> if name . lower ( ) == "<STR_LIT>" : <EOL>... |
<s> import gdb <EOL> def format_plan_tree ( tree , indent = <NUM_LIT:0> ) : <EOL> '<STR_LIT>' <EOL> if ( str ( tree ) == '<STR_LIT>' ) : <EOL> return '<STR_LIT>' <EOL> retval = '''<STR_LIT>''' % { <EOL> '<STR_LIT:type>' : format_type ( tree [ '<STR_LIT:type>' ] ) , <EOL> '<STR_LIT>' : float ( tree [ '<STR_LIT>' ] ) , <... |
<s> import os <EOL> import re <EOL> from . classes import PyModule <EOL> from . ast_scanner import ast_scan_file <EOL> from . frameworks import django <EOL> from . import utils , log <EOL> max_directory_depth = <NUM_LIT:20> <EOL> max_file_size = <NUM_LIT> * <NUM_LIT> <EOL> _dir_ignore = re . compile ( r'<STR_LIT>' ) <E... |
<s> from __future__ import absolute_import , print_function <EOL> import tweepy <EOL> consumer_key = "<STR_LIT>" <EOL> consumer_secret = "<STR_LIT>" <EOL> access_token = "<STR_LIT>" <EOL> access_token_secret = "<STR_LIT>" <EOL> auth = tweepy . OAuthHandler ( consumer_key , consumer_secret ) <EOL> auth . secure = True <... |
<s> """<STR_LIT>""" <EOL> from cStringIO import StringIO <EOL> from struct import pack , calcsize , unpack <EOL> class EOF ( Exception ) : <EOL> pass <EOL> class Codec ( object ) : <EOL> def __init__ ( self , stream ) : <EOL> self . stream = stream <EOL> self . nwrote = <NUM_LIT:0> <EOL> self . nread = <NUM_LIT:0> <EOL... |
<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> from . choices import Choices <EOL> __author__ = '<STR_LIT>' <EOL> __contact__ = "<STR_LIT>" <EOL> __homepage__ = "<STR_LIT>" <EOL> __version__ = "<STR_LIT>" </s>
|
<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import atom . data <EOL> import gdata . apps <EOL> import gdata . apps_property <EOL> import gdata . data <EOL> pyproperty = property <EOL> LABEL_NAME = '<STR_LIT:label>' <EOL> FILTER_FROM_NAME = '<STR_LIT>' <EOL> FILTER_TO_NAME = '<STR_LIT:to>' <EOL> FILTER_SUBJ... |
<s> import oauth2 as oauth <EOL> import json <EOL> import urllib <EOL> import unittest <EOL> import random <EOL> app_id = "<STR_LIT>" <EOL> consumer_key = '<STR_LIT>' <EOL> consumer_secret = '<STR_LIT>' <EOL> oauth_key = '<STR_LIT>' <EOL> oauth_secret = '<STR_LIT>' <EOL> consumer = oauth . Consumer ( key = consumer_key... |
<s> from test_api import StashboardTest <EOL> class ImageTest ( StashboardTest ) : <EOL> def test_wrong_version ( self ) : <EOL> response = self . get ( "<STR_LIT>" ) <EOL> self . assertEquals ( response . status_code , <NUM_LIT> ) <EOL> self . assertEquals ( response . headers [ "<STR_LIT:Content-Type>" ] , "<STR_LIT:... |
<s> import time <EOL> import unittest <EOL> from twilio import jwt <EOL> from twilio . task_router import TaskRouterCapability <EOL> class TaskRouterCapabilityTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . account_sid = "<STR_LIT>" <EOL> self . auth_token = "<STR_LIT>" <EOL> self . workspace_sid... |
<s> from nose . tools import assert_equal , assert_raises <EOL> from mock import patch <EOL> from twilio . exceptions import TwilioException <EOL> from twilio . rest import TwilioRestClient <EOL> from twilio . rest . base import find_credentials <EOL> def test_creds_not_found ( ) : <EOL> """<STR_LIT>""" <EOL> assert_eq... |
<s> from twilio . rest . base import TwilioClient <EOL> from twilio . rest . resources import ( <EOL> UNSET_TIMEOUT , <EOL> Accounts , <EOL> Addresses , <EOL> Applications , <EOL> AuthorizedConnectApps , <EOL> CallFeedback , <EOL> CallFeedbackFactory , <EOL> CallerIds , <EOL> Calls , <EOL> Conferences , <EOL> ConnectAp... |
<s> from twilio . rest . base import TwilioClient <EOL> from twilio . rest . resources . trunking import ( <EOL> CredentialLists , <EOL> IpAccessControlLists , <EOL> OriginationUrls , <EOL> PhoneNumbers , <EOL> Trunks <EOL> ) <EOL> from twilio . rest . resources import UNSET_TIMEOUT <EOL> class TwilioTrunkingClient ( T... |
<s> """<STR_LIT>""" <EOL> from zope . interface import implements <EOL> from axiom . item import Item <EOL> from axiom . attributes import reference <EOL> from imaginary . iimaginary import IMovementRestriction , IActor <EOL> from imaginary . eimaginary import ActionFailure <EOL> from imaginary . events import ThatDoes... |
<s> from twisted . trial import unittest <EOL> from axiom import store <EOL> from imaginary import iimaginary , objects <EOL> from imaginary . test import commandutils <EOL> class ActorTest ( unittest . TestCase , commandutils . LanguageMixin ) : <EOL> def setUp ( self ) : <EOL> self . store = store . Store ( ) <EOL> d... |
<s> from twisted . conch . insults import insults <EOL> from twisted . python import log <EOL> import unicodedata <EOL> _widths = { '<STR_LIT>' : <NUM_LIT:2> , '<STR_LIT:N>' : <NUM_LIT:1> , '<STR_LIT:F>' : <NUM_LIT:2> , '<STR_LIT:H>' : <NUM_LIT:1> , '<STR_LIT>' : <NUM_LIT:1> , '<STR_LIT:A>' : <NUM_LIT:1> } <EOL> def wi... |
<s> from twisted . internet import reactor , defer <EOL> from twisted . web import server , resource <EOL> from ldaptor . protocols . ldap import ldapclient , ldapsyntax , ldapconnector , distinguishedname <EOL> from ldaptor import ldapfilter <EOL> class LDAPConfig ( object ) : <EOL> def __init__ ( self , <EOL> baseDN ... |
<s> escapedChars = r'<STR_LIT>' <EOL> escapedChars_leading = r'<STR_LIT>' <EOL> escapedChars_trailing = r'<STR_LIT>' <EOL> def escape ( s ) : <EOL> r = '<STR_LIT>' <EOL> r_trailer = '<STR_LIT>' <EOL> if s and s [ <NUM_LIT:0> ] in escapedChars_leading : <EOL> r = '<STR_LIT:\\>' + s [ <NUM_LIT:0> ] <EOL> s = s [ <NUM_LIT... |
<s> """<STR_LIT>""" <EOL> from twisted . trial import unittest <EOL> from ldaptor import delta , entry <EOL> class TestDiffEntry ( unittest . TestCase ) : <EOL> def testEqual ( self ) : <EOL> a = entry . BaseLDAPEntry ( dn = '<STR_LIT>' , <EOL> attributes = { <EOL> '<STR_LIT:foo>' : [ '<STR_LIT:bar>' ] , <EOL> } ) <EOL... |
<s> from twisted . python . util import sibpath <EOL> from nevow . loaders import xmlfile <EOL> from nevow . athena import LiveElement , expose <EOL> class ChatRoom ( object ) : <EOL> def __init__ ( self ) : <EOL> self . chatters = [ ] <EOL> def wall ( self , message ) : <EOL> for chatter in self . chatters : <EOL> cha... |
<s> from twisted . application import internet , service <EOL> from nevow import appserver <EOL> from nevow import loaders <EOL> from nevow import rend <EOL> from nevow import tags as T <EOL> class Page ( rend . Page ) : <EOL> """<STR_LIT>""" <EOL> addSlash = True <EOL> docFactory = loaders . stan ( <EOL> T . html [ <E... |
<s> class Env ( object ) : <EOL> user = '<STR_LIT:test>' <EOL> password = '<STR_LIT:test>' <EOL> port = <NUM_LIT> <EOL> host = '<STR_LIT:localhost>' <EOL> dbname = '<STR_LIT>' <EOL> development = False <EOL> env = Env ( ) </s>
|
<s> """<STR_LIT>""" <EOL> class RenderError ( Exception ) : <EOL> """<STR_LIT>""" <EOL> class MissingRenderMethod ( RenderError ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , element , renderName ) : <EOL> RenderError . __init__ ( self , element , renderName ) <EOL> self . element = element <EOL> self . renderNa... |
<s> import calendar <EOL> import datetime <EOL> from nevow import tags as t , url , itaglibrary , rend , static <EOL> _calendar_css = """<STR_LIT>""" <EOL> calendarCSS = t . style ( type_ = "<STR_LIT>" ) [ _calendar_css ] <EOL> calendarCSSFile = static . File ( _calendar_css , "<STR_LIT>" ) <EOL> class CalendarComponen... |
<s> """<STR_LIT>""" <EOL> from twisted . python . versions import Version <EOL> from twisted . trial . unittest import SynchronousTestCase <EOL> import nevow <EOL> class VersionTests ( SynchronousTestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_version ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertIsInstance ( n... |
<s> from twisted . internet . task import react <EOL> from _utils import print_response <EOL> import treq <EOL> def main ( reactor , * args ) : <EOL> d = treq . get ( '<STR_LIT>' ) <EOL> d . addCallback ( print_response ) <EOL> return d <EOL> react ( main , [ ] ) </s>
|
<s> from twisted . logger import extractField <EOL> fmt = ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> ) <EOL> def analyze ( event ) : <EOL> if event . get ( "<STR_LIT>" ) == fmt : <EOL> a = extractField ( "<STR_LIT>" , event ) <EOL> b = extractField ( "<STR_LIT>" , event ) <EOL> print ( "<STR_LIT>" + repr ( a + b ) ) <... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , division , print_function <EOL> from collections import deque <EOL> from zope . interface import implementer <EOL> from . import IWorker <EOL> from . _convenience import Quit <EOL> class Statistics ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ (... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , division <EOL> import struct <EOL> from twisted . conch . ssh . _cryptography_backports import ( <EOL> intFromBytes as int_from_bytes , intToBytes as int_to_bytes ) <EOL> from twisted . python . compat import _PY3 , long <EOL> def NS ( t ) : <EOL> """<S... |
<s> """<STR_LIT>""" <EOL> from threading import Thread <EOL> from Queue import Queue , Empty <EOL> import sys <EOL> from zope . interface import implementer <EOL> from twisted . internet . interfaces import IReactorFDSet <EOL> from twisted . internet import posixbase <EOL> from twisted . internet . posixbase import _NO... |
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> __metaclass__ = type <EOL> import signal <EOL> import time <EOL> import inspect <EOL> from twisted . internet . abstract import FileDescriptor <EOL> from twisted . internet . error import ReactorAlreadyRunning , ReactorNotRestartable <EOL... |
<s> """<STR_LIT>""" <EOL> import sys <EOL> from . _levels import LogLevel <EOL> class LoggingFile ( object ) : <EOL> """<STR_LIT>""" <EOL> softspace = <NUM_LIT:0> <EOL> def __init__ ( self , logger , level = LogLevel . info , encoding = None ) : <EOL> """<STR_LIT>""" <EOL> self . level = level <EOL> self . log = logger... |
<s> """<STR_LIT>""" <EOL> import StringIO <EOL> import hmac <EOL> import base64 <EOL> import itertools <EOL> from collections import OrderedDict <EOL> from zope . interface import implements <EOL> from twisted . internet import defer <EOL> from twisted . trial import unittest , util <EOL> from twisted import mail <EOL>... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , division <EOL> from zope . interface import implementer <EOL> from twisted import plugin <EOL> from twisted . cred . checkers import AllowAnonymousAccess <EOL> from twisted . cred . strcred import ICheckerFactory <EOL> from twisted . cred . credentials ... |
<s> """<STR_LIT>""" </s>
|
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> import os <EOL> def which ( name , flags = os . X_OK ) : <EOL> """<STR_LIT>""" <EOL> result = [ ] <EOL> exts = list ( filter ( None , os . environ . get ( '<STR_LIT>' , '<STR_LIT>' ) . split ( os . pathsep ) ) ) <EOL> path = os . environ ... |
<s> """<STR_LIT>""" <EOL> from . _url import URL <EOL> __all__ = [ <EOL> "<STR_LIT>" , <EOL> ] </s>
|
<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import sys <EOL> for x in sys . argv [ <NUM_LIT:1> : ] : <EOL> print ( x ) </s>
|
<s> """<STR_LIT>""" <EOL> from twisted . trial import unittest <EOL> from twisted . manhole import explorer <EOL> """<STR_LIT>""" <EOL> class SomeDohickey : <EOL> def __init__ ( self , * a ) : <EOL> self . __dict__ [ '<STR_LIT:args>' ] = a <EOL> def bip ( self ) : <EOL> return self . args <EOL> class BrowserTests ( uni... |
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> from zope . interface import Interface , implementer , implementedBy <EOL> from twisted . python . compat import NativeStringIO <EOL> from twisted . trial import unittest <EOL> from twisted . test . proto_helpers import StringTransport <E... |
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> from twisted . trial import unittest <EOL> from twisted . python import usage <EOL> class WellBehaved ( usage . Options ) : <EOL> optParameters = [ [ '<STR_LIT>' , '<STR_LIT:w>' , '<STR_LIT:default>' , '<STR_LIT>' ] , <EOL> [ '<STR_LIT>' ... |
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> import time <EOL> from twisted . internet import reactor , task <EOL> from twisted . python import failure , log <EOL> from twisted . trial import unittest , reporter , _synctest <EOL> def makeFailure ( ) : <EOL> """<STR_LIT>""" <EOL> try... |
<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> from twisted . web . _auth . wrapper import HTTPAuthSessionWrapper <EOL> from twisted . web . _auth . basic import BasicCredentialFactory <EOL> from twisted . web . _auth . digest import DigestCredentialFactory <EOL> __all__ = [ <EOL> "<S... |
<s> import sys <EOL> import time <EOL> from twisted . internet import reactor <EOL> from twisted . python import log <EOL> import txmongo <EOL> def insertData ( conn ) : <EOL> print "<STR_LIT>" <EOL> collection = conn . foo . test <EOL> for x in range ( <NUM_LIT> ) : <EOL> d = collection . insert ( { "<STR_LIT>" : x * ... |
<s> from __future__ import absolute_import , division <EOL> from txmongo . database import Database <EOL> from txmongo . protocol import MongoProtocol , Query <EOL> from txmongo . connection import MongoConnection , MongoConnectionPool , lazyMongoConnection , lazyMongoConnectionPool <EOL> assert Database <EOL> assert M... |
<s> NOTHING = '<STR_LIT>' <EOL> class StateError ( Exception ) : <EOL> """<STR_LIT:U+0020>""" <EOL> class StateMachine : <EOL> initialState = None <EOL> states = None <EOL> def __init__ ( self , initialState = None ) : <EOL> if initialState is None : <EOL> initialState = self . initialState <EOL> self . state = self . ... |
<s> """<STR_LIT>""" <EOL> from pycascading . helpers import * <EOL> def main ( ) : <EOL> flow = Flow ( ) <EOL> repeats = flow . source ( Hfs ( TextDelimited ( Fields ( [ '<STR_LIT>' , '<STR_LIT>' ] ) , '<STR_LIT:U+0020>' , <EOL> [ String , Integer ] ) , <EOL> '<STR_LIT>' ) ) <EOL> output = flow . tsv_sink ( '<STR_LIT>'... |
<s> import json <EOL> import requests <EOL> from gnippy import config <EOL> from gnippy . errors import * <EOL> def _generate_rules_url ( url ) : <EOL> """<STR_LIT>""" <EOL> if "<STR_LIT>" not in url : <EOL> raise BadPowerTrackUrlException ( "<STR_LIT>" ) <EOL> if "<STR_LIT>" not in url : <EOL> raise BadPowerTrackUrlEx... |
<s> """<STR_LIT>""" <EOL> import os , sys <EOL> try : <EOL> import nbt <EOL> except ImportError : <EOL> extrasearchpath = os . path . realpath ( os . path . join ( __file__ , os . pardir , os . pardir ) ) <EOL> if not os . path . exists ( os . path . join ( extrasearchpath , '<STR_LIT>' ) ) : <EOL> raise <EOL> sys . pa... |
<s> def if_none ( val , default ) : <EOL> """<STR_LIT>""" <EOL> return defualt if val is None else val </s>
|
<s> import os <EOL> import sys <EOL> from setuptools import setup <EOL> from setuptools . command . install import install <EOL> from distutils . command . build import build <EOL> class binding_build ( build ) : <EOL> """<STR_LIT>""" <EOL> def finalize_options ( self ) : <EOL> if not os . path . exists ( '<STR_LIT>' )... |
<s> import sys , os , numpy <EOL> def isfloat ( x ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> a = float ( x ) <EOL> except ValueError : <EOL> return False <EOL> else : <EOL> return True <EOL> def isint ( x ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> a = float ( x ) <EOL> b = int ( a ) <EOL> except ValueError : <EOL> re... |
<s> """<STR_LIT>""" <EOL> from quick_orm . core import Database <EOL> from sqlalchemy import Column , String , Text , DateTime , func <EOL> __metaclass__ = Database . DefaultMeta <EOL> @ Database . many_to_many ( '<STR_LIT>' ) <EOL> class User : <EOL> name = Column ( String ( <NUM_LIT> ) , nullable = False , unique = T... |
<s> """<STR_LIT>""" <EOL> from docutils . nodes import NodeVisitor , SparseNodeVisitor , Part , Inline , TextElement , title_reference <EOL> import re <EOL> from sphinx . addnodes import desc , desc_type , desc_signature , desc_addname <EOL> class desc_attrtype ( Part , Inline , TextElement ) : <EOL> @ staticmethod <EO... |
<s> """<STR_LIT>""" <EOL> from fontTools . misc . py23 import StringIO <EOL> from xmlWriter import XMLWriter <EOL> class Logger ( object ) : <EOL> def __init__ ( self ) : <EOL> self . _file = StringIO ( ) <EOL> self . _writer = XMLWriter ( self . _file , encoding = "<STR_LIT:utf-8>" ) <EOL> def __del__ ( self ) : <EOL>... |
<s> from robofab . pens . pointPen import AbstractPointPen <EOL> class ClockwiseTestPointPen ( AbstractPointPen ) : <EOL> def __init__ ( self ) : <EOL> self . _points = [ ] <EOL> def beginPath ( self ) : <EOL> pass <EOL> def endPath ( self ) : <EOL> pass <EOL> def addPoint ( self , pt , segmentType = None , smooth = Fa... |
<s> """<STR_LIT>""" <EOL> import collections <EOL> from rinse import NS_MAP <EOL> from rinse . util import safe_parse_string <EOL> class Response ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , response ) : <EOL> """<STR_LIT>""" <EOL> self . _response = response <EOL> self . _doc = safe_parse_string ( re... |
<s> import fply . dylib <EOL> import fply . rpc <EOL> if fply . rpc . available ( ) : <EOL> FPLY = fply . rpc . FPLY <EOL> elif fply . dylib . available ( ) : <EOL> FPLY = fply . dylib . FPLY <EOL> else : <EOL> import sys <EOL> sys . stderr . write ( "<STR_LIT>" ) <EOL> sys . stderr . write ( "<STR_LIT>" ) <EOL> from f... |
<s> from __future__ import absolute_import <EOL> from clay import app <EOL> @ app . route ( '<STR_LIT:/>' , methods = [ '<STR_LIT:GET>' ] ) <EOL> def hello ( ) : <EOL> '''<STR_LIT>''' <EOL> return '<STR_LIT>' </s>
|
<s> import os . path <EOL> from unittest import TestCase <EOL> import py_find_injection <EOL> SAMPLE_PATH = os . path . realpath ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) ) <EOL> class TestSimple ( TestCase ) : <EOL> def test_good_file ( self ) : <EOL> errors = py_find_injection . check ( os... |
<s> from struct import unpack <EOL> from vertica_python . vertica . messages . message import BackendMessage <EOL> class BackendKeyData ( BackendMessage ) : <EOL> def __init__ ( self , data ) : <EOL> unpacked = unpack ( '<STR_LIT>' , data ) <EOL> self . pid = unpacked [ <NUM_LIT:0> ] <EOL> self . key = unpacked [ <NUM_... |
<s> from struct import pack <EOL> from vertica_python . vertica . messages . message import FrontendMessage <EOL> class Parse ( FrontendMessage ) : <EOL> def __init__ ( self , name , query , param_types ) : <EOL> self . name = name <EOL> self . query = query <EOL> self . param_types = param_types <EOL> def to_bytes ( s... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_AE = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_BQ = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_DK = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_GP = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_KH = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_MK = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_NZ = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT:64> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_n... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_SI = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_numb... |
<s> """<STR_LIT>""" <EOL> from . . phonemetadata import NumberFormat , PhoneNumberDesc , PhoneMetadata <EOL> PHONE_METADATA_TZ = PhoneMetadata ( id = '<STR_LIT>' , country_code = <NUM_LIT:255> , international_prefix = '<STR_LIT>' , <EOL> general_desc = PhoneNumberDesc ( national_number_pattern = '<STR_LIT>' , possible_... |
<s> """<STR_LIT>""" <EOL> import re <EOL> from . re_util import fullmatch <EOL> from . phonemetadata import PhoneMetadata <EOL> from . phonenumberutil import _extract_possible_number , _PLUS_CHARS_PATTERN <EOL> from . phonenumberutil import normalize_digits_only <EOL> def connects_to_emergency_number ( number , region_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.