gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import os
import re
import cx_Oracle
import collections
import datetime
import math
earDiagnosisCode = [6100,6200,6201,6202,6204,6205,6207,6209,6210,6211,6260]
#Primary query, Grab all processed contentions and order by particpant id and then claim date descending
SQL="select * \
from EAR_AGGREGATE_CONTENTION \
ord... | |
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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... | |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
import os
import redis
import connection
from scrapy.http import Request
from scrapy.spider import Spider
from unittest import TestCase
from .dupefilter import RFPDupeFilter
from .queue import SpiderQueue, SpiderPriorityQueue, SpiderStack
from .scheduler import Scheduler
# allow test settings from environment
REDIS... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 IBM Corporation
# Copyright 2015-2017 Lenovo
#
# 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/licens... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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
#
# ht... | |
#!/usr/bin/python
# coding=utf-8
################################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from mock import Mock
from mock import patch
try:
from cStringIO import StringIO
except ImportError:
... | |
# How to Launch:
# Example: <validation-tests>/v2/tests/upgrade/rancher_upgrade_test.py
# -b 0.37.0 -t 0.37.1 -s 104.197.121.156 -u aruneli
# base version has no significance now, but target version should be a
# valid rancher server version
# server option (-s): IP Address of the rancher server
# username is the usern... | |
from __future__ import absolute_import
import six
from hashlib import sha1
from sentry.utils.compat.mock import patch
from uuid import uuid4
from sentry.models import (
add_group_to_inbox,
Activity,
Commit,
CommitAuthor,
Group,
GroupAssignee,
GroupInbox,
GroupInboxReason,
GroupLink... | |
"""Collection for ExperimentSet and ExperimentSetReplicate."""
from pyramid.threadlocal import get_current_request
from pyramid.view import view_config
from snovault import (
calculated_property,
collection,
load_schema,
AfterModified,
BeforeModified
)
from snovault.calculated import calculate_prop... | |
from __future__ import print_function
import gc
import sys
import time
import unittest
from nose.plugins.skip import SkipTest
import numpy
from six import itervalues
from theano import function
from theano.gof import vm
from theano.gof import OpWiseCLinker
from six.moves import xrange
from theano.compile import Mode
... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# QTPyLib: Quantitative Trading Python Library
# https://github.com/ranaroussi/qtpylib
#
# Copyright 2016-2018 Ran Aroussi
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... | |
from six import BytesIO
from vcr.filters import (
remove_headers,
replace_headers,
remove_query_parameters,
replace_query_parameters,
remove_post_data_parameters,
replace_post_data_parameters,
decode_response,
)
from vcr.compat import mock
from vcr.request import Request
import gzip
import j... | |
from datetime import datetime
import pytz
from django.conf import settings
from django.db import connection
from django.db.models import DateField, DateTimeField, IntegerField, TimeField
from django.db.models.functions import (
Extract, ExtractDay, ExtractHour, ExtractMinute, ExtractMonth,
ExtractSecond, Extr... | |
# -*- coding: utf-8 -*-
from django import forms
from django.contrib import admin
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.utils.encoding import smart_unicode
from django.forms.models import fields_for_model
from django.utils.translation imp... | |
"""Support for WeMo switches."""
import asyncio
from datetime import datetime, timedelta
import logging
import async_timeout
from pywemo import discovery
import requests
from homeassistant.components.switch import SwitchDevice
from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY, STATE_UNKNOWN
from home... | |
from multiprocessing import Process
from threading import Timer
import json
import os
import time
import argparse
from adb import ADBException, ADBConnection
from utils import get_monitoring_methods, extract_method_classes
from jdwp import JDWPConnection, JDWPHelper
def monitor_func(device_id, apk_path_list, droidbo... | |
import re
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
class ChunkedReader(object):
def __init__(self, req, unreader):
self.req = req
self.parser = self.parse_chunked(unreader)
self.buf = StringIO()
def read(self, size=None):
... | |
import sys
import os
import argparse
import json
import pickle
import functools
from itertools import chain
from . import delphin
from . import config
from . import gram
"""typediff.py
Author: Ned Letcher
https://github.com/ned2/typediff
Typediff is a tool to allow you to quickly explore the types used in
the proce... | |
# Copyright (c) 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 ... | |
# 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.
import copy
import logging
import os
from collections import defaultdict, Mapping
import third_party.json_schema_compiler.json_parse as json_parse
impor... | |
#!/usr/bin/env python
"""
Automatic building of SeqAn apps and releases.
"""
import subprocess
import optparse
import os.path
import sys
import shutil
import tempfile
# The SVN command to use.
SVN_BINARY='svn'
# The CMake command to use.
CMAKE_BINARY='cmake'
# The default value for the SVN tags.
DEFAULT_TAGS_URL='ht... | |
#!/usr/bin/env python
#
# Setup script for Review Board.
#
# A big thanks to Django project for some of the fixes used in here for
# MacOS X and data files installation.
import os
import subprocess
import sys
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setupto... | |
'''
Copyright (C) 2014 Parrot SA
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following di... | |
import warnings
from operator import itemgetter
from itertools import product
import numpy as np
import colorsys
import param
from ..core import util
from ..core.data import (ArrayInterface, NdElementInterface, DictInterface)
from ..core import (Dimension, NdMapping, Element2D,
Overlay, Element, Da... | |
from collections import OrderedDict
import numpy as np
from .base import labeller_func, validate_input, connectivity_from_array
@labeller_func(group_label="car_streetscene_view_0_8")
def car_streetscene_20_to_car_streetscene_view_0_8(pcloud):
r"""
Apply the 8-point semantic labels of "view 0" from the MIT St... | |
# 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 python3
import collections
from math import *
class BigInt:
def __init__(self):
self.number = [0]
def skim(self):
carrier = 0
for i in range(len(self.number)):
self.number[i] += carrier
head = self.number[i] % 10
carrier = (self.... | |
import re
from datetime import datetime, timedelta
from string import capwords
from dateutil.parser import parse as parsedate
from loguru import logger
from flexget.utils import qualities
from flexget.utils.parsers.generic import ParseWarning, default_ignore_prefixes, name_to_re
from flexget.utils.parsers.parser impo... | |
from __future__ import print_function, division, absolute_import
import errno
import imp
import os
import shutil
import subprocess
import sys
import tempfile
import threading
import warnings
import numpy as np
from numba import unittest_support as unittest
from numba import utils, vectorize, jit
from numba.config im... | |
#----------------------------------------------------------------------
# Copyright (c) 2010-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | |
from hendrix import defaults
from optparse import make_option, OptionParser
import os
def cleanOptions(options):
"""
Takes an options dict and returns a tuple containing the daemonize boolean,
the reload boolean, and the parsed list of cleaned options as would be
expected to be passed to hx
"""
... | |
__author__ = 'Ryan Morlok (ryan@docalytics.com)'
from datetime import datetime
try:
import iso8601
except ImportError:
import _local_iso8601 as iso8601
from webob import exc
from pytracts import messages, to_url, util
#
# Decorators used to make handlers more explicit. Enable things like declarative, strongl... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
import os
import re
from collections import OrderedDict, defaultdict
from io import open
from threading import RLock, Thread
import click
import requests
import yaml
from pkg_resources import parse_version
from pkg_resources._vendor.packaging.version import Version... | |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | |
import os
import json
import random
import string
import uuid
import nova_v2_base
def heat_request(self,
url_detail,
request_type='get',
request_name=None,
data=None,
locust_name=None):
url = self.get_endpoint('orchestration')
... | |
# 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... | |
# encoding: utf-8
# pylint: disable=missing-docstring
import logging
from six import itervalues
from flask_marshmallow import Schema, base_fields
from marshmallow import validate, validates_schema, ValidationError
log = logging.getLogger(__name__) # pylint: disable=invalid-name
class Parameters(Schema):
def... | |
#-----------------------------------------------------------------
# _ast_gen.py
#
# Generates the AST Node classes from a specification given in
# a .yaml file
#
# The design of this module was inspired by astgen.py from the
# Python 2.5 code-base.
#
# Copyright (C) 2008-2012, Eli Bendersky
# License: BSD
#----------... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils.pdf import get_pdf
from frappe.email.smtp import get_outgoing_email_account
from frappe.utils import get_url, scrub_urls, strip, expand_relative_ur... | |
# Copyright 2010-2016 by Haibao Tang et al. All rights reserved.
#
# This code is part of the goatools distribution and goverend by its
# license. Please see the LICENSE file included with goatools.
"""Read and store Gene Ontology's obo file."""
# -*- coding: UTF-8 -*-
from __future__ import print_function
from colle... | |
# 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... | |
import sys
from rpython.rtyper.test.test_llinterp import interpret, get_interpreter
from rpython.rtyper.lltypesystem import lltype
from rpython.rlib.objectmodel import UnboxedValue
from rpython.translator.translator import graphof
from rpython.flowspace.model import summary
from rpython.translator.backendopt.all import... | |
from __future__ import unicode_literals
import boto3
from botocore.exceptions import ClientError
from moto import mock_sns
import sure # noqa
from moto.core import ACCOUNT_ID
import pytest
@mock_sns
def test_create_platform_application():
conn = boto3.client("sns", region_name="us-east-1")
response = conn.c... | |
from ipypublish.filters_pandoc.utils import apply_filter
from ipypublish.filters_pandoc import (
prepare_raw,
format_cite_elements,
format_raw_spans,
)
def test_mkdown_hlink_to_rst():
out_string = apply_filter("[a link](https://pandoc.org/filters.html)", [], "rst")
assert out_string == "`a link <h... | |
import gevent
import gevent.monkey
import gevent.socket
gevent.monkey.patch_all()
import subprocess
import fcntl
import os
import errno
import sys
import urllib
import distutils.spawn
import gevent.queue
import gevent.event
import ujson
import flask
import flask.ext.login
import chef
import logging
app = flask.Fl... | |
import datetime
import json
import os
import pathlib
import re
import warnings
from collections import OrderedDict
from urllib.parse import (
parse_qs,
quote,
unquote,
urlencode,
urlparse,
urlunparse,
)
from urllib.request import pathname2url, url2pathname
import requests
# Third-Party
import y... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
for concept in orm.DataConcept.objects.all():
# Use the truthiness of strings to set the viewable flag. If th... | |
# -*- coding: utf-8 -*-
"""
tests.test_jwt
~~~~~~~~~~~~~~
Flask-JWT tests
"""
import time
from datetime import datetime, timedelta
import jwt as _jwt
from flask import Flask, json, jsonify
import flask_jwt
def post_json(client, url, data):
data = json.dumps(data)
resp = client.post(url, heade... | |
import datetime
from unittest import mock
from django.contrib.postgres.indexes import OpClass
from django.db import (
IntegrityError, NotSupportedError, connection, transaction,
)
from django.db.models import (
CheckConstraint, Deferrable, F, Func, IntegerField, Q, UniqueConstraint,
)
from django.db.models.fie... | |
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext_lazy as _
from socialregistration.clients import Client
from django.conf import settings
import httplib2
import socket
import logging
import oauth2 as oauth
import urllib
import urlparse
logger = logging.getLogger(__name__)... | |
# Licensed under an MIT open source license - see LICENSE
from __future__ import print_function, absolute_import, division
import numpy as np
import astropy.units as u
from astropy.utils import NumpyRNGContext
'''
Routines for fitting a line with errors in both variables.
'''
def leastsq_linear(x, y, x_err, y_err, ... | |
# Copyright 2013 vArmour 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.apache.org/licenses/LICENSE-2.0
#
# Unless req... | |
#
# Copyright 2009 Facebook
#
# 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... | |
# 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 django.db import models
class Person(models.Model):
person_id = models.BigIntegerField(primary_key=True)
gender_concept = models.ForeignKey('Gender', null=True, blank=True)
year_of_birth = models.DecimalField(max_digits=4, decimal_places=0)
month_of_birth = ... | |
# Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright 2010 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/l... | |
# Copyright (c) 2013 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.
"""Module containing the various stages that a builder runs."""
from __future__ import print_function
import json
import logging
import os
from chr... | |
# Copyright (c) 2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | |
from sympy.core import (Rational, Symbol, S, Float, Integer, Number, Pow,
Basic, I, nan)
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.functions.elementary.exponential import exp
from sympy.utilities.pytest import XFAIL
def test_issue153():
#test that is runs:
a = sqrt(2*(1+sqrt(2)))
de... | |
# 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 model 'annotation_attempt'
db.create_table('annotations_annotation_attempt', (
('id',... | |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
#!/usr/bin/env python
#
# Copyright 2011 Rodrigo Ancavil del Pino
#
# 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... | |
#!/usr/bin/env python3
import sys
from os import walk
import os
import re
import yaml
import pprint
from devicetree import parse_file
# globals
compatibles = {}
phandles = {}
aliases = {}
chosen = {}
reduced = {}
def convert_string_to_label(s):
# Transmute ,- to _
s = s.replace("-", "_");
s = s.replace(",", "_... | |
import albow
from albow.dialogs import Dialog
from config import config
import pygame
from albow.translate import _, buildTemplate
import sys
import os
import logging
import traceback
import directories
old_lang = None
old_fprop = None
class OptionsPanel(Dialog):
anchor = 'wh'
def __init__(self, mcedit):
... | |
import os
from staccato.tests import utils
from staccato.common import config
import staccato.common.exceptions as exceptions
import staccato.xfer.constants as constants
class TestDB(utils.TempFileCleanupBaseTest):
def setUp(self):
super(TestDB, self).setUp()
self.owner = 'someperson'
se... | |
#!/usr/bin/env python2
from __future__ import division
import os
import sys
import json
import re
import uuid
import pprint; pp = pprint.pprint
from lxml import etree
import mp4check
# ----------------------------------------------------------------------
# movmark: takes trecmarkers output and patches it into the ... | |
# Copyright (c) 2012 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 or agreed to in writing, s... | |
import ctypes
from pyglet import com
lib = ctypes.oledll.dinput8
LPVOID = ctypes.c_void_p
WORD = ctypes.c_uint16
DWORD = ctypes.c_uint32
LPDWORD = ctypes.POINTER(DWORD)
BOOL = ctypes.c_int
WCHAR = ctypes.c_wchar
UINT = ctypes.c_uint
HWND = ctypes.c_uint32
HANDLE = LPVOID
MAX_PATH = 260
DIENUM_STOP = 0
DIENUM_CONTIN... | |
# -*- coding: utf-8 -*-
# Copyright 2012-2013 UNED
#
# 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... | |
#!/usr/bin/env python
''' Python DB API 2.0 driver compliance unit test suite.
This software is Public Domain and may be used without restrictions.
"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read... | |
# 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 -*-
"""
Created on Sat Jan 26 16:19:12 2013
@author: Janwillem van Dijk
@email: jwe.van.dijk@xs4all.nl
Module for generating skew normal random numbers (Adelchi Azzalini)
===================================================================
http://azzalini.stat.unipd.it/SN/
Licensing:
This code is ... | |
# -*- coding: utf-8 -*-
"""This file contains a class to provide a parsing framework to plaso.
This class contains a base framework class for parsing file-like objects, and
also some implementations that extend it to provide a more comprehensive
parser.
"""
from __future__ import unicode_literals
import abc
import ... | |
# 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 __future__ import absolute_import
import os
import sys
import io
import unittest
from telemetry.testing import system_stub
from telemetry.internal.test... | |
#!/usr/bin/env python
# encoding: utf-8
"""
test_doc.py
"""
from google.appengine.ext import ndb
from google.appengine.ext import testbed
from json import loads, dumps
from unittest import TestCase
from mail_safe_test import app
from mail_safe_test.auth import UserModel
from mail_safe_test.resources.doc import DocLis... | |
#!/usr/bin/python2.4
#
# Copyright 2008 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... | |
# 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... | |
__author__ = 'rogerjiang'
'''
This file performs the inference based on the learned mode
parameters (checkpoint). Each image is cut into 4 quarters due
to the limit of gpu memory. Vertical and horizonta reflections,
and [0, 90, 180, 270] degrees rotations are performed for each
quarter, and the outputs of sigmoid pred... | |
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | |
# Lint as: python2, python3
# Copyright 2018 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 l... | |
# UNITTEST.PY
# Copyright (c) 2013 Pilgrim Beart <firstname.lastname@1248.io>
#
# Simple unit-tests for hypercat.py
#
# 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, incl... | |
"""
the :mod:`dataset` module defines some tools for managing datasets.
Users may use both *built-in* and user-defined datasets (see the
:ref:`getting_started` page for examples). Right now, three built-in datasets
are available:
* The `movielens-100k <http://grouplens.org/datasets/movielens/>`_ dataset.
* The `movie... | |
#! /usr/bin/env python
# coding=utf-8
# Copyright (c) 2019 Uber Technologies, 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
#
# Unles... | |
#!/usr/bin/env python3
import unittest
import random
import numpy as np
from mips_sim import IanMIPS, Instr, IllegalInstructionError,\
CMDParse, MIPSProcessor, IntegerOverflow, AddressError, SoftwareInterrupt
well_formed = [
"add $s0, $t0, $t1",
"addi $s0, $t0, 0xfffb", # -5 = 0xfffb
"addi $s1, $... | |
#!/usr/bin/env python
__author__ = 'Stephen P. Henrie'
import unittest
from mock import Mock, patch
from pyon.util.unit_test import PyonTestCase
from pyon.util.int_test import IonIntegrationTestCase
from nose.plugins.attrib import attr
from pyon.core.exception import BadRequest, Conflict, Inconsistent, NotFound
fr... | |
# 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 ... | |
#
# -*- coding: utf-8 -*-
"""Machinery for running and validating transcripts.
If the user wants to run a transcript (see docs/transcript.rst),
we need a mechanism to run each command in the transcript as
a unit test, comparing the expected output to the actual output.
This file contains the class necessary to make t... | |
# coding: utf-8
import random
import os
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from models import XpMsgException, CoreParam, Application, Action
from models import Menu, MenuParam, View, Workflow, Param, WFParamValue, WorkflowData, ServiceMenu
from models import... | |
# -*- coding: utf-8 -*-
"""
werkzeug.exceptions
~~~~~~~~~~~~~~~~~~~
This module implements a number of Python exceptions you can raise from
within your views to trigger a standard non-200 response.
Usage Example
-------------
::
from werkzeug import BaseRequest, responder
... | |
import numpy as np
import pandas as pd
import pytest
from threading import Lock
from multiprocessing.pool import ThreadPool
import dask.array as da
import dask.dataframe as dd
from dask.dataframe._compat import tm
from dask.dataframe.io.io import _meta_from_array
from dask.delayed import Delayed, delayed
from dask.u... | |
#
# Copyright (c) 2009-2010 Gintautas Miliauskas
#
# 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, mo... | |
"""
This module provides two classes for managing LayerArtists with Qt.
The LayerArtistModel implements a QtModel to interface with a list of
LayerManagers.
The LayerArtistView is a list widget that displays
these layers, and provides GUI access to the model
"""
# pylint: disable=I0011, W0613, R0913, R0904, W0611
fr... | |
import datetime
import warnings
from django.conf import settings
import haystack
from haystack.backends import BaseEngine
from haystack.constants import DEFAULT_OPERATOR, DJANGO_CT
from haystack.exceptions import MissingDependency
from haystack.utils import get_identifier, get_model_ct
# Backport support
from .const... | |
from django import forms
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.forms import SetPasswordForm, AuthenticationForm, \
PasswordResetForm
from django.core.exceptions import ValidationError
from django.urls import reverse
from django.core.validators import... | |
# 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... | |
#pylint: disable=I0011,W0613,W0201,W0212,E1101,E1103
from distutils.version import LooseVersion # pylint:disable=W0611
import pytest
from mock import patch
from ..scatter_widget import ScatterWidget
from ..mpl_widget import MplCanvas
from .... import core
from . import simple_session
from matplotlib import __versio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.