gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import logging
import os
import re
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
display_path,
is_console_interactive,
... | |
#!/usr/bin/env python
import unittest
from graph import Graph
from graph_exceptions import DigraphError, NotDigraphError
class TestBasicOperations(unittest.TestCase):
def test_construct_with_params(self):
graph = Graph({
"a": set(["b", "d"]),
"b": set(["a"]),
"c": set([]),
"d": set(["a"]),
"e": set... | |
# Copyright 2015 IBM Corp.
#
# 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... | |
from os.path import (join, dirname, normpath, isfile,
isdir, exists, realpath, basename)
from os import chdir
import importlib
import glob
from shutil import rmtree
from six import PY2, with_metaclass
import hashlib
from re import match
import sh
import shutil
import fnmatch
from os import listdir... | |
"""
Created on Jun 15, 2013
:author: andrei
"""
import pickle
from bioflow.utils.log_behavior import get_logger
from bioflow.configs.main_configs import Dumps, reactome_biopax_path
from bioflow.configs.main_configs import reactome_forbidden_nodes
from bioflow.neo4j_db.GraphDeclarator import DatabaseGraph
from bioflow.b... | |
from pprint import pprint
from django.contrib.auth.models import AnonymousUser
from django.core.cache import cache
from django.template import Context, Template, TemplateSyntaxError, VariableDoesNotExist
from django.test import RequestFactory
from template_analyzer import get_node_instances
from fluent_contents impor... | |
# Copyright (C) 2012 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/LICEN... | |
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.directnotify import DirectNotifyGlobal
from toontown.hood import Place
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
from toont... | |
#!/usr/bin/python
"""High-level interface to the classes and methods in the package.
"""
from pyci.msg import err, warn, okay, info, vms, set_verbose
settings = None
"""The GlobalSettings instance with interpreted contents of 'global.xml'.
"""
db = {}
"""The scripts database which includes cron status, enabled status ... | |
import copy
import os
from distutils.version import LooseVersion
import nibabel
import nilearn
from nibabel import load as nibabel_load
from nibabel import Nifti1Image as NibabelNifti1Image
from nilearn._utils import check_niimg
from nilearn._utils.class_inspect import get_params
from nilearn._utils.compat import _b... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from proto import prediction_pb2 as proto_dot_prediction__pb2
class GenericStub(object):
"""[END Messages]
[START Services]
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"... | |
from __future__ import print_function
import unittest
from discretize import TensorMesh
from SimPEG import utils
import numpy as np
from SimPEG.electromagnetics import resistivity as dc
try:
from pymatsolver import Pardiso as Solver
except ImportError:
from SimPEG import SolverLU as Solver
from geoana.em imp... | |
from django.core.exceptions import ImproperlyConfigured
from ..settings import PUSH_NOTIFICATIONS_SETTINGS as SETTINGS
from .base import BaseConfig, check_apns_certificate
SETTING_MISMATCH = (
"Application '{application_id}' ({platform}) does not support the setting '{setting}'."
)
# code can be "missing" or "inva... | |
#!/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... | |
#!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows specific tests. These are implicitly run by test_psutil.py."""
import errno
import os
import platform
import signal
imp... | |
"""
Use these tags and filter when you're rolling your own search results.
This is intended to be a whole templatetags module. I keep it in my apps
as templatetags/search.py. These should not be used to perform search
queries, but rather render the results.
Basics
-------
There are three functions, each has both a ... | |
# -*- coding: utf-8 -*-
# Copyright 2013 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 requi... | |
# Copyright 2009-2010 10gen, 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,... | |
# Copyright 2016 Hewlett Packard Enterprise Development LP.
# Copyright 2016 Universidade Federal de Campina Grande
# 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 Licens... | |
"""
INLINE PATTERNS
=============================================================================
Inline patterns such as *emphasis* are handled by means of auxiliary
objects, one per pattern. Pattern objects must be instances of classes
that extend markdown.Pattern. Each pattern object uses a single regular
express... | |
##########################################################################
#
# Copyright (c) 2013, John Haddon. 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 so... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
# Copyright 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 of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
"""Support for Google travel time sensors."""
from __future__ import annotations
from datetime import datetime, timedelta
import logging
from googlemaps import Client
from googlemaps.distance_matrix import distance_matrix
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEnt... | |
#!/usr/bin/env python
#
# Copyright (c) 2013 Intel Corporation. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prepares an Eclipse project directory with Crosswalk added as a library.
It creates a new directory with a base, empty template,... | |
# Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Sylvain Afchain <sylvain.afchain@enovance.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 License at
#
# http://www.apach... | |
# single-file pure-python ed25519 digital signatures, rearranged to minimize
# the namespace pollution so this can be embedded in another file. Adapted
# from https://bitbucket.org/dholth/ed25519ll
# Ed25519 digital signatures
# Based on http://ed25519.cr.yp.to/python/ed25519.py
# See also http://ed25519.cr.yp.to/so... | |
import asyncio
import struct
import dictionary
import datetime
import tests
from collections import *
from os import listdir
from os.path import isfile, join
from enum import Enum
from dicotomix import Dicotomix, Direction, NotFoundException, OrderException
import unidecode
import sys
import numpy as np
ENABLE_TESTS =... | |
import bson.json_util as json
from bson import ObjectId
from flask import session, request, Response
from flask_login import current_user
from mongoengine.errors import DoesNotExist
import pickle
from eat.models.application import Application, Applicant, Income, Child, Ethnicity, Person
from ..forms.applicant import A... | |
import commands
import json
import os
from zipfile import ZipFile, BadZipfile
from django.core.files.storage import default_storage
from django.core.files.base import ContentFile
from django.conf import settings
from django.template.defaultfilters import slugify
from ..models import SapelliProject
from .project_mapp... | |
import logging
import json
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponse, QueryDict, HttpResponseRedirect
from django.core.urlresolvers import reverse, reverse_lazy
from django.views.generic import (
CreateView,
DetailView,
ListView,
UpdateView,
Del... | |
#!/usr/bin/env python
# native Python imports
import os.path
import sys
import annotations
import subprocess
from gemini_load_chunk import GeminiLoader
import time
from cassandra.cluster import Cluster
from string import strip
def load(parser, args):
#if (args.db is None or args.vcf is None):
if args.vcf is... | |
"""Geometrical Planes.
Contains
========
Plane
"""
from __future__ import division, print_function
from sympy.core import Dummy, Rational, S, Symbol
from sympy.core.compatibility import is_sequence
from sympy.functions.elementary.trigonometric import acos, asin, sqrt
from sympy.matrices import Matrix
from sympy.poly... | |
# Copyright 2014 Netflix, 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... | |
# -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# 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... | |
"""Makefile for the cmdln project.
${common_task_list}
See `mk -h' for options.
"""
import sys
import os
from os.path import join, dirname, normpath, abspath, exists, basename
import re
from glob import glob
import webbrowser
from mklib.common import MkError
from mklib import Task
from mklib import sh
class bug... | |
import time
from test_base import TestCase
class Test_Comment(TestCase):
form_selector = '#pp-popup-comment-form-cont .pp-commform-form'
def start_comment(self):
self.js('pixplus.popup.comment.start()')
self.popup_wait_load()
def delete(self, comment):
dellink = self.q('.delete-comment', comment)
... | |
from rpython.flowspace.model import Constant
from rpython.rtyper.lltypesystem import lltype, llmemory, rdict
from rpython.rtyper.lltypesystem.llmemory import weakref_create, weakref_deref
from rpython.rtyper import rclass
from rpython.rtyper.rclass import getinstancerepr
from rpython.rtyper.rmodel import Repr
from rpyt... | |
#!/usr/bin/env python
import random
import os_ident
import uncrc32
try: import pcap as pcapy
except: import pcapy
from impacket import ImpactPacket
from impacket import ImpactDecoder
from impacket.ImpactPacket import TCPOption
from impacket.examples import logger
#defaults
MAC = "01:02:03:04:05:06"
IP = "192.168.... | |
#!/usr/bin/env python
from __future__ import print_function
from builtins import str
from builtins import object
import sys
class SEx_reader(object):
"""Reads in the SExtractor catalogs and stores the information in a dictionary"""
def __init__(self, catalog, preID=None, verb=None):
self.verb = ver... | |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 23 11:13:22 2017
@author: Suhas Somnath, Stephen Jesse
"""
from __future__ import division, print_function, absolute_import, unicode_literals
import numpy as np
from scipy.optimize import least_squares
import itertools as itt
import multiprocessing as mp
import time as t... | |
"""
utilities
"""
import os
import sys
import time
import zlib
import uuid
import math
import fcntl
import base64
import random
import inspect
import datetime
import threading
import traceback
import functools
import Cryptodome.Random
import Cryptodome.Hash.HMAC
import Cryptodome.Cipher.AES
from future.utils import i... | |
#!/usr/bin/env python
import filecmp
import fileinput
import os
import re
import signal
import stat
import time
import glob
import shutil
import difflib
import yaml
from datetime import datetime
from gppylib.commands.base import Command, ExecutionError, REMOTE
from gppylib.commands.gp import chk_local_db_running
from... | |
# coding: utf-8
import setpath
from gzip import zlib
import subprocess
import functions
import time
import urllib2
import urllib
from lib import jopts
from functions.conf import domainExtraHeaders
import lib.gzip32 as gzip
try:
from collections import OrderedDict
except ImportError:
# Python 2.6
from lib.co... | |
# =============================================================================
# OWSLib. Copyright (C) 2005 Sean C. Gillies
#
# Contact email: sgillies@frii.com
#
# $Id: wfs.py 503 2006-02-01 17:09:12Z dokai $
# =============================================================================
from __future__ import (abso... | |
"""Support to interface with universal remote control devices."""
from __future__ import annotations
from collections.abc import Iterable
from dataclasses import dataclass
from datetime import timedelta
import functools as ft
import logging
from typing import Any, cast, final
import voluptuous as vol
from homeassist... | |
#!/usr/bin/env python
# Copyright (c) 2017 Ericsson and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
# pylint:... | |
from typing import Any, Dict, List, Optional, Text
import logging
import re
from email.header import decode_header
import email.message as message
from django.conf import settings
from zerver.lib.actions import decode_email_address, get_email_gateway_message_string_from_address, \
internal_send_message, interna... | |
#!/usr/bin/env python3
VERSION="0.5.0" # MAJOR.MINOR.PATCH | http://semver.org
from collections import defaultdict
from collections import OrderedDict
from io import open
import zipfile
import wave
import math
import re
import os
import sys
import operator
import struct
import argparse
def parse_commandline():
... | |
# Copyright (C) 2011 Sam Rushing
# Copyright (C) 2012-2015 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied... | |
#!/usr/bin/env python
"""A Skeleton HTML page template, that provides basic structure and utility methods.
"""
##################################################
## DEPENDENCIES
import sys
import os
import os.path
from os.path import getmtime, exists
import time
import types
import __builtin__
from Cheetah.Version ... | |
import numpy as np
from jax import (ShapedArray, abstract_arrays, dtypes, core as jc,
linear_util as lu)
from jax.util import safe_map, safe_zip
from jax.core import Literal, Jaxpr, JaxprEqn, Var, TypedJaxpr
from jax.interpreters import xla, partial_eval as pe
from functools import partial
map = safe... | |
# -*- coding: utf-8 -*-
"""
Helios Django Views
Ben Adida (ben@adida.net)
"""
from django.core.urlresolvers import reverse
from django.core.mail import send_mail
from django.core.paginator import Paginator
from django.core.exceptions import PermissionDenied
from django.http import *
from django.db import transaction,... | |
import proxy
import urllib
import re
import requests
from django.conf import settings
from django.http import HttpResponse
from lxml import etree as ET
from django.contrib.auth.models import User
from geoprisma.utils import isAuthorized
from geoprisma.models import Datastore
class WFSProxyFactory(object):
"""
... | |
# Copyright 2020 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 unittest
from unittest import mock
from . import model, parts, signing, test_config
def _get_identity_hash(i):
if i == '[IDENTITY]':
re... | |
# 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 ... | |
# -*- coding: utf-8 -*-
import base64
import pickle
import random
from collections import deque
from copy import copy
try:
from itertools import combinations
except ImportError:
def combinations(items, n):
if n == 0:
yield []
else:
for i in xrange(len(items)):
... | |
"""
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actual... | |
# -*- coding: utf-8 -*-
"""
GOALS:
1) vsmany
* works resaonable for very few and very many
* stars with small k and then k becomes a percent or log percent
* distinctiveness from different location
2) 1-vs-1
* uses distinctiveness and foreground when available
* start with ra... | |
import asyncio
import discord
import datetime
import random
from discord.ext import commands
from operator import itemgetter
from Cogs import Settings
from Cogs import DisplayName
from Cogs import Nullify
from Cogs import CheckRoles
# This is the xp module. It's likely to be retarded.
class Xp:
# Init ... | |
"""Simulation to examine the P(reject) as the parameters for each problem are
varied. What varies will depend on the problem."""
__author__ = 'wittawat'
import kgof
import kgof.data as data
import kgof.glo as glo
import kgof.density as density
import kgof.goftest as gof
import kgof.intertst as tgof
import kgof.mmd a... | |
#!/usr/bin/env python3
""" Create a proxy of each records, where each nucleotide within the factor = 1, the rest = 0
"""
from Bio import SeqIO
import sys
import os
import numpy as np
import itertools
__author__ = "Titouan Laessle"
__copyright__ = "Copyright 2017 Titouan Laessle"
__license__ = "MIT"
# Wanted factor:
... | |
# Natural Language Toolkit: Discourse Representation Theory (DRT)
#
# Author: Dan Garrette <dhgarrette@gmail.com>
#
# Copyright (C) 2001-2011 NLTK Project
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
from logic import *
# Import Tkinter-based modules if they are available
try:
from Tk... | |
# -*- coding: utf-8 -*-
# See LICENSE.txt for licensing terms
#$URL$
#$Date$
#$Revision$
'''
This module provides one useful class: NodeHandler
The NodeHandler class is designed to be subclassed. Each subclass
should support the processing that createpdf.RstToPdf needs to do
on a particular type of node that could ... | |
#!/usr/bin/env python
#
# Copyright 2017 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... | |
#! python
# -*- coding: utf-8 -*-
"""
This program has been used to translate the wav file to dat format.
:author: Daniel C. Pizetta
:contact: daniel.pizetta@usp.br
:since: 2013/05/17
"""
import array
import os
import wave
import sys
from qtpy.QtCore import QObject, Qt
from qtpy.QtWidgets import QDialog, QFileDial... | |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import datetime
import dateutil.parser
import dateutil.tz
import gzip
import json
import logging
import pickle
import sys
from collections import OrderedDict
from functools import partial
from itertools import count, groupby
from six.moves.u... | |
# Copyright 2011 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... | |
# Copyright 2011 Nicholas Bray
#
# 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... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Boot session from cache or build
Session bootstraps info needed by common client side activities including
permission, homepage, default variables, system defaults etc
"""
im... | |
#!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of thi... | |
#!/usr/bin/env python2.7
import os
from sqlalchemy import *
from sqlalchemy.pool import NullPool
from flask import Flask, request, render_template, g, redirect, Response
from Conversation.conversation import entry
import json
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
app = Flask... | |
"""Module for the WelcomeCount Cog."""
import datetime
from typing import List, Union
import discord
from redbot.core import Config, checks, commands
from redbot.core.utils.chat_formatting import box
__all__ = ["UNIQUE_ID", "WelcomeCount"]
UNIQUE_ID = 0x6F7951A4
_DEFAULT_WELCOME = (
"Welcome, {mention}, to {serv... | |
#
# Copyright 2015 LinkedIn Corp. 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 ... | |
import commands
import json
import os
import traceback
import Job
import pUtil
from pUtil import tolog
class GetJob:
def __init__(self, pilot_initdir, node, siteInfo, jobSite):
self.__pilot_initdir = pilot_initdir
self.__pilotWorkingDir = pilot_initdir
self.__env = None
self.__node... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#-*-*- encoding: 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.
#
# Lic... | |
"""Compare marked moles across rotomaps.
Controls:
'left arrow' or 'right arrow' to change image in the left slot.
'up arrow' or 'down arrow' to change rotomap in the left slot.
'space' to swap left slot and right slot.
'p' or 'n' to change the mole being examined in both slots.
'a' to toggle cros... | |
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
#!/usr/bin/python
import Tkinter as tk
import ttk
import br24_driver
from PIL import Image, ImageTk
import time
import math
import threading
#class br24_ctrl_window(mp.Process):
class br24_ctrl_window(threading.Thread):
def __init__(self, master, br, refresh_period=500):
#mp.Process.__init__(self)
... | |
""" Biological attributes
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2017-05-10
:Copyright: 2017, Karr Lab
:License: MIT
"""
from . import core
import Bio
import Bio.Alphabet
import Bio.motifs.matrix
import Bio.Seq
import Bio.SeqFeature
import copy
import json
import six
class FeatureLocationAttribute(core.Liter... | |
# -*- coding: utf-8 -*-
""" Sahana Eden GUI Layouts (HTML Renderers)
@copyright: 2012-15 (c) Sahana Software Foundation
@license: MIT
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 S... | |
# Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | |
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from collections import defaultdict
from dataclasses import dataclass
from typing import Tuple
from pants.backend.python.lint.pylint.subsystem import (
Pylint,
PylintFieldSet,
... | |
# Licensed under an MIT open source license - see LICENSE
import abc
import warnings
from functools import wraps
from weakref import WeakKeyDictionary
import numpy as np
from astropy.units import Quantity
from astropy.table import Table
from astropy import units as u
from astropy.wcs import WCS
from . import six
fr... | |
from unittest import TestCase, mock
from dynamic_fixtures.fixtures.exceptions import FixtureNotFound, MultipleFixturesFound
from dynamic_fixtures.fixtures.loader import Graph
from dynamic_fixtures.fixtures.runner import LoadFixtureRunner
from tests.mixins import MockTestCaseMixin
class LoadFixtureRunnerTestCase(Mock... | |
"""
How do we implement an API for making modules that build
a GSPN and then run the transitions within?
"""
import logging
logger=logging.getLogger(__file__)
class Place:
"""
A place has a unique key and holds tokens.
"""
def __init__(self, key):
self.key=key
self.tokens=list()
cl... | |
from __future__ import unicode_literals
from botocore.exceptions import ClientError, ParamValidationError
import boto3
import sure # noqa
from moto import mock_ec2, mock_kms, mock_rds2
@mock_rds2
def test_create_database():
conn = boto3.client('rds', region_name='us-west-2')
database = conn.create_db_instan... | |
"""Data generators for translation data-sets."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
from data_generators import problem
from data_generators import text_encoder
from data_generators import text_problems
from ... | |
#!/usr/bin/env python
import argparse
import os
import sys
from functools import wraps
from inspect import Parameter
from pprint import pprint
import requests
from halocoin import custom
from halocoin import engine
from halocoin import tools
class Colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN ... | |
# Copyright 2014 Red Hat, 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 a... | |
# Copyright 2013 Rackspace
# 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... | |
"""SCons.Tool.icl
Tool-specific initialization for the Intel C/C++ compiler.
Supports Linux and Windows compilers, v7 and up.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 200... | |
"""Byrd-Omojokun Trust-Region SQP method."""
from __future__ import division, print_function, absolute_import
import scipy.sparse as spc
from .projections import projections
from .qp_subproblem import modified_dogleg, projected_cg, box_intersections
import numpy as np
from numpy.linalg import norm
__all__ = ['equalit... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
from __future__ import print_function, division
from sympy.core import Add, S, C, sympify, oo, pi, Dummy, Rational
from sympy.core.function import Function, ArgumentIndexError
from sympy.core.compatibility import xrange
from .zeta_functions import zeta
from .error_functions import erf
from sympy.functions.elementary.e... | |
"""Stuff that differs in different Python versions and platform
distributions."""
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import, division
import codecs
import locale
import logging
import os
import shutil
import sys
... | |
# coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from devtools_testutils import recorded_by_proxy, set_bodiless_matcher
from azure.core.credentials import AzureKeyCredenti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.