gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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) 2007-2010, 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... | |
import logging
from PyQt4.QtGui import (
QGraphicsItem, QGraphicsPathItem, QGraphicsWidget, QGraphicsTextItem,
QGraphicsDropShadowEffect, QPainterPath, QPainterPathStroker,
QPolygonF, QColor, QPen
)
from PyQt4.QtCore import (
Qt, QPointF, QSizeF, QRectF, QLineF, QEvent, QT_VERSION
)
from PyQt4.QtCor... | |
# Copyright (c) 2009, Joseph Lisee
# 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 an... | |
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | |
# Copyright (c) 2012 - 2014 EMC Corporation.
# 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
#
# Unle... | |
"""tests for passlib.pwhash -- (c) Assurance Technologies 2003-2009"""
#=============================================================================
# imports
#=============================================================================
from __future__ import with_statement
# core
import hashlib
from logging import g... | |
# Authors: Lukas Breuer <l.breuer@fz-juelich.de>
"""
----------------------------------------------------------------------
--- jumeg.decompose.fourier_ica --------------------------------------
----------------------------------------------------------------------
author : Lukas Breuer
email : l.breuer@fz-... | |
# -*- coding: UTF-8 -*-
# Copyright (c) 2006, 2011, 2013-2018 Matthew Zipay.
#
# 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 ... | |
import os
import logging
import zmq
import math
import traceback
import datetime
import time
import multiprocessing
import rethinkdb
import utils
__all__ = [
'ImportManager',
'ImportWorker',
]
LOG = logging.getLogger(__name__)
class ImportManager(object):
def __init__(self, controller, config):
... | |
# -*- coding: utf-8 -*-
"""
babel.support
~~~~~~~~~~~~~
Several classes and functions that help with integrating and using Babel
in applications.
.. note: the code in this module is not used by Babel itself
:copyright: (c) 2013 by the Babel Team.
:license: BSD, see LICENSE for more detail... | |
import os
import os.path as op
import warnings
import gc
from nose.tools import assert_true, assert_raises
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_equal,
assert_array_equal, assert_allclose)
from mne.datasets import testing
from mne.io import Raw
from... | |
import sys
from django import http
from django.core import signals
from django.utils.encoding import force_unicode
from django.utils.importlib import import_module
from django.utils.log import getLogger
logger = getLogger('django.request')
class BaseHandler(object):
# Changes that are always applied to a respon... | |
import bisect
import copy
import hashlib
import itertools
import json
import operator
import time
from collections import ChainMap
import pmdefaults as PM
from pmdefaults import *
from policy import NEATProperty, PropertyArray, PropertyMultiArray, ImmutablePropertyError, term_separator
CIB_EXPIRED = 2
class CIBEntr... | |
import copy
import datetime
import locale
import os
import pickle
import sys
from ._compat import PY2, string_types, pjoin, iteritems, to_bytes, exists
from ._load import portalocker
from .helpers.classes import SQLCustomType
class Migrator(object):
def __init__(self, adapter):
self.adapter = adapter
... | |
# Copyright 2012 IBM Corp.
#
# 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 t... | |
from __future__ import unicode_literals
import datetime
import functools
import re
from itertools import chain
from django.conf import settings
from django.db import models
from django.db.migrations import operations
from django.db.migrations.migration import Migration
from django.db.migrations.operations.models impo... | |
# This module should be kept compatible with Python 2.1.
"""distutils.command.install_lib
Implements the Distutils 'install_lib' command
(install all Python modules)."""
__revision__ = "$Id: install_lib.py 81308 2010-05-18 23:37:50Z georg.brandl $"
import os
from types import IntType
import sys
from distutils.core ... | |
# 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 a... | |
"""
Test the hashing module.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2009 Gael Varoquaux
# License: BSD Style, 3 clauses.
import nose
import time
import hashlib
import tempfile
import os
import gc
import io
import collections
from ..hashing import hash
from ..func_insp... | |
# 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... | |
import unittest
import datetime
from PIL import Image, ImageDraw
from tmstiler.rtm import RasterTileManager
SPHERICAL_MERCATOR_SRID = 3857 # google maps projection
class Point:
def __init__(self, x, y, srid=SPHERICAL_MERCATOR_SRID):
self.x = x
self.y = y
self.srid = srid
class Dumm... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import os
import re
... | |
#!/usr/bin/env python
#******************************************************************************
# Name: gamma_filter.py
# Purpose: ; gamma MAP adaptive filtering for polarized SAR intensity images
# Ref: Oliver and Quegan (2004) Understanding SAR Images, Scitech
# Usage:
# py... | |
# orm/dependency.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Relationship dependencies.
"""
from .. import sql, util, exc as sa_exc
from . i... | |
# # # # #
# system.py
#
# University of Illinois/NCSA Open Source License
# Copyright (c) 2015 Information Trust Institute
# All rights reserved.
#
# Developed by:
#
# Information Trust Institute
# University of Illinois
# http://www.iti.illinois.edu
#
# Permission is hereby granted, free of charge, to any person obtai... | |
from test import test_support
import random
import sys
import unittest
verbose = test_support.verbose
nerrors = 0
def check(tag, expected, raw, compare=None):
global nerrors
if verbose:
print " checking", tag
orig = raw[:] # save input in case of error
if compare:
raw.sort(compa... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# Copyright (C) 2006 Alec Thomas
# Copyright (C) 2007 Eli Carter
# Copyright (C) 2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part ... | |
"""
This sample demonstrates a system for drying material. Various pieces
of material must be dried on defined or higher temperature for defined
period of time, uninterrupted. This system keeps track on the temperature
in the oven, as well as the material in the oven and how long it has been
drying.
"""
from collection... | |
# Copyright 2018 Google 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, ... | |
"""
Django settings for marco_portal project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
import os
from p97settings import IniParser
from os.path import abspa... | |
from cuttsum.l2s._base import _SearchBase
class SelectLexNextOracle(_SearchBase):
def setup_cache(self):
return set()
def update_cache(self, pred, sents, df, cache):
cache.update(df.iloc[pred]["lemmas stopped"])
return cache
def make_select_example(self, sent, sents, df, cach... | |
# encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from django.conf import settings
from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.shortcuts import render
from haystack.forms import FacetedSearchForm, ModelSearchF... | |
from itertools import chain
import numpy as np
from algorithms.graph import BaseGraph
class NodeMapping:
"""Graphs with labeled nodes is not the fundamental graph theory
problem, so use this utility class if you need labeled vertices"""
def __init__(self, labels):
labels = sorted(labels)
... | |
"""
Tests for bitarray
Author: Ilan Schnell
"""
import os
import sys
import unittest
import tempfile
import shutil
from random import randint
from cStringIO import StringIO
if __name__ == '__main__':
from __init__ import bitarray, bits2bytes
repr_type = "<class '__init__.bitarray'>"
else:
from bitarray i... | |
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# t... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import functools
imp... | |
#
# 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... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
from subprocess import check_output, STDOUT
from time import time, strftime, sleep
import RPi.GPIO as io
# DEBUG Mode Settings
DEBUG = ''
# [X]: Setup RTC
# [ ]: Setup LCD
# Sanity Checks
# [ ]: Verify the RTC is present (query the dev)
# [ ]: Ve... | |
#
# CORE
# Copyright (c)2012-2013 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
#
'''
sdt.py: Scripted Display Tool (SDT3D) helper
'''
from core.constants import *
from core.api import coreapi
from .coreobj import PyCoreNet, PyCore... | |
# Copyright 2014 Cloudbase Solutions Srl
#
# 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 l... | |
import asyncio
import multiprocessing
import os
import socket
import ujson as json
from email.utils import formatdate
from functools import partial
from http import HTTPStatus
import httptools
from jsonschema import Draft4Validator, ErrorTree
__version__ = '3.0.1'
class HTTPException(Exception):
def __init__(se... | |
# Natural Language Toolkit: TnT Tagger
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Sam Huston <sjh900@gmail.com>
#
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
'''
Implementation of 'TnT - A Statisical Part of Speech Tagger'
by Thorsten Brants
http://acl.ldc.upenn.edu/A/A00/A00-1031.pdf... | |
"""Unit test for DPTControlStepCode objects."""
import pytest
from xknx.dpt import (
DPTControlStartStop,
DPTControlStartStopBlinds,
DPTControlStartStopDimming,
DPTControlStepCode,
DPTControlStepwise,
)
from xknx.exceptions import ConversionError
class TestDPTControlStepCode:
"""Test class fo... | |
from collections import Counter
from collections.abc import MutableSet as AbcMutableSet
from dataclasses import Field
from enum import Enum
from functools import lru_cache
from typing import Any, Callable, Dict, Optional, Tuple, Type, TypeVar, Union
from attr import Attribute
from attr import has as attrs_has
from att... | |
#!/usr/bin/python
"""
Program for creating HTML plots
"""
import os
import sys
import json
import time
from readevtlog import *
def write_prefix():
f.write('''
<!doctype html>
<html>
<head>
<title>DNA performance report</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src... | |
# Copyright 2014 Rustici Software
#
# 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... | |
# Copyright 2015 Conchylicultor. 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 ... | |
# Copyright (c) 2012 OpenStack Foundation.
#
# 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... | |
import usb.core
import time
# Find the st link
dev = usb.core.find(idVendor=0x0483, idProduct=0x3748)
# configuration = dev.get_active_configuration()
# print configuration
#
# dev.set_configuration()
# # We senf 0xf308, and the chip responds with 20 bytes. The first four and last 12
# # are encrypted with key "best... | |
# 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... | |
# Copyright (c) 2020 PaddlePaddle 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 app... | |
import bs
import weakref
def bsGetAPIVersion():
# see bombsquadgame.com/apichanges
return 4
def bsGetGames():
return [BoxingOfTheHillGame]
class BoxingOfTheHillGame(bs.TeamGameActivity):
FLAG_NEW = 0
FLAG_UNCONTESTED = 1
FLAG_CONTESTED = 2
FLAG_HELD = 3
@classmethod
def getName(... | |
# 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... | |
"""
Tests for a location card.
"""
import pytest
from onirim import card
from onirim import core
from onirim import component
from onirim import agent
from onirim import exception
LOCATION_PLAY_SIMPLE_CASE = (
card.sun(card.Color.red),
component.Content(undrawn_cards=[], hand=[card.sun(card.Color.red)]),
... | |
from django.utils import timezone
from transitions import Machine, MachineError
from api.providers.workflows import Workflows
from framework.auth import Auth
from osf.exceptions import InvalidTransitionError
from osf.models.preprintlog import PreprintLog
from osf.models.action import ReviewAction, NodeRequestAction, ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Eldar Nugaev
# 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/li... | |
import functools
import glob
import gzip
import os
import sys
import warnings
import zipfile
from itertools import product
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import Ba... | |
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
#import mshr
from dolfin import *
import sympy as sy
import numpy as np
import ExactSol
import MatrixOperations as MO
import CheckPetsc4py as CP
from dolfin import __version__
import MaxwellPrecond as MP
import StokesPrecond
import time
d... | |
# coding: utf-8
from datetime import date, datetime
from typing import List, Dict, Type
from openapi_server.models.base_model_ import Model
from openapi_server.models.pipeline_branchesitemlatest_run import PipelineBranchesitemlatestRun
from openapi_server.models.pipeline_branchesitempull_request import PipelineBranc... | |
"""
1. Goto https://console.developers.google.com/iam-admin/projects
2. Create new project
3. Goto APIs and register for OAuth2.0 for installed applications
4. Download JSON secret file and move into same directory as this file
"""
# flake8: noqa
from datetime import datetime
import re
from pandas import compat
import... | |
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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 __future__ import absolute_import
from __future__ import unicode_literals
import pytest
from compose.config.environment import Environment
from compose.config.interpolation import interpolate_environment_variables
from compose.config.interpolation import Interpolator
from compose.config.interpolation import Inva... | |
#!/usr/bin/env python2
#
# Copyright (c) 2016 Intel Corporation.
#
# SPDX-License-Identifier: Apache-2.0
#
import sys,re,os
import datetime
class ContextSwitch():
def __init__(self, context):
self.context = context
class Interrupt():
def __init__(self, irq):
self.irq = irq
class Sleep():
def __init__(self, ... | |
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
import scipy.sparse as sp
from abc import ABCMeta, abstractmethod
from ... | |
#!/usr/bin/env python
"""
check_glstring.py
This script does a few sanity checks of a GL String
Checks the following...
- if a locus is found in more than one locus block
e.g., this is good
HLA-A*01:01/HLA-A*01:02+HLA-A*24:02^HLA-B*08:01+HLA-B*44:02^"
e.g., this is bad
HLA-A*01:01/HLA-A*01:02+HLA-A*24:02^HLA-... | |
#!/usr/bin/env python
###############################################################################
# Name: SystemSettingsDemo.py #
# Purpose: SystemSettings Test and Demo File #
# Author: Cody Precord <cprecord@editra.org> ... | |
# -*- coding: utf-8 -*-
"""Python client for InfluxDB v0.8."""
import warnings
import json
import socket
import requests
import requests.exceptions
from six.moves import xrange
from six.moves.urllib.parse import urlparse
from influxdb import chunked_json
session = requests.Session()
class InfluxDBClientError(Exce... | |
# 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
# --------------------------------------------------------------------------
# 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 ... | |
#########################################################################
# 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... | |
from __future__ import print_function
import os
import sys
import subprocess as sp
import re
import pprint
import tempfile
import shutil
import argparse
import codecs
from .popenwrapper import Popen
from .compilers import llvmCompilerPathEnv
from .compilers import elfSectionName
from .compilers import darwinSegmentN... | |
# 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 ... | |
import datetime
import http.client
from rdr_service import clock
from rdr_service.dao.biobank_specimen_dao import BiobankSpecimen, BiobankSpecimenDao, BiobankSpecimenAttributeDao,\
BiobankAliquotDatasetItemDao, BiobankAliquotDao, BiobankAliquotDatasetDao
from rdr_service.dao.biobank_order_dao import BiobankOrderDa... | |
"""Input handling and transformation machinery.
The first class in this module, :class:`InputSplitter`, is designed to tell when
input from a line-oriented frontend is complete and should be executed, and when
the user should be prompted for another line of code instead. The name 'input
splitter' is largely for histor... | |
from pycparser import c_parser,c_ast
import StringIO
import types
def astFromString(s):
parser = c_parser.CParser()
return parser.parse(s)
t1 = """
struct Foo {
int x;
int y;
};
struct Foo2 {
int moo;
} bar;
struct {
int x;
} barbar;
int x;
int * y;
struct Foo x;
struct {
int x;
} ... | |
from __future__ import absolute_import, unicode_literals
from future.builtins import int, open
import os
try:
from urllib.parse import urljoin, urlparse
except ImportError:
from urlparse import urljoin, urlparse
from django.contrib import admin
from django.contrib.admin.views.decorators import staff_member_re... | |
import enum
import sys
import unittest
from enum import Enum, IntEnum, unique, EnumMeta
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
pyver = float('%s.%s' % sys.version_info[:2])
try:
any
except NameError:
def any(iterable):
for element in iterable:
if element:
... | |
# -*- coding: utf-8 -*-
"""
babel.messages.mofile
~~~~~~~~~~~~~~~~~~~~~
Writing of files in the ``gettext`` MO (machine object) format.
:copyright: (c) 2013 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
import array
import struct
from babel.messages.catalog import Catalog, ... | |
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
from __future__ import print_function
from rez.utils.execution import create_forwarding_script
from rez.exceptions import SuiteError, ResolvedContextError
from rez.resolved_context import ResolvedContext
from rez.utils.data_utils impor... | |
# -*- coding: utf-8 -*-
"""Display formatters.
Inheritance diagram:
.. inheritance-diagram:: IPython.core.formatters
:parts: 3
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import abc
import inspect
import json
import sys
import traceback
import warnings... | |
import sys
import unittest
from django.conf import settings
from django.contrib.admindocs import utils, views
from django.contrib.admindocs.views import get_return_data_type, simplify_regex
from django.contrib.sites.models import Site
from django.db import models
from django.db.models import fields
from django.test im... | |
import csv
from .api_test_base import ApiTestBase
class TestAPIOrgDetailsViews(ApiTestBase):
def test_api_view_org_details_total(self):
url = self.api_prefix
url += "/org_details?format=csv"
response = self.client.get(url, follow=True)
self.assertEqual(response.status_code, 200)
... | |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urllib_request,
compat_urlparse,
)
from ..utils import (
clean_html,
int_or_none,
parse_iso8601,
unescapeHTML,
)
class BlipTVIE(InfoExtractor):
_VALID_URL = ... | |
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import hashlib
import binascii
from . import backend
from ._asn1 import (
armor,
Certificate as Asn1Certificate,
DHParameters,
EncryptedPrivateKeyInfo,
Null,
OrderedDict,
Pbkdf2Salt,
Priv... | |
# -*- coding: utf-8 -*-
from contextlib import contextmanager
import inspect
from itertools import chain
from django.conf import settings
from django.utils.decorators import method_decorator
from django.utils.termcolors import colorize
from sekizai.helpers import validate_template
from cms import constants
from cms.m... | |
#!/usr/bin/env python
#
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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... | |
import numpy
import pandas
from palm.base.data_predictor import DataPredictor
from palm.likelihood_prediction import LikelihoodPrediction
from palm.forward_calculator import ForwardCalculator
from palm.linalg import ScipyMatrixExponential, ScipyMatrixExponential2, DiagonalExpm, vector_product
from palm.probability_vect... | |
import numpy as np
from .._common import lhs, messages, optimizer, selection_async, selection_sync
from .._helpers import OptimizeResult, register
from ._constraints import _constraints_map
from ._strategy import _strategy_map
__all__ = [
"minimize",
]
def minimize(
fun,
bounds,
x0=None,
args=()... | |
# $Id: core.py 7466 2012-06-25 14:56:51Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Calling the ``publish_*`` convenience functions (or instantiating a
`Publisher` object) with component names will result in default
behavior. For custom beha... | |
# Copyright (c) 2013 Julien Danjou <julien@danjou.info>
#
# 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 l... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from xml.e... | |
#from __pyjamas__ import debugger
# --------------------------------------------------------------------
# public interface
# flags
I = IGNORECASE = 1 # ignore case
L = LOCALE = 2 # assume current 8-bit locale
U = UNICODE = 4 # assume unicode locale
M = MULTILINE = 8 # make anchors look for newline
S = ... | |
"""(disabled by default) support for testing pytest and pytest plugins."""
from __future__ import absolute_import, division, print_function
import codecs
import gc
import os
import platform
import re
import subprocess
import six
import sys
import time
import traceback
from fnmatch import fnmatch
from weakref import W... | |
#!/usr/env/python
from collections import deque
import numpy as np
import pytest
from landlab import FieldError, HexModelGrid, RasterModelGrid
from landlab.components import (
FlowAccumulator,
FlowDirectorDINF,
FlowDirectorSteepest,
LakeMapperBarnes,
)
from landlab.utils import StablePriorityQueue
"... | |
# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of so... | |
"""
Python implementation of the fast ICA algorithms.
Reference: Tables 8.3 and 8.4 page 196 in the book:
Independent Component Analysis, by Hyvarinen et al.
"""
# Author: Pierre Lafaye de Micheaux, Stefan van der Walt, Gael Varoquaux,
# Bertrand Thirion, Alexandre Gramfort
# License: BSD 3 clause
import war... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Erkan Ozgur Yilmaz
#
# This module is part of oyProjectManager and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause
import os
import logging
logger = logging.getLogger(__name__)
class Config(object):
"""Config abstraction
... | |
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.