gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Implementation of launch agent. """ import logging import os import sys import time from typing import Any, Dict, Iterable, List, Union import wandb from wandb.apis.internal import Api from wandb.sdk.launch.runner.local import LocalSubmittedRun import wandb.util as util from .._project_spec import create_project...
"""command doit graph - display a graph with task dependencies""" from __future__ import print_function from _functools import partial from _version import (__version__, __updated__) # @UnusedImport from doit import cmd_base from doit.cmd_base import DoitCmdBase from doit.exceptions import InvalidCommand import os i...
import variants import ped import func import pandas as pd import numpy as np import sys class FeaturesVcf: """Given list of variants extract features from vcf files""" def __init__(self, ped_obj, variants_file ): """variants_file contains variants to be annotated with the features from corres...
# 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...
import random import pygame from level import dir_vectors, DIR_S, DIR_N, DIR_W, DIR_E, tile_size WACT_OUTCOME_STAY = 'stay' WACT_OUTCOME_MOVE = 'move' WACT_OUTCOME_ENCOUNTER = 'encounter' class Character(pygame.sprite.DirtySprite): pushable = False is_monster = False # encounters need 2 Characters: 1 pla...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import BaseHTTPServer import os import threading class Responder(object): """Sends a HTTP response. Used with TestWebServer.""" def __init__(self,...
# -*- coding: utf-8 -*- ################################################# # basic.py # imeffect # # Copyright (c) 2013-2014, Chi-En Wu # Distributed under The BSD 3-Clause License ################################################# import numpy as np from numpy.linalg import norm from scipy.ndimage import gaussian_filt...
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,too-many-instance-attributes """Copyright 2015 Roger R Labbe Jr. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.readthedocs.org Supporting book at: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python This is ...
from django.shortcuts import render, render_to_response, redirect from django.template import RequestContext from django.db.models import Q from django.utils import timezone from cir.models import * from cir.phase_control import PHASE_CONTROL from cir.settings import DISPATCHER_URL VISITOR_ROLE = 'visitor' def home(...
""" Test discovery functions. """ import copy import os import sys from lit.TestingConfig import TestingConfig from lit import LitConfig, Test def chooseConfigFileFromDir(dir, config_names): for name in config_names: p = os.path.join(dir, name) if os.path.exists(p): return p retur...
import collections from functools import partial import string import numpy as np import pytest import pandas as pd from pandas import Series import pandas._testing as tm from pandas.core import ops import pandas.core.common as com from pandas.util.version import Version def test_get_callable_name(): getname = ...
from flask import render_template, redirect, url_for, abort, flash, request, \ current_app, make_response from flask.ext.login import login_required, current_user from flask.ext.sqlalchemy import get_debug_queries from . import main from .forms import EditProfileForm, EditProfileAdminForm, PostForm, \ CommentFo...
# tiles.py # All classes related to the organization and display of tiles. # author: Andrew Martin (2006) # # TODO: # [] Comment all classes # [] Rename members that don't adhere to style guidelines # [] Review algorithms to determine if there is a more pythonic way # [] Review classes invluded in module fo...
from __future__ import unicode_literals import time import unittest from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse from django.test import TestCase, RequestFactory from django.views.generic import View, TemplateView, RedirectView from . import views class SimpleView(Vie...
#!/usr/bin/env python import simplejson import random import itertools from collections import defaultdict from twisted.internet.protocol import Factory from twisted.protocols.basic import LineReceiver from twisted.internet import reactor class Dealer(object): def __init__(self, players, seats): self.p...
""" BASIC interpreter, inspired by Tiny BASIC. """ import bisect, operator, sys from parson import Grammar, alter def chat(): print "I am Puny Basic. Enter 'bye' to dismiss me." while True: try: text = raw_input('> ').strip() except EOFError: break if text == 'bye': break try: ...
"""Test shopping list component.""" from homeassistant.components.websocket_api.const import ( ERR_INVALID_FORMAT, ERR_NOT_FOUND, TYPE_RESULT, ) from homeassistant.const import HTTP_NOT_FOUND from homeassistant.helpers import intent async def test_add_item(hass, sl_setup): """Test adding an item inte...
import warnings from html5lib.constants import scopingElements, tableInsertModeElements, namespaces try: frozenset except NameError: # Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset # The scope markers are inserted when entering buttons...
# -*- coding: utf-8 -*- """Windows Programs Cache information collector.""" import logging import uuid import pyfwsi from winregrc import data_format from winregrc import errors from winregrc import interface class ProgramsCacheDataParser(data_format.BinaryDataFormat): """Programs Cache data parser.""" _DEFIN...
# -*- coding: utf-8 -*- """This module contains some math and statistics functions. In the future plan: Eigenvalue, Inverse, Matrix Multiplication, SVD, PCA """ __author__ = 'Wenzhi Mao' __all__ = ['isSquare', 'ANOVA', 'performRegression', 'performPolyRegression'] def isSquare(x): """It is a...
"""Provides an interface for working with multiple event files.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import threading from tensorflow.python.platform import gfile from tensorflow.python.platform import logging from tensorflow.python...
"""Support for performing TensorFlow classification on images.""" import logging import os import sys import voluptuous as vol from homeassistant.components.image_processing import ( CONF_CONFIDENCE, CONF_ENTITY_ID, CONF_NAME, CONF_SOURCE, PLATFORM_SCHEMA, ImageProcessingEntity) from homeassistant.core import...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time import numpy as np import theano from ..conf import TrainerConfig from ..core import env, runtime from ..utils import Timer from ..dataset import Dataset from controllers import TrainingController from abc import ABCMeta, abstractmethod from loggin...
# Computes expected results for Bidirectional GRU layers in `Tests/TensorFlowTests/LayerTests.swift`. # Requires 'tensorflow>=2.0.0a0' (e.g. "pip install tensorflow==2.2.0"). import sys import numpy import argparse import tensorflow as tf # Set random seed for repetable results tf.random.set_seed(0) def indented(s):...
"""Provides Natural Language Understanding functions""" import asyncio import binascii import logging import aiohttp from pynuance.websocket import WebsocketConnection, connection_handshake from pynuance.libs.languages import NLU_LANGUAGES from pynuance.libs.error import PyNuanceError from pynuance.recorder import R...
# 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Questionnaire) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class Questionnaire(domainresource.DomainResource): """ A structured set of questions. A struct...
"""The tests for the generic_thermostat.""" import datetime from asynctest import mock import pytest import pytz import voluptuous as vol from homeassistant.components import input_boolean, switch from homeassistant.components.climate.const import ( ATTR_PRESET_MODE, DOMAIN, HVAC_MODE_COOL, HVAC_MODE_...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
# coding: utf-8 # In[7]: get_ipython().magic(u'matplotlib inline') get_ipython().magic(u"config InlineBackend.figure_formats = {'svg',}") import numpy as np import pandas as pd from IPython.display import display from sklearn.metrics import confusion_matrix from sklearn import metrics from sklearn import cross_vali...
# 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...
#!/usr/bin/python3 """Copyright 2020-2021 Advanced Micro Devices, Inc. Manage build and installation""" import re import sys import os import platform import subprocess import argparse import pathlib from fnmatch import fnmatchcase args = {} param = {} OS_info = {} def parse_args(): """Parse command-line argumen...
# Copyright (c) 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 ...
#!/usr/bin/env python3 # Copyright (c) 2019-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 transaction download behavior """ from test_framework.messages import ( CInv, MSG_TX, ...
import os import sys import string import platform def is_active(): return True def get_name(): return "Android" def can_build(): import os if (not os.environ.has_key("ANDROID_NDK_ROOT")): return False return True def get_opts(): return [ ('ANDROID_NDK_ROOT', 'the path to Android ...
# Copyright (c) 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 ...
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provi...
__all__ = ['Options', 'OptionGroup'] class Options(object): '''Manage group of options for :class:`.ChoicField` ''' def __init__(self, options): self._choices = options or () def all(self): choices = self._choices if hasattr(self._choices, '__call__'): choices = c...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
import collections import datetime import functools import json import os import sys import traceback import urllib from django import http from django.conf import settings from django.core.exceptions import PermissionDenied from django.db import transaction from django.db.models import Count, Q from django.db.models....
#!/usr/bin/python # # based on code from lrvick and LiquidCrystal # lrvic - https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py # LiquidCrystal - https://github.com/arduino/Arduino/blob/master/libraries/LiquidCrystal/LiquidCrystal.cpp # from time import sleep class Adafruit_CharLCD: # commands LC...
# -*- coding: utf-8 -*- # Copyright 2022 Google 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...
# 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...
import angr import nose import pyvex import claripy import archinfo import logging import os from angr import SimState, BP_AFTER, BP_BEFORE, SIM_PROCEDURES, concretization_strategies from angr.engines import SimEngineProcedure, SimEngineVEX def test_inspect(): class counts: #pylint:disable=no-init mem_rea...
import collections import logging import socket import pytest import requests import retrying import test_helpers from dcos_test_utils import marathon __maintainer__ = 'urbanserj' __contact__ = 'dcos-networking@mesosphere.io' DNS_ENTRY_UPDATE_TIMEOUT = 60 # in seconds def _service_discovery_test(dcos_api_session...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Lexing error finder ~~~~~~~~~~~~~~~~~~~ For the source files given on the command line, display the text where Error tokens are being generated, along with some context. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :licens...
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
from __future__ import unicode_literals import datetime import os import re import sys import types from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound, HttpRequest, build_request_repr) from d...
""" Matrix functions that use Pade approximation with inverse scaling and squaring. """ import warnings import numpy as np from scipy.linalg._matfuncs_sqrtm import SqrtmError, _sqrtm_triu from scipy.linalg._decomp_schur import schur, rsf2csf from scipy.linalg._matfuncs import funm from scipy.linalg import svdvals, s...
import string from collections import OrderedDict cardinal_abbrev = OrderedDict([ ('s', ['south']), ('n', ['north']), ('e', ['east']), ('w', ['west']), ('nw', ['northwest','north-west','north west']), ('ne', ['northeast','north-east','north east']), ('sw', ['sou...
# Copyright (c) 2015 VMware, 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...
# Copyright (c) 2015 SONATA-NFV and Paderborn University # 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 re...
#!/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. import optparse import os import re import shlex import subprocess import sys from pylib import cmd_helper from pylib import con...
"""pblite message schemas and related enums.""" # Stop pylint from complaining about enum: # pylint: disable=no-init import enum from hangups.pblite import Message, Field, RepeatedField, EnumField ############################################################################## # Enums ###############################...
#!/usr/bin/env python # # extract_NRCM.py # David J. Lampert # # extracts the grid point for a watershed from the preprocessed NRCM data import os, shutil, pickle, datetime, numpy from multiprocessing import Pool, cpu_count from matplotlib import pyplot, path, patches from shapefile import Reader def ins...
#! /usr/bin/env python3 """ Sets up an Ubuntu 14.04 x64 server to be a Counterblock Federated Node. NOTE: The system should be properly secured before running this script. TODO: This is admittedly a (bit of a) hack. In the future, take this kind of functionality out to a .deb with a postinst script to do all of...
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals, absolute_import import json import requests from copy import deepcopy from atomic_reactor.plugin im...
# 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 io import pytest from pathod import pathod from mitmproxy.net import tcp from mitmproxy import exceptions from mitmproxy.test import tutils from . import tservers from ..conftest import requires_alpn class TestPathod: def test_logging(self): s = io.StringIO() p = pathod.Pathod(("127.0.0...
# -*- coding: utf-8 -*- from __future__ import with_statement import json import datetime from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admin.models import LogE...
# -*- coding: utf-8 -*- #!/usr/bin/env python """Unit tests for Rake.py""" from collections import defaultdict import nltk from rake_nltk import Metric, Rake ########################################################### text = """Compatibility of systems of linear constraints over the set of natural numbers. Criteri...
# # This is a great example of bad code # import deepdish as dd from matplotlib import rc,cm plasma = cm.get_cmap('plasma') fsize = 17 rc('text', usetex=False) rc('font', size=fsize)#, ftype=42) line_width = 3 point_size = 30 import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import glob import ...
"""Example training a memory neural net on the bAbI dataset. References Keras and is based off of https://keras.io/examples/babi_memnn/. """ from __future__ import print_function from tensorflow.keras.models import Sequential, Model, load_model from tensorflow.keras.layers import Embedding from tensorflow.keras.laye...
# -*- coding: utf-8 -*- """Dependency object implementations.""" import logging import re try: import ConfigParser as configparser except ImportError: import configparser class DependencyDefinition(object): """Class that implements a dependency definition. Attributes: architecture_dependent: boolean va...
import numpy as np from assay import assert_raises from pytz import timezone from skyfield.constants import DAY_S from skyfield.timelib import JulianDate, takes_julian_date, utc from datetime import datetime one_second = 1.0 / DAY_S epsilon = one_second * 42.0e-6 # 20.1e-6 is theoretical best precision time_paramete...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2016 Vedams Inc. # Copyright (C) 2016 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 ...
import json import pytest from great_expectations.core.expectation_diagnostics.expectation_test_data_cases import ( ExpectationTestCase, ExpectationTestDataCases, TestData, ) from great_expectations.core.expectation_diagnostics.supporting_types import ( AugmentedLibraryMetadata, ExpectationDescrip...
# 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 th...
# ActivitySim # See full license in LICENSE.txt. from builtins import range import logging import numpy as np import pandas as pd from activitysim.core import tracing from activitysim.core import config from activitysim.core import pipeline from activitysim.core import simulate from activitysim.core import inject fr...
#!/usr/bin/python3 -u # -*- coding: utf-8 -*- from dbus.mainloop.glib import DBusGMainLoop import dbus import argparse import sys import os import json import time import re from gi.repository import GLib # Victron packages sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'ext', 'velib_python')) from vedbus...
# Copyright 2013 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 agreed to...
# # Widgets.py -- wrapped Gtk widgets and convenience functions # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.gtkw import GtkHelp import gtk import gobjec...
# Copyright (C) 2004-2013 by Barry A. Warsaw # # This file is part of flufl.enum # # flufl.enum is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, version 3 of the License. # # flufl.enum is distributed in...
""" Models and managers for generic tagging. """ # Python 2.3 compatibility if not hasattr(__builtins__, 'set'): from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection, models from django.db.models.quer...
# Copyright 2018 the V8 project 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 json import os import sys import time from . import base from ..local import junit_output def print_failure_header(test): if test.output_proc.n...
""" Based on rllab's logger. https://github.com/rll/rllab """ from enum import Enum from contextlib import contextmanager import numpy as np import os import os.path as osp import sys import datetime import dateutil.tz import csv import json import pickle import errno import torch from rlkit.core.tabulate import tabu...
import logging import random from mlabns.db import sliver_tool_fetcher from mlabns.util import distance from mlabns.util import message def _tool_properties_from_query(query): """Create ToolProperties from a LookupQuery. Creates a ToolProperties object for use with a resolver, based on a LookupQuery. No...
"""Implementations of calendaring abstract base class searches.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and incl...
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2016 Daniel Standage <daniel.standage@gmail.com> # Copyright (c) 2016 Indiana University # # This file is part of genhub (http://github.com/standage/genhub) and is # licensed under the BSD 3-claus...
#!/usr/bin/env python3 __version__ = "0.3.3" import argparse import logging import collections import os import sys import Objects import make_differential_dfxml _logger = logging.getLogger(os.path.basename(__file__)) class Differ(object): def __init__(self, pre_path, post_path): self._pre_path = pre_p...
# 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 the...
""" Database models for bookmarks """ from django.contrib.auth.models import User from django.db import models from django.template import defaultfilters from django.core.validators import URLValidator from django.core.exceptions import ValidationError from django.utils.timezone import make_aware from pytz import utc ...
# Copyright 2019 Google 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 writing, ...
"""Implementation of :class:`ExpressionDomain` class. """ from __future__ import print_function, division from sympy.core import sympify, SympifyError from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDo...
import time from amqpstorm import AMQPChannelError from amqpstorm import AMQPMessageError from amqpstorm import Channel from amqpstorm import Message from amqpstorm.base import BaseMessage from amqpstorm.tests.functional.utility import TestFunctionalFramework from amqpstorm.tests.functional.utility import setup clas...
# Copyright (c) 2010-2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
# Licensed Materials - Property of IBM # Copyright IBM Corp. 2019 import unittest import unittest.mock import sys import os import time import requests from streamsx.topology.topology import Topology from streamsx.topology.context import submit, ConfigParams from streamsx.rest_primitives import Instance import streams...
# Copyright 2013 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 agreed to...
from thirdparty import diff_match_patch, htmldiff import copy dmp = diff_match_patch.diff_match_patch() def pretty_text_diff(text1, text2): """ Returns an html fragment showing the differences between two pieces of plain text. Differences are marked up with <ins> and <del> elements with class="diff". """ ...
# 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 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 requ...
from __future__ import absolute_import import six from django import forms from django.db import IntegrityError, transaction from django.http import HttpResponse from django.views.generic import View from django.template.loader import render_to_string from django.utils import timezone from django.utils.safestring imp...
# # [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 # -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.safestring import mark_safe from paypal.standard.conf import * from paypal.standard.widgets import ValueHiddenInput, ReservedValueHiddenInput from paypal.standard.conf import (POSTBACK_ENDPOINT, SAN...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ``fitscheck`` is a command line script based on astropy.io.fits for verifying and updating the CHECKSUM and DATASUM keywords of .fits files. ``fitscheck`` can also detect and often fix other FITS standards violations. ``fitscheck`` facilitates re-wri...
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # 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 # #...
""" ## Hyptotheis Testing Stuff ### Standard Stuff #### Standard Headers """ from __future__ import division import sys import random import math from functools import reduce sys.dont_write_bytecode = True """ #### Standard Utils """ class o(): "Anonymous container" def __init__(i, **fields): i.overri...
""" File: secundal_chord_template.py Purpose: Class that defines a secundal chord in all its variations. """ from harmonicmodel.chord_template import ChordTemplate from tonalmodel.diatonic_tone import DiatonicTone from tonalmodel.interval import Interval, IntervalType from harmonicmodel.secundal_chord import Secunda...