gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright (c) 2016 EMC Corporation, 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 ap... | |
#!/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
from diamond.collector import Collector
from httpd import Ht... | |
# Copyright 2017 The Sonnet 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 applicable l... | |
import re
import os
from cumulusci.tasks.release_notes.github_api import GithubApiMixin
class BaseChangeNotesParser(object):
def __init__(self, title):
self.title = title
self.content = []
def parse(self):
raise NotImplementedError()
def render(self):
return '# {}\r\n\r... | |
# -*- coding: utf-8 -*-
import _version
from setuptools.command.build_py import build_py
from setuptools.command.install import install
from setuptools import Command
from setuptools import find_packages
from setuptools import setup
import fnmatch
import glob
import shutil
import os
import subprocess
import sys
try:
... | |
# Copyright 2013 Openstack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
"""Brython templating engine.
Templates in HTML pages can include:
- Python code blocks:
<tr b-code="for item in items">
...
</tr>
- Python expressions:
{message}
- tag attributes:
<option value="{name}", selected="{name===expected}">
- inclusion of subtemplates:
<div b-include="men... | |
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2019
import unittest
import unittest.mock
import sys
import os
import time
import requests
import uuid
import json
import glob
from streamsx.topology.topology import Topology
from streamsx.topology.context import submit, ConfigParams, JobConfig
from streams... | |
# -*- coding: utf-8 -*-
import base64
import copy
import errno
import logging
import socket
from sys import exc_info
import traceback
import types
from ws4py import WS_KEY, WS_VERSION
from ws4py.exc import HandshakeError, StreamClosed
from ws4py.streaming import Stream
from ws4py.messaging import Message
DEFAULT_READ... | |
#
# 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... | |
"""Script for publishing new versions of Selenium to cloud storage.
When you run this script, it will use OAuth 2.0 to authenticate with
Google Cloud Storage before attempting to upload any files. This script
will fail if the authenticated account does not have write access to the
indicated bucket.
By default, this s... | |
"""Abstract class for RSA."""
from .cryptomath import *
class RSAKey:
"""This is an abstract base class for RSA keys.
Particular implementations of RSA keys, such as
L{OpenSSL_RSAKey.OpenSSL_RSAKey},
L{Python_RSAKey.Python_RSAKey}, and
L{PyCrypto_RSAKey.PyCrypto_RSAKey},
inherit from this.
... | |
"""
Module for configuring Windows Firewall using ``netsh``
"""
import re
import salt.utils.platform
import salt.utils.win_lgpo_netsh
from salt.exceptions import CommandExecutionError
# Define the module's virtual name
__virtualname__ = "firewall"
def __virtual__():
"""
Only works on Windows systems
""... | |
"""Component to integrate the Home Assistant cloud."""
import logging
from hass_nabucasa import Cloud
import voluptuous as vol
from homeassistant.components.alexa import const as alexa_const
from homeassistant.components.google_assistant import const as ga_c
from homeassistant.const import (
CONF_MODE,
CONF_N... | |
# Copyright 2019 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | |
# 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... | |
# extension module to the "dpkt" library to parse TableDumpV2 MRT/RIB files
# use: parsing routeviews files and creating an IP to ASN list
# author hadi a
# note: parts of this code are copied/based on the dpkt project
# date 24.11.2009 v 1.1
# note: this module might be speeded up by replacing some struct.unpacks wit... | |
#
# Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | |
# This file is part of beets.
# Copyright 2011, Adrian Sampson.
#
# 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, ... | |
# Copyright (c) 2011, Roger Lew [see LICENSE.txt]
# This software is funded in part by NIH Grant P20 RR016454.
"""
This unittest tests the dictset module.
"""
import sys
import unittest
import doctest
import random
from random import shuffle
from string import digits,ascii_lowercase
import dictset
from dictset impo... | |
from flask_cache import Cache as FlaskCache
from flask_login import login_required
from flask import Blueprint, render_template, jsonify, abort
from flask import request, current_app
from sys import getsizeof
import time
import functools
import logging
logger = logging.getLogger(__name__)
class LogData(object):
... | |
# 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... | |
"""
Code to generate a Python model from a database or differences
between a model and database.
Some of this is borrowed heavily from the AutoCode project at:
http://code.google.com/p/sqlautocode/
"""
import sys
import logging
import sqlalchemy
import migrate
import migrate.changeset
log = logging.getLogger(__na... | |
#!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this lis... | |
import unittest
import os
import glob
import tempfile
import shutil
import fs
import fs.copy
import fs.path
from defcon import Font, Glyph, LayerSet, Guideline
from defcon.errors import DefconError
from defcon.tools.notifications import NotificationCenter
from defcon.test.testTools import (
getTestFontPath, getTest... | |
# -*- coding: utf-8 -*-
# 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.
"""Support for Linux namespaces"""
from __future__ import print_function
import ctypes
import ctypes.util
import errno
impor... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
"""Support for Konnected devices."""
import asyncio
import copy
import hmac
import json
import logging
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.web import Request, Response
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SC... | |
from sympy import (Symbol, symbols, factorial, factorial2, binomial,
rf, ff, gamma, polygamma, EulerGamma, O, pi, nan,
oo, zoo, simplify, expand_func)
from sympy.functions.combinatorial.factorials import subfactorial
from sympy.utilities.pytest import XFAIL, raises
def test_rf_ev... | |
# -*- coding: utf-8 -*-
# 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, softwar... | |
# -*- coding: utf-8 -*-
# BITFINEX API wrapper
#
#
# AUTHOR: @jimako1989
# GITHUB: github.com/jimako1989/bitfinexpy
# LICENSE: MIT
#
import base64
import hashlib
import hmac
import json
import requests
import time
# EndpointsMixin provides a mixin for the API instance
class EndpointsMixin(object):
# Public API #... | |
# 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... | |
import pbuffer
from struct import unpack
import socket
BNLSProtByte = {'STAR': 0x01,
'SEXP': 0x02,
'W2BN': 0x03,
'D2DV': 0x04,
'D2XP': 0x05,
'JSTR': 0x06,
'WAR3': 0x07,
'W3XP': 0x08}
class __init__ (pbuffer... | |
#!/usr/bin/env python3
import psycopg2
import sys
from PIL import Image
import os
import struct
import argparse
import math
def hex2rgb(hex):
# Remove the hash in the beginning
hex = hex[1:]
return struct.unpack('BBB', bytes.fromhex(hex))
def calculate_coverage_full_tiles(basemap_tiles_path, osm_tiles_... | |
# Copyright 2016 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | |
import numpy as np
import tensorflow as tf
import sys
import time
from sklearn.metrics import f1_score
import random
tf.compat.v1.disable_eager_execution()
class History(object):
def __init__(self):
self.history = {}
class hcan(object):
def __init__(self, embedding_matrix, num_classes, max_sents, ... | |
# Copyright (c) 2018 PaddlePaddle 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 app... | |
import bpy
from bpy.props import StringProperty, BoolProperty, EnumProperty
from .. import rman_cycles_convert
from ..rfb_utils import shadergraph_utils
from .. import rman_bl_nodes
from .rman_operators_utils import get_bxdf_items, get_projection_items
from ..rman_render import RmanRender
import math
class SHADING_OT_... | |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | |
#!/usr/bin/env python
"""The classes in this module aid the specification of tally `units` in
:py:class:`pyne.simplesim.cards.ICellSurfTally` (see examples below). The class
focuses on the ability to specify cells and surfaces that are nested within
universes or other cells in nearly arbitrarily complex ways. Apart f... | |
#
# 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... | |
# Copyright 2014 - Rackspace Hosting.
#
# 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... | |
'''
Image
=====
Core classes for loading images and converting them to a
:class:`~kivy.graphics.texture.Texture`. The raw image data can be keep in
memory for further access.
'''
__all__ = ('Image', 'ImageLoader', 'ImageData')
from kivy.event import EventDispatcher
from kivy.core import core_register_libs
from kivy... | |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. 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 requir... | |
# Copyright 2012 Nebula, 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 agree... | |
# Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | |
from binascii import hexlify
from configparser import RawConfigParser
import os
from io import StringIO
import stat
import subprocess
import sys
import shutil
import tempfile
import time
import unittest
from hashlib import sha256
from .. import xattr
from ..archive import Archive, ChunkBuffer, CHUNK_MAX_EXP
from ..arc... | |
#
# Copyright (c) SAS Institute 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 w... | |
#!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST_WMain_I2C.py
# Date : Oct 20, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copyright : 2016
# ... | |
# Copyright 2013 Netherlands eScience Center
#
# 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 t... | |
# Alpha O. Sall
# 03/24/2014
from flask import Flask, request, Response
import json
import requests
from array import *
from Log import Log
def getCephRestApiUrl(request):
# discover ceph-rest-api URL
return request.url_root.replace("inkscopeCtrl","ceph-rest-api")
class Pools:
"""docstring for pools"""
... | |
import os
import os.path
import shutil
import socket
import subprocess
import sys
import tempfile
import threading
import time
import random
try:
import pytest
except ImportError:
print >> sys.stderr, "Integ tests require pytests!"
sys.exit(1)
def pytest_funcarg__servers(request):
"Returns a new APIH... | |
# -*- coding: utf-8 -*-
"""
LiveSource.
"""
import ast
class LiveSource(object):
"""
Attributes:
code (str): Source code.
lst (int): LiveSource ast tree.
"""
def __init__(self, code, max_deep=10):
"""
Args:
code (str): Source code.
max_deep (... | |
from cases_framework import Case, MultiCase
# Covers cases for vtocc_cached2
class Case2(Case):
def __init__(self, **kwargs):
Case.__init__(self, cache_table='vtocc_cached2', **kwargs)
cases = [
"alter table vtocc_cached2 comment 'new'",
Case2(doc="PK_IN (null key)",
query_plan="PK_IN",
sql... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# standard library
from distutils.version import LooseVersion
# external dependencies
import numpy as np
from numpy.fft import fft, fftfreq
from scipy import __version__ as scipy_version
from scipy.integrate import trapz, cumtrapz
from scipy.interpolate import UnivariateS... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright 2013 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 ag... | |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | |
__author__ = 'yuxiang'
import os
import datasets
import datasets.scenenet
import datasets.imdb
import cPickle
import numpy as np
import cv2
class scenenet(datasets.imdb):
def __init__(self, image_set, scenenet_path = None):
datasets.imdb.__init__(self, 'scenenet_' + image_set)
self._image_set = im... | |
#!/usr/bin/python -tt
# vim: ai ts=4 sts=4 et sw=4
#
# Copyright (c) 2009, 2010, 2011 Intel, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; version 2 of the License
#
# This program is d... | |
#
# This file is:
# Copyright (C) 2018 Calin Culianu <calin.culianu@gmail.com>
#
# MIT License
#
from . import utils
from . import gui
from . import private_key_dialog
from . import sign_decrypt_dialog
from . import history
from electroncash import WalletStorage, Wallet
from electroncash.util import timestamp_to_da... | |
"""
Gate Unit tests
"""
import pytest
from anchore_engine.db import Image
from anchore_engine.services.policy_engine.engine.policy.gates.image_metadata import (
ImageMetadataAttributeCheckTrigger,
ImageMetadataGate,
)
from anchore_engine.subsys import logger
from tests.integration.services.policy_engine.engine... | |
import re
import uuid
from collections import defaultdict, namedtuple
from collections.abc import Iterable
from functools import lru_cache
from urllib.parse import unquote
from sanic.exceptions import MethodNotSupported, NotFound
from sanic.views import CompositionView
Route = namedtuple(
"Route", ["handler", "... | |
"""
Sheet classes.
A Sheet is a two-dimensional arrangement of processing units,
typically modeling a neural region or a subset of cells in a neural
region. Any new Sheet classes added to this directory will
automatically become available for any model.
"""
# Imported here so that all Sheets will be in the same pack... | |
import copy
from itertools import chain
import exchange
import lan
from processing import collect_array as ca
from processing import collect_device as cd
from processing import collect_id as ci
from processing import collect_loop as cl
class PlaceInReg(object):
def __init__(self, ast):
self.ast = ast
... | |
# 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... | |
# 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... | |
# -*- coding: utf-8 -*-
import re
import urllib2
import socket
import logging
import conf
import dbhandler
import sys
import exception
import time
HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36"}
##Extract the movie url
def parseMovi... | |
import os
import shutil
import configparser
import requests
import datetime
import zipfile
import uuid
import re
import subprocess as sp
from flask import current_app as app
from aslo.service import activity as activity_service
from aslo.celery_app import logger
from .exceptions import ReleaseError, BuildProcessError,... | |
# The Admin4 Project
# (c) 2013-2014 Andreas Pflug
#
# Licensed under the Apache License,
# see LICENSE.TXT for conditions of usage
import wx
from tree import DragTreeCtrl, TreeItemData
from wh import xlt, Menu
from adm import images
from _pgsql import pgQuery
class Snippet:
def __init__(self, id, parent, name, ... | |
##########################################################################
#
# Copyright (c) 2014-2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | |
# -*- coding: utf-8 -*-
"""
solace.auth
~~~~~~~~~~~
This module implements the auth system.
:copyright: (c) 2009 by Plurk Inc., see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
from threading import Lock
from werkzeug import impor... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2006-2010 Tampere University of Technology
#
# 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
# wi... | |
"""Tests for Messaging Service Scripts end-to-end main process code."""
import asyncio
import functools
import itertools
import json
import multiprocessing as mp
import os
import typing
from typing import Any
import unittest
from unittest import mock
from perfkitbenchmarker.scripts.messaging_service_scripts.common im... | |
# 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 ... | |
import time
import json
import threading
import struct
import urlparse
from xlog import getLogger
xlog = getLogger("x_tunnel")
from simple_http_client import HTTP_client
import utils
import base_container
import encrypt
import global_var as g
def encrypt_data(data):
if g.config.encrypt_data:
return encr... | |
# -*- coding: utf-8 -*-
# This file is part of Eigen, a lightweight C++ template library
# for linear algebra.
#
# Copyright (C) 2009 Benjamin Schindler <bschindler@inf.ethz.ch>
#
# Eigen is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published... | |
#encoding: utf-8
'''
Examples:
[import [guideline]]
[tr [Notes]]
[List seq=[[getPhones [nokia_se40]] sep=[, ]] [
[Link target=[[item.url]] [[item.caption]]]
]]
[getPhones [nokia_se40]]
[formatNotes:=[
[List seq=[[getPhones [[#]]] sep=[, ]] [
[Link target=[[item.url]] [[item.caption]]]
]]
]]
''... | |
# -*- coding: utf-8 -*-
#
## copyright (C) 2018
# The Icecube Collaboration
#
# $Id$
#
# @version $Revision$
# @date $LastChangedDate$
# @author Hershal Pandya <hershal@udel.edu> Last changed by: $LastChangedBy$
#
from icecube import phys_services, dataclasses, icetray, recclasses
import numpy as np
import tables
fr... | |
# Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
"""
dj-stripe Session Model Tests.
"""
from copy import deepcopy
from unittest.mock import patch
import pytest
import stripe
from django.test import TestCase
from djstripe.models import Session
from djstripe.settings import djstripe_settings
from tests import (
FAKE_BALANCE_TRANSACTION,
FAKE_CHARGE,
FAKE_... | |
#!/usr/bin/env python
# coding=utf-8
"""
coding=utf-8
A utility to make handling many resumes easier by automatically pulling contact information, required skills and
custom text fields. These results are then surfaced as a convenient summary CSV.
"""
import functools
import logging
import re
import sys
from flask i... | |
# Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com>
#
# Licensed under BSD3. See the LICENSE.txt file in the root of this distribution.
import os
from simulation.aivika.modeler.model_project import generate_cabal_file_impl
from simulation.aivika.modeler.model_project import generate_stack_file_impl
from simu... | |
# The MIT License
#
# Copyright (c) 2007 Aldo Cortesi
#
# 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, ... | |
#!/usr/bin/python3
# cloudpackages.py
#
# This script operates on *.product files for SUSE OpenStack cloud and will
# attempt to determine the provenance of all packages pulled in by a particular
# product. Alternatively, packages can be supplied on the command line using
# the -u option. For this script to work corre... | |
# -*- coding: utf-8 -*-
import datetime
import json
from unittest import mock
from django.db.models import Q
from django.test import TestCase
from elasticsearch.serializer import JSONSerializer
from wagtail.search.backends.elasticsearch2 import Elasticsearch2SearchBackend, get_model_root
from wagtail.search.query imp... | |
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: miha@reciprocitylabs.com
# Maintained By: miha@reciprocitylabs.com
"""Generic handlers for imports and exports.
"""
from dateutil.parser import pa... | |
"""
General tests for all estimators in sklearn.
"""
# Authors: Andreas Mueller <amueller@ais.uni-bonn.de>
# Gael Varoquaux gael.varoquaux@normalesup.org
# License: BSD 3 clause
import os
import warnings
import sys
import re
import pkgutil
from inspect import isgenerator
from functools import partial
import... | |
from rest_framework import generics, status
from rest_framework.authentication import \
SessionAuthentication, \
TokenAuthentication
from rest_framework.permissions import IsAuthenticated, IsAdminUser
from rest_framework.decorators import \
authentication_classes, \
permission_classes, \
api_view
fr... | |
import cookielib
import os
import re
import sys
import subprocess
import time
import urllib
import xbmc
import xbmcaddon
import xbmcgui
import xbmcplugin
import xbmcvfs
# get initial plugin settings
pluginhandle = int(sys.argv[1])
addon = xbmcaddon.Addon()
addonID = addon.getAddonInfo('id')
# add local lib to sys.p... | |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
if sys.hexversion < 0x020400f0: from sets import Set as set
try:
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
except ImportError:
h... | |
"""
Miscellaneous function (re)definitions from the Py3.4+ standard library
for Python 2.6/2.7.
- math.ceil (for Python 2.7)
- collections.OrderedDict (for Python 2.6)
- collections.Counter (for Python 2.6)
- collections.ChainMap (for all versions prior to Python 3.3)
- itertools.count ... | |
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from django.db.models.query import sql, QuerySet, Q
from django.contrib.gis.db.backend import SpatialBackend
from django.contrib.gis.db.models.fields import GeometryField, PointField
from django.contrib.gis.db.models.sql import Ar... | |
# bootstrapping setuptools
import ez_setup
ez_setup.use_setuptools()
import os
import sys
import textwrap
from distutils.errors import *
from distutils.command.clean import clean as _clean
from distutils.cmd import Command
from setuptools import setup
from distutils import log
from distutils.core import setup
class... | |
from zope.interface import implements #@UnresolvedImport
from twisted.internet.protocol import ReconnectingClientFactory
from txredis.protocol import Redis, RedisSubscriber, defer
from twisted.internet import interfaces
import uuid
import itertools
from txthoonk.types import Feed
try:
from collection import Ord... | |
"""Test the cross_validation module"""
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_raises
from sklearn... | |
#!/usr/bin/env python
# Copyright (C) 2006-2010, University of Maryland
#
# 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 us... | |
import oauth2
import json
from datetime import date
import logging
from django.utils import timezone
from django.urls import reverse
from django.views.decorators.csrf import csrf_exempt
from ims_lti_py.tool_provider import DjangoToolProvider
from django.shortcuts import (
redirect,
get_object_or_404,
rend... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.