gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Geosoft system functions. .. note:: Regression tests provide usage examples: `Tests <https://github.com/GeosoftInc/gxpy/blob/master/geosoft/gxpy/tests/test_system.py>`_ """ import time import inspect import os import gc import shutil import zipfile import threading import sys from itertools import count impo...
# -*- coding: utf-8 -*- from imports import * from xichao.packages.config.article import _GROUP_Square_ def get_homepage_specials(): """Get specials and image to be present on the homepage Returns: A list of specials and a list of special cover images """ query = db_session.query(HomePage).a...
# 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...
# # endpoints import logging from datetime import datetime from dateutil.relativedelta import relativedelta from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.core.exceptions import PermissionDenied from django.core.urlresolvers ...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Describe the size difference of two binaries. Generates a description of the size difference of two binaries based on the difference...
from __future__ import absolute_import from __future__ import unicode_literals import os import docker import py import pytest from .. import mock from .. import unittest from compose.cli.command import get_project from compose.cli.command import get_project_name from compose.cli.docopt_command import NoSuchCommand ...
# Copyright 2019 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, ...
import copy import json import subprocess from os import system import pyrebase import requests import collections from Firefly import aliases, logging, scheduler from Firefly.const import API_ALEXA_VIEW, API_FIREBASE_VIEW, FIREFLY_SECURITY_MONITORING, SOURCE_LOCATION, SOURCE_TIME, TYPE_DEVICE, TYPE_ROUTINE from Fire...
import numpy as np from scipy.interpolate import interp1d from astropy.io import fits from .. import constants as c from .. import distlib from ..extinction import sigma_scat as ss ## UPDATED July 10, 2013 : Rewrote ecf method in HaloDict object ## UPDATED June 11, 2013 : Make this file independent of asciidata ## ...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# coding=utf-8 __author__ = 'pp' __version__ = '1.0.0' import pandas as pd import os import tempfile import numpy as np from ccytsk.core.utils import uid class Dataset(object): """ Pandas dataframe wrapper Parameters ---------- filepath_or_buffer : str, pathlib.Path, py._path.local.LocalPath or...
# Copyright 2021 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# -*- coding: utf-8 -*- import json import os from urllib.parse import quote import pytest import re from mock import MagicMock, patch, Mock from twisted.trial import unittest from twisted.web.error import Error import requests from twisted.web.server import Request from scrapyrt.resources import CrawlResource from ...
from __future__ import absolute_import, print_function import logging import math import re import warnings from collections import namedtuple from enum import Enum from datetime import timedelta from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from django.ut...
# # 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 2021 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, ...
import errno import gzip import hashlib import os import platform import re import shutil import stat import sys import tarfile import tempfile from os.path import abspath, join as joinpath, realpath from contextlib import contextmanager import six from conans.util.log import logger def walk(top, **kwargs): i...
#!python3 import ui from objc_util import ObjCInstance, ObjCClass, on_main_thread from enum import Enum from functools import partial _LayoutConstraint = ObjCClass('NSLayoutConstraint') class LayoutRelation(int, Enum): lessThanOrEqual = -1 equal = 0 greaterThanOrEqual = 1 class LayoutAttribute(int, E...
# Copyright 2013, 2019 IBM Corp. import re from eventlet import greenthread import powervc.common.config as cfg from powervc.common.gettextutils import _ from nova.compute import flavors from nova import exception from nova import db from oslo_log import log as logging from nova.openstack.common import loopingcall fr...
# Copyright 2021, Jorj McKie, mailto:<jorj.x.mckie@outlook.de> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
import re class List: def __init__(self, l): self.list = l def __str__(self): if len(self.list)==0: return 'List([])' s = 'List(['+str(self.list[0]) for e in self.list[1:]: s = s + ', ' + str(e) return s+'])' def __getitem__(self,index): ...
# 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...
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: April 02, 2007 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """Utilities to be use...
import unittest from app.authentication.invalid_token_exception import InvalidTokenException from app.parser.metadata_parser import parse_metadata, is_valid_metadata from tests.app.framework.survey_runner_test_case import SurveyRunnerTestCase class TestMetadataParser(SurveyRunnerTestCase): # pylint: disable=too-man...
import hmac import json from urllib.parse import quote, urlencode from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse, HttpResponseRedirect from django.utils.translation import gettext_lazy as _ from rdmo.core.plugins import Plugin from rdmo.services.providers import Oa...
#!/usr/bin/python # # ==-- jobstats - support for reading the contents of stats dirs --==# # # This source file is part of the Swift.org open source project # # Copyright (c) 2014-2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2008 (ita) """ The class task_gen encapsulates the creation of task objects (low-level code) The instances can have various parameters, but the creation of task nodes (Task.py) is delayed. To achieve this, various methods are called from the method "apply" T...
import re from concurrent.futures.thread import ThreadPoolExecutor import pykka import requests import youtube_dl from cachetools import TTLCache, cached from mopidy.models import Image from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry from requests.packages.urllib3.util....
# Copyright 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 in...
from pyscf.gto import Mole from pyscf.scf import RKS, RHF from pyscf.tdscf import TDDFT, TDHF from pyscf.tdscf.proxy import PhysERI, TDProxy, mk_make_canonic, molecular_response, orb2ov from pyscf.tdscf.common_slow import format_frozen_mol import numpy from numpy import testing import unittest from test_common import...
# Copyright (C) 2020 Atsushi Togo # All rights reserved. # # This file is part of phono3py. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # noti...
""" Module to set up run time parameters for Clawpack -- AMRClaw code. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ import os import numpy as np t_shelf = 3.2*3600 # time approaching continental slope t_harbor = 3.5*3600 # time approach...
# -*- coding: utf8 -*- """ .. module:: burpui.api.settings :platform: Unix :synopsis: Burp-UI settings api module. .. moduleauthor:: Ziirish <hi+burpui@ziirish.me> """ import json from . import api from ..engines.server import BUIServer # noqa from ..ext.cache import cache from .custom import Resource from ...
"""Service cli.""" import asyncio import cmd from mpf.core.bcp.bcp_socket_client import AsyncioBcpClientSocket try: from terminaltables import AsciiTable except ImportError: AsciiTable = None ERROR_OUTPUT = "Error: {}\n" SUCCESS_OUTPUT = "Success\n" class ServiceCli(cmd.Cmd): """Commandline service mo...
# Flask from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, flash from werkzeug import secure_filename from flask.ext.sqlalchemy import SQLAlchemy import sqlite3 # PDN-related import pdn from pdnstat import hamming_distance # Python standard libraries from collections import ...
""" Tests that skipped rows are properly handled during parsing for all of the parsers defined in parsers.py """ from datetime import datetime from io import StringIO import numpy as np import pytest from pandas.errors import EmptyDataError from pandas import DataFrame, Index import pandas.util.testing as tm @pyt...
# # Copyright (c) 2016 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
"""Support for Wi-Fi enabled iRobot Roombas.""" import asyncio import logging import async_timeout import voluptuous as vol from homeassistant.components.vacuum import ( PLATFORM_SCHEMA, SUPPORT_BATTERY, SUPPORT_FAN_SPEED, SUPPORT_PAUSE, SUPPORT_RETURN_HOME, SUPPORT_SEND_COMMAND, SUPPORT_S...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ __author__ = "Jifu Zhao" __email__ = "jzhao59@illinois.edu" __date__ = "04/07/2017" __modify__ = "05/15/2017" """ # ------------------------------------------------------------------------- # Currently there are two problems # 1. for semivariogram, when...
from flask.ext.mongokit import Document from mongokit import ObjectId, IS, OR, Collection from bson.errors import InvalidId import time import logging class Enum(dict): __getattr__ = dict.get def __init__(self, *l): for e in l: self[e.upper()] = e def values_both_types(self): ''' return the values as str an...
# # Copyright 2012 Sonya Huang # # 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...
# -*- coding: utf-8 -*- ''' Manage information about files on the minion, set/read user, group data :depends: - win32api - win32file - win32security ''' from __future__ import absolute_import # Import python libs import os import stat import os.path import logging import struct # pylint: dis...
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from segwit import send_to_witness from test_framework.test_framework import BitcoinTestFramework from test_fr...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import import datetime import os import sys from os.path import join as pjoin if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO import numpy as np from numpy.testing import (TestCase, asse...
# postgresql/hstore.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re from .base import ARRAY, ischema_names from ... import types as sqltyp...
# coding: utf-8 from urlparse import urlparse from uuid import uuid4 import hashlib import re import unicodedata import urllib from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from webargs import fields as wf from webargs.flaskparser import parser import flask import...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
# -*- coding: utf-8 -*- from collections import OrderedDict from .platform import Platform from .keywords.sqlite_keywords import SQLiteKeywords from ..table import Table from ..index import Index from ..column import Column from ..identifier import Identifier from ..foreign_key_constraint import ForeignKeyConstraint f...
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2017 """ Runtime tester functionality. ******** Overview ******** Module containing runtime functionality for :py:mod:`streamsx.topology.tester`. When test is executed any specified :py:class:`Condition` instances are executed in the contex...
# -*- coding: utf-8 -*- import six import traceback from typing import ( # NOQA Dict, List, Tuple, Type, Union, ) from django.apps.config import MODELS_MODULE_NAME from django.utils.module_loading import import_string from django import VERSION as DJANGO_VERSION from django_extensions.collision_r...
import argparse import copy import dataset_walker import json import time from collections import defaultdict def labels(user_act, mact): # get context for "this" in inform(=dontcare) # get context for affirm and negate this_slot = None confirm_slots = {"explicit": [], "implicit": []} for act in ...
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Implements high-level operations for attribu...
""" Tests for the model and manager in the model-based workflow. """ import datetime import hashlib from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core import mail from django.core import management from django.test import overrid...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
#!/usr/bin/env python ''' Tests/Steps: 1. Copy the data files (ie. codominant/data/*) to the target server's gobii_bundle file directory (ie. <bundle>/crops/<crop_name>/files/) 2. Modify the marker instruction file with the correct parameter values, then copy the file (ie. codominant/instruction/m_test.json) to the tar...
#!/usr/bin/env python2.7 """Tool to filter, organize, compare and display benchmarking results. Usefull for smaller datasets. It works great with a few dozen runs it is not designed to deal with hundreds. Requires the pandas library to be installed.""" import pandas as pd import sys import os.path import re import numb...
# pylint: disable=missing-docstring import os from django.apps import apps from django.core.management import call_command from guardian.shortcuts import assign_perm from rest_framework import status from resolwe.flow.models import Collection, Entity, Relation from resolwe.flow.models.entity import RelationPartition...
# See https://zulip.readthedocs.io/en/latest/subsystems/caching.html for docs import base64 import hashlib import logging import os import random import re import sys import time import traceback from functools import wraps from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterable, List,...
"""Support for MQTT message handling.""" from __future__ import annotations from ast import literal_eval import asyncio from dataclasses import dataclass import datetime as dt from functools import lru_cache, partial, wraps import inspect from itertools import groupby import logging from operator import attrgetter imp...
# Copyright 2013 Nicira, 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import base64 from urlparse import parse_qs from saml2.sigver import pre_encryption_part from saml2.assertion import Policy from saml2.authn_context import INTERNETPROTOCOLPASSWORD from saml2.saml import NameID, NAMEID_FORMAT_TRANSIENT from saml2.samlp import response_from_...
# Copyright 2014-2020 The PySCF Developers. 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 appl...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import os from django.contrib.gis.geos import Point, LinearRing, fromstr from math import pi, sin, tan, sqrt, pow from django.conf import settings from django.db import connection from django.core.cache import cache from lingcod.common.models import KmlCache import zipfile import re import logging import inspect import...
#!/usr/bin/python # # Copyright 2020 DeepMind Technologies 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 a...
from django.conf import settings from django.db import connection, router, transaction, connections from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotEx...
import os import sys import tempfile from collections import Counter import mock import pytest from prequ._pip_compat import path_to_url, url_to_path from prequ.exceptions import IncompatibleRequirements from prequ.sync import dependency_tree, diff, merge, sync from prequ.utils import get_ireq_version, key_from_dist,...
import os.path import shutil from datetime import datetime from unittest import TestCase from nose.plugins.skip import SkipTest from whylog.config import SettingsFactorySelector from whylog.config.investigation_plan import Clue, InvestigationStep, LineSource from whylog.config.parsers import RegexParser from whylog.c...
# -*- coding: utf-8 -*- """Utility classes and values used for marshalling and unmarshalling objects to and from primitive types. .. warning:: This module is treated as private API. Users should not need to use this module directly. """ from __future__ import unicode_literals from marshmallow import base, u...
from numpy import int_ from platform import system import serial, time, glob import sys def disp_ports(): print "Found ports:" for name in list_serial_ports(): print name def list_serial_ports(): if system() == 'Windows': # Scan for avilable ports available = [] for ix in range(...
import scipy.sparse as sp import scipy.sparse.linalg as la import numpy as np import math as m import time import sys import os resultDir = os.environ.get('RESULTS') if resultDir == None : print ("WARNING! $RESULTS not set! Attempt to write results will fail!\n") botConc = float(sys.argv[1]) topConc = float(sys.a...
# 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...
import json import os import sys import unittest from cStringIO import StringIO from validator.validate import validate FIREFOX_GUID = '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' MOBILE_GUID = '{a23983c0-fd0e-11dc-95ff-0800200c9a66}' THUNDERBIRD_GUID = '{3550f703-e582-4d05-9a08-453d09bdfdc6}' def _validator(file_path...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Thomas Scholtes. # # 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 ...
"""Generated message classes for dns version v1. The Google Cloud DNS API provides services for configuring and serving authoritative DNS records. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages package = 'dns' class Change(_mes...
"""The functions in these utilities check that noncovalent interactions happen""" import numpy as np from collections import Counter from deepchem.utils.fragment_utils import get_partial_charge from deepchem.utils.rdkit_utils import compute_ring_center from deepchem.utils.rdkit_utils import compute_ring_normal from dee...
from __future__ import absolute_import from __future__ import print_function import time import logging import math import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow as tf from tensorflow.python.ops import variable_scope as vs import os import random logging.bas...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ All of the pytest fixtures used by astropy.table are defined here. `conftest.py` is a "special" module name for pytest that is always imported, but is not looked in for tests, and it is the recommended place to put fixtures that are shared between mod...
# Copyright (c) 2019 The Johns Hopkins University/Applied Physics Laboratory # 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...
""" Exploring correlations between two variables """ __author__ = 'Diego' import PyQt4.QtGui as QtGui import PyQt4.QtCore as QtCore import matplotlib from vcorr.qt_models import VarListModel matplotlib.use("Qt4Agg") from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas import matplotlib.p...
# The DEPLOF font is made by David Elata, MEMS Lab, Technion, Haifa, Israel and # and is used with permission. The raw polygon entries are sourced from # Ulf Griesmann's modified DEPLOF implementation used in the MATLAB gdsii # toolbox https://github.com/ulfgri/gdsii-toolbox/ and are used with permission _glyph = {...
# version: 3.007 # File: installer.py ; This file is part of Twister. # Copyright (C) 2012-2013 , Luxoft # Authors: # Andrei Costachi <acostachi@luxoft.com> # Cristi Constantin <crconstantin@luxoft.com> # Mihai Dobre <mihdobre@luxoft.com> # Licensed under the Apache License, Version 2.0 (the "License"); #...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from mpl_toolkits.mplot3d import Axes3D import scipy.io as sio from ex7_utility import * from ex7 import * ## Machine Learning Online Class - Exercise 7: Principle Component Analysis and K-Means Clustering # Instructions # ------------ # ...
# 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 django.test import TestCase from django.test import override_settings import copy from mailer.models import MailNotifier from mailer.models import MailLog from mailer import receivers from mailer.signals import * # Ensure that the events exposed as choices for the # data model match expectations class EventCho...
#!/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...
""" Fortran block statements. ----- Permission to use, modify, and distribute this software is given under the terms of the NumPy License. See http://scipy.org. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. Author: Pearu Peterson <pearu@cens.ioc.ee> Created: May 2006 ----- """ __all__ = ['BeginSource',...
from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks from twisted.internet.protocol import ReconnectingClientFactory from vumi import log from vumi.transports.base import Transport from vumi.message import TransportUserMessage from vumi.config import ConfigInt, ConfigText, ConfigDict...
__all__ = [ 'Dropbox', 'DropboxTeam', 'create_session', ] # This should always be 0.0.0 in master. Only update this after tagging # before release. __version__ = '9.4.0' import contextlib import json import logging import random import time import requests import six from . import files, stone_serialize...
import unittest import mock import numpy import chainer from chainer import cuda import chainer.functions as F from chainer import testing from chainer.testing import attr from chainer.utils import type_check class TestFunction(unittest.TestCase): def _get_method(self, prefix, gpu): suffix = 'gpu' if g...
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 applic...
from __future__ import absolute_import import six from .bindings import C, ffi, GSS_ERROR, _buf_to_str from .error import GSSException, _exception_for_status from .oids import OID def _release_gss_name_t(name): if name[0]: C.gss_release_name(ffi.new('OM_uint32[1]'), name) class _NameMeta(type): # ...
# 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.apach...
import distutils.version import numpy as np import tensorflow as tf import tensorflow.contrib.rnn as rnn import feudal_networks.policies.policy as policy import feudal_networks.policies.policy_utils as policy_utils from feudal_networks.models.models import SingleStepLSTM from feudal_networks.policies.configs.feudal_c...
import decimal import functools import math import struct from decimal import Decimal from enum import Enum from .errors import ClaripyOperationError from .backend_object import BackendObject def compare_sorts(f): @functools.wraps(f) def compare_guard(self, o): if self.sort != o.sort: rais...
''' Created on Apr 2, 2013 @author: johannes ''' import scipy as SP import scipy.linalg as LA import warnings from . import py_splitting_core as SC from . import par_lmm_forest from . import lmm_forest_utils as utils from . import blup as BLUP from limix.ensemble import SplittingCore as CSP class Forest(object): ...
import unittest import io import imghdr from PIL import Image as PILImage from willow.image import ( JPEGImageFile, PNGImageFile, GIFImageFile, WebPImageFile, BadImageOperationError ) from willow.plugins.pillow import _PIL_Image, PillowImage, UnsupportedRotation no_webp_support = not PillowImage.is_format_suppo...
# 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...