gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- coding: utf-8 -*-
"""
Django settings for TeamBuilder project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from __future__ import absolute_import, unicode... | |
# -*- coding: utf-8 -*-
"""
Tests for apns_proxy_server.worker
"""
from binascii import b2a_hex
import mock
from Queue import Queue
import time
from nose.tools import ok_, eq_, raises
from apns import Frame, Payload, PayloadTooLargeError
from apns_proxy_server.worker import SendWorkerThread
dummy_setting = {
'ta... | |
##########################################################################
#
# Copyright (c) 2008-2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... | |
#!/usr/bin/env python
#
#===- add_new_check.py - clang-tidy check generator ----------*- python -*--===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===---------... | |
#!/usr/bin/env python
from __future__ import print_function
# Copyright 2015 Tony Garcia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | |
import re
import threading
import time
import io
from unittest import mock
from django.conf import settings
from django.core import management
from django.db import connection
from django.test.testcases import TransactionTestCase
from celery import group, shared_task
from celery.canvas import _chain
from olympia.add... | |
from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
from builtins import object
import gevent
import gevent.pool
from daemons.prefab import run
from ast import literal_eval
import logging
import sys
import time
import urllib3.exceptions
from isi_stats_cli... | |
import itertools
import re
import tokenize
from six import string_types, next
from . import nodes
def split_balanced_parens(line, depth=0):
# Too bad I can't do this with a regex... *sigh*.
deltas = {'(': 1, ')': -1}
pos = None
for pos, char in enumerate(line):
depth += deltas.get(char, 0)
... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from zion.common.utils import get_object_metadata
from zion.gateways.docker.bus import Bus
from zion.gateways.docker.datagram import Datagram
# from daemonize import Daemonize
from docker.errors import NotFound
from subprocess import Popen
import threading
import shutil
import logging
import operator
import random
impo... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 NetApp, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.or... | |
# -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class Bitbucket3HookTests(WebhookTestCase):
STREAM_NAME = "bitbucket3"
URL_TEMPLATE = "/api/v1/external/bitbucket3?stream={stream}&api_key={api_key}"
FIXTURE_DIR_NAME = "bitbucket3"
EXPECTED_TOPIC = "sandbox"
EXPECTED_TOPI... | |
from functools import update_wrapper
from weakref import WeakSet
from django.apps import apps
from django.contrib.admin import ModelAdmin, actions
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
from django.http imp... | |
"""RyuApp shim between Ryu and Gauge."""
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a co... | |
# Software License Agreement (BSD License)
#
# Copyright (c) 2013, Open Source Robotics Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code mus... | |
import re
from tests.conftest import CAPAKEY_URL
try:
import unittest2 as unittest
except ImportError: # pragma NO COVER
import unittest # noqa
import pytest
from crabpy.gateway.capakey import (
Gemeente,
Afdeling,
Sectie,
Perceel,
capakey_rest_gateway_request,
GatewayRuntimeExcepti... | |
"""
deltablue.py
============
Ported for the PyPy project.
This implementation of the DeltaBlue benchmark was directly ported
from the `V8's source code`_, which was in turn derived
from the Smalltalk implementation by John Maloney and Mario
Wolczko. The original Javascript implementation was licensed under the GPL.
... | |
#!/usr/bin/env python3
##
# Tuxdrive A linux console implementation of Google Drive API
#
import os, httplib2, site
from apiclient import discovery
from apiclient.http import MediaIoBaseDownload, MediaFileUpload
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
from tu... | |
import logging
from flask import flash
from flask.ext.admin._compat import string_types
from flask.ext.admin.babel import gettext, ngettext, lazy_gettext
from flask.ext.admin.model import BaseModelView
from peewee import PrimaryKeyField, ForeignKeyField, Field, CharField, TextField
from flask.ext.admin.actions impo... | |
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apac... | |
"""
Alias convention tests.
"""
from io import BytesIO
from json import loads
from uuid import uuid4
from hamcrest import (
all_of,
anything,
assert_that,
contains,
equal_to,
has_entries,
has_entry,
has_item,
has_key,
is_,
is_not,
)
from marshmallow import Schema, fields
fr... | |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2011, Daniele Esposti <expo@expobrain.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... | |
# ===============================================================================
# Copyright 2018 gabe-parrish
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
import json
import logging
import os
import sys
import numpy as np
import dill as dpickle
import pandas as pd
import tensorflow as tf
# TODO(https://github.com/kubeflow/examples/issues/280)
# TODO(https://github.com/kubeflow/examples/issues/196)
# We'd like to switch to importing keras from TensorFlow in order to supp... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import re
import os
import glob
from . import helper
from .mockable_test_result import MockableTestResult
from runner import path_to_enlightenment
from libs.colorama import init, Fore, Style
init() # init colorama
class Sensei(MockableTestResult):
de... | |
#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# IMPORTANT NOTE: If you make local mods to this file, you must run:
# % pnacl/build.sh driver
# in order for them to take eff... | |
import abc
import itertools
import library.monte_carlo
import numpy as np
import scipy.integrate
import scipy.linalg
import sympy as sp
import time
import vorpy.symbolic
"""
Notes
Define "return map" R : T^* Q -> T^* Q (really R^3xR^3 -> R^3xR^3, because it's coordinate dependent):
R(q,p) is defined as the closest po... | |
from __future__ import print_function
import os.path as Path
import os
import shutil
import sys
from . import exceptions
from .resources import Message
try: # Python 3 imports
import configparser
except ImportError: # Python 2 imports
import ConfigParser as configparser
class Settings(object):
"""
... | |
import asyncio
import binascii
import cgi
import collections
import datetime
import io
import json
import re
import warnings
from email.utils import parsedate
from types import MappingProxyType
from multidict import CIMultiDict, MultiDict, MultiDictProxy
from yarl import URL
from . import hdrs, multipart
from .helper... | |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# For instructions see:
# http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs
import hashlib
import math
import optpars... | |
import os
import sys
from optparse import OptionParser, NO_DEFAULT
import imp
import django
from django.core.management.base import BaseCommand, CommandError, handle_default_options
from django.utils.importlib import import_module
# For backwards compatibility: get_version() used to be in this module.
get_version = d... | |
"""
Extract foods that people are eating from their Tweets.
"""
from collections import defaultdict
from nltk import word_tokenize, Tree
from nltk.chunk import RegexpParser
from nltk.corpus import stopwords
from nltk.tag.perceptron import PerceptronTagger
from nltk.tag import _pos_tag
from noweats.util import counter
f... | |
from __future__ import unicode_literals
import sys
from datetime import date, datetime
from decimal import Decimal, ROUND_UP, ROUND_DOWN
from unittest import TestCase
from wtforms import validators, widgets, meta
from wtforms.fields import *
from wtforms.fields import Label, Field, SelectFieldBase, html5
from wtform... | |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to us... | |
# coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | |
from django.core.exceptions import ValidationError
from rest_framework import exceptions
from rest_framework import serializers as ser
from api.base.exceptions import Conflict
from api.base.serializers import (
JSONAPISerializer, IDField, TypeField, HideIfNotWithdrawal, NoneIfWithdrawal,
LinksField, Relationsh... | |
"""a graphical config manager for StaSh"""
import os
import ast
import threading
import console
import ui
from stash.system.shcommon import _STASH_CONFIG_FILES
import pythonista_add_action as paa
_stash = globals()["_stash"]
ORIENTATIONS = ("landscape", "landscape_left", "landscape_right")
# define option types
TY... | |
r"""
Base class for solving initial value problems (IVPs) of the form:
.. math::
\frac{dy}{dt} = f(t,y),\ y(t_0) = y_0
using finite difference methods. The `quantecon.ivp` class uses various
integrators from the `scipy.integrate.ode` module to perform the
integration (i.e., solve the ODE) and parametric B-spline... | |
import logging
import re
import traceback
from collections import deque, namedtuple
from twisted.words.protocols import irc
from twisted.internet import protocol, reactor, ssl
from pkg_resources import iter_entry_points
import sqlalchemy
from sqlalchemy import orm
import hamper.config
import hamper.log
import hamper... | |
#!/usr/bin/env python3
#===- symcov-report-server.py - Coverage Reports HTTP Serve --*- python -*--===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===----------... | |
# -*- coding: utf-8 -*-
"""Parser for MacOS Application firewall log (appfirewall.log) files."""
import pyparsing
from dfdatetime import time_elements as dfdatetime_time_elements
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import errors
from plaso.lib import definition... | |
# Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | |
# Copyright (c) 2019, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/waveforms/blob/master/LICENSE>
from math import sqrt, pi
import numpy as np
from . import LM_total_size, jit
@jit
def constant_as_ell_0_mode(constant):
"""Express constant as Y_{0,0} mode weight"""
return constant *... | |
"""The tests for the utility_meter component."""
from datetime import timedelta
from unittest.mock import patch
from homeassistant.components.utility_meter.const import (
ATTR_TARIFF,
DOMAIN,
SERVICE_RESET,
SERVICE_SELECT_NEXT_TARIFF,
SERVICE_SELECT_TARIFF,
)
import homeassistant.components.utility... | |
import datastore
import utils
import dsz.cmd
import dsz.lp
import os
from utils import limitedget, file_exists, reg_exists
def find_01():
result = utils.reg_exists('L', 'software\\microsoft\\windows\\currentversion\\StrtdCfg', None, True)
if result:
return True
for key in datastore.HKEY_USERS_DATA... | |
"""Common code for Withings."""
import asyncio
from dataclasses import dataclass
import datetime
from datetime import timedelta
from enum import Enum, IntEnum
import logging
import re
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from aiohttp.web import Response
import requests
from withings_api... | |
# -*- coding: utf-8 -*-
import os
import time
import json
import logging
import time
from random import random, randrange
from pokemongo_bot import inventory
from pokemongo_bot.base_task import BaseTask
from pokemongo_bot.human_behaviour import sleep, action_delay
from pokemongo_bot.inventory import Pokemon
from pokem... | |
"""
Backport of Python 3's int, based on Py2's long.
They are very similar. The most notable difference is:
- representation: trailing L in Python 2 removed in Python 3
"""
from __future__ import division
import struct
import collections
from future.types.newbytes import newbytes
from future.types.newobject import ... | |
# This file is part of cfelpyutils.
#
# cfelpyutils is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cfelpyutils i... | |
# -*- coding: utf-8 -*-
# File: imagenet_utils.py
import cv2
import numpy as np
import multiprocessing
import tensorflow as tf
from abc import abstractmethod
from tensorpack import imgaug, dataset, ModelDesc
from tensorpack.dataflow import (
AugmentImageComponent, PrefetchDataZMQ,
BatchData, MultiThreadMapDa... | |
"""Load precinct-level election results from the OpenElections Project
(http://www.openelections.net), the first free, comprehensive, standardized,
linked set of election data for the United States, including federal and
statewide offices.
"""
import csv
import os
import re
import sys
from datetime import date
from t... | |
from HabitBaseModel import HabitBaseModel
from AllDBFields import HeroDbFields
from Zone import Zone
from Monster import Monster
class Hero(HabitBaseModel):
"""
This is a wrapper for the hero data from the database
"""
@classmethod
def construct_unsaved_hero(cls,accountPk = None,shipName = ""):
... | |
from contextlib import contextmanager
import datetime
import logging
from argparse import ArgumentParser
import os
import os.path as osp
import pickle
from pickle import PickleError
import shutil
import sys
import time
import six
from .. import loader
from ..env import env
from ..oauth import OAuthToken
from ..core i... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import re
from streamlink.exceptions import FatalPluginError, NoStreamsError, PluginError
from streamlink.plugin import Plugin, PluginArguments, PluginArgument
from streamlink.plugin.api import useragents, validate
from streamlink.stream i... | |
#!/usr/bin/env python
import json
def pretty_json(obj):
return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ':'))
def twitter_small_relation_key():
relation_key = {
"userName" : "chushumo",
"programName" : "multiway_join",
"relationName" : "twitter_small"
}
retur... | |
import asyncio
import collections
from functools import partial
from . import mixin
from . import packet
PACKET_TYPES = packet.Type
class CallbackClient(mixin.GearmanProtocolMixin, asyncio.Protocol):
"""
Simple class for submitting a group of foreground jobs and handing updates via
callbacks rather than... | |
from datetime import datetime
from unittest.mock import Mock, patch
from django.contrib.auth import get_user_model
from django.db import IntegrityError, transaction
from django.test import TestCase, TransactionTestCase
from django.utils import timezone
from simple_history.exceptions import AlternativeManagerError, No... | |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Lic... | |
# -*- coding: utf-8 -*-
# Copyright 2014 NeuroData (http://neurodata.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | |
"""Univariate features selection."""
# Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay.
# L. Buitinck, A. Joly
# License: BSD 3 clause
import numpy as np
import warnings
from scipy import special, stats
from scipy.sparse import issparse
from ..base import BaseEstimator
from ..prepr... | |
import json
import sys
import pytest
from emailer import args, shell, fetcher, api, auth, config as config_module
from emailer.config import Config
from emailer.name import EMAILS, RECIPIENTS
from emailer.options import Options
def test_process(monkeypatch):
mock_sheet = {'mock_sheet': {}}
output_sheet_called =... | |
import json
import logging
import asyncio
import aiohttp
import base64
import traceback
from hailtop.utils import (
time_msecs, sleep_and_backoff, is_transient_error,
time_msecs_str, humanize_timedelta_msecs)
from hailtop.tls import in_cluster_ssl_client_session
from gear import transaction
from .globals impo... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | |
import matplotlib
matplotlib.use('Agg')
import unittest
import os
import shutil
import numpy.testing as testing
import numpy as np
import fitsio
import tempfile
from numpy import random
import glob
from redmapper import Configuration
from redmapper.redmagic import RedmagicParameterFitter, RedmagicCalibrator
from redm... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import time
import argparse
import ConfigParser
from vnc_api.vnc_api import *
from cfgm_common.exceptions import *
from vnc_admin_api import VncApiAdmin
class VrouterProvisioner(object):
def __init__(self, args_str... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 - 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | |
#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may o... | |
from __future__ import print_function
import types
import warnings
import sys
import traceback
import inspect
import pickle
from copy import deepcopy
import numpy as np
from scipy import sparse
import struct
from sklearn.externals.six.moves import zip
from sklearn.externals.joblib import hash, Memory
from sklearn.ut... | |
#!/usr/bin/env python3
"""Validate the relationship between Envoy dependencies and core/extensions.
This script verifies that bazel query of the build graph is consistent with
the use_category metadata in bazel/repository_locations.bzl.
"""
import re
import subprocess
import sys
from importlib.machinery import Sourc... | |
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) 2013-2015, Michigan State University.
# Copyright (C) 2015-2016, The Regents of the University of California.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the fol... | |
import unittest
from GuidedSearch import Guidance, GuidedSimplify
from Expression import *
from MatchAndSubstitute import try_rule, Direction, match_and_substitute
import Parser
OBJECT = ExpressionType.OBJECT
def ex(st: str) -> Expression:
return Parser.parse(st)
a = var("a", OBJECT)
b = var("b", OBJECT)
c = v... | |
"""Compressed Sparse Row matrix format"""
__docformat__ = "restructuredtext en"
__all__ = ['csr_matrix', 'isspmatrix_csr']
import numpy as np
from .base import spmatrix
from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
get_csr_submatrix)
from .sputils import upcast, get_i... | |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.externals import six
import numpy as np
from numpy import ma
import matplotlib
from matplotlib import rc_context
from matplotlib.testing.decorators import image_comparison, cleanup
import matpl... | |
#-*- coding: utf-8 -*-
from django.conf import settings
from django.core.files.storage import get_storage_class
from filer.utils.loader import load_object
from filer.utils.recursive_dictionary import RecursiveDictionaryWithExcludes
import os
FILER_IMAGE_MODEL = getattr(settings, 'FILER_IMAGE_MODEL', False)
FILER_DEBUG... | |
"""ConstantAssignment unit tests."""
import pytest
from vivid.classes.attribute import Attribute
from vivid.classes.relation_symbol import RelationSymbol
from vivid.classes.attribute_structure import AttributeStructure
from vivid.classes.attribute_system import AttributeSystem
from vivid.classes.vocabulary import Voca... | |
import urllib
import urlparse
from google.appengine.api import urlfetch
from flask import json
import logging, os
CLIENT_ID = 'YOUR_CLIENT_ID'
CLIENT_SECRET = 'YOUR_CLIENT_SECRET'
GITHUB_API_URL = 'https://api.github.com'
REPO_NAME = 'watcher'
REPO_DESC = 'gitmark'
REPO_HOMEPAGE = 'http://localhost'
class Helpers(obj... | |
"""
The Plaid API
The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from plaid.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal... | |
# Copyright 2015 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | |
#!/usr/bin/env python
import array
import os
import sys
import struct
import logging
from datetime import datetime
from collections import OrderedDict # python 2.7 only
from .. import Progress
from .. import BinaryParser
from ..BinaryParser import Block
from ..BinaryParser import Nestable
g_logger = logging.getLog... | |
#!/usr/bin/env python3
import boto3
import botocore.exceptions
import time
import dateutil.parser
from datetime import datetime
import csv
import sys
import io
import argparse
import jinja2
import logging
from operator import itemgetter
from multiprocessing.pool import ThreadPool
from pprint import pprint
import smtpli... | |
import re
import pytest
pytestmark = pytest.requires_numpy
with pytest.suppress(ImportError):
import numpy as np
@pytest.fixture(scope='module')
def simple_dtype():
ld = np.dtype('longdouble')
return np.dtype({'names': ['bool_', 'uint_', 'float_', 'ldbl_'],
'formats': ['?', 'u4', 'f... | |
# encoding: utf-8
"""
The shape tree, the structure that holds a slide's shapes.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
from .autoshape import AutoShapeType, Shape
from .base import BaseShape
from .connector import Connector
from ..enum.shapes import PP_PLACEHO... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
#!/usr/bin/python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lice... | |
import copy
from spec import Spec, eq_, skip, ok_, raises
from invoke.parser import Argument, Context
from invoke.tasks import task
from invoke.collection import Collection
class Context_(Spec):
def may_have_a_name(self):
c = Context(name='taskname')
eq_(c.name, 'taskname')
def may_have_ali... | |
"""HDL Signals."""
from . import HDLObject
import hdltools.abshdl as hdl
from .stmt import HDLStatement
from .const import HDLIntegerConstant
import hdltools.abshdl.concat
# TODO: allow multiple dimensions
class HDLSignalPartSelect(HDLObject):
"""Part select alternative to slice."""
def __init__(self, offs... | |
from collections import Iterable
from numbers import Real, Integral
from xml.etree import ElementTree as ET
import sys
import numpy as np
import openmc
import openmc.checkvalue as cv
from openmc.clean_xml import *
if sys.version_info[0] >= 3:
basestring = str
# A static variable for auto-generated Plot IDs
AUTO... | |
import logging
import re
import threading
import urwid
from operator import attrgetter
from sen.exceptions import NotifyError
from sen.docker_backend import DockerImage, DockerContainer
from sen.tui.chunks.elemental import ContainerStatusWidget
from sen.tui.widgets.list.util import (
get_map, get_time_attr_map, ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# doorman.py
# Created by Hexapetalous on Jan 11, 2016.
#
# This is a part of C0004, a new version of Tenzor's entrance guard.
# This is the whole.
#
# Copyright (c) 2016 Hexapetalous. All rights reserved.
# This code is licensed under MIT License.
#
import logging
import... | |
#!/usr/bin/env python
######################################################################################
#
# SCRIPT: kruscal_wallis.py
#
# AUTHOR: Alexander Kirpich <akirpich@ufl.edu>
#
# DESCRIPTION: This tool runs a Kruscal-Wallis test on the data for each feature (row).
# The test is nonparametric a... | |
#!/usr/bin/env python3
'''A library and a command line tool to interact with the LOCKSS daemon hasher
service via its legacy SOAP Web Services API.'''
__copyright__ = '''\
Copyright (c) 2000-2021, Board of Trustees of Leland Stanford Jr. University
All rights reserved.
'''
__license__ = '''\
Redistribution and use i... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test fee estimation code."""
from decimal import Decimal
import os
import random
from test_framework.m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.