gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright (c) 2018 European Organization for Nuclear Research.
# 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/LIC... | |
#!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2003, 2004, 2005, 2006 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
# Test usage of searched-libs: one which are found via -l
# switch to the linke... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2016 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import test_framework.loginit
from test_framew... | |
"""Test the Network Configuration."""
from ipaddress import IPv4Address
from unittest.mock import MagicMock, Mock, patch
import ifaddr
from homeassistant.components import network
from homeassistant.components.network.const import (
ATTR_ADAPTERS,
ATTR_CONFIGURED_ADAPTERS,
DOMAIN,
MDNS_TARGET_IP,
... | |
# Django settings for unit test project.
from __future__ import unicode_literals
import os
import sys
from django.core.urlresolvers import reverse_lazy
from cmsplugin_cascade.extra_fields.config import PluginExtraFieldsConfig
from cmsplugin_cascade.utils import format_lazy
DEBUG = True
BASE_DIR = os.path.dirname(_... | |
import sys
import os.path
import platform
from PyQt5.QtWidgets import QApplication, QDialog, QVBoxLayout, QGridLayout, QLabel, QLineEdit, QCheckBox, QPushButton, QMessageBox, QFileDialog, QColorDialog, QSpinBox, QTableWidget
from PyQt5.QtGui import QIcon, QColor
from PyQt5.QtCore import QRegExp, Qt
class BaseDialog(Q... | |
'''
Implements the targetcli target related UI.
This file is part of LIO(tm).
Copyright (c) 2011-2014 by Datera, 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/licen... | |
from datetime import datetime, timedelta
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import FieldListFilter
from django.contrib.admin.exceptions import (
DisallowedModelAdminLookup, DisallowedModelAdminToField,
)
from django.contrib.admin.... | |
# Copyright (c) 2015 Michael Strosaker
# MIT License
# http://opensource.org/licenses/MIT
import math
from utils import dataset, fold_change
from services import mine_protein
from ontology import go
class _feature_row:
def __init__(self, feature, description, gene, protein_id):
if isinstance(feature, base... | |
import mimetypes
import os
import random
import time
from email import Charset, Encoders
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from email.Utils import formatdate, getaddresses, formataddr
from django.conf im... | |
#!/usr/bin/env python
#Copyright 2012-2013 SAP Ltd
#
# 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... | |
"""The IPython kernel implementation"""
import asyncio
from contextlib import contextmanager
from functools import partial
import getpass
import signal
import sys
from IPython.core import release
from ipython_genutils.py3compat import builtin_mod, PY3, unicode_type, safe_unicode
from IPython.utils.tokenutil import to... | |
# 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 -*-
"""Pure python implementation of the binary Tokyo Tyrant 1.1.17 protocol
Tokyo Cabinet <http://tokyocabinet.sourceforge.net/> is a "super hyper ultra
database manager" written and maintained by Mikio Hirabayashi and released
under the LGPL.
Tokyo Tyrant is the de facto database server for Toky... | |
"""Provides helper methods to handle the time in HA."""
import datetime as dt
import re
import pytz
DATE_STR_FORMAT = "%Y-%m-%d"
UTC = DEFAULT_TIME_ZONE = pytz.utc
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.
# https://github.com/django/django/blob/master/LICENSE
DA... | |
# Copyright 2014 Dirk Pranke. 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... | |
"""
DogStatsApi is a tool for collecting application metrics without hindering
performance. It collects metrics in the application thread with very little overhead
and allows flushing metrics in process, in a thread or in a greenlet, depending
on your application's needs.
"""
import logging
import socket
from functool... | |
#!/usr/bin/env python
from __future__ import print_function
import optparse
import os
import pwd
import signal
import subprocess
import sys
import time
import traceback
from six.moves.urllib.parse import urlunparse
from tornado import httpclient
from tornado import httputil
from tornado import gen
from tornado impor... | |
#!/usr/bin/env python3
import os
import time
import signal
import shutil
import json
from submitty_utils import dateutils
import multiprocessing
import contextlib
import traceback
import zipfile
from pathlib import Path
from autograder import grade_item
from autograder import config as submitty_config
# ============... | |
from contextlib import contextmanager
import filecmp
import functools
import os
import posix
import stat
import sys
import sysconfig
import tempfile
import time
import uuid
import unittest
from ..xattr import get_all
from ..platform import get_flags
from ..helpers import umount
from .. import platform
# Note: this is... | |
# encoding: utf-8
"""
A mixin for :class:`~IPython.core.application.Application` classes that
launch InteractiveShell instances, load extensions, etc.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import glob
from itertools import chain
import os
import sys
... | |
"""
This module contains functions to:
- solve a single equation for a single variable, in any domain either real or complex.
- solve a system of linear equations with N variables and M equations.
"""
from __future__ import print_function, division
from sympy.core.sympify import sympify
from sympy.core impor... | |
# 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 ... | |
import asyncio
import os
import importlib.util
import importlib.machinery
import sys
import types
import typing
import traceback
from mitmproxy import addonmanager
from mitmproxy import exceptions
from mitmproxy import flow
from mitmproxy import command
from mitmproxy import eventsequence
from mitmproxy import ctx
imp... | |
import urllib2
import pandas as pd
import argparse
moduli_validi = ['442', '451', '433', '343', '352', '532', '541']
def download_voti(giornata):
'''
Questo metodo scarica da Pianetafantacalcio il file .xls contenente i voti della giornata selezionata.
:param giornata:
:return:
'''
results = '... | |
from . import modifiers
from ..datasources import parent_revision, revision
from .feature import Feature
from .revision import bytes as revision_bytes
from .util import MARKUP_RE, NUMERIC_RE, SYMBOLIC_RE
################################## Bytes #######################################
def process_bytes(parent_revisio... | |
# Copyright 2016 The Gemmlowp 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... | |
# 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... | |
#!/usr/bin/env python
import argparse
import logging
import os.path
import sys
import numpy as np
import numpy.random as rnd
import pexpect
from qrsim.tcpclient import UAVControls
from scipy.stats import gaussian_kde
import tables
import behaviors
from config import instantiate, load_config
from client import TaskPl... | |
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
impo... | |
import astropy.wcs
import astropy.units as u
import astropy.coordinates as astroCoords
import numpy as np
import matplotlib.mlab as mlab
import astropy.convolution as conv
import matplotlib.pyplot as plt
from createImage import createImage as ci
from astropy.io import fits
from scipy.spatial.distance import euclidean
f... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import warnings
import numpy as np
from math import pi
import unittest
import os
from monty.os.path import which
from pymatgen.analysis.local_env import ValenceIonicRadiusEvaluator, \
VoronoiNN, JmolNN, M... | |
"""
SoftLayer.tests.managers.vs_tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:license: MIT, see LICENSE for more details.
"""
import mock
import SoftLayer
from SoftLayer import exceptions
from SoftLayer import fixtures
from SoftLayer import testing
class VSTests(testing.TestCase):
def set_up(self):
... | |
# Copyright (c) 2009-2021 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause
# License.
# Maintainer: joaander / All Developers are free to add commands for new
# features
"""Compute system properties."""
from hoomd.md import _md
from hoomd.operat... | |
import socket
from threading import *
import json
import os
import cv2
import numpy as np
from matplotlib import pyplot as plt
# Declare socket parameters
host = "192.168.1.84"
port = 60000
print (host)
print (port)
n = 1
global existMoments
existMoments = float(0.0)
global image
global M
class client(Thread):
de... | |
# -*- coding: utf-8 -*-
#
# Desc: This file is part of the ecromedos Document Preparation System
# Author: Tobias Koch <tobias@tobijk.de>
# License: MIT
# URL: http://www.ecromedos.net
#
import os, re
from lxml import etree
import com.lepture.mistune as mistune
from net.ecromedos.configreader import ECMDSConfi... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding index on 'Comment', fields ['date']
db.create_index('vkontakte_board_comment', ['date'])
#... | |
#!/usr/bin/env python3
# Copyright (c) 2017-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php.
"""Test recovery from a crash during chainstate writing.
- 4 nodes
* node0, node1, and node2 will have... | |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | |
'''
Created on 16.08.10
@author: klizardin
The MIT License (MIT)
Copyright (c) 2016 klizardin
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 limitatio... | |
# -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder Team
#
# 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/l... | |
from typing import Type, Container
import unittest
import pytest
import numpy as np
import sklearn.metrics
from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit
from autosklearn.pipeline.constants import SPARSE
from autosklearn.pipeline.components.regression.libsvm_svr import LibSVM_S... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.rdf
~~~~~~~~~~~~~~~~~~~
Lexers for semantic web and RDF query languages and markup.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups... | |
#
# Copyright 2013 Rackspace Hosting.
#
# Author: Monsyne Dragon <mdragon@rackspace.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | |
# 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 2013 Mirantis, Inc.
# Copyright 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
#
# Un... | |
import bpy, mathutils
from macouno import mesh_extras
# Select all faces (or deselect)
def all(invert=False):
for f in bpy.context.active_object.data.faces:
f.select = True
return
# Select all faces (or deselect)
def none():
for f in bpy.context.active_object.data.faces:
f.select = False
return
# Faces ... | |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | |
#!/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.
#
# Xcode supports build variable substitutions and CPP; sadly, that doesn't work
# because:
#
# 1. Xcode wants to do the Info.pli... | |
# This file is part of the REMOTE API
#
# Copyright 2006-2014 Coppelia Robotics GmbH. All rights reserved.
# marc@coppeliarobotics.com
# www.coppeliarobotics.com
#
# The REMOTE API is licensed under the terms of GNU GPL:
#
# -------------------------------------------------------------------
# The REMOTE API is fre... | |
# 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 ... | |
"""
Utility functions for computational geometry
Built around shapely.
"""
from __future__ import print_function, division, absolute_import
import math
from math import pi, sqrt
from numbers import Number as _Number
import array
from shapely.geometry import (
LineString, Polygon, Point, box, asPoint,
asPolygo... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
import logging
import logging.config
import os
import re
import warnings
from asyncio import CancelledError, Protocol, ensure_future, get_event_loop
from collections import defaultdict, deque
from functools import partial
from inspect import getmodulename, isawaitable, signature, stack
from socket import socket
from s... | |
try:
from urllib import quote, quote_plus, unquote_plus
except ImportError:
from urllib.parse import quote, quote_plus, unquote_plus #@UnresolvedImport
import socket
import os
import threading
import time
from _pydev_bundle import pydev_localhost
import subprocess
import sys
IS_PY3K = sys.version_info[0] >= ... | |
# 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 ... | |
"""
homeassistant.components.proximity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component to monitor the proximity of devices to a particular zone and the
direction of travel.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/proximity/
"""
import logging
from ... | |
"""
Tests for the crochet APIs.
"""
from __future__ import absolute_import
import threading
import subprocess
import time
import gc
import sys
import weakref
import tempfile
import os
import imp
import inspect
from unittest import SkipTest
from twisted.trial.unittest import TestCase
from twisted.internet.defer impor... | |
# Copyright 2017 Mycroft AI 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... | |
# util/langhelpers.py
# Copyright (C) 2005-2016 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
"""Routines to help with the creation, loading and introspection of
modules, cla... | |
# -*-coding:utf-8 -*
# Copyright (c) 2011-2015, Intel Corporation
# 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, thi... | |
#!/usr/bin/env python3
# This file is part of the Soletta Project
#
# Copyright (C) 2015 Intel Corporation. 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 ... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
# Copyright (c) 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.
import copy
import os.path
import re
from json_parse import OrderedDict
class ParseException(Exception):
"""Thrown when data in the model is invalid.... | |
import os
import mimetypes
try:
from io import StringIO
except ImportError:
from io import StringIO # noqa
from django.conf import settings
from django.core.files.base import File
from django.core.files.storage import Storage
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from d... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This sphinx extension adds a tools to simplify generating the API
documentation for Astropy packages and affiliated packages.
.. _automodapi:
========================
automodapi directive
========================
This directive takes a single argumen... | |
"""Project loader for reading BUILD and BUILD.conf files."""
import importlib
import sys
import traceback
import cobble.env
def load(root, build_dir):
"""Loads a Project, given the paths to the project root and build output
directory."""
# Create a key registry initialized with keys defined internally t... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""Strategy objects for creating ABINIT calculations."""
from __future__ import unicode_literals, division, print_function
import sys
import os
import abc
import collections
import copy
import six
import numpy ... | |
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import sys
import optparse
from glue import __version__
from glue.logger import logger
try:
from glue.utils.qt.decorators import die_on_error
except ImportError:
from glue.utils.decorators import die_on_error
def parse(... | |
# 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 ... | |
# -*- coding: utf-8 -*-
"""Tests for the artifact definitions readers."""
import io
import os
import unittest
from artifacts import definitions
from artifacts import errors
from artifacts import reader
class YamlArtifactsReaderTest(unittest.TestCase):
"""Class to test the YAML artifacts reader."""
def testRead... | |
###
# Copyright (c) 2002-2004, Jeremiah Fincher
# Copyright (c) 2009-2010, James McCoy
# 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 ... | |
import datetime
from unittest import skipIf, skipUnless
from django.db import connection
from django.db.models import Index
from django.db.models.deletion import CASCADE
from django.db.models.fields.related import ForeignKey
from django.db.models.query_utils import Q
from django.test import (
TestCase, Transaction... | |
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
"""The tests for hls streams."""
from datetime import timedelta
from io import BytesIO
import os
from unittest.mock import patch
import av
import pytest
from homeassistant.components.stream import create_stream
from homeassistant.components.stream.const import HLS_PROVIDER, RECORDER_PROVIDER
from homeassistant.compon... | |
import sys
import threading
import warnings
from collections import Counter, OrderedDict, defaultdict
from functools import partial
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
from django.utils import lru_cache
from .config import AppConfig
class Apps(object):
"""
A registry... | |
from __future__ import absolute_import, division, unicode_literals
from future.builtins import int, open, str
from hashlib import md5
import os
try:
from urllib.parse import quote, unquote
except ImportError:
from urllib import quote, unquote
from django.apps import apps
from django.contrib import admin
from ... | |
"""Test letsencrypt.client.revoker."""
import csv
import os
import pkg_resources
import shutil
import tempfile
import unittest
import mock
from letsencrypt.client import errors
from letsencrypt.client import le_util
from letsencrypt.client.plugins.apache import configurator
from letsencrypt.client.display import util... | |
from pymongo.collection import Collection as PymongoCollection
from pymongo.database import Database as PymongoDatabase
from pymongo.cursor import Cursor as PymongoCursor
from pymongo.common import WriteConcern
from pymongo import read_preferences as rp, helpers
from bson.binary import OLD_UUID_SUBTYPE
from bson.object... | |
# Copyright 2016 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 mock
from dashboard.pinpoint.models.quest import run_test
_SWARMING_TASK_EXTRA_ARGS = [
'test_suite', '--story-filter', 'test'... | |
#Embedded file name: ACEStream\Policies\RateManager.pyo
import sys
from sets import Set
from threading import RLock
from traceback import print_exc
from ACEStream.Core.simpledefs import *
DEBUG = False
class RateManager:
def __init__(self):
self.lock = RLock()
self.statusmap = {}
self.curr... | |
from numpy.testing import (
assert_allclose,
assert_array_equal,
)
import numpy as np
import pytest
from sklearn.datasets import make_classification
from sklearn.compose import make_column_transformer
from sklearn.exceptions import NotFittedError
from sklearn.linear_model import LogisticRegression
from sklearn... | |
# orm/dependency.py
# Copyright (C) 2005-2016 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
"""Relationship dependencies.
"""
from .. import sql, util, exc as sa_exc
from .... | |
# Copyright (c) 2007-2009 The PyAMF Project.
# See LICENSE.txt for details.
"""
General gateway tests.
@since: 0.1.0
"""
import unittest
import sys
import pyamf
from pyamf import remoting
from pyamf.remoting import gateway, amf0
class TestService(object):
def spam(self):
return 'spam'
def echo(se... | |
# 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... | |
# Copyright (c) 2010, individual contributors (see AUTHORS file)
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" ... | |
#!/usr/bin/env python2
"""
Rules for building C/API module with f2py2e.
Here is a skeleton of a new wrapper function (13Dec2001):
wrapper_function(args)
declarations
get_python_arguments, say, `a' and `b'
get_a_from_python
if (successful) {
get_b_from_python
if (successful) {
callfortran
... | |
"""Tests for Plex config flow."""
import copy
from http import HTTPStatus
import ssl
from unittest.mock import patch
import plexapi.exceptions
import pytest
import requests.exceptions
from homeassistant.components.plex import config_flow
from homeassistant.components.plex.const import (
AUTOMATIC_SETUP_STRING,
... | |
"""
A VIVO harvester for the SHARE project
This harvester makes several SPARQL queries to a VIVO SPARQL endpoint,
the information to access the VIVO endpoint must be provided in the local.py file.
There is also a Map to the SPARQL queries made to harvest documents
from the VIVO endpoint in the sparql_mapping.py file.
... | |
#!/usr/bin/env python2.7
import sys, os, argparse, subprocess, json
def main():
readLengths = ['32', '36', '40', '50', '58', '72', '76', '100']
genomes = ['hg38', 'hg19', 'mm9', 'mm10']
dataTypes = ['DNase-seq', 'ChIP-seq']
parser = argparse.ArgumentParser(description = 'Hotspot wrapper for Uniform A... | |
import logging
from django.dispatch import Signal
from corehq.apps.commtrack.helpers import make_supply_point
from corehq.apps.commtrack.models import Program, SupplyPointCase, Product, RequisitionCase
from corehq.apps.domain.models import Domain
from corehq.apps.locations.models import Location
from corehq.apps.users.... | |
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | |
# -*- coding: utf-8 -*-
"""
jinja2.loaders
~~~~~~~~~~~~~~
Jinja loader classes.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import weakref
from types import ModuleType
from os import path
from hashlib import sha1
from .exceptions im... | |
# Copyright (c) 2012, Cloudscaling
# 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... | |
# -*- coding: utf-8 -*-
import re
import sys
import unittest
from flask import Flask
from flask.ext.script._compat import StringIO, text_type
from flask.ext.script import Command, Manager, Option, prompt, prompt_bool, prompt_choices
from pytest import raises
class Catcher(object):
"""Helper decorator to test r... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Mix.mix_image'
db.alter_column(u'spa_mix', 'mix_image', self.gf('django.db.models.fields.... | |
"""Support for Tado to create a climate device for each zone."""
import logging
from typing import List, Optional
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
CURRENT_HVAC_COOL,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
CURRENT_HVAC_OFF,
... | |
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | |
# Copyright 2019 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 2018 The HuggingFace Inc. team.
#
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.