gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import odml class Event (object): def __init__(self, name): self.handlers = set() self.name = name def add_handler(self, handler): self.handlers.add(handler) return self def remove_handler(self, handler): try: self.handlers.remove(handler) excep...
# -*- coding: utf-8 -*- import os import sys import shutil import subprocess import time import platform # if debug_info=True, Debugging Print Information will be turned on debug_info=False # if make_fal=True, Partition tables are put into firmware make_fal=False # Setting firmware output directory out_path='./Bin'...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# Copyright 2020 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 applicab...
from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import os import numpy from matplotlib._pylab_helpers import Gcf from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\ FigureManagerBase, FigureCan...
# 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 ...
# -*- coding: utf-8 -*- """ exporter.stores.github ~~~~~~~~~~~~~~~~~ This module implements Github issue store for exporter. :copyright: (c) 2014 by Vedarth Kulkarni. :license: MIT, see LICENSE for more details. """ import json import pytz import datetime import requests from dateutil.tz import tzlocal class Gith...
from sqlite3 import connect, Row class SQL(object): def __init__(self, query_string): self.query_string = query_string class _TableQuery(object): def __init__(self, cursor, table_name): self._cursor = cursor self._table_name = table_name self._where_columns = None @prope...
# Copyright (c) 2013 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 ...
# -*- coding: utf-8 -*- import csv import os import platform import codecs import re import sys from datetime import datetime import pytest import numpy as np from pandas._libs.lib import Timestamp import pandas as pd import pandas.util.testing as tm from pandas import DataFrame, Series, Index, MultiIndex from pand...
import os.path import platform import console_helper import path_helper import job_manager PROJECTS={} ENV={} ROOT=os.path.realpath(path_helper.dirname(os.path.realpath(__file__)) + '/../..') SCHEME='debug' TARGET=platform.uname()[4] PROFILE=platform.uname()[0].lower() BUILD_ROOT=ROOT + '/build/{0}-{1}-{2}'.format(P...
from __future__ import unicode_literals import codecs import datetime from decimal import Decimal import locale from django.utils.functional import Promise from django.utils import six from django.utils.six.moves.urllib.parse import quote class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj...
"""This module implements the Scraper component which parses responses and extracts information from them""" import logging from collections import deque from twisted.python.failure import Failure from twisted.internet import defer from scrapy.utils.defer import defer_result, defer_succeed, parallel, iter_errback fr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Test the Python 2.6 backport of OrderedDict. Modified the Python 2.7 Lib/test/test_collections.py to test only OrderedDict and slightly customized (and renamed) the modules test_support.py and mapping_tests.py that provide support for those tests. """...
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
# 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 unde...
import unittest from pynmea.nmea import (NMEASentence, GPAAM, GPALM, GPAPA, GPAPB, GPBEC, GPBOD, GPBWC, GPBWR, GPBWW, GPGGA, GPGLL, GPGSA, GPGSV, GPHDG, GPHDT, GPZDA, GPSTN, GPRMA, GPRMB, GPRMC, GPRTE, GPR00, GPTRF, GPVBW, GPVTG, GPWCV, GPWNC, G...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.code import If, Concat, Switch from hwt.hdl.types.bits import Bits from hwt.interfaces.utils import addClkRstn from hwt.math import log2ceil from hwt.synthesizer.param import Param from hwtLib.amba.axis import AxiStream from hwtLib.amba.axis_comp.base import AxiS...
#!/usr/bin/env python """ Copyright 2015 The Trustees of Princeton University 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...
""" Some generic utility routines for number handling and calculating (specific) variances """ import logging import itertools import numpy from tkp.utility import containers from tkp.utility.memoize import Memoize from tkp.sourcefinder import utils from tkp.sourcefinder import stats from tkp.sourcefinder import extra...
import functools import json import os import re from argparse import _SubParsersAction, Namespace from collections import OrderedDict from http import HTTPStatus from typing import Callable, Any, List from cloudfoundry_client.client import CloudFoundryClient from cloudfoundry_client.errors import InvalidStatusCode fr...
import struct import numpy as np from datetime import datetime from dataquick.loaders import Loader, register_loaders from dataquick.plugins.structures.powderdiffraction import PowderDiffraction def raw_check_version(f): """ Parameters ---------- f : file object Returns ------- version :...
#!/usr/bin/env python # A tool to parse ASTMatchers.h and update the documentation in # ../LibASTMatchersReference.html automatically. Run from the # directory in which this file is located to update the docs. import collections import re import urllib2 MATCHERS_FILE = '../../include/clang/ASTMatchers/ASTMatchers.h' ...
# tr_mime.py chromatic universe 2017 william k. johnson from datetime import datetime from io import StringIO import sys import time import json import os import pprint import sys from io import StringIO import tornado from tornado.locks import Semaphore from tornado.concurrent import run_on_executor from conc...
import re import logging from twisted.conch.telnet import TelnetTransport, TelnetProtocol from twisted.internet import reactor, endpoints, task from twisted.internet.protocol import ServerFactory import game_loop logger = logging.getLogger(__name__) reset = "\x1B[0m" bold = "\x1B[1m" dim = "\x1B[2m" under = "\x1B[4m"...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
from __future__ import division from __future__ import unicode_literals __author__ = "Joseph Gomes" __copyright__ = "Copyright 2017, Stanford University" __license__ = "MIT" import sys from deepchem.models.tensorgraph.layers import Layer, Feature, Label, AtomicConvolution, L2Loss, ReduceMean from deepchem.models imp...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# Josh Berry # CodeWatch # August 2014 # import argparse import xml.etree.ElementTree as ET import re import requests import string import random import os from requests.auth import HTTPBasicAuth from requests.auth import HTTPDigestAuth from requests_ntlm import HttpNtlmAuth # Get all the arguments for the tool pars...
import cStringIO from functools import partial import operator as op import antlr3 from antlr3.tree import CommonTree as AST from grammar.JavaLexer import JavaLexer as Lexer from grammar.JavaParser import JavaParser as Parser from lib.typecheck import * import lib.const as C from lib.enum import enum import lib.visit...
# -*- coding: utf-8 -*- """ Sahana Eden Menu Structure and Layout @copyright: 2011-2014 (c) Sahana Software Foundation @license: MIT 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 So...
import uuid from collections import OrderedDict, defaultdict from collections.abc import Sequence from django import forms from django.core.exceptions import NON_FIELD_ERRORS, ValidationError from django.forms.utils import ErrorList from django.template.loader import render_to_string from django.utils.html import for...
#-*- coding: utf-8 -*- # pylint: disable=E0102, W0613 """ Values generators for common Django Fields """ from django.contrib.contenttypes.models import ContentType import re, os, random from decimal import Decimal from datetime import date, datetime, time from string import ascii_letters, digits, hexdigits from random ...
from math import ceil from hashlib import md5 from pecan import expose, request, abort, response, redirect from pecan.secure import secure from pecan.ext.wtforms import with_form from sqlalchemy import select, and_, or_, asc, desc, func, case, literal from draughtcraft import model from draughtcraft.lib.beerxml impor...
# (c) Copyright 2012-2014 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 # # http://www.apache.org/lic...
from typing import Any, Callable, Dict, List, Optional, Set, Tuple import gc from pympler import summary from pympler.util import compat from inspect import isframe, stack from sys import getsizeof from pympler.asizeof import _Py_TPFLAGS_HAVE_GC def ignore_object(obj: Any) -> bool: try: return isfram...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
# Copyright 2014 # The Cloudscaling Group, 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...
from utils import Tools def _fromUtf8(s): return s import math from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4 import QtCore, QtGui from PyQt4.phonon import Phonon from main_const import * from helpers import Help from helpers import Database, Reference from utils import Tools class KujiDesign(Q...
""" Originally from phpserialize by Armin Ronacher, BSD license. Heavily rewritten by Armin Rigo. """ from hippy.objects.reference import W_Reference from hippy.objects.convert import convert_string_to_number from hippy.builtin_klass import k_incomplete from rpython.rlib.debug import check_nonneg from rpython.rlib.ra...
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the TimeSeries class which lets you build your TimeSeries charts just passing the arguments to the Chart class and calling the proper functions. It also add detection of the incomming input to see if it ...
"""Simple wrapper over libtorrent""" from urllib.parse import quote import tempfile import os import asyncio import logging import mimetypes from collections import namedtuple from functools import cached_property from random import randint import libtorrent as lt mimetypes.init() logging.basicConfig(level=logging.IN...
from __future__ import print_function, division from sympy import ask, Q from sympy.core import Basic, Add from sympy.core.compatibility import range from sympy.strategies import typed, exhaust, condition, do_one, unpack from sympy.strategies.traverse import bottom_up from sympy.utilities import sift from sympy.utilit...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six import iteritems, string_types import datetime import frappe, sys from frappe import _ from frappe.utils import (cint, flt, now, cstr, strip_html, getdate, get_datetime, ...
from itertools import izip from django.db.models.query import sql from django.db.models.fields.related import ForeignKey from django.contrib.gis.db.backend import SpatialBackend from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates_modul...
"""Test the Google Maps Travel Time config flow.""" from homeassistant import config_entries, data_entry_flow from homeassistant.components.google_travel_time.const import ( ARRIVAL_TIME, CONF_ARRIVAL_TIME, CONF_AVOID, CONF_DEPARTURE_TIME, CONF_DESTINATION, CONF_LANGUAGE, CONF_OPTIONS, C...
#!/usr/bin/python # # This source file is part of appleseed. # Visit https://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017-2018 Esteban Tovagliari, The appleseedhq Organization # # Permission is hereby granted, free of charge, to ...
########################################################################## # # Copyright (c) 2013, 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: # # * Redistrib...
""" Alexa Recipe Reader Template Skill """ from __future__ import print_function import os import time import types import re import json import boto3 from boto3.dynamodb.types import TypeSerializer, TypeDeserializer # --------------- Helpers that build all of the responses ---------------------- def build_speech...
""" This module contains mix-in classes with methods designed to test RoachInterface instances. These classes do not set up real or mock hardware, so they are not intended to be run directly. To use them, write a class that inherits from one or more of them and has a setup() class method that creates a RoachInterface ...
# Copyright 2017 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 logging import os import sys import time from gpu_tests import gpu_integration_test from gpu_tests import path_util data_path = os.path.join(path_ut...
# Copyright 2016 Pinterest, 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 writi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2012 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except i...
# Copyright 2006-2009 the V8 project authors. 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 co...
# 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 t...
#!/usr/bin/env python # Copyright (c) 2011-2021, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. import tempfile from dataclasses import dataclass import numpy as np import pytest from wradlib import georef, io, zonalstats from . import osr, requires_gdal, requires_geos np.s...
""" Management utility to create superusers. """ import getpass import sys from django.contrib.auth import get_user_model from django.contrib.auth.management import get_default_username from django.contrib.auth.password_validation import validate_password from django.core import exceptions from django.core.management....
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
## debug.py ## ## Copyright (C) 2003 Jacob Lundqvist ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published ## by the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## ...
#!/usr/bin/env python from optparse import OptionParser, OptionGroup from bs_utils.utils import * try : import pysam except ImportError : print "[Error] Cannot import \"pysam\" package. Have you installed it?" exit(-1) # import gzip """ def context_calling(seq, position): word=seq[position] wor...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
""" twemproxy/nutcracker sharded Redis library for Python. - Capable of dealing with twemproxy sharded Redis configuration schemes. - Talks to the Sentinels to obtain the Redis shards """ import collections import hashlib import re from redis.sentinel import Sentinel import yaml __all__ = ['TwemRedis'] class TwemR...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
# 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...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2017 University of Westminster. 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/...
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # from __future__ 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...
# coding: utf-8 # # Copyright 2021 The Oppia 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 requi...
# 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...
""" Tests for Downsampled Filters/Factors/Classifiers """ from functools import partial import pandas as pd from pandas.util.testing import assert_frame_equal from zipline.errors import NoFurtherDataError from zipline.pipeline import ( Pipeline, CustomFactor, CustomFilter, CustomClassifier, Simple...
from cattle import ClientApiError from common import * # NOQA from copy import deepcopy from gdapi import ApiError _USER_LIST = [ "Owner", "Member", "Stranger", "OutThereUser" ] PROJECTS = set([]) class NotFound(Exception): pass @pytest.fixture(autouse=True, scope="module") def clean_up_pro...
''' This module holds the constants used for specifying the states of the debugger. ''' DEBUG_TRACE_LEVEL = -1 DEBUG_TRACE_BREAKPOINTS = -1 STATE_RUN = 1 STATE_SUSPEND = 2 try: __setFalse = False except: import __builtin__ setattr(__builtin__, 'True', 1) setattr(__builtin__, 'False', 0) class Deb...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
import time import numpy as np import ConfigParser import os.path import Adafruit_CharLCD as LCD import Adafruit_GPIO.MCP230xx as MCP import Adafruit_MAX31855.MAX31855 as MAX31855 import Adafruit_MCP3008 import RPi.GPIO as GPIO import Utilities import LedOutputs import DigitalInputs from CharLcdOutput import CharLcdOu...
import logging import os import re from abc import abstractmethod from itertools import chain from xml.dom import minidom from gensim.corpora import Dictionary from gensim.corpora.textcorpus import lower_to_unicode, strip_multiple_whitespaces, remove_short, remove_stopwords from gensim.interfaces import CorpusABC from...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
import typing from functools import partial import json import sys from textwrap import dedent import time import pika class AbstractQueueConnection(object): """A task queue. Implement this interface to provide a task queue for the workers. """ CONNECTION_TIMEOUT = 10 # second def conne...
# Copyright (c) 2017 NTT 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 to in writing,...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' module for handling USB boxes connected via psyscopex install, which circumcents the usual HID driver. we provide a HID "emulation" layer, so the rest of the code interacts with this in the same way as...
# 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...
import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import halyard_utils as utils def list_nodes(driver): nodes = driver.list_nodes() node_list = [] for node in nodes: node_list.append({"name": node.name, "creationTimestamp": node.ex...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math from math import pi import numpy as np import pytest import scipy.stats as sp import pyro.distributions as dist from pyro.distributions.testing.naive_dirichlet import NaiveBeta, NaiveDirichlet from pyro.distributions....
""" Scripts for the in-game Python system. """ from datetime import datetime, timedelta from Queue import Queue import re import sys import traceback from django.conf import settings from evennia import DefaultObject, DefaultScript, ChannelDB, ScriptDB from evennia import logger from evennia.utils.ansi import raw fro...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 OpenStack Foundation # Copyright 2013 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.a...
# Copyright 2014 - 2015 IBM 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 # # Unless r...
from .. import rfb_icons from ..rfb_utils import shadergraph_utils from ..rfb_utils import draw_utils from .rman_ui_base import _RManPanelHeader from ..rman_render import RmanRender import bpy class PRMAN_PT_Renderman_UI_Panel(bpy.types.Panel, _RManPanelHeader): '''Adds a RenderMan panel to the RenderMan VIEW_3D s...
# Copyright (c) 2014 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...
#!/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...
# Copyright 2020 The HuggingFace Team. 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 applicabl...
## 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 applic...
from tests.utils import order_insert_statements from tests.testcases import FakeBackendsTestCase class SQLite3Test(FakeBackendsTestCase): database_backend = 'sqlite3' def assert_sql(self, migration_num, app_name='test_app'): expected_sql = self.real_sql(app_name, migration_num) fake_backend_s...
import numpy as np import pytest import xarray as xr from xarray.core import merge from . import raises_regex from .test_dataset import create_test_data class TestMergeInternals(object): def test_broadcast_dimension_size(self): actual = merge.broadcast_dimension_size( [xr.Variable('x', [1]),...
#!/usr/bin/env yamtbx.python """ (c) RIKEN 2015. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ master_params_str = """\ lstin = None .type = path dmin_lst = None .type = path anomalous = False .type = bool cell = average *first .type = choice...
from keras.layers import Input, Dense, Dropout, BatchNormalization from keras.models import Model from keras.datasets import mnist from keras.callbacks import EarlyStopping from keras.models import Sequential, load_model from keras.optimizers import RMSprop from keras.callbacks import TensorBoard # from __future__ impo...
import unittest from django.contrib.gis.gdal import OGRGeometry, OGRGeomType, \ OGRException, OGRIndexError, SpatialReference, CoordTransform, \ gdal_version from django.contrib.gis.tests.geometries import * class OGRGeomTest(unittest.TestCase): "This tests the OGR Geometry." def test00a_geomtype(self...
# (c) 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 # # http://www.apache.org/licenses...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import types from unittest import TestCase from mock import Mock, patch from django.core.exceptions import ImproperlyConfigured from django.core.handlers.wsgi import STATUS_CODE_TEXT from six import string_types from skd_smoke import gene...
# -*- coding: utf-8 -*- """ XForms - Controllers """ module = request.controller def create(): """ Given a Table, returns an XForms to create an instance: http://code.javarosa.org/wiki/buildxforms http://www.w3schools.com/xforms/ http://oreilly.com/catalog/9780596003692/preview.html Known...
import random try: from com.xhaus.jyson import JysonCodec as json except ImportError: import json from utils import * from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest import itertools class AbstractQuery(object): one_day = (1000 * 60 * 60 * 24) query_interval_name ...
#!/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. '''Produces various output formats from a set of JavaScript files with closure style require/provide calls. Scans one or more director...