gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import absolute_import import mock import unittest import bs4 import bokeh.embed as embed from bokeh.resources import CDN, INLINE, Resources, JSResources, CSSResources from bokeh.templates import JS_RESOURCES, CSS_RESOURCES from bokeh.plotting import figure from bokeh.session import Session from jinj...
import os import reader import json # todo: get this logger from elsewhere from celery.utils.log import get_task_logger log = get_task_logger(__name__) defaultFieldMappings = [ ### SET (['info','protocol'], 'getReplayProtocolVersion'), (['info','bytes'], 'getReplayFileByteSize'), (['info','gameloops'], '...
# 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...
# 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 import collections import operator # Add new keywords to the end of the list to p...
''' Create rst documentaiton of the examples directory. This uses screenshots in the screenshots_dir (currently doc/sources/images/examples) along with source code and files in the examples/ directory to create rst files in the generation_dir (doc/sources/examples) gallery.rst, index.rst, and gen__*.rst ''' import ...
import warnings from math import log from flask import Flask, render_template, request # 3 clause BSD import indCAPS import helperFuncs from enzymeList import enzymes import bleach # apache v2 # Set up Flask stuff application = Flask(__name__) application.jinja_env.trim_blocks = True @application.route('/', methods=[...
import unittest import numpy as np import numpy.testing as np_test from pgmpy.readwrite import BIFReader, BIFWriter from pgmpy.models import BayesianModel from pgmpy.factors.discrete import TabularCPD from pgmpy.extern.six.moves import map, range class TestBIFReader(unittest.TestCase): def setUp(self): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ chose m, c (parameters) for a straight line from the line pick N points (N=3, 5, 50, 100, 1000) pick sigma (size of the noise) randomly deviate(offset) points in y direction by using sigma*random number from normal distribution sigma the same for all points then defin...
from __future__ import unicode_literals import collections import functools import logging from moto.autoscaling import models as autoscaling_models from moto.ec2 import models as ec2_models from moto.elb import models as elb_models from moto.iam import models as iam_models from moto.rds import models as rds_models fr...
#!/usr/bin/env python3 # # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Download or build previous releases. # Needs curl and tar to download a release, or the build depend...
#!/usr/bin/env python3 """ The daemon runner for lnsd, which handles both configuration options as well as command line options. """ import configparser import getopt import logging import socket import sys from lns import daemon, control_proto, net_proto, reactor, utils class LNSDaemon(daemon.Daemon): def run(se...
import json import mock from contextlib import contextmanager from itertools import chain from chroma_core.lib.cache import ObjectCache from chroma_core.models import Command from chroma_core.models import ManagedTarget from chroma_core.models import ManagedTargetMount from chroma_core.models import Nid from chroma_co...
#!/usr/bin/env python from __future__ import print_function import unittest from ruffus.cmdline import handle_verbose import ruffus """ test_cmdline.py """ import os import sys # add grandparent to search path for testing grandparent_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), "..", "....
# -*- coding: utf-8 -*- import os import re from typing import Any, Dict, Iterable import logging from django.conf import settings from django.test import override_settings from django.template import Template, Context from django.template.loader import get_template from django.test.client import RequestFactory from...
# Note that the dataset must be already downloaded for this script to work, do: # $ cd data/ # $ python download_dataset.py # quoc_trinh import tensorflow as tf import numpy as np import matplotlib import matplotlib.pyplot as plt from sklearn import metrics import os import sys import datetime # get current...
import hashlib import unicodedata import base58 import scrypt import bitcoin from Crypto.Cipher import AES from neo.Core.Cryptography.ECCurve import ECDSA from neo.Core.Cryptography.Crypto import Crypto from neo.Core.Cryptography.Helper import xor_bytes # NEP-2 constants # https://github.com/neo-project/proposals/blob...
import unittest from test import test_support import subprocess import sys import signal import os import errno import tempfile import time import re import sysconfig try: import resource except ImportError: resource = None try: import threading except ImportError: threading = None mswindows = (sys.pl...
import asyncio import logging import os import signal import subprocess import sys import time import unittest from tornado.httpclient import HTTPClient, HTTPError from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.log import gen_log from tornado.process import fork_processes, tas...
from common_fixtures import * # NOQA def test_subnet_ip_pool_required_fields(super_client): assert_required_fields(super_client.create_subnet_ip_pool, networkAddress='192.168.3.1') def test_subnet_ip_pool_create_delete(super_client): ip_pool = super_client.create_subnet_ip_pool(n...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import hashlib import logging import random import socket import threading import cherrypy import safe from flask import Flask, abort, redirect from flask.ext.login import User...
# Copyright 2013 OpenStack Foundation # Copyright (C) 2013 Yahoo! 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/licens...
#!/usr/bin/env python # coding=utf-8 # from openpyxl import Workbook # from openpyxl import load_workbook # wb = load_workbook('TUNIU-Look-to-Book_v202233_s532_2017-06-08-00-00.xls') # ws = wb.active # row_range = ws[22:51] from bs4 import BeautifulSoup import locale # locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) ...
#!/usr/bin/env python3 """Unit tests for rss2slack.py.""" import io import json import logging import os import sys from unittest.mock import patch import pytest import rss2irc # noqa:I100,I202 import rss2slack # noqa:I100,I202 SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) @pytest.mark.parametrize( ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Name: luminosus.next # Innovative node-based lighting software. # Author: Tim Henning # # Copyright 2015 Tim Henning # # Luminosus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or F...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2021, Nigel Small # # 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 # # Unle...
# quick_info/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- # Diagrams here: https://docs.google.com/drawings/d/1fEs_f2-4Du9knJ8FXn6PQ2BcmXL4zSkMYh-cp75EeLE/edit from ballot.models import OFFICE, CANDIDATE, POLITICIAN, MEASURE, KIND_OF_BALLOT_ITEM_CHOICES from django.db import models from exce...
# Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of...
# 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...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
# Authors: Joan Massich <mailsik@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: BSD-3-Clause from collections import OrderedDict import csv import os.path as op import numpy as np from functools import partial import xml.etree.ElementTree as ElementTree from .montage import make_...
from __future__ import absolute_import, unicode_literals import itertools import django from django import template from django.conf import settings from django.contrib.humanize.templatetags.humanize import intcomma from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe ...
"""Test Alexa capabilities.""" import pytest from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, TEMP_CELSIUS, STATE_LOCKED, STATE_UNLOCKED, STATE_UNKNOWN, STATE_UNAVAILABLE, ) from homeassistant.components import climate from homeassistant.components.alexa import smart_home from tests....
#!/usr/bin/python # how to use this file -- # exmaple: python idl_c3_switch.py cos evt # exmaple: python idl_c3_switch.py idl lock # exmaple: python idl_c3_switch.py man sched import os, sys, argparse ramfs_if_path = "/home/songjiguo/research/composite/src/components/interface/rtorrent/" ramfs_path = ramfs_if...
# -*- coding: utf-8 -*- from __future__ import absolute_import from theano import tensor as T from .. import backend as K from ..engine import Layer from ..engine import InputSpec from ..utils import conv_utils from ..legacy import interfaces class _Pooling1D(Layer): """Abstract class for different pooling 1D la...
import socket import sys import six # tds protocol versions TDS70 = 0x70000000 TDS71 = 0x71000000 TDS71rev1 = 0x71000001 TDS72 = 0x72090002 TDS73A = 0x730A0003 TDS73 = TDS73A TDS73B = 0x730B0003 TDS74 = 0x74000004 IS_TDS7_PLUS = lambda x: x.tds_version >= TDS70 IS_TDS71_PLUS = lambda x: x.tds_version >= TDS71 IS_TDS...
from sympy.core import Basic, S, C, sympify from sympy.simplify import simplify from sympy.geometry.exceptions import GeometryError from entity import GeometryEntity from point import Point from ellipse import Circle from line import Line, Segment class Polygon(GeometryEntity): """ A simple polygon in space. ...
#!/usr/bin/env python """ Processes postfix logs and reports metrics to StatsD. Supported enviroment variables and their respective defaults: STATSD_HOST=localhost STATSD_PORT=8125 STATSD_PREFIX=None STATSD_MAXUDPSIZE=512 """ """ :copyright: (c) 2012 DISQUS. :copyright: (c) 2015 UK Ministry of Justice :license: Apache...
from defusedxml import minidom from defusedxml.common import DefusedXmlException from xml.parsers.expat import ExpatError from django.utils.translation import ugettext from olympia import amo from olympia.files.utils import RDFExtractor, SafeZip, get_file def insert_validation_message(results, type_='error', messag...
from typing import Optional from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.expectations.expectation import ( ColumnMapExpectation, InvalidExpectationConfigurationError, ) from great_expectations.expectations.util import render_evaluation_parameter...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import math import sys import torch import torch.nn as nn import torch.nn.functional as F from fairseq.models import BaseFair...
# -*- coding: utf-8 -*- # Copyright (c) 2013 Ole Krause-Sparmann # 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 # -*- coding: u...
"""This class stores all of the samples for training. It is able to construct randomly selected batches of phi's from the stored history. It allocates more memory than necessary, then shifts all of the data back to 0 when the samples reach the end of the allocated memory. """ import pyximport; pyximport.install() im...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'met...
# Copyright 2014 Cloudbase Solutions Srl # 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 r...
from __future__ import absolute_import import unittest import numpy as np from bokeh.properties import ( HasProps, NumberSpec, ColorSpec, Bool, Int, Float, Complex, String, Regex, List, Dict, Tuple, Array, Instance, Any, Interval, Either, Enum, Color, Align, DashPattern, Size, Percent, Angle) class Basic...
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
""" This class has implemented the fuctions for VCenter & creates an object VCenter , which is essentially a VM. """ __author__ = 'Rohan Khale' try: from pyVmomi import vim, vmodl from pyVim.task import WaitForTask from pyVim import connect import atexit from pyVim.connect import Disconnect...
from __future__ import unicode_literals from django.core.validators import RegexValidator from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from model_utils import FieldTracker from model_utils.models import TimeStampedMo...
# -*- coding: utf-8 -*- # # REST Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3rest.py # import unittest from gluon import * from gluon.storage import Storage from s3.s3rest import S3Request try: from cStringIO import StringIO except ImportError: ...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
#!/usr/bin/env python # -------------------------------------------------------------------------- # OligoMiner # structureCheck.py # # (c) 2017 Molecular Systems Lab # # Wyss Institute for Biologically-Inspired Engineering # Harvard University # # Permission is hereby granted, free of charge, to any person obtaining a...
import gzip import os from io import BytesIO from unittest import mock import pytest pd = pytest.importorskip("pandas") dd = pytest.importorskip("dask.dataframe") from fsspec.compression import compr from tlz import partition_all, valmap import dask import dask.dataframe as dd from dask.base import compute_as_if_co...
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCUser(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' kind = 'users' def __init__(self, config, groups=None, verbose=False): ''' Constructor fo...
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Ian Bicking, Clark C. Evans and contributors # This module is part of the Python Paste Project and is released under # the MIT License: http...
# 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...
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- paulett.org) # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Python library for serializing any arbitrary object graph into JSON. It can take a...
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ Tools to related to command line parsing """ import os import sys import argparse import copy import operator from qisys import ui import...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
# Copyright 2006-2009 by Peter Cock. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # #Nice link: # http://www.ebi.ac.uk/help/formats_frame.html """Sequence input/output as Seq...
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE_CLASSES = [ 'django.middleware.cache.UpdateCa...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # 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...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# vim:set ft=python ts=4 sw=4 sts=4 autoindent: ''' Neural network implementation, largely decoupled. Author: Pontus Stenetorp <pontus stenetorp se> Version: 2014-02-06 ''' # TODO: Each class should probably be responsible for its own weight init. # TODO: __slots__ for the vertices. # TODO: Have we in a wa...
import random import numpy as np from field import Field class TestField(object): def setup(self): self.scalar_fs = self.create_scalar_fs() self.vector_fs = self.create_vector_fs() self.constant_values = [0, -5., np.pi, 1e-15, 1.2e12, random.random()] ...
from datetime import datetime, timedelta from hashlib import sha1, sha256, md5 from hmac import new as hmac from types import MethodType import re import requests from domaintools.results import GroupedIterable, ParsedWhois, Reputation, Results AVAILABLE_KEY_SIGN_HASHES = ['sha1', 'sha256', 'md5'] def delimited(ite...
#!/usr/bin/env python import re import sys import socket try: from urlparse import urlparse, urlunparse except ImportError: from urllib.parse import urlparse, urlunparse import logging try: from bs4 import BeautifulSoup except ImportError: sys.stderr.write('You need to get BeautifulSoup installed\n')...
from __future__ import absolute_import, unicode_literals import re from django.conf import settings from django.contrib.auth.models import User from django.test.utils import override_settings from django_comments import signals from bogofilter.models import BogofilterComment from . import CommentTestCase from ..mod...
# Copyright 2022 The Waymo Open Dataset 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...
# Copyright 2013 Rackspace Hosting # 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 require...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for `weblayer.wsgi`. """ import unittest try: # pragma: no cover from mock import Mock except: # pragma: no cover pass class TestInitWSGIApplication(unittest.TestCase): """ Test the logic of `WSGIApplication.__init__`. """ def set...
from datetime import date, datetime, timedelta from django.utils import timezone from django.urls import reverse from workshops.models import Person from workshops.tests.base import TestBase class TestEmptyDuplicates(TestBase): """Tests to return empty context variables when no matches found.""" def setUp(s...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import unicode_literals import logging import multiprocessing import os import pymake.parser import sys...
''' Created on Aug 16, 2016 This program extracts and cleans metadata @author: svanhmic ''' import sys reload(sys) sys.setdefaultencoding('utf-8') import numpy as np from pyspark.sql import SparkSession from pyspark.sql import Row from pyspark.sql.types import StringType from pyspark.sql import functions as F from p...
"""Tests for objects in experimentator/design.py """ from collections import OrderedDict from itertools import product import pytest import numpy as np from experimentator import Design, DesignTree from experimentator.order import Shuffle, Ordering, CompleteCounterbalance, Sorted def make_immutable(list_of_dicts): ...
# -*- coding: utf-8 -*- # pylint: disable=C0103 # pylint: disable=C0111 # pylint: disable=W0235 import machine import utime import ustruct from micropython import const, heap_lock, heap_unlock from ubinascii import hexlify, unhexlify from bluetooth_low_energy.modules.base_hci import ( BaseHCI, HardwareExceptio...
import unittest import doctest import serial from itertools import chain import pyfirmata from pyfirmata import mockup from pyfirmata.boards import BOARDS from pyfirmata.util import str_to_two_byte_iter, to_two_bytes # Messages todo left: # type command channel first byte second byte # -...
# This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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, ...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of headers messages to announce blocks. Setup: - Two nodes, two p2p connections to nod...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Erik Johnson <erik@saltstack.com>` ''' from __future__ import absolute_import # Import Salt Testing libs from salttesting import skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import patch, NO_MOCK, NO_MOCK_REASON ensure_in_syspath('...
""" Support for Osram Lightify. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.osramlightify/ """ import logging import socket import random from datetime import timedelta import voluptuous as vol from homeassistant import util from homeassistant...
# 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...
# 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 l...
"""Test deCONZ remote events.""" from unittest.mock import patch from homeassistant.components.deconz.const import DOMAIN as DECONZ_DOMAIN from homeassistant.components.deconz.deconz_event import CONF_DECONZ_EVENT from homeassistant.const import STATE_UNAVAILABLE from homeassistant.helpers.device_registry import asyn...
#/u/GoldenSights import praw import time import traceback import sqlite3 ''' USER CONFIG ''' APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/ USERAGENT = "" # This is a short description of what the bot does. # For example "/u/GoldenS...
"""Copyright 2009 Chris Davis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
# This file is part of ZS # Copyright (C) 2013-2014 Nathaniel Smith <njs@pobox.com> # See file LICENSE.txt for license information. from contextlib import contextmanager import math from six import BytesIO from nose.tools import assert_raises from zs import ZS, ZSWriter, ZSError from zs.common import write_length_pr...
import logging import numpy as np import matplotlib.pyplot as plt import tectosaur as tct from tectosaur.ops.sparse_farfield_op import ( TriToTriDirectFarfieldOp, FMMFarfieldOp, PtToPtDirectFarfieldOp) from tectosaur.ops.sparse_integral_op import RegularizedSparseIntegralOp from tectosaur.ops.dense_integral_op im...
# Copyright 2013: Mirantis 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 b...
# Village People, 2017 from pig_chase.common import ENV_ACTIONS from pig_chase.agent import PigChaseChallengeAgent from pig_chase.common import ENV_AGENT_NAMES from pig_chase.environment import PigChaseEnvironment, \ PigChaseSymbolicStateBuilder from env.VillagePeopleBuilders import PigChaseVillagePeopleBuilder18...
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, cint from frappe.model import integer_docfield_properties, default_fields from frappe.model.document import Docum...
# 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 ...
import os import pytest import time from collections import namedtuple from io import BytesIO from unittest import mock import boto3 import botocore import numpy as np import pandas as pd from click.testing import CliRunner from sklearn.linear_model import LogisticRegression import mlflow import mlflow.pyfunc import ...
""" Stitch together exons from targeted assemblies. It uses amino acid targets and DNA assemblies from aTRAM. """ import csv from os.path import abspath, join from . import bio, db_stitcher as db, exonerate, util from .log import Logger def stitch(args): """Stitch the exons together.""" log = Logger(args.l...
import os, logging import sgmllib import sys import urllib, sgmllib import re import numpy from pyraf import iraf iraf.gemini() iraf.nifs() iraf.gnirs() iraf.gemtools() import numpy as np import pylab as pl from pyraf import iraffunctions from astropy.io import fits from nifsDefs import convertRAdec, datefmt, writeList...
"""Copyright 2014 Cyrus Dasadia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind with different proxy configuration. Test plan: - Start bitcoind's with different proxy c...
# Lint as: python2, python3 # 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 # ...
"""A text library. TextLib stores a set of strings containing English text as compact binary data. It can also generate Pico-8 Lua code capable of accessing a string given the string's string ID (returned by the encoder method). The goal is to make it easy to write Pico-8 games that use a large quantity of English tex...