gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """Tests for :module:`flocker.node.gear`.""" from zope.interface.verify import verifyObject from twisted.trial.unittest import TestCase from ...testtools import random_name, make_with_init_tests from ..gear import ( IGearClient, FakeGearClient, Alread...
# -*- coding: utf-8 -*- # Copyright 2014 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 requi...
"""Automation using nox. """ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import glob import os import shutil import sys import nox sys.path.append(".") from tools.automation import release # isort:skip # noqa sys.path.pop() nox.options.reuse_existing...
import sys from django import forms from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import get_resolver from django.shortcuts import render_to_response, render from django.template import Context, RequestContext, TemplateDoesNotExist from django.views.debug import technical_500...
#!/usr/bin/env python3 # # Copyright (c) 2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # Lists all closes issues since a given date import argparse import sys import os import re import time import threading import requests args = None class Spinner: busy = False delay = 0.1 @staticm...
""" This script was customized to generate graphs from calcium imaging data in the AT1/MPO experiments. """ import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np np.set_printoptions(suppress=True) # don't show exponential notation import os import subprocess import sys import glob import s...
"""Manage release repository (not source repository).""" __all__ = [ 'BuilderImageDir', 'EnvsDir', 'ImageDir', 'PodDir', 'VolumeDir', 'XarDir', 'get_current_image_versions', 'merge_dict_of_sets', ] import collections from pathlib import Path import foreman from g1 import scripts from...
# -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <[email protected]> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) | This file contains the DAL support for many relational databases, including: - SQLite & SpatiaLite - MySQL - Postg...
# # 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...
"""A Script that tags your movie files. Run the script in a folder containing the mp4/mkv movie files with their filename as the movie's title. This script might seem a little messy and ugly and I know maybe there is better and effecient way to do some of the tasks. but I am unaware of them at the moment and am a beg...
"""Chalice deployer module. The deployment system in chalice is broken down into a pipeline of multiple stages. Each stage takes the input and transforms it to some other form. The reason for this is so that each stage can stay simple and focused on only a single part of the deployment process. This makes the code ...
# Copyright 2012 the V8 project authors. 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 of conditi...
# Copyright 2020 The gRPC 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 wri...
""" mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
# -*- coding: utf-8 -*- """ Django to Jinja ~~~~~~~~~~~~~~~ Helper module that can convert django templates into Jinja2 templates. This file is not intended to be used as stand alone application but to be used as library. To convert templates you basically create your own writer, add extra co...
import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class DisputeCloseBuyerTest(OpenBazaarTestFramework): def __init__(self): super().__init__() self.num_nodes = 3 def run_test(self): ...
# Copyright (c) 2010 Howard Hughes Medical Institute. # All rights reserved. # Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms. # http://license.janelia.org/license/jfrc_copyright_1_1.html import neuroptikon from os import path from neuro_object import NeuroObject from neurite i...
from pepnet import SequenceInput, Output, Predictor from pepnet.sequence_helpers import group_similar_sequences import numpy as np from sklearn.model_selection import LeaveOneGroupOut from keras.callbacks import LearningRateScheduler from keras.optimizers import RMSprop from helpers import to_ic50, from_ic50, shuffle...
# -*- coding: utf-8 -*- """Utilities for preprocessing sequence data. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import random import json from six.moves import range import six def pad_sequences(sequences, maxlen=None, dtype='i...
from . import cas from .alarm import Severity, Alarm import collections import operator import threading import time import sys import logging if sys.hexversion >= 0x02070000: from logging import NullHandler else: class NullHandler(logging.Handler): def emit(self, record): pass logging.getL...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
"""The data_access module contains the DataAccess class and some methods for managing transactions. """ import logging import time from contextlib import contextmanager from bidon.util import get_value __all__ = ["DataAccess", "RollbackTransaction", "Upsert", "transaction", "autocommit"] logger = logging.getLogger...
# coding: utf-8 # flake8: noqa """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: [email protected] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import __version...
import asyncio import json import os import traceback import re from .exceptions import ExtractionError from .utils import get_header, md5sum class BasePlaylistEntry: def __init__(self): self.filename = None self.filename_thumbnail = None self._is_downloading = False self._waiting...
# 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...
# -*- coding: utf-8 -*- """The parser mediator.""" import copy import datetime import time from dfvfs.lib import definitions as dfvfs_definitions from plaso.containers import warnings from plaso.engine import path_helper from plaso.engine import profilers from plaso.lib import errors from plaso.parsers import logger...
""" Standard tag definitions. """ from ..utils import make_string, make_string_uc # Interoperability tags INTEROP_TAGS = { 0x0001: ('InteroperabilityIndex', ), 0x0002: ('InteroperabilityVersion', ), 0x1000: ('RelatedImageFileFormat', ), 0x1001: ('RelatedImageWidth', ), 0x1002: ('RelatedImageLength...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import unicode_literals from datetime import date from decimal import Decimal from django.db.models.query_utils import InvalidQuery from django.test import TestCase, skipUnlessDBFeature from .models import Author, Book, BookFkAsPk, Coffee, FriendlyAuthor, Reviewer class RawQueryTests(TestCase): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Stats Server: Default Bind IP: localhost Default Bind Port: 5090 metric data should be be a json string. Mandator keys: 'metric_name' 'metric_type' For Metric type counter: mandator key: 'count' """ import sys import os import time import signal import socket imp...
"""\ NAME qmmd.py SYNOPSIS First principles molecular dynamics module DESCRIPTION This is an experimental module for ab initio MD calculations which makes use of numerical integrators to move nuclei in response to forces computed through analytic derivatives of the total energy e...
# # 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 # cardinal_pythonlib/modules.py """ =============================================================================== Original code copyright (C) 2009-2021 Rudolf Cardinal ([email protected]). This file is part of cardinal_pythonlib. Licensed under the Apache License, Version 2.0 (the...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program 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, either version 3 of the Lic...
# 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, ...
""" A client library for working with Box's v2 API. For extended specs, see: http://developers.box.com/docs/ """ from datetime import datetime from httplib import NOT_FOUND, PRECONDITION_FAILED, CONFLICT, UNAUTHORIZED import simplejson import time from urllib import urlencode import urlparse import requests class E...
#!/usr/bin/env python # coding: utf-8 import random import time import math import pprint pp = pprint.PrettyPrinter(indent=4, width=200).pprint import libtcodpy as libtcod from planet import Planet from sector import Sector from nebula import Nebula from starfield import Starfield from asteroid import Asteroid class...
"""Config flow for Apple TV integration.""" from ipaddress import ip_address import logging from random import randrange from pyatv import exceptions, pair, scan from pyatv.const import Protocol from pyatv.convert import protocol_str import voluptuous as vol from homeassistant import config_entries from homeassistant...
""" ******************************************************************************** * Name: ChannelInputChunk * Author: Nathan Swain * Created On: July 23, 2013 * Copyright: (c) Brigham Young University 2013 * License: BSD 2-Clause ******************************************************************************** """ fr...
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase class FrozensetTests(TranspileTestCase): def test_creation(self): # Empty dict self.assertCodeExecution(""" x = frozenset() print(x) x = frozenset(...
''' Code generator for sprite sheets. ''' import genutil as util from util import png import os Version = 6 #------------------------------------------------------------------------------- class Sprite : def __init__(self) : self.name = '' self.x = 0 self.y = 0 self.w = 0 ...
#!/usr/bin/python2 from __future__ import print_function import unittest import logging logging.basicConfig(level=logging.INFO) import datetime import gzip import os # own modules from Timeseries import Timeseries as Timeseries from TimeseriesArray import TimeseriesArray as TimeseriesArray from TimeseriesArrayStats imp...
# 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...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from WebIDL import IDLInterface, IDLExternalInterface autogenerated_comment = "/* THIS FILE IS AUTOGENERATED - DO NOT E...
# # (c) Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 ap...
""" sentry.testutils.cases ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ( 'TestCase', 'TransactionTestCase', 'APITestCase', 'AuthProviderTestCase', 'RuleTest...
import pytest from datetime import datetime from ... import api from ... import utils from ...api import InvalidEntry, MissingEntry @pytest.fixture def gradebook(request): gb = api.Gradebook("sqlite:///:memory:") def fin(): gb.close() request.addfinalizer(fin) return gb @pytest.fixture def a...
import random import threading import os from sqlalchemy.sql.expression import and_, select from sqlalchemy.sql.functions import func from gengine.app.model import t_subject_device, t_subject_messages from gengine.base.model import update_connection from gengine.base.settings import get_settings from gengine.base.uti...
# 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-2021 The Matrix.org Foundation C.I.C. # # 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# -*- coding: utf-8 -*- from contextlib import contextmanager import sys from . import cv_types as cv @contextmanager def fwopen(filename=None): f = open(filename, 'w') if filename else sys.stdout yield f if filename: f.close() class CVML(): def __new__(cls, file_name=None, markup=None): ...
#-*- coding: utf-8 -*- import numpy as np import matplotlib #matplotlib.use('GTKAgg') import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.image import NonUniformImage import matplotlib.colors as colo from dear.spectrum import cqt, dft, auditory, SpectrogramFile from dear.analysis import MFCCs ...
""" A library written in CUDA Python for generating reduction kernels """ from numba.np.numpy_support import from_dtype _WARPSIZE = 32 _NUMWARPS = 4 def _gpu_reduce_factory(fn, nbtype): from numba import cuda reduce_op = cuda.jit(device=True)(fn) inner_sm_size = _WARPSIZE + 1 # plus one to avoid SM ...
# Copyright 1999-2000 by Jeffrey Chang. All rights reserved. # Copyright 2008 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Provides code to access NCB...
''' This example creates plots for all silicon properties available in Scarce. ''' import numpy as np import matplotlib.pylab as plt from scarce import silicon def plot_depletion_depth(): V_bias = np.linspace(0, 100., 1000.) plt.clf() # Plot depletion depth for different bias voltages for n_eff in [...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
from __future__ import absolute_import from __future__ import with_statement from mock import Mock from celery import abstract from celery.tests.utils import AppCase, Case class test_Component(Case): class Def(abstract.Component): name = "test_Component.Def" def test_components_must_be_named(self...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# 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/env python # -- Content-Encoding: UTF-8 -- """ Tests the log service :author: Thomas Calmant """ # Pelix import pelix.framework import pelix.misc from pelix.ipopo.constants import use_ipopo from pelix.misc.log import LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR # Standard library import logging import sys ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python # # Copyright (c) 2010-2013, GhostBSD. 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. Redistribution's of source code must retain the above copyright # notice, thi...
import pandas as pd import numpy as np import CGAT.IOTools as IOTools import random import itertools from CGATPipelines.Pipeline import cluster_runnable import json import decimal from sklearn.cluster import KMeans import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.patches as mpatches @clust...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A class for managing the Linux cgroup subsystem.""" from __future__ import print_function import errno import os import signal import time from ...
# Copyright 2020 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from __future__ import print_function, absolute_import, division, unicode_literals import os import numpy as np import matplotlib.transforms as mtransforms from barak.absorb import findtrans, readatom from barak.io import readtabfits, readtxt, parse_config from barak.utilities import adict, get_data_path, between fr...
""" These method recursively evaluate the SPARQL Algebra evalQuery is the entry-point, it will setup context and return the SPARQLResult object evalPart is called on each level and will delegate to the right method A rdflib.plugins.sparql.sparql.QueryContext is passed along, keeping information needed for evaluation...
"""Output or upload a TestRun proto for mfg-inspector.com MULTIDIM_JSON schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Multi-dimensional test parameter", "type": "object", "properties": { "outcome": {"enum": ["PASS", "FAIL", "ERROR"]}, "name": {"type": "string"}, "dimensi...
# Copyright (c) 2015 Red Hat, 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 ...
#!/bin/env python # # # This file is part Protein Engineering Analysis Tool (PEAT) # (C) Copyright Jens Erik Nielsen, University College Dublin 2003- # All rights reserved # # # Rewritten by D Farrell, Jan 2009 # import cgi import sys,os, string, types os.environ['MPLCONFIGDIR']='/tmp' from PEATDB.Base import PDatabas...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import os import serial from time import sleep from time import time import sys import json import argparse from ksp_console import * import signal #port = "COM4" port = "/dev/ttyS6" ser = "" args = "" class Telemetry: def __init__(self, conn, args): ...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2006, Frank Scholz <[email protected]> import os, stat import tempfile import shutil import time import re from datetime import datetime import urllib from sets import Set import mimetypes mime...
#!/bin/py # # interpolate over data field with 2d polynomial fit # # fit a 2D, 3rd order polynomial to data # estimate the 16 coefficients using all of your data points. # # http://stackoverflow.com/questions/18832763/drawing-directions-fields # # import numpy as np import matplotlib matplotlib.use('Agg') import iter...
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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 copyright n...
# Copyright 2016 IBM Corp. # # 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 agree...
"""Test the bootstrapping.""" # pylint: disable=too-many-public-methods,protected-access from unittest import mock import threading import logging import voluptuous as vol from homeassistant import bootstrap, loader import homeassistant.util.dt as dt_util from homeassistant.helpers.config_validation import PLATFORM_S...
#!/usr/bin/python """ Copyright 2013 The Trustees of Princeton University 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 os import os.path as op import shutil import logging from . import conf, errors, helper logger = logging.getLogger(__name__) names_rows_stability = [ ['dg', 1], # totalEnergy ['backbone_hbond', 2], ['sidechain_hbond', 3], ['van_der_waals', 4], ['electrostatics', 5], ['solvation_polar'...
'''eventgui.py -- gui for programstalta.py usage: python eventgui.py [options] options: -h print this ''' version = "0.55" lastchangedate = "2014-12-14" import sys import getopt import posixpath as pp import pprint from Tkinter import * # from ttk import * import tkFont import tkFileDialog import tk...
import sys import re import os import warnings import glob import numpy as np import openmc import openmc.checkvalue as cv class StatePoint(object): """State information on a simulation at a certain point in time (at the end of a given batch). Statepoints can be used to analyze tally results as well as ...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import argparse import copy from datetime import datetime from functools import partial import json import os import p...
import os import sys import pickle import copy import warnings import platform import textwrap from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var from numpy._build_utils.apple_accelerate import ( uses_accelerate_framework, ge...
# import time import numpy as np # from pycqed.analysis import analysis_toolbox as a_tools # import pycqed.analysis_v2.base_analysis as ba # import dataprep for tomography module # import tomography module # using the data prep module of analysis V2 # from pycqed.analysis_v2 import tomography_dataprep as dataprep from ...
""" Allow to setup simple automation rules via the config file. For more details about this component, please refer to the documentation at https://home-assistant.io/components/automation/ """ import asyncio from functools import partial import logging import os import voluptuous as vol from homeassistant.setup impo...
# -*- coding: utf-8 -*- """ bbofuser: apps.v1api.views FILE: ogets Created: 9/27/15 7:04 PM """ __author__ = 'Mark Scrimshire:@ekivemark' import requests from xml.dom import minidom from oauth2_provider.decorators import protected_resource from oauth2_provider.models import AbstractApplication, AccessToken from o...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# 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...
################################################################# # seGeometry.py # Originally from DirectGeometry.py # Altered by Yi-Hong Lin, [email protected], 2004 # # We didn't change anything essential. # Just because we customized the seSession from DirectSession, # So we need related files can follow the ...
""" grid search codes for machine learning """ from sklearn import cross_validation, cross_validation, grid_search, linear_model, svm, metrics import numpy as np import pandas as pd from operator import itemgetter import jutil import j3x.jpyx from jsklearn import binary_model def gs_Lasso( xM, yV, alphas_log = (-1, ...
""" The `fluent_contents` package defines two models, for storing the content data: * :class:`Placeholder` * :class:`ContentItem` Secondly, there are a few possible fields to add to parent models: * :class:`PlaceholderField` * :class:`PlaceholderRelation` * :class:`ContentItemRelation` Finally, to exchange template...
# # Copyright 2015 Quantopian, 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 wr...
from __future__ import absolute_import, unicode_literals ###################### # CARTRIDGE SETTINGS # ###################### # The following settings are already defined in cartridge.shop.defaults # with default values, but are common enough to be put here, commented # out, for convenient overriding. # Sequence of ...
# 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 unittest from mock import patch, Mock import SocketServer import serial import socket from pymodbus3.device import ModbusDeviceIdentification from pymodbus3.server.sync import ModbusBaseRequestHandler from pymodbus3.server.sync import ModbusSingleRequestHandler from pymodbus3.server.sync import ModbusConnectedRe...
#!/usr/bin/env python # Copyright 2013 IBM Corp. # # 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 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 applicable law...
#!/usr/bin/env python from pynes.instruction import * from pynes.addressmode import * def create_instruction(func, mode): """creates a dynamic type using "func" and "mode" as base classes""" return type(func.__name__ + mode.__name__, (func, mode), {}) instruction_map = { # ADC instructions 0x69: creat...
''' Cobra Distributed Event subsystem. ''' import json import time import socket import struct import logging import itertools import threading import collections import envi.threads as e_threads logger = logging.getLogger(__name__) class CobraEventCore: def __init__(self): self._ce_chanids = itertools...