gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#! /usr/bin/env python # -*- coding: utf-8 -*- """Define evaluation method for the Attention-based model (TIMIT corpus).""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from tqdm import tqdm from examples.timit.metrics.mapping import Map2phon...
#!/usr/bin/env python3 """Manage site and releases. Usage: manage.py release [<branch>] manage.py site For the release command $FMT_TOKEN should contain a GitHub personal access token obtained from https://github.com/settings/tokens. """ from __future__ import print_function import datetime, docopt, errno, file...
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-20 18:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.contrib.taggit import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migratio...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Da...
import os import sys import math import time import pygame current_path = os.getcwd() import pymunk as pm from characters import Bird from level import Level pygame.init() screen = pygame.display.set_mode((1200, 650)) redbird = pygame.image.load( "../resources/images/red-bird3.png").convert_alpha() background2 = ...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import logging import numpy as np import random # TODO: This is not clearly understood, and is deprecated!! import imp import utils import err import fileops as f...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{ITLSTransport}. """ from __future__ import division, absolute_import __metaclass__ = type from zope.interface import implementer from twisted.python.compat import networkString from twisted.python.filepath im...
import numpy as np from astropy.table import Table from astropy.io import fits import matplotlib.pyplot as plt import matplotlib import pickle from matplotlib import cm from numpy.random import randn # table path path = "/Users/caojunzhi/Downloads/upload_20170322/red_clump_dr13.fits" star = fits.open(path) table =...
# 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...
"""Printing subsystem driver SymPy's printing system works the following way: Any expression can be passed to a designated Printer who then is responsible to return a adequate representation of that expression. The basic concept is the following: 1. Let the object print itself if it knows how. 2. Take the best fi...
#!/usr/bin/python from k5test import * import time from itertools import imap # Run kdbtest against the BDB module. realm = K5Realm(create_kdb=False) realm.run(['./kdbtest']) # Set up an OpenLDAP test server if we can. if (not os.path.exists(os.path.join(plugins, 'kdb', 'kldap.so')) and not os.path.exists(os.pat...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import os, unittest from decimal import Decimal from django.db.models import Q from django.contrib.gis.gdal import DataSource from django.contrib.gis.geos import GEOSGeometry, Point, LineString from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.db.models import GeoQ from django.contr...
import pymel.core as pymel import collections from omtk import constants from omtk.core.classModule import Module from omtk.core.classCtrl import BaseCtrl from omtk.core.utils import decorator_uiexpose from omtk.modules import rigIK from omtk.modules import rigFK from omtk.modules import rigTwistbone from omtk.libs imp...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from reportlab.graphics.barcode import createBarcodeDrawing from reportlab.lib.pagesizes import A4 from reportlab.lib.units import inch, mm from reportlab.platypus.doctemplate import NextPageTemplate, FrameBreak from reportlab.platypus.flo...
# coding: utf-8 # # Copyright 2015 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
#! /usr/bin/env python # Macro to scale histograms of all Pt-hard bins, using xsec and ntrials from AliAnalysisTaskPWGJEQA. # This script expects files X/AnalysisResultsPtHardX.root, and will output scaled histograms # to the same file, in a new output list with suffix "Scaled". The script will automatically loop over...
""" File: time_conversion.py Purpose: To define a set of time-based conversion methods including: whole time --> actual time actual time --> whole time """ from misc.ordered_map import OrderedMap from structure.tempo import Tempo from structure.time_signature import TimeSignature from fractions import Fraction...
#Copyright (c) 2017 Vantiv eCommerce # #Permission is hereby granted, free of charge, to any person #obtaining a copy of this software and associated documentation #files (the "Software"), to deal in the Software without #restriction, including without limitation the rights to use, #copy, modify, merge, publish, distri...
""" Production settings for {{ project_name }} project. For an explanation of these settings, please see the Django documentation at: <http://docs.djangoproject.com/en/dev/> While many of these settings assume sensible defaults, you must provide values for the site, database, media and email sections below. """ from...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent from typing import Iterable import pytest from pants.backend.codegen.protobuf.scala.rules import GenerateScalaFromProtobufR...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# Copyright 2018 The Exoplanet ML 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 t...
#!/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...
from py2neo import neo4j, node import json from datetime import datetime from webhelpers.text import urlify from webhelpers.date import time_ago_in_words from webhelpers.paginate import PageURL_WebOb, Page from cuorewebpage.Model.User import User from cuorewebpage.Model.Blog import Blog from database_config import * ...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # 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...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import dis import sys from cStringIO import StringIO import unittest def disassemble(func): f = StringIO() tmp = sys.stdout sys.stdout = f dis.dis(func) sys.stdout = tmp result = f.getvalue() f.close() return result def dis_single(line): return disassemble(compile(line, '', 'single...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
import collections import re from copy import copy from itertools import product from string import Template import numpy as np from joblib import Parallel, delayed from pyparsing import ( CharsNotIn, Group, OneOrMore, Optional, Suppress, Word, ZeroOrMore, alphanums, cppStyleComment...
#!/usr/bin/env python # # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
#!/usr/bin/env python2 # -*- coding:utf-8 -*- import re import sys import utils import Queue import audio import database import contextlib import tornado.gen import tornado.web import sockjs.tornado class BaseHandler(tornado.web.RequestHandler): @property def data(self): return self.application.data ...
from __future__ import (absolute_import, print_function, division, unicode_literals) import inspect import json as json_module import re import _io import six from collections import namedtuple, Sequence, Sized from functools import update_wrapper from cookies import Cookies from requests.uti...
import numpy as np from pi_gcs.gcs2 import WaveformGenerator from pi_gcs.data_recorder_configuration import DataRecorderConfiguration,\ RecordOption from pi_gcs.abstract_tip_tilt_2_axes import AbstractTipTilt2Axis __version__= "$Id: $" class TipTilt2Axis(AbstractTipTilt2Axis): AXIS_A= "A" AXIS_B= "B" ...
# Copyright (c) 2010-2013 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
import tectosaur.util.quadrature as quad from tectosaur.util.paget import paget import numpy as np def vertex_interior_quad(n_theta, n_rho, a): # return quad.gauss2d_tri(10) theta_quad = quad.map_to(quad.gaussxw(n_theta), [0, np.pi / 2]) if a == 0: # rho_quad = quad.telles_singular(n_rho, -1) ...
#!/usr/bin/env python __author__ = 'waroquiers' import unittest import os import numpy as np from pymatgen.util.testing import PymatgenTest from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import LocalGeometryFinder from pymatgen.analysis.chemenv.coordination_environments.coordi...
from collections import defaultdict import copy import datetime import json from appengine_fixture_loader.loader import load_fixture from google.appengine.ext import ndb from helpers.event_details_manipulator import EventDetailsManipulator from helpers.match_helper import MatchHelper from helpers.match_manipulator im...
"""RFC 2822 message manipulation. Note: This is only a very rough sketch of a full RFC-822 parser; in particular the tokenizing of addresses does not adhere to all the quoting rules. Note: RFC 2822 is a long awaited update to RFC 822. This module should conform to RFC 2822, and is thus mis-named (it's not worth rena...
""" This module mainly implements special orthogonal polynomials. See also functions.combinatorial.numbers which contains some combinatorial polynomials. """ from __future__ import print_function, division from sympy.core import Rational from sympy.core.function import Function, ArgumentIndexError from sympy.core.s...
from flask import render_template, flash, redirect, session, url_for, request, \ g, jsonify from flask_login import login_user, logout_user, current_user, login_required from flask_sqlalchemy import get_debug_queries from flask_babel import gettext from datetime import datetime from guess_language import guessLangu...
# Copyright (c) 2015 Metaswitch Networks # 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...
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# 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...
from PyQt4.QtCore import Qt from PyQt4.QtGui import QApplication from Orange.data import Table from Orange.widgets import settings, gui from Orange.widgets.utils.owlearnerwidget import OWBaseLearner from orangecontrib.recommendation import TrustSVDLearner from orangecontrib.recommendation.utils import format_data imp...
# -*- coding: utf-8 -*- from datetime import datetime import random from openerp import _ from openerp import tools from openerp import SUPERUSER_ID from openerp.exceptions import UserError from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT from openerp.tools.safe_eval import safe_eval as eval from openerp...
#!/usr/bin/python # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """This module provides shared functionality to provide Dart metadata for DOM APIs. """ ...
# -*- coding: <utf-8> -*- """ Module that implements a client and server interface useful for controlling a vim server. This module could be used for unit testing or integration testing for a Vim plugin written in Python. Or you can use it to interactively control a Vim editor by Python code, for example, in an Ipytho...
# -*- coding: utf-8 -*- """ Created on Tue Nov 08 14:10:02 2016 @author: Zhenqin Wu """ import tensorflow as tf import numpy as np import os import time from deepchem.metrics import from_one_hot from deepchem.models.tensorflow_models import TensorflowGraph from deepchem.models.tensorflow_models import TensorflowGraph...
import configparser import os import sys import django.conf.locale from django.contrib.messages import constants as messages # NOQA from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ # NOQA config = configparser.ConfigParser() config.read(['/etc/pretix/pretix.c...
# -*- coding: utf-8 -*- # 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...
from conans.errors import ConanException import unittest from conans.model.settings import Settings, bad_value_msg, undefined_value, undefined_field class SettingsLoadsTest(unittest.TestCase): def test_none_value(self): yml = "os: [None, Windows]" settings = Settings.loads(yml) # Same sha...
from itertools import count, ifilter, imap, chain from sys import exit from string import strip # Compatibility for Python 2.6 from counter import Counter from ordereddict import OrderedDict def expandExpr(x, collID="0", numRanks="CNC_NUM_RANKS"): return x and (str(x).strip() .replace("@", "args...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# -*- coding: utf-8 -*- """ Created on Fri Jul 15 16:39:37 2016 @author: dkriete """ from __future__ import division from builtins import range from builtins import object import numpy as np from scipy.signal import firwin, filtfilt, fftconvolve, hilbert from scipy.signal.spectral import _spectral_helper from scipy.s...
""" Miscellaneous utility code for VAR estimation """ from statsmodels.compat.python import range, string_types, asbytes import numpy as np import scipy.stats as stats import scipy.linalg as L import scipy.linalg.decomp as decomp import statsmodels.tsa.tsatools as tsa from scipy.linalg import cholesky #--------------...
#!/usr/bin/env python3 # Copyright (c) 2016-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 the bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when...
# encoding: utf-8 ''' @author: Majeed.sahebzadha ''' from __future__ import unicode_literals import copy import time import numpy as np import pandas as pd import quantipy as qp from os import path from collections import OrderedDict from pptx import Presentation from quantipy.core.cluster import Cluster from quantip...
import cv2 # import gdfmm from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import sys import numpy as np class EdgeImprover: def __init__(self, voxels, gridsize, minX, minY, maxX, maxY): self.voxels = voxels self.gridsize = gridsize self.mask = np.zeros((3 + maxX - minX, 3 + maxY - minY),...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright (c)2012 Rackspace US, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this ...
""" image_text.py Routines for Display modifications and additions. """ # Load the needed packages from ..core import QtGui, QtCore, QtWidgets from .. import core from datetime import datetime as dt class ImageTextBox(QtWidgets.QMainWindow): ''' Interface for executing :py:class:`ImageTextBox`. ''' ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Citrix System. # 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/...
import datetime import sys import unittest from django.conf import settings from django.contrib.admindocs import utils from django.contrib.admindocs.views import get_return_data_type from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.urlresolvers import reverse fr...
# Source Generated with Decompyle++ # File: parameter_mapping_sensitivities.pyc (Python 2.5) from pushbase import consts DEFAULT_SENSITIVITY_KEY = 'normal_sensitivity' FINE_GRAINED_SENSITIVITY_KEY = 'fine_grained_sensitivity' DEFAULT_SENSITIVITY = consts.CONTINUOUS_MAPPING_SENSITIVITY DEFAULT_FG_SENSITIVITY = consts.F...
import os import sqlite3 from flask import Flask, g, session, render_template, jsonify, \ request, flash, redirect, url_for, abort from werkzeug import check_password_hash, generate_password_hash from datetime import datetime, timedelta from time import mktime, localtime import re from functools import wraps app =...
""" Utility to easily select lines from the history and execute them again. `create_history_application` creates an `Application` instance that runs will run as a sub application of the Repl/PythonInput. """ from functools import partial from prompt_toolkit.application import Application from prompt_toolkit.applicati...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import random import math import pre_process import json import collections class classify_knn: """ Initialize the classify class. * n - number of neighbours * using_weighted_distance - if the "weighted distance" is used - True, else False * weight - weight factor for a ...
import math import random from pandac.PandaModules import VBase3, CollisionPlane, CollisionNode, CollisionSphere, CollisionTube, NodePath, Plane, Vec3, Vec2, Point3, BitMask32, CollisionHandlerEvent, TextureStage, VBase4, BoundingSphere from otp.nametag.NametagConstants import CFSpeech from otp.nametag.NametagGroup imp...
#!/usr/bin/env python __author__ = "Vishal Patil" __copyright__ = "Copyright 2010 - 2011, Vishal Patil" __license__ = "New-style BSD" import re import unittest from states import State from states import HierarchicalState from states import ConcurrentState from states import Transition from states import ...
#!/usr/bin/env python # Copyright (c) 2010 Colin Bick, Robert Damphousse # 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 us...
#!/usr/bin/env python # # Copyright 2006 Google Inc. All Rights Reserved. """Calculates Javascript dependencies without requiring Google3. It iterates over a number of search paths and builds a dependency tree. With the inputs provided, it walks the dependency tree and outputs all the files required for compilation...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
import sqlite3 import os from datetime import datetime from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, flash, jsonify # create our application app = Flask(__name__) app.config.update(dict( DATABASE=os.path.join(app.root_path, 'test.db'), DEBUG=True, SECRE...
import logging from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-host...
# Copyright (c) 2016-present, Facebook, 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # import json import yaml from kubernetes_py.K8sContainer import K8sContainer from kubernetes_py.K8sVolumeMount import K8sVolumeMount from kub...
# -*- coding: utf-8 -*- """ Incident Reporting System - Model @author: Sahana Taiwan Team @author: Fran Boon """ module = "irs" if deployment_settings.has_module(module): # --------------------------------------------------------------------- # List of Incident Categories # NB It is important th...
import json import os import time from klein import Klein from twisted.web.static import File import zmq from db import Database from docgetter import get_docs from ipgetter import get_ip import msg from servicegetters import got_cluster, got_slave, got_notebook, got_hdfs import settings app = Klein() slave_db = Da...
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches from scipy.ndimage import filters,interpolation from toplevel import * import sl,morph def B(a): if a.dtype==np.dtype('B'): return a return np.array(a,'B') class record: def __i...
""" Support for Dutch Smart Meter (also known as Smartmeter or P1 port). For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.dsmr/ """ import asyncio from datetime import timedelta from functools import partial import logging from homeassistant.compon...
#!/usr/bin/env python # Copyright 2016 Criteo # # 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...
from typing import Dict, List import numpy as np import pandas as pd import pytest import xarray as xr from xarray.core import formatting_html as fh @pytest.fixture def dataarray(): return xr.DataArray(np.random.RandomState(0).randn(4, 6)) @pytest.fixture def dask_dataarray(dataarray): pytest.importorskip...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
import math, numpy import pickle from fltk import * #Fl.scheme('plastic') from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import sys if '..' not in sys.path: sys.path.append('..') import Math.mmMath as mmMath import Util.ysGlHelper as ygh import GUI.tree as tree import Renderer.ysRende...
""" CISCO_RTTMON_TC_MIB This MIB contains textual conventions used by CISCO\-RTTMON\-MIB, CISCO\-RTTMON\-RTP\-MIB and CISCO\-RTTMON\-ICMP\-MIB, but they are not limited to only these MIBs. These textual conventions were originally defined in CISCO\-RTTMON\-MIB. Acronyms\: FEC\: Forward Equivalence Class LPD\...
import logging import os import shutil import tempfile import unittest from Bio import SeqIO from phylotyper.config import PhylotyperOptions from phylotyper.run import build_pipeline, check_gene_names from phylotyper.subtypes_index import SubtypeConfig from phylotyper.tree.seq import SeqDict from phylotyper.tree.seqal...
#!/usr/bin/env python # TODO add onos-app-fwd to features # TODO check if service is running... i think this might already be done by mn from mininet.node import Controller, OVSSwitch, CPULimitedHost, RemoteController from mininet.net import Mininet from mininet.cli import CLI from mininet.topo import LinearTopo, Top...
#!/usr/bin/env python3 #Copyright (C) 2013 by Ngan Nguyen (nknguyen@soe.ucsc.edu) # Copyright (C) 2012-2019 by UCSC Computational Genomics Lab # #Released under the MIT license, see LICENSE.txtimport unittest ''' Check liftover status Input: bed_file (1 entry per element, e.g 1 line per gene) hal_file q...
from __future__ import absolute_import, unicode_literals import pytest from case import Mock, patch from kombu import Connection, Exchange, Queue from kombu import compat from t.mocks import Transport, Channel class test_misc: def test_iterconsume(self): class MyConnection(object): drain...
# Copyright (c) 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 required by applicable law...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to create a Tkinter application that displays input images and Amazon Textract output. Lets you explore how the detection output relates to the input image. """ from io import BytesIO impo...
import json from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import transaction from django.shortcuts import redirect, render from django.utils.translation.trans_real import to_language import commonware.log from rest_framework import mixins from rest_f...
"""Useful utility methods.""" import re from json import JSONEncoder, dumps from django.db import models from django.forms.models import model_to_dict from functools import partial import datetime from django.shortcuts import redirect from math import log from io import StringIO import sys from django.template.loader i...
import datetime import pickle from django.db import models from django.test import TestCase from django.utils.version import get_version from .models import Container, Event, Group, Happening, M2MModel class PickleabilityTestCase(TestCase): @classmethod def setUpTestData(cls): Happening.objects.crea...
from datetime import datetime, timedelta import time import threading from multiprocessing import Process import logging from pymongo import MongoClient, ReturnDocument logger = logging.getLogger(__name__) STARTTIME_KEY = 'startTime' ENDTIME_KEY = 'endTime' REFRESH_KEY = 'last_refreshed' TIME_WORKED_KEY = 'totalTime...
import os import sys from optparse import OptionParser, NO_DEFAULT import imp import cStringIO, StringIO cStringIO.StringIO = StringIO.StringIO import django from django.core.management.base import BaseCommand, CommandError, handle_default_options from django.utils.importlib import import_module # For backwards comp...