code stringlengths 9 256k |
|---|
<s> from blaze . expr import * <EOL> from blaze . expr . math import * <EOL> from blaze . expr . math import abs as mathabs <EOL> x = symbol ( '<STR_LIT:x>' , '<STR_LIT>' ) <EOL> def test_math_shapes ( ) : <EOL> assert sin ( x ) . shape == x . shape <EOL> def test_abs ( ) : <EOL> assert abs ( x ) . isidentical ( mathab... |
<s> import datetime <EOL> import sys <EOL> from types import MethodType <EOL> from datashape import dshape <EOL> from datashape . util . testing import assert_dshape_equal <EOL> import pandas as pd <EOL> import pandas . util . testing as tm <EOL> import pytest <EOL> import numpy as np <EOL> import dask . array as da <E... |
<s> import numpy as np <EOL> from . util import collect , dshape <EOL> from . internal_utils import remove <EOL> from . coretypes import ( DataShape , Fixed , Var , Ellipsis , Record , Tuple , Unit , <EOL> date_ , datetime_ , TypeVar , to_numpy_dtype , Map , <EOL> Option , Categorical ) <EOL> from . typesets import flo... |
<s> from __future__ import absolute_import , division , print_function <EOL> from multipledispatch import Dispatcher <EOL> from datashape . dispatch import namespace <EOL> from . convert import convert <EOL> if '<STR_LIT>' not in namespace : <EOL> namespace [ '<STR_LIT>' ] = Dispatcher ( '<STR_LIT>' ) <EOL> append = na... |
<s> from __future__ import absolute_import , division , print_function <EOL> import pytest <EOL> from contextlib import contextmanager <EOL> from odo . utils import tmpfile <EOL> from odo . chunks import chunks <EOL> from odo import into , append , convert , resource , discover , odo <EOL> import datashape <EOL> import... |
<s> from __future__ import absolute_import , division , print_function <EOL> import numpy as np <EOL> from datashape import dshape , DataShape , Option , DateTime , string , TimeDelta <EOL> from datashape import Date , to_numpy_dtype , Tuple , String , Decimal <EOL> from datashape . predicates import isscalar , isnumer... |
<s> import errno <EOL> from functools import reduce <EOL> import io <EOL> import os <EOL> def subpaths ( path ) : <EOL> '''<STR_LIT>''' <EOL> def append_deeper ( acc , name ) : <EOL> return acc + [ acc [ - <NUM_LIT:1> ] + os . sep + name ] <EOL> drive , dirs = os . path . splitdrive ( path ) <EOL> dirs = dirs . split (... |
<s> from bitmerchant . network import BitcoinMainNet <EOL> from bitmerchant . network import BitcoinTestNet <EOL> from bitmerchant . network import LitecoinMainNet <EOL> from bitmerchant . network import DogecoinMainNet <EOL> from bitmerchant . network import BlockCypherTestNet <EOL> from bitmerchant . wallet import Wa... |
<s> from . hash import bin_double_sha256 , bin_to_hex_reversed , hex_to_bin_reversed <EOL> def hex_to_bin_reversed_hashes ( hex_hashes ) : <EOL> return [ hex_to_bin_reversed ( h ) for h in hex_hashes ] <EOL> def calculate_merkle_pairs ( bin_hashes , hash_function = bin_double_sha256 ) : <EOL> """<STR_LIT>""" <EOL> hash... |
<s> """<STR_LIT>""" <EOL> from setuptools import setup , find_packages <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> description = """<STR_LIT>""" , <EOL> keywords = '<S... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import abdi_repoargs <EOL> import abdt_fs <EOL> _CONFIG_REPO_URL_FORMAT = """<STR_LIT>""" . strip ( ) <EOL> _CONFIG_REPO_PUSH_URL_FORMAT = """<STR_LIT>""" . strip ( ) ... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import abdt_naming <EOL> class Naming ( object ) : <EOL> def __init__ ( self , * schemes ) : <EOL> super ( Naming , self ) . __init__ ( ) <EOL> assert schemes <EOL> se... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import argparse <EOL> import phlsys_conduit <EOL> import phlsys_makeconduit <EOL> import phlsys_subcommand <EOL> import aoncmd_comment <EOL> import aoncmd_commentinlin... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import phlsys_namedtuple <EOL> CreatePasteResponse = phlsys_namedtuple . make_named_tuple ( <EOL> '<STR_LIT>' , <EOL> required = [ <EOL> '<STR_LIT:id>' , '<STR_LIT>' ,... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> class Error ( Exception ) : <EOL> pass <EOL> class Name ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , fq_name ) : <EOL> super ( Name , self ) . __init... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import contextlib <EOL> import logging <EOL> import multiprocessing <EOL> import multiprocessing . queues <EOL> @ contextlib . contextmanager <EOL> def logging_context... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import collections <EOL> import hashlib <EOL> import json <EOL> import os <EOL> import phlurl_request <EOL> _HashHexdigestHasChanged = collections . namedtuple ( <EOL>... |
<s> import fs <EOL> import datetime <EOL> import threading <EOL> import traceback <EOL> from coreutils import * <EOL> Events = enum ( <EOL> RuntimeNotification = '<STR_LIT:1>' <EOL> ) <EOL> class Node ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self ) : <EOL> '''<STR_LIT>''' <EOL> self . objs = None <EOL> s... |
<s> from pbr . hooks import backwards <EOL> from pbr . hooks import commands <EOL> from pbr . hooks import files <EOL> from pbr . hooks import metadata <EOL> def setup_hook ( config ) : <EOL> """<STR_LIT>""" <EOL> metadata_config = metadata . MetadataConfig ( config ) <EOL> metadata_config . run ( ) <EOL> backwards . B... |
<s> import setuptools <EOL> setuptools . setup ( setup_requires = [ '<STR_LIT>' ] , pbr = True ) </s>
|
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , print_function <EOL> import os <EOL> from os . path import join as join_path <EOL> from six import string_types <EOL> from . import shell , templates , utils <EOL> __author__ = "<STR_LIT>" <EOL> __copyright__ = "<STR_LIT>" <EOL> __license__ = "<STR_LIT>... |
<s> import argparse <EOL> import logging <EOL> import signal <EOL> import sys <EOL> from giftwrap . builders import Builder , BuilderFactory <EOL> from giftwrap . build_spec import BuildSpec <EOL> from giftwrap . color import ColorStreamHandler <EOL> LOG = logging . getLogger ( __name__ ) <EOL> def _setup_logger ( leve... |
<s> """<STR_LIT>""" <EOL> import collections <EOL> import cStringIO <EOL> import logging <EOL> import os <EOL> import urllib <EOL> from PIL import Image , ImageDraw , ImageFilter , ImageFont <EOL> from google . appengine . ext import ndb <EOL> class CloudMemeImage : <EOL> TOP = "<STR_LIT>" <EOL> MIDDLE = "<STR_LIT>" <E... |
<s> """<STR_LIT>""" <EOL> import random <EOL> from pymongo . errors import ConfigurationError <EOL> class ReadPreference : <EOL> """<STR_LIT>""" <EOL> PRIMARY = <NUM_LIT:0> <EOL> PRIMARY_PREFERRED = <NUM_LIT:1> <EOL> SECONDARY = <NUM_LIT:2> <EOL> SECONDARY_ONLY = <NUM_LIT:2> <EOL> SECONDARY_PREFERRED = <NUM_LIT:3> <EOL... |
<s> from graphserver . ext . osm . profiledb import main <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
|
<s> import unittest <EOL> from graphserver . core import * <EOL> import time <EOL> class TestGraph ( unittest . TestCase ) : <EOL> def test_basic ( self ) : <EOL> g = Graph ( ) <EOL> assert g <EOL> g . destroy ( ) <EOL> def test_empty_graph ( self ) : <EOL> g = Graph ( ) <EOL> assert g . vertices == [ ] <EOL> g . destr... |
<s> """<STR_LIT>""" <EOL> import json <EOL> import os <EOL> import os . path <EOL> import random <EOL> import opus <EOL> def load_settings ( globals ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> settings_file = os . environ [ "<STR_LIT>" ] <EOL> if not settings_file : <EOL> raise KeyError ( ) <EOL> except KeyError : <EOL... |
<s> import base64 <EOL> import hashlib <EOL> from urlparse import urlparse <EOL> from xml . parsers . expat import ExpatError <EOL> from xml . dom . minidom import parseString <EOL> import httplib <EOL> from opus . lib . prov import DriverBase <EOL> from opus . lib . prov import Image , Instance , Realm <EOL> from opus... |
<s> import os <EOL> import sys <EOL> import glob <EOL> import sphinx <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( '<STR_LIT>' ) ) <EOL> if sphinx . __version__ < "<STR_LIT>" : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> needs_sphinx = '<STR_LIT>' <EOL> extensions = [ '<STR_LIT>' , <EOL> '<STR_LIT>... |
<s> """<STR_LIT>""" <EOL> from . utils import * <EOL> from . files import * <EOL> from . feature_extractor import * <EOL> from . deprecation import * <EOL> from . import decorators <EOL> from . import exceptions <EOL> __all__ = [ _ for _ in dir ( ) if not _ . startswith ( '<STR_LIT:_>' ) ] </s>
|
<s> '''<STR_LIT>''' <EOL> import copy <EOL> from collections import OrderedDict <EOL> import six <EOL> import inspect <EOL> from sklearn . base import _pprint <EOL> class BaseTransformer ( object ) : <EOL> '''<STR_LIT>''' <EOL> @ classmethod <EOL> def _get_param_names ( cls ) : <EOL> '''<STR_LIT>''' <EOL> init = cls . ... |
<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 . create_table ( u'<STR_LIT>' , ( <EOL> ( u'<STR_LIT:id>' , self . gf ( '<STR_LIT>' ) ( primary_k... |
<s> from docutils import nodes <EOL> from docutils . parsers . rst import Parser , directives <EOL> from docutils . utils import new_document <EOL> from sphinx import addnodes <EOL> from sphinx . roles import XRefRole <EOL> from sphinx . locale import l_ <EOL> from sphinx . domains import Domain , ObjType <EOL> from sp... |
<s> import foursquare <EOL> from foursquare_accounts import accounts <EOL> app = accounts [ "<STR_LIT>" ] <EOL> client = foursquare . Foursquare ( client_id = app [ "<STR_LIT>" ] , <EOL> client_secret = app [ "<STR_LIT>" ] ) <EOL> client . set_access_token ( app [ "<STR_LIT>" ] ) <EOL> venue_id = "<STR_LIT>" <EOL> venu... |
<s> from twisted . trial import unittest <EOL> from twisted . internet . defer import inlineCallbacks <EOL> from twistar . exceptions import ReferenceNotSavedError <EOL> from utils import Boy , Girl , tearDownDB , initDB , Registry , Comment , Category <EOL> from utils import User , Avatar , Picture , FavoriteColor , N... |
<s> import json <EOL> from django . core . urlresolvers import reverse <EOL> from rest_framework import status <EOL> from rest_framework . test import APITestCase <EOL> class AbstractAPITestCase ( APITestCase ) : <EOL> '''<STR_LIT>''' <EOL> url_name = None <EOL> params = { } <EOL> method = None <EOL> is_resource = None... |
<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> from os . path import join <EOL> from . roots import JS_ROOT , PROJECT_ROOT <EOL> PIPELINE_COMPILERS = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) <EOL> PIPELINE_CSS_COMPRESSOR = '<STR_LIT>' <EOL> PIPELINE_JS_COMPRESSOR = '<STR_LIT>' <EOL> PIPELINE_CSS = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : ( <EOL> '<S... |
<s> import flask <EOL> from flask import current_app <EOL> blueprint = flask . Blueprint ( '<STR_LIT>' , __name__ , <EOL> template_folder = "<STR_LIT>" ) <EOL> @ blueprint . route ( "<STR_LIT:/>" ) <EOL> def home ( ) : <EOL> return flask . render_template ( "<STR_LIT>" ) </s>
|
<s> '''<STR_LIT>''' <EOL> import app <EOL> try : <EOL> application = app . DebuggerApp ( ) <EOL> application . mainloop ( ) <EOL> except KeyboardInterrupt : <EOL> print "<STR_LIT>" </s>
|
<s> from __future__ import generators <EOL> import os <EOL> import re <EOL> import sys <EOL> from codecs import BOM_UTF8 , BOM_UTF16 , BOM_UTF16_BE , BOM_UTF16_LE <EOL> compiler = None <EOL> BOMS = { <EOL> BOM_UTF8 : ( '<STR_LIT>' , None ) , <EOL> BOM_UTF16_BE : ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> BOM_UTF16_LE : ( '<... |
<s> from django . utils . translation import ugettext as _ <EOL> def upload_bucket ( ) : <EOL> '''<STR_LIT>''' <EOL> from django . conf import settings <EOL> return settings . AWS_UPLOAD_BUCKET <EOL> def upload_prefix_for_request ( request ) : <EOL> '''<STR_LIT>''' <EOL> from django . conf import settings <EOL> from re... |
<s> try : <EOL> import pypandoc <EOL> long_description = pypandoc . convert ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> except ( IOError , ImportError ) : <EOL> long_description = '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> import os <EOL> requirements_file = os . path . join ( os . path . abspath ( os . path . dirname ( __file_... |
<s> from django . conf . urls import url , include <EOL> from tastypie . api import Api <EOL> from . resources import DeviceResource <EOL> gcm_api = Api ( api_name = '<STR_LIT>' ) <EOL> gcm_api . register ( DeviceResource ( ) ) <EOL> urlpatterns = [ <EOL> url ( r'<STR_LIT>' , include ( gcm_api . urls ) ) ] </s>
|
<s> from __future__ import absolute_import , print_function <EOL> import codecs <EOL> import os <EOL> from . handler import Handler <EOL> from . code_runner import _CodeRunner <EOL> from bokeh . util . callback_manager import _check_callback <EOL> def _do_nothing ( ignored ) : <EOL> pass <EOL> class ServerLifecycleHand... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from bokeh . charts . builders . scatter_builder import ScatterBuilder <EOL> def test_list_input ( test_data ) : <EOL> scatter0 = ScatterBuilder ( x = test_data . list_data [ <NUM_LIT:0> ] ) <EOL> scatter0 . create ( ) <EOL> assert len ( scatter0 . ... |
<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> import sys <EOL> from bokeh import __version__ <EOL> from bokeh . settings import settings <EOL> from . . subcommand import Subcommand <EOL> class Info ( Subcommand ) : <EOL> '''<STR_LIT>''' <EOL> name = "<STR_LIT:info>" <EOL> help = "<STR_LIT>" <EO... |
<s> """<STR_LIT>""" <EOL> from . base import Renderer <EOL> from . vega_renderer import VegaRenderer , fig_to_vega <EOL> from . vincent_renderer import VincentRenderer , fig_to_vincent <EOL> from . fake_renderer import FakeRenderer , FullFakeRenderer </s>
|
<s> '''<STR_LIT>''' <EOL> __icons__ = [ <EOL> "<STR_LIT>" , "<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>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>... |
<s> from __future__ import absolute_import <EOL> import unittest <EOL> from bokeh . plotting import figure <EOL> from bokeh . models . ranges import DataRange1d <EOL> class TestGlyphRenderer ( unittest . TestCase ) : <EOL> def test_warning_about_colons_in_column_labels_for_axis ( self ) : <EOL> invalid_labels = [ '<STR... |
<s> """<STR_LIT:U+0020>""" <EOL> from __future__ import absolute_import <EOL> from bokeh . util . dependencies import import_required <EOL> pd = import_required ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> from os . path import dirname , join <EOL> autompg = pd . read_csv ( join ( dirname ( __file__ ) , '<STR_LIT>' ) ) </... |
<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> import logging <EOL> log = logging . getLogger ( __name__ ) <EOL> from tornado import gen <EOL> from . session import ServerSession <EOL> from . exceptions import ProtocolError <EOL> from bokeh . application . application import ServerContext , Sess... |
<s> from __future__ import absolute_import , print_function <EOL> from bokeh . server . server import Server <EOL> from tornado . ioloop import IOLoop <EOL> from tornado . httpclient import AsyncHTTPClient , HTTPRequest <EOL> from tornado . websocket import websocket_connect <EOL> def url ( server , prefix = "<STR_LIT>... |
<s> from __future__ import absolute_import <EOL> from mock import patch , Mock <EOL> import unittest <EOL> import bokeh . io as io <EOL> from bokeh . resources import Resources , _SessionCoordinates <EOL> from bokeh . document import Document <EOL> from bokeh . models . plots import Plot <EOL> class TestDefaultState ( ... |
<s> from __future__ import absolute_import <EOL> from functools import partial <EOL> import pytest <EOL> import bokeh . util . callback_manager as cbm <EOL> class _Good ( object ) : <EOL> def __init__ ( self ) : <EOL> self . last_name = None <EOL> self . last_old = None <EOL> self . last_new = None <EOL> def __call__ (... |
<s> '''<STR_LIT>''' <EOL> try : <EOL> from functools import lru_cache <EOL> except ImportError : <EOL> print ( "<STR_LIT>" ) <EOL> def lru_cache ( ) : <EOL> def dec ( f ) : <EOL> def _ ( * args , ** kws ) : <EOL> return f ( * args , ** kws ) <EOL> return _ <EOL> return dec <EOL> from os . path import dirname , join <EO... |
<s> from ggplot import aes , diamonds , geom_density , ggplot <EOL> import matplotlib . pyplot as plt <EOL> from bokeh import mpl <EOL> from bokeh . plotting import output_file , show <EOL> g = ggplot ( diamonds , aes ( x = '<STR_LIT>' , color = '<STR_LIT>' ) ) + geom_density ( ) <EOL> g . draw ( ) <EOL> plt . title ( ... |
<s> from __future__ import print_function <EOL> from bokeh . util . browser import view <EOL> from bokeh . document import Document <EOL> from bokeh . embed import file_html <EOL> from bokeh . models . glyphs import Patches <EOL> from bokeh . models import ( <EOL> Plot , DataRange1d , ColumnDataSource , ResizeTool <EOL... |
<s> from __future__ import print_function <EOL> from bokeh . util . browser import view <EOL> from bokeh . document import Document <EOL> from bokeh . embed import file_html <EOL> from bokeh . resources import INLINE <EOL> from bokeh . plotting import output_file <EOL> from bokeh . models import Plot <EOL> from bokeh .... |
<s> from __future__ import division <EOL> import numpy as np <EOL> from bokeh . plotting import figure , show , output_file <EOL> N = <NUM_LIT:20> <EOL> img = np . empty ( ( N , N ) , dtype = np . uint32 ) <EOL> view = img . view ( dtype = np . uint8 ) . reshape ( ( N , N , <NUM_LIT:4> ) ) <EOL> for i in range ( N ) : ... |
<s> from numpy import pi , cos , sin , linspace , roll <EOL> from bokeh . client import push_session <EOL> from bokeh . io import curdoc <EOL> from bokeh . plotting import figure <EOL> M = <NUM_LIT:5> <EOL> N = M * <NUM_LIT:10> + <NUM_LIT:1> <EOL> r_base = <NUM_LIT:8> <EOL> theta = linspace ( <NUM_LIT:0> , <NUM_LIT:2> ... |
<s> from bokeh . charts import BoxPlot , output_file , show <EOL> from bokeh . sampledata . autompg import autompg as df <EOL> p = BoxPlot ( df , values = '<STR_LIT>' , label = '<STR_LIT>' , marker = '<STR_LIT>' , <EOL> title = "<STR_LIT>" ) <EOL> output_file ( "<STR_LIT>" ) <EOL> show ( p ) </s>
|
<s> from bokeh . models import CustomJS , ColumnDataSource , BoxSelectTool , Range1d , Rect <EOL> from bokeh . plotting import figure , output_file , show <EOL> output_file ( "<STR_LIT>" ) <EOL> source = ColumnDataSource ( data = dict ( x = [ ] , y = [ ] , width = [ ] , height = [ ] ) ) <EOL> callback = CustomJS ( args... |
<s> from bokeh . plotting import figure , output_file , show <EOL> factors = [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" , "<STR_LIT:d>" , "<STR_LIT:e>" , "<STR_LIT:f>" , "<STR_LIT:g>" , "<STR_LIT:h>" ] <EOL> x = [ <NUM_LIT:50> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ]... |
<s> from bokeh . plotting import figure , output_file , show <EOL> output_file ( "<STR_LIT>" ) <EOL> p = figure ( plot_width = <NUM_LIT> ) <EOL> p . plot_height = <NUM_LIT> <EOL> p . circle ( [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> ] , [ <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:8> , <NUM_LIT:2... |
<s> from bokeh . plotting import figure , output_file , show <EOL> output_file ( "<STR_LIT>" ) <EOL> TOOLS = '<STR_LIT>' <EOL> p = figure ( plot_width = <NUM_LIT> , plot_height = <NUM_LIT> , title = None , tools = TOOLS ) <EOL> p . circle ( [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> ] , [ <NU... |
<s> import numpy as np <EOL> from bokeh . document import Document <EOL> from bokeh . models import ColumnDataSource , DataRange1d , Plot , LinearAxis , Grid <EOL> from bokeh . models . glyphs import Line <EOL> from bokeh . plotting import show <EOL> N = <NUM_LIT:30> <EOL> x = np . linspace ( - <NUM_LIT:2> , <NUM_LIT:2... |
<s> from __future__ import absolute_import , print_function <EOL> import pytest <EOL> import requests <EOL> import subprocess <EOL> import sys <EOL> import time <EOL> from requests . exceptions import ConnectionError <EOL> from . utils import write <EOL> def pytest_addoption ( parser ) : <EOL> parser . addoption ( <EOL... |
<s> import numpy as np <EOL> import pandas as pd <EOL> import xarray as xr <EOL> import datashader as ds <EOL> df = pd . DataFrame ( { '<STR_LIT:x>' : np . array ( ( [ <NUM_LIT:0.> ] * <NUM_LIT:10> + [ <NUM_LIT:1> ] * <NUM_LIT:10> ) ) , <EOL> '<STR_LIT:y>' : np . array ( ( [ <NUM_LIT:0.> ] * <NUM_LIT:5> + [ <NUM_LIT:1>... |
<s> from math import pi , sin , cos , sqrt , ceil <EOL> import pyparsing as PYP <EOL> import re <EOL> from lxml import etree as et <EOL> import pcbmode . config as config <EOL> from . import utils <EOL> from . point import Point <EOL> def svg_grammar ( ) : <EOL> """<STR_LIT>""" <EOL> comma = PYP . Literal ( "<STR_LIT:U... |
<s> import time <EOL> from os import makedirs , system , listdir <EOL> from os . path import join <EOL> import csv <EOL> import cPickle <EOL> import sys <EOL> import pyvision as pv <EOL> class ImageLog : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , topdir = "<STR_LIT>" , name = "<STR_LIT>" ) : <EOL> '''<STR_LIT>''... |
<s> import pyvision as pv <EOL> REDUCED_LEYE = pv . Point ( <NUM_LIT> + <NUM_LIT:64> , <NUM_LIT> - <NUM_LIT:20> ) <EOL> REDUCED_REYE = pv . Point ( <NUM_LIT> + <NUM_LIT> - <NUM_LIT:64> , <NUM_LIT> - <NUM_LIT:20> ) <EOL> REDUCED_SIZE = ( <NUM_LIT> , <NUM_LIT> ) </s>
|
<s> import unittest <EOL> import os . path <EOL> import numpy as np <EOL> import cv <EOL> import scipy . ndimage as ndi <EOL> import pyvision as pv <EOL> from pyvision . point . DetectorROI import DetectorROI <EOL> class DetectorHarris ( DetectorROI ) : <EOL> def __init__ ( self , block_size = <NUM_LIT:7> , aperture_si... |
<s> import pyvision as pv <EOL> import numpy as np <EOL> def BoundingRect ( * points ) : <EOL> '''<STR_LIT>''' <EOL> xs = [ ] <EOL> ys = [ ] <EOL> for each in points : <EOL> if type ( each ) == list or type ( each ) == tuple : <EOL> rect = BoundingRect ( * each ) <EOL> xs . append ( rect . x ) <EOL> xs . append ( rect ... |
<s> """<STR_LIT>""" <EOL> import os <EOL> machine_speed = <NUM_LIT:1.0> <EOL> proc_poll_period = <NUM_LIT:1.0> <EOL> root_log_level = os . environ . get ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> try : <EOL> from borg_site_defaults import * <EOL> except ImportError : <EOL> pass </s>
|
<s> """<STR_LIT>""" <EOL> import contextlib <EOL> import numpy <EOL> import borg <EOL> logger = borg . get_logger ( __name__ , default_level = "<STR_LIT>" ) <EOL> class FakeSolverProcess ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , run ) : <EOL> """<STR_LIT>""" <EOL> self . _run = run <EOL> self . _el... |
<s> import sys , os <EOL> extensions = [ "<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> exclude_patterns = [ '<STR_LIT>' ... |
<s> import os <EOL> import re <EOL> import shutil <EOL> import tempfile <EOL> from binascii import hexlify , unhexlify <EOL> from . . crypto import bytes_to_long , num_aes_blocks <EOL> from . . key import PlaintextKey , PassphraseKey , KeyfileKey <EOL> from . . helpers import Location , Chunk , bin_to_hex <EOL> from . ... |
<s> import re <EOL> from setuptools import setup <EOL> init_data = open ( '<STR_LIT>' ) . read ( ) <EOL> matches = re . search ( r"<STR_LIT>" , init_data , re . M ) <EOL> if matches : <EOL> version = matches . group ( <NUM_LIT:1> ) <EOL> else : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> requirements = [ <EOL> '<STR... |
<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import , print_function , unicode_literals <EOL> import fnmatch <EOL> class Watch ( object ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def __init__ ( self , pattern , command , final = False ) : <EOL> self . patt... |
<s> from boto . s3 . key import Key <EOL> class Object ( Key ) : <EOL> def __init__ ( self , bucket , name = None ) : <EOL> super ( Object , self ) . __init__ ( bucket , name = name ) <EOL> self . distribution = bucket . distribution <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % ( self . distribution . confi... |
<s> from boto . regioninfo import RegionInfo , get_regions <EOL> def regions ( ) : <EOL> """<STR_LIT>""" <EOL> from boto . codedeploy . layer1 import CodeDeployConnection <EOL> return get_regions ( '<STR_LIT>' , connection_cls = CodeDeployConnection ) <EOL> def connect_to_region ( region_name , ** kw_params ) : <EOL> f... |
<s> from boto . dynamodb . exceptions import DynamoDBItemError <EOL> class Item ( dict ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , table , hash_key = None , range_key = None , attrs = None ) : <EOL> self . table = table <EOL> self . _updates = None <EOL> self . _hash_key_name = self . table . schema . hash_ke... |
<s> """<STR_LIT>""" <EOL> from boto . ec2 . ec2object import EC2Object <EOL> class BundleInstanceTask ( EC2Object ) : <EOL> def __init__ ( self , connection = None ) : <EOL> super ( BundleInstanceTask , self ) . __init__ ( connection ) <EOL> self . id = None <EOL> self . instance_id = None <EOL> self . progress = None ... |
<s> """<STR_LIT>""" <EOL> from boto . ec2 . ec2object import EC2Object <EOL> from boto . exception import BotoClientError <EOL> class PlacementGroup ( EC2Object ) : <EOL> def __init__ ( self , connection = None , name = None , strategy = None , state = None ) : <EOL> super ( PlacementGroup , self ) . __init__ ( connect... |
<s> from boto . compat import six <EOL> class Step ( object ) : <EOL> """<STR_LIT>""" <EOL> def jar ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplemented ( ) <EOL> def args ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplemented ( ) <EOL> def main_class ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplemen... |
<s> from boto . exception import InvalidLifecycleConfigError <EOL> LIFECYCLE_CONFIG = '<STR_LIT>' <EOL> RULE = '<STR_LIT>' <EOL> ACTION = '<STR_LIT>' <EOL> DELETE = '<STR_LIT>' <EOL> CONDITION = '<STR_LIT>' <EOL> AGE = '<STR_LIT>' <EOL> CREATED_BEFORE = '<STR_LIT>' <EOL> NUM_NEWER_VERSIONS = '<STR_LIT>' <EOL> IS_LIVE =... |
<s> </s>
|
<s> from boto . pyami . installers . ubuntu . installer import Installer <EOL> import boto <EOL> import os <EOL> class Trac ( Installer ) : <EOL> """<STR_LIT>""" <EOL> def install ( self ) : <EOL> self . run ( '<STR_LIT>' , notify = True , exit_on_error = True ) <EOL> self . run ( '<STR_LIT>' , notify = True , exit_on_... |
<s> from boto . route53 import exception <EOL> import random <EOL> import uuid <EOL> import xml . sax <EOL> import boto <EOL> from boto . connection import AWSAuthConnection <EOL> from boto import handler <EOL> import boto . jsonresponse <EOL> from boto . route53 . record import ResourceRecordSets <EOL> from boto . rou... |
<s> from boto . sdb . regioninfo import SDBRegionInfo <EOL> from boto . regioninfo import get_regions <EOL> def regions ( ) : <EOL> """<STR_LIT>""" <EOL> return get_regions ( <EOL> '<STR_LIT>' , <EOL> region_cls = SDBRegionInfo <EOL> ) <EOL> def connect_to_region ( region_name , ** kw_params ) : <EOL> """<STR_LIT>""" <... |
<s> import uuid <EOL> import hashlib <EOL> from boto . connection import AWSQueryConnection <EOL> from boto . regioninfo import RegionInfo <EOL> from boto . compat import json <EOL> import boto <EOL> class SNSConnection ( AWSQueryConnection ) : <EOL> """<STR_LIT>""" <EOL> DefaultRegionName = boto . config . get ( '<STR... |
<s> """<STR_LIT>""" <EOL> from boto . ec2 . ec2object import TaggedEC2Object <EOL> from boto . resultset import ResultSet <EOL> class InternetGateway ( TaggedEC2Object ) : <EOL> def __init__ ( self , connection = None ) : <EOL> super ( InternetGateway , self ) . __init__ ( connection ) <EOL> self . id = None <EOL> self... |
<s> """<STR_LIT>""" <EOL> import unittest <EOL> from tests . integration import ServiceCertVerificationTest <EOL> import boto . cloudformation <EOL> class CloudFormationCertVerificationTest ( unittest . TestCase , ServiceCertVerificationTest ) : <EOL> cloudformation = True <EOL> regions = boto . cloudformation . region... |
<s> """<STR_LIT>""" <EOL> from tests . integration import ServiceCertVerificationTest <EOL> import boto . ec2 . cloudwatch <EOL> from tests . compat import unittest <EOL> class CloudWatchCertVerificationTest ( unittest . TestCase , ServiceCertVerificationTest ) : <EOL> cloudwatch = True <EOL> regions = boto . ec2 . clo... |
<s> import boto <EOL> import time <EOL> from tests . compat import unittest <EOL> class TestIAM ( unittest . TestCase ) : <EOL> iam = True <EOL> def test_group_users ( self ) : <EOL> iam = boto . connect_iam ( ) <EOL> name = '<STR_LIT>' % time . time ( ) <EOL> username = '<STR_LIT>' % time . time ( ) <EOL> iam . create... |
<s> """<STR_LIT>""" <EOL> from tests . compat import unittest <EOL> from boto . s3 . connection import S3Connection <EOL> from boto . s3 import connect_to_region <EOL> class S3SpecifyHost ( unittest . TestCase ) : <EOL> s3 = True <EOL> def testWithNonAWSHost ( self ) : <EOL> connect_args = dict ( { '<STR_LIT:host>' : '... |
<s> """<STR_LIT>""" <EOL> import time <EOL> import uuid <EOL> import json <EOL> import traceback <EOL> from boto . swf . layer1_decisions import Layer1Decisions <EOL> from tests . integration . swf . test_layer1 import SimpleWorkflowLayer1TestBase <EOL> class SwfL1WorkflowExecutionTest ( SimpleWorkflowLayer1TestBase ) ... |
<s> from tests . unit import AWSMockServiceTestCase <EOL> from boto . cloudsearch . domain import Domain <EOL> from boto . cloudsearch . layer1 import Layer1 <EOL> class TestCloudSearchCreateDomain ( AWSMockServiceTestCase ) : <EOL> connection_class = Layer1 <EOL> def default_body ( self ) : <EOL> return b"""<STR_LIT>"... |
<s> from tests . unit import unittest <EOL> from tests . unit import AWSMockServiceTestCase <EOL> import boto . ec2 <EOL> from boto . ec2 . connection import EC2Connection <EOL> class TestEC2ConnectionBase ( AWSMockServiceTestCase ) : <EOL> connection_class = EC2Connection <EOL> def setUp ( self ) : <EOL> super ( TestE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.