gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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 division
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
# Lots of different places that widgets could come from...
try:
from ipywidgets import interact, FloatSlider, IntSlider
except ImportError:
try:
from IPython.html.wid... | |
from abc import ABCMeta
from ConfigParser import NoOptionError, NoSectionError
from functools import partial
import logging
from lxml import etree, objectify
from lxml.builder import ElementMaker
import requests
from .config import production_config, sandbox_config, CONFIG_PATH
from . import namespaces
from .utils im... | |
# Copyright 2021 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 o... | |
import unittest
from custom_set import CustomSet
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
class CustomSetTest(unittest.TestCase):
def test_sets_with_no_elements_are_empty(self):
sut = CustomSet()
self.assertIs(sut.isempty(), True)
def test_sets_with_elemen... | |
#!/usr/local/bin/python2.7
from sys import exit, stdout, argv
from os import environ, system
environ['KERAS_BACKEND'] = 'tensorflow'
import numpy as np
import utils
import signal
from keras.layers import Input, Dense, Dropout, concatenate, LSTM, BatchNormalization, Conv1D, concatenate
from keras.models import Model ... | |
#!/usr/bin/python
""" dicom_dao
Data Access Objects for persisting PyDicom DataSet objects.
Currently we support couchdb through the DicomCouch class.
Limitations:
- Private tags are discarded
TODO:
- Unit tests with multiple objects open at a time
- Unit tests with rtstruct objects
- Support for mongodb (mong... | |
import datetime
from unittest.mock import patch
from django.apps import apps
from django.urls import reverse
from django.test import TestCase
from ditto.core.utils import datetime_from_str
from ditto.flickr import factories as flickrfactories
from ditto.lastfm import factories as lastfmfactories
from ditto.pinboard i... | |
# Copyright 2022 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 o... | |
import functools
import logging
from pathlib import Path
from typing import Callable, List, Set, Union # noqa: F401
from robot import __VERSION__
from robot.board import BoardList, TBoard
from robot.camera import Camera
from robot.game import GameMode, GameState, Zone, kill_after_delay
from robot.game_specific import... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from test_framework.test_framework import BitcoinTestFramework
from ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# FILE: Update.py
#
# This class provides mechanisms to update, reply to, retweet status
# messages and send direct messages
#
# Copyright by Author. All rights reserved. Not for reuse without
# express permissions.
#
import sys, time, json, logging
from sochi.twit... | |
from django import forms
from django.db import models
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db.models.fields import FieldDoesNotExist
from django.forms.models import ModelChoiceIterator
from django.utils.encoding import force_unicode
from django.db.models.fields.related im... | |
"""Support for AVM FRITZ!Box classes."""
from __future__ import annotations
from collections.abc import Callable, ValuesView
from dataclasses import dataclass, field
from datetime import datetime, timedelta
import logging
from types import MappingProxyType
from typing import Any, TypedDict
from fritzconnection import... | |
#!/usr/bin/env python
'''
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")... | |
""" Basic functions for manipulating 2d arrays
"""
import functools
from numpy.core.numeric import (
asanyarray, arange, zeros, greater_equal, multiply, ones,
asarray, where, int8, int16, int32, int64, intp, empty, promote_types,
diagonal, nonzero, indices
)
from numpy.core.overrides import set_array_... | |
# Copyright 2017 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... | |
# 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):
# Adding field 'GroupedMessage.score'
db.add_column(
'sentry_groupedmessage',
'score',
... | |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
import warnings
from shutil import which
import scipy
from pymatgen.core.structure import Structure
from pymatgen.electronic_structure.bandstructure import BandStructureSymmLine
from pym... | |
import re
from flask import jsonify
from flask_jwt_extended import JWTManager, jwt_required, create_access_token, get_jwt_identity
from flask_restplus import Resource, fields, reqparse
from .headers import app, api, databases
from .models import User, Bucket, Item
ns = api.namespace('api/v1', description='Bucketlist ... | |
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | |
# 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, s... | |
'''Stubs for patching HTTP and HTTPS requests'''
try:
import http.client
except ImportError:
pass
import logging
import six
from six.moves.http_client import (
HTTPConnection,
HTTPSConnection,
HTTPMessage,
HTTPResponse,
)
from six import BytesIO
from vcr.request import Request
from vcr.errors i... | |
# the module for the qt color_mixer plugin
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import (QWidget, QStackedWidget, QSlider, QGridLayout, QLabel)
from util import ColorMixer
class IntelligentSlider(QWidget):
''' A slider that adds a 'name' attribute and calls a callback
with 'name' as an argument to... | |
import base64
import functools
import os
from django.conf import settings
from django.contrib.auth import login, logout
from django.core import signing
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http import Http404, HttpResponseRedirect
from django.utils.encoding import for... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import itertools
import numpy as np
import pytest
from astropy import units as u
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from astropy.wcs.wcsapi import HighLevelWCSWrapper, Sl... | |
from bs4 import BeautifulSoup
from django.core.context_processors import csrf
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse_lazy
from django.http import Http404, HttpResponse, JsonResponse
from django.template.loader import render_to_string
from django.utils.translatio... | |
import os
import os.path as op
from flask import Flask, url_for
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.event import listens_for
from jinja2 import Markup
from flask_admin import Admin, form
from flask_admin.form import rules
from flask_admin.contrib import sqla
# Create application
app = Flask(__n... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 Nicira Networks, 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.apac... | |
#!/usr/bin/env python
import sys
from datetime import datetime
import time
import array
import struct
import os
try:
import serial
except:
print "This tool needs PySerial, but it was not found"
sys.exit(1)
class FT900Bootloader:
def __init__(self, ser):
ser.setDTR(1)
ser.setRTS(1)
... | |
##
## Visualize samples produced by MISO.
##
## TODO: In future interface with spliceplot to produce densities along a gene model
##
from scipy import *
from numpy import *
import matplotlib
#from plotting import colors, show_spines, axes_square
import matplotlib.pyplot as plt
from matplotlib import rc
#rc('font',**... | |
"""Alpenhorn client interface."""
import datetime
import os
import sys
import click
import peewee as pw
from ch_util import data_index as di
from ch_util import ephemeris
@click.group()
def cli():
"""Client interface for alpenhorn. Use to request transfers, mount drives,
check status etc."""
@cli.command(... | |
"""The tests for the MQTT switch platform."""
import unittest
from homeassistant.setup import setup_component
from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNAVAILABLE,\
ATTR_ASSUMED_STATE
import homeassistant.components.switch as switch
from tests.common import (
mock_mqtt_component, fire_mqtt_me... | |
import os
import logging
import struct
import claripy
from cle import MetaELF
from cle.backends.elf.symbol import ELFSymbol, ELFSymbolType
from cle.backends.elf.elfcore import ELFCore
from cle.address_translator import AT
from archinfo import ArchX86, ArchAMD64, ArchARM, ArchAArch64, ArchMIPS32, ArchMIPS64, ArchPPC32,... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import condition
from .fhirdate import FHIRDate
class ConditionTests(unittest.TestCase):
def instantiate_from(self, filename):
... | |
#!/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.
"""Entry point for both build and try bots.
This script is invoked from XXX, usually without arguments
to package an SDK. It autom... | |
# Copyright (c) 2014 Alex Meade
# Copyright (c) 2015 Yogesh Kshirsagar
# Copyright (c) 2015 Michael Price
# 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
#
# ... | |
# -*- coding: utf-8 -*-
from DeviceTemplate import Ui_Form
import time, os, sys, gc
from PyQt4 import QtCore, QtGui
#from acq4.pyqtgraph.graphicsItems import ImageItem
import acq4.Manager
from acq4.util.imageAnalysis import *
from acq4.util.debug import *
import numpy as np
import acq4.pyqtgraph as pg
#import acq4.pyqt... | |
"""
protocolserver
"""
__author__ = "Andrea Cavalli (missigno99@gmail.com)"
__copyright__ = "Copyright 2016, Andrea Cavalli"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import os
import socket
import protocol.utils
from protocol.utils import Event
from protocol.utils import S... | |
from django.test import TestCase
from casexml.apps.case.tests.util import delete_all_xforms
from casexml.apps.stock.const import COMMTRACK_REPORT_XMLNS
from corehq.apps.commtrack.sms import handle
from corehq.apps.commtrack.tests import util
from corehq.apps.products.models import Product
from corehq.apps.reminders.u... | |
# @MUNTJAC_COPYRIGHT@
# @MUNTJAC_LICENSE@
from unittest import TestCase
from muntjac.ui.label import Label
from muntjac.ui.horizontal_layout import HorizontalLayout
from muntjac.ui.grid_layout import GridLayout
from muntjac.ui.absolute_layout import AbsoluteLayout
from muntjac.ui.css_layout import CssLayout
from munt... | |
# -------------------------------------------------------------------------------------------------
# Name: ToolBar
# Purpose: Represents Canvas Toolbox. Manages Canvas Tools and Inks
#
# Author: Rafael Vasco
#
# Created: 06/10/13
# Copyright: (c) Rafael Vasco 2014
# ------------------------------... | |
#!/usr/bin/env python
# Copyright 2015-2016 Yelp 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 ... | |
import os
import numpy as np
from numpy.testing import assert_allclose
import pytest
from scipy import stats
from scipy.optimize import differential_evolution
from .test_continuous_basic import distcont
from scipy.stats._distr_params import distdiscrete
# this is not a proper statistical test for convergence, but o... | |
"""
homeassistant.components.media_player.squeezebox
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides an interface 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 t... | |
"""Support for Nederlandse Spoorwegen public transport."""
from datetime import datetime, timedelta
import logging
import ns_api
import requests
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME
import homeass... | |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | |
# Copyright 2016 Mario Graff (https://github.com/mgraffg)
# 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... | |
# EventMaster Library for Python
# Unofficial Python Library for connecting to, reading from and controlling
# a Barco E2, S3 or other EventMaster Switcher
# Author: Kye Lewis <klewis@stagingconnections.com>
# GitHub: http://github.com/kyelewisstgc/pye2s3/
# Version: 160716.a
import socket
import re
from threading im... | |
#!/usr/bin/env python
# revised 4/10/15
# writes output in FITS format
#
# revised 7/29/14
# Generates a catalog by combining existing mock catalogs
# for each type into a binary format accepted by "assign".
# based on code by Martin White
# modified to achieve densities used in CDR and to include
# standard stars ... | |
from __future__ import absolute_import
from __future__ import print_function
import numpy as np
import math
from . import mesh
from six.moves import map
from six.moves import range
from six.moves import zip
class VoroMesh(mesh.Mesh):
""" The voro mesh loads data from
voro++ voronoi generator by Chris H. Ryc... | |
import copy
import functools
import hashlib
import logging
import re
import socket
import time
from keystoneclient import adapter
from oslo_utils import importutils
from oslo_utils import netutils
import requests
from requests import adapters
try:
import json
except ImportError:
import simplejson as json
fro... | |
from .. import rfb_icons
from .. import rman_bl_nodes
from ..rman_operators.rman_operators_utils import get_bxdf_items, get_light_items, get_lightfilter_items
from ..rfb_utils import scene_utils
from ..rfb_utils import shadergraph_utils
from ..rman_config import __RFB_CONFIG_DICT__ as rfb_config
from bpy.types import M... | |
# Copyright (c) 2015, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Tags
from .validators import (integer, boolean, s3_bucket_name, notification_type,
notification_event, json_checker, task_type,
... | |
from datetime import timedelta
import numpy as np
import pandas as pd
from netCDF4 import Dataset
from scipy.signal import fftconvolve
from skimage.morphology import disk
from hagelslag.data.MRMSGrid import MRMSGrid
from hagelslag.evaluation.ProbabilityMetrics import DistributedReliability, DistributedROC
class Nei... | |
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
# Copyright 2013 IBM Corp.
# Copyright 2013 eNovance <licensing@enovance.com>
# Copyright Ericsson AB 2013. All rights reserved
# Copyright 2014 Hewlett-Packard Company
# Copyright 2015 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0... | |
"""List the reviews and corresponding branches in the current repository.
Usage examples:
Summarise all the tracked review branches:
$ barc list
ID status tracked name
10596 ok r/master/linkUtil
10594 ok r/master/notification-spew
List jus... | |
"""
Config utilities.
For an example config file, see the manual. If you don't have the man page
installed, a raw version is available in doc/udiskie.8.txt.
"""
import logging
import os
import sys
from udiskie.compat import basestring
from udiskie.locale import _
__all__ = ['DeviceFilter',
'FilterMatche... | |
"""Plotting functions
Note:
It relies on Matplotlib
"""
from __future__ import division
import warnings
import logging
logger = logging.getLogger('pygrfnn.vis')
import numpy as np
from functools import wraps
from numpy.polynomial.polynomial import polyroots
from utils import find_nearest
from utils import nic... | |
################################################################################
# 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... | |
"""Support for esphome devices."""
import asyncio
import logging
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Callable
import attr
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, \
EVENT_HOMEASSISTAN... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | |
from collections import namedtuple
import sublime
import re
try: # Python 3
from .haxe_parse_helper import parse_package
except (ValueError): # Python 2
from haxe_parse_helper import parse_package
SCOPE_VAR = 'meta.variable.haxe.2'
SCOPE_VAR_NAME = 'entity.name.variable.haxe.2'
SCOPE_FUNC = 'meta.method.ha... | |
import argparse
import logging
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from coapthon.client.helperclient import HelperClient
from coapthon.utils import parse_uri
from coapthon.defines import Codes, DEFAULT_HC_PATH, HC_PROXY_DEFAULT_PORT, COAP_DEFAULT_PORT, LOCALHOST, BAD_REQUEST, \
NOT_IMPLEM... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
'''
Run Resnet50 on Imagenet data.
Generate TFrecords for Imagenet data by following instructions in:
examples/build_imagenet_data/README.md
run:
# 4 GPU machine 2 sockets typically --map-by ppr:2:socket works well.
TMPDIR=/tmp mpirun --report-bindings \
--map-by ppr:2:socket -oversubscribe -np 4 p... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from time import sleep
import logging
import redis
from redis.sentinel import Sentinel
from rediscluster import StrictRedisCluster
from contextlib import contextmanager
from drivers import BaseDriver, DatabaseInfraStatus, DatabaseStatus
f... | |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
import logging
from dart.model.action import ActionType
_logger = logging.getLogger(__name__)
class ElasticsearchActionTypes(object):
data_check = ActionType(
name='data_check',
description='Executes a user defined, Elasticsearch data check',
params_json_schema={
'type': 'obj... | |
import numpy as np
import scipy as sp
from abc import ABCMeta, abstractmethod
class Likelihood(object):
__metaclass__ = ABCMeta
def __init__(self, n=1, mask=None):
self._n = n
self._mask = None
if mask is None:
self._n = n
else:
self._n = mask.size - ma... | |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:22565")
else:
access = Se... | |
import datetime
import json
import logging
from typing import Any, Callable, Dict, Optional, Set, Union
import great_expectations.exceptions as ge_exceptions
from great_expectations.core.id_dict import BatchKwargs, BatchSpec, IDDict
from great_expectations.core.util import convert_to_json_serializable
from great_expec... | |
#This function does all the file Handling required for creating the index.
import sys
import bz2
import heapq
import os
import operator
from collections import defaultdict
# import threading
import pdb
from config import *
#
# class writeParallel(threading.Thread):
# """
# Multi Threading , write multiple... | |
# 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 typing import List, Union
from asgiref.sync import async_to_sync
from django.apps import apps
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ImproperlyConfigured
from django.db.models import Mo... | |
# Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from __future__ import print_function
import os
import mimetypes
import six
from tweepy.binder import bind_api
from tweepy.error import TweepError
from tweepy.parsers import ModelParser, Parser
from tweepy.utils import list_to_csv
class AP... | |
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import warnings
from flask_wtf import Form
from wtforms import TextField, IntegerField, SelectField, validators
from werkzeug import redirect, abort
from jinja2 import Template... | |
"""
shared options and groups
The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this de... | |
# -*- coding: utf-8 -*-
"""This module contains classes representing syntactical elements of SQL."""
import re
import sys
from sqlparse3 import tokens as T
class Token(object):
"""Base class for all other classes in this module.
It represents a single token and has two instance attributes:
``value`` i... | |
#!/usr/bin/env python
"""Updates FileCheck checks in MIR tests.
This script is a utility to update MIR based tests with new FileCheck
patterns.
The checks added by this script will cover the entire body of each
function it handles. Virtual registers used are given names via
FileCheck patterns, so if you do want to c... | |
#!/usr/bin/env python
'''Simple script to grep for networks (net + wildcard, subnetmask or CIDR) containing a given IP address.
Copyright 2013, Steffen Imhof
Licensed under the MIT License (MIT), see LICENSE file for details
'''
import socket, struct, sys, re, fileinput
from optparse import OptionParser
PORT... | |
from __future__ import unicode_literals
from django.utils.six import moves
import sys
import warnings
import tablib
try:
from tablib.compat import xlrd
XLS_IMPORT = True
except ImportError:
try:
import xlrd # NOQA
XLS_IMPORT = True
except ImportError:
xls_warning = "Installe... | |
# Copyright 2013 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 operator import attrgetter
# These are LatencyInfo component names indicating the various components
# that the input event has travelled through.
# Th... | |
##############################################################################
# #
# This code performs image reconstruction using Mehrdad Soumekh's Spatial #
# Frequency interpolation method. It has essentially been copied from his #
# M... | |
# (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the Licen... | |
""" This module contains the logic for specifying and validating the top-level
DC/OS configuration from user arguments
The data structure called 'entry' is what defines which validation checks
should be run, how arguments should be calculated, which arguments should have
set defaults, which arguments should be user sp... | |
import warnings
from dateutil.parser import parse
from great_expectations.execution_engine import (
PandasExecutionEngine,
SparkDFExecutionEngine,
SqlAlchemyExecutionEngine,
)
from great_expectations.expectations.metrics.import_manager import sa
from great_expectations.expectations.metrics.map_metric_prov... | |
# 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 ... | |
#
# 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2013 PolyBeacon, 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
#... | |
from __future__ import division, print_function, unicode_literals
from __future__ import absolute_import
#
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) Michigan State University, 2014-2015. It is licensed under
# the three-clause BSD license; see LICENSE.
# Contact: khmer-proj... | |
"""Class to manage the entities for a single platform."""
import asyncio
from homeassistant.const import DEVICE_DEFAULT_NAME
from homeassistant.core import callback, valid_entity_id, split_entity_id
from homeassistant.exceptions import HomeAssistantError, PlatformNotReady
from homeassistant.util.async_ import (
ru... | |
#!/usr/bin/env python
#
# svnfsfs_tests.py: testing the 'svnfsfs' tool.
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# ... | |
from splitwise.picture import Picture
from splitwise.balance import Balance
import splitwise.group as Group
class User(object):
""" Contains basic user data.
Attributes:
id(long, optional): ID of the user
first_name(str, optional): First name of the user
last_name(str, optional): Last... | |
#!/usr/bin/env python3
import os
import time
import tomlkit
import shm
from conf.vehicle import VEHICLE
# The directory where the serial toml config files are located
SERIAL_CONF_DIR = '/home/software/cuauv/software/serial/seriald/conf'
# The name of the motor desires SHM group
MOTOR_DESIRES = 'motor_desires'
# The ... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | |
#
# 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... | |
# pyOCD debugger
# Copyright (c) 2006-2019 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... | |
"""Library for creating sequence-to-sequence models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.python.platform
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
from tensorflow.models.rnn i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.