gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import pandas,pdb,os,csv,datetime,numpy,palettable,matplotlib,calendar, math import matplotlib.pyplot as plt import matplotlib.colorbar as cbar from matplotlib import rcParams from matplotlib.ticker import MaxNLocator from dateutil import rrule def set_matplotlib_params(): """ Set matplotlib defaults to nicer...
# See https://en.bitcoin.it/wiki/MtGox/API/Streaming # Also see https://github.com/MtGox/mtgox-doc for the HTTP API from __future__ import print_function import json import time import hmac import base64 import hashlib import binascii from decimal import Decimal from twisted.python import log from twisted.internet i...
from mafia_game import Player from mafia_game import TownieRole from mafia_game import SheriffRole from mafia_game import MafiosoRole from mafia_game import GodfatherRole from mafia_game import town_power_roles from mafia_game import mafia_power_roles from mafia_game import all_power_roles import random from random im...
#===- perf-helper.py - Clang Python Bindings -----------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
#!/usr/bin/env python """Functional-test runner for use in other tests Useful functions are run_tvnamer and verify_out_data. Simple example test: out_data = run_tvnamer( with_files = ['scrubs.s01e01.avi'], with_config = None, with_input = "1\ny\n") expected_files = ['Scrubs - [01x01...
# Copyright 2020 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 ...
<<<<<<< HEAD <<<<<<< HEAD from ctypes import * import unittest import struct def valid_ranges(*types): # given a sequence of numeric types, collect their _type_ # attribute, which is a single format character compatible with # the struct module, use the struct module to calculate the # minimum and maxi...
# Copyright (C) 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#! /usr/bin/env python import time # import sys # import traceback from threading import RLock #import roslib #roslib.load_manifest('ros_homebot') import rospy from std_msgs.msg import UInt16MultiArray # import actionlib # import ros_homebot.msg from ros_homebot_python import constants as c # from ros_homebot_python....
# 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...
# encoding: utf-8 """ ip/__init__.py Created by Thomas Mangin on 2010-01-15. Copyright (c) 2009-2013 Exa Networks. All rights reserved. """ import socket from exabgp.protocol.family import AFI from exabgp.protocol.family import SAFI # =========================================================================== IP #...
#!/usr/bin/env python3 from distutils.version import LooseVersion import argparse import base64 import collections import copy import itertools import json import jsonschema import pathlib import shutil import sys import tempfile import zipfile def main(): parser = argparse.ArgumentParser( description='T...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # Copyright 2011, Piston Cloud Computing, Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License...
#!/usr/bin/env python # # Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT lice...
"""Test the AlarmDecoder config flow.""" from alarmdecoder.util import NoDeviceError import pytest from homeassistant import config_entries, data_entry_flow from homeassistant.components.alarmdecoder import config_flow from homeassistant.components.alarmdecoder.const import ( CONF_ALT_NIGHT_MODE, CONF_AUTO_BYP...
#! /usr/bin/env python # I want to use : utf-8 please # *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* # *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* Import #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* # *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* import sys, json, ...
# Copyright 2014 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 required by applicable ...
__author__ = "Nii Mante" __license__ = "MIT" __email__ = "nmante88@gmail.com" __status__ = "Development" """ This module contains methods to find near duplicate images. """ import sys from PIL import Image import os # Simhash algorithm https://github.com/liangsun/simhash from simhash import Simhash, SimhashInd...
"""Validate integration translation files.""" from __future__ import annotations from functools import partial from itertools import chain import json import re import voluptuous as vol from voluptuous.humanize import humanize_error import homeassistant.helpers.config_validation as cv from homeassistant.util import ...
#!/usr/bin/python # # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # # manpage_generator # Converts top level docs.json format command info to # nroff manpage format. Done in python ...
__author__ = ['dmorina', 'shirish'] import uuid from rest_framework.exceptions import AuthenticationFailed from django.utils.translation import ugettext_lazy as _ from crowdsourcing import models from datetime import datetime from rest_framework import serializers import json, hashlib, random, re from rest_framework....
from __future__ import print_function import unittest import six import pyrtl class TestBlock(unittest.TestCase): def setUp(self): pyrtl.reset_working_block() def tearDown(self): pyrtl.reset_working_block() def test_add_wirevector_simple(self): w = pyrtl.WireVector(name='testwire...
from django.test import TestCase from wagtail.tests.models import SimplePage, EventPage from wagtail.tests.utils import unittest, WagtailTestUtils from wagtail.wagtailcore.models import Page, PageRevision from django.core.urlresolvers import reverse from django.contrib.auth.models import User, Permission from django.co...
import os import unittest from nose_parameterized.parameterized import parameterized from conans.model.ref import PackageReference, ConanFileReference from conans.test.utils.tools import TestClient from conans.util.files import load conanfile = """from conans import ConanFile from conans.util.files import save clas...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): Calendar = orm['schedule.Calendar'] try: c = Calendar.objects.get(...
""" File: t_shift.py Purpose: Transformation to change to tonality of same cardinality, based on interval shift of scalar root pitch. """ from fractions import Fraction from harmoniccontext.harmonic_context import HarmonicContext from harmoniccontext.harmonic_context_track import HarmonicContextTrack from harmonicm...
# 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 ...
# Copyright (c) 2015-2017 Cisco Systems, Inc. # 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,...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging import module.api.config as config import module.common.const as const import module.common.util as util from xml.etree.ElementTree import Element,SubElement from bottle import route, request, HTTPResponse from module.common.topologydb import * from module.co...
# 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...
import re from functools import partial from syn.five import STR, PY2, unicode, unichr from .py import get_typename, hasmethod #------------------------------------------------------------------------------- # String-Quoting Utils QUOTES_PATTERN = re.compile('^(\'\'\'|"""|\'|")') def quote_string(obj): ret_type ...
#Stolen from https://github.com/Wh1t3Fox/polenum import logging from impacket.dcerpc.v5.rpcrt import DCERPC_v5 from impacket.dcerpc.v5 import transport, samr from impacket.dcerpc.v5.samr import DCERPCSessionError from impacket.dcerpc.v5.rpcrt import DCERPCException from impacket import ntlm from time import strftime,...
import os import sys import time import base64 import shutil import happybase import numpy as np from datetime import datetime from generic_indexer import GenericIndexer from socket import timeout from ..memex_tools.image_dl import mkpath from ..memex_tools.sha1_tools import get_SHA1_from_file, get_SHA1_from_data from ...
""" sentry.plugins.base ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('Plugin', 'plugins', 'register', 'unregister') import logging from django.core.context_processors import csrf from django.core.urlresolv...
# 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 ...
# 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 logging import os from telemetry.core import exceptions from telemetry.core import util from telemetry import decorators from telemetry.internal.back...
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urlparse, urllib, types import io import sys import handler import xmlreader try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types....
#!/usr/bin/env python # --------------------------------------------------------------------------------------------- # Copyright (c) 2012-2013, Ryan Galloway (ryan@rsgalloway.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions...
import argparse import numpy as np import io, math import os, sys, time from PIL import Image import cPickle as pickle import thread import chainer from chainer import cuda, Variable, optimizers, serializers import chainer.functions as F import chainer.links as L import net, rnn_net import copy import signal parser = ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
""" Test the uuid queue module adapter queue file - _get_combined_uuids_gen - _get_uncombined_uuids - QueueTypes - QueueAdapter - WorkerAdapter """ import uuid from unittest import ( TestCase, mock, ) import pytest from ..adapter_queue import ( _get_combined_uuids_gen, _get_uncombined_uuids, Queu...
# 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...
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
# MIT License # # Copyright (c) 2020 Tri Minh Cao # # 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...
import numpy as np from PyQt4.QtCore import QTimer from Orange.classification.base_classification import LearnerClassification from Orange.data import Table from Orange.preprocess.preprocess import Preprocess from Orange.widgets import gui from Orange.widgets.settings import Setting from Orange.widgets.utils.sql impor...
#!/usr/bin/env python """ Copyright 2013 OpERA 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 agree...
# Copyright 2021 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 NetApp, 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.or...
from ichnaea.async.config import configure_export from ichnaea.config import DummyConfig from ichnaea.data.tasks import ( update_cell, update_wifi, schedule_export_reports, ) from ichnaea.data.tests.test_export import BaseExportTest from ichnaea.models import ( ApiKey, Cell, ScoreKey, User, ...
# -*- test-case-name: vumi.components.tests.test_message_store -*- # -*- coding: utf-8 -*- """Message store.""" from calendar import timegm from collections import defaultdict from datetime import datetime from uuid import uuid4 import itertools import warnings from twisted.internet.defer import inlineCallbacks, ret...
""" This file is part of pynadc https://github.com/rmvanhees/pynadc Methods to query the NADC GOSAT SQLite database Copyright (c) 2016-2021 SRON - Netherlands Institute for Space Research All Rights Reserved License: BSD-3-Clause """ import platform import sqlite3 from pathlib import Path def date_subdir(nam...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
from __future__ import print_function from time import time import subprocess import random import numpy # Constants STEP = 1000 * 100 # the size of the buffer to fill the table, in rows SCALE = 0.1 # standard deviation of the noise compared with actual # values NI_NTIMES = 1 # The...
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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...
import pickle from datetime import timedelta from dbt.contracts.graph.unparsed import ( UnparsedNode, UnparsedRunHook, UnparsedMacro, Time, TimePeriod, FreshnessStatus, FreshnessThreshold, Quoting, UnparsedSourceDefinition, UnparsedSourceTableDefinition, UnparsedDocumentationFile, UnparsedColumn, Unpar...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
""" Dictionary learning """ from __future__ import print_function # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import time import sys import itertools from math import sqrt, ceil import numpy as np from scipy import linalg from numpy.lib.stride_tricks import as_strided from ..b...
# Copyright 2015 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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 ...
from werkzeug.routing import Map, Rule from werkzeug.wrappers import Response import pika # RabbitMQ Interface import logging from betaface import BetaFaceAPI from json import JSONEncoder from collections import namedtuple import base64 import time,datetime from subprocess import call class BiasEncoder(JSONEncoder)...
import re import functools from modularodm import Q from rest_framework.filters import OrderingFilter from rest_framework import serializers as ser class ODMOrderingFilter(OrderingFilter): """Adaptation of rest_framework.filters.OrderingFilter to work with modular-odm.""" # override def filter_queryset(...
# -*- coding: utf-8 -*- """implements an hgvs data provider interface using UTA (https://github.com/biocommons/uta) """ from __future__ import absolute_import, division, print_function, unicode_literals import contextlib import inspect import logging import os import re import weakref import psycopg2 import psycopg...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2019 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 u...
import world from game_entities import * from level_helpers import * LEVEL_NAME = 0 PLAYER_START = 1 MAXTIME = 2 ELEMENTS = 3 FACTORIES = 4 GOALBOX_LOCATION = 5 GOAL_VALUE = 6 Level0 = { LEVEL_NAME: "Welcome to the Jungle", PLAYER_START: (820,180), MAXTIME: 150, GOALBOX_LOCATION: (740, 80), GOAL...
#!/usr/bin/env python ''' A Dynamic Recurrent Neural Network (LSTM) implementation example using TensorFlow library. This example is using a toy dataset to classify linear sequences. The generated sequences have variable length. Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf Aut...
"""Config flow to configure deCONZ component.""" from __future__ import annotations import asyncio from pprint import pformat from typing import Any, cast from urllib.parse import urlparse import async_timeout from pydeconz.errors import RequestError, ResponseError from pydeconz.gateway import DeconzSession from pyd...
"""Generated message classes for cloudresourcemanager version v1. The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apit...
#!/usr/bin/env python2 '''Python script to plot tally data generated by OpenMC.''' import sys from statepoint import * # Color intensity dependent on individual score? from PyQt4.QtCore import * from PyQt4.QtGui import * import matplotlib.pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.b...
#-*- coding: utf-8 -*- import simplejson as json import os from operator import itemgetter from settings import CONFIG_ROOT, CONFIG_FILE, DB_ROOT, DBSUFFIX import tempfile from shutil import copy import datetime from uuid import uuid1 as uuid __version__ = "0.2.0" # required for python <=python2.5 ## from __future__...
import pygame from thorpy.miscgui import constants # default pygame black arrow arrow = ( (16, 16), (0, 0), (0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00, 0x7F, ...
# Copyright (c) 2012, Daniel Zerbino # 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 conditions an...
import os import tempfile from scrapy.http import HtmlResponse, XmlResponse from pystock_crawler.spiders.edgar import EdgarSpider, URLGenerator from pystock_crawler.tests.base import TestCaseBase def make_url(symbol, start_date='', end_date=''): '''A URL that lists all 10-Q and 10-K filings of a company.''' ...
#!/usr/bin/env python """Provides transformations of functions and other objects. Includes: Standard combinatorial higher-order functions adapted from David Mertz (2003), "Text Processing in Python", Chapter 1. Functions for performing complex tests on strings, e.g. includes_any or includes_all. Functions for gener...
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # w...
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
from __future__ import absolute_import import re from django.db import connection from django.db.utils import DatabaseError from django.contrib.gis import gdal from django.contrib.gis.geos import (fromstr, GEOSGeometry, Point, LineString, LinearRing, Polygon, GeometryCollection) from django.contrib.gis.tests.util...
import os import numpy as np import numpy.testing as npt import pytest from imageio import mimwrite from matplotlib.animation import FuncAnimation from skimage.io import imsave from pulse2percept.stimuli import VideoStimulus, BostonTrain def test_VideoStimulus(): # Create a dummy video: fname = 'test.mp4' ...
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
#!/usr/bin/env python3 # Copyright (c) 2016-2020 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 SegWit changeover logic.""" from decimal import Decimal from test_framework.address import (...
# -*- coding: utf-8 -*- import emoji import os import sys import random import getpass import difflib import subprocess import webbrowser import pkgtools.pypi as pp import github from travispy import TravisPy from time import sleep from cookiecutter.main import generate_context, generate_files import keyring impo...
#!/usr/bin/env python # File: mnist-addition.py # Author: Yuxin Wu import argparse import numpy as np import os import cv2 from tensorpack import tfv1 as tf from tensorpack import * from tensorpack.dataflow import dataset from tensorpack.tfutils import gradproc, optimizer, summary IMAGE_SIZE = 42 WARP_TARGET_SIZE = ...
# 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 ...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring from future.moves.urllib.parse import urlparse from future.utils import text_to_native_str import os import logging import base64 impor...
# 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 applica...
# 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...
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest import test.support from test.support import run_unittest, TESTFN, EnvironmentVarGuard from test.support import captured_stderr import builtins import os import sys impor...
#!/usr/bin/env python3 # Copyright 2015-2021 Arm Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import warnings from django.core.exceptions import ValidationError from django.db.models.query import QuerySet from rest_framework.response import Response class BaseMultipleModelMixin(object): """ Base class that holds functions need for all MultipleModelMixins/Views """ querylist = None # Keys...
import re import sys import copy import operator import numpy as np import instructions import trace from scipy.optimize import nnls from scipy.linalg import solve from sets import Set from scipy.io import savemat import pdb high_cost = ['ARRAYLEN_GC_OP', 'STRLEN_OP', 'STRGETITEM_OP', 'GETFIELD_GC_PURE_OP...
''' Provides the Bokeh Server Tornado application. ''' from __future__ import absolute_import, print_function import logging log = logging.getLogger(__name__) # NOTE: needs PyPI backport on Python 2 (https://pypi.python.org/pypi/futures) from concurrent.futures import ProcessPoolExecutor import os from pprint import...
from redisrwlock import Rwlock, RwlockClient from test_redisrwlock_connection import ( runRedisServer, terminateRedisServer, cleanUpRedisKeys) import unittest import logging import os import socket import subprocess import sys import time logging.basicConfig( stream=sys.stdout, format='%(asctime)s (%(leve...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
# License: EPL import os import sys import traceback try: xrange except: xrange = range #=============================================================================== # Things that are dependent on having the pydevd debugger #=============================================================================== d...
"""Test functions for the sparse.linalg._expm_multiply module """ import numpy as np from numpy.testing import (assert_allclose, assert_, assert_equal, suppress_warnings) from scipy.sparse import SparseEfficiencyWarning import scipy.linalg from scipy.sparse.linalg._expm_multiply import (_the...
# -*- 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...
# # 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 2016 Nexenta 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 req...
# # Copyright (c) 2013 Markus Eliasson, http://www.quarterapp.com/ # # 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...
#!/usr/bin/python import os import sys import uuid import ujson as json import hashlib from datatype import SegmentedData, StoredData from base import BaseFile class Experiment(BaseFile): """Represents a whole Biomedical experiment in the sense of BIF.""" def __init__(self, metadata={}): super(Experim...
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on May 14, 2012 @author: Sourabh Bajaj @contact: sourabhbajaj90@gmail.com @summary: Backtester ''' # Pytho...