gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Sergey Sobko'
__email__ = 'S.Sobko@profitware.ru'
__copyright__ = 'Copyright 2014, The Profitware Group'
from sympy.logic import *
from circuitry.devices import Device
from circuitry.devices.simple import DeviceNot
class DeviceAdd(Device):
"""Adder de... | |
#! /usr/bin/env python
# -*- coding:utf-8
# Using Large Data from Stanford(Sentiment140), Predicting sentiments using a deep neural network with tensorflow.
# Special thanks: Harisson@pythonprogramming.net
'''
File name: sentiment_predict_large_nn.py
Author: chimney37
Date created: 11/23/2017
Python Ve... | |
#!/usr/bin/python
import collections
from direct.directnotify.DirectNotify import DirectNotify
from panda3d.core import Geom, GeomNode
from panda3d.core import GeomVertexData, GeomVertexFormat, GeomTriangles, GeomVertexReader, GeomVertexRewriter
from panda3d.core import Point3
from computationalgeom.constrainedDelaun... | |
# Licensed to the StackStorm, Inc ('StackStorm') 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 th... | |
import environ
from django.test import TestCase
from django_sharding_library.settings_helpers import database_config, database_configs
class DatabaseConfigTestCase(TestCase):
databases = '__all__'
def setUp(self):
self.default_database_url = 'postgres://user:pass@localhost/test_db'
env = en... | |
#!/usr/bin/python
"""pac_proxy - HTTP proxy that forwards requests as directed by a PAC file
(proxy auto-configuration)."""
from twisted.internet import protocol, reactor
import pacparser
import urlparse
import urllib
import sys
import os.path
import time
import re
import hashlib
import argparse
DEFAU... | |
# Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''commands to sign and verify changesets'''
import os, tempfile, binascii
from mercurial import util, comman... | |
"""Support for Modbus switches."""
import logging
from typing import Optional
from pymodbus.exceptions import ConnectionException, ModbusException
from pymodbus.pdu import ExceptionResponse
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_... | |
#!/bin/python2.7
from __builtin__ import id
import os
import commands
from netaddr import IPNetwork
from scd_new_analisador_conflitos import analise_Conflito
import time
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scd.settings")
from django.core.management import execute_from_command_line
from django.db.models i... | |
from lightning import Visualization, VisualizationLocal
import requests
import six
class Base(Visualization, VisualizationLocal):
_name = 'base'
_options = {
'width': {'default': None},
'height': {'default': None},
'description': {'default': None}
}
_doc = """
width ... | |
# -*- coding: utf-8 -
#
# This file is part of flower. See the NOTICE for more information.
from __future__ import absolute_import
import time
from py.test import skip
from flower import core
SHOW_STRANGE = False
import six
from six.moves import xrange
def dprint(txt):
if SHOW_STRANGE:
print(txt)
cla... | |
# Dialog to edit S(Q)
from __future__ import (absolute_import, division, print_function)
from qtpy.QtCore import (Signal)
from qtpy.QtWidgets import (QDialog)
import random
from addie.utilities import load_ui
from addie.calculate_gr.event_handler import generate_gr_step2
class EditSofQDialog(QDialog):
"""
Ex... | |
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
import srwl_bl
import srwlib
import srwlpy
import math
import srwl_uti_smp
def set_optics(v, names=None, want_final_propagation=True):
el = []
pp = []
if not names:
names = ['S0', 'S0_HFM', 'H... | |
#!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
import os
from flask import Flask
from flask impor... | |
"""Unit tests for the copy module."""
import copy
import copyreg
import unittest
from test import support
class TestCopy(unittest.TestCase):
# Attempt full line coverage of copy.py from top to bottom
def test_exceptions(self):
self.assert_(copy.Error is copy.error)
self.assert_(issubclass(c... | |
from sqlalchemy.testing import eq_, is_, is_not_
from sqlalchemy import testing
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy import Integer, String, ForeignKey, bindparam, inspect
from sqlalchemy.orm import backref, subqueryload, subqueryload_all, \
mapper, relationship, clear_mappers, create... | |
"""
Construct css style sheets from abstract structure
>>> print(Block(Selector('div'), # doctest: +NORMALIZE_WHITESPACE
... Property.new('padding')('0', Units.Px(20), Units.Px(15)),
... BACKGROUND('transparent'),
... BORDER(Units.Px(1), 'solid', Colors.Black),
... ))
div { padding: 0 20px 15px; backgroun... | |
__author__ = 'dmorina, megha'
from csp import settings
import httplib2
from django.http import HttpResponseRedirect
from crowdsourcing import models
from apiclient import discovery, errors
from apiclient.http import MediaFileUpload
from oauth2client.client import Credentials
from rest_framework.viewsets import ViewSet
... | |
"""
SoftLayer.formatting
~~~~~~~~~~~~~~~~~~~~
Provider classes and helper functions to display output onto a
command-line.
:license: MIT, see LICENSE for more details.
"""
# pylint: disable=E0202, consider-merging-isinstance, arguments-differ, keyword-arg-before-vararg
import collections
import jso... | |
# http://github.com/timestocome
# adapted from:
# Planning with Markov Decision Processes, An AI Perspective
# This is the second example from section 3.4
# Adds in recursive Bellman equation
#
# Value iteration
#
# V*(s) = 0
# Q*(s,a) = Sum(transition_probability * (reward + V*(s')))
#
# Vn(s) = max(sum(transiti... | |
# Author: Andreas Christian Mueller <amueller@ais.uni-bonn.de>
# (c) 2012
# Modified by: Paul Nechifor <paul@nechifor.net>
#
# License: MIT
from random import Random
import os
import re
import sys
import numpy as np
from operator import itemgetter
from PIL import Image
from PIL import ImageDraw
from PIL import ImageF... | |
import math
import random
import itertools
import traceback
import visgraph.layouts as vg_layouts
# coulomb's constant approximation
ke = 8.98755
def irand():
return random.randint(100, 200)
class vector:
def __init__(self, force=0.0, angle=0.0):
self.force = force
self.angle = angle
d... | |
import functools
import logging
from datetime import datetime
import django
from django.apps import apps
from django.contrib import admin, messages
from django.contrib.admin.sites import AlreadyRegistered
from django.db.models import F
from django.http import HttpResponse
from django.urls import reverse
from django.ut... | |
# Copyright (c) 2015-2021 Vector 35 Inc
#
# 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, ... | |
# 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... | |
#
# Copyright (c) 2001-2014, Scott D. Peckham
#
# Sep 2014. Bug fix: enforce_max_meltrate() was called after update_SM_integral().
# Moved open_input_files(), read_input_files() and close_input_files()
# as special versions into degree-day and energy-balance components.
# Aug 2014. Cleaned ... | |
# Copyright (c) 2011 Zadara Storage Inc.
# Copyright (c) 2011 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.... | |
# -*- coding: utf-8 -*-
#
# Copyright(c) 2010 poweredsites.org
#
# 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
#
# 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... | |
__all__ = ['Bloch3d']
import numpy as np
from qutip.qobj import Qobj
from qutip.expect import expect
from qutip.operators import sigmax, sigmay, sigmaz
class Bloch3d():
"""Class for plotting data on a 3D Bloch sphere using mayavi.
Valid data can be either points, vectors, or qobj objects
corresponding to... | |
# Copyright 2013 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 requi... | |
'''
Knowledge selectors take an encoded sentence (or logical form) representation and encoded
representations of background facts related to the sentence, and compute an attention over the
background representations. By default, the attention is soft (the attention values are in the
range (0, 1)). But we can optionally... | |
from itertools import chain
import warnings
import numpy as np
import scipy.sparse as sp
from scipy.linalg import pinv2
from scipy.sparse.csgraph import laplacian
from sklearn.utils.testing import (assert_equal, assert_raises, assert_true,
assert_almost_equal, assert_array_equal,
... | |
"""This module contains a prototype implementation of the
TT-cross-based minimization procedure
"""
from __future__ import print_function, absolute_import, division
from six.moves import xrange
import numpy as np
import math
import tt
from ..maxvol import maxvol
from ..utils.rect_maxvol import rect_maxvol
def reshape... | |
from __future__ import print_function
from __future__ import division
import argparse
import os
import sys
import time
from collections import deque
from json import dumps
from signal import signal, SIGTERM, SIGUSR1, SIGTSTP, SIGCONT
from subprocess import Popen, call
from threading import Event
from syslog import sy... | |
# 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 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.
"""Generates dart source files from a mojom.Module."""
import re
import mojom.generate.generator as generator
import mojom.generate.module as mojom
import ... | |
import logging
import os
import re
import sys
from rbtools.clients import SCMClient, RepositoryInfo
from rbtools.clients.errors import (InvalidRevisionSpecError,
TooManyRevisionsError)
from rbtools.clients.perforce import PerforceClient
from rbtools.clients.svn import SVNClient, SVN... | |
import matplotlib.pyplot as plt
import numpy as np
from datetime import datetime
import sys
import pywt
sys.path.insert(0, '../Features')
import features_utils as fu
import utils
# Level 1
class TestFeature:
def __init__(self, data=None):
if(data is None):
self.data, _ = utils.loadUserInput()... | |
# 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... | |
# 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 os
import inspect
import getpass
import subprocess
import sys
import re
import shutil
import cutlass
import anadama.pipelines
from collections import OrderedDict
from . import workflows
from . import PrepProt
def get_proteomes(preps):
def _ps():
for prep in preps:
proteome_list=list()
for proteome in... | |
from __future__ import absolute_import
from unittest import TestCase
from ddsc.ddsclient import BaseCommand, UploadCommand, ListCommand, DownloadCommand, ClientCommand, MoveCommand
from ddsc.ddsclient import ShareCommand, DeliverCommand, InfoCommand, read_argument_file_contents, \
INVALID_DELIVERY_RECIPIENT_MSG, DD... | |
# Copyright 2015 LinkedIn Corp.
#
# 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.... | |
# (c) Copyright 2017-2019 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
# -*- 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
#... | |
""" Test functions for the sparse.linalg.eigen.lobpcg module
"""
from __future__ import division, print_function, absolute_import
import itertools
import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal,
assert_allclose, assert_array_less)
from scipy import ones, ra... | |
from django.db import ProgrammingError
from django.utils.functional import cached_property
class BaseDatabaseFeatures:
gis_enabled = False
# Oracle can't group by LOB (large object) data types.
allows_group_by_lob = True
allows_group_by_pk = False
allows_group_by_selected_pks = False
empty_fet... | |
#!/usr/bin/env python
'''
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")... | |
#===============================================================================
# Copyright 2008 Matt Chaput
#
# 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/li... | |
"""Games, or Adversarial Search (Chapter 5)"""
from collections import namedtuple
import random
import itertools
import copy
from utils import argmax, vector_add
infinity = float('inf')
GameState = namedtuple('GameState', 'to_move, utility, board, moves')
StochasticGameState = namedtuple('StochasticGameState', 'to_mo... | |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
from __future__ import unicode_literals
from datetime import date
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Select, RegexField, Field
from django.utils.translation import ugettext_lazy as _
from django.utils.six import text_type
... | |
# -*- coding: utf-8 -*-
"""
model key tests
~~~~~~~~~~~~~~~
tests canteen's model keys.
:author: Sam Gammon <sg@samgammon.com>
:copyright: (c) Sam Gammon, 2014
:license: This software makes use of the MIT Open Source License.
A copy of this license is included as ``LICENSE.md`` in
... | |
from __future__ import division, print_function
import os
import shutil
from tempfile import mkstemp, mkdtemp
from subprocess import Popen, PIPE
from distutils.errors import DistutilsError
from numpy.distutils import ccompiler
from numpy.testing import TestCase, run_module_suite, assert_, assert_equal
from numpy.test... | |
import re
from collections import namedtuple
from urls import normalize, normalize_and_dedupe, normalize_and_dedupe_with_counts
from urls import subdomain, rootdomain, subdomains
def apply_domain_limit(entries, domain_limit):
""" Takes a list of sanitised URLs and looks at their domains. If a
domain co... | |
from direct.showbase import PythonUtil
from pandac.PandaModules import VBase4, Vec3, Point3
from CogdoUtil import VariableContainer, DevVariableContainer
AI = VariableContainer()
AI.GameActions = PythonUtil.Enum(('LandOnWinPlatform', 'WinStateFinished',
'GotoWinState', 'HitWhirlwind', 'HitLegalEagle', 'HitMinion',... | |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" command line uti... | |
import mock
import unittest
from MTG.test.test_game import TestGameBase
from MTG.exceptions import *
class TestPlayer(TestGameBase):
def test_optional_trigger_on_lifegain(self):
""" Ajani's Pridemate: on life gain, put +1/+1 counter. """
with mock.patch('builtins.input', side_effect=[
... | |
import functools
from asyncio import get_event_loop
from typing import Any, Callable, List, Optional, Tuple, TypeVar
from prompt_toolkit.application import Application
from prompt_toolkit.application.current import get_app
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.completion import Completer
from pr... | |
TIMEZONES = [
("Africa/Abidjan", "Africa/Abidjan"),
("Africa/Accra", "Africa/Accra"),
("Africa/Addis_Ababa", "Africa/Addis_Ababa"),
("Africa/Algiers", "Africa/Algiers"),
("Africa/Asmara", "Africa/Asmara"),
("Africa/Asmera", "Africa/Asmera"),
("Africa/Bamako", "Africa/Bamako"),
("Africa/B... | |
# 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... | |
"""
api/Albums.py
Author: Josh Williams
Date Added: Fri Jan 19 14:29:53 CST 2007
Manages user albums.
"""
## STD LIBS
import datetime, time, os, ConfigParser, cPickle
from pprint import pformat
## OUR LIBS
from AZTKAPI import AZTKAPI
from decorators import stack, zapi
import validation, utils, errors, aztk_config
#... | |
# Copyright 2017 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.
"""Presubmit checks used in viz"""
import re
import string
def CheckChangeLintsClean(input_api, output_api, white_list, black_list=None):
source_filter =... | |
# Copyright (c) 2012 - 2015 EMC Corporation, 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
#
# ... | |
#
# lang/test_cpp.py
#
# Copyright (c) 2013 Luis Garcia.
# This source file is subject to terms of the MIT License. (See file LICENSE)
#
# pylint: disable=C0111
import unittest
from .. import scope
from . import cpp
class TestCppSerializer(unittest.TestCase): # pylint: disable-msg=R0904
def test_cpp_serializer... | |
import curses
import logging
import random
import re
import sys
import textwrap
import time
from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.ext.declarative impor... | |
# Lint as: python3
"""SSD input pipeline modified for JAX.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import REDACTED
from __future__ import print_function
from absl import flags
import tensorflow.compat.v2 as tf
from REDACTED.cloud_tpu.models.retinanet.object_detect... | |
# file eulxml/forms/xmlobject.py
#
# Copyright 2010,2011 Emory University Libraries
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | |
# -*- coding: utf-8 -*-
"""Taxonomy views."""
from __future__ import absolute_import, unicode_literals
from django.contrib import messages
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseRedirect, Http404
# from django.shortcuts import get_object_or_404, redirect
from django.u... | |
# Copyright 2018 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
from dspl2.jsonutil import (AsList, GetSchemaId, GetSchemaProp, GetSchemaType,
GetUrl)
from dspl2... | |
from collections import deque
import base64
import gzip as gzip_module
import hashlib
import os
import re
import time
import uuid
from html import escape
from io import BytesIO
def resolve_content(response):
return b"".join(item for item in response.iter_content(read_file=True))
class Pipeline(object):
pip... | |
#
# Copyright 2010 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 o... | |
# -*- coding: utf-8 -*-
"""
C code generation.
"""
from __future__ import print_function, division, absolute_import
import sys
from functools import partial
from pykit import error, types
from pykit import ir
from pykit.ir import vvisit, ArgLoader, verify_lowlevel
from pykit.ir import defs, opgrouper
from pykit.typ... | |
"""
Testing of SED-ML data support, i.e., DataDescription.
"""
from __future__ import print_function, absolute_import
import os
import pytest
import matplotlib
from tellurium.tests.testdata import TESTDATA_DIR
from tellurium.sedml.data import DataDescriptionParser
from tellurium.sedml.tesedml import SEDMLTools
try:... | |
# 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... | |
# The MIT License (MIT)
#
# Copyright (c) 2017 Mike Mabey
#
# 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... | |
"""Support for ONVIF Cameras with FFmpeg as decoder."""
import asyncio
from haffmpeg.camera import CameraMjpeg
from haffmpeg.tools import IMAGE_JPEG, ImageFrame
import requests
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
import voluptuous as vol
from homeassistant.components.camera import SUPPORT_STREAM, ... | |
import weakref
from ufoLib import UFOReader
from defcon.objects.base import BaseObject
from defcon.objects.layer import Layer
class LayerSet(BaseObject):
"""
This object manages all layers in the font.
**This object posts the following notifications:**
============================
Name
====... | |
"""Test case implementation"""
import sys
import difflib
import pprint
import re
import unittest
import warnings
from airy.utils.unittest import result
from airy.utils.unittest.util import\
safe_repr, safe_str, strclass,\
unorderable_list_difference
from airy.utils.unittest.compatibility import wraps
__unit... | |
"""Template for a pickaxe run.
This python script provides a skeleton to build Pickaxe runs around
The general format of a script will be:
1. Connect to mongoDB (if desired)
2. Load reaction rules and cofactors
3. Load starting compounds
4. Load Filtering Options
5. Transform Compounds
6. Write resul... | |
#============================================================================
# Copyright (c) Microsoft Corporation. All rights reserved. See license.txt for license information.
#============================================================================
import os
import protocol
import socket
import struct
import sy... | |
#!/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.
"""Utility for checking and processing licensing information in third_party
directories.
Usage: licenses.py <command>
Commands:
... | |
# 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 ... | |
from base64 import standard_b64decode
from coco.contract.backends import *
from coco.contract.errors import *
from coco.hostapi import config
from coco.hostapi.http.responses import *
from flask import Blueprint, request, url_for
"""
Flask blueprint collecting the /containers routes.
"""
blueprint = Blueprint('contai... | |
'''
test_json.py: Singularity Hub testing functions for Singularity in Python
Copyright (c) 2016-2017, Vanessa Sochat. All rights reserved.
"Singularity" Copyright (c) 2016, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from ... | |
import hashlib
import itertools
import json
import os
import pathlib
import plistlib
import time
import xml.etree.ElementTree as ET
from distutils.version import LooseVersion
from itertools import chain
import requests
from django.conf import settings
# from django.contrib.staticfiles.templatetags.staticfiles import ... | |
"""
Quadratic Discriminant Analysis
"""
# Author: Matthieu Perrot <matthieu.perrot@gmail.com>
#
# License: BSD Style.
import warnings
import numpy as np
from .base import BaseEstimator, ClassifierMixin
from .utils.fixes import unique
from .utils import check_arrays, array2d
__all__ = ['QDA']
class QDA(BaseEstima... | |
"""
Tests related to authenticating API requests
"""
import mock
from nose.tools import * # flake8: noqa
from framework.auth import cas, core
from website.util import api_v2_url
from website.addons.twofactor.tests import _valid_code
from website.settings import API_DOMAIN
from tests.base import ApiTestCase
from te... | |
# Copyright 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 agreed to in... | |
'''
The one parameter exponential family distributions used by GLM.
'''
# TODO: quasi, quasibinomial, quasipoisson
# see http://www.biostat.jhsph.edu/~qli/biostatistics_r_doc/library/stats/html/family.html
# for comparison to R, and McCullagh and Nelder
import numpy as np
from scipy import special
from scipy.stats imp... | |
import imp
import inspect
import os
import sys
import uuid
import yaml
from conans.client.generators import registered_generators
from conans.client.loader_txt import ConanFileTextLoader
from conans.client.tools.files import chdir
from conans.errors import ConanException, NotFoundException, ConanInvalidConfiguration
... | |
# (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP
# All Rights Reserved.
#
# Copyright 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 Licen... | |
from SimPEG import Mesh, Regularization, Maps, Utils, EM
from SimPEG.EM.Static import DC
import numpy as np
import matplotlib.pyplot as plt
#%matplotlib inline
import copy
import pandas as pd
from scipy.sparse import csr_matrix, spdiags, dia_matrix,diags
from scipy.sparse.linalg import spsolve
from scipy.stats import... | |
# 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 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... | |
"""
Exposes the 5 parameter unital channel.
This module does things.
"""
import numpy as np
import argparse
from scipy.special import binom as bn
from scipy.linalg import polar
from os import getpid
from time import time
PDIAG = np.zeros((9, 9))
for esi in np.eye(3):
one = np.kron(esi, esi)
PDIAG = PDIAG + ... | |
#!/usr/bin/env python # pylint: disable=too-many-lines
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _|
# | |) | (_) ... | |
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------... | |
# test plugin
from bot.pluginDespatch import Plugin
import re
from datetime import datetime
import pytz
import dateutil
from django.contrib.auth.models import User
import logging
from logos.settings import LOGGING
logger = logging.getLogger(__name__)
logging.config.dictConfig(LOGGING)
from cloud_notes.models import N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.