gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""
Parser for PHD files output by PHRED and used by PHRAP and
CONSED.
Works fine with PHRED 0.020425.c
Version 1.1, 03/09/2004
written by Cymon J. Cox (cymon@duke.edu) and Frank Kauff (fkauff@duke.edu)
Comments, bugs, problems, suggestions to one uf us are welcome!
Uses the Biopython Parser interface for parsing: P... | |
import datetime
import functools
from .base import EventBuilder
from .._misc import utils
from .. import _tl
from ..types import _custom
# TODO Either the properties are poorly named or they should be
# different events, but that would be a breaking change.
#
# TODO There are more "user updates", but bundling t... | |
# -*- coding: utf-8 -*-
'''
Management of firewalld
.. versionadded:: 2015.8.0
The following example applies changes to the public zone, blocks echo-reply
and echo-request packets, does not set the zone to be the default, enables
masquerading, and allows ports 22/tcp and 25/tcp.
.. code-block:: yaml
public:
... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 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/LIC... | |
# Copyright 2014 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | |
"""Calendar serializers."""
from django.utils.translation import ugettext as _
from rest_framework import serializers
from modoboa.admin import models as admin_models
from modoboa.lib import fields as lib_fields
from . import backends
from . import models
class CalDAVCalendarMixin(object):
"""Mixin for calend... | |
from corrdb.common import logAccess, logStat, logTraffic, crossdomain, basicAuthSession
from corrdb.common.models import UserModel
from corrdb.common.models import ApplicationModel
from corrdb.common.models import ProjectModel
from corrdb.common.models import EnvironmentModel
from corrdb.common.models import RecordMode... | |
from __future__ import print_function
from __future__ import division
# from pympler import summary
# from pympler import muppy
# from pympler import tracker
import weakref
import progressbar
from progressbar import *
#own files
from h5tools import *
from tools import *
from features import *
from s... | |
###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | |
# coding: utf-8
"""
KubeVirt API
This is KubeVirt API an add-on for Kubernetes.
OpenAPI spec version: 1.0.0
Contact: kubevirt-dev@googlegroups.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import models into model package
from... | |
# Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/l... | |
"""Support for Apple HomeKit."""
from __future__ import annotations
import asyncio
from copy import deepcopy
import ipaddress
import logging
import os
from aiohttp import web
from pyhap.const import STANDALONE_AID
import voluptuous as vol
from homeassistant.components import device_automation, network, zeroconf
from... | |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | |
"""These routines are for doing typical extracellular (cell-attached) analyses.
The main data structures we use here are XSG dictionaries. These
contain keys by default that have a collection of meta-data, and one
key for each of the three ephus programs (ephys, acquierer and
stimulator).
We have been inspired by th... | |
# -*- coding: utf-8 -*-
from contextlib import contextmanager
from functools import update_wrapper
import atexit
import os
import warnings
import numpy as np
@contextmanager
def ignore_invalid():
err = np.seterr(invalid='ignore')
try:
yield
finally:
np.seterr(**err)
def check_array_lik... | |
# 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.
from __future__ import absolute_import, division, print_function, unicode_literals
import errno
import glob
import ntpath
import os
import su... | |
import os
import signal
import sys
import threading
import time
from unittest import skipIf, skipUnless
from django.db import (
DatabaseError, Error, IntegrityError, OperationalError, connection,
transaction,
)
from django.test import (
TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature,
)
from .mo... | |
# Copyright 2015 Hitachi Data Systems 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... | |
from django import forms
from django.forms import ModelForm
import six
import json
from ..constants import START_YEAR
from .models import TaxSaveInputs
from .helpers import (is_safe, INPUTS_META, bool_like)
from .param_displayers import defaults_all
from .param_formatters import (get_default_policy_param,
... | |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 4 11:52:11 2017
@author: lracuna
"""
from vision.camera import *
from vision.plane import Plane
import autograd.numpy as np
from autograd import grad
from vision.error_functions import geometric_distance_points, get_matrix_conditioning_number, volk... | |
# 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... | |
# project/user/views.py
#################
#### imports ####
#################
import datetime
from flask import render_template, Blueprint, url_for, redirect, flash, request
from flask.ext.login import login_user, logout_user, login_required, current_user
from sqlalchemy import desc
from project.token import gener... | |
# -*- coding: utf-8 -*-
# Copyright IBM Corp. 2015, 2017
#
# 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 ... | |
#!/usr/bin/env python
"""
----
Authors:
Uri Nieto (oriol@nyu.edu)
Eric J. Humphrey (ejhumphrey@nyu.edu)
----
License:
This code is distributed under the GNU LESSER PUBLIC LICENSE
(LGPL, see www.gnu.org).
Copyright (c) 2012-2013 MARL@NYU.
All rights reserved.
Redistribution and use in source and binary forms, wit... | |
#sbaas
from SBaaS_base.postgresql_orm_base import *
class data_stage02_isotopomer_models(Base):
__tablename__ = 'data_stage02_isotopomer_models'
id = Column(Integer, Sequence('data_stage02_isotopomer_models_id_seq'), primary_key=True)
model_id = Column(String(50), primary_key=True)
model_name = Column(... | |
def get_idx(in_files, stop_idx=None, start_idx=None):
"""
Method to get the first and the last volume for
the functional run. It verifies the user specified
first and last volume. If the values are not valid, it
calculates and returns the very first and the last slice
Parameters
--... | |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from ggrc.login import get_current_user
from ggrc.models i... | |
# 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 flask import Flask, request, redirect, session
import lob
import twilio.twiml
from parse_rest.connection import register
from parse_rest.datatypes import Object
from parse_rest.query import QueryResourceDoesNotExist
import time
import re
from flask.ext.cors import CORS
app = Flask(__name__)
app.config.from_objec... | |
# -*- coding: utf-8 -*-
'''
Production Configurations
- Use djangosecure
- Use Amazon's S3 for storing static files and uploaded media
- Use mailgun to send emails
- Use Redis on Heroku
- Use sentry for error logging
- Use opbeat for error reporting
'''
from __future__ import absolute_import, unicode_literals
fro... | |
# Copyright 2014 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.
"""Recipe module to ensure a checkout is consistent on a bot."""
from recipe_engine import recipe_api
from PB.go.chromium.org.luci.buildbucket.proto import... | |
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/textlabels.py
__version__=''' $Id$ '''
import string
from reportlab.lib import colors
from reportlab.lib.utils import simpleSplit, _si... | |
import unittest
import time
import subprocess
import re
from os import remove
from sys import platform as _platform
try:
from smartnixietube.SmartNixieTube import SmartNixieTubeDisplay
except ImportError as e:
import sys
import os
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath... | |
# Author: Mark Wronkiewicz <wronk@uw.edu>
#
# License: BSD (3-clause)
import os.path as op
import warnings
import numpy as np
import sys
import scipy
from numpy.testing import assert_equal, assert_allclose
from nose.tools import assert_true, assert_raises
from nose.plugins.skip import SkipTest
from distutils.version i... | |
import os
import sys
import sysconfig
import copy
import ctypes
import ctypes.util
import warnings
from functools import wraps
import numpy
from numpy.ctypeslib import ndpointer
from scipy import interpolate
from galpy.util import multi, galpyWarning
from galpy.potential_src.Potential import Potential
_DEBUG= False
#Fi... | |
# Copyright 2015 Red Hat, Inc.
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/L... | |
import StringIO
import datetime
import sys
from django.http import HttpResponse
from django.template import loader
from django.utils.encoding import force_unicode, smart_unicode
from django.utils.html import escape
from django.utils.translation import ugettext as _
from django.utils.xmlutils import SimplerXMLGenerator... | |
from collections import defaultdict
from datetime import datetime
from itertools import product
import warnings
import numpy as np
from numpy import nan
import pytest
from pandas.compat import PY2
from pandas import DataFrame, MultiIndex, Series, compat, concat, merge
from pandas.core import common as com
from panda... | |
import torch
import warnings
from torch._six import string_classes
from datetime import timedelta
from .rendezvous import rendezvous, register_rendezvous_handler
from . import BroadcastOptions, AllreduceOptions, ReduceOptions, \
ScatterOptions, GatherOptions
from . import ReduceOp
from . import PrefixStore
from . ... | |
from __future__ import unicode_literals, division, absolute_import
from collections import defaultdict
import logging
import re
from datetime import datetime
from sqlalchemy.orm import relationship
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.schema import Table, ForeignKey
from sqlalchemy import Colum... | |
"""
Reference implementation for sending data to the "mobile" part of DSS.
Open video file/stream and send to 'mobile_streaming' the same way
it is implemented on an Android system.
Requires FFmpeg (with libx264 libfdk_aac).
Might use FFprobe to send metadata
"""
import sys
import re
import socke... | |
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>
#
# 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, modif... | |
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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, ... | |
import json
from django.shortcuts import get_object_or_404
from django.core.exceptions import ObjectDoesNotExist
from django.utils.feedgenerator import Atom1Feed, rfc3339_date
from django.contrib.contenttypes.models import ContentType
from django.contrib.syndication.views import Feed, add_domain
from django.contrib.si... | |
'''tzinfo timezone information for Europe/Zurich.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Zurich(DstTzInfo):
'''Europe/Zurich timezone definition. See datetime.tzinfo for details'''
zone = 'Europe/Zurich'
_ut... | |
# 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
import copy
from collections import defaultdict
from sympy.core.containers import Dict
from sympy.core.compatibility import is_sequence, as_int, range
from sympy.core.logic import fuzzy_and
from sympy.core.singleton import S
from sympy.functions.elementary.miscellaneous... | |
"""Unit tests for memory-based file-like objects.
StringIO -- for unicode strings
BytesIO -- for bytes
"""
import unittest
from test import support
import io
import _pyio as pyio
import pickle
class MemorySeekTestMixin:
def testInit(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(... | |
import json
import logging
from core import ffCommand
from core import ffLocation
from core import getDeviceStatusDict
from core import getDeviceViewsList
from core import getRoutineViewsDict
from core import reinstallRoutinesFromConfig
from core.api.alexa import alexaHandler
from core.api.ifttt import iftttHandler
fr... | |
"""Schema migration helpers."""
import logging
from sqlalchemy import ForeignKeyConstraint, MetaData, Table, text
from sqlalchemy.engine import reflection
from sqlalchemy.exc import InternalError, OperationalError, SQLAlchemyError
from sqlalchemy.schema import AddConstraint, DropConstraint
from .const import DOMAIN
f... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2020 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 descendant package tracking code."""
from decimal import Decimal
from test_framework.blocktools ... | |
# Copyright 2017 The Bazel 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 la... | |
import os, re, sublime, sublime_plugin, colorsys
# RGBA rgba(RRR, GGG, BBB, A.A)
# rgb(50, 150, 200)
# rgba(50, 150, 200, 0.5)
# ARGB argb(AAA, RRR, GGG, BBB)
# argb(255, 50, 150, 200)
# HEX #RRGGBBAA
# #A98
# #A98F
# #AA9988
# #AA9988FF
# INT 0xAARRGGBB
# 0x5599FF
# 0xFFAA443F
# HSLA hsla(HHH, SSS, LLL, A.A)
# hsl(... | |
"""xmltramp: Make XML documents easily accessible."""
__version__ = "2.16"
__author__ = "Aaron Swartz"
__credits__ = "Many thanks to pjz, bitsko, and DanC."
__copyright__ = "(C) 2003 Aaron Swartz. GNU GPL 2."
if not hasattr(__builtins__, 'True'): True, False = 1, 0
def isstr(f): return isinstance(f, type('')) or isin... | |
# 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 t... | |
# Copyright (c) 2010, 2012, 2014 roger
# Copyright (c) 2011 Kirk Strauser
# Copyright (c) 2011 Florian Mounier
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Roger Duran
# Copyright (c) 2012-2015 Tycho Andersen
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2013 Craig Barnes
# Copyright (c) 2014-2015 Sean ... | |
import grpc
import uuid
import logging
import os
import time
from google import auth
from google.protobuf import (duration_pb2)
from resultstoreapi.cloud.devtools.resultstore_v2.proto import (
resultstore_upload_pb2_grpc, resultstore_upload_pb2,
resultstore_download_pb2_grpc, resultstore_download_pb2, invocatio... | |
# 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 t... | |
import socialforcemodel as sfm
import numpy as np
import matplotlib.pyplot as plt
import os
import csv
import psutil
from pympler import asizeof, tracker
np.seterr(all='raise')
try:
import progressbar
except ImportError, e:
print "Progressbar package not found. Please run 'pip install progressbar'"
exit()... | |
# 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 ... | |
'''
Created on 09.01.2011
@author: michi
'''
from PyQt4.QtCore import QAbstractTableModel,QVariant, Qt, QModelIndex
from sqlalchemy import Table
from sqlalchemy.sql.expression import _UnaryExpression,Alias
from sqlalchemy.sql.operators import asc_op,desc_op
import sqlalchemy.schema
from sqlalchemy.sql import func
f... | |
"""Provides device triggers for lutron caseta."""
from __future__ import annotations
import voluptuous as vol
from homeassistant.components.automation import AutomationActionType
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.components.device_automation.exceptions impor... | |
from __future__ import print_function, division
from functools import wraps
from sympy.core import S, Symbol, Tuple, Integer, Basic, Expr
from sympy.core.decorators import call_highest_priority
from sympy.core.compatibility import range
from sympy.core.sympify import SympifyError, sympify
from sympy.functions import ... | |
# For lazy imports
genshi = None
genshi_loader = dict()
simplejson = None
kid = None
mako = None
mako_lookup = None
kajiki_loader = None
try:
from pkg_resources import resource_filename
except ImportError:
def resource_filename(module, filename):
names = module.split(".")+ [filename]
pathname =... | |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'DataDomainIndex.groups'
db.delete_column(u'profiles_datadomainindex', 'groups_id')
... | |
import atexit
from collections import defaultdict
from multiprocessing.pool import ThreadPool
import threading
import ray
from dask.core import istask, ishashable, _execute_task
from dask.local import get_async, apply_sync
from dask.system import CPU_COUNT
from dask.threaded import pack_exception, _thread_get_id
fro... | |
# Copyright 2013 Rackspace Hosting.
#
# 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 2017-2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | |
'''Some custom parmatters useful for various things. See the readme.'''
from .base import ParmatterBase
from ..utilities import args_kwargs_from_args
from ..blank import make_blank
from ..minilang import parse_spec, parse_format_str
import parse as _parse # avoid name conflicts with parse methods
#NOTE: the parse modu... | |
#
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# 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 a... | |
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import glob
import os
import re
import shutil
from pathlib import Path
from pex.interpreter import PythonInterpreter
from wheel import pep425tags
from pants.backend.native.targets.native... | |
# Lint as: python2, python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | |
#!/usr/bin/env python
"""
Created on Thu Dec 19 14:31:36 2013
Author: Oren Freifeld
Email: freifeld@csail.mit.edu
"""
import numpy as np
from pylab import plt
from scipy import sparse
from of.utils import *
from cpab.cpaNd import CpaSpace as CpaSpaceNd
from cpab.cpaNd.utils import null
from cpab.cpa2d.utils import *... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from _socket import gaierror
from django.conf import settings
from django.contrib.auth import logout
from django.http.response import JsonResponse, Http404, HttpResponse
from django.shortcuts import render
from django.views import View
fr... | |
'''
ilf core utilities
'''
import sys
import re
import math
import json
import io
import pandas as pd
from itertools import chain
import pytricia as pt
from .numbers import IP4PROTOCOLS, IP4SERVICES
# -- Helpers
def lowest_bit(num):
bit, low = -1, (num & -num)
if not low:
return 0
while(low):
... | |
"""
Unit tests for the basin hopping global minimization algorithm.
"""
from __future__ import division, print_function, absolute_import
import copy
from numpy.testing import assert_almost_equal, assert_equal, assert_
from pytest import raises as assert_raises
import numpy as np
from numpy import cos, sin
from scipy.... | |
import base64
import hashlib
import json
import os
import re
import smtplib
import sys
import urllib
from django.core.context_processors import csrf
from django.core.validators import validate_email
from django.db.utils import IntegrityError
from django.http import *
from django.shortcuts import render_to_response
fro... | |
import os
import sys
import time
import logging
import signal
import tempfile
from watchdog.observers import Observer
from watchdog.events import LoggingEventHandler, FileSystemEventHandler
from django import conf
from django.conf import settings
from django.utils.module_loading import import_module
from django.db.m... | |
'''analyze WORKING/samples2/train.csv (the training data) to select cities used to build local models
Summarize samples2/train.csv, select 12 cities
and use the summary to create a table of cities ordered by number of trades
INVOCATION
python select-cities2.py n_cities [--test] [--trace]
INPUTS
WORKING/samples2/t... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
"""
(c) 2014 Ronan Delacroix
Doremi DCP2000 CLI Only Utility - Main File
:author: Ronan Delacroix
"""
import sys
import os
import cmd
import shlex
import tbx.text
from . import server as server
from . import requests
import six
class CLI(cm... | |
# -*- coding: utf-8 -*-
import os
import json
import errno
import pickle
import gzip
import numpy as np
import networkx as nx
import cv2
from opensfm import io
from opensfm import config
from opensfm import context
class DataSet:
"""
Dataset representing directory with images, extracted , feature descriptor... | |
# 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 ... | |
"""802.1x implementation for FAUCET."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2017 The Contributors
#
# Licensed under the... | |
# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Atomic Position Data
############################
This module provides a collection of dataframes supporting nuclear positions,
forces, velocities, symbols, etc. (all data associ... | |
# 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
# Copyright (c) 2015-2016 Anish Athalye (me@anishathalye.com)
#
# 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 ri... | |
# 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... | |
# Copyright (c) 2013-2017 Dell Inc, or its subsidiaries.
# Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org... | |
"""Sorted dictionary implementation.
"""
from collections import Set, Sequence
from collections import KeysView as AbstractKeysView
from collections import ValuesView as AbstractValuesView
from collections import ItemsView as AbstractItemsView
from sys import hexversion
from .sortedlist import SortedList, recursive_... | |
from __future__ import print_function, division
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify
from lasagne.objectives import crossentropy, mse... | |
"""Examine callable regions following genome mapping of short reads.
Identifies callable analysis regions surrounded by larger regions lacking
aligned bases. This allows parallelization of smaller chromosome chunks
through post-processing and variant calling, with each sub-section
mapping handled separately.
Regions ... | |
# -*- coding: utf-8 -*-
"""
h2/stream
~~~~~~~~~
An implementation of a HTTP/2 stream.
"""
import warnings
from enum import Enum, IntEnum
from hpack import HeaderTuple
from hyperframe.frame import (
HeadersFrame, ContinuationFrame, DataFrame, WindowUpdateFrame,
RstStreamFrame, PushPromiseFrame, AltSvcFrame
)
... | |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 2 13:27:20 2017
@author: SANDIPAN
"""
import nltk
import tensorflow as tf
import random
import pickle
import numpy as np
import os
from nltk.tokenize import word_tokenize
from nltk.tag.stanford import StanfordPOSTagger as POS_Tag
java_path = "C:/Program Files/Java/jdk1.8... | |
# -*- coding: Latin-1 -*-
"""peutils, Portable Executable utilities module
Copyright (c) 2005-2013 Ero Carrera <ero.carrera@gmail.com>
All rights reserved.
For detailed copyright information see the file COPYING in
the root of the distribution archive.
"""
import os
import re
import string
import urllib
import pef... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import inspect
import mock
import pytest
import raven
import time
from socket import socket, AF_INET, SOCK_DGRAM
from raven.base import Client, ClientState
from raven.exceptions import RateLimited
from raven.transport import AsyncTransport
from raven.util... | |
"""
Penalty matrix generators
"""
import scipy as sp
import numpy as np
def derivative(n, coef, derivative=2, periodic=False):
"""
Builds a penalty matrix for P-Splines with continuous features.
Penalizes the squared differences between basis coefficients.
Parameters
----------
n : int
... | |
from django.forms.util import ValidationError
from django.utils import simplejson as json
from django_facebook import settings as facebook_settings
from django_facebook.utils import mass_get_or_create, cleanup_oauth_url, \
get_profile_class
from open_facebook.exceptions import OpenFacebookException
from django_face... | |
# coding: utf-8
from __future__ import unicode_literals, division, print_function
import os
import tempfile
import shutil
from pymatgen.util.testing import PymatgenTest
from monty.functools import lazy_property
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.io.a... | |
#!/usr/bin/env python3
import socket
from util import ip4_range, ip4_range
import unittest
from framework import VppTestCase, VppTestRunner
from template_bd import BridgeDomain
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
from scapy.contrib.geneve import GENEVE
from scapy.utils import atol
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.