gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import with_statement import copy import threading try: import simplejson as json except ImportError: import json from types import GeneratorType from .exceptions import BulkOperationException __author__ = 'a...
import numpy as NP import h5py import ast import warnings def recursive_find_notNone_in_dict(inpdict): """ ---------------------------------------------------------------------------- Recursively walk through a dictionary and reduce it to only non-None values. Inputs: inpdict [dictionary] In...
# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import datetime from vilya.libs.store import mc, cache from vilya.libs.store import store MC_KEY_TAG_TYPE_IDS_BY_TAG_ID = "code:tags:type_ids:by:tag_id:%s" MC_KEY_TAG_IDS_BY_TARGET_ID_AND_TYPE = "code:tag_ids:by:target_id:%s:type:%s" ONE_D...
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
''' Created on 11 mrt. 2013 @author: sander ''' from ipaddress import ip_address from pylisp.application.lispd.address_tree.authoritative_container_node import AuthContainerNode from pylisp.application.lispd.address_tree.base import AbstractNode from pylisp.application.lispd.address_tree.map_server_node import MapServ...
import shutil from unittest import TestCase import numpy as np import scipy.linalg as sl import scipy.optimize as so from PTMCMCSampler import PTMCMCSampler class GaussianLikelihood(object): def __init__(self, ndim=2, pmin=-10, pmax=10): self.a = np.ones(ndim) * pmin self.b = np.ones(ndim) * pm...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# Copyright 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...
# Copyright 2014 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
#!/usr/bin/python # Copyright (C) 2015, WSID # 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, publ...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np import unittest import faiss import tempfile import os import io import sys import pickle from multiprocessing.dummy import...
# 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...
# Copyright 2011 OpenStack Foundation # Copyright 2012 Justin Santa Barbara # 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/l...
import re from tests.base import IntegrationTest from tasklib import local_zone from datetime import datetime def current_year(): return local_zone.localize(datetime.now()).year def current_month(): current_month_number = local_zone.localize(datetime.now()).month months = ["January", "February", "March...
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Mortar Data # # 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...
import time import testify as T from pushmanager.core.settings import Settings from pushmanager.testing.testservlet import TemplateTestCase class PushTemplateTest(TemplateTestCase): authenticated = True push_page = 'push.html' push_status_page = 'push-status.html' push_info_page = 'push-info.html' ...
#!/usr/bin/env python # The MIT License (MIT) # Copyright (c) 2014 xaedes # 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 # u...
import theano import theano.tensor as T import lasagne as nn from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams _srng = RandomStreams() class TiedDropoutLayer(nn.layers.Layer): """ Dropout layer that broadcasts the mask across all axes beyond the first two. """ def __init__(self, ...
#!/usr/bin/env python # vim: et : # # This is run by Travis-CI after an upgrade to verify that the data loaded by # upgrade-before.py has been correctly updated in the upgrade process. For # example, new columns might have been added and the value of those columns # should be automatically updated. This test should be ...
import ConfigParser import logging import subprocess import sys import uuid from twisted.internet import defer from twisted.names import srvconnect from twisted.python import log as txlog from twisted.trial import unittest from twisted.words.protocols.jabber import client from twisted.words.protocols.jabber import erro...
# Author: Nikolay Mayorov <[email protected]> # License: 3-clause BSD from __future__ import division import numpy as np from scipy.sparse import issparse from scipy.special import digamma from ..externals.six import moves from ..metrics.cluster.supervised import mutual_info_score from ..neighbors import NearestNeig...
#!/usr/bin/python3 """ arith_parse.py: Parse shell-like and C-like arithmetic. """ import sys import tdop from tdop import Node, CompositeNode # # Null Denotation -- token that takes nothing on the left # def NullConstant(p, token, bp): return Node(token) def NullParen(p, token, bp): """ Arithmetic grouping "...
# Copyright 2012 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# 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 2011 OpenStack 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 b...
# -*- coding: utf-8 -*- from anima.ui.lib import QtCore, QtWidgets class TaskDashboardWidget(QtWidgets.QWidget): """A widget that displays task related information""" def __init__(self, task=None, parent=None, **kwargs): self._task = None self.parent = parent super(TaskDashboardWid...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # 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. Redistributions of source code must retain the above copyri...
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXX X XXXXXXX XXXX XXX XXXXX XXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXX...
import FWCore.ParameterSet.Config as cms #--------------------------------------------------------------------------------------------------- # M A I N #--------------------------------------------------------------------------------------------------- # create the process pro...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models # flake8: noqa class Migration(DataMigration): def forwards(self, orm): """Delete duplicate action items for post event metrics. This affects only the events with end da...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import pytest from marshmallow.compat import PY2 from marshmallow import validate, ValidationError @pytest.mark.parametrize('valid_url', [ 'http://example.org', 'https://example.org', 'ftp://example.org', 'ftps://example.org', ...
"""payu.manifest =============== Provides an manifest class to store manifest data, which uses a subclassed yamanifest PayuManifest class :copyright: Copyright 2011 Marshall Ward, see AUTHORS for details. :license: Apache License, Version 2.0, see LICENSE for details. """ # Python3 preparation from _...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
import time import datetime import serial import logging from pyoperant.interfaces import base_ from pyoperant import utils, InterfaceError logger = logging.getLogger(__name__) # TODO: Smart find arduinos using something like this: http://stackoverflow.com/questions/19809867/how-to-check-if-serial-port-is-already-ope...
u""" Genetic Algrithm. """ import numpy as np from random import random import copy from multiprocessing import Process, Queue from math import exp,cos,sin,log large= 1e+10 tiny = 1e-10 init_murate= 0.06 maxid= 0 def test_rosen(var,*args): import scipy.optimize as opt return opt.rosen(var) def test_func(var...
# # 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...
# # 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...
"""Check and Setup Phylotyper Ontology and Subtyping Schemes Example: $ python ontolog.py -s stx1 """ import logging import os from rdflib import Graph, Literal, XSD from modules.phylotyper.exceptions import ValuesError, DatabaseError from middleware.graphers.turtle_utils import generate_uri as gu from middlew...
# This document is part of Acronym # https://github.com/geowurster/Acronym # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
""" Refactored helper methods for working with the database. This is a work in progress. You should probably be looking at ui.voyager until this work is more fully developed. """ import re import pymarc import logging from PyZ3950 import zoom from django.db import connections from django.conf import settings # oracl...
# 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...
from __future__ import print_function import sys import logging from collections import namedtuple from .tabulate import tabulate TableInfo = namedtuple("TableInfo", ['checks', 'relkind', 'hasindex', 'hasrules', 'hastriggers', 'hasoids', 'tablespace', 'reloptions', 'reloftype', 'relpersistence']) log = logging.getLo...
# pylint: skip-file # flake8: noqa class OCcsr(OpenShiftCLI): ''' Class to wrap the oc adm certificate command line''' kind = 'csr' # pylint: disable=too-many-arguments def __init__(self, nodes=None, approve_all=False, service_account=None, ...
import mock import unittest from .helper import _ResourceMixin class ReceiptTest(_ResourceMixin, unittest.TestCase): def _getTargetClass(self): from .. import Receipt return Receipt def _getCollectionClass(self): from .. import Collection return Collection def _getLazyC...
#!/usr/bin/env python # Copyright 2018 The Clspv 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 r...
import inspect from inspect import getsource import os.path as op from pkgutil import walk_packages import re import sys from unittest import SkipTest import pytest import mne from mne.utils import run_tests_if_main, requires_numpydoc, _pl public_modules = [ # the list of modules users need to access for all fun...
# -*- coding: utf-8 -*- """ OSM Deviation Finder - Web Interface ~~~~~~~~~~~~~~~~~~~~ Implementation of a web interface for the OSM Deviation Finder library. It uses the flask microframework by Armin Ronacher For more information see https://github.com/mitsuhiko/flask/ To interact with the Ge...
"""Device, context and memory management on PyCUDA and scikit-cuda. Chainer uses PyCUDA facilities (with very thin wrapper) to exploit the speed of GPU computation. Following modules and classes are imported to :mod:`cuda` module for convenience (refer to this table when reading chainer's source codes). =============...
"""Support for QNAP NAS Sensors.""" from __future__ import annotations from datetime import timedelta import logging from qnapstats import QNAPStats import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, SensorEntity, SensorEntityDescription, ) from homeassistant.const im...
""" Support for interfacing to the Logitech SqueezeBox API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.squeezebox/ """ import logging import asyncio import urllib.parse import json import aiohttp import async_timeout import voluptuous a...
#!/usr/bin/python # -*- coding: iso-8859-15 -*- # ========================================================================== # Copyright (C) 2016 Dr. Alejandro Pina Ortega # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_tests.webgl_conformance_expectations import WebGLConformanceExpectations # See the GpuTestExpectations class for documentation. class WebGL2Con...
from __future__ import absolute_import, unicode_literals import copy import os import re import sys from io import BytesIO from pprint import pformat from django.conf import settings from django.core import signing from django.core.exceptions import DisallowedHost, ImproperlyConfigured from django.core.files import u...
########################################################################## # # Copyright (c) 2017, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
""" BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21). Adapted from wsgiref.simple_server: http://svn.eby-sarna.com/wsgiref/ This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. Don't use it for production use. """ from BaseHTTPSe...
from __future__ import unicode_literals from django import forms from django.contrib import admin from django.contrib.contenttypes.admin import GenericStackedInline from django.core import checks from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, ignore_warnings, override_setting...
# -*- coding: utf-8 -*- # # libuv documentation documentation build configuration file, created by # sphinx-quickstart on Sun Jul 27 11:47:51 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
""" Tests for win_file execution module """ import pytest import salt.modules.win_file as win_file import salt.utils.win_dacl as win_dacl from salt.exceptions import CommandExecutionError from tests.support.mock import patch pytestmark = [ pytest.mark.windows_whitelisted, pytest.mark.skip_unless_on_windows, ] ...
# Copyright 2015 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. # pylint: disable=unused-argument import six import mock from pyfakefs import fake_filesystem_unittest from py_utils import cloud_storage import dependenc...
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from copy import copy, deepcopy from warnings import catch_warnings, simplefilter import numpy as np import pytest from pandas.compat import PY3, range, zip from pandas.core.dtypes.common import is_scalar import pandas as pd from pandas import DataFrame, Mu...
# 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...
""" --Juana Valeria Hurtado Rincon [email protected] Signal Processing and Pattern Recognition Research Group Universidad Nacional de colombia """ from numpy import fft import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui import numpy as np from emokit import emotiv import ge...
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
import PyQt4.QtGui as QtGui import PyQt4.QtCore as QtCore import xlrd import xlwt import functools import data_mgmt_err_window import data_writer_new import cw_tooltips import pickle import global_vars import webbrowser import os from database_search import fx_window, gen_tag_window, genre_window from xlutils.copy impo...
# Copyright 2016 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 or agreed to in writing, ...
import numpy as np from scipy.signal import find_peaks_cwt from scipy.optimize import curve_fit, minimize_scalar # PEAKHUNT RANGE peakhunt_range = 0.40 # HELPER FUNCTIONS def default(): return labspec_fit def methods(): return {'gauss_fit': {'function': gauss_fit, 'nam...
import copy import itertools import operator import string import warnings import cupy from cupy._core import _accelerator from cupy import _util from cupy.linalg._einsum_opt import _greedy_path from cupy.linalg._einsum_opt import _optimal_path try: import cupy_backends.cuda.libs.cutensor # NOQA from cupy i...
""" Numba-specific errors and warnings. """ import abc import contextlib import os import sys import warnings import numba.core.config import numpy as np from collections import defaultdict from numba.core.utils import chain_exception from functools import wraps from abc import abstractmethod # Filled at the end __a...
#!/usr/bin/env python """ Usage: $0 PATIENT_ID VCF CREDENTIALS_FILE SERVER_NAME Upload the VCF file as an attachment for the given patient. For example: $0 P0000102 path/to/file.vcf path/to/credentials.txt server_name credentials.txt should have one line with the form: username:password """ from __future_...
from mock import Mock, patch from dynpool import DynamicPoolResizer def test_no_threads_and_no_conns_grows_minthreads(): min_threads = 5 pool = Mock(min=min_threads, max=30, size=0, idle=0, qsize=0) resizer = DynamicPoolResizer(pool, minspare=5, maxspare=10) assert resizer.grow_value == min_threads ...
import sys import numpy as np import wx # from python praxis book # import wx.lib.newevent s 1076 # from threading import Thread s1078 from jumeg.jumeg_base import JuMEG_Base_Basic from jumeg.tsv.jumeg_tsv_wx_glcanvas import JuMEG_TSV_Plot2D import jumeg.tsv.jumeg_tsv_wx_utils as jwx_utils from jumeg...
# # localDocker.py - Implements the Tango VMMS interface to run Tango jobs in # docker containers. In this context, VMs are docker containers. # import random import subprocess import re import time import logging import threading import os import sys import shutil import config from tangoObjects import ...
from __future__ import unicode_literals from future.builtins import int, range, str from datetime import date, datetime from os.path import join, split from uuid import uuid4 from django import forms from django.forms.extras import SelectDateWidget from django.core.files.storage import FileSystemStorage from django.c...
# -*- coding: utf-8 -*- import os import gc import numpy as np from PIL import Image import json from keras.optimizers import SGD from keras.layers import Input, merge, ZeroPadding2D from keras.layers.core import Dense, Dropout, Activation from keras.layers.convolutional import Conv2D from keras.layers.pooling import ...
# -*- coding: utf-8 -*- """ Feature correlation analysis Created on Sun Jan 31 21:09:18 2016 @author: kok """ import numpy as np from FeatureUtils import * from Crime import Tract from foursquarePOI import getFourSquarePOIDistribution, getFourSquarePOIDistributionHeader from scipy.stats import pearsonr import ma...
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi ([email protected]), University of Szeged # Copyright (C) 2011 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
# coding=utf-8 from . import messages from . import models from google.appengine.ext import ndb from google.appengine.ext.ndb import msgprop from google.appengine.ext import blobstore import appengine_config import datetime import os import re import webapp2 DOWNLOAD_URL_FORMAT = 'https://www.googleapis.com/drive/v3/f...
#!/usr/bin/env python3 # dinkum/sudoku/test_puzzles.py ''' Provides a test suite of sudoku puzzles. The class SolvedPuzzle will contain: name of the input board input string for the input board constructed input Board answer Board string output of answer Board all_known_puzzles is a [] of all ...
""" Cycler ====== Cycling through combinations of values, producing dictionaries. You can add cyclers:: from cycler import cycler cc = (cycler(color=list('rgb')) + cycler(linestyle=['-', '--', '-.'])) for d in cc: print(d) Results in:: {'color': 'r', 'linestyle': '-'} {'color'...
""" Base class for freezing scripts into executables. """ import datetime import distutils.sysconfig import imp import marshal import os import shutil import socket import stat import struct import sys import time import zipfile import cx_Freeze __all__ = [ "ConfigError", "ConstantsModule", "Executable", "Freezer" ]...
import errno import json import os import subprocess import sys from collections import defaultdict MISC_XML = """<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ProjectRootManager" version="2" languageLevel="%(java_language_level)s" assert-keyword="true" jdk-15="t...
# -*- 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...
# ----------------------------------------------------------- # Copyright (C) 2008 StatPro Italia s.r.l. # # StatPro Italia # Via G. B. Vico 4 # I-20123 Milano # ITALY # # phone: +39 02 96875 1 # fax: +39 02 96875 605 # # This program is distributed in the hope that it will be # useful, but WITHOUT ANY WARRA...
""" Processing various file types for MAGeCK count """ from __future__ import print_function import sys import math import logging import string def mageckcount_gini(x): ''' Return the Gini index of an array Calculation is based on http://en.wikipedia.org/wiki/Gini_coefficient ''' xs=sorted(x) n=len(xs)...
# 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...
import copy import inspect import os from six.moves import http_client as httplib import contextlib2 import mock import pytest import yaml from vcr.cassette import Cassette from vcr.errors import UnhandledHTTPRequestError from vcr.patch import force_reset from vcr.stubs import VCRHTTPSConnection def test_cassette_l...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# 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...
# # 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 # ...
""" ## SCRIPT HEADER ## Created By : Muhammad Fredo Email : [email protected] Start Date : 16 Sep 2020 Info : """ import copy import pymel.core as pm from . import scene_info, naming def clean_unknown_plugins(): """Remove all unknown plugins expect nodes that exist in scene. http:...
# coding=utf-8 import os import re import sys import functools import threading import cherrypy import json import subprocess import traceback import webbrowser import argparse import shlex from mako.template import Template from uuid import uuid4 import telenium from telenium.client import TeleniumHttpClient from ws4...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
# -*- test-case-name: txdav.caldav.datastore.test.test_file -*- ## # Copyright (c) 2010-2015 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.apa...
import fnmatch import six import yaml from conans.errors import ConanException from conans.util.sha import sha1 _falsey_options = ["false", "none", "0", "off", ""] def option_wrong_value_msg(name, value, value_range): """ The provided value is not among the range of values that it should be """ re...