gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Main functions for the Layout Test Analyzer module.""" import csv from datetime import datetime import optparse import os impor...
import re import os import filecmp import textwrap import sys from os.path import abspath, join, curdir, pardir from nose.tools import assert_raises from mock import patch from pip.util import rmtree, find_command from pip.exceptions import BadCommand from tests.test_pip import (here, reset_env, run_pip, pyversion, ...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from typing import Dict, Callable, Optional import logging import ray from ray.tune.trainable import Trainable from ray.tune.logger import Logger, LoggerCallback from ray.tune.result import TRAINING_ITERATION, TIMESTEPS_TOTAL from ray.tune.trial import Trial from ray.util.annotations import Deprecated from ray.util.ml...
# -*- coding: utf-8 -*- # EFILTER Forensic Query Language # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import randn, zeros from scipy import random as rd, array from random import choice, random, gauss, shuffle, sample from numpy import ndarray from pybrain.optimization.populationbased.evolution import Evolution from pybrain.optimization.optimizer import ContinuousOpt...
import warnings import numpy as np import numpy.linalg as la from scipy import sparse from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils....
# -*- coding: utf-8-*- """ The Mic class handles all interactions with the microphone and speaker. """ import logging import tempfile import wave import audioop import pyaudio import alteration import jasperpath class Mic: speechRec = None speechRec_persona = None def __init__(self, speaker, passive...
from sympy import ( Symbol, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, log, polygamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin, cos, O, cancel, lowergamma, exp, erf, beta, exp_polar, harmonic, zeta, factorial) from sympy.core.function import ArgumentIndexError from sympy.utilit...
#VERSION: 1.01 #AUTHORS: Bruno Barbieri (brunorex@gmail.com) # 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 notice, # this list of conditions ...
""" Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification # noqa: E501 The version of the OpenAPI document: 1.1.2-pre.0 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from swaggyjenkins.m...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# 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...
""" The various classes that launch external programs to view files """ import plugins, os from .. import guiplugins from string import Template from copy import copy import subprocess class FileViewAction(guiplugins.ActionGUI): def __init__(self, *args, **kw): self.performArgs = [] guiplugins.Ac...
# Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
import numpy as np import pytest import mbuild as mb from mbuild.utils.geometry import calc_dihedral from mbuild.utils.io import get_fn class BaseTest: @pytest.fixture(autouse=True) def initdir(self, tmpdir): tmpdir.chdir() @pytest.fixture def ethane(self): from mbuild.lib.molecules ...
try: set except NameError: from sets import Set as set from django import template from django.template.base import TOKEN_BLOCK from django.http import Http404 from django.core.paginator import Paginator, InvalidPage from django.conf import settings register = template.Library() DEFAULT_PAGINATION = getattr(...
# Copyright 2017 Battelle Energy Alliance, 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 t...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import BadRequest f...
import pytest, py, sys, os from _pytest import runner, main from py._code.code import ReprExceptionInfo class TestSetupState: def test_setup(self, testdir): ss = runner.SetupState() item = testdir.getitem("def test_func(): pass") l = [1] ss.prepare(item) ss.addfinalizer(l.po...
#!/usr/bin/env python #!/usr/bin/env python import numpy as np import pylab as pl import sys,string import os import misopy from misopy.sashimi_plot import sashimi_plot as ssp import subprocess import multiprocessing import time import subprocess import random from pyPdf import PdfFileReader, PdfFileWriter import argp...
# -*- coding: ibm850 -*- template_typed = """ #ifdef TYPED_METHOD_BIND template<class T $ifret ,class R$ $ifargs ,$ $arg, class P@$> class MethodBind$argc$$ifret R$$ifconst C$ : public MethodBind { public: $ifret R$ $ifnoret void$ (T::*method)($arg, P@$) $ifconst const$; #ifdef DEBUG_METHODS_ENABLED virtual Varian...
# # Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. # """ VNC service management for kubernetes """ import uuid from vnc_api.vnc_api import * from config_db import * from kube_manager.common.kube_config_db import NamespaceKM from kube_manager.common.kube_config_db import NetworkPolicyKM from vnc_kuber...
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
#!/usr/bin/env python # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Usage: callstats.py [-h] <command> ... Optional arguments: -h, --help show this help message and exit Commands: run ...
# -*- coding: utf-8 -*- # Copyright 2020 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...
# ----------------------------------------------------------------------- # Standalone and testing code import sys, struct try: import _idaapi except: print "Please try me from inside IDA" sys.exit(0) try: import pywraps pywraps_there = True print "Using pywraps" _idaapi.pyscv_init = pywr...
''' @description: This script creates plots on how predictive features are for persistence, and how this changes over time. Note: This script falls 'outside our pipeline', and is considerably hacky - we're pulling and postprocessing data on the fly. This script loads data according to [...]/code/vis...
# import libraries import random import numpy as np # Python Roulette libary class roulette: red = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36] black = [2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35] odd = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,...
# Copyright (c) 2016,2017 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Functionality that we have upstreamed or will upstream into matplotlib.""" from __future__ import division # See if we should monkey-patch Barbs for better pivot import matp...
# -*- coding: utf-8 -*- from djangocms_text_ckeditor.models import Text from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.cache import cache from django.core.management.base import CommandError from django.core.management import call_command from django.core.ur...
#!/usr/bin/env python # Copyright (c) 2011-2018, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Read RADOLAN and DX ^^^^^^^^^^^^^^^^^^^ Reading DX and RADOLAN data from German Weather Service .. autosummary:: :nosignatures: :toctree: generated/ read_dx rea...
# 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 agreed to in...
# 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 law or agreed to ...
# -*- coding: utf-8 -*- """ pygments.lexers.php ~~~~~~~~~~~~~~~~~~~ Lexers for PHP and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, default, us...
import os import xbmc, xbmcgui, mc import ConfigParser import common available_providers = ['Addic7ed', 'BierDopje', 'OpenSubtitles', 'SubsWiki', 'Subtitulos', 'Undertexter'] # Set some default values for the subtitles handling def register_defaults(): subtitle_provider("get", "default") subtitle_provider("ge...
from collections import OrderedDict from re import compile import pytest from nerodia.elements.html_elements import HTMLElement from nerodia.exception import LocatorException from nerodia.locators.button.selector_builder import SelectorBuilder from nerodia.locators.element.xpath_support import XpathSupport ATTRIBUTE...
# coding: utf-8 # In[19]: from __future__ import absolute_import from __future__ import print_function #from keras.datasets import cifar10 from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation, Flatten from keras.layers.c...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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 ...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import os import tarfile import zipfile from io import BytesIO from textwrap import dedent from pants.backend.python import target_types_rules as pytho...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import numpy as np import six from pymatgen.electronic_structure.core import Spin, Orbital from pymatgen.core.periodic_table import get_el_sp from pymatgen.co...
""" This module contains the spatial lookup types, and the get_geo_where_clause() routine for PostGIS. """ import re from decimal import Decimal from django.db import connection from django.conf import settings from django.contrib.gis.measure import Distance from django.contrib.gis.db.backend.util import SpatialOper...
"""Base and mixin classes for nearest neighbors""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output...
# Copyright 2013 the Neutrino authors (see AUTHORS). # Licensed under the Apache License, Version 2.0 (see LICENSE). import plankton class Method(object): def __init__(self, signature, syntax): self.signature = signature self.syntax = syntax class Signature(object): def __init__(self, params): se...
#!/usr/bin/env python import logging l = logging.getLogger("claripy.frontends.full_frontend") import sys import threading from .constrained_frontend import ConstrainedFrontend class FullFrontend(ConstrainedFrontend): _model_hook = None def __init__(self, solver_backend, timeout=None, track=False, **kwargs)...
from __future__ import absolute_import, unicode_literals import json from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.template.defaultfilters im...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'CMSPlugin.placeholder' db.delete_column('cms_cmsplugin', 'placeholder') ...
from __future__ import unicode_literals import operator import warnings from django.utils import six from haystack import connections, connection_router from haystack.backends import SQ from haystack.constants import REPR_OUTPUT_SIZE, ITERATOR_LOAD_PER_QUERY, DEFAULT_OPERATOR from haystack.exceptions import NotHandled ...
# # script.py # # this file is modified from python-moorecoinlib. # # distributed under the mit/x11 software license, see the accompanying # file copying or http://www.opensource.org/licenses/mit-license.php. # """scripts functionality to build scripts, as well as signaturehash(). """ from __future__ import absolute...
import json from urllib import quote_plus import urllib2 from flask import Flask from mock import Mock, ANY, MagicMock from shapely.geometry import Point import unittest2 as unittest from werkzeug.exceptions import NotFound from molly.apps.places.endpoints import PointOfInterestEndpoint, NearbySearchEndpoint, PointOf...
""" Example generation for the scikit learn Generate the rst files for the examples by iterating over the python example files. Files that generate images should start with 'plot' """ from time import time import os import shutil import traceback import glob import sys from StringIO import StringIO import cPickle im...
# Copyright 2020 The HuggingFace 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.0 # # Unless required by applicabl...
# 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 (c) 2016-2019 by Michal Sporna and contributors. See AUTHORS for more details. Some rights reserved. Redistribution and use in source and binary forms of the software as well as documentation, with or without modification, are permitted provided that the following conditions are met: * Redistributions...
# -*- coding: utf-8 -*- import urlparse import pymongo from modularodm import fields from framework.auth.core import _get_current_user from framework.auth.decorators import Auth from website.security import encrypt, decrypt from website.addons.base import ( AddonNodeSettingsBase, AddonUserSettingsBase, GuidFile,...
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
#!/usr/bin/env python # pylint: disable=R0902,R0912,R0913 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Les...
# Copyright 2020 Google LLC. 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...
# Copyright (c) 2011- The University of Notre Dame. # This software is distributed under the GNU General Public License. # See the file COPYING for details. """ cctools Makeflow log module """ from cctools.compat import map from cctools.error import raise_parser_error, ParserError from cctools.util import catch_...
from __future__ import absolute_import import functools from datetime import datetime, timedelta import mock import pytest import pytz from django.core import mail from sentry.app import tsdb from sentry.models import Project, UserOption from sentry.tasks.reports import ( DISABLED_ORGANIZATIONS_USER_OPTION_KEY, ...
import json from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.validators import ArrayMaxLengthValidator from django.core import checks, exceptions from django.db.models import Field, Lookup, Transform, IntegerField from django.utils import six from django.utils.translation import ...
import warnings from contextlib import contextmanager from django.contrib.auth import get_user_model from django.test.testcases import assert_and_parse_html class WagtailTestUtils: @staticmethod def create_test_user(): """ Override this method to return an instance of your custom user model...
# 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 (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
import py import pytest __version__ = '1.0dev2' def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--lf', action='store_true', dest="lf", help="rerun tests that failed at the last run") group.addoption('--cache', action='store_true', dest="showcache", help="...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2015, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistri...
import unittest from mako.lexer import Lexer from mako import exceptions from util import flatten_result, result_lines from mako.template import Template import re class LexerTest(unittest.TestCase): def test_text_and_tag(self): template = """ <b>Hello world</b> <%def name="foo()"> ...
""" The rechunk module defines: intersect_chunks: a function for converting chunks to new dimensions rechunk: a function to convert the blocks of an existing dask array to new chunks or blockshape """ from __future__ import absolute_import, division, print_function import math import heapq fro...
import binascii import datetime import os import hashlib from PIL import Image from django.db import models from django.core.files import File from django.core.files.base import ContentFile from django.core.files.storage import get_storage_class from django.utils.module_loading import import_string from django.utils.t...
import os from mpi4py import MPI from mpi4py.MPI import ANY_SOURCE import csv import sys import scipy.optimize as opt import scipy.stats as stat from operator import itemgetter import random import numpy as np import numpy.ma as ma import numpy.linalg as la pi = np.pi sin = np.sin cos = np.cos #######################...
# 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 # d...
import unittest import os import logging # https://docs.python.org/2/library/logging.html#logging-levels import sys sys.path.append( os.getcwd() ) sys.path.insert( 1, 'lib' ) #Pickup libs, rdflib etc., from shipped lib directory from api import extensionsLoaded, extensionLoadErrors from api import setInTestHarness, ge...
# Lint as: python2, python3 # 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 # ...
# -*- coding: utf-8 import json import logging import Queue import socket import sys import threading import traceback import urllib import warnings import httplib2 try: import cStringIO as StringIO except ImportError: import StringIO class WorkerThread(threading.Thread): def __init__(self, debug, debu...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# stdlib import os import re import requests import time import socket import urllib2 from collections import defaultdict, Counter, deque # project from checks import AgentCheck from config import _is_affirmative from utils.dockerutil import find_cgroup, find_cgroup_filename_pattern, get_client, MountException, set_do...
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 Compat.tagging.models import Tag, TaggedItem from Compat.tagging.utils import LINEAR, LOGARITHMIC register = Library() class TagsF...
import argparse, os, sys, traceback import arrow import hashlib import random import redis import requests from pyquery import PyQuery as PQ from twython import Twython TWITTER_CONSUMER_KEY = os.environ['TWITTER_CONSUMER_KEY'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS_TOKEN = os.en...
# -*- coding: utf-8 -*- """ werkzeug.contrib.fixers ~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module includes various helpers that fix bugs in web servers. They may be necessary for some versions of a buggy web server but not others. We try to stay updated with the status of the bug...
from handlers import host_post_start from handlers import host_pre_stop from handlers import _set_send_node_event_on_error_handler from handlers import build_persistent_event_tasks from handlers import build_wf_event_task def _get_nodes_instances(ctx, node_id): instances = [] for node in ctx.nodes: fo...
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ # Python, ctypes and types dependencies. import re from ctypes import addressof, byref, c_double, c_size_t from types import UnicodeType # GEOS-related dependencies. from django.contrib.gis.geos.coordseq impo...
"""This module is intended for solving recurrences or, in other words, difference equations. Currently supported are linear, inhomogeneous equations with polynomial or rational coefficients. The solutions are obtained among polynomials, rational functions, hypergeometric terms, or combinations of hypergeom...
import math from pandac.PandaModules import * from direct.interval.MetaInterval import Sequence, Parallel from direct.interval.FunctionInterval import Func from direct.interval.LerpInterval import LerpScaleInterval, LerpColorScaleInterval from direct.showbase.PythonUtil import bound from toontown.toon import ToonHead f...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
#!/usr/bin/env python import argparse import json import logging import locale import sys import cStringIO from struct import Struct import unicodecsv as csv from messytables import (any_tableset, headers_guess, headers_processor, offset_processor, type_guess, types_processor) from messytable...
# Python 3 standard library imports import collections import itertools import os import subprocess import tempfile import uuid # Third-party library imports import gmpy2 import networkx ################################################################################ def dict_append(d, k, v): if k in d: ...
#!/usr/bin/python # # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of sour...
# 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...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from PyQt4 import QtGui, QtCore from acq4.pyqtgraph import PlotWidget from acq4.devices.DAQGeneric import DAQGenericTaskGui from acq4.util.SequenceRunner import runSequence from acq4.pyqtgraph.functions import siFormat from acq4.pyqtgraph.WidgetGroup import WidgetGroup import taskTemplate from acq4.util.HelpfulExceptio...
# -*- coding: utf-8 -*- # # Copyright 2017 Simone Campagna # # 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...
""" Hash implementations for Numba types """ import math import numpy as np import sys import ctypes import warnings from collections import namedtuple import llvmlite.binding as ll import llvmlite.llvmpy.core as lc from llvmlite import ir from numba.core.extending import ( overload, overload_method, intrinsic, ...
# -*- coding: utf-8 -*- """celeryd .. program:: celeryd .. cmdoption:: -c, --concurrency Number of child processes processing the queue. The default is the number of CPUs available on your system. .. cmdoption:: -f, --logfile Path to log file. If no logfile is specified, `stderr` is used. .. cmdoption...
# Lint as: python3 # 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 ...
import os import sys import vtkAll as vtk import math import time import types import functools import numpy as np from ddapp import transformUtils from ddapp import lcmUtils from ddapp.timercallback import TimerCallback from ddapp.asynctaskqueue import AsyncTaskQueue from ddapp import objectmodel as om from ddapp imp...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014 Alex Forencich 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 righ...
"""Functions to plot on circle as for connectivity.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: Simplified BSD from itertools import cycle from functools import partial import ...