gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright (c) 2015 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 writin... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
from datetime import timedelta
from django.core.urlresolvers import reverse
from django.utils import timezone
from exam import before
from sentry.models import GroupSeen, Group
from sentry.constants import MAX_JSON_RESULTS
from sentry.testut... | |
# 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... | |
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de>
# Author: Christopher Moody <chrisemoody@gmail.com>
# Author: Nick Travers <nickt@squareup.com>
# License: BSD 3 clause (C) 2014
# This is the exact and Barnes-Hut t-SNE implementation. There are other
# modifications of the algorithm:
# * Fast Optimi... | |
# utils.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os
import re
import sys
import time
import stat
import shutil
import tempfile
import platform
... | |
from builtins import object
import numpy as _np
import astropy.units as _u
import astropy.constants as _const
import astropy.cosmology as _cosmology
import scipy.integrate as _integrate
class MakinoProfile(object):
def __init__(self,
halo_mass,
redshift,
T=None,
... | |
from __future__ import print_function, division
from builtins import range
from builtins import object
import numpy as np
from code_base import optim
from code_base.data_utils import sample_minibatch, one_hot_encoding
class SentimentAnalysisSolver(object):
"""
A SentimentAnalysisSolver encapsulates all the l... | |
#####################################################################
# vec3 - 3-dimensional vector
#
# Copyright (C) 2002, Matthias Baas (baas@ira.uka.de)
#
# You may distribute under the terms of the BSD license, as
# specified in the file license.txt.
#################################################################... | |
# 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... | |
"""Module with main classes related to Switches."""
import json
import logging
from pyof.v0x01.common.phy_port import PortFeatures
from kytos.core.constants import CONNECTION_TIMEOUT, FLOOD_TIMEOUT
from kytos.core.helpers import now
__all__ = ('Interface', 'Switch')
LOG = logging.getLogger(__name__)
class Interfa... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Tobias Birkefeld (@tcraxs) <t@craxs.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metad... | |
# 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
# d... | |
# -*- test-case-name: twisted.conch.test.test_knownhosts -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An implementation of the OpenSSH known_hosts database.
@since: 8.2
"""
from __future__ import absolute_import, division
import hmac
from binascii import Error as DecodeError, b2a_... | |
# 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 ... | |
# module 're' -- A collection of regular expression operations
r"""Support for regular expressions (RE).
This module provides regular expression matching operations similar to
those found in Perl. It's 8-bit clean: the strings being processed may
contain both null bytes and characters whose high bit is set. Regular
e... | |
#
# ColorBar.py -- color bar widget
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import math
import numpy
from ginga.gtkw import gtksel
import gtk, gobject, cairo
... | |
#!/usr/bin/env python
# encoding: utf-8
"""
This module of native functions is implemented for
compatability with 010 editor functions. Some of these functions
are nops, some are fully implemented.
"""
import six
import sys
from pfp.native import native
import pfp.errors as errors
import pfp.fields
def _cmp(a, b):
... | |
"""
Randomized Lasso/Logistic: feature selection based on Lasso and
sparse Logistic Regression
"""
# Author: Gael Varoquaux, Alexandre Gramfort
#
# License: BSD 3 clause
import itertools
from abc import ABCMeta, abstractmethod
import warnings
import numpy as np
from scipy.sparse import issparse
from scipy import spar... | |
from devito import Eq, Operator, Function, TimeFunction
def iso_stencil(field, model, **kwargs):
"""
Stencil for the scalar isotropic visco- acoustic variable density
self adjoint wave equation:
b/v^2 [ P.dt2 + w/Q P.dt ] = (b P.dx).dx + (b P.dy).dy + (b P.dz).dz + s
Note derivative shifts a... | |
# 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
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | |
'''add_master_protein - assign a unique master to each peptide across
all samples using a maximum parsimony approach
======================================================================
:Author: Tom Smith, Manasa Ramakrishna
:Release: $Id$
:Date: |today|
:Tags: Python RNP Proteomics
Purpose
-------
This script ta... | |
from django.contrib import admin
from django.contrib import databrowse
from django.contrib import messages
from django.conf import settings
from django.contrib.admin.util import get_deleted_objects
from django.shortcuts import render_to_response
from django.utils.encoding import force_unicode
from django.contrib.admin ... | |
"""
@package mi.instrument.noaa.ooicore.driver
@file marine-integrations/mi/instrument/noaa/ooicore/driver.py
@author Pete Cable
@brief BOTPT
Release notes:
"""
import re
import time
import datetime
import ntplib
from mi.core.driver_scheduler import DriverSchedulerConfigKey, TriggerType
from mi.core.instrument.data_p... | |
"""
Module for managing the climate within a room.
* It reads/listens to a temperature address from KNX bus.
* Manages and sends the desired setpoint to KNX bus.
"""
from __future__ import annotations
import logging
from typing import TYPE_CHECKING, Any, Iterator
from xknx.remote_value import (
GroupAddressesTyp... | |
# 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... | |
import requests
from pandas import *
from numpy import *
from datetime import *
import os
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'
}
src_dir = os.getcwd()
csv_dir = os.path.join(src_dir, "CSV_price")
def Rep... | |
from importlib import import_module
from django.conf import settings
from django.contrib.admindocs.views import simplify_regex
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
from django.utils import six
from django.utils.encoding import force_text
from rest_framework import exceptions, seriali... | |
import unittest, pprint
from simpleparse.parser import Parser
from simpleparse.stt.TextTools import TextTools
from genericvalues import NullResult, AnyInt
class ParserGenerationTests(unittest.TestCase):
def doBasicTest(self, definition, parserName, testValue, expected, ):
result = Parser( definition).parse( testV... | |
# Copyright (c) 2016, Xilinx, 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 of ... | |
# Authors: Robert Luke <mail@robertluke.net>
#
# License: BSD (3-clause)
import re
import numpy as np
import datetime
from ..base import BaseRaw
from ..meas_info import create_info
from ..utils import _mult_cal_one
from ...annotations import Annotations
from ...utils import logger, verbose, fill_doc, warn
from ...uti... | |
#!/usr/bin/env python3
import json
import re
import sys
from datetime import datetime
import dateutil.parser
from dateutil.tz import tzutc
from mtools.util.pattern import json2pattern
class DateTimeEncoder(json.JSONEncoder):
"""Custom datetime encoder for json output."""
def default(self, obj):
if... | |
"""
Chemical Properties Script
==========================
Create a dictionary of chemical properties
This script provides tools to create a dictionary of the properties of
several hydrocarbons and chemicals of environmental interest in a global
dictionary for use by other programs that need to know chemical propertie... | |
# 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... | |
import os
from py2neo.cypher.error.schema import (IndexAlreadyExists,
ConstraintAlreadyExists)
from .exception import DoesNotExist
from .properties import Property, PropertyManager
from .signals import hooks
from .util import Database, deprecated, classproperty
DATABASE_URL = ... | |
# -*- coding: utf-8 -*-
__author__ = 'fyabc'
# Standard libraries.
from copy import deepcopy
from functools import partial
# Dependent libraries.
import pygame
# Local modules.
from config.gameConfig import CELL_SIZE, AllColors, FPS_MAIN, GAME_SCREEN_SIZE
from shift.utils.basicUtils import hitTestByDistance
from shi... | |
# Copyright (c) 2015-2016 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 agree... | |
from pandac.PandaModules import *
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import ToontownBattleGlobals
from toontown.battle import SuitBattleGlobals
from toontown.toonbase import TTLocalizer
... | |
#!/usr/bin/python
# Copyright MetaCommunications, Inc. 2003-2007
# Copyright Redshift Software, Inc. 2007
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import glob
import optparse
import os
import os.path
impo... | |
"""Support for monitoring plants."""
from collections import deque
from datetime import datetime, timedelta
import logging
import voluptuous as vol
from homeassistant.components.recorder.models import States
from homeassistant.components.recorder.util import execute, session_scope
from homeassistant.const import (
... | |
import getpass
import os
import socket
from datetime import date, datetime
from glob import glob
from logging import getLogger, DEBUG
from logging.handlers import RotatingFileHandler
from typing import List, Optional
import click
from scrapy.crawler import CrawlerProcess
from scrapy.utils.log import get_scrapy_root_ha... | |
#!/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... | |
import numpy as np
from random import choice,randrange, shuffle
import time
from datetime import datetime
import json,simplejson
grid_size = 49
iterations = 200
perc_filled_sites = 0.5
'''probability not to copy best strategy'''
r = 0.05
'''probability to cooperate spontaneously (noise 1)... | |
from numpy import sign, nonzero, equal, zeros, mean, std
from numpy import array, concatenate, sqrt, diag, matrix
from numpy import log, pi, trace, logspace, log10
from numpy.linalg import det, pinv
from numpy import sum, arange, nan, unique, argsort, isnan, cumsum
from scipy import stats
def confusionMatrix(labels_t... | |
#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# IMPORTANT NOTE: If you make local mods to this file, you must run:
# % pnacl/build.sh driver
# in order for them to take eff... | |
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | |
#!/usr/bin/env python
"""
Some I/O tools.
"""
import re
import warnings
import cPickle
import numpy
import pyfits
import yaml
def loaddata(filename):
"""
Load data from a yaml (.yaml or .yml) or a pickle file (.pkl).
"""
if filename.endswith('yaml') or filename.endswith('yml'):
return yaml.l... | |
# RedSqaure
# unicornhat.device handler
# this one uses the Pimoroni standard library and Pillow
# 8x8 16K RGB LED Matrix
# Copyright (c) 2017 full phat products
#
import threading
import time
import sos
unicorn = None
unicornLib = None
# number of concurrent threads (matches detected devices)
maxThread = None
# li... | |
# Copyright (c) 2010-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 required by applicable law or agreed to ... | |
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Pelix remote services: XML-RPC implementation
Based on standard package xmlrpclib
:author: Thomas Calmant
:copyright: Copyright 2014, isandlaTech
:license: Apache License 2.0
:version: 0.5.7
:status: Beta
..
Copyright 2014 isandlaTech
Licensed under... | |
from typing import Any, List
import logging
from PyQt5 import QtCore, QtGui
from .devicestatuslogger import DeviceStatusLogger
from ....devices.device.variable import VariableType
from ..component import Component
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
class DeviceLogManager(QtCore.QAb... | |
import sqlalchemy as sa
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import testing
from sqlalchemy.orm import class_mapper
from sqlalchemy.orm import close_all_sessions
from sqlalchemy.orm import configure_mappers
from sqlalchemy.orm import declared_att... | |
import pytest
from django.urls import reverse
from cfp.choices import TALK_DURATIONS
from cfp.logic import accept_application
from cfp.models import CallForPaper, PaperApplication, AudienceSkillLevel
from talks.models import Talk
from tests.factories import PaperApplicationFactory
from workshops.models import Worksho... | |
import logging, math
import ptypes
from ptypes import *
### Primitive types
class RGB(pstruct.type):
_fields_ = [
(pint.uint8_t, 'R'),
(pint.uint8_t, 'G'),
(pint.uint8_t, 'B'),
]
def summary(self):
r, g, b = (self[k] for k in 'RGB')
return "R={:d} G={:d} B={:d}".for... | |
# 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 ... | |
import threading
from ctypes import POINTER, Structure, byref, c_char, c_char_p, c_int, c_size_t
from django.contrib.gis.geos.base import GEOSBase
from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory
from django.contrib.gis.geos.prototypes.errcheck import (
check_geom, check_sized_string, check_st... | |
"""
pypi.py
=======
Desc: Library for getting information about Python packages by querying
The CheeseShop (PYPI a.k.a. Python Package Index).
Author: Rob Cakebread <cakebread at gmail>
License : BSD (See COPYING)
"""
__docformat__ = 'restructuredtext'
import re
import platform
if platform.python_versio... | |
"""Pylons Decorators
Common decorators intended for use in controllers. Additional
decorators for use with controllers are in the
:mod:`~pylons.decorators.cache`, :mod:`~pylons.decorators.rest` and
:mod:`~pylons.decorators.secure` modules.
"""
import logging
import warnings
import formencode
import simplejson
from d... | |
#########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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 2012, Intel, 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... | |
"""
Author: Keith Bourgoin, Emmett Butler
"""
__license__ = """
Copyright 2015 Parse.ly, 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 ... | |
"""
Copyright (c) 2015 Red Hat, 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 __future__ import absolute_import, unicode_literals, print_function
import os
import re
import pytest
import inspect
import logging
impo... | |
"""
Copyright (c) 2015-2017, 2020 Rocky Bernstein
Copyright (c) 1998-2002 John Aycock
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 ... | |
###############################################################################
#
# XMLwriter - A base class for XlsxWriter classes.
#
# Used in conjunction with XlsxWriter.
#
# Copyright 2013-2016, John McNamara, jmcnamara@cpan.org
#
# Standard packages.
import re
import codecs
# Standard packages in Python 2/3 comp... | |
# 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... | |
#! /usr/bin/env python
"""Write structured grids to NetCDF files.
Write netcdf
++++++++++++
.. autosummary::
:toctree: generated/
~landlab.io.netcdf.write.write_netcdf
"""
import os
import warnings
import six
import numpy as np
try:
import netCDF4 as nc4
except ImportError:
warnings.warn('Unable ... | |
from __future__ import print_function #Fixes crossplatform print issues
# -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
from popupcad.widgets.dragndroptree import DraggableTreeWidget
import qt.QtCore as qc
import qt.QtGui as ... | |
#!/usr/bin/python
#
# Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis)
#
# Copyright (C) 2010, Jashua R. Cloutier
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Re... | |
# Copyright 2015 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... | |
# coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
# 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... | |
from __future__ import unicode_literals
import logging
from django.utils import six
from django.utils.functional import cached_property
from django.utils.html import escape, strip_tags
from django.utils.safestring import mark_safe
from django.utils.six.moves.html_parser import HTMLParser
from django.utils.translation... | |
"""CSP (Constraint Satisfaction Problems) problems and solvers. (Chapter 6)."""
from . utils import *
from collections import defaultdict
from . import search
from functools import reduce
class CSP(search.Problem):
"""This class describes finite-domain Constraint Satisfaction Problems.
A CSP is specified b... | |
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
# 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
# Copyright (c) 2012, Daniel Zerbino
# All rights reserved.
#
# (1) Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# (2) Redistributions in binary form must reproduce the above copyright
# notice, this list of con... | |
import json
import re
import click
import cligj
import mapbox
from mapboxcli.errors import MapboxCLIException
def waypoint_snapping_callback(ctx, param, value):
results = []
tuple_pattern = re.compile("[,]")
int_pattern = re.compile("[0-9]")
# value is an n-tuple, each element of
# which conta... | |
from sympy.assumptions.ask import Q
from sympy.core.numbers import oo
from sympy.core.relational import Equality
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, symbols)
from sympy.sets.sets import (EmptySet, Interval, Union)
from sympy.simplify.simplify import simplify
from sympy.logic.boolalg... | |
###################################################################################
# SNAPSHOT STUFF
###################################################################################
import inspect
import __main__
from param.parameterized import Parameterized, Parameter
# CEBALERT: Can't this stuff move to the P... | |
"""Helper classes for dealing with Haystack faceting."""
# TODO: Clean up and refactor
import re
import datetime
from django.utils.http import urlquote_plus as quote_plus
class FacetClass(object):
"""Class representing a facet with multiple values
to filter on. i.e. keywords => [foo, bar ...]"""
FACET_... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#
# Copyright 2016 The BigDL 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 ... | |
# -*- coding: utf-8 -*-
"""
Splash can send outgoing network requests through an HTTP proxy server.
This modules provides classes ("proxy factories") which define
which proxies to use for a given request. QNetworkManager calls
a proxy factory for each outgoing request.
Not to be confused with Splash Proxy mode when Sp... | |
# Copyright (C) 2010 - Jens Nyman (nymanjens.nj@gmail.com)
#
# 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 License, or (at your option) any later
# version.
#
# This pr... | |
# 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... | |
# -*- coding: utf-8 -*-
#
# VirusTotalApi makes calls to the VirusTotal API.
#
from threat_intel.util.api_cache import ApiCache
from threat_intel.util.http import MultiRequest
class VirusTotalApi(object):
BASE_DOMAIN = u'https://www.virustotal.com/vtapi/v2/'
def __init__(self, api_key, resources_per_req=25, ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! 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.or... | |
# coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import os
from enum import Enum
from typing import Callable, Set, List
from ipaddress import IPv4Address
import simplejson as json
from pyqryptonight.pyqryptonight imp... | |
from __future__ import absolute_import
from typing import Any
from django.conf import settings
from django.contrib.auth import authenticate, login, get_backends
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpResponse
from django.shortcuts import re... | |
# game.py
# -------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkel... | |
from __future__ import unicode_literals
import re
from django.core.exceptions import ValidationError
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
from django.utils.encoding import force_text
from django.utils.ipv6 import is_valid_ipv6_add... | |
#!/usr/bin/env vpython
# Copyright 2019 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 json
import os
import subprocess
import sys
import unittest
import mock
import merge_results
import merge_steps
i... | |
from direct.task.Task import Task
from pandac.PandaModules import VBase4, PandaNode
from direct.distributed.ClockDelta import globalClockDelta
from toontown.margins.MarginVisible import MarginVisible
from toontown.nametag import NametagGlobals
from toontown.nametag.Nametag2d import Nametag2d
from toontown.nametag.Name... | |
# Copyright 2015 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 ... | |
# Created By: Virgil Dupras
# Created On: 2009-09-19
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licens... | |
class Changes(object):
def test_update_wo_move(self):
""" Update node w/o move
initial state of the tree :mod:`sqlalchemy_mptt.tests.add_mptt_tree`
.. code::
level Nested sets example
1 1(1)22
_______________|_________... | |
"""
Tests for Constrain Locator To Vertex module
offline tests run in mayapy in a terminal
skipping tests requireing GUI
for offline testing run:
mayapy constrainLoc2vtx_tests.py
"""
import os
from os.path import abspath, dirname
import unittest
import pymel.core
import constrainLoc2vtx
reload(constrainLoc2vtx)
... | |
# 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/licenses/LICENSE-2.0
#
# Unless requ... | |
<<<<<<< HEAD
<<<<<<< HEAD
"""
Unit tests for refactor.py.
"""
from __future__ import with_statement
import sys
import os
import codecs
import operator
import io
import tempfile
import shutil
import unittest
import warnings
from lib2to3 import refactor, pygram, fixer_base
from lib2to3.pgen2 import token
from . impor... | |
# Copyright 2016: 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/licenses/LICENSE-2.0
#
# Unless required b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.