gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import numpy as np
import pytest
import pandas as pd
from pandas import (
DataFrame,
Series,
Timestamp,
date_range,
)
import pandas._testing as tm
class TestDataFrameDiff:
def test_diff_requires_integer(self):
df = DataFrame(np.random.randn(2, 2))
with pytest.raises(ValueError, ma... | |
"""
TickerHandler
This implements an efficient Ticker which uses a subscription
model to 'tick' subscribed objects at regular intervals.
The ticker mechanism is used by importing and accessing
the instantiated TICKER_HANDLER instance in this module. This
instance is run by the server; it will save its status across
s... | |
# -*- coding: utf-8 -*-
"""
shopify_trois.engines.http.engine
Shopify-Trois HTTP Engine
:copyright: (c) 2013 by Martin Samson
:license: MIT, see LICENSE for more details.
"""
import hashlib
import requests
from requests.models import PreparedRequest
from requests.structures import CaseInsensitiveDict
... | |
'''
Created on May 1, 2013
@author: avneeshsarwate
'''
'''
Created on Mar 23, 2013
@author: avneeshsarwate
'''
#!/usr/bin/python
# repository.py
import wx
import sys
from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin
import OSC
packages = [('abiword', '5.8M', 'base'), ('adie', '145k', 'b... | |
from lstm_old import *
from lstm import *
from map import *
from lut import *
from inner_prod import *
from reshape import *
from cos_sim import *
from sum import *
from elem_prod import *
from active import *
from sum_prod import *
from active_func import *
from selector import *
from conv1d import *
from meanpool1d i... | |
# 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 agreed to in writ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Boot session from cache or build
Session bootstraps info needed by common client side activities including
permission, homepage, default variables, system defaults etc
"""... | |
# Copyright 2019 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 writing... | |
# -*- coding: utf-8 -*-
"""
An impementation of LIME (http://arxiv.org/abs/1602.04938), an algorithm to
explain predictions of black-box models.
"""
from __future__ import absolute_import
from typing import Any, Callable, Dict, Optional
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
fro... | |
# ext/mutable.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Provide support for tracking of in-place changes to scalar values,
which are propa... | |
#import math
import sys
from basic import *
from util import get_top_genes
#import matplotlib
#if make_png: matplotlib.use('Agg')
#import matplotlib.pyplot as plt
#import numpy as np
import tcr_sampler
from translation import get_translation
from amino_acids import amino_acids
new_probs = pipeline_params['new_probs']
... | |
# Copyright 2014 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | |
#!/usr/bin/env python
"""
Copyright (c) 2014 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merg... | |
from django.conf import settings
from django.db.models import Q
from django.utils.translation import gettext_lazy as _
from rest_framework.views import APIView
from rest_framework import viewsets
from rest_framework.permissions import AllowAny
from rest_framework import response
from rest_framework_extensions.mixins i... | |
# -*- coding: utf-8 -*-
import pytest
from warnings import catch_warnings
import numpy as np
from pandas import Series, DataFrame, Index, Float64Index
from pandas.util.testing import assert_series_equal, assert_almost_equal
import pandas.util.testing as tm
class TestFloatIndexers(object):
def check(self, resul... | |
# Copyright (c) 2014 NetApp, Inc.
# Copyright (c) 2015 Mirantis, 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/license... | |
"""Spelling Corrector.
Copyright 2007 Peter Norvig.
Open source code under MIT license: http://www.opensource.org/licenses/mit-license.php
"""
import re, collections, os
#currentDir = os.getcwd()
#print currentDir
def words(text): return re.findall('[a-z]+', text.lower())
def train(features):
model = collect... | |
## @package control_ops_grad
# Module caffe2.python.control_ops_grad
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.proto import caffe2_pb2
def gen_do_gradient(op, g_output):
"""
Generates gradie... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import numpy as np
from astropy.utils import isiterable
from astropy.utils.exceptions import AstropyUserWarning
try:
import bottleneck # pylint: disable=W0611
HAS_BOTTLENECK = True
from astropy.units import Quantity
except... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# The MIT License (http://www.opensource.org/licenses/mit-license.php)
#
# Copyright (c) 2010 Nexopia.com, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#... | |
'''
------------------------------------------------------------------------
Last updated 05/20/2015
Read in CEX data from 2012-2014 (interview survey), use these data to
create summary tables and estimate parameters of cons subutility function
This py-file calls the following other file(s):
This py-fi... | |
# -*- coding: utf-8 -*-
"""
| '_ \ / _` |_____ / __/ _ \| '_ ` _ \| '_ \ / _` | '__/ _ \
| |_) | (_| |_____| (_| (_) | | | | | | |_) | (_| | | | __/
| .__/ \__, | \___\___/|_| |_| |_| .__/ \__,_|_| \___|
|_| |___/ |_|
This is used to compare two databases. Takes two connection string... | |
import unittest
from test import support
from contextlib import closing
import gc
import pickle
import select
import signal
import struct
import subprocess
import traceback
import sys, os, time, errno
from test.script_helper import assert_python_ok, spawn_python
try:
import threading
except ImportError:
threadi... | |
from parcels import (FieldSet, ParticleSet, ScipyParticle, JITParticle,
Variable, ErrorCode)
from parcels.particlefile import _set_calendar
from parcels.tools.converters import _get_cftime_calendars, _get_cftime_datetimes
import numpy as np
import pytest
import os
from netCDF4 import Dataset
import... | |
# Copyright 2017 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... | |
"""
sphinx.ext.graphviz
~~~~~~~~~~~~~~~~~~~
Allow graphviz-formatted graphs to be included in Sphinx-generated
documents inline.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import posixpath
import re
import subprocess
from hashl... | |
from django.contrib.auth import get_user_model
from django.db.models import Q
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
from rest_auth.registration.views import SocialLoginView
from rest_framework import viewsets, permissions, views, mixins
from rest_framework.response import Resp... | |
# -*- coding: utf-8 -*-
#
# S3 XML Importer Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3import.py
#
import datetime
import json
import unittest
from gluon import *
from gluon.storage import Storage
from s3 import S3Duplicate, S3ImportItem, S3Import... | |
"""Support for Tibber sensors."""
import asyncio
from datetime import timedelta
import logging
import aiohttp
from homeassistant.const import POWER_WATT
from homeassistant.exceptions import PlatformNotReady
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle, dt as dt_util
from .c... | |
#
#
# Copyright (C) 2006, 2007, 2011, 2012 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... | |
# -*- coding: utf-8; fill-column: 76 -*-
"""Signals and events.
A small implementation of signals, inspired by a snippet of Django signal
API client code seen in a blog post. Signals are first-class objects and
each manages its own receivers and message emission.
The :func:`signal` function provides singleton behavi... | |
# -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
try:
from ._oauth import ... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from datetime import date
from itertools import count
import pytest
import numpy as np
from astropy._erfa import DJM0
from astropy.time import Time, TimeFormat
from astropy.time.utils import day_frac
class SpecificException(ValueError):
pass
@p... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
import csv
import os
import re
import sys
from datetime import datetime
import numpy as np
from PIL import Image
from . import config
from . import utils
ND_FLOAT = config.ND_FLOAT
ND_INT = config.ND_INT
ND_STRING = config.ND_STRING
def _float_or_none(... | |
import os
from unittest import TestCase
import six
from whylog.assistant.pattern_match import ParamGroup
from whylog.assistant.regex_assistant import RegexAssistant
from whylog.assistant.regex_assistant.regex import create_obvious_regex
from whylog.config import YamlConfig
from whylog.config.filename_matchers import ... | |
# Copyright 2012 SINA Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | |
# Copyright 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 agre... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from ibeis.control import controller_inject
import utool as ut
import concurrent
import random
import time
# from ibeis.web import futures_utils as futures_actors
import futures_actors
print, rrr, profile = ut.inj... | |
# Copyright (c) 2017 pandas-gbq Authors All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# 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
# fe... | |
# 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.
"""Convert parse tree to AST.
This module converts the parse tree to the AST we use for code generation. The
main entry point is OrderedModule, which gets pa... | |
"""<
# This code file follows the SLiP (Semi-Literate Programming) annotation convention.
# specification at: ...
title: "Static site generator for SLiP (Semi-Literate Programming) files"
author: Roy Prins
published: 17-04-2014
status: project
completed: 100
summary: >
A Flask based Static Site Gener... | |
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | |
"""
This module contains the main logic for start, query, stop graphlab server client connection.
"""
'''
Copyright (C) 2015 Dato, Inc.
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
'''
from ..cython.cy_unity import UnityGloba... | |
# Copyright 2016 Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | |
# -*- coding:utf8 -*-
# File : evolution.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 10/08/2017
#
# This file is part of TensorArtist.
from .opr import make_param_gs
from tartist import random
from tartist.core.utils.meta import notnone_property
from tartist.nn.optimizer import CustomOptim... | |
# 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... | |
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import now, cint
from frappe.model import no_value_fields
from frappe.model.document import Document
from frappe.custom.doct... | |
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
vizdtestdir = sys.path[0]
import urllib2
import xmltodict
import json
import requests
import socket
from lxml import etree
from verification_util import *
from opserver_results import *
from opserver.opserver_util import OpServerUtils
c... | |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Command line interface for Invenio-Access."""
from __future__ import absolute_imp... | |
#! /usr/bin/env python
from peyotl.nexson_syntax import PhyloSchema, extract_tree_nexson, detect_nexson_version
from peyotl.test.support import pathmap
from peyotl.utility import get_logger
import unittest
import json
import os
_LOG = get_logger(__name__)
#pylint does not realize that serialize returns a string, so gen... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test decoding scripts via decodescript RPC command."""
from test_framework.messages import CTransactio... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
``fitsheader`` is a command line script based on astropy.io.fits for printing
the header(s) of one or more FITS file(s) to the standard output in a human-
readable format.
Example uses of fitsheader:
1. Print the header of all the HDUs of a .fits fil... | |
import logging
import os
import sys
from collections import deque
from threading import Thread
import tempfile
import gym
import numpy as np
from BaseTraciEnv import BaseTraciEnv
from utilities.UniqueCounter import UniqueCounter
from gym import spaces
from gym.utils import seeding
import traci
from sumolib import chec... | |
"""
Support function for mod handling
Author:
David Meunier <david_meunier_79@hotmail.fr>
"""
import pandas as pd
import numpy as np
from pandas.io.parsers import read_csv
import itertools as iter
# from lol_file
def get_modularity_value_from_lol_file(lol_file):
"""get_modularity_value_from_lol_file"""
wi... | |
import copy
import datetime
import subprocess
from tornado.escape import xhtml_escape
class EscapedDict(object):
"""
A wrapper for a dict that (by default) HTML-escapes values as you ask for
them. If a value should not be escaped because it is going to be used as
HTML, it can be specified as such usi... | |
'''
Created on Feb 27, 2015
@author: root
'''
from paxes_nova.virt.ibmpowervm.ivm.operator import *
from paxes_nova.virt.ibmpowervm.ivm import blockdev
from paxes_nova.virt.ibmpowervm.ivm.local_blockdev import *
from paxes_nova.virt.ibmpowervm.ivm import command
from nova.openstack.common.lockutils import synchronize... | |
from __future__ import unicode_literals
import sys
from configyaml.config import AbstractNode
from configyaml.config import DictNode
from configyaml.config import ListNode
from configyaml.loader import ConfigLoader
from configyaml.config import WildcardDictNode
from configyaml.config import TypelessNode
class DummyC... | |
"""Alexa configuration for Home Assistant Cloud."""
import asyncio
from datetime import timedelta
import logging
import aiohttp
import async_timeout
from hass_nabucasa import cloud_api
from homeassistant.components.alexa import (
config as alexa_config,
entities as alexa_entities,
errors as alexa_errors,
... | |
#!/usr/bin/env python # -*- python-indent-offset: 2 -*-
#
# @file doc-filter-python.py
# @brief Post-process libSBML's Python doc strings for use by Doxygen.
# @author Michael Hucka
#
# Usage: pythondocfilter.py libsbml.py > output.py
#
# This is designed to be used as the value of the INPU... | |
"""Intervals including special functions for
sparsifying.
This module contains Interval class and auxiliary objects.
"""
from theano import tensor as T
from numlike import Numlike
from athenet.utils.misc import convolution, reshape_for_padding as \
misc_reshape_for_padding
class Interval(Numlike):
"""Interv... | |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@ecdsa.org
#
# 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 witho... | |
import optparse
import cPickle as pickle
import sgd as optimizer
from rntn import RNTN
from rnn2deep import RNN2
from rnn2deep_dropout import RNN2Drop
from rnn2deep_dropout_maxout import RNN2DropMaxout
from rnn import RNN
#from dcnn import DCNN
from rnn_changed import RNN3
import tree as tr
import time
import matplotl... | |
#!/usr/bin/env python
# Copyright (c) 2015, Scott D. Peckham
#----------------------------------------------------------
# S.D. Peckham
# July 9, 2015
#
# Tool to read a complete list of object names, including
# all parent objects (via check_object_names.py), and then
# create an OWL file that records containment, e... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers._stata_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtins for Stata
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
builtins_base = (
"if", "else", "in", "foreach", "for", "forv", "forva... | |
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | |
# Copyright 2015 DataStax, 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... | |
from ACIS import ACIS
from StationDict import StationDict
from WxOb import DailyWxOb, MonthlyWxOb
class StationDataRequestor(ACIS):
'''
INFO
----
Object to request weather data using ACIS web services
'''
def __init__(self):
super(StationDataRequestor,self).__init__()
self.web... | |
#!/usr/bin/env python
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.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
#
# ht... | |
"""
==========================================
Author: Tyler Brockett
Username: /u/tylerbrockett
Description: Alert Bot (Formerly sales__bot)
Date Created: 11/13/2015
Date Last Edited: 12/2/2016
Version: v2.0
==========================================
"""
import sqlite3
... | |
from __future__ import absolute_import
from contextlib import contextmanager
import zlib
import io
from socket import timeout as SocketTimeout
from socket import error as SocketError
from ._collections import HTTPHeaderDict
from .exceptions import (
ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked
... | |
# tests common to dict and UserDict
import unittest
import UserDict
from test import test_support
class BasicTestMappingProtocol(unittest.TestCase):
# This base class can be used to check that an object conforms to the
# mapping protocol
# Functions that can be useful to override to adapt to dictionary
... | |
# 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... | |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | |
# -*- coding: utf-8 -*-
'''
Proxmox Cloud Module
======================
.. versionadded:: 2014.7.0
The Proxmox cloud module is used to control access to cloud providers using
the Proxmox system (KVM / OpenVZ).
Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
``/etc/salt/cloud.providers.d/proxmox.c... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A wrapper for Google's Places API.
See: http://code.google.com/apis/maps/documentation/places/
Based on python-googlegeocoder by The Los Angeles Times Data Desk / Ben Welsh
https://github.com/datadesk/python-googlegeocoder
"""
import urllib
import urllib2
from decimal... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import ab... | |
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# Copyright 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 or ag... | |
# -*- coding: utf-8 -*-
#
# QInfer documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 14 21:12:57 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | |
#!/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 "Li... | |
"""conf.py."""
# -*- coding: utf-8 -*-
#
# napalm documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 16 13:17:14 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerat... | |
# Copyright (c) 2015 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
#
# File : keil.py
# This file is part of RT-Thread RTOS
# COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
#
# 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 2 of the... | |
# Copyright 2012 Viewfinder Inc. All Rights Reserved.
"""Authentication tests for prospective users.
"""
__author__ = 'andy@emailscrubbed.com (Andy Kimball)'
import base64
import json
import time
import urllib
from copy import deepcopy
from tornado import options
from viewfinder.backend.base import constants, messa... | |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Test cmdline.py for coverage.py."""
import pprint
import re
import shlex
import sys
import textwrap
import mock
import coverage
import coverage.cmdline
from c... | |
#!/usr/bin/env python
import sys
from shutil import copy, rmtree
import distutils.dir_util as dir_util
from subprocess import call
from tempfile import mkdtemp
from atexit import register
from os import getenv, mkdir, remove
from os.path import abspath, dirname, isdir, join
if len(sys.argv) > 1 and sys.argv[1] in ['... | |
# 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... | |
from django.core.urlresolvers import reverse
from django.test import TestCase
from model_mommy import mommy
from .. import models
class GroupViewMixin(object):
"""Mixin for testing group related views."""
url_name = ''
def setUp(self):
self.group = mommy.make('TenantGroup')
self.user =... | |
# BSD 3-Clause License
#
# Copyright (c) 2016-21, University of Liverpool
# 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 notic... | |
"""
"""
from functools import update_wrapper
from .exc import UploadError
import os
class BaseValidator(object):
"""BaseValidator class for flask_transfer. Provides utility methods for
combining validators together. Subclasses should implement `_validates`.
Validators can signal failure in one of two way... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | |
"""Provide the draft class."""
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from ...const import API_PATH
from ...exceptions import ClientException
from .base import RedditBase
from .subreddit import Subreddit
from .user_subreddit import UserSubreddit
if TYPE_CHECKING: # pragma: no cover
import p... | |
from collections import deque
from functools import partial
from inspect import isgeneratorfunction
from asyncio import Future, iscoroutinefunction, InvalidStateError
from .access import _EVENT_LOOP_CLASSES
from .futures import future_result_exc, AsyncObject
__all__ = ['EventHandler', 'Event', 'OneTime']
class Ab... | |
# Test hashlib module
#
# $Id$
#
# Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
import array
import hashlib
import itertools
import sys
try:
import threading
except ImportError:
threading = None
import unittest
import warnings
from test impor... | |
#!/usr/bin/env python
""" systimes() user and system timer implementations for use by
pybench.
This module implements various different strategies for measuring
performance timings. It tries to choose the best available method
based on the platforma and available tools.
On Windows, it is recommen... | |
import json
from six import add_metaclass
from .notification import Notification, DevicesFilterNotificationMixin, BaseNotification, \
BaseNotificationMeta, IOSNotificationMixin, AndroidNotificationMixin, WindowsPhoneNotificationMixin, \
OSXNotificationMixin, Windows8NotificationMixin, SafariNotificationMixin,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.