gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import os from astropy import units as u from astropy import wcs from astropy.coordinates import EarthLocation from astropy.coordinates import FK5 from astropy.coordinates import SkyCoord from astropy.io import fits from astropy.time import Time from collections import namedtuple from . import PanBase from .utils imp...
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
import sys import pickle import os import numpy as np import gensim import pandas as pd from sklearn.metrics import confusion_matrix from sklearn.metrics import f1_score from keras.models import Model, load_model from keras.utils import np_utils from keras.models import Model from keras.layers import Conv2D, Average...
# Copyright 2013-2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
#! /usr/bin/env python import argparse import copy import json import logging import operator import re import time import traceback # support Python 2 and 3's versions of this module try: import html.parser as HTMLParser except ImportError: import HTMLParser import config as _config import executor config ...
#!/usr/bin/env python import rospy import os import logging import time import datetime as dt import threading import re import uuid import pandas as pd import traceback from chatbot.cfg import ChatbotConfig from chatbot.client import Client from chatbot.db import get_mongodb, MongoDB from chatbot.polarity import Pol...
# ActivitySim # See full license in LICENSE.txt. import logging import time import multiprocessing import ctypes from collections import OrderedDict import numpy as np import pandas as pd from activitysim.core import inject from activitysim.core import util from activitysim.core import config from activitysim.core i...
from cStringIO import StringIO import contextlib import logging from teuthology import misc as teuthology from teuthology import contextutil from ..orchestra import run from ..exceptions import UnsupportedPackageTypeError log = logging.getLogger(__name__) HADOOP_2x_URL = "http://apache.osuosl.org/hadoop/common/hadoop...
""" A buffered iterator for big arrays. This module solves the problem of iterating over a big file-based array without having to read it into memory. The `Arrayterator` class wraps an array object, and when iterated it will return sub-arrays with at most a user-specified number of elements. """ from __future__ impor...
#!/usr/bin/python import sys import pygame from math import ceil from core import * from walkers import * WALKERS = { 'A*': AStarWalker, 'Dijkstra': DijkstraWalker, 'BFS': BFSWalker } BRUSHES = ['Wall', 'Weight-1', 'Weight-2', 'Weight-3'] class Ring(object): """ A very simle implementation of "...
"""Various high level TF models.""" # Copyright 2015-present Scikit Flow 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...
#------------------------------------------------------------------------------ # Copyright 2014 Esri # 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/LICE...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals try: import cPickle as pickle except ImportError: import pickle import random try: from django.utils.encoding import smart_bytes except ImportError: from django.utils.encoding import smart_str as smart_bytes from djang...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from urllib import urlencode import json from django.conf import settings from django.contrib.auth.models import User from django.db import transaction from django.db.models import Q f...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import unittest import pytest from monty.serialization import loadfn from pymatgen.analysis.bond_dissociation import BondDissociationEnergies module_dir = os.path.join(os.path.dirname(os.path.abspath(__file__))) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # ChemPy - A chemistry toolkit for Python # # Copyright (c) 2010 by Joshua W. Allen ([email protected]) # # Permission is hereby granted, free of charge, to any person obtaining a # co...
# Copyright 2012 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...
# -*- coding: utf-8 -*- """ Identifies images with polarimetric calibration stars and measures the photometry of those stars for each of the four unique polaroid filter rotation angles. The photometric measurements are converted into polarimetric values, which are stored in a .csv file for analysis in the next step. ""...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Test behavior related to masked tables""" import pytest import numpy as np import numpy.ma as ma from astropy.table import Column, MaskedColumn, Table, QTable from astropy.table.column import BaseColumn from astropy.tests.helper import catch_warning...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 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. """Types for building models of metric description xml files. UMA uses several XML files to allow clients to describe the metrics that they collect, e.g. htt...
# Copyright 2020 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) 2010-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 agree...
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # import h5py imp...
import logging log = logging.getLogger(__name__) from pycqed.analysis_v3 import helper_functions as hlp_mod from pycqed.analysis_v3 import processing_pipeline as pp_mod from pycqed.analysis import fitting_models as fit_mods from collections import OrderedDict import numpy as np import lmfit import sys pp_mod.search_m...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
# __author__ = 'sandy' # -*- coding=utf-8 -*- import sys import MySQLdb import datetime from time import time from swift.common.utils import cache_from_env, get_logger, \ split_path, config_true_value, register_swift_info from swift.common.swob import Response, Request from swift.common.swob import HTTPBadRequest, ...
""" Support for MQTT fans. For more details about this platform, please refer to the documentation https://home-assistant.io/components/fan.mqtt/ """ import logging import voluptuous as vol from homeassistant.components import fan, mqtt from homeassistant.components.fan import ( ATTR_SPEED, SPEED_HIGH, SPEED_LOW...
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. # pylint: disable=E0611 from pytest import raises from multiconf import mc_config, ConfigItem, RepeatableConfigItem, ConfigBuilder, ConfigException from multiconf.decorators import nested_...
#!/usr/bin/env python """ ClassLoader for "VM" front end. Ported from C++ to Python. Copyright 2015 Sam Saint-Pettersen Released under the MIT/X11 License. Please see LICENSE file. """ import sys import re from os import path from classfile import ClassFile class ClassLoader: classContents = [] cf = the_class = '...
'''Skype settings. ''' import weakref import sys from utils import * class ISettings(object): '''Represents Skype settings. Access using L{ISkype.Settings<skype.ISkype.Settings>}. ''' def __init__(self, Skype): '''__init__. @param Skype: Skype @type Skype: L{ISkype} ''' ...
""" ClientInfo is a central plugin for recording data about the client, e.g. Health, position, and some auxillary information like the player list. Plugins subscribing to ClientInfo's events don't have to independently track this information on their own. """ from spockbot.mcdata import constants from spockbot.mcdata....
#!/usr/bin/env python3 # # Copyright 2015 Opera Software ASA. 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 # # Unles...
""" Some instructions on writing CLI tests: 1. Look at test_ray_start for a simple output test example. 2. To get a valid regex, start with copy-pasting your output from a captured version (no formatting). Then escape ALL regex characters (parenthesis, brackets, dots, etc.). THEN add ".+" to all the places where ...
from dataclasses import fields from typing import Any, ClassVar, Dict, List, Optional, Tuple from unittest import TestCase from graphql import GraphQLSchema from ...compiler.helpers import Location from ...compiler.metadata import FilterInfo from ...exceptions import GraphQLInvalidArgumentError from ...interpreter im...
# # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import pytest from delphin.codecs import simplemrs from delphin import dmrs @pytest.fixture def dogs_bark(): return { 'top': 10000, 'index': 10000, 'nodes': [dmrs.Node(10000, '_bark_v_1_rel', type='e'), dmrs.Node(10001, 'udef_q_rel'), dmrs.Node(10002, ...
# coding=utf-8 # Copyright 2018 The Batfish Open Source Project # # 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...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.test import TestCase, RequestFactory from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model, HASH_SESSION_KEY from django.core import mail from django.utils.translation import ugettext as _...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # 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/L...
import os import sys import json import re import traceback import logging import webbrowser import copy import pickle import platform import subprocess import time from PyQt4.QtGui import (QMainWindow, QMessageBox, QApplication, QFileDialog, QInputDialog, QLineEdit, Q...
""" manage PyTables query interface via Expressions """ import ast from functools import partial from typing import Any, Dict, Optional, Tuple import numpy as np from pandas._libs.tslibs import Timedelta, Timestamp from pandas.compat.chainmap import DeepChainMap from pandas.core.dtypes.common import is_list_like i...
""" pymc.distributions A collection of common probability distributions for stochastic nodes in PyMC. """ from __future__ import division from .dist_math import * from numpy.random import uniform as runiform, normal as rnormal __all__ = ['Uniform', 'Flat', 'Normal', 'Beta', 'Exponential', 'Laplace', 'T',...
#!/usr/bin/python # Compresses the core Blockly files into a single JavaScript file. # # Copyright 2012 Google Inc. # http://blockly.googlecode.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
import os import textwrap import warnings import numpy as np from astropy.table import Table, join import astropy.units as u from spectral_cube import SpectralCube from pyspeckit.spectrum.models.ammonia_constants import voff_lines_dict from skimage.morphology import disk,erosion from . import first_look from . import g...
# Copyright 2013-2017 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # For python version 2! import datetime, time, sys, os, json import logging, argparse from grab.spider import Spider, Task import dbdrivers, utils, display import likes, lenta, lifenews class NewsParser(Spider): def __init__(self, config, modules, display, **kwargs...
from sympy import (symbols, factorial, sqrt, Rational, atan, I, log, fps, O, Sum, oo, S, pi, cos, sin, Function, exp, Derivative, asin, airyai, acos, acosh, gamma, erf, asech, Add, Mul, integrate) from sympy.series.formal import (rational_algorithm, FormalPowerSe...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
from safemdp.grid_world import * from osgeo import gdal from scipy import interpolate import numpy as np import os import matplotlib.pyplot as plt import GPy __all__ = ['mars_map', 'initialize_SafeMDP_object', 'performance_metrics'] def mars_map(plot_map=False, interpolation=False): """ Extract the map for ...
from datetime import timedelta import httplib as http from django.utils import timezone from nose.tools import * # noqa (PEP8 asserts) from modularodm.exceptions import KeyExistsException from framework.auth import campaigns, views as auth_views, cas from website.util import web_url_for from website.project.model i...
# -*- coding: utf-8 -*- # Copyright 2016 Yelp 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 ...
""" Module with various calculators """ from dynamic_dynamodb.log_handler import LOGGER as logger from dynamic_dynamodb.config_handler import get_table_option def get_min_provisioned_reads(current_provisioning, key_name): """ Returns the minimum provisioned reads :type current_provisioning: int :param cu...
from toontown.shtiker import ShtikerPage from panda3d.core import TextNode, Vec4 from direct.gui.DirectGui import DirectLabel, DirectFrame, DirectButton, DirectScrolledList, DGG from toontown.toonbase import TTLocalizer from toontown.building import GroupTrackerGlobals SUIT_ICON_COLORS = (Vec4(0.863, 0.776, 0.769, 1.0...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
"""Map all bindings to PySide2 This module replaces itself with the most desirable binding. Project goals: Qt.py was born in the film and visual effects industry to address the growing need for the development of software capable of running with more than one flavour of the Qt bindings for Python - PySide...
# coding=utf-8 # Copyright 2021 RLDSCreator 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...
# coding:utf-8 import datetime from .user import User from db.mysql_model import BaseModel from peewee import * from settings.config import config class PostCategory(BaseModel): """ class """ name = CharField(verbose_name='name') str = CharField(unique=True, verbose_name='str') class PostTopic...
import glob import os import py_compile import stat import sys import zipfile import py import pytest ast = pytest.importorskip("ast") if sys.platform.startswith("java"): # XXX should be xfail pytest.skip("assert rewrite does currently not work on jython") import _pytest._code from _pytest.assertion import u...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, labman development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -----------------------------------------------------...
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
import rospy import mongodb_store_msgs.srv as dc_srv import mongodb_store.util as dc_util from mongodb_store_msgs.msg import StringPair, StringPairList, SerialisedMessage, Insert from bson import json_util from bson.objectid import ObjectId import json import copy class MessageStoreProxy: """ A class that provides ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
# -*- coding: utf-8 -*- """ Various dependencies that are required for file-metadata which need some special handling. """ from __future__ import (division, absolute_import, unicode_literals, print_function) import ctypes.util import hashlib import os import subprocess import sys from distutil...
# Copyright 2015 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 by a...
# Copyright 2015-2017 Capital One Services, 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 ...
from __future__ import division from misc_scripts.r_factor_calc import * from iotbx.pdb.multimer_reconstruction import multimer import multiprocessing as mp from iotbx import pdb import cPickle as pickle import os ''' Read list of pdb files names with more than one good BIOMT records Read list of pdb files names wi...
import inspect from graceful.validators import min_validator, max_validator class BaseField: """Base field class for subclassing. To create new field type subclass :any:`BaseField` and implement following methods: * ``from_representation()``: converts representation (used in request/response ...
try: from xml.etree import cElementTree as etree except ImportError: from xml.etree import ElementTree as etree class TagDescriptor(object): def __get__(_self, _instance, cls): return getattr(cls, '__tag__', None) or cls.__name__ class TypeNameDescriptor(object): def __get__(_self, instance,...
# Copyright 2015 Alex Meade # 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 ap...
"""Tests for pytest-cov. Known issues: - If py 2 then can have tx for any py 2, but problems if tx for py 3. - If py 3.0 then can have tx for py 3.0 / 3.1, but problems if tx for py 2. - If py 3.1 then can have tx for py 3.1, but problems if tx for py 2 or py 3.0. - For py 3.0 coverage seems to give incorrect resu...
# -*- coding: utf-8 -*- import sys import os import subprocess import urllib #import zlib #import bz2 import zipfile #import tarfile from optparse import OptionParser ENV = None OPTS = None PATH = None TARGETS = None optparser = None if not hasattr(str, 'format'): # Dirty implementation of str.format() # ...
# Copyright (C) 2014 VA Linux Systems Japan K.K. # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> # Copyright (C) 2014 Fumihiko Kakuma <kakuma at valinux co jp> # All Rights Reserved. # # Based on openvswitch agent. # # Copyright 2011 VMware, Inc. # All Rights Reserved. # # Licensed under the Apache...
""" A clustergram function similar to MATLAB clustergram() Author: Zichen Wang Created on 4/7/2014 Major enhancement: enables group labels for rows and columns, which can be useful to directly visualize whether the hierarchical clustering outcome agree with inherent catagories of samples. References: https://code...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
# -*- coding: utf-8 """ Classes for loading digital elevation models as numeric grids """ import numexpr import numpy as np import os import subprocess import sys import matplotlib import matplotlib.pyplot as plt from copy import copy from osgeo import gdal, gdalconst from rasterio.fill import fillnodata from scar...
#!/usr/bin/env python3 import cv2 import numpy as np from time import sleep from time import time LowH=0 HighH=50 LowS=59 HighS=255 LowV=0 HighV=236 morph=11,3 '''LowH2=0 HighH2=0 LowS2=0 HighS2=19 LowV2=235 HighV2=255''' morph=(11,3) def imfill(img): ret,im_flood = cv2.threshold(img,127,255,cv2.THRESH_BINARY) ...
from cardboard import types from cardboard.ability import ( AbilityNotImplemented, spell, activated, triggered, static ) from cardboard.cards import card, common, keywords, match @card("Storm Cauldron") def storm_cauldron(card, abilities): def storm_cauldron(): return AbilityNotImplemented def s...
""" The PyGame-powered screen """ import pygame import time import threading from .message import Message ## Some default configuration for the screen from spotted_wall.server.utils import lazy_property, Counter SCREEN_PADDING = 40 MESSAGES_PADDING = 40 FONT_SIZE = 40 FRAME_RATE = 60 SHOW_FPS = True DEBUG = True ...
import sys,string import os def makeTestFile(): all_data = [['name','harold','bob','frank','sally','kim','jim'], ['a','0','0','1','2','0','5'],['b','0','0','1','2','0','5'], ['c','0','0','1','2','0','5'],['d','0','0','1','2','0','5']] input_file = 'test.txt' export_object = open(input_...
#!/usr/bin/env python # # Copyright 2011-2015 Splunk, 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...
# N-Dimensional Tic-Tac-Toe by Thomas Lively from __future__ import division import curses, curses.ascii, sys # logical representation of the n-dimensional board as a single list class Model(object): def __init__(self, dimensions=2, size=0, players=2): if size < 3: size = dimensions+1 ...
''' Created on Feb 4, 2012 @author: mchrzanowski ''' import os.path from time import time cardNumberToArrayDict = {} arrayToCardNumberDict = {} suitToArrayDict = {} arrayToSuitDict = {} evaluationDict = {} def doesContainRoyalFlush(hand): for suit in suitToArrayDict: if hand[cardNumberToArrayDict['T']][...
from . import opcodes from ..java import opcodes as JavaOpcodes class Command: """A command is a sequence of instructions producing a distinct result. The `operation` is the final instruction that yields a result. A series of other instructions, known as `arguments` will be used to execute `operation...
### # Copyright (c) 2003-2004, Jeremiah Fincher # 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 co...
#!/usr/bin/python import sys, re, random, os, multiprocessing import argparse import json import GenePredBasics, PSLBasics, FileBasics, BigFileBasics from shutil import rmtree # Pre: A long read psl file. Any number of genepred files in the format "Gene Predictions and RefSeq Genes with Gene Names". # gzipped ...
"""Implement common widgets layouts as reusable components""" import re from collections import defaultdict from traitlets import Instance, Bool, Unicode, CUnicode, CaselessStrEnum, Tuple from traitlets import Integer from traitlets import HasTraits, TraitError from traitlets import observe, validate from .widget im...
""" This script is a collection of objects and methods used for MDNs: inspired from Theano MLP tutorial http://deeplearning.net/tutorial """ __docformat__ = 'restructedtext en' import cPickle import os import sys import time import numpy as np import theano import theano.tensor as T import sys class MDNoutputLaye...
# 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) 2015-2019 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 signing using the signrawtransaction* RPCs.""" from test_framework.address import che...
#!/usr/bin/env python3 ################################################################################ # # Copyright 2017 Proyectos y Sistemas de Mantenimiento SL (eProsima). # Copyright (c) 2018-2019 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # mo...
import os import sys import shutil import tensorflow as tf import numpy as np import png from e2eflow.core.flow_util import flow_to_color, flow_error_avg, outlier_pct from e2eflow.core.flow_util import flow_error_image from e2eflow.util import config_dict from e2eflow.core.image_warp import image_warp from e2eflow.ki...
# _*_ coding: utf-8 _*_ """ Implements a base class for all Synchrony test suites to quickly create peer nodes. """ import time import pprint import random import hashlib import unittest import binascii import urlparse from copy import deepcopy from synchrony import app from synchrony.models import Revision from synchr...
# # Collective Knowledge: CK-powered TensorFlow crowdbenchmarking (very early prototyping) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, [email protected], http://fursin.net # cfg={} # Will be updated by CK (meta description of this m...
# # Module which deals with pickling of objects. # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from abc import ABCMeta import copyreg import functools import io import os import pickle import socket import sys from . import context __all__ ...
# -*- coding: utf-8 -*- """ PropertySet: Definition of properties for ``Mark`` objects and labels of ``Axis``objects """ from .core import _assert_is_type, grammar, GrammarClass from .values import ValueRef from ._compat import str_types class PropertySet(GrammarClass): """Definition of properties for ``Mark``...