gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2011 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
from slm_lab.agent import net from slm_lab.agent.algorithm.sarsa import SARSA from slm_lab.agent.net import net_util from slm_lab.lib import logger, util from slm_lab.lib.decorator import lab_api import numpy as np import torch logger = logger.get_logger(__name__) class VanillaDQN(SARSA): ''' Implementation ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Analyzes the sampling behavior of KBPO. """ import csv import sys import logging from collections import namedtuple, defaultdict, Counter import numpy as np from tqdm import tqdm from kbpo import db from kbpo import distribution as D from kbpo.sample_util import sa...
import json import requests from requests_toolbelt import MultipartEncoder from pymessenger.graph_api import FacebookGraphApi import pymessenger.utils as utils class Bot(FacebookGraphApi): def __init__(self, *args, **kwargs): super(Bot, self).__init__(*args, **kwargs) def send_text_message(self, r...
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from django.utils.text import slugify from build.management.commands.build_human_proteins import Command as BuildHumanProteins from residue.functions import * from protein.models import P...
# 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 applica...
#!/usr/bin/env python """Support classes for automated testing. * `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase with additional support for testing asynchronous (`.IOLoop` based) code. * `ExpectLog` and `LogTrapTestCase`: Make test logs less spammy. * `main()`: A simple test runner (wra...
# coding: utf8 from matriochkas.core import ModificationEntities from matriochkas.core import IO from matriochkas.core.Configuration import HandlersConfiguration from matriochkas.tests.ParsingEntities import MockThread from collections import Counter from time import sleep import matriochkas.core.ParsingEntities imp...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import shutil import sys import StringIO import tempfile import time import unittest from telemetry import benchmark from telemetry impo...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_asm_policy_import...
""" Generalized additive models Requirements for smoothers -------------------------- smooth(y, weights=xxx) : ? no return ? alias for fit predict(x=None) : smoothed values, fittedvalues or for new exog df_fit() : degress of freedom of fit ? Notes ----- - using PolySmoother works for AdditiveModel, and GAM with P...
from __future__ import division """ Data manipulations for 2D data sets. Using the meta data information, various types of averaging are performed in Q-space To test this module use: ``` cd test PYTHONPATH=../src/ python2 -m sasdataloader.test.utest_averaging DataInfoTests.test_sectorphi_quarter ``` """ #############...
# -*- coding: utf-8 -*- """Views tests for the Box addon.""" import unittest from nose.tools import * # noqa (PEP8 asserts) import mock import httplib from datetime import datetime from framework.auth import Auth from website.util import api_url_for, web_url_for from urllib3.exceptions import MaxRetryError from box.c...
"""Support for Venstar WiFi Thermostats.""" import logging from venstarcolortouch import VenstarColorTouch import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( ATTR_HVAC_MODE, ATTR_TARGET_TEMP_HIGH, ATTR_T...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from contextlib impo...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
# Copyright (C) 2012 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/LICEN...
# Copyright (c) 2010 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 applicab...
from __future__ import absolute_import, unicode_literals import os from django import VERSION as DJANGO_VERSION from django.utils.translation import ugettext_lazy as _ ###################### # CARTRIDGE SETTINGS # ###################### # The following settings are already defined in cartridge.shop.defaults # with...
"""User serializers""" from collections import defaultdict import logging import re from django.db import transaction from django.contrib.auth import get_user_model import pycountry from rest_framework import serializers from social_django.models import UserSocialAuth from mail.v2 import verification_api from main.se...
#!/usr/bin/env python3 """ Simple Markov chain text generator written in Python 3. (Tested on 3.5.2) usage: mcg.py [-h] [-i words] [-l number] [-n number] [-s] [-c] [file] Create similar texts using Markov processes. positional arguments: file input file optional arguments: -h, -...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 15 12:58:14 2017 @author: yaric """ import json from math import log import pickle from nltk import word_tokenize from nltk.stem import WordNetLemmatizer from collections import Counter, defaultdict from copy import copy from itertools i...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing 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/LICENS...
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT 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 Software without restriction, including without lim...
# 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...
# 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 use ...
# 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...
# -*- 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...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import asyncio, aiohttp, aiosocks, discord import os, sys, linecache, async_timeout, inspect, traceback import re, math, random, uuid, time, jsonpickle from pymysql.converters import escape_item, escape_string, encoders from contextlib import redirect_stdout from discord.ext import commands from discord.ext.commands.er...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Cathy Nangini <cnangini@gmail.com> # Mainak Jas <mainak@neuro.hut.fi> # Jo...
# coding=utf-8 # Copyright 2021 ASAPP Inc. and The HuggingFace Inc. 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...
''' Low-level I/O for 2D data This module contains low-level read/write procedures for two-dimensional data (scattering patterns, masks etc.). Read functions have the signature:: def read<what>(filename, <other args>) and return the loaded data in a structure passing for the original logic of the file, whereas w...
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
import unittest import pystlink import lib.stm32 import lib.stlinkex class MockDbg(): def __init__(self): pass def debug(self, msg, level=2): pass # print(msg) def msg(self, msg, level=1): pass # print(msg) def verbose(self, msg, level=1): pass ...
"""A switch driver for Brocade NOS. Uses the XML REST API for communicating with the switch. """ import logging from lxml import etree from os.path import dirname, join import re import requests from schema import Schema, Optional from hil.migrations import paths from hil.model import db, Switch from hil.errors impo...
# 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. """Base class for running tests on a single device.""" import contextlib import httplib import logging import os import tempfile import time from pylib...
# Copyright 2013-2018 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 law or agreed to in w...
__author__ = 'Administrator' import json from heat.engine.resources.hwcloud.hws_service import HWSService class VPCService(HWSService): def __init__(self, ak, sk, region, protocol, host, port): super(VPCService, self).__init__(ak, sk, 'VPC', region, protocol, host, port) def list_vpc(self, project_...
import tempfile import pytest # this is require near the top to do setup of the test suite # from counterpartylib.test import conftest from counterpartylib.test.util_test import CURR_DIR as CPLIB_TESTDIR from counterpartylib.test.fixtures.params import DP from counterpartylib.test import util_test from micropayment_c...
"""Internal utilties; not for external use """ import contextlib import datetime import functools import itertools import re import warnings from collections import Mapping, MutableMapping, Iterable import numpy as np import pandas as pd from . import ops from .pycompat import iteritems, OrderedDict, basestring, byte...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """OSX platform implementation.""" import errno import os import sys from psutil import _common from psutil import _psposix from p...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import re import warnings from copy import deepcopy import numpy as np from astropy.io import registry as io_registry from astropy import units as u from astropy.table import Table, serialize, meta, Column, MaskedColumn from astropy.table.tab...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import time from common import chrome_proxy_metrics from common import network_metrics from common.chrome_proxy_metrics import Chro...
#!/usr/bin/env python from __future__ import print_function from effects import SnpEff # native Python imports import os.path import time import sys import sqlite3 import itertools as it import toml # toml.py # third-party imports import cyvcf2 as vcf import blosc blosc.set_nthreads(1) blosc.set_blocksize(8192) im...
import os import pytest import torch from torch.nn.parallel import DistributedDataParallel from torch.utils.data import DataLoader, DistributedSampler import ray import ray.train as train from ray.train import Trainer, TrainingCallback from ray.train.examples.horovod.horovod_example import ( train_func as horovod...
# # Implementation of IPython "magics", the cute shell-like # functions you can use in the debugger shell. # __all__ = [ 'ShellMagics' ] from IPython.core import magic from IPython.core.magic_arguments import magic_arguments, argument, parse_argstring from IPython.core.display import display from IPython.core.error i...
# -*- coding: utf-8 -*- """API and implementations for loading templates from different data sources. """ import os import sys import weakref from hashlib import sha1 from os import path from types import ModuleType from ._compat import abc from ._compat import fspath from ._compat import iteritems from ._compat impor...
# 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...
""" Filtering ========= Apply filters to neural signals, including highpass, lowpass, bandpass & bandstop filters. This tutorial primarily covers the ``neurodsp.filt`` module. """ ################################################################################################### # Filtering with NeuroDSP # ---------...
# 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...
""":mod:`sass` --- Binding of ``libsass`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This simple C extension module provides a very simple binding of ``libsass``, which is written in C/C++. It contains only one function and one exception type. >>> import sass >>> sass.compile(string='a { b { color: blue; } }') 'a b {...
import asyncio import logging import pytest from h2.errors import ErrorCodes from grpclib.const import Handler, Cardinality from grpclib.events import _DispatchServerEvents from grpclib.server import request_handler from grpclib.protocol import Connection, EventsProcessor from grpclib.exceptions import StreamTermina...
# 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 applica...
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from...
#!/usr/bin/env python # -*- coding: utf-8 -*- """PyLNP main library.""" from __future__ import print_function, unicode_literals import sys from tkgui import TkGui import fnmatch, glob, os, re, shutil, subprocess, tempfile, webbrowser import distutils.dir_util as dir_util from datetime import datetime from settings i...
#!/usr/local/sci/bin/python # ipython # %pdb (the debugger) # %run Convert_cfnc_AUG2014.py # this should leave everything interactive #*************************************** # 22 August 2014 KMW - v1 # Converts a netCDF file to a cf (pp) compliant netCDF # #***********************************************************...
#!/usr/bin/python3 import subprocess, shutil, os, sqlite3, re import utils from email_validator import validate_email as validate_email_, EmailNotValidError import idna def validate_email(email, mode=None): # Checks that an email address is syntactically valid. Returns True/False. # Until Postfix supports SMTPUTF8,...
''' Created on Mar 8, 2013 @author: Gary ''' import unittest from housemonitor.outputs.zigbee.zigbeeoutput import ZigBeeOutput from housemonitor.outputs.zigbee.zigbeecontrol import ZigBeeControl from housemonitor.outputs.zigbee.zigbeeoutputstep import ZigBeeOutputStep from housemonitor.outputs.zigbee.zigbeeoutputthrea...
from __future__ import print_function import warnings import copy import json import os import numpy as np from . import backend as K from .utils.io_utils import ask_to_proceed_with_overwrite from .engine.training import Model from .engine.topology import get_source_inputs, Node, Layer from .optimizers import optimize...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json, codecs, os, glob, time, dateutil.parser, collections, datetime, pickle, re, math import urllib.request, webbrowser import networkx as nx import numpy as np import matplotlib.pyplot as plt class communitydynamic: @classmethod def from_txt(cls,timeSeg...
#!/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...
# coding: utf-8 from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from django.utils import timezone from django.urls import reverse from unittest.mock import patch from studygroups.models import StudyGroup from studygroups.models import Application from studyg...
# Copyright 2022 The jax3d Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
''' Author: S.T. Castle Created: 2015-03-15 ''' #import math import numpy as np from scipy import ndimage from scipy import stats import scipy.ndimage.filters import scipy.linalg #import skimage.feature import cv2 from matplotlib import pyplot as plt def main(): ''' Run the explicit coherence enhancing filt...
# ----------------------------------------------------------------------------- # ply: lex.py # # Copyright (C) 2001-2009, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
import doctest import pytest from insights.parsers import mdstat, ParseException from insights.parsers.tests import skip_exception_check from insights.tests import context_wrap MDSTAT_TEST_1 = """ Personalities : [raid1] [raid6] [raid5] [raid4] md_d0 : active raid5 sde1[0] sdf1[4] sdb1[5] sdd1[2] cciss/c0d0p1[6] sdc1...
# Copyright 2017 SAS Project 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 requ...
# 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 applicable ...
from basic import * import tcr_sampler from amino_acids import amino_acids import re from all_genes import all_genes import sys import util with Parser(locals()) as p: p.str('clones_file').required() p.str('organism') p.int('min_count').default(10) p.int('max_ng_lines') p.int('max_motif_len').defa...
# Copyright 2012 NEC 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 required ...
"""YAML utility functions.""" import glob import logging import os import sys from collections import OrderedDict from typing import Union, List, Dict import yaml try: import keyring except ImportError: keyring = None from homeassistant.exceptions import HomeAssistantError _LOGGER = logging.getLogger(__name_...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import types from te...
#!/usr/bin/env python # # test_multibytecodec.py # Unit test for multibytecodec itself # from test import test_support from test import test_multibytecodec_support from test.test_support import TESTFN import unittest, StringIO, codecs, sys, os ALL_CJKENCODINGS = [ # _codecs_cn 'gb2312', 'gbk', 'gb18030', 'hz', ...
# -*- coding: utf-8 -*- import re import nltk import csv import sys import os import unicodedata import string import xml.etree.ElementTree as ET import math from sklearn.svm import LinearSVC from sklearn.feature_extraction import DictVectorizer from nltk import bigrams from nltk import trigrams from nltk.corpus imp...
# -*- coding: utf-8 -*- import os import time import gnupg import errno import shutil import getpass import tarfile import subprocess from glob import glob from functools import wraps from datetime import datetime from contextlib import closing class CallingUserError(Exception): """Exception class for throwing ...
# Copyright (c) 2015 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 ...
# 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...
from decimal import Decimal import django from django import forms from django.core.serializers import deserialize, serialize from django.core.serializers.base import DeserializationError from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from dja...
# Copyright (c) 2012 Spotify AB # # 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...
# Copyright (c) 2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Create Station-model plots.""" try: from enum import Enum except ImportError: from enum34 import Enum import matplotlib import numpy as np from .wx_symbols import (curr...
""" Support the ISY-994 controllers. For configuration details please visit the documentation for this component at https://home-assistant.io/components/isy994/ """ import asyncio from collections import namedtuple import logging from urllib.parse import urlparse import voluptuous as vol from homeassistant.core impo...
#!/usr/bin/env python2 # # Copyright 2016 Kareem Khazem. 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) 2010 ActiveState Software Inc. All rights reserved. """ pypm.common.repository ~~~~~~~~~~~~~~~~~~~~~~ Code related to repository functions """ import os from os import path as P import logging import gzip from hashlib import md5 from contextlib import closing from collections import named...
# encoding: utf-8 """ validation.py Created by Thomas Mangin on 2013-03-18. Copyright (c) 2009-2013 Exa Networks. All rights reserved. """ __all__ = ["validation", "ValidationError"] FORMAT = 3 DEBUG = False from collections import deque from collections import OrderedDict from exabgp.data import check TYPE=check...
""" A set of NumPy functions to apply per chunk """ from __future__ import absolute_import, division, print_function from collections import Container, Iterable, Sequence from functools import wraps from inspect import getargspec from toolz import concat import numpy as np from ..compatibility import builtins from ...
# 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 ...
"""Module implementing Markov chains. """ from __future__ import print_function import numpy as np import six range = six.moves.range map = six.moves.map from . import dynsys from . import mx from .mx import hashable_state from .utils import is_int TOLERANCE = 1e-10 TRANS_DTYPE = 'float32' class MarkovChain(dyns...
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # An alternate Python Minecraft library for the Rasperry-Pi # Copyright (c) 2013-2015 Dave Jones <dave@waveform.org.uk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
from __future__ import unicode_literals TYPE_MESSAGES = { 'unknown': 'Unknown type: {0}', 'invalid': "Got value `{0}` of type `{1}`. Value must be of type(s): `{2}`", 'invalid_header_type': ( "Invalid type for header: `{0}`. Must be one of 'string', 'number', " "'integer', 'boolean', or 'a...
#!/usr/bin/env python from __future__ import unicode_literals import unittest import securetrading from securetrading.test import abstract_test import time import hashlib import os import argparse import sys def get_args(): args_parser = argparse.ArgumentParser() args_parser.add_argument("--sitereference", ac...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import collections import json import mock impo...
# Copyright (c) 2012 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 law or agreed to ...
from __future__ import unicode_literals, absolute_import, print_function import click import json, os, sys from distutils.spawn import find_executable import frappe from frappe.commands import pass_context, get_site from frappe.utils import update_progress_bar @click.command('build') @click.option('--make-copy', is_fl...
#!/usr/bin/python ### File Information ### """ Incorporate changes from older to newer into target. """ __author__ = 'duanqz@gmail.com' TAG="diff_patch" import os import commands import shutil import fnmatch import tempfile from config import Config from smaliparser.Smali import Smali from formatters.log import L...
''' Computer Algebra Core ===================== This module permits the creation of symbolic representation of mathematical operations. Implementation details ====================== The code here is meant to be simple at the expense of not being easy to generalize or extend. Repetition of code is preferable over a c...
""" Routines for runtime docstring argument injection This file contains HEAVILY modified routines from sphinx.ext.napoleon, from version 1.4.4 This has been vendored into MDT because the modification makes use of private functions which have already changed in the dev branch. ~~~~~~~~~~~~~~~~~~~...