gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
import maya.OpenMaya as om
import mtm_attribute as attribute
reload(attribute)
filterNames = ["Unit Box Filter","Gauss", "Bartlett", "Catmull Rom", "Hanning", "Blackman", "Sinc (sharpening)", "Closest Sample Filtering", "Farthest Samples Filtering", "Disable edge Antialiasing", "Object with most coverage", "Object wit... | |
# Copyright 2014 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... | |
# Copyright (C) 2007 - 2009 The MITRE Corporation. See the toplevel
# file LICENSE for license terms.
# This file contains all the basic pieces to do bootstrapping:
# build a corpus, build a model, run a test. The experiment engine
# is an extension of this now.
import sys, os, shutil, random, glob, time
# I don't th... | |
import core.modules
import core.modules.module_registry
from core.modules.vistrails_module import Module, ModuleError
from Array import *
import copy
import scipy
import numpy
from scipy import fftpack
import time
class EnsembleModule(object):
my_namespace = 'scipy|signals|ensembles'
class ComputeDistance(Ensembl... | |
# Copyright (c) 2012, Claudio "nex" Guarnieri
#
# 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 conditi... | |
# -*- coding: utf-8 -*-
# Copyright 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 requi... | |
#!/usr/bin/python
#----------------------------------------------------------------------
# Copyright (c) 2013-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without rest... | |
#!/usr/bin/env python
from __future__ import print_function,division
from astropy.io import fits
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
from pint.templates import lctemplate,lcprimitives,lcfitters
from pint.eventstats import z2m,sf_z2m, hm, sf_hm, sig2sigma
import sys
from astropy import ... | |
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message
from sqlalchemy import testing
from sqlalchemy.testing import engines
from sqlalchemy.testing.schema import Table, Column
from test.orm import _fixtures
from sqlalchemy.testing import fixtures
from sqlalchemy import Integer, String, ForeignKey, fu... | |
from datetime import timedelta
import pendulum
from pendulum.utils._compat import PYPY
from .constants import SECONDS_PER_DAY
from .constants import SECONDS_PER_HOUR
from .constants import SECONDS_PER_MINUTE
from .constants import US_PER_SECOND
def _divide_and_round(a, b):
"""divide a by b and round result to ... | |
"""passlib.handlers.sha2_crypt - SHA256-Crypt / SHA512-Crypt"""
#=============================================================================
# imports
#=============================================================================
# core
import hashlib
import logging; log = logging.getLogger(__name__)
from warnings im... | |
#/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import sqlite3
import json
import urllib.request
from bs4 import BeautifulSoup
'''USER CONFIGURATION'''
USERNAME = ""
#This is the bot's Username. In order to send mail, he must have some amount of K... | |
# sqlite/pysqlite.py
# Copyright (C) 2005-2011 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
"""Support for the SQLite database via pysqlite.
Note that pysqlite is the same dr... | |
'''
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... | |
#! /usr/bin/env python3
import logging
import argparse
import re
import math
import datetime
import mechanicalsoup
import ics
import pytz
ADE_ROOT = 'http://chronos.epita.net'
PRODID = '-//Laboratoire Assistant et Charles Villard//chronos.py//EN'
ROOM_MAPPING = {}
CLASS_MAPPING = {}
BASE_TIME = datetime.datetime.st... | |
"""
# tinypath
Tinypath is a tiny file path module that provides only the most crucial and
commonly needed functionality, including turning files and folders into classes.
Designed as a companion module for projects that require handling arbitrary paths
from users without breaking, and easy navigation of local file sy... | |
from skidl import SKIDL, TEMPLATE, Part, Pin, SchLib
SKIDL_lib_version = '0.0.1'
audio = SchLib(tool=SKIDL).add_parts(*[
Part(name='LL1587',dest=TEMPLATE,tool=SKIDL,do_erc=True),
Part(name='LM1875',dest=TEMPLATE,tool=SKIDL,keywords='LM1875 Amplifier 20W',description='20W Audio Power Amplifier, TO220-5... | |
# Copyright (c) 2014 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.
"""ResourceFinder is a helper class for finding resources given their name."""
import os
from tvcm import module
from tvcm import style_sheet as style_sh... | |
# -*- coding: utf-8 -*-
import base64
import json
import os
import os.path
import random
import shutil
import tempfile
import unittest
from py.test import ensuretemp
from pytest import mark
from docker import auth, errors
try:
from unittest import mock
except ImportError:
import mock
class RegressionTest(... | |
"""The tests for the Legacy Mqtt vacuum platform."""
from copy import deepcopy
import json
import pytest
from homeassistant.components import vacuum
from homeassistant.components.mqtt import CONF_COMMAND_TOPIC
from homeassistant.components.mqtt.vacuum import schema_legacy as mqttvacuum
from homeassistant.components.m... | |
#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
import bottle
import cgitb
import gevent
from cfgm_common import jsonutils as json
import logging
from pprint import pformat
import requests
import sys
import string
import ConfigParser
from pysandesh.sandesh_base import *
from pysandesh.sandesh_log... | |
import json
import unittest
from libsaas import http, port
from libsaas.executors import test_executor
from libsaas.services import base, desk
class DeskTestCase(unittest.TestCase):
def setUp(self):
self.executor = test_executor.use()
self.executor.set_response(b'{}', 200, {})
self.serv... | |
# Copyright (C) 2018 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# Python 2/3 Compatibility (ICU-20299)
# TODO(ICU-20301): Remove this.
from __future__ import print_function
from abc import abstractmethod
import copy
import sys
from . import *
from . import ut... | |
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses... | |
# Copyright 2012 10gen, 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, softw... | |
import matplotlib
import numpy as np
from scipy.misc import toimage
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import Grid
from library.datasets.dataset import Dataset
class CIFARBase:
def __init__(self,
num_images=1.0,
one_hot_encode=False,
tr... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018 Nicolai Buchwitz <nb@tipi-net.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 = {
'metadata_version': '1.1'... | |
# 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 ... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
r"""This script crawls experiment directories for results and aggregates them.
Usage example:
MODELS_DIR="/tmp/models"
bazel run single_task:aggregate_experiment_results -- \
--models_dir="$MODELS_DIR" \
... | |
import asyncio
import pytest
import aioredis
async def _reader(channel, output, waiter, conn):
await conn.execute('subscribe', channel)
ch = conn.pubsub_channels[channel]
waiter.set_result(conn)
while await ch.wait_message():
msg = await ch.get()
await output.put(msg)
@pytest.mark.ru... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Cloudscaling Group, 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/LI... | |
# Copyright (c) 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 ... | |
'''
Created on Nov 29, 2016
@author: jphelps
'''
import sys
import os
from os import listdir
from os.path import isfile, join
import csv
import re
import psycopg2
import time
clist = []
def insertValues(cur, conn, crsdict, mlist, slist):
#PREPARE COURSE INSERT
# print crsdict['cid']
# cur.execute("""IN... | |
from collections import Mapping, Sequence
from warnings import warn
from .common import string, SchemaDefinitionError, InputDataError,\
InputDataWarning
from .lib_interface import YAMLTaggedValue
__all__ = ['SchemaRepository', 'SchemaDefinitionError']
class AnonymousClass(Mapping):
def __contains__(self, k... | |
#!/usr/bin/env python3
import binascii
import logging
import time
import uuid
import socket
from pykms_Structure import Structure
from pykms_DB2Dict import kmsDB2Dict
from pykms_PidGenerator import epidGenerator
from pykms_Filetimes import filetime_to_dt
from pykms_Sql import sql_initialize, sql_update, sql_update_ep... | |
from __future__ import unicode_literals
import keyword
import re
from optparse import make_option
from django.core.management.base import NoArgsCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS
#from django.utils import six
class Command(NoArgsCommand):
help = "Introspects the database ta... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# smoke_zephyr/utilities.py
#
# 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 l... | |
from django import forms, template
from django.forms.formsets import all_valid
from django.forms.models import modelform_factory, modelformset_factory, inlineformset_factory
from django.forms.models import BaseInlineFormSet
from django.contrib.contenttypes.models import ContentType
from django.contrib.admin import widg... | |
# Copyright (c) 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/licen... | |
# 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 sys
import numpy as np
import threading
import queue
import uuid
from .AudioHardware import *
from .mach_time import *
from .stream import IOStream, InArrayStream, OutArrayStream
defInBufSize = defOutBufSize = 2048
# all timestamps are compatible with time.monotonic(), which internally uses mach_absolute_time
... | |
"""Unit tests for Superset"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import csv
import doctest
import json
import logging
import io
import random
import unittest
from flask import escape
from superset import... | |
# 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 agreed to in... | |
import inspect
import logging
import os
import signal
import socket
import sys
import time
from optparse import OptionParser
import gevent
import locust
from . import events, runners, web
from .core import HttpLocust, Locust
from .inspectlocust import get_task_ratio_dict, print_task_ratio
from .log import console_lo... | |
#!/usr/bin/python
# ----------------------------------------------------------------------------
# modify the runtime template for prebuilt engine
#
# Copyright 2014 (C) zhangbin
#
# License: MIT
# ----------------------------------------------------------------------------
'''
modify the runtime template for prebuilt ... | |
# ------------------------------------------------------------------------------
# Copyright (c) 2010-2013, EVEthing team
# 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... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import logging
from math import ceil
import sys
import numpy as np
import tensorflow as tf
VGG_MEAN = [103.939, 116.779, 123.68]
class FCN16VGG:
def __init__(self, vgg16_npy_path=None):
... | |
import json
import os
import string
import uuid
from copy import copy
from datetime import datetime
from django.apps import apps
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
import commonware.log
import jinja2
from tower import ugettext as _
import mkt
fr... | |
from functools import reduce
from SDWLE.agents.trade.util import memoized
class FakeCard:
def __init__(self, card):
self.health = card.health
self.attack = card.base_attack
self.base_attack = card.base_attack
if hasattr(card, "taunt"):
self.taunt = card.taunt
class Tr... | |
#!/usr/bin/env python
"""
A memcached test server.
Copyright 2013 Zynga Inc.
Copyright (c) 2007 Dustin Sallings <dustin@spy.net>
"""
import asyncore
import random
import string
import socket
import struct
import time
import hmac
import heapq
import os
import sys
import memcacheConstants
from memcacheConstants impo... | |
# Copyright 2001-2004 Brad Chapman.
# Revisions copyright 2009-2013 by Peter Cock.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""General mechanisms to access applications i... | |
# 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
# ... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD (3-clause)
import numpy as np
from .epochs import Epochs
from .utils import check_fname, logger, verbose, _check_option
from .io.open import fiff_open
from .io.pick import pick_types, pick_types_forward
from .io.proj import (Projection, _has... | |
from cslvr import *
"""
Things to Do:
insert boundary conditions that velocity goes to 0 at boundaries doesn't seem to try to calc that currently
start time steping so I can start trying to calculate changes in thickness
Obtain correct surface for flow to occur
split into subdomains to allow mainflow ... | |
from django.utils.datastructures import SortedDict
from tower import ugettext_lazy as _lazy
# The number of answers per page.
ANSWERS_PER_PAGE = 20
# The number of questions per page.
QUESTIONS_PER_PAGE = 20
# Highest ranking to show for a user
HIGHEST_RANKING = 100
# Special tag names:
ESCALATE_TAG_NAME = 'escala... | |
from __future__ import division
from datetime import datetime, timedelta
from django.test import TestCase
from django.core.exceptions import ValidationError
from model_mommy import mommy
from facilities.models import Facility
from ..models import (
CommunityHealthUnit,
CommunityHealthWorker,
CommunityHea... | |
"""Git-related utilities."""
import logging
import re
import git
from gitdb.util import hex_to_bin
from django.core.exceptions import ValidationError
from git.exc import BadName, InvalidGitRepositoryError, NoSuchPathError
from readthedocs.builds.constants import EXTERNAL
from readthedocs.config import ALL
from readt... | |
import sys
import math
from fractions import Fraction
import tft_utils
GROUP_ERR_VAR_PREFIX = "__g_err_"
TCAST_ERR_VAR_PREFIX = "__tc_err_"
ERR_VAR_PREFIX = "__err_"
ERR_SUM_PREFIX = "__errsum_"
ERR_TERM_REF_PREFIX = "__eterm_"
CNUM_PREFIX = "__cum"
PRESERVED_VAR_LABEL_PREFIXES = [GROUP_ERR_VAR_PREFIX, TCAST_... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import importlib
import sys
import os
import shutil
if 'GAE_SDK' in os.environ:
SDK_PATH = os.environ['GAE_SDK']
sys.path.insert(0, SDK_PATH)
import dev_appserver
dev_appserver.fix_sys_path()
else:
print "GAE_SDK en... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2020 BigML
#
# 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 ... | |
from __future__ import absolute_import
import io
import time
from ..codec import (has_gzip, has_snappy, has_lz4,
gzip_decode, snappy_decode,
lz4_decode, lz4_decode_old_kafka)
from .frame import KafkaBytes
from .struct import Struct
from .types import (
Int8, Int32, Int64,... | |
# Copyright 2017 The dm_control 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 i... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test descendant package tracking code."""
from test_framework.test_framework import BitcoinTestFramewo... | |
# 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.
"""Client configuration management.
This module holds the code for detecting and configuring the current client and
it's output directories.
It is responsib... | |
# ------------------------------------------------------------------------------
# Patch Bake to Image Manager
# ------------------------------------------------------------------------------
# Will Bake+Flatten the selected Patches and place the result in the Image Manager
# -------------------------------------------... | |
from functools import partial
import warnings
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import is_integer_dtype
import pandas as pd
from pandas import Series, isna
from pandas.core.arrays import DatetimeArray
import pandas.core.nanops as nanops
import ... | |
#!/usr/bin/env python
"""Provide a top level interface for master worker computing.
"""
__author__ = "Eric Heien <pymw@heien.org>"
__date__ = "10 April 2008"
import atexit
import pickle
import errno
import logging
import inspect
import os
import signal
import sys
import tempfile
import textwrap
import threading
impo... | |
# -*- coding: utf-8 -*-
# import
## batteries
from __future__ import print_function
import os
import sys
import argparse
from itertools import product,cycle
import string
## 3rd party
import numpy as np
import pandas as pd
## package
from pyTecanFluent import Utils
from pyTecanFluent import Fluent
from pyTecanFluent im... | |
#!/usr/bin/env python
import vtk
import numpy as np
from vmtk import vmtkscripts
from vmtk import vtkvmtk
import argparse
import itertools
import os
import math
import copy
def close_cell(section):
#assume the cell array of lines
section.BuildCells()
section.BuildLinks()
numberOfLinePoints = sect... | |
#!/usr/bin/env python
# coding: utf-8
#
# Example of synthesizing Halide schedules using OpenTuner. This program
# expects a compiled version of Halide to exist at ~/Halide or at the location
# specified by --halide-dir.
#
# Halide programs must be modified by:
# 1) Inserting AUTOTUNE_HOOK(Func) directly after the al... | |
import ast
import datetime
import importlib
from furl import furl
import celery
from django import forms
from django.apps import apps
from django.conf.urls import url
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from django.contrib.admin.views.main import ChangeList
from django.c... | |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------... | |
# Copyright 2015 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, s... | |
# Created by GeoScan Ltd. (http://geoscan.aero)
#
# This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts
import Metashape as ps
import math, time
# Checking compatibility
compatible_major_version = "1.5"
found_major_version = ".".join(ps.app.version.split('.')[... | |
#
# 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... | |
"""
CQLEngine-Session
Your cqlengine model must inherit from cqlengine_session.SessionModel instead
of cqlengine.model.Model
SessionModel will replace youl SessionModel declarations with classes of type
IdMapModel. Your model module will get classes of type Model with an
underscore prefixed to the name.
example:
cl... | |
import datetime
from psoc_4m_base import *
class PSOC_4M_MOISTURE_UNIT(PSOC_BASE_4M):
def __init__(self,instrument):
self.system_id = 0x201
PSOC_BASE_4M.__init__( self, instrument, self.system_id)
# additional write address definitions definitions
self.check_one_wire_pres... | |
"""
:codeauthor: Nicole Thomas <nicole@saltstack.com>
"""
import os
import pytest
import salt.utils.files
from salt.exceptions import CommandExecutionError
from tests.support.case import ModuleCase
from tests.support.helpers import random_string, runs_on
# Create user strings for tests
ADD_USER = random_string("... | |
#!/usr/bin/env python3
#
# Copyright 2016 Red Hat, Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the MIT License. Please see the LICENSE file or
# http://opensource.org/licenses/MIT.
from django.conf.urls import url
from django.http import HttpResponseForbidden, Http404, HttpResp... | |
"""Support for tracking consumption over given periods of time."""
from datetime import timedelta
import logging
from croniter import croniter
import voluptuous as vol
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.const import CONF_NAME
from homeassistant.helpers import discov... | |
# Copyright (c) 2014, Salesforce.com, 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 list of conditions... | |
# Copyright 2010-2012 Opera Software ASA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | |
import os
import unittest
import time
import pytest
from integration_tests.env_variable_names import (
SLACK_SDK_TEST_INCOMING_WEBHOOK_URL,
SLACK_SDK_TEST_INCOMING_WEBHOOK_CHANNEL_NAME,
SLACK_SDK_TEST_BOT_TOKEN,
)
from slack_sdk.web import WebClient
from slack_sdk.webhook import WebhookClient
from slack_s... | |
# Copyright 2020 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2012 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... | |
from __future__ import unicode_literals
from copy import copy
import os
import shutil
import sys
import tempfile
from django.apps import apps
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import CommandError
from django.db import connections, DEFAUL... | |
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | |
import dateparser
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import * # noqa
from typing import Callable, Dict, List, Any, Union, Tuple
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
''' CONSTANTS '''
INTEGRATION_N... | |
# -*- coding: utf-8 -*-
"""SQLite parser plugin for Google Hangouts conversations database files."""
from __future__ import unicode_literals
from dfdatetime import posix_time as dfdatetime_posix_time
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import definitions
from p... | |
import torch
from torch import nn
from qelos.basic import DotDistance, CosineDistance, ForwardDistance, BilinearDistance, TrilinearDistance, Softmax, Lambda
from qelos.rnn import RecStack, Reccable, RecStatefulContainer, RecStateful, RecurrentStack, RecurrentWrapper
from qelos.util import issequence
# region attentio... | |
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.
# Copyright (c) 2015, Google, Inc.
#
# 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
... | |
import math, types
from phycas.pdfgen import *
from phycas.utilities.CommonFunctions import CommonFunctions
from phycas.utilities.GlobalState import readFile
from phycas.phylogeny import Tree
class PDFTree(CommonFunctions):
def __init__(self):
CommonFunctions.__init__(self, None)
self.pdf_splits_to... | |
#!/usr/bin/python
# Copyright KOLIBERO under one or more contributor license agreements.
# KOLIBERO licenses this file to You 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... | |
"""
Improved support for Microsoft Visual C++ compilers.
Known supported compilers:
--------------------------
Microsoft Visual C++ 9.0:
Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64)
Microsoft Windows SDK 6.1 (x86, x64, ia64)
Microsoft Windows SDK 7.0 (x86, x64, ia64)
Microsoft Visual C++ 10.0... | |
# Copyright (C) 2016 DNAnexus, Inc.
#
# This file is part of dx-toolkit (DNAnexus platform client libraries).
#
# 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... | |
import os.path
import tempfile
from unittest import TestCase
from lxml import etree
from mock import Mock, patch
from regparser.builder import (
Builder, Checkpointer, LayerCacheAggregator, NullCheckpointer)
from regparser.tree.struct import Node
class BuilderTests(TestCase):
@patch.object(Builder, 'merge_c... | |
# Copyright 2015-2017 Capital One Services, 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 ... | |
# Copyright (c) 2016-2020, Neil Booth
# Copyright (c) 2017, the ElectrumX authors
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
'''Interface to the blockchain database.'''
import array
import ast
import os
import time
from bisect impor... | |
#!/usr/bin/env python
# Copyright 2020 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 unittest
import apply_edits
def _FindPHB(filepath):
return apply_edits._FindPrimaryHeaderBasename(filepath)
class FindPri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.