gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from typing import Union
from pytest import raises
from graphql import graphql_sync
from graphql.language import parse, print_ast
from graphql.type import (
GraphQLArgument,
GraphQLBoolean,
GraphQLEnumValue,
GraphQLField,
GraphQLFloat,
GraphQLID,
GraphQLInputField,
GraphQLInt,
Grap... | |
# coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | |
import collections
import os
import re
from os.path import dirname
from pathlib import Path
def handle_negation(file_path, rules):
matched = False
for rule in rules:
if rule.match(file_path):
if rule.negation:
matched = False
else:
matched = True... | |
# Copyright (c) 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
#!/usr/bin/env python
import argparse
import datetime
import io
from nltk.translate import bleu_score
import numpy
import progressbar
import six
import chainer
import chainer.functions as F
import chainer.links as L
from chainer import training
from chainer.training import extensions
import chainerx
UNK = 0
EOS = ... | |
#!/usr/bin/env python
import argparse
import cPickle
import traceback
import logging
import time
import sys
import numpy
import theano
from collections import OrderedDict
import experiments.nmt
from experiments.nmt import\
RNNEncoderDecoder,\
prototype_phrase_state,\
parse_input
from experiments.nmt.num... | |
"""distutils.command.bdist_wininst
Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program."""
__revision__ = "$Id$"
import sys
import os
import string
from sysconfig import get_python_version
from distutils.core import Command
from distutils.dir_util import remove_tree
from distut... | |
"""ResNet training script, with some code from
https://github.com/tensorflow/models/tree/master/resnet.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import numpy as np
import ray
import tensorflow as tf
import cifar_input
i... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# htt... | |
import base64
from winrm.http.transport import HttpPlaintext, HttpKerberos
from datetime import timedelta
import uuid
from isodate.isoduration import duration_isoformat
import xmlwitch
import xml.etree.ElementTree as ET
class WinRMWebService(object):
"""
This is the main class that does the SOAP request/respon... | |
import itertools
from hazelcast.future import combine_futures, ImmediateFuture
from hazelcast.protocol.codec import map_add_entry_listener_codec, map_add_entry_listener_to_key_codec, \
map_add_entry_listener_with_predicate_codec, map_add_entry_listener_to_key_with_predicate_codec, \
map_add_index_codec, map_cle... | |
# 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 applicable ... | |
"""Heuristic-based algorithm to find the family trees in the titanic data.
Only involves a few parameters, all of which are related to age
(e.g. minimum age for marriage). See the constant defined at the
top for all of them. Neither iterative nor stochastic methods are
used.
First a graph of individuals is constructe... | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Interfaces for handling BIDS-like neuroimaging structures."""
from collections import defaultdict
from json import dumps, loads
from pathlib import Path
from shutil import copytree, rmtree
from pkg_resou... | |
#!/usr/bin/python
#this is a conglomerate of fasta-fixing scripts, now called FISH (FASTA ID SWAPPING HELPER) because lol i can acronym.
##
#last edit abigailc@Actaeon Sept 7 2016
#things this doesn't do: play super nice with accession numbers instead of GI numbers. probably easy to convert, (see that one script that ... | |
"""Module responsible for adding generated test cases to a project.
Client of this module should use it through add_test_case_to_project() function.
"""
import os.path
from pythoscope.logger import log
from pythoscope.util import max_by_not_zero, module_path_to_name
from pythoscope.store import Module, TestClass, co... | |
#
# 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... | |
# Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | |
# 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... | |
## @file
# This file is used to define common string related functions used in parsing process
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies ... | |
# 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 ... | |
# Copyright 2012 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... | |
# This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from datetime import timedelta
from sqlalchemy import DDL
from s... | |
# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Handlers used for custom attribute columns."""
from dateutil.parser import parse
from sqlalchemy import and_
from ggrc import models
from ggrc.converters import errors
from ggrc.converters.handlers imp... | |
import pytest
import io
import os
import json
import base64
import hashlib
import aiohttpretty
from waterbutler.core import streams
from waterbutler.core import exceptions
from waterbutler.core.path import WaterButlerPath
from waterbutler.core.provider import build_url
from waterbutler.providers.github import GitHu... | |
import os
import json
from shutil import copyfile, rmtree
from docker.tls import TLSConfig
from docker.errors import ContextException
from docker.context.config import get_meta_dir
from docker.context.config import get_meta_file
from docker.context.config import get_tls_dir
from docker.context.config import get_context... | |
#!/usr/bin/env python
# coding: utf-8
# Copyright (C) USC Information Sciences Institute
# Author: Vladimir M. Zaytsev <zaytsev@usc.edu>
# URL: <http://nlg.isi.edu/>
# For more information, see README.md
# For license information, see LICENSE
import gc
import os
import lz4
import plyvel
import logging
import StringIO... | |
from __future__ import with_statement
#!/usr/bin/env python
#
# Copyright 2012 cloudysunny14
#
# 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... | |
"""Detaches a disk volume from a virtual machine."""
from baseCmd import *
from baseResponse import *
class detachVolumeCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "true"
"""the device ID on the virtual machine where volume is detached from"""
self.deviceid = None
... | |
import numpy as np
from numpy.testing import assert_allclose
from pytest import raises as assert_raises
from scipy.stats import (binned_statistic, binned_statistic_2d,
binned_statistic_dd)
from scipy._lib._util import check_random_state
from .common_tests import check_named_results
class Tes... | |
"""Test applying the Identity Law to tree nodes."""
from ._helpers import ExpressionTreeAndNodeTestCase
class TestNodeApplyIdentityLaw(ExpressionTreeAndNodeTestCase):
def test_single_operand(self):
"""Test expressions of single operands."""
for symbol in ('A', 'operand', '0', '1'):
r... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nicira Networks, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | |
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from swaggyjenkins.m... | |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
InterlisDialog
A QGIS plugin
Interlis Import/Export
-------------------
begin : 2014-01-18
copyright : (C) 20... | |
import collections
from django.conf import settings
from django.db.transaction import non_atomic_requests
from django.http import (Http404, HttpResponsePermanentRedirect,
HttpResponseRedirect)
from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.cache i... | |
"""A connection adapter that tries to use the best polling method for the
platform pika is running on.
"""
import abc
import collections
import errno
import heapq
import logging
import select
import time
import threading
import pika.compat
from pika.adapters.utils import nbio_interface
from pika.adapters.base_connec... | |
import json
import logging
import requests
import os
import pexpect
import yaml
import shutil
from cStringIO import StringIO
from tempfile import NamedTemporaryFile
from teuthology.config import config as teuth_config
from teuthology.exceptions import CommandFailedError, AnsibleFailedError
from teuthology.repo_utils ... | |
"""*Returns weather forecast for a location.*
This module can search weather reports using Wunderground API.
Weather reports consist of a current weather in observation location,
a 3 day weather forecast and distance from observation location to
the requested location. Module also features an interactive mode where us... | |
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017 dpa-infocom GmbH
#
# 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 appl... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import inspect
import unittest
import warnings
from scrapy.utils.deprecate import create_deprecated_class, update_classpath
from tests import mock
class MyWarning(UserWarning):
pass
class SomeBaseClass(object):
pass
class NewName(SomeBaseClas... | |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | |
"""Module for unittest parent class."""
import os
import unittest
import bot.lib.lib as lib
def additional_tests():
return unittest.defaultTestLoader.discover("..")
class TestBot(unittest.TestCase):
"""Test class that all bot unittets should subclass."""
def setUp(self):
"""Get config, set s... | |
from __future__ import unicode_literals
from django.contrib import messages
from django.db import transaction
from django.shortcuts import get_object_or_404, redirect
from django.template.context_processors import csrf
from django.template.response import TemplateResponse
from django.utils.translation import ugettext_... | |
from __future__ import print_function
import os
import ast
import json
import glob
import re
import sys
import demisto_client
from threading import Thread, Lock
from demisto_sdk.commands.common.tools import run_threads_list
from google.cloud.storage import Bucket
from packaging.version import Version
from typing impor... | |
from __future__ import unicode_literals
from django.db import models
from django.db.models import Q
from django import forms
from django.apps import apps
from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from djan... | |
# Copyright (c) 2015 Tencent Inc.
# All rights reserved.
#
# Author: Li Wenting <wentingli@tencent.com>
# Date: August 28, 2015
"""
This is the maven module which manages jar files downloaded
from maven repository
"""
import os
import shutil
import subprocess
import time
import configparse
import console
def i... | |
"""Script to check the configuration file."""
from __future__ import annotations
import argparse
import asyncio
from collections import OrderedDict
from collections.abc import Callable, Mapping, Sequence
from glob import glob
import logging
import os
from typing import Any
from unittest.mock import patch
from homeass... | |
"""
* English / US language file
*
*
* $Id$
*
"""
trans = {
# Login form
'Login' : 'Log in',
'Log out' : 'Log out',
'Username' : 'Username',
'Password' : 'Password',
'Login failed' : 'Failed to log in to VirtualBox Web Console. Please check your username and password.',
# General actions
'File' : 'Fi... | |
""" Utilities for dealing with NTP time stamps """
__author__ = 'Luke Campbell <LCampbell@ASAScience.com>, Michael Meisinger'
import time
import datetime
import struct
import numbers
try:
import numpy as np
except ImportError:
np = None
class NTP4Time(object):
"""
Utility wrapper for handling time i... | |
"""
Settings and configuration for wallabag-cli.
"""
import base64
import json
import time
from collections import OrderedDict
from Crypto.Cipher import AES
from Crypto.Hash import MD5
import getpass
import math
import os
from pathlib import Path
import socket
from sys import exit
CONFIG_DIRECTORY = os.path.expanduser... | |
import numpy as np
from numpy.core.multiarray import _vec_string
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_raises,
assert_raises_regex
)
kw_unicode_true = {'unicode': True} # make 2to3 work properly
kw_unicode_false = {'unicode': False}
class TestBasic:
def test_f... | |
# Copyright 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/mnt/hgfs/tmpcode/pyqt-http/untitled.ui'
#
# Created: Fri Jun 5 10:59:33 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
import socket
import signal
im... | |
"""
@package mi.dataset.parser.test
@file marine-integrations/mi/dataset/parser/test/test_spkir_abj_cspp.py
@author Jeff Roy
@brief Test code for a spkir_abj_cspp data parser
spkir_abj_cspp is based on cspp_base.py
test_dosta_abcdjm_cspp.py fully tests all of the capabilities of the
base parser. That level of testin... | |
import xml.etree.ElementTree as etree
import pandas as pd
import numpy as np
# TODO: add to_pi_json() method. (Both PiTimeSeries and PiTimeSeriesCollection should be able to call this method)
# TODO: adapt to_pi_xml() and to_pi_json() from PiTimeSeries by Mattijn. Probably more robust write methods.
class PiBase:
... | |
#!/usr/bin/env python
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#
##########################################################################
###################... | |
try:
from urllib import quote
except ImportError as e:
from urllib.parse import quote
from woeid import WoeidError
from six import string_types
__author__ = 'Renchen'
class Filters:
"""A class that encapsulates all filters
Args:
q(``str`` or ``tuple``, optional):
Specify a place name to search for or a tu... | |
# 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... | |
from __future__ import unicode_literals
import pytest
from textx import metamodel_from_str, TextXSyntaxError
def test_modifier_separator_zeroormore():
model = """
Rule:
("a"|"b")*[','];
"""
metamodel = metamodel_from_str(model)
model = metamodel.model_from_str("a,b, a, b")
assert mode... | |
# 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... | |
import os
import sys
import time
import subprocess
import logging
from StringIO import StringIO
from Pegasus.netlogger.analysis.schema import stampede_dashboard_schema as dash
from pegasus.service import app, db, em, tests, catalogs, ensembles
from pegasus.service.tests import *
class TestWorkflowProcessor:
def ... | |
#!/usr/bin/env python
# Copyright 2015 Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | |
#!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | |
import os
import yaml
import lasagne
import pandas as pd
import numpy as np
from network import Network
import architectures as arches
L = lasagne.layers
# loads data with names according to autoload_data.py
from autoload_data import *
# load specs for all networks
with open('arch_specs.yaml') as archfile:
arch... | |
import datetime
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core import mail
from django.core.exceptions import ImproperlyConfigured
from django.core.handlers.wsgi import WSGIRequest
from django.t... | |
"""
LICENCE
-------
Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
"""
"""
Class for loading boolean expression trees
and returning sql to get the results
"""
im... | |
from django.conf import settings
from django.contrib.auth.models import User, Permission
from django.core.urlresolvers import reverse
from django.test import TestCase
from package.models import Category, Package, PackageExample
from package.tests import initial_data
from profiles.models import Profile
class Functio... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Steve English <steve.english@navetas.com> #
# Copyright 2012 Vincent Jacques <vincent@vincent-ja... | |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Test the hunt_view interface."""
from absl import app
from grr_response_server.gui import gui_test_lib
from grr.test_lib import test_lib
class TestHuntControl(gui_test_lib.GRRSeleniumHuntTest):
"""Test the hunt start/stop/delete functionality."""
def testToolb... | |
# -*- coding: utf-8 -*-
"""Indexing hdf5 files"""
from __future__ import unicode_literals
# NOTICE: THIS FILE IS ALSO PART OF THE CLIENT. IT SHOULD NOT CONTAIN
# REFERENCES TO THE SERVER OR TWISTED PKG.
ext = '.h5'
import os
try:
from cPickle import dumps, loads
except:
from pickle import dumps, loads
unic... | |
#!/usr/bin/env python
from __future__ import print_function
import sys
import os
import matplotlib
if matplotlib.get_backend() != "TKAgg":
matplotlib.use("TKAgg")
import pmagpy.pmagplotlib as pmagplotlib
import pmagpy.pmag as pmag
def save_redo(SpecRecs,inspec):
print("Saving changes to specimen file")
p... | |
#!/usr/bin/env python
"""
Create a batch configuration script to submit to a cluster.
"""
from __future__ import division, absolute_import, print_function
import os
import argparse
import yaml
import healpy as hp
import numpy as np
import glob
import redmapper
import redmapper.parsl_templates as parsl_templates
def... | |
# -*- coding: utf-8 -*-
'''
SoftLayer Cloud Module
======================
The SoftLayer cloud module is used to control access to the SoftLayer VPS
system.
Use of this module only requires the ``apikey`` parameter. Set up the cloud
configuration at:
``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/soft... | |
# 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... | |
import asyncio
import pytest
import async_timeout
from grpclib.const import Status
from grpclib.testing import ChannelFor
from grpclib.exceptions import GRPCError
from grpclib.health.check import ServiceCheck, ServiceStatus
from grpclib.health.service import Health
from grpclib.health.v1.health_pb2 import HealthCheck... | |
import collections
import numpy as np
import openpnm as op
import openpnm.models.physics as pm
from numpy.testing import assert_allclose
from sympy import ln as sym_ln
from sympy import symbols
class GenericSourceTermTest:
def setup_class(self):
self.net = op.network.Cubic(shape=[5, 5, 5])
Ps = se... | |
import argparse
import os
import json
import collections
from subprocess import call
parser = argparse.ArgumentParser(description='CUE!')
options = parser.add_argument_group('Options')
options.add_argument('-p', '--project',
help='Specify the target project for the task',
requ... | |
"""A wrapper around DBAPI-compliant databases to support iteration
and generator expression syntax for requests, instead of SQL
To get an iterator, initialize a connection to the database, then
set the cursor attribute of the query class to its cursor
Create an instance of Table for the tables you want to use
Then y... | |
# Copyright (c) 2010-2012 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... | |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for grit.clique'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join(os.path.dirname(sy... | |
from __future__ import print_function
import numpy as np
import matplotlib.pylab as plt
from openmdao.api import IndepVarComp, Component, Group, Problem, ExecComp, ScipyOptimizer
class UnderwaterOptimization(Component):
"""
Notes
-----
Estimates tube tunnel cost and pylon material cost
Optimizes t... | |
# Copyright (c) 2014 Evalf
#
# 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, merge, publish, distribute, s... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
# -*- coding: utf-8 -*-
#
# 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
#... | |
# 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 common_fixtures import * # NOQA
from cattle import ApiError
from test_physical_host import disable_go_machine_service # NOQA
@pytest.fixture(scope='module')
def update_ping_settings(request, super_client):
# These settings need changed because they control how the logic of the
# ping handlers behave in... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, absolute_import
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import validate_email_add, get_fullname, strip_html, cstr
from fra... | |
#!/usr/bin/env python2.6
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2011,2013 Contributor
#
# 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... | |
# -*- coding: utf-8 -*-
"""
goodness_of_fit.py
RAPIDpy
Created by Alan D Snow, 2015.
Based on RAPID_Toolbox for ArcMap
License: BSD 3-Clause
"""
from __future__ import print_function
from csv import writer as csvwriter
import numpy as np
from ..dataset import RAPIDDataset
# ---------------------... | |
"""
Unit tests for the frontend code.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import ga4gh.frontend as frontend
import ga4gh.protocol as protocol
import tests.utils as utils
class TestFrontend(unittest.TestCase):
"""
T... | |
import requests
import re
import ssl
import json
import time
jobStatus = {"Failure": -1, "Pending": 0, "Processing": 1, "Success": 2, "Failure": 3}
def getUrl(url):
"""
Return a URL from a hostname
"""
if "https" in url: return url
if "http" in url:
# Remove http and add https
retu... | |
# Author: Madhumita Subramaniam
from java.util import Arrays, Date
from java.io import IOException
from java.lang import Enum
from org.gluu.oxauth.service.net import HttpService
from org.gluu.service.cdi.util import CdiUtil
from org.gluu.oxauth.security import Identity
from org.gluu.model.custom.script.type.auth import... | |
from compiler import *
ui_strings = [
("music_volume", "Music Volume:"),
("sound_volume", "Sound Volume:"),
("mouse_sensitivity", "Mouse Sensitivity:"),
("invert_mouse_y_axis", "Invert Mouse Y Axis"),
("enabled", "Enabled"),
("disabled", "Disabled"),
("damage_to_player", "Damage to Player:... | |
# ===============================================================================
# Copyright 2011 Jake Ross
#
# 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... | |
# 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 ... | |
# TODO(jiayq): as more and more tests are moving to hypothesis test, we
# can gradually remove this test script. DO NOT ADD MORE TESTS TO THIS
# FILE.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
... | |
################################################################################################
### nlpTranslation
### Richard Mau ALLTEMPS, Richard Boyce PhD
### April 8, 2015
################################################################################################
from xml.etree.ElementTree import Element, Su... | |
#Embedded file name: ACEStream\Video\Ogg.pyo
import sys
import os
from cStringIO import StringIO
DEBUG = False
def is_ogg(name):
return name.endswith('.ogg') or name.endswith('.ogv') or name.endswith('ogm') or name.endswith('oga') or name.endswith('ogx')
def ogg_grab_page(input, checkcrc = False):
capture_pa... | |
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.