gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/usr/bin/env python3
# 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 requir... | |
import imghdr
import os
from datetime import datetime
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.safestring import mark_safe
import bleach
from uuidfield.fields import UUIDField
from m... | |
from chosen import widgets as chosenwidgets
from django import forms
from models.core import Product
from models.misc import List, ListItem # ,Email_collect
class SignupForm(forms.Form):
first_name = forms.CharField(max_length=30, label="First Name")
last_name = forms.CharField(max_length=30, label="Last Na... | |
# 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 unde... | |
import furl
import pytz
from modularodm import Q
from rest_framework import serializers as ser
from django.core.urlresolvers import resolve, reverse
from website import settings
from framework.auth.core import User
from website.files.models import FileNode
from website.project.model import Comment
from api.base.utils... | |
#!/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 ... | |
"""
SocksiPy - Python SOCKS module.
Version 1.5.4
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | |
# Copyright 2016 Battelle Energy Alliance, 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 agr... | |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import *
import logging
import attrdict as ad
# This is only ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import httpretty
import json
import re
import sys
import os.path
from visearch import client
from visearch.bind import ViSearchAPIError, ViSearchClientError
def request_callback(request, uri, headers):
request_callback.request = request
mock_status... | |
"""Plots tornado reports, storm tracks, and linkages."""
import copy
import os.path
import argparse
import numpy
import pandas
import matplotlib
matplotlib.use('agg')
import matplotlib.colors
import matplotlib.pyplot as pyplot
from gewittergefahr.gg_io import tornado_io
from gewittergefahr.gg_utils import linkage
from... | |
#-------------------------------------------------------------------------
# The Azure Batch Apps Python Client
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docu... | |
"""
pyfilesystem module for agile
"""
DEBUG = True
import os, sys, stat, logging
import urlparse, urllib
import StringIO
import datetime, time
from functools import wraps
import ConfigParser
from jsonrpc import ServiceProxy, JSONRPCException
import json
from fs.base import *
from fs.path import *
from fs.errors i... | |
# 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 ... | |
"""SageMaker component for RLEstimator."""
# 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 w... | |
r"""``TempVars`` *class definition*.
This module is part of ``tempvars``,
a context manager for handling temporary variables in
Jupyter Notebook, IPython, etc.
**Author**
Brian Skinn (bskinn@alum.mit.edu)
**File Created**
10 Sep 2017
**Copyright**
\(c) Brian Skinn 2017-2018
**Source Repository**
ht... | |
#!/usr/bin/env python
# Copyright 2017-2021 The PySCF Developers. 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
#
# U... | |
# 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... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
from collections import deque
import errno
from enum import Enum
import... | |
# -*- coding: utf-8 -*-
"""The multi-process processing engine."""
import abc
import ctypes
import logging
import multiprocessing
import os
import Queue
import random
import signal
import sys
import time
from dfvfs.resolver import context
from plaso.engine import collector
from plaso.engine import engine
from plaso.... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2006, 2009-2010, 2012-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012, 2014 Google, Inc.
# Copyright (c) 2014-2016 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Arun Persaud <arun@nubati.net>
# Copyright (c) 2015 Ionel Cristian Maries <cont... | |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Test case for ORCID oauth remote app."""
from __future__ import absolute_import
... | |
from __future__ import unicode_literals
from __future__ import print_function
from moya.elements.elementbase import LogicElement, Attribute
from moya import logic
from moya import namespaces
import itertools
class Table(LogicElement):
"""
Begins a table content definition. Must be inside a [tag]content[/tag... | |
import logs
import copy
import csv
import logging
import os
import random
import shutil
import string
import StringIO
import sys
import subprocess
import tempfile
import threading
class EnergyPlus(object):
"""Represents the Energy Plus command-line software.
This class provides a consistent interface to... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.conf import settings
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'InformationDesk.phone'
d... | |
#!/usr/bin/env python2.7
"""
Authors: Adam Novak and Malisa Smith
avpr2uml.py: make UML diagrams from Avro AVPR files (which you can easily
generate from AVDL files). Inclusion of other types will be detected and turned
into the appropriate UML edges. ID references will be created if the referencee
has an "id" field, ... | |
"""Raster warping and reprojection"""
from affine import Affine
from math import ceil
import numpy as np
from rasterio._base import _transform
from rasterio._warp import _transform_geom, _reproject, RESAMPLING
from rasterio.transform import guard_transform
def transform(src_crs, dst_crs, xs, ys, zs=None):
"""
... | |
#
# 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
# ... | |
"""
Provide functionality to TTS.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts/
"""
import asyncio
import ctypes
import functools as ft
import hashlib
import io
import logging
import mimetypes
import os
import re
from aiohttp import web
import vo... | |
#!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | |
# -*- coding: utf-8 -*-
# =============================================================================
# shell.py (c) March 2006, 2009 by Kolter <kolter@openics.org>
#
# Licence : GPL v2
# Description : running shell commands in WeeChat
# Syntax : try /help shell to get some help on this script
# Precond... | |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import utils
from .unfold import unfold1d
from fairseq.increm... | |
from __future__ import absolute_import, unicode_literals
import itertools
import django
from django import template
from django.conf import settings
from django.contrib.humanize.templatetags.humanize import intcomma
from django.contrib.messages.constants import DEFAULT_TAGS as MESSAGE_TAGS
from django.template.defaul... | |
# Copyright (c) 2016 IBM 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 ... | |
# 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... | |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
.. note:: This module is the public interface of ``headlessvim`` package.
Import this module to start using ``headlessvim``.
Example:
>>> import headlessvim
>>> with headlessvim.open() as vim:
... vim.echo('"spam"')
...
'spam'
"""
import tempfile
impor... | |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | |
# -*- coding: utf-8 -*-
import re
from unicodedata import normalize
from flask import Blueprint, render_template, current_app
from flask import redirect, url_for, g, abort
from sqlalchemy import desc
from fedora_college.core.database import db
from fedora_college.modules.content.forms import * # noqa
from fedora_colle... | |
import pytest
import arrow
from weasyl import define as d
from weasyl import login
from weasyl.error import WeasylError
from weasyl.test import db_utils
from weasyl.test.utils import Bag
user_name = "test"
email_addr = "test@weasyl.com"
# Main test password
raw_password = "0123456789"
@pytest.mark.usefixtures('db... | |
import os
import asyncio
import logging
import math
import binascii
import typing
from hashlib import sha256
from types import SimpleNamespace
import base58
from aioupnp import __version__ as aioupnp_version
from aioupnp.upnp import UPnP
from aioupnp.fault import UPnPError
from lbry import utils
from lbry.conf import... | |
# -*- coding: utf-8 -*-
'''
Module for managing block devices
.. versionadded:: 2014.7.0
.. deprecated:: Carbon
Merged to `disk` module
'''
from __future__ import absolute_import
# Import python libs
import logging
# Import salt libs
import salt.utils
import salt.utils.decorators as decorators
log = logging.get... | |
# Copyright 2010-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 required by ap... | |
# coding=utf-8
"""
This defines the application module that essentially creates a new flask app object
"""
import os
from datetime import datetime
import jinja2
import redis
from celery import Celery
from flask import Flask, g
from flask_login import LoginManager, current_user
from flask_mail import Mail
from flask_sq... | |
import sys
import copy
import types
import inspect
__all__ = ['dataclass',
'field',
'Field',
'FrozenInstanceError',
'InitVar',
'MISSING',
# Helper functions.
'fields',
'asdict',
'astuple',
'make_dataclass',
... | |
# Copyright 2015 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 agre... | |
#!/usr/bin/python
import argparse
import logging
import requests
import sys
import threading
import time
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
logging.basicConfig(format = '\r%(asctime)s] %(levelname)-9s %(message)s'... | |
from abc import ABCMeta, abstractmethod
from concurrent.futures import Executor
from concurrent import futures
import copy
import datetime
import logging
import os
import time
import threading
import warnings
from civis import APIClient
from civis.base import (
CivisAPIError, CivisJobFailure, DONE, _err_msg_with_j... | |
from typing import Optional, Union, Dict
from collections import defaultdict
import os
import json
from google.oauth2 import service_account
from .lib import mkdir, colorize
HOME = os.path.expanduser('~')
CLOUD_VOLUME_DIR = os.path.join(HOME, '.cloudvolume')
CLOUD_VOLUME_DIR = os.environ.get("CLOUD_VOLUME_DIR", CLO... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | |
# Copyright 2019 kubeflow.org.
#
# 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,... | |
# 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 ... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | |
# Copyright 2019, The TensorFlow 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... | |
import logging
from typing import Union, Any, Optional, Callable, List
from typing_extensions import Literal
import math
import eagerpy as ep
import numpy as np
from foolbox.attacks import LinearSearchBlendedUniformNoiseAttack
from foolbox.tensorboard import TensorBoard
from ..models import Model
from ..criteria im... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
"""Support for interfacing to the Logitech SqueezeBox API."""
import asyncio
import logging
from pysqueezebox import Server, async_discover
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.componen... | |
# Copyright (C) 2016-2018 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import logging
import mock
import pytest
import subprocess
import tempfile
from cuckoo.common.config import config, Config
from cuckoo.common.exceptio... | |
#!/usr/bin/env python3
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# Copyright 2014 Samsung Electronics
# 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
... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
# Copyright 2013 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
#... | |
# -*- coding: utf-8 -*-
from datetime import datetime
from itertools import chain
from copy import copy
try:
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict
from django import template
from django.conf import settings
from django.contr... | |
# 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... | |
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | |
# -*- coding: utf-8 -*-
from gluon import current
from gluon.storage import Storage
from gluon.contrib.simplejson.ordered_dict import OrderedDict
settings = current.deployment_settings
T = current.T
"""
Template settings for Crisis Portal
All settings which are to configure a specific template are located he... | |
from flask import *
from flask.ext.bcrypt import Bcrypt
import modelo
import psycopg2
import os
class User:
def __init__(self, name, fullname, picDir, description, email):
self.name = name
self.fullname = fullname
self.picdir = picDir
self.description = description
self.email = email
UPLOAD_FOLD... | |
import time
import colander
import pytest
from ichnaea.models import Radio
from ichnaea.api.submit.schema_v2 import SUBMIT_V2_SCHEMA
from ichnaea.api.submit.tests.base import BaseSubmitTest
from ichnaea.tests.factories import BlueShardFactory, CellShardFactory, WifiShardFactory
class TestSubmitSchema(object):
d... | |
# Copyright 2013 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 logging
from telemetry.core import util
from telemetry.core.backends.chrome import inspector_timeline_data
from telemetry.core.backends.chrome import ... | |
import bisect
import collections
from typing import Dict, List, Optional, Set, Tuple, Union
from uqbar.objects import new
import supriya # noqa
from supriya.nonrealtime.NodeTransition import NodeTransition
from supriya.nonrealtime.SessionObject import SessionObject
from supriya.nonrealtime.State import State
class... | |
"""
ltisys -- a collection of functions to convert linear time invariant systems
from one representation to another.
"""
from __future__ import division, print_function, absolute_import
import numpy
import numpy as np
from numpy import (r_, eye, atleast_2d, poly, dot,
asarray, product, zeros, array,... | |
"""
WAL-E workers
These are functions that are amenable to be called from other modules,
with the intention that they are used in forked worker processes.
"""
import boto
import functools
import gevent
import json
import logging
import re
import socket
import subprocess
import sys
import tarfile
import tempfile
impor... | |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
"""Static file generator for Django."""
import logging
import os
import stat
import tempfile
import urlparse
import shutil
from django.utils.functional import Promise
from django.http import HttpRequest, QueryDict
from django.db.models.base import ModelBase
from django.db.... | |
#!/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... | |
# Copyright 2021 Sony Group 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 agreed to ... | |
"""
Support code for building Python extensions on Windows.
# NT stuff
# 1. Make sure libpython<version>.a exists for gcc. If not, build it.
# 2. Force windows to use gcc (we're struggling with MSVC and g77 support)
# 3. Force windows to use g77
"""
from __future__ import division, absolute_import, p... | |
"""
This module holds models related to benefits features and configurations
"""
from django import forms
from django.db import models
from django.db.models import UniqueConstraint
from django.urls import reverse
from polymorphic.models import PolymorphicModel
from sponsors.models.assets import ImgAsset, TextAsset, Fi... | |
'''
Contains implementation of a Block generator and BlockSize generator.
@author: Michael Eddington
@version: $Id: block.py 2020 2010-04-14 23:13:14Z meddingt $
'''
#
# Copyright (c) Michael Eddington
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated... | |
#HOW TO RUN: change variables if wanted - lines 12-13 - and run without arguments
from threading import Thread, Semaphore
from time import sleep
import sys
from collections import deque
# Thread safe print
printf = lambda x: sys.stdout.write("%s\n" % x)
## Main setup
n_leaders = 2
n_followers = 5
##
## Advanced set... | |
# coding=UTF-8
from django.core.urlresolvers import reverse
from django.utils.encoding import force_unicode
from django.utils.encoding import smart_str
from django.utils.safestring import mark_safe
from django.db.models.sql.query import LOOKUP_SEP
from django.db.models.related import RelatedObject
from django.utils.tra... | |
#!/usr/bin/env python
import sys
import subprocess
import atexit
from random import randint
from random import seed
children = []
def cleanup():
for child in children:
print "Terminating child process"
child.terminate()
atexit.register(cleanup)
def compile():
subprocess.call("iverilog -o test... | |
import pytest
import jpype
from datetime import datetime, timedelta
from dateutil import parser
from dateutil.tz import tzlocal
from duckling import Duckling, Dim, Language
@pytest.fixture
def test_input():
return '2pm'
@pytest.fixture
def test_time_input():
return 'Let\'s meet tomorrow'
@pytest.fixture
d... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | |
# -*- coding: utf-8 -*-
import os
import glob
import importlib
import mimetypes
from bson import ObjectId
from modularodm import fields
from mako.lookup import TemplateLookup
from time import sleep
import requests
from modularodm import Q
from framework.auth.decorators import must_be_logged_in
from framework.mongo im... | |
#!/usr/bin/env python
import codecs, os, shutil, string
from plasTeX.Filenames import Filenames
from plasTeX.DOM import Node
from plasTeX.Logging import getLogger
from plasTeX.Imagers import Image, PILImage
log = getLogger()
status = getLogger('status')
import logging
logging.getLogger('simpleTAL').setLevel(logging.... | |
"""
@package bridgecut
@author Aaron Zampaglione <azampagl@my.fit.edu>
@copyright 2011 Aaron Zampaglione
@license MIT
"""
from exception import BridgeCutException
from lib.util import combinations, product
class BridgeCut(object):
# What tier are considered during re-ranking.
TIER = 0.2
# Differe... | |
""""
BSD Licence Copyright (c) 2016, Science & Technology Facilities Council (STFC)
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 n... | |
# 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... | |
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# 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... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Specimen) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Specimen(domainresource.DomainResource):
""" Sample for analysis.
A sample to be used for anal... | |
# 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... | |
"""Main processing script for Acton."""
import logging
import time
from typing import Iterable, List, TypeVar
import acton.database
import acton.labellers
import acton.predictors
import acton.proto.io
import acton.proto.wrappers
import acton.recommenders
import numpy
import pandas
import sklearn.linear_model
import s... | |
#!/usr/bin/env python
# Copyright 2013 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.
from cStringIO import StringIO
import json
import unittest
from zipfile import ZipFile
from compiled_file_system import CompiledFileSy... | |
#!/usr/bin/env python2.7
# This simple script was for test A3255 modular.
# there are 128 cores in one A3255 chip.
# If all cores are working the number should be 0.
# If some of them not working the number is the broken cores count.
# Note: Avalon 3.5 use usb2iic instead of uart,
# the usb2iic bridge expose cdc api t... | |
# XXX TypeErrors on calling handlers, or on bad return values from a
# handler, are obscure and unhelpful.
import StringIO, sys
import unittest
import pyexpat
from xml.parsers import expat
from test.test_support import sortdict, run_unittest
class SetAttributeTest(unittest.TestCase):
def setUp(self):
s... | |
""" Tests for PDF billing statement generation """
from decimal import Decimal
import mock
from go.vumitools.tests.helpers import djangotest_imports
with djangotest_imports(globals()):
from django.core.urlresolvers import reverse
from go.base.tests.helpers import DjangoVumiApiHelper, GoDjangoTestCase
fr... | |
"""
This module performs all basic SFA operations.
It is an interface for sfa automata.
"""
# !/usr/bin/python
import random
import string
from dfa import DFA
class Predicate:
"""
The predicate statement
"""
def __init__(self, initializer):
"""
This __init__ method is not implemented... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nicira Networks, 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.apach... | |
# coding=utf-8
from __future__ import unicode_literals
from hashlib import md5
from django.conf import settings
from django.utils.six import python_2_unicode_compatible
from django.utils.timezone import now
from django.contrib.contenttypes.models import ContentType
from django.db.models import IntegerField, FloatFiel... | |
# This module is to parse the gtf file, whoes format can be found at:
# www.ensembl.org/info/website/upload/gff.html
# Note: here we need the order of feature lines like this: gene --> transcript
# --> exon 1 --> exon 2 ..., which is not required for the gtf format. But this
# assumption is usually right for the gtf f... | |
#!/usr/bin/env python2
# Copyright (c) 2015 The Aureus Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.