gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 """ f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. Copyright 1999--2011 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRA...
from __future__ import print_function import functools import os import subprocess from unittest import TestCase, skipIf import attr from .._methodical import MethodicalMachine from .test_discover import isTwistedInstalled def isGraphvizModuleInstalled(): """ Is the graphviz Python module installed? "...
import numpy as np from collection import RadarFileCollection from pyart.core.transforms import antenna_vectors_to_cartesian, corner_to_point from quadmesh_geometry import mesh_from_quads, radar_example_data from vispy import gloo import vispy import vispy.app # from vispy.scene.widgets import ViewBox from vispy.scen...
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import mixins,generics, status, permissions from .serializers import AuthorSerializer,PostSerializer,CommentSerializer,PostPagination,CommentPagination,AddCommentQuerySerializer from rest_framework.decorators impor...
""" This tutorial shows how to generate adversarial examples using FGSM and train a model using adversarial training with TensorFlow. It is very similar to mnist_tutorial_keras_tf.py, which does the same thing but with a dependence on keras. The original paper can be found at: https://arxiv.org/abs/1412.6572 """ # pyli...
"""The test for state automation.""" from datetime import timedelta from unittest.mock import patch import pytest import homeassistant.components.automation as automation from homeassistant.components.homeassistant.triggers import state as state_trigger from homeassistant.const import ATTR_ENTITY_ID, ENTITY_MATCH_ALL...
#!/usr/bin/env python import argparse import gzip import os from collections import OrderedDict import yaml from Bio.SeqIO.QualityIO import FastqGeneralIterator OUTPUT_DBKEY_DIR = 'output_dbkey' OUTPUT_METRICS_DIR = 'output_metrics' def get_sample_name(file_path): base_file_name = os.path.basename(file_path) ...
# Copyright 2019 The ROBEL 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...
# ============================================================================== # Copyright 2018-2020 Intel 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://ww...
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from Selenium2Library import utils from Selenium2Library.locators import ElementFinder from keywordgroup import KeywordGroup class _ElementKeywords(KeywordGroup): def __init__(self): self._elem...
import sys from quex.engine.misc.file_in import error_msg from quex.engine.utf8 import map_unicode_to_utf8 from quex.engine.interval_handling import NumberSet, Interval from quex.engine.unicode_db.parser import ucs_property_db from quex.exception import RegularExpressionException...
# Copyright 2017 ZTE 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 applicable law or agreed to in ...
import json import pytest import workstreambot.scrum.dictionary as dict from workstreambot.message_handler import MessageHandler def test_guide_endless(): handler = MessageHandler({"scrum"}) response = send_message(handler, "What is Scrum about?", "test_session") assert response['sender'] == "test_sessi...
"""Conversion methods for atmospheric-moisture variables.""" import numpy from gewittergefahr.gg_utils import temperature_conversions as temperature_conv from gewittergefahr.gg_utils import error_checking DRY_AIR_GAS_CONSTANT_J_KG01_K01 = 287.04 WATER_VAPOUR_GAS_CONSTANT_J_KG01_K01 = 461.5 EPSILON = DRY_AIR_GAS_CONST...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # Joan Massich <mailsik@gmail.com> # Guillaume Favelier <guillaume.favelier@gmail.com> # # License: Simplified BSD import os import sys import pytest import numpy as np from mne.utils import...
"""Blocking and non-blocking HTTP client interfaces. This module defines a common interface shared by two implementations, ``simple_httpclient`` and ``curl_httpclient``. Applications may either instantiate their chosen implementation class directly or use the `AsyncHTTPClient` class from this module, which selects an...
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # tcpaccept Trace TCP accept()s. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: tcpaccept [-h] [-T] [-t] [-p PID] [-P PORTS] # # This uses dynamic tracing of the kernel inet_csk_accept() socket function # (from tcp_prot.accept), and will ne...
#!/usr/bin/env python ## # Copyright (c) 2014-2017 Apple 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 r...
import copy from inspect import isclass import theano.tensor as T from deepmonster.utils import flatten from deepmonster.nnet.baselayers import AbsLayer from deepmonster.nnet.simple import BiasLayer def propagate(func): """Network decorator to propagate a function call to all layers attribute of a class. """ ...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # 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...
# 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...
# 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 2013 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 ...
# Implementation of RAKE - Rapid Automtic Keyword Exraction algorithm # as described in: # Rose, S., D. Engel, N. Cramer, and W. Cowley (2010). # Automatic keyword extraction from indi-vidual documents. # In M. W. Berry and J. Kogan (Eds.), Text Mining: Applications and Theory.unknown: John Wiley and Sons, Ltd. # # N...
# pylint: disable=g-bad-file-header # Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
# # demo to start os command # # from subprocess import check_output # cmd = r'C:\cygwin64\bin\ps.exe' # output = check_output(cmd) # print (output) import subprocess import glob import json import platform import os from cloudmesh_base.util import path_expand class Shell(object): cygwin_path = 'bin' #i copied...
"""Create a lookup tables for redshift and the NE2001 dispersion measure.""" import os import numpy as np import sqlite3 import sys from scipy.integrate import quad from tqdm import tqdm from joblib import Parallel, delayed import frbpoppy.galacticops as go from frbpoppy.misc import pprint from frbpoppy.paths import ...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- # -------------------------------------------------------- # R*CNN # Wri...
import os import tempfile import uuid from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models.fields.files import Imag...
from flatland import String from tests._util import fails from tests.markup._util import desired_output schema = String.named(u'element').using(default=u'val').from_defaults ### value @desired_output('html', schema) def value_bound(): """<div value="val"></div>""" @value_bound.genshi_06 def test_value_bound...
from datetime import datetime from pandas.compat import range, long, zip from pandas import compat import re import numpy as np from pandas.core.algorithms import unique from pandas.tseries.offsets import DateOffset from pandas.util.decorators import cache_readonly import pandas.tseries.offsets as offsets import pand...
# 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...
# 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...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
# 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 itertools from typing import Set, Dict, List, Tuple, Sequence, Iterable import attr from cached_property import cached_property from bead.tech.timestamp import EPOCH_STR from .freshness import UP_TO_DATE, OUT_OF_DATE from .dummy import Dummy from .cluster import Cluster, create_cluster_index from .io import re...
# 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...
""" Cross-object data auditing Schema validation allows for checking values within a single object. We also need to perform higher order checking between linked objects. """ import logging import venusian from past.builtins import basestring from pyramid.view import view_config from .calculated import calculated_prop...
#!/usr/bin/python ################################################################################ # # Universal JDWP shellifier # # @_hugsy_ # # And special cheers to @lanjelot # import socket import time import sys import struct import urllib import argparse #######################################################...
""" This module provides an online API for the Unimaus Simulator. This can be useful in cases where we want to have other code interacting with the simulator online, and don't necessarily need to store the generated data in a file. For a simple example of usage, see __main__ code at the bottom of this module. @author...
#!/usr/bin/env python # # Generated Mon May 2 14:23:33 2011 by parse_xsd.py version 0.4. # from saml2.validate import valid_ipv4, MustValueError from saml2.validate import valid_ipv6 from saml2.validate import ShouldValueError from saml2.validate import valid_domain_name import saml2 from saml2 import SamlBase impo...
## Copyright (c) 2003 Henk Punt ## 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 click import falcon import hashlib import logging import os from asn1crypto import cms, algos from asn1crypto.core import SetOf, PrintableString from base64 import b64decode from certidude import config from oscrypto import keys, asymmetric, symmetric from oscrypto.errors import SignatureError from .utils import...
import pygame import time # todo # wrap round off edge of screen # make screen scrolling smoother? # add audio? # new character # simple character animation? # tune movement to make it feel good # add more platforms # add more items and different types # fall down to a crisis # remove platforms that scroll off the bot...
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # Electron Cash - lightweight Bitcoin Cash client # Copyright (C) 2019 The Electron Cash Developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated d...
"""Terse command-line parser wrapper around ArgumentParser Example Usage: # First example is the equivalent version of an example from the # argparse docs p = Parser( 'cmd', 'Process some integers', Arg('integers', 'an integer for the accumulator', metavar='N', type=int, nargs='+'), Arg...
#!/usr/bin/env python # -*- coding: utf-8 -*-. from __future__ import print_function from __future__ import division import argparse from os.path import join as pjoin from os import makedirs import time, datetime # the usual suspects import h5py import numpy as np import matplotlib as mpl mpl.use('Agg') #mpl.use('GT...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/api/http.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection a...
# Copyright 2019 Ram Rachum and collaborators. # This program is distributed under the MIT license. import os import re import abc import inspect import sys from pysnooper.utils import DEFAULT_REPR_RE try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import pprint import sys import textwrap import py import pytest from _pytest.main import _in_venv from _pytest.main import EXIT_INTERRUPTED from _pytest.main import EXIT_NOT...
# Lint as: python2, python3 # 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 # ...
#! encoding: utf-8 # ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistr...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
import json import uuid from datetime import datetime, timedelta from django.conf import settings from django.contrib import messages from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import connection from django.db.models import Count, Q, Sum from djang...
import os import asyncio import sys from random import SystemRandom from io import BytesIO from socket import socket from time import time from collections import namedtuple from struct import Struct from urllib.parse import urlsplit from queue import Queue from Crypto.PublicKey import RSA from Crypto.Util.strxor imp...
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://static.aryehleib.com/oldsite/MutableLists.html Author: Aryeh Leib Taurog. """ from fun...
# 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 applicable law or a...
import functools from framework.auth import Auth from website.archiver import ( StatResult, AggregateStatResult, ARCHIVER_NETWORK_ERROR, ARCHIVER_SIZE_EXCEEDED, ARCHIVER_FILE_NOT_FOUND, ARCHIVER_FORCED_FAILURE, ) from website import ( mails, settings ) from osf.utils.sanitize import unesc...
import json import os import re import requests try: from urllib import urlencode from urlparse import urlunparse except ImportError: from urllib.parse import urlencode from urllib.parse import urlunparse _JSON_HEADERS = { 'accepts': 'application/json', 'content-type': 'application/json' } ROO...
# coding:utf-8 import datetime import itertools import logging import random import re import sys import threading import unittest.mock import pytest import backoff from tests.common import _save_target def test_on_predicate(monkeypatch): monkeypatch.setattr('time.sleep', lambda x: None) @backoff.on_predic...
'''Stubs for patching HTTP and HTTPS requests''' import logging import six from six.moves.http_client import ( HTTPConnection, HTTPSConnection, HTTPResponse, ) from six import BytesIO from vcr.request import Request from vcr.errors import CannotOverwriteExistingCassetteException from . import compat log =...
import warnings import os import nibabel as nb import numpy as np from nipype.external import six from ...utils.misc import package_check have_nipy = True try: package_check('nipy') except Exception, e: have_nipy = False else: import nipy.modalities.fmri.design_matrix as dm import nipy.labs.glm.glm ...
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes. Email: danaukes<at>seas.harvard.edu. Please see LICENSE.txt for full license. """ import PySide.QtCore as qc import PySide.QtGui as qg from popupcad.graphics2d.graphicsitems import Common, CommonShape from popupcad.geometry.vertex import ShapeVertex from popupcad...
# Copyright 2015 Tesora 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...
# vi: ts=8 sts=4 sw=4 et # # dbpsycopg2.py: psycopg2 database adapter # # This file is part of Draco2. Draco2 is free software and is made available # under the MIT license. Consult the file "LICENSE" that is distributed # together with this file for the exact licensing terms. # # Draco2 is copyright (c) 1999-2007 by t...
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2018 Danilo Bargen 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,...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- import unittest im...
# -*- coding: utf-8 -*- # Copyright 2011 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 require...
import warnings import copy import math as m import numpy as nu from scipy import integrate, optimize import scipy if int(scipy.__version__.split('.')[1]) < 10: #pragma: no cover from scipy.maxentropy import logsumexp else: from scipy.misc import logsumexp from galpy.potential_src.Potential import evaluateRforc...
## @file # generate flash image # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be f...
# -*- coding: utf-8 -*- ''' Tests for the Git state ''' # Import python libs from __future__ import absolute_import import os import shutil import socket import subprocess import tempfile # Import Salt Testing libs from salttesting.helpers import ensure_in_syspath, skip_if_binaries_missing ensure_in_syspath('../../')...
""" dexml: a dead-simple Object-XML mapper for Python ================================================== Let's face it: xml is a fact of modern life. I'd even go so far as to say that it's *good* at what is does. But that doesn't mean it's easy to work with and it doesn't mean that we have to like it. Most of the...
#!/usr/bin/env python __author__ = 'joon' import sys sys.path.insert(0, 'src') sys.path.insert(0, 'lib') sys.path.insert(0, 'ResearchTools') from imports.basic_modules import * from imports.import_caffe import * from imports.ResearchTools import * from imports.libmodules import * from config import config_test ##...
from xueqiu_api import XueqiuApi class XueqiuStrategies(object): @staticmethod def stable_strict(): stable = XueqiuApi('stable_strict') stable.append_pettm('0', '15') stable.append_pb() stable.append_dy() stable.append_roediluted('20161231', '15', is_order_by_this=True)...
# 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 # distribu...
from __future__ import unicode_literals, print_function import os import sys import logging import json from decimal import Decimal, InvalidOperation try: import urllib.parse as urlparse except ImportError: import urlparse try: from django.core.exceptions import ImproperlyConfigured except ImportError: ...
#! /Users/Nest/anaconda/bin/python # -*- coding: utf-8 -*- # Copyright 2012-2014 Matt Martz # 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://...
# 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.""" from enum import Enum import numpy as np from .wx_symbols import (current_weather, high_clouds, low_clouds, mid_clouds, ...
# # NB! See note at "THIS MAY BE COSTLY" #------------------------------------------- # # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. New standard names and BMI updates and testing. # Aug 2014. Updates to standard names and BMI. # Wrote latent_heat_of_evaporation(); not used yet. # ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'G://Projects/_tools/_maya/fossil\pdil\tool\fossil/ui/rigToolUI.ui', # licensing of 'G://Projects/_tools/_maya/fossil\pdil\tool\fossil/ui/rigToolUI.ui' applies. # # Created: Tue Jul 13 00:37:35 2021 # by: pyside2-uic running on PySide2 ...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
""" Unit tests for reverse URL lookups. """ from __future__ import absolute_import from django.conf import settings from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist from django.core.urlresolvers import (reverse, resolve, NoReverseMatch, Resolver404, ResolverMatch, RegexURLResolver, RegexUR...
import numpy as np import NeuralNetworkUtilities as utilities class BaseLayer(object): def __init__(self, n_nodes, activation, knockout_survial=None): # the number of nodes for this layer... self.n_nodes = n_nodes self.n_input_edges = None # the upstream layer, used for backpropaga...
"""Classes to summarize zscore data for a sample-variant. A collection of individual Tag classes hold the metaheader and logic to transform Jacquard-standardized VcfRecords. These transforms combine info from a single sample-variant tag with aggregate info about all sample-variants in the VCF. For example, the zscore...
""" contains all common and re-usable code for rhevm-setup and sub packages """ import grp import pwd import logging import subprocess import re import output_messages import traceback import os import basedefs import datetime import libxml2 import types import shutil import time import tempfile """ ENUM implementatio...
"""A collection of ORM sqlalchemy models for Caravel""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import json import logging import textwrap from collections import namedtuple from copy import de...
from django.db.models import get_model from django.template import Library, Node, TemplateSyntaxError, Variable, resolve_variable from django.utils.translation import ugettext as _ from tagging.models import Tag, TaggedItem from tagging.utils import LINEAR, LOGARITHMIC register = Library() class TagsForModelNode(No...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import json import os import shutil import tempfile import time import unittest import itertools import urllib from gevent import monkey monkey.patch_all() from bs4 import BeautifulSoup import PIL.Image from urlparse import urlparse from cStringIO i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A modular python bot based on the twisted matrix irc library @author Riku 'Shrike' Lindblad (shrike@addiktit.net) @copyright Copyright (c) 2006 Riku Lindblad @license New-Style BSD """ from __future__ import print_function, division import sys import os.path import t...
import os import sys import time import exceptions import copy import logging from threading import Thread, Lock import uuid try: import cPickle as pickle except: import pickle ''' @author: msune,lbergesio,omoya,cbermudo,CarolinaFernandez @organization: i2CAT, OFELIA FP7 PolicyEngine RuleTable class ...
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
import builtins import sys from datetime import date from io import StringIO from unittest import mock from django.apps import apps from django.contrib.auth import management from django.contrib.auth.management import create_permissions from django.contrib.auth.management.commands import ( changepassword, createsu...
from __future__ import print_function import tensorflow as tf import pandas as pd import numpy as np from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer, TfidfTransformer import math import itertools from collections import Counter from sklearn.metric...
import logging import os import sys import urllib from sqlalchemy.exc import SQLAlchemyError#OperationalError, DBAPIError #from odmtools.common.logger import LoggerTool from series_service import SeriesService from cv_service import CVService from edit_service import EditService from odmtools.controller import EditT...
# 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 shutil from os.path import join from bzt import TaurusConfigError from bzt.modules.proxy2jmx import Proxy2JMX, BZAProxy from bzt.modules._selenium import SeleniumExecutor from bzt.utils import is_windows, is_linux, get_full_path, RESOURCES_DIR from tests.unit import BZTestCase, EngineEmul ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from functools import partial from collections import defaultdict import numpy as np from matplotlib import rcParams from matplotlib.artist import Artist from matplotlib.axes import Axes, subplot_class_factory from matplotlib.transforms import Affine2D,...