gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import copy
import operator
from functools import wraps, update_wrapper
import sys
from django.utils import six
from django.utils.six.moves import copyreg
# You can't trivially replace this `functools.partial` because this binds to
# classes and returns bound instances, whereas functools.partial (on CPython)
# is a ... | |
'''
Copyright 2017, Fujitsu Network Communications, 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 w... | |
################################################################################
# Copyright (C) 2011-2012,2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Module for the mixture distribution node.
"""
import wa... | |
"""Tests for the implementation of RootOf class and related tools."""
import pytest
from diofant import (Eq, Float, Function, GeneratorsNeeded, I, Lambda,
MultivariatePolynomialError, Poly, PolynomialError, Pow,
PurePoly, Rational, RootOf, RootSum, Symbol, conjugate,
... | |
# coding: utf-8
import pytest
from modernrpc.exceptions import (
RPC_INTERNAL_ERROR,
RPC_METHOD_NOT_FOUND,
RPC_INVALID_REQUEST,
)
def test_xmlrpc_multicall(xmlrpc_client):
result = xmlrpc_client.multicall(
[
("add", [5, 10]),
("divide", [30, 5]),
("add", [8... | |
__author__ = 'mdavid'
from mock import *
from unittest import TestCase
from wnsresolver import *
class TestInit(TestCase):
def test_all_args(self):
wns_resolver = WalletNameResolver(
resolv_conf='resolv.conf',
dnssec_root_key='root_key',
nc_host = '127.0.0.1',
... | |
import os
import smtplib
from flexmock import flexmock
import pytest
import six
import json
try:
import koji
except ImportError:
import inspect
import sys
# Find our mocked koji module
import tests.koji as koji
mock_koji_path = os.path.dirname(inspect.getfile(koji.ClientSession))
if mock_... | |
from __future__ import division, print_function, absolute_import
# noinspection PyUnresolvedReferences
from six.moves import range
import os
import sys
import random
from abc import ABCMeta, abstractmethod
from ..auxiliary.datastructs import Point2D
from ..tools.configuration import ConfigMgr
from . import Environmen... | |
#!/usr/bin/env python
"""
Train overcomplete ICA on van Hateren image patches.
"""
import sys
sys.path.append('./code')
from models import ISA, MoGaussian, StackedModel, ConcatModel, Distribution
from tools import preprocess, Experiment, mapp, imsave, imformat, stitch
from transforms import LinearTransform, Whiteni... | |
#
# Copyright (C) 2013 Comcast Corporation
#
# 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... | |
# Copyright 2017 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... | |
"""
====================
Liftover pipeline
====================
:Author: Andreas Heger
:Release: $Id: pipeline_liftover.py 2900 2010-04-13 14:38:00Z andreas $
:Date: |today|
:Tags: Python
The liftover pipeline maps a set of intervals from one or more genomes
to a target genome. It uses the :term:`liftover` tool from ... | |
"""Tests for the flux_led integration."""
from __future__ import annotations
import asyncio
from collections.abc import Callable
from contextlib import contextmanager
import datetime
from unittest.mock import AsyncMock, MagicMock, patch
from flux_led import DeviceType
from flux_led.aio import AIOWifiLedBulb
from flux... | |
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | |
"""
Copyright 2015 Hewlett-Packard
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, softwar... | |
# 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... | |
import wx
import sqlite3
import wx.grid as gridlib
conn = sqlite3.connect('mydb.db')
########################################################################
class App1(wx.Frame):
#----------------------------------------------------------------------
def __init__(self):
wx.Frame.__init__(self, Non... | |
## @package image
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
## @brief Contains some utility methods for handling images
from __future__ import division
from random import random
from PIL import Image
from .enhanced_grid import *
## Conve... | |
# Copyright (C) 2013 Google 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 must retain the above copyright
# notice, this list of conditions and the ... | |
import numpy as np
import pytest
from pandas import (
Categorical,
DataFrame,
Series,
)
import pandas._testing as tm
class TestSeriesSortValues:
def test_sort_values(self, datetime_series):
# check indexes are reordered corresponding with the values
ser = Series([3, 2, 4, 1], ["A", "... | |
"""A script that contains all functions to do RNA-seq epistasis analysis."""
# important stuff:
import pandas as pd
import numpy as np
# Graphics
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import scipy.odr as odr
# labeller:
import gvars
from scipy.stats import gaussian_kde
from ma... | |
#!/usr/local/bin/python3
# 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 use this file except in compliance with
# the L... | |
import fnmatch
import re
import threading
from collections import defaultdict, OrderedDict
import botconfig
LANGUAGE = 'en'
MINIMUM_WAIT = 60
EXTRA_WAIT = 30
EXTRA_WAIT_JOIN = 0 # Add this many seconds to the waiting time for each !join
WAIT_AFTER_JOIN = 25 # Wait at least this many seconds after the last join
# !wai... | |
"""
Numba-specific errors and warnings.
"""
import abc
import contextlib
import os
import sys
import warnings
import numba.core.config
import numpy as np
from collections import defaultdict
from numba.core.utils import chain_exception
from functools import wraps
from abc import abstractmethod
# Filled at the end
__a... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2013, Eduard Broecker
# 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 notice, this lis... | |
import math
from direct.showbase.DirectObject import DirectObject
from direct.interval.LerpInterval import LerpPosInterval
import panda3d.core as p3d
from hud import Hud
from weapon import Weapon
def clamp(value, lower, upper):
return max(min(value, upper), lower)
class PlayerController(DirectObject):
BU... | |
# Copyright 2017 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/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import measurereport
from .fhirdate import FHIRDate
class MeasureReportTests(unittest.TestCase):
def instantiate_from(self, file... | |
""" Author: Cole Howard
Title: Finnegan
An extinsible neural net designed to explore Convolutional Neural Networks and
Recurrent Neural Networks via extensive visualizations.
"""
import numpy as np
from sklearn.preprocessing import normalize
from layer import Layer
# from matplotlib import cm
# from matplotlib impo... | |
"""
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 use this ... | |
#
# 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 us... | |
import os
from cffi import FFI
from numpy import *
try:
from pydb import debugger
## Also add an exception hook.
import pydb, sys
sys.excepthook = pydb.exception_hook
except ImportError:
import pdb
def debugger():
pdb.set_trace()
## Compile the library with:
'''
# OSX
g++ -fPIC \
bbw.cp... | |
from __future__ import absolute_import, unicode_literals
import sys
from vine import Thenable, promise, maybe_promise
from kombu.exceptions import HttpError
from kombu.five import items, python_2_unicode_compatible
from kombu.utils import coro
from kombu.utils.encoding import bytes_to_str
from kombu.utils.functional... | |
import re
import struct
import time
import socket, select
import Queue, threading
from collections import namedtuple
import commands
class ISCPMessage(object):
"""Deals with formatting and parsing data wrapped in an ISCP
containers. The docs say:
ISCP (Integra Serial Control Protocol) consists of th... | |
__author__ = 'frank'
import os.path
import traceback
import zstacklib.utils.uuidhelper as uuidhelper
from kvmagent import kvmagent
from kvmagent.plugins.imagestore import ImageStoreClient
from zstacklib.utils import jsonobject
from zstacklib.utils import shell
from zstacklib.utils.bash import *
from zstacklib.utils.r... | |
#-*- python -*-
import logging
from datetime import datetime
import urllib2
# Non-stdlib imports
import pkg_resources
import pymongo
from tg import expose, validate, redirect, flash
from tg.decorators import with_trailing_slash, without_trailing_slash
from pylons import g, c, request, response
import formencode
from f... | |
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 19:35:04 2015
@author: ajaver
"""
import os
import sys
import numpy as np
import pandas as pd
import tables
from tierpsy.helper.params import head_tail_defaults
from tierpsy.analysis.ske_orient.WormClass import WormClass
from tierpsy.helper.misc import TimeCounter, ... | |
# Copyright (c) 2014 Ahmed H. Ismail
# 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 writin... | |
import typing as t
from gssapi._utils import import_gssapi_extension
from gssapi.raw import oids as roids
from gssapi.raw import misc as rmisc
from gssapi.raw import named_tuples as tuples
from gssapi.raw import names as rnames
from gssapi import _utils
rfc5587 = import_gssapi_extension('rfc5587')
rfc5801 = import_gs... | |
#! /usr/bin/env python
import argparse
import copy
import json
import operator
import re
import time
import traceback
# support Python 2 and 3's versions of this module
try:
import html
HTML_UNESCAPER = html
except ImportError:
import HTMLParser
HTML_UNESCAPER = HTMLParser.HTMLParser()
import executo... | |
import os
import json
from django.utils.safestring import mark_safe
from django.http import HttpResponse, HttpResponseRedirect,\
HttpResponseNotAllowed, HttpResponseNotFound
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
from django.contrib import messages
from d... | |
# -*- coding: utf-8 -*-
# 1st-run initialisation
# Set settings.base.prepopulate to 0 in Production
# (to save 1x DAL hit every page).
pop_list = settings.get_base_prepopulate()
if pop_list == 0:
pop_list = []
else:
table = db[auth.settings.table_group_name]
# The query used here takes 2/3 the time of .co... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
This module provides classes to perform topological analyses of structures.
"""
__author__ = "Shyue Ping Ong, Geoffroy Hautier, Sai Jayaraman"
__copyrigh... | |
import datetime
import pandas as pd
from yatt.ticker import aapl
from yatt.event import Event
from yatt.event import MarketEvent
from yatt.event import TickEvent
from yatt.event import BarEvent
from yatt.event import HistoricalDataEvent
from yatt.event import HistoricalTickEvent
from yatt.event import HistoricalBarEve... | |
"""
Programmatic access to the information of the ISO-639-3 standard
ISO-639-3 data is not distributed with this package, but we fetch the download listed at
`<https://iso639-3.sil.org/code_tables/download_tables>`_
"""
import re
import string
import typing
import datetime
import functools
import collections
import u... | |
# Copyright 2017 Google 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
import copy
import logging
import math
import os
import torch
import torch.nn as nn
from nmmt.models import Translation
from nmmt.IDataset import DatasetWrapper
from nmmt.SubwordTextProcessor import SubwordTextProcessor
from nmmt.internal_utils import opts_object, log_timed_action
from nmmt.torch_utils import torch_i... | |
#!/usr/bin/env python
#
# This code was copied from the data generation program of Tencent Alchemy
# project (https://github.com/tencent-alchemy).
#
#
# #
# # Copyright 2019 Tencent America LLC. All Rights Reserved.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file e... | |
# 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... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from os.path import abspath, dirname
class Migration(SchemaMigration):
def forwards(self, orm):
sql_up_migration_file = "{}/migration_0111_u... | |
# 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
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Ve... | |
# Copyright 2015 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/env python
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All ... | |
# 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... | |
# -*- coding: utf-8 -*-
from tempfile import NamedTemporaryFile
from cerberus import Validator, errors
from cerberus.tests import (assert_fail, assert_has_error, assert_normalized,
assert_success)
def test_coerce():
schema = {'amount': {'coerce': int}}
document = {'amount': '1'}
... | |
from __future__ import unicode_literals
import os.path
import subprocess
import sys
import re
from .common import FileDownloader
from ..compat import compat_setenv
from ..postprocessor.ffmpeg import FFmpegPostProcessor, EXT_TO_OUT_FORMATS
from ..utils import (
cli_option,
cli_valueless_option,
cli_bool_op... | |
#!/usr/bin/env python
# Use Python3 integer division rules.
from __future__ import division
import sys
import os
import unittest
import warnings
from numpy import testing, pi, array, matrix, sin, cos, zeros, array, mat, \
arctan
from yeadon.solid import Stadium, Solid, StadiumSolid
from yeadon import inerti... | |
# -*- coding: utf-8 -*-
#
# Copyright 2013 Simone Campagna
#
# 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... | |
# 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
# distributed u... | |
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | |
#!/usr/bin/python
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
from ansible.module_utils.urls import ConnectionError, NoSSLError, open_url
from ansible.module_utils.basic import AnsibleModule, get_distribution
from ansible.module_utils._text import to_native
from an... | |
# -*- coding: utf-8 -*-
import collections
import hashlib
import json
import os
import string
import subprocess
import sys
import threading
import time
try:
import Queue as queue
except ImportError:
import queue
from powerline.lib import threaded
import powerline
HOTLIST_LOW = 0
HOTLIST_MESSAGE = 1
HOTLI... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010-2011 OpenStack Foundation.
# Copyright 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | |
# Copyright 2015 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... | |
# Copyright (c) 2020, 2021 The Linux Foundation
#
# SPDX-License-Identifier: Apache-2.0
import hashlib
import os
import re
from west import log
from zspdx.licenses import LICENSES
from zspdx.util import getHashes
# ScannerConfig contains settings used to configure how the SPDX
# Document scanning should occur.
clas... | |
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | |
from pyscf.pbc.gto import Cell
from pyscf.pbc.scf import KRHF
from pyscf.pbc.tdscf import KTDHF
from pyscf.pbc.tdscf import krhf_slow_supercell, kproxy_supercell
from pyscf.tdscf.common_slow import eig
from test_common import retrieve_m, assert_vectors_close
import unittest
from numpy import testing
import numpy
de... | |
import os,sys
import numpy as np
from Utility import *
import Errors
import nest
class Models:
_ModelTemplate = {
'Init': {
# field_name : default , acceptable , len, content_type, convert_type
'spike_times' : ( [1.0] , (list,tuple), 1 , float , float ... | |
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program 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 Lic... | |
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 30 15:53:19 2015
@author: pedro.correia
"""
from __future__ import division # Just making sure that correct integer division is working
import numpy as np # This is numpy,python numerical library
import objects_parser as obj ... | |
# -*- coding: utf-8 -*-
import numpy as np
from allel.model.ndarray import SortedIndex
from allel.util import asarray_ndim, ignore_invalid, check_equal_length
def moving_statistic(values, statistic, size, start=0, stop=None, step=None, **kwargs):
"""Calculate a statistic in a moving window over `values`.
P... | |
import re
import inspect
import textwrap
import pydoc
import sphinx
from docscrape import NumpyDocString, FunctionDoc, ClassDoc
class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config={}):
self.use_plots = config.get('use_plots', False)
NumpyDocString.__init__(self, docstring,... | |
# Copyright 2014 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.
import copy
import math
import os
import unittest
from telemetry.core import util
from telemetry.util import external_modules
try:
np = external_modules.... | |
import ujson as json
from v20.base_entity import BaseEntity
from v20.base_entity import EntityDict
from v20.request import Request
from v20 import spec_properties
class Position(BaseEntity):
"""
The specification of a Position within an Account.
"""
#
# Format string used when generating a summa... | |
"""The tests for the DD-WRT device tracker platform."""
import os
import unittest
from unittest import mock
import logging
import re
import requests
import requests_mock
import pytest
from homeassistant import config
from homeassistant.setup import setup_component
from homeassistant.components import device_tracker
f... | |
import contextlib
import threading
from django.conf import settings
from django.db import models, transaction
from django.utils import encoding, translation
import caching.base
import elasticsearch
import multidb.pinning
import queryset_transform
from . import search
# Needed to set up url prefix signals.
from . imp... | |
# Copyright 2013 Red Hat, 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 a... | |
# Copyright 2015 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.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import base64
import json
import unittest
impo... | |
# Copyright 2014 Red Hat 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 ag... | |
# Copyright 2011 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 2014 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.
import datetime
from testing_utils import testing
from components import auth
from components import auth_testing
from components import utils
from cipd i... | |
#!/usr/bin/env python
#encoding:utf-8
#author:dbr/Ben
#project:tvdb_api
#repository:http://github.com/dbr/tvdb_api
#license:Creative Commons GNU GPL v2
# (http://creativecommons.org/licenses/GPL/2.0/)
"""Unittests for tvdb_api
"""
import sys
import datetime
import unittest
sys.path.append("..")
import tvdb_api
impo... | |
# Copyright 2015 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... | |
#!/usr/bin/env python2.5
#
# Copyright 2009 the Melange authors.
#
# 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 applic... | |
import re
from django import forms
from django.conf import settings
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _, ugettext
from django.utils.http import int_to_base36
from django.contrib import messages
from django.c... | |
# 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 ... | |
# Copyright 2017 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... | |
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013, Mirantis 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
#
#... | |
# 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... | |
# Copyright (c) 2012 Google 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 must retain the above copyright
# notice, this list of conditions and the ... | |
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | |
"""Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` cl... | |
import json
import pytest
from sqlalchemy_json_api import QueryBuilder
@pytest.mark.usefixtures('table_creator', 'dataset')
class TestSelectRelated(object):
@pytest.mark.parametrize(
('id', 'result'),
(
(
1,
{'data': [{'type': 'users', 'id': '2'}]}
... | |
# Copyright 2017 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... | |
import base64
import cv2
import numpy as np
import simplejson as json
import stasm
import sys
import os
from flask import (Flask, flash, jsonify, redirect,
render_template, request, session)
from passlib.hash import sha256_crypt
from sqlalchemy import or_
sys.path.append(os.path.join(os.path.dirname... | |
"""Hypergeometric and Meijer G-functions"""
from __future__ import print_function, division
from sympy.core import S, I, pi, oo, zoo, ilcm, Mod
from sympy.core.function import Function, Derivative, ArgumentIndexError
from sympy.core.containers import Tuple
from sympy.core.compatibility import reduce, range
from sympy... | |
#!/usr/bin/env python
# ===================================
# Copyright (c) Microsoft Corporation. All rights reserved.
# See license.txt for license information.
# ===================================
from contextlib import contextmanager
import subprocess
import os
import sys
import glob
import codecs
import imp
impo... | |
# 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.