gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2013 xarvh # Copyright (c) 2013 roger # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 dequis # Copyright (c) 2015 Dario Giovannetti # Copyright (c) 2015 Alexander Lozovskoy # # Permission is hereby g...
"""MSAView - Uniprot support. Copyright (c) 2011 Joel Hedlund. Contact: Joel Hedlund <yohell@ifm.liu.se> MSAView is a modular, configurable and extensible package for analysing and visualising multiple sequence alignments and sequence features. This package provides support for downloading/saving uniprot informat...
''' MODIFIED. Inspiration taken from the ref link below. ref: https://raw.githubusercontent.com/kuza55/keras-extras/master/utils/multi_gpu.py The inspirational one carried license: Apache License Version 2.0, January 2004 For further info refer to: https://github.com/kuza55/keras-extras Also used https://githu...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9334") else: access = Ser...
import pprint import argparse import sys import os import re import seldon_utils import zk_utils import attr_schema_utils gdata = { 'all_clients_node_path': "/all_clients", } def getOpts(args): parser = argparse.ArgumentParser(prog='seldon-cli attr', description='Seldon Cli') parser.add_argument('--actio...
import logging import traceback import numpy as np from eemeter.structures import EnergyTrace logger = logging.getLogger(__name__) class SplitModeledEnergyTrace(object): ''' Light wrapper around models applicable to a single trace which fits and predicts multiple models for different segments. Paramet...
"""Support for HDMI CEC devices as media players.""" import logging from pycec.commands import CecCommand, KeyPressCommand, KeyReleaseCommand from pycec.const import ( KEY_BACKWARD, KEY_FORWARD, KEY_MUTE_TOGGLE, KEY_PAUSE, KEY_PLAY, KEY_STOP, KEY_VOLUME_DOWN, KEY_VOLUME_UP, POWER_OF...
# Copyright 2018 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/local/bin/python2.6 -tt # Copyright 2018-present Facebook, 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 b...
# Copyright 2016 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 a...
# dvcz/user.py """ User, PubUser, Committer, and PubCommitter objects and related classes and functions. """ import os # import re import sys import time import hashlib from buildlist import(check_dirs_in_path, generate_rsa_key, read_rsa_key, rm_f_dir_contents) from dvcz import DvczError from dv...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
#!/usr/bin/env python # 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 json import os import pipes import shutil import subprocess import sys script_dir = os.path.dirname(os.path.realpath(__file__)...
# Copyright (c) 2013 The SAYCBridge 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 z3b import enum from core import suit # The ordering of these values does not matter. We only use Enum so that # python throws an lookup error ...
#! /usr/bin/env python import xbmc import xbmcgui import xbmcplugin import xbmcaddon from ConfigParser import SafeConfigParser from datetime import timedelta from datetime import datetime from urllib2 import urlopen import HTMLParser import urlparse import urllib2 import urllib import random import time import sys i...
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os from authomatic.providers import oauth2 from authomatic import ...
# 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) Pymatgen Development Team. # Distributed under the terms of the MIT License. """Tools and helper functions for abinit calculations""" import os import re import collections import shutil import operator import numpy as np from fnmatch import fnmatch from monty.collections import dict2n...
# Copyright (c) 2016 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 applic...
from __future__ import annotations import contextlib import enum import math import typing from abc import ABCMeta, abstractmethod import cairocffi from libqtile import drawer, pangocffi, utils from libqtile.command.base import CommandError, CommandObject from libqtile.log_utils import logger if typing.TYPE_CHECKIN...
import copy import pickle import warnings import pandas as pd from .tools.normalize import normalize as normalizer from .tools.reduce import reduce as reducer from .tools.align import align as aligner from .tools.format_data import format_data from ._shared.helpers import convert_text, get_dtype from .config import _...
""" Adaptive numerical evaluation of SymPy expressions, using mpmath for mathematical functions. """ from sympy.mpmath.libmpf import (from_int, from_rational, fzero, normalize, bitcount, round_nearest, to_str, fone, fnone, fhalf, to_float, from_float, fnone, to_int, mpf_lt, mpf_sqrt, mpf_cmp, mpf_abs, ...
#!/usr/bin/env python """ Copyright (c) 2020 Alex Forencich 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 use, copy, modify, merg...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # # Tests for conversion of hgvs tags # import os import unittest import hgvs.variantmapper as variantmapper import hgvs.parser import framework.mock_input_source as mock_input_data_source class TestHgvsCToP(u...
""" Establishes a "when reviewable" flag for items, like Moodle Also adds records for supporting AssessmentPart child management """ from dlkit.abstract_osid.assessment import record_templates as abc_assessment_records from dlkit.json_.osid import record_templates as osid_records from dlkit.json_.osid import objects ...
# 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 under the Li...
""" Unit tests for visibility operations """ import unittest import numpy from numpy.testing import assert_allclose from astropy.coordinates import SkyCoord import astropy.units as u from data_models.memory_data_models import Skycomponent from data_models.polarisation import PolarisationFrame from processing_co...
# Copyright 2013 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 ...
''' Video ===== Core class for reading video files and managing the :class:`kivy.graphics.texture.Texture` video. .. versionchanged:: 1.8.0 There is now 2 distinct Gstreamer implementation: one using Gi/Gst working for both Python 2+3 with Gstreamer 1.0, and one using PyGST working only for Python 2 + Gs...
# 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 ...
# -*- 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 class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CatalogPage' db.create_table(u'ga_resources_catalogpage',...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut print, rrr, profile = ut.inject2(__name__, '[_plh]') VERB_PIPELINE = ut.get_argflag(('--verb-pipeline', '--verb-pipe')) or ut.VERYVERBOSE VERB_TESTDATA = ut.get_argflag('--verb-testdata') or u...
import string from importlib import import_module import warnings from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.contrib.auth.signals import user_logged_in, user_logged_out from django.core.exceptions import FieldDoesNotE...
""" Applies a (previously trained) Caffe classification model to new image data. This code takes a brute-force approach to generating per-pixel predictions; it simply extracts a tile around every pixel (that is sufficiently far away from the image border) and runs each tile through Caffe. This entails many repeated c...
# Copyright 2014 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 mimetypes import urlparse import os from logging import getLogger from pylons import config from ckan.common import json from ckan import plugins as p import ckan.lib.helpers as h try: from ckan.lib.datapreview import on_same_domain except ImportError: from ckan.lib.datapreview import _on_same_domain...
# # 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...
# Copyright 2020 The gRPC 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 applicable law or agreed to in wri...
# Copyright (C) 2013 Nippon Telegraph and Telephone 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 applicab...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( get_element_by_attribute, int_or_none, limit_length, lowercase_escape, try_get, ) class InstagramIE(InfoExtractor): _VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com/p/(?P<id>[^/?...
import sys import os PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT,"scripts")) sys.path.append(os.path.join(PROJECT_ROOT,"experimental")) if len(sys.argv) >= 3 and "--help" not in sys.argv: print sys.argv args = sys.argv mode_arg = args[args.index("-mode")+1] prin...
''' ModalView ========= .. versionadded:: 1.4.0 The :class:`ModalView` widget is used to create modal views. By default, the view will cover the whole "parent" window. Remember that the default size of a Widget is size_hint=(1, 1). If you don't want your view to be fullscreen, either use size hints with values lower...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # no...
# # Copyright 2021 Espressif Systems (Shanghai) CO., LTD # # 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...
from __future__ import division import numpy as np from itertools import combinations_with_replacement from .core import Data, Summary, Propensity, PropensitySelect, Strata from .estimators import OLS, Blocking, Weighting, Matching, Estimators class CausalModel(object): def __init__(self, Y, D, X): self.old_dat...
#!/usr/bin/env python # # Copyright 2015 British Broadcasting 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 requ...
#!/usr/bin/env python3 # Copyright 2016 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. """ Usage: gn_to_cmake.py <json_file_name> gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py or gn gen out/con...
import pytest import pandas as pd import numpy as np from pandas import SparseArray, SparseDtype from pandas.errors import PerformanceWarning from pandas.tests.extension import base import pandas.util.testing as tm def make_data(fill_value): if np.isnan(fill_value): data = np.random.uniform(size=100) ...
# 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. # # Licensed under the Apache License, Version 2.0 (...
"""Appcommands-compatible command class with extra fixins.""" from __future__ import print_function import cmd import inspect import pdb import shlex import sys import traceback import types import six from google.apputils import app from google.apputils import appcommands import gflags as flags __all__ = [ 'Ne...
''' // Copyright 2008 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 ...
# Copyright 2014 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 ...
#! /usr/bin/python """ Module which handles the creation of a Caravan Scenario, an object representing a Caravan input event. Scenario stems from the name used in the database to indicate a seismic input event. The module uses globals.py (glb in the module) to cast and check each new value added to a Scenario, for w...
""" Pkgutil support for Solaris .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. """ import copy import salt....
# -*- coding: utf-8 -*- # Unit and doctests for specific database backends. import datetime from django.conf import settings from django.core.management.color import no_style from django.db import backend, connection, connections, DEFAULT_DB_ALIAS, IntegrityError from django.db.backends.signals import connection_creat...
import unittest from cpu import * class ROOperand(object): ''' Mocking class for operand ronly ''' def __init__(self, size, value): self.size = size self.value = value def read(self): return self.value & ((1<<self.size)-1) class RWOperand(ROOperand): ''' Mocking class for operan...
""" Title: Graph attention network (GAT) for node classification Author: [akensert](https://github.com/akensert) Date created: 2021/09/13 Last modified: 2021/12/26 Description: An implementation of a Graph Attention Network (GAT) for node classification. """ """ ## Introduction [Graph neural networks](https://en.wikip...
# -*- coding: utf-8 -*- # # 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 #...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
#!/usr/bin/env python # cheat.py __author__ = "Kody Brown (kody@bricksoft.com)" __created__ = "10/23/2013" __copyright__ = "(C) 2013 Kody Brown. Released under the MIT License." __contributors__ = ["Kody Brown"] __version__ = "0.21" import glob import os import sys import shutil, errno from urllib.request import url...
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 pruning code # ******** # WARNING: # This test uses 4GB of disk space. # This test takes 30 mins...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 the RBF code.""" from decimal import Decimal from test_framework.messages import COIN, COutPoint...
"""Command Line Interface to opyd objects""" from __future__ import print_function import time import functools import sys from contextlib import contextmanager, closing from StringIO import StringIO import collections from IPython.utils.coloransi import TermColors as tc from epics import caget, caput from ..contro...
"""Profile the memory usage of a Python program""" # .. we'll use this to pass it to the child script .. _clean_globals = globals().copy() __version__ = '0.32' _CMD_USAGE = "python -m memory_profiler script_file.py" import time import sys import os import pdb import warnings import linecache import inspect import s...
import re from JumpScale import j import JumpScale.sal.disklayout.mount as mount import JumpScale.sal.disklayout.lsblk as lsblk _formatters = { # specific format command per filesystem. 'ntfs': lambda name, fstype: 'mkfs.ntfs -f {name}'.format(name=name) } isValidFS = lambda v: v.startswith('ext') or v in ...
import glob import os from . import BOTOCORE_ROOT from .compat import json from .compat import OrderedDict from .exceptions import ApiVersionNotFoundError from .exceptions import DataNotFoundError def cachable(func): """ A convenient decorator for getting the data (either from the cache or populating the...
import os import tempfile import uuid from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models.fields.files import Imag...
"""This module defines a base Exporter class. For Jinja template-based export, see templateexporter.py. """ from __future__ import print_function, absolute_import import io import os import copy import collections import datetime from traitlets.config.configurable import LoggingConfigurable from traitlets.config im...
import csv from datetime import datetime, date import json import os import re import six import tempfile from urlparse import urlparse from zipfile import ZipFile from bson import json_util from django.conf import settings from django.core.files.base import File from django.core.files.temp import NamedTemporaryFile f...
# coding=utf-8 # Copyright (c) 2014-2018, F5 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 required by applicable...
from __future__ import absolute_import, division, unicode_literals from future.builtins import int, open, str from hashlib import md5 import os try: from urllib.parse import quote, unquote except ImportError: from urllib import quote, unquote from django.apps import apps from django.contrib import admin from ...
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest import sys import os import shutil import subprocess from copy import copy, deepcopy from test.test_support import run_unittest, TESTFN, unlink, get_attribute import sy...
# Copyright 2017 Google LLC # # 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...
# $Id$ # # Copyright (C) 2002-2006 Greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ tools for interacti...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from operator import itemgetter import warnings from jax import random, vmap from jax.lax import stop_gradient import jax.numpy as jnp from jax.scipy.special import logsumexp from numpyro.distributions.kl import kl_divergence from nu...
""" Provide the functionality to group entities. For more details about this component, please refer to the documentation at https://home-assistant.io/components/group/ """ import asyncio import logging import os import voluptuous as vol from homeassistant import config as conf_util, core as ha from homeassistant.co...
# # Copyright (c) SAS Institute 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...
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 limita...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2017 Snowflake Computing Inc. All right reserved. # from io import StringIO import pytest from snowflake.connector.compat import PY2 from snowflake.connector.util_text import split_statements def _to_unicode(sql): return sql.decode('utf-8') if...
#!/usr/bin/env python import sys import time import json #from multiprocessing import Process, Queue, Value,Array import robot_class from hokuyolx import HokuyoLX #import main_file import smach import roslib import smach_ros import rospy # import logging # logging.getLogger('rosout').setLevel(logging.CRITICAL) # c...
# # 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ GPLv3 license (ASTRA toolbox) Note that the TomoPhantom package is released under Apache License, Version 2.0 * Script to generate 3D analytical phantoms and their projection data using TomoPhantom * Synthetic flat fields are also genererated and noise incorporated in...
# -*- coding: utf-8 -*- # # Copyright (c) 2016 VMware, 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...
# coding=utf-8 # Copyright 2020 Google AI, Google Brain, the HuggingFace Inc. team and Microsoft 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/lic...
import inspect import os import sys from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS, connections from django.db.migrations.loader import MigrationLoader from django.utils.timezone import now from . import __ve...
import copy import json import os import re from pydmrs.matching.exact_matching import dmrs_exact_matching from shapeworld.analyzers.ace import Ace from shapeworld.captions import Attribute, Relation, EntityType, Selector, Existential, Quantifier, NumberBound, ComparativeQuantifier, Proposition from shapeworld.realizer...
# Copyright 2012 OpenStack Foundation # Copyright 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 obtain # a copy of the License at # # ht...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, with_statement import datetime import django import logging import mock import pytest import re import sys from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.core.signals import got_reques...
# 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 ...
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: 2007 Pallets :license: BSD-3-Clause """ import io import re import warnings from functools import partial from functools import update_wrapper from itertools import chain from ._compat...
from copy import deepcopy import numpy as np import matplotlib.pyplot as plt import struct from scipy.spatial.distance import hamming ################################################################################################## # Setting the path for searching modules ############################################...
#!/usr/bin/python __author__ = "Ryan Plyler" __version__ = 0.2 import sys import json import os ######################################################################## # Config ######################################################################## TODO_FILENAME = os.path.join(os.getcwd(), '.todo.list') ########...
from matplotlib import pyplot as plt, patches from scipy.spatial import distance from sklearn.manifold import MDS import numpy as np import os import basics import rater_analysis import svg_polygons import Voronoi import geometry # Globals label_font_size = 10 # points axis_font_size = 8 # points legend_font_size = 1...
from game import Mode from dmd import TextLayer, GroupedLayer class ServiceModeSkeleton(Mode): """Service Mode List base class.""" def __init__(self, game, priority, font): super(ServiceModeSkeleton, self).__init__(game, priority) self.name = "" self.title_layer = TextLayer(1, 1, font, "left") self.item_laye...
from common.tests import ViewTestCase from common import api from common import clean from common import exception from common import util class LoginTest(ViewTestCase): def test_login_when_signed_out(self): r = self.login_and_get(None, '/login') self.assertContains(r, "Forgot your password?") self.asse...
# Copyright (c) 2019, Michael Boyle # See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE> """Evaluating Wigner D matrices, spin-weighted spherical harmonics, and related. This module contains code for evaluating the Wigner 3j symbols, the Wigner D matrices, scalar spherica...