gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2016 MaxPoint Interactive, 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: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
# Copyright 2019 DeepMind Technologies Limited. 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 ...
""" Output for vt100 terminals. A lot of thanks, regarding outputting of colors, goes to the Pygments project: (We don't rely on Pygments anymore, because many things are very custom, and everything has been highly optimized.) http://pygments.org/ """ from __future__ import unicode_literals from prompt_toolkit.filter...
# -*- coding: utf-8 -*- from __future__ import unicode_literals ''' Developer Navdeep Ghai Email navdeep@korecent.com ''' import frappe from frappe import _, throw from frappe.utils import cint, cstr, flt from bcommerce.utils.api import get_connection, is_exists from bcommerce.utils.logger import get_logger, make_l...
# Copyright 2009-2011 10gen, 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...
import unittest from htmlr import * class TestHtmlr(unittest.TestCase): def test_node(self): n = div() self.assertEqual(n.display(), "div {} []\n") def test_node_class(self): n = div self.assertEqual(n.display(), "div {} []\n") def test_node_sibling(self): n = sec...
import numpy as np import pylab as pl import pandas as pd import os,sys from dateutil.parser import parse from datetime import datetime import time from collections import Counter sys.path.append("/Users/maithoma/work/python/") from tm_python_lib import * from fitting_tools import * from adaptive_kernel_tom import a...
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file import os,imp,sys from waflib import Utils,Errors,Logs import waflib.Node HEXVERSION=0x1060600 WAFVERSION="1.6.6" WAFREVISION="11388" ABI=98 DBFILE='.wafpickle-%d'%ABI APPNAME...
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=3> # ARMA example using sunpots data # <codecell> import numpy as np from scipy import stats import pandas import matplotlib.pyplot as plt import statsmodels.api as sm # <codecell> from statsmodels.graphics.api import qqplot # <codecell> p...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Rackspace # # 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 # # ...
""" test with the .transform """ import pytest import numpy as np import pandas as pd from pandas.util import testing as tm from pandas import Series, DataFrame, Timestamp, MultiIndex, concat, date_range from pandas.core.dtypes.common import ( ensure_platform_int, is_timedelta64_dtype) from pandas.compat import S...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
# 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...
from __future__ import absolute_import from pony.py23compat import buffer, int_types import json from decimal import Decimal from datetime import datetime, date, time, timedelta from uuid import UUID NoneType = type(None) import warnings warnings.filterwarnings('ignore', '^Table.+already exists$', Warning, '^pony\\....
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from boto3 import client from collections import defaultdict from incf.countryutils.transformations import cca_to_ctca2 from uuid import uuid4 import logging import re from ..record import Record, Update from .base 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...
""" A sensor to monitor incoming and outgoing phone calls on a Fritz!Box router. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.fritzbox_callmonitor/ """ import logging import socket import threading import datetime import time import re import v...
from common_fixtures import * # NOQA import re @pytest.mark.parametrize('kind', ['user', 'admin']) def test_account_create(kind, admin_user_client, random_str): account = admin_user_client.create_account(kind=kind, name=random_str) assert account.state == "regi...
# 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/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Performance tests for Chrome Endure (long-running perf tests on Chrome). This module accepts the following environment variable...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy, mse...
# 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Davis Phillips davis.phillips@gmail.com # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1....
# Copyright (c) 2018 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...
from contextlib import closing from multiprocessing import Pool, cpu_count import numpy as np import pickle from IPython import embed from teafacto.blocks.seq.oldseqproc import SimpleVec2Idx, MemVec2Idx from teafacto.blocks.seq.enc import SimpleSeq2Vec from teafacto.blocks.seq.enc import Seq2Idx from teafacto.blocks....
# Copyright 2020 The FedLearner 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) 2012 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...
# 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 th...
# # 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 ...
import os class ResultType: FOLDER, FILE = range(2) class Index: """Index object created for each repository: note, we're assuming that local copies of the indexes will use the same formats""" def __init__(self, repo): modulePath = os.path.realpath(__file__) modulePath = modulePath[:modulePath.rfind("/")] ...
#!/usr/bin/env python # Copyright 2013 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 unittest from compiled_file_system import CompiledFileSystem from object_store_creator import ObjectStoreCreator fr...
# vim:ts=4:sw=4:et: # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import atexit import json import os import signal import subprocess import sys import tempfile import threading import ...
import CatalogItem from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.toon import ToonDNA import random from direct.showbase import PythonUtil from direct.gui.DirectGui import * from pandac.PandaModules import * CTArticle = 0 CTString = 1 CTBasePrice = 2 CTEmblemPrices...
#!/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. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
# Copyright 2015, Ansible, Inc. # Luke Sneeringer <lsneeringer@ansible.com> # # 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 requi...
"""Conversion tool from CTF to FIF.""" # Author: Eric Larson <larson.eric.d<gmail.com> # # License: BSD (3-clause) import os import os.path as op import numpy as np from ...utils import verbose, logger, _clean_names, fill_doc, _check_option from ..base import BaseRaw from ..utils import _mult_cal_one, _blk_read_li...
""" >>> from blaze import * >>> accounts = symbol('accounts', 'var * {name: string, amount: int}') >>> deadbeats = accounts[accounts['amount'] < 0]['name'] >>> from sqlalchemy import Table, Column, MetaData, Integer, String >>> t = Table('accounts', MetaData(), ... Column('name', String, primary_key = True...
# coding=utf-8 # Copyright 2022 The Deeplab2 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 ...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
''' 7-plot-means.py ========================= AIM: Plots the means of 6-mean_sl.py ! Comparison for an arbitrary number of cases INPUT: files: - <orbit_id>_misc/orbits.dat - <orbit_id>_flux/flux_*.dat variables: see section PARAMETERS (below) OUTPUT: in all_figures/ : comparison for every orbit_id CMD: python 7-...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 IBM Corp. # Copyright 2013 eNovance <licensing@enovance.com> # Copyright Ericsson AB 2013. All rights reserved # Copyright 2014 Hewlett-Packard Company # Copyright 2015 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0...
# -*- coding: utf-8 -*- """Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org # Brian Cheung # Wei LI <kuantkid@gmail.com> # License: BSD 3 clause import warnings import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import check_rand...
# Copyright (c) 2015 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
import boto3 import logging import os import math import re from datetime import datetime from flask import g from sqlalchemy import func, desc, cast, Numeric from sqlalchemy.sql.expression import case from dataactcore.aws.s3Handler import S3Handler from dataactcore.config import CONFIG_BROKER, CONFIG_SERVICES from d...
""" Contingency table functions (:mod:`scipy.stats.contingency`) ============================================================ Functions for creating and analyzing contingency tables. .. currentmodule:: scipy.stats.contingency .. autosummary:: :toctree: generated/ chi2_contingency relative_risk crosstab ...
__author__ = 'asifj' import requests from pymongo import MongoClient from bson import Binary, Code import json import csv import traceback import logging from tabulate import tabulate import datetime logging.basicConfig( format='%(asctime)s.%(msecs)s:%(name)s:%(thread)d:%(levelname)s:%(process)d:%(message)s', ...
"""Support for Amcrest IP cameras.""" import logging from datetime import timedelta import aiohttp import voluptuous as vol from homeassistant.const import ( CONF_NAME, CONF_HOST, CONF_PORT, CONF_USERNAME, CONF_PASSWORD, CONF_BINARY_SENSORS, CONF_SENSORS, CONF_SWITCHES, CONF_SCAN_INTERVAL, HTTP_BASIC_AUTH...
# Copyright 2013 Big Switch Networks, 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 ...
# Copyright 2012-2015 MongoDB, 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 writin...
# # $Id$ # # Copyright 2006 Kosmix Corp. # # Author: Blake Lewis (Kosmix Corp.) # # This file is part of Kosmos File System (KFS). # # 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://w...
""" GBTIDL SDFITS file ================== GBTIDL SDFITS files representing GBT observing sessions can be read into pyspeckit. Additional documentation is needed. Nodding reduction is supported, frequency switching is not. """ from __future__ import print_function from six import iteritems try: import astropy.io...
# Copyright 2014 IBM Corp. # # 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 a...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os from marionette_test import MarionetteTestCase from marionette import HTMLElement from errors import NoSuchEle...
# 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...
"""Test config utils.""" # pylint: disable=protected-access from collections import OrderedDict import copy import os from unittest import mock import pytest import voluptuous as vol from voluptuous import Invalid, MultipleInvalid import yaml import homeassistant.config as config_util from homeassistant.const import ...
# 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...
# Copyright 2014 Cisco Systems, 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 requir...
import django_filters from django.conf import settings from django.db import models from django.test import TestCase from mptt.fields import TreeForeignKey from taggit.managers import TaggableManager from dcim.choices import * from dcim.fields import MACAddressField from dcim.filters import DeviceFilterSet, SiteFilter...
import os import json import datetime import time import shutil import re import pandas as pd import numpy as np from download_data import download_bulk_resource def make_raw_case_metadata_master(data_dir, remove=True): """ Creates the node_metadata.csv file all jurisdictions. Note that if the node_meta...
#!/usr/bin/env python """ Setuptools bootstrapping installer. Run this script to install or upgrade setuptools. """ import os import shutil import sys import tempfile import zipfile import optparse import subprocess import platform import textwrap import contextlib import warnings from distutils import log try: ...
# iRF benchmarks import numpy as np import time from copy import deepcopy import matplotlib.pyplot as plt import os import yaml from sklearn import tree from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier from IPython.display import display, Image from sklearn.dat...
from twisted.internet.defer import inlineCallbacks, returnValue from vumi.tests.helpers import VumiTestCase, MessageHelper from vumi.tests.utils import LogCatcher from go.vumitools.routing import ( AccountRoutingTableDispatcher, RoutingMetadata, RoutingError, UnroutableMessageError, NoTargetError) from go.vum...
#!/usr/bin/env python """tilestache-seed.py will warm your cache. This script is intended to be run directly. This example seeds the area around West Oakland (http://sta.mn/ck) in the "osm" layer, for zoom levels 12-15: tilestache-seed.py -c ./config.json -l osm -b 37.79 -122.35 37.83 -122.25 -e png 12 13 14 15 ...
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, merge, publish, ...
''' Created on May 7, 2017 @author: jamie ''' from math import sqrt import scipy as np import scipy.linalg from pyPassiveRanging.dynamicsModels.propModel import propEstModel from pyPassiveRanging.extraMath.extraLinearAlgebra import (quatnormalize, quatmultip...
# -*- coding: UTF-8 -*- # Copyright 2011-2017 Luc Saffre # # License: BSD (see file COPYING for details) """ Database models for `lino_xl.lib.extensible`. .. autosummary:: """ from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) import datetime from django.conf import sett...
# 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...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import json from datetime import time, timedelta import dateutil.parser import pytz from flask import ses...
schema = { "vtm": { "fields": ["nm", "invalid", "abbrevnm", "vtmidprev", "vtmiddt"], "dmd_obj_relations": ["vmp"], "other_relations": [], }, "vmp": { "fields": [ "nm", "bnf_code", "vtm", "vpiddt", "vpidprev", ...
# # Copyright (c) 2014-2015 Christopher L. Felton # from __future__ import absolute_import import myhdl from myhdl import (Signal, intbv, always_seq, always, always_comb, instances, enum, delay, concat) from .. import Clock from .. import Reset from . import MemoryMapped from . import Barebone c...
# -*- coding: utf-8 -*- # Copyright 2022 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...
"""This version uses a traditional event-driven version, using continuation passing style. Each method call is passed a completion callback and an error callback """ from statistics import median import json import asyncio import random import time import hbmqtt.client from collections import deque from antevents.base...
__author__ = 'Jan-Hendrik Prinz' import logging import openpathsampling as paths from openpathsampling.netcdfplus import StorableObject, lazy_loading_attributes from openpathsampling.netcdfplus import DelayedLoader from .treelogic import TreeMixin logger = logging.getLogger(__name__) # @lazy_loading_attributes('de...
#!/usr/bin/env python import draft2tool import argparse from avro_ld.ref_resolver import Loader import json import os import sys import logging import workflow import avro_ld.validate as validate import tempfile import avro_ld.jsonld_context import avro_ld.makedoc import yaml import urlparse import process import job ...
# -*- coding: utf-8 -*- import codecs import io import re import subprocess import sys from six import raise_from, string_types from .config import Config from .source import Source class IMGKit: """Main class for imgkit""" class SourceError(Exception): """Wrong source type for stylesheets""" ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
#!/usr/bin/python import argparse import os.path import cPickle import tempfile import random import hashlib from features import mfcc from features import logfbank import scipy.io.wavfile as wav from scikits.samplerate import resample import numpy as n from pydub import AudioSegment from itertools import tee, izip f...
# 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...
from __future__ import unicode_literals, division, absolute_import import hashlib import logging import mimetypes import os import shutil import socket import sys import tempfile import urllib import urllib2 from cgi import parse_header from httplib import BadStatusLine from requests import RequestException from flex...
from panda3d.core import * from panda3d.direct import * from direct.interval.IntervalGlobal import * from BattleBase import * from direct.actor import Actor from toontown.distributed import DelayDelete from direct.directnotify import DirectNotifyGlobal import DistributedBattleBase import MovieUtil from toontown.suit im...
# 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 base64 import copy import logging import requests import six from binascii import hexlify from hashlib import sha1 from saml2.metadata import ENDPOINTS from saml2.profile import paos, ecp, samlec from saml2.soap import parse_soap_enveloped_saml_artifact_resolve from saml2.soap import class_instances_from_soap_...
"""Provides functionality to interact with image processing services.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, CONF_ENTITY_ID, CONF_NAME) from homeassistant.core import callback from homeassistant.exceptio...
#!/usr/bin/env python # test cases for parfile.py import string import unittest import StringIO import math import testbase import parfile import fractal import fc import preprocessor import gradient g_comp = fc.Compiler() g_comp.add_func_path("../formulas") g_comp.load_formula_file("gf4d.frm") g_comp.load_formul...
#!/usr/bin/env 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...
import tvm from tvm import autotvm import topi import topi.testing import numpy as np from topi.util import get_const_tuple from topi.nn.util import get_pad_tuple from tvm.contrib.pickle_memoize import memoize from common import get_all_backend def depthwise_conv2d_with_workload_nchw(batch, in_channel, in_height, cha...
''' (C) 2014-2019 Roman Sirokov and contributors Licensed under BSD license http://github.com/r0x0r/pywebview/ ''' import os import platform import json import logging import webbrowser import socket from uuid import uuid1 from copy import deepcopy from threading import Semaphore, Event from webview import _debug, _...
# 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/env python # # Copyright 2007 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 o...
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import simple from expedient.clearinghouse.utils import post_message_to_current_user from expedient.common.messaging.models import DatedMessage from expedie...
import unittest from nose.tools import raises from kqml import KQMLList from indra.statements import Phosphorylation, Agent, Statement, \ Dephosphorylation, Complex, ActiveForm, Activation, IncreaseAmount from .integration import _IntegrationTest from .test_ekb import _load_kqml from bioagents import Bioagent from ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc. ############################################################################## # # OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
from copy import copy import datetime from mock import Mock, patch from django.core.urlresolvers import reverse from django.core.exceptions import NON_FIELD_ERRORS from django.test import TestCase from django.test.client import RequestFactory from django.template.context import RequestContext from ..fields import ERR...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { 'auth.group': { 'Meta': {'objec...
''' Created on May 23, 2015 @author: hsorby ''' import re import os from opencmiss.zinc.field import Field from opencmiss.zinc.status import OK from mapclientplugins.hearttransformstep.definitions import LONG_AXIS, SHORT_AXIS from mapclientplugins.hearttransformstep.maths.algorithms import calculatePlaneNormal from ...
""" ============= testapp.tests ============= Tests for Flask-And-Redis extension and for Comments app. """ from unittest import TestCase import flask_redis import redis as redis_py from flask import Flask, url_for from flask_redis import Redis from flask_testing import TestCase as FlaskTestCase from nose.plugins.a...
from ply.lex \ import \ LexToken, lex from bento.core.parser.utils \ import \ Peeker, BackwardGenerator __all__ = ["MyLexer"] #============== # Lexer #============== tokens = ('COLON', 'DOUBLE_COLON', 'WS', 'NEWLINE', 'WORD', 'COMMA', 'SLASH', 'BACKSLASH', 'LPAR', 'RPAR', 'LESS', ...