gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/usr/bin/env python
# @author Binu Jasim
# @created on 1 Mar 2017
import webapp2
from google.appengine.ext import ndb
from google.appengine.api import users
import logging
import datetime
import json
import os
import jinja2
from account import *
from model import *
template_dir = os.path.join(os.path.dirname(__fi... | |
# -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa
from urlparse import urlparse
from framework.auth.core import Auth
from osf.models import NodeLog
from api.base.settings.defaults import API_BASE
from tests.base import ApiTestCase
from osf_tests.factories import (
ProjectFactory,
RegistrationF... | |
# This Python module is part of the PyRate software package.
#
# Copyright 2022 Geoscience Australia
#
# 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... | |
# 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... | |
# Copyright 2015 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# Copyright (c) 2010-2012 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2021 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 RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- getdeploy... | |
#
# 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... | |
import re
import functools
try:
from urllib.parse import quote
except ImportError:
# Python 2
from urllib import quote
from . import url
__all__ = ['Template', 'expand']
patterns = re.compile(r"{([^\}]+)}")
class Template(object):
def __init__(self, url_str):
self._base = url_str
d... | |
from twisted.internet import reactor, defer
from telephus.client import CassandraClient
from telephus.protocol import ManagedCassandraClientFactory
from telephus.cassandra.ttypes import *
import simplejson, collections, os, uuid
json_encode = simplejson.dumps
json_decode = simplejson.loads
try:
import pygtk
... | |
# -*- test-case-name: twisted.protocols.test.test_tls,twisted.internet.test.test_tls,twisted.test.test_sslverify -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation of a TLS transport (L{ISSLTransport}) as an
L{IProtocol<twisted.internet.interfaces.IProtocol>} layered on top ... | |
from cStringIO import StringIO
from hashlib import sha1
import math
import os
from time import time
import Image
from django.conf import settings
from django.db import IntegrityError
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, returnValue
from canvas import util
from canva... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainSkel.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of c... | |
from sfepy.base.base import *
from sfepy.postprocess.utils import mlab
from sfepy.fem import Mesh
from sfepy.fem.meshio import MeshIO, vtk_cell_types, supported_formats
from sfepy.solvers.ts import TimeStepper
from dataset_manager import DatasetManager
from enthought.tvtk.api import tvtk
from enthought.mayavi.sources.... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers._vim_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file is autogenerated by scripts/get_vimkw.py
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# Split up in multiple functions so it's import... | |
import os
import re
import math
from digoie.conf.storage import __elastic_search_dir__, __reverb_input_dir__, REVERB_INPUT_EXT
from digoie.core.files.names import load_names
from digoie.conf.global_settings import TARGET_PERSON_NAME, TARGET_PHONE_NUMBER
def extract(raw, target=TARGET_PERSON_NAME):
print 'extr... | |
"""
Convolution (using **FFT**, **NTT**, **FWHT**), Subset Convolution,
Covering Product, Intersecting Product
"""
from __future__ import print_function, division
from sympy.core import S, sympify
from sympy.core.compatibility import range, as_int, iterable
from sympy.core.function import expand_mul
from sympy.discret... | |
'''
Created on Jun 29, 2009
@author: Torre Wenaus
'''
class ErrorCodes:
errorFields = ('pilot','exe','sup','ddm','brokerage','jobdispatcher','taskbuffer')
errorCodes = {}
errorStages = {}
def __init__(self):
for f in self.errorFields:
self.errorCodes['%serrorcode'%f] = {}
... | |
import re
import time
import urllib
import lxml.html
import feedparser
import logging
from util import *
from dateutil.parser import parse
from lxml.cssselect import CSSSelector
from lxml.etree import XMLSyntaxError
from urlparse import urlparse, parse_qs
from twisted.internet import reactor, defer, task
from twisted.... | |
# Copyright (c) 2015 Thales Services SAS
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# ActivitySim
# See full license in LICENSE.txt.
import logging
import numpy as np
import pandas as pd
from activitysim.core import logit
from activitysim.core import config
from activitysim.core import inject
from activitysim.core import tracing
from activitysim.core import chunk
from activitysim.core import pipelin... | |
# 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 os
import imp
import json
from sqlalchemy import or_
from framework.db import models
from framework.dependency_management.dependency_resolver import BaseComponent
from framework.dependency_management.interfaces import DBPluginInterface
from framework.utils import FileOperations
TEST_GROUPS = ['web', 'network... | |
# -*- coding: utf-8 -*-
import django
from django.test import SimpleTestCase
from django.test.utils import override_settings
from .forms import (
ChildModelFormset,
CustomNamingForm,
DefaultNamingForm,
FieldWidgetWithClassNameForm,
MixedNamingForm,
MultipleNamingForm,
WidgetsWidgetWithClas... | |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved
# Copyright (c) 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/lic... | |
"""
======================================================
Classification of text documents using sparse features
======================================================
This is an example showing how scikit-learn can be used to classify documents
by topics using a bag-of-words approach. This example uses a scipy.spars... | |
#!/usr/bin/env python
#
# Copyright 2014 Infoxchange Australia
#
# 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 appli... | |
import os
import hashlib
import json
import time
import re
import shutil
import glob
from textwrap import dedent
import sublime
import sublime_plugin
# Metaclass for singletons (TODO refactor)
class Singleton(type):
_instance = None
def __call__(cls, *args, **kwargs):
if not cls._instance:
... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
import re
import uuid as py_uuid
from cattle import ApiError
from common_fixtures import * # NOQA
from test_volume import VOLUME_CLEANUP_LABEL
TEST_IMAGE = 'ibuildthecloud/helloworld'
TEST_IMAGE_LATEST = TEST_IMAGE + ':latest'
TEST_IMAGE_UUID = 'docker:' + TEST_IMAGE
if_docker = pytest.mark.skipif("os.environ.get('D... | |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import shutil
from hashlib import sha1
from pants.build_graph.build_graph import sort_targets
from pants.build_graph.target import Target
from pants.invalidation.build_invalidat... | |
import sys
from django.conf import settings
from django.db.backends.base.creation import BaseDatabaseCreation
from django.db.utils import DatabaseError
from django.utils.crypto import get_random_string
from django.utils.functional import cached_property
TEST_DATABASE_PREFIX = 'test_'
class DatabaseCreation(BaseData... | |
import os
import yaml
import traceback
import logging
import socket
from coder import encode
from functools import wraps
from importlib import import_module
from time import sleep
RUN_NAME = 'light_on'
START_NAME = 'start'
STOP_NAME = 'stop'
logger = logging.getLogger(__name__)
def iter_func(attr):
"""
Crea... | |
"""
Title: DCGAN to generate face images
Author: [fchollet](https://twitter.com/fchollet)
Date created: 2019/04/29
Last modified: 2021/01/01
Description: A simple DCGAN trained using `fit()` by overriding `train_step` on CelebA images.
"""
"""
## Setup
"""
import tensorflow as tf
from tensorflow import keras
from tens... | |
"""
Additional strategies from Axelrod's two tournaments.
"""
import random
from axelrod import Player, Actions
from.memoryone import MemoryOnePlayer
C, D = Actions.C, Actions.D
flip_dict = {C: D, D: C}
## First Tournament
class Davis(Player):
"""A player starts by cooperating for 10 rounds then plays Grudge... | |
#!python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozilla.org/MPL/
#... | |
import os
import shutil
import zipfile
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import get_object_or_404... | |
# Copyright (c) 2015 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... | |
# 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... | |
"""
kombu.transport.redis
=====================
Redis transport.
"""
from __future__ import absolute_import
import numbers
import socket
from bisect import bisect
from collections import namedtuple
from contextlib import contextmanager
from time import time
from amqp import promise
from kombu.exceptions import In... | |
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import itertools
from collections import defaultdict
from dataclasses import dataclass
from typing import Iterable, Optional, Tuple
from pants.backend.python.target_types import PythonSou... | |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2020-present MagicStack Inc. and the EdgeDB 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... | |
# Copyright (c) 2012
# Licensed under the terms of the MIT license; see LICENSE.txt
from .base import StrPattern, Pattern, PatternBase, derepeat
from .repeating import Repeating
from zope.interface import implementer
capturing_pattern = StrPattern("(...)")
noncapturing_pattern = StrPattern("(?:...)")
named_pattern =... | |
#!/usr/bin/env python2
'''
Python WebSocket library with support for "wss://" encryption.
Copyright 2011 Joel Martin
Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3)
Supports following protocol versions:
- http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75
- http://tools.ietf.org/html/draft... | |
"""Setup script for Bokeh."""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENCE.txt, distributed with this software.
#---------... | |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import re
import unittest
from iptest import IronPythonTestCase, is_cli, run_test
class ReTest(IronPythonTestC... | |
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2013 Canonical Corp.
# 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
#
# htt... | |
import os
from facetools import json
import copy
import requests
from django.test import TestCase
from django.core import management
from django.conf import settings
from fandjango.models import User
from facetools.management.commands.sync_facebook_test_users import _get_test_user_relationships
from facetools.common ... | |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Uhd Adsb 5
# Generated: Sat May 27 23:53:23 2017
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.st... | |
###
### generate_schedules.py
###
import os
import sys
import csv
import random
import datetime
from utils import LogWarning, LogMessage
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webApp.settings")
django.setup()
from django.shortcuts import render
from django.db import transaction
from pdfManage... | |
# Copyright (c) 2015 Cloudera, 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 o... | |
"""
Example generation for the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from __future__ import division, print_function
from time import time
import ast
import os
import re
import shutil
import traceback
i... | |
import os
import sys
import pickle
import datetime
from utils import LogWarning, LogMessage
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webApp.settings")
django.setup()
from django.db import transaction
from forNSF.wordcounts import process_text
from webApp.models import NSFInvestigator, NSFProject... | |
from __future__ import absolute_import
import numpy as np
from numpy.testing import assert_array_almost_equal as assert_almost
from pytest import raises
from ...mesher import Prism
from .. import _prism_numpy, prism
from ... import utils, gridder
def test_fails_if_shape_mismatch():
'gravmag.prism fails if given ... | |
# Copyright (c) 2019 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 appli... | |
# Shikha Chaganti
# Kunal Nabar
# Vanderbilt University
# Medical-image Analysis and Statistical Interpretation Lab
# newphewas
# v2.0
import numpy as np
# import matplotlib.pyplot as plt
# from matplotlib.backends.backend_pdf import PdfPages
# from matplotlib import rcParams
# import matplotlib.lines as mlines
from ... | |
"""Solvers for the linear and quadratic programs in active subspaces."""
import numpy as np
import logging
from scipy.optimize import linprog, minimize
# checking to see if system has gurobi
try:
HAS_GUROBI = True
import gurobipy as gpy
except ImportError, e:
HAS_GUROBI = False
pass
# string constants... | |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import sys
import unittest
from iptest import IronPythonTestCase, is_cli, run_test
def ifilter(iterable):
... | |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
analyze assortativity of the graphs in terms of sentiment
'''
from igraph import *
import networkx as nx
import os
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import os
import matplotlib.cm as cm
from collections import defaultdict... | |
"""Google Sheets for translating pod content."""
import datetime
import random
from babel.messages import catalog
from babel.messages import pofile
from googleapiclient import errors
from grow.preprocessors import google_drive
from grow.translators import errors as translator_errors
try:
import cStringIO as String... | |
# Neural Network python module
# Written by William Ganucheau 2014
import sys, random, math
# Utility function to create an empty (zero) array of length n
def zeroArray(n):
return [0 for i in range(0, n)]
# A neural network class capable of saving/loading from a file,
# Training based on user-provided input-output d... | |
from contextlib import contextmanager
from unittest import mock
import django
from django.db.migrations import (
AddField,
AlterField,
CreateModel,
DeleteModel,
RemoveField,
RenameField,
)
from django.db.migrations.autodetector import MigrationAutodetector
from django.db.migrations.operations.... | |
"""
Utility functions for
- building and importing modules on test time, using a temporary location
- detecting if compilers are present
"""
import os
import sys
import subprocess
import tempfile
import shutil
import atexit
import textwrap
import re
import pytest
from numpy.compat import asbytes, asstr
from numpy.te... | |
import os, platform
import dynamixel
import time
import options
import math
import serial
ticks_per_rad = 4096.0/(math.pi*2)
############################################
# _______ __ ______ __
# /_ __(_)_ _ / // / __ \_ _____ ________/ /
# / / / / ' \ / _ / /_/ / |/|/ / _ `/ __... | |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
from generate import generate
class VariantType:
def __init__(self,
variantType,
managedTyp... | |
# -*- coding: utf-8 -*-
# (C) Copyright 2014 Voyager Search
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import ldap
import time
import paramiko
import traceback
import codecs
import subprocess
from cgi import escape
from vmchecker import paths, update_db, penalty, submissions, submit, coursedb
from vmchecker.coursedb import ... | |
# -*- coding: utf-8 -*-
import time
from flask import has_app_context
from framework import sentry
import mendeley
from addons.base.models import BaseCitationsNodeSettings, BaseOAuthUserSettings
from django.db import models
from addons.base import exceptions
from framework.exceptions import HTTPError
from mendeley.ex... | |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, print_function
import os
import subprocess
import sys
from contextlib import contextmanager
from distutils import sysconfig
from site import USER_S... | |
# -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | |
#!/usr/bin/env python
import sys
import os
import errno
import re
import subprocess
import datetime
from collections import OrderedDict
import MySQLdb
import yaml
import ordered_yaml
myname = sys.argv[0]
CONFIG_FILENAME = "config.yml"
DEFAULT_TARGET_DIR = "/data/dump"
## Worker Functions
def mongodump(config, db... | |
import core
from core import *
class DMIDE_MenuBar(wx.MenuBar):
def __init__(self, window=None):
wx.MenuBar.__init__(self, wx.MB_DOCKABLE)
self.installMenuService()
def installMenuService(self):
""" Build a MenuBar for the top-level window as read from an XML file """
if os.path.exists(os.path.join(wx.Get... | |
#!/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.
"""Makes sure that all files contain proper licensing information."""
import json
import optparse
import os.path
import subproces... | |
from mock import MagicMock
from elasticmagic import agg, Document, DynamicDocument, Field, SearchQuery, Term, Match, Index
from elasticmagic.types import Integer, Float
from elasticmagic.ext.queryfilter import QueryFilter, FacetFilter, RangeFilter, SimpleFilter
from elasticmagic.ext.queryfilter import FacetQueryFilter... | |
# 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... | |
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import struct
import subprocess
import sys
import unittest
import xml.etree.ElementTree
import gdb_rsp
NACL_SIGTRAP = 5
NACL_SIGSEGV = ... | |
#
# This file is part of pySMT.
#
# Copyright 2014 Andrea Micheli and Marco Gario
#
# 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
... | |
# -*- coding: UTF-8 -*-
"""Easy to use object-oriented thread pool framework.
A thread pool is an object that maintains a pool of worker threads to perform
time consuming operations in parallel. It assigns jobs to the threads
by putting them in a work request queue, where they are picked up by the
next available threa... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from copy import deepcopy
import numpy as np
from .constants import FIFF
from .tag import find_tag, has_tag, r... | |
from __future__ import unicode_literals
import json
from decimal import Decimal
from django.test import TestCase
from django.urls import reverse
from django.contrib.auth.models import User
from django.core.cache import caches
from dynamic_preferences.registries import (
global_preferences_registry as registry
)
f... | |
#! /usr/bin/env python
from __future__ import absolute_import as _absolute_import
'''
Copyright 2015 Tim Nonner
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. T... | |
"""
SleekXMPP: The Sleek XMPP Library
Implementation of xeps for Internet of Things
http://wiki.xmpp.org/web/Tech_pages/IoT_systems
Copyright (C) 2013 Sustainable Innovation, Joachim.lindborg@sust.se, bjorn.westrom@consoden.se
This file is part of SleekXMPP.
See the file LICENSE for copying per... | |
# Copyright 2014-2020 The PySCF Developers. 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 appl... | |
# 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... | |
from common_fixtures import * # NOQA
def test_container_port_create_start(super_client, new_context):
image_uuid = new_context.image_uuid
host = new_context.host
host_ip = new_context.host_ip.address
client = new_context.client
assert host_ip is not None
c = client.create_container(imageUuid... | |
#
# [The "BSD license"]
# Copyright (c) 2012 Terence Parr
# Copyright (c) 2012 Sam Harwell
# Copyright (c) 2014 Eric Vergnaud
# 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. Redis... | |
#!/usr/bin/env python
# Copyright 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.
"""
Unit tests for the contents of battery_utils.py
"""
# pylint: disable=W0613
import logging
import os
import sys
import unittest
... | |
#
# 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... | |
import MySQLdb
import CFGAPI
import DecisionTree
import socketAPI
import os
class DataConverter:
def matchData(self, src_index, dest_index):
if self.extractedlist[src_index]:
self.requiredlist[dest_index] = self.extractedlist[src_index]
self.ismatched[src_index] = True
self.xmlhead = '<?xml ver... | |
import json, os, datetime, time
from django.shortcuts import render_to_response, get_object_or_404, render
from django.template.loader import render_to_string
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext, loader
from django.utils.translation import ugettext as _... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | |
import copy
import functools
import json
import logging
import random
import tempfile
from collections import namedtuple
from ruamel.yaml.comments import CommentedSeq, CommentedMap
import schema_salad.validate as validate
from schema_salad.sourceline import SourceLine, cmap
from typing import Any, Callable, cast, Gene... | |
import graphene
import graphene_django_optimizer as gql_optimizer
from django.core.exceptions import ValidationError
from graphene import relay
from ...order import models
from ...order.models import FulfillmentStatus
from ...product.templatetags.product_images import get_product_image_thumbnail
from ..account.types i... | |
import datetime
import logging
from django.conf import settings
from django.contrib.gis.db import models
from django.core.cache import cache
from django.dispatch import receiver
from django_mailbox.signals import message_received
from jsonfield.fields import JSONField
from location.settings import SETTINGS
logger =... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright (c) 2014 Christian Schwede <christian.schwede@enovance.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
#
# Unless required b... | |
# Copyright 2016 United States Government as represented by the Administrator
# of the National Aeronautics and Space Administration. All Rights Reserved.
#
# Portion of this code is Copyright Geoscience Australia, Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this file
# except in c... | |
import datetime
from corehq.apps.accounting import utils, tasks
from corehq.apps.accounting.models import (
DomainUserHistory,
InvoiceCommunicationHistory,
CommunicationType,
DefaultProductPlan,
SoftwarePlanEdition,
SubscriptionType,
Subscription,
CustomerInvoiceCommunicationHistory,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.