gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import print_function import pandas as pd import numpy as np import os from tensorflow.keras import backend as K from tensorflow.keras.layers import Dense, Dropout, Activation, Conv1D, MaxPooling1D, Flatten, LocallyConnected1D from tensorflow.keras.models import Sequential, model_from_json, model_fro...
# See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. from typing import cast, AbstractSet, Any, Callable, Dict, List, \ Mapping, MutableMapping, Optional, Iterable, Sequence, Set, Text, Union from mypy_extensions import TypedDict from d...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Tests for the util.py module''' import sys import pytest from omnisharp.exceptions import BadResponseError, ServerConnectionError from omnisharp.util import (UtilCtx, find_free_port, formatPathForClient, formatPathForServer, getResponse, ...
# coding=utf-8 # Copyright 2022 The Edward2 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 o...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary ~~~~~~~~~~~~~~~~~~~~~~ Sphinx extension that adds an autosummary:: directive, which can be used to generate function/method/attribute/etc. summary lists, similar to those output eg. by Epydoc and other API doc generation tools. An :autolink: r...
#!/usr/bin/env python from __future__ import unicode_literals from __future__ import print_function import dendrogenous as dg import dendrogenous.core import numpy as np import unittest try: import unittest.mock as mock except: import mock import os import shutil import sys import pytest import pickle impo...
# Copyright 2012 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
from __future__ import division from ..Qt import QtGui, QtCore import numpy as np import collections from .. import functions as fn from .. import debug as debug from .GraphicsObject import GraphicsObject from ..Point import Point from .. import getConfigOption __all__ = ['ImageItem'] class ImageItem(GraphicsObjec...
#!/usr/bin/env python import sys from ruffus import * import yaml import time import os import helpers from helpers import runCommand,isGzip from os.path import ( join, expanduser, expandvars, splitext,split, basename, dirname, exists ) helpers.setup_shell_environment() import tasks import glob #import pyprind ...
# Copyright 2013-2019 The Meson development team # 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 2014, 2017 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 require...
# Copyright (c) 2010-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 # # Unless required by applicable law or agreed to ...
import warnings from itertools import chain import numpy as np import scipy.sparse as sp from scipy.linalg import pinv2 from sklearn.utils import check_random_state from sklearn.utils import column_or_1d from sklearn.utils import deprecated from sklearn.utils import gen_even_slices from sklearn.utils import resample f...
from typing import Any, Dict, List, Set, Tuple, Union from collections import defaultdict import datetime import logging import pytz from django.conf import settings from django.utils.timezone import now as timezone_now from confirmation.models import one_click_unsubscribe_link from zerver.lib.email_notifications im...
# Application Scope Bucket from datetime import datetime import json from kii import exceptions as exc, results as rs from kii.data.clauses import ( Clause, AllClause, AndClause, ) from kii.helpers import BucketsHelper # Manage Buckets class ManageBuckets(BucketsHelper): def __init__(self, scope, buc...
from KMeansBase import KMeansBase from KMeansPP import KMeansPP from ScalableKMeansPP import ScalableKMeansPP import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import pandas def samplesize_initcost(): k = 10 sampleSizes = np.linspace(100000, 1000000, 10) # sampleSizes = [1000, 2...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
#!/usr/bin/env python r""" Parallel assembling and solving of a Poisson's equation, using commands for interactive use. Find :math:`u` such that: .. math:: \int_{\Omega} \nabla v \cdot \nabla u = \int_{\Omega} v f \;, \quad \forall s \;. Important Notes --------------- - This example requires petsc4py, ...
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO from enum import Enum if parse_version(ks_version) < parse_version('0.7'): raise Excep...
# Copyright (c) 2016 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 ...
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Standard library imports. import numpy # Enthought library imports. from traits.api import Instance, Bool, Array, Button, Str from traitsui.api import View, Group, Item from tvtk.api import...
#!/usr/bin/env python2.7 # # This script makes it easy to do two things: # # 1. Automatically release a new version of pants to the java repo, including patching in our # custom patches. # # 2. Run pants in development mode along with those same patches (avoiding the need to manually # merge branches). # # This s...
# This module is, as much a possible, a clone of the pygame # mixer api. import android._android_sound as sound import time import threading import os condition = threading.Condition() def periodic(): for i in range(0, num_channels): if i in channels: channels[i].periodic() num_channels = ...
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. All rights reserved. # Copyright (c) 2015 Goutham Pacha Ravi. All rights reserved. # Copyright (c) 2016 Mike Rooney. All rights reserved. # # Licensed under the Apache L...
""" MassOpenCloud / Hardware Isolation Layer (MOC/HIL) HIL Client Interface August 2017, Tim Donahue tdonahue@mit.edu """ import urllib import time from hil.client.client import Client, RequestsHTTPClient from hil.client.base import FailedAPICallException from hil_slurm_logging import log_info, log_debug, log_erro...
#!/usr/bin/env python # # Copyright 2011-2015 Splunk, 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...
import asyncio from unittest import mock try: import aionotify except OSError: aionotify = None # type: ignore import pytest import typeguard from opentrons import types from opentrons import hardware_control as hc from opentrons.hardware_control.types import Axis from opentrons.hardware_control.dev_types impo...
from flask import Blueprint, render_template, redirect, url_for, jsonify, abort, flash, current_app from flask_login import login_user, current_user, login_required from sqlalchemy.exc import IntegrityError from .. import db from ..models import Category, Sensor, Subview, View, ChartConfig, User from ..queries import ...
""" Add simple, flexible caching layer. Uses [dogpile caching](http://dogpilecache.readthedocs.org/en/latest/index.html). """ __author__ = 'Dan Gunter <dkgunter@lbl.gov>' __date__ = '9/26/15' ## Imports # System import hashlib import logging import os import time import uuid # Third-party from dogpile.cache import m...
# Copyright (c) 2015 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# repo.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from git.exc import ( InvalidGitRepositoryError, NoSuchPathError, GitCommandError ) from gi...
#!/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 (th...
import datetime import httplib import os import uuid import markupsafe from flask import make_response from flask import redirect from flask import request import furl import jwe import jwt from modularodm import Q from modularodm.exceptions import NoResultsFound from framework import sentry from framework.auth imp...
from rpython.rlib.objectmodel import specialize, we_are_translated from rpython.rlib.rarithmetic import intmask from hippy.objects.base import W_Object from hippy.objects.reference import W_Reference, VirtualReference from hippy.objects.convert import force_float_to_int_in_any_way from hippy.error import ConvertError...
# -*- coding: utf-8 -*- import copy import json import re import unittest from django.contrib import admin from django.contrib.auth import get_permission_codename from django.contrib.auth.models import Permission from django.template import RequestContext from django.utils.encoding import force_text from django.utils....
# -*- coding: utf-8 -*- """ Django settings for taskist project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_lit...
# Copyright 2011,2013 James McCauley # Copyright 2008 (C) Nicira, 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 ...
import copy from crispy_forms.utils import TEMPLATE_PACK from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, FieldError from django.db import models, transaction from django.forms.models import modelform_factory, modelform_defines_fie...
import os import sys import pygame import copy import textrect import energybar import battle_v from common.constants import * from client.constants import * from common.util.rect import Rect class UnitHUD(object): def __init__(self, inTeam, inPlayers): self.rect = Rect((0,0), (SCREEN_SIZE[0], UNIT_HUD...
# Copyright 2017 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 abc import ABCMeta, abstractmethod from collections import Iterable from numbers import Real import sys from xml.etree import ElementTree as ET import openmc.checkvalue as cv if sys.version_info[0] >= 3: basestring = str class Univariate(object): """Probability distribution of a single random variable....
#!/usr/bin/python -u # 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 # ...
# 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 ...
"""Search (Chapters 3-4) The way to use this code is to subclass Problem to create a class of problems, then create problem instances and solve them with calls to the various search functions.""" from __future__ import generators from utils import * import agents import math, random, sys, time, bisect, string #_____...
# -*- coding: utf-8 -*- # """Simple HTTP Server. Supports browser cache and HTTP compression.""" import os import sys import datetime import io import email import urllib.parse from http import HTTPStatus import http.cookiejar import http.server as server from http.server import SimpleHTTPRequestHandler # Python mi...
# # Copyright 2014 Quantopian, 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 wr...
import csv import matplotlib import matplotlib.pyplot as plt import numpy as np UCSD = 'UCSD' BUCKETS = [0.1, 0.2, 1.0, 10.0, 60.0 ] # range(500, 3001, 500) #COLORS=['#90B0D4', '#90D492', '#D4B490', '#D490D2'] COLORS=['#8dd3c7','#bebada','#ffffb3','#fb8072','#80b1d3','#fdb462'] COLORS_E=['#8dd3c7','#bebada','#80b1d3'...
# # 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 (c) 2011 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...
# Copyright 2016 Conchylicultor. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
""" Utilities to manage AWS Elastic Block Store volumes and snapshots. To delete EBS volumes or snapshots, use ``aegea rm``. """ import os, sys, re, subprocess, time, json from functools import lru_cache from botocore.exceptions import ClientError from . import register_parser, logger from .ls import add_name, filt...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright 2013 Canonical 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 # # htt...
"""Acts like a Pymongo client to TinyDB""" # coding: utf-8 from __future__ import absolute_import import copy from functools import reduce import logging import os from math import ceil from operator import itemgetter from uuid import uuid1 from tinydb import Query, TinyDB, where from .results import ( InsertOne...
# Copyright 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 requ...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 # Copyright 2016 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
# encoding: utf-8 """ Provides a low-level, read-only API to a serialized Open Packaging Convention (OPC) package. """ from __future__ import absolute_import from .constants import RELATIONSHIP_TARGET_MODE as RTM from .oxml import oxml_fromstring from .packuri import PACKAGE_URI, PackURI from .phys_pkg import PhysPk...
from typing import Any, Dict, Iterator, List, Tuple from graphql import GraphQLSchema from ..compiler.blocks import ( Backtrack, CoerceType, ConstructResult, EndOptional, Filter, Fold, GlobalOperationsStart, MarkLocation, OutputSource, QueryRoot, Recurse, Traverse, ...
import requests import pandas as pd from lcc.db_tier.TAP_query import TapClient from lcc.entities.exceptions import QueryInputError from lcc.entities.light_curve import LightCurve from lcc.entities.star import Star class VizierTapBase(TapClient): """ Base class for all tap connectors using VizieR database. I...
#!/usr/bin/python ''' Extracts data from LDIF into subfiles. Skips over people and accounts, disables services unless -a is given. Picks random 10 people to create an import Useful for converting Prod data to a subset that is safe and confidential for importing into Dev and QA dataextractor.py [-a][-d] <name of the l...
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
import Cookie from datetime import datetime, timedelta import hmac import md5 import os import random import re import sys import time import UserDict import warnings try: from paste.registry import StackedObjectProxy beaker_session = StackedObjectProxy(name="Beaker Session") except: beaker_session = None ...
# Copyright 2011, VMware, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
# -*- coding: utf-8 -*- # """ TODO. """ from __future__ import (print_function, division) import logging import numpy as np from ..particles.allparticles import ParticleSystem from ..lib.utils.timing import decallmethods, timings __all__ = ['Plummer'] logger = logging.getLogger(__name__) @decallmethods(timings)...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
'''tzinfo timezone information for Mexico/General.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class General(DstTzInfo): '''Mexico/General timezone definition. See datetime.tzinfo for details''' zone = 'Mexico/General' ...
from __future__ import annotations import textwrap from pandas._libs import ( NaT, lib, ) from pandas.errors import InvalidIndexError from pandas.core.indexes.base import ( Index, _new_Index, ensure_index, ensure_index_from_sequences, get_unanimous_names, ) from pandas.core.indexes.catego...
#!/usr/bin/env python import eventlet from eventlet.green import urllib, urllib2 from stalkerutils.stalkerutils import get_basic_auth smtplib = eventlet.import_patched('smtplib') try: import simplejson as json except ImportError: import json class PagerDuty(object): """Pagerduty Notifications""" ...
import json import locale import re import time import urllib from collections import OrderedDict from distutils.version import LooseVersion try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO from .Utils import * from .http import HttpInterface, UserAgent from .http.Respo...
""" mocks.py Various mock objects for testing """ import cPickle import base64 import codecs from StringIO import StringIO class MockAtom(object): """ Mocks an atom in the GData service. """ def __init__(self, value): self.text = value class MockEntry(object): """ Mocks and entry returne...
#!/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. ''' Runs various chrome tests through valgrind_test.py.''' import glob import logging import optparse import os import stat import...
############################################################################### # copyright 2012, Marouen Mechtri (Marouen.Mechtri@it-sudparis.eu) # # Institut Mines-Telecom - TELECOM & Management SudParis # # Licensed under the Apache License, Version 2.0 (the "License"); # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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...
#!/usr/bin/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, Ver...
""" homeassistant.components.media_player.firetv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides control over an Amazon Fire TV (/stick) via python-firetv, a Python 2.x module with a helper script that exposes a HTTP server to fetch state and perform actions. Steps to configure your Amazon Fire TV stick with Ho...
import datetime import json import logging import os import re import resource import threading import numpy from ece2cmor3 import cmor_target, cmor_source, cmor_task, cmor_utils, grib_file, cdoapi # Log object. log = logging.getLogger(__name__) gridpoint_files = {} spectral_files = {} ini_gridpoint_file = None ini...
#!/usr/bin/env python import roslib import rospy import smach import smach_ros from smach import StateMachine import actionlib import time import threading from smach_ros import SimpleActionState from smach_ros import ActionServerWrapper from std_msgs.msg import String from std_msgs.msg import UInt8 from wm_interprete...
# 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. """Utility functions (file reading, simple IDL parsing by regexes) for IDL build. Design doc: http://www.chromium.org/developers/design-documents/idl-build ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals #from ibeis.viz.interact.interact_matches import ishow_matches from six.moves import range import functools import six from collections import OrderedDict as odict import utool as ut import vtool as vt from plotto...
#!/usr/bin/python # -*- coding: utf-8 -*- from multiprocessing import Process, Queue as MPQueue import subprocess import Queue import os import sys import time import urllib2 import signal import json import re import argparse from bs4 import BeautifulSoup MAP_FILEEXT = {'video/mp4': 'mp4'} BURST_SIZE = 40960 PROGR...
# Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import jmespath from .common import BaseTest from c7n.utils import local_session from unittest.mock import MagicMock class CloudFrontWaf(BaseTest): def test_waf(self): factory = ...
# -*- test-case-name: twisted.conch.test.test_recvline -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import sys, os from twisted.conch.insults import insults from twisted.conch import recvline from twisted.python import reflect, components from twisted.internet import defer, e...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from asn1crypto import pem, x509 from ._errors import pretty_message from ._types import byte_cls, type_name from .errors import DuplicateCertificateError class ValidationPath(): """ Represents a path going to...
#!/usr/bin/env python from ctypes import * from ctypes.util import find_library import sys # For unix the prefix 'lib' is not considered. if find_library('linear'): liblinear = CDLL(find_library('linear')) elif find_library('liblinear'): liblinear = CDLL(find_library('liblinear')) else: if sys.platform == 'win32':...
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import macmodel import numpy as np from numpy import sin, cos, tan class Model(macmodel.Model): def make_A(self): Nk = self.Nk Nl = self.Nl E = self.E Pm = self.Pm N = self.N th = self.th Br = self.Br Bth = self.Bth Bph = self.Bph '''...
"""aiobfd: BFD Session with an individual remote""" # pylint: disable=I0011,R0902,R0913 # pylint: disable=I0011,E1101 # socket.IPPROTO_IPV6 missing on Windows import asyncio import random import socket import time import logging import bitstring from .transport import Client from .packet import PACKET_FORMAT, PACKET_D...
from __future__ import division from itertools import chain from sklearn.feature_extraction.text import CountVectorizer import numpy as np import pandas as pd from fisher import pvalue import re import collections from nltk.stem.porter import PorterStemmer import math from percept.tasks.base import Task from percept.fi...
# -*- coding:utf-8 -*- # # Copyright (C) 2016 The Android Open Source Project # # 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 re...
import abc from timeseries.lazy import * import reprlib class TimeSeriesInterface(abc.ABC): """ Interface for TimeSeries class which inherits from ABC """ @abc.abstractmethod def __iter__(self): """Iterate over values.""" @abc.abstractmethod def itertimes(self): ...
# 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...
from __future__ import absolute_import from __future__ import print_function import os import numpy as np import matplotlib.pyplot as plt import datetime import clawpack.visclaw.colormaps as colormap import clawpack.visclaw.gaugetools as gaugetools import clawpack.clawutil.data as clawdata import clawpack.amrclaw.da...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ht...
import datetime from decimal import Decimal from apps.mchanga.models import MpesaFundRaiser from bluebottle.utils.utils import StatusDefinition from bluebottle.bb_projects.models import BaseProject, ProjectPhase, BaseProjectPhaseLog from django.db import models from django.db.models import Q from django.db.models.aggre...
from __future__ import unicode_literals import datetime from operator import attrgetter from django.core.exceptions import ValidationError from django.db import router from django.db.models.sql import InsertQuery from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils.time...
# Copyright (c) 2015 Mellanox Technologies, Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# -*- coding: utf-8 -*- import numpy import pvl from six import string_types from six.moves import range from .specialpixels import SPECIAL_PIXELS class CubeFile(object): """A Isis Cube file reader.""" PIXEL_TYPES = { 'UnsignedByte': numpy.dtype('uint8'), 'SignedByte': numpy.dtype('int8')...
import os import time import math import curses import pickle import operator from textwrap import wrap from functools import reduce from colorclass import Color from pueue.client.factories import command_factory from pueue.daemon.files import get_descriptor_output from terminaltables import AsciiTable from terminal...