text stringlengths 475 200k |
|---|
# 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.
import sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
cla... |
""" Python Character Mapping Codec iso8859_15 generated from 'MAPPINGS/ISO8859/8859-15.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors... |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-proxy-init.py
# Author : Adrian Casajus
########################################################################
__RCSID__ = "$Id$"
import sys
import getpass
import DIRAC
from DIRAC.Core.Base i... |
# vi: syntax=python:et:ts=4
import os
from SCons.Script import *
from config_check_utils import *
def CheckSDL(context, sdl_lib = "SDL", require_version = None):
if require_version:
version = require_version.split(".", 2)
major_version = int(version[0])
minor_version = int(version[1])
... |
# 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... |
from collections.abc import Iterable
import logging
import sys
import textwrap
import warnings
from sqlalchemy.engine import url
from . import sqla_compat
from .compat import binary_type
from .compat import string_types
log = logging.getLogger(__name__)
# disable "no handler found" errors
logging.getLogger("alembic... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2014 Rackspace US, 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.ap... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>)
#
# This program is free software: you can redistribute it and/or modi... |
# Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
# Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets
from __future__ import absolute_import, print_function
import logging
import requests
from requests.exceptions import Timeout
from thre... |
# encoding: utf-8
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Permission'
db.create_table('permissions_permission', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
... |
"""
This page is in the table of contents.
Skeiniso is an analysis script to display a gcode file in an isometric view.
The skeiniso manual page is at:
http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Skeiniso
==Operation==
The default 'Activate Skeiniso' checkbox is on. When it is on, the functions desc... |
# -*- coding: utf-8 -*-
#
# File : examples/timeserie_prediction/switch_attractor_esn
# Description : NARMA 30 prediction with ESN.
# Date : 26th of January, 2018
#
# This file is part of EchoTorch. EchoTorch is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# Licen... |
"""
Regression tests for a few ForeignKey bugs.
"""
from django.db import models
# If ticket #1578 ever slips back in, these models will not be able to be
# created (the field names being lower-cased versions of their opposite
# classes is important here).
class First(models.Model):
second = models.IntegerField(... |
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno... |
# Copyright 2018 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from _hardware import Expectation
from _hardware_android import HardwareAndroid
CPU_CLOCK_RATE = 2035200
MEM_CLOCK_RATE = 13763
GPU_CLOCK_RATE = 670000000
GPU_POWER_LEVEL = 1 # lower i... |
import os
import tempfile
import unittest
from coalib.output.ConfWriter import ConfWriter
from coalib.parsing.ConfParser import ConfParser
class ConfWriterTest(unittest.TestCase):
example_file = ("to be ignored \n"
" save=true\n"
" a_default, another = val \n"
... |
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from pymqi.CMQCFC import MQCMD_STATISTICS_CHANNEL, MQCMD_STATISTICS_Q
from datadog_checks.ibm_mq.stats.base_stats import BaseStats
from datadog_checks.ibm_mq.stats.queue_stats import QueueStats
from ..m... |
#!/usr/bin/env python3
# author: @netmanchris
""" Copyright 2015 Hewlett Packard Enterprise Development LP
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/lic... |
#! /usr/bin/env python
"Remote RCS -- command line interface"
import sys
import os
import getopt
import string
import md5
import tempfile
from rcsclient import openrcsclient
def main():
sys.stdout = sys.stderr
try:
opts, rest = getopt.getopt(sys.argv[1:], 'h:p:d:qvL')
if not rest:
... |
# -*- coding: utf-8 -*-
'''
Created on 2014��11��21��
@author: ���
'''
import unittest
from lxml.etree import Element
from feedin import util
class Test(unittest.TestCase):
def test_etree_to_dict(self):
root = Element('div')
root.append(Element('a', {'href': 'http://aaa.bbb/'}))
result =... |
# Copyright 2010 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... |
from __future__ import absolute_import, division, unicode_literals
from pip.vendor.six import text_type
from bisect import bisect_left
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
if not all(isinstance(x, text_type) for x in data.keys()):
raise TypeError(... |
"""
Holds global web application state and the WSGI handler.
You can run this script for a one-process webapp.
Further, you can pass in ``--check`` which will create the app and then exit
making it easier to suss out startup and configuration issues.
"""
import sys
from waitress import serve
from ichnaea.conf imp... |
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
import os
import shutil
import tempfile
import unittest
from mkdocs import config
from mkdocs import utils
from mkdocs.config import config_options
from mkdocs.exceptions import ConfigurationError
from mkdocs.tests.base import dedent
def ... |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies build of an executable with C++ define specified by a gyp define, and
the use of the environment during regeneration when the g... |
import sys
def __getfilesystemencoding():
'''
Note: there's a copy of this method in interpreterInfo.py
'''
try:
ret = sys.getfilesystemencoding()
if not ret:
raise RuntimeError('Unable to get encoding.')
return ret
except:
try:
#Handle Jytho... |
# This script configures QScintilla for PyQt v3 and/or v4.
#
# Copyright (c) 2015 Riverbank Computing Limited <[EMAIL]>
#
# This file is part of QScintilla.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the fil... |
import unittest
from rx import Observable, return_value, throw, empty, create
from rx.testing import TestScheduler, ReactiveTest
from rx.disposable import SerialDisposable
from rx.operators import map, map_indexed
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_erro... |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from eve.uti... |
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... |
# -*- coding: utf-8 -*-
"""
This module contains the functional tests for using virbox.
:copyright: (c) 2012 by Sean Plaice
:license: ISC, see LICENSE for more details.
"""
#import logging
#import testify
#
#from virtbox.manage import (
# modifyvm,
# storageattach,
# startvm,
# )
#from vir... |
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from lms.djangoapps.course_blocks.api import get_course_blocks
from openedx.core.djangolib.testing.utils import get_mock_request
from student.models import CourseEnrollment
from student.tests.factories import UserFactory
from xmodule.modulesto... |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
import os
import datetime
import dateutil.tz
import logging
import lib.config
import lib.connection
import lib.item
import lib.plugin
from lib.shtime import Shtime
from lib.module import Modules
import lib.utils
from lib.model.smartplugin import SmartPlugin
from lib.constants import (YAML_FILE, CONF_FILE, DEFAULT_F... |
"Simple Fts backend"
import os
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.db.models import Q
from django.db import transaction
from fts.backends.base import BaseClass, BaseModel, BaseManager
from fts.models import IndexWord, Index
... |
# ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# @author: Li Li ([EMAIL]) ... |
"""Orthogonal matching pursuit algorithms
"""
# Author: Vlad Niculae
#
# License: BSD 3 clause
import warnings
import numpy as np
from scipy import linalg
from scipy.linalg.lapack import get_lapack_funcs
from .base import LinearModel, _pre_fit
from ..base import RegressorMixin
from ..utils import as_float_array, ch... |
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# 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
#
... |
#! /usr/bin/env python
__author__ = '[EMAIL]'
class Segment( object ):
"""
A Class for representing a segment of a Nucmer Alignment
"""
def __init__(self, start, end, source=None):
assert isinstance(start, int)
assert isinstance(end, int)
assert start != end
self._star... |
import networkx
import matplotlib.pyplot as plt
def input_edges_list():
"""считывает список рёбер в форме:
в первой строке N - число рёбер,
затем следует N строк из двух слов и одного числа
слова - названия вершин, концы ребра, а число - его вес
return граф в форме словаря рёбер и соответствую... |
'''
Abbreviation Extension for Python-Markdown
==========================================
This extension adds abbreviation handling to Python-Markdown.
Simple Usage:
>>> import markdown
>>> text = """
... Some text with an ABBR and a REF. Ignore REFERENCE and ref.
...
... *[ABBR]: Abb... |
# Copyright 2014 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 to in writing, s... |
#!/usr/bin/env python
# Copyright 2013 The Swarming Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0 that
# can be found in the LICENSE file.
"""Client tool to trigger tasks or retrieve results from a Swarming server."""
__version__ = '0.8.2'
import collection... |
import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import tmp_dnn
import tta
features = [
# "hu",
# "tutorial",
"haralick",
# "aaronmoments",
# "lbp",
# "pftas",
# "zernike_moments",
# "image_siz... |
class BaseContext(object):
def __init__(self, evaluator, parent_context=None):
self.evaluator = evaluator
self.parent_context = parent_context
def get_root_context(self):
context = self
while True:
if context.parent_context is None:
return context
... |
"""
This module houses the ctypes function prototypes for OGR DataSource
related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*,
OGR_Fld_* routines are relevant here.
"""
from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p
from django.contrib.gis.gdal.envelope import OGREnvelope
from djan... |
"""Test date/time type.
See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases
"""
import os
import sys
import pickle
import cPickle
import unittest
from test import test_support
from datetime import MINYEAR, MAXYEAR
from datetime import timedelta
from datetime import tzinfo
from datetime import time
from da... |
#
# 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 ... |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.test import TestCase, override_settings
from django.views.generic.base import View
from .models import Artist, Author, Page
@override_settings(ROOT_URLCONF='generic_views.urls')
class Deta... |
__all__ = ['VIEW_SET_URL', 'VIEW_SET_VIEW']
VIEW_SET_URL = """from rest_framework.routers import SimpleRouter
from {{ app }} import views
router = SimpleRouter()
{% for model in models %}
router.register(r'{{ model | lower }}', views.{{ model }}ViewSet, '{{model}}'){% endfor %}
urlpatterns = router.urls
"""
VIE... |
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# 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... |
from __future__ import print_function
import numpy as np
from .distributions import *
__all__ = ["Model", "Node", "data_declaration", "data_definition",\
"generate_h", "generate_cpp"]
class Model:
def __init__(self):
self.nodes = []
self.indices = {}
self.num_params = 0
d... |
# Copyright (C) 2003-2007 Robey Pointer <[EMAIL]>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
... |
# 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
# d... |
# Copyright 2013 NEC Corporation
# 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/LICENSE-... |
# -*- coding: utf-8 -*-
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel
# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields
from openerp import tools
class ReportProjectTaskUser(models.Model):
_inherit = 'report.p... |
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
from five import grok
from htmlentitydefs import entitydefs
from plone.intelligenttext.transforms import \
convertHtmlToWebIntelligentPlainText
from tn.plonemailing import interfaces
import lxml.html
import re
links_with_href_re = re.compile(
r'(?m)<a([^<]+)href="([^<"]+)"([^<]*)>([^<]+)<\/a>',
re.IGNOREC... |
#!/usr/bin/python
usage = "sanityCheck_FakeDb.py [--options]"
description = "provides unit tests and basic checks of FakeDb functionality"
author = "[EMAIL]"
#-------------------------------------------------
import os
import random
from ligoTest.gracedb.rest import FakeDb
import simUtils as utils
import pipeline... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
from numpy import abs, asarray, cos, exp, arange, pi, sin, sqrt, sum
from .go_benchmark import Benchmark
class Easom(Benchmark):
r"""
Easom objective function.
This class defines the Easom [1]_ global optimization ... |
from django.db import connections
from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet
from django.contrib.gis import memoryview
from django.contrib.gis.db.models import aggregates
from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField
from django.contrib.... |
# -*- coding: utf-8 -*-
###############################################################################
#
# ListChannelsByID
# Returns a list of channels that match the list of IDs provided.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licen... |
#===============================================================================
# code from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465
# all (c) etc. are of the authors of this procedures, see link above
#===============================================================================
def ... |
import atexit, os, unittest
##import comtypes
import comtypes.typeinfo, comtypes.client
class TypeLib(object):
"""This class collects IDL code fragments and eventually writes
them into a .IDL file. The compile() method compiles the IDL file
into a typelibrary and registers it. A function is also
... |
#!/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.
import os
import sys
import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_DIR = os.path.dirname(SCRIPT_DIR)
... |
# (C) British Crown Copyright 2015 - 2016, Met Office
#
# This file is part of Biggus.
#
# Biggus is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) a... |
import decimal
import json
import unittest
import uuid
from django import forms
from django.core import exceptions, serializers, validators
from django.core.management import call_command
from django.db import IntegrityError, connection, models
from django.test import TransactionTestCase, override_settings
from django... |
#!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2017 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test mempool limiting together/eviction with... |
"""
FR-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField,... |
import types
from django.conf import settings
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext, TemplateDoesNotExist
from django.utils.decorators import classonlymethod
from django_conneg.views import ContentNegotiatedView
from django_conneg.decorators impo... |
"""
Copyright (c) 2016 Keith Sterling
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute,... |
from model.contact import Contact
from random import randrange
def test_change_in_the_contact(app,db):
if len(db.get_contact_list()) == 0:
app.contact.add(Contact(bday="//div[@id='content']/form/select[1]//option[4]",
bmonth= "//div[@id='content']/form/select[2]//option[3]"... |
from __future__ import print_function, division
from collections import defaultdict
from sympy.core.function import expand_log, count_ops
from sympy.core import sympify, Basic, Dummy, S, Add, Mul, Pow, expand_mul, factor_terms
from sympy.core.compatibility import ordered, default_sort_key, reduce
from sympy.core.numb... |
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import errno
import os
import subprocess
import sys
def MakeDirectories(path):
try:
os.makedirs(path)
except OSError as exc:
... |
import logging
from scipy.stats import norm
import numpy as np
from robo.acquisition_functions.base_acquisition import BaseAcquisitionFunction
logger = logging.getLogger(__name__)
class LogEI(BaseAcquisitionFunction):
def __init__(self, model, par=0.0, **kwargs):
r"""
Computes for a given x th... |
""" Encoding Aliases Support
This module is used by the encodings package search function to
map encodings names to module names.
Note that the search function normalizes the encoding names before
doing the lookup, so the mapping will have to map normalized
encoding names to module names.
Con... |
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import os
try:
from banana import template
TEMPLATE_MISSING = False
except ImportError:
TEMPLATE_MISSING = True
import pytest
from .helpers import create_tempfile, cleanup_tempfiles, temp_folder
from . import here
@pytest.ma... |
# -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
from django.conf import settings
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext as _
User = settings.AUTH_USER_MODEL
DURATION = 30
# summer starts 1st June, ends 15th August
SUMMER = ... |
"""
Contains lists of stocks in the S&P100 and S&P500.
NOTE
====
Some of the stocks have been commented out due to errors arising when
on attempting to procure their data using ystockquote.
ISSUE: https://github.com/cgoldberg/ystockquote/issues/43
"""
SNP100 = [
"AAPL", # Apple Inc.
"ABBV", # AbbV... |
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later ... |
from pykmer.basics import kmers
from pykmer.file import readFasta
import pykmer.kfset as kfset
import gzip
import sys
def isFasta(nm):
"""does this filename look like a FASTA file?"""
if nm.endswith(".fa"):
return True
if nm.endswith(".fas"):
return True
if nm.endswith(".fasta"):
... |
# -*- coding: utf-8 -*-
#
# hh_phaseplane.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, ... |
"""empty message
Revision ID: 41a93799080
Revises: 1a9765a646b
Create Date: 2015-07-02 14:38:39.418104
"""
# revision identifiers, used by Alembic.
revision = '41a93799080'
down_revision = '1a9765a646b'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
### comm... |
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <[EMAIL]> #
# Copyright 2012 Zearin <[EMAIL]> #
# Copyright 2013 Vincent... |
# -*- coding: utf-8 -*-
###############################################################################
#
# Score
# Retrieves a user's Klout Score and deltas.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this fil... |
# -*- coding: utf-8 -*-
"""
***************************************************************************
DeleteColumn.py
---------------------
Date : May 2010
Copyright : (C) 2010 by Michael Minn
Email : pyqgis at michaelminn dot com
************************... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to add authorized_keys for ssh logins.
(c) 2012, Brad Olson <[EMAIL]>
This file is part of Ansible
Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Founda... |
import os
from plugins import BaseAligner
from yapsy.IPlugin import IPlugin
from asmtypes import ArastDataInputError
class BwaAligner(BaseAligner, IPlugin):
def run(self, contig_file=None, reads=None, merged_pair=False):
### Data Checks
if len(self.data.contigfiles) != 1:
raise ArastDa... |
# -*- coding: utf-8 -*-
"""
LibraryContent: The XBlock used to include blocks from a library in a course.
"""
import json
from lxml import etree
from copy import copy
from capa.responsetypes import registry
from gettext import ngettext
from lazy import lazy
from .mako_module import MakoModuleDescriptor
from opaque_key... |
if __name__ == '__main__':
import sys
import os
pkg_dir = (os.path.split(
os.path.split(
os.path.split(
os.path.abspath(__file__))[0])[0])[0])
parent_dir, pkg_name = os.path.split(pkg_dir)
is_pygame_pkg = (pkg_name == 'test... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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/licen... |
"""Tests for Lib/fractions.py."""
from decimal import Decimal
from test.test_support import run_unittest
import math
import numbers
import operator
import fractions
import sys
import unittest
from copy import copy, deepcopy
from cPickle import dumps, loads
F = fractions.Fraction
gcd = fractions.gcd
# decorator for sk... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
import frappe
from frappe import _
from frappe.utils impor... |
# LayerMapping -- A Django Model/OGR Layer Mapping Utility
"""
The LayerMapping class provides a way to map the contents of OGR
vector files (e.g. SHP files) to Geographic-enabled Django models.
For more information, please consult the GeoDjango documentation:
https://docs.djangoproject.com/en/dev/ref/contrib/gi... |
# Copyright (c) 2017 Veritas Technologies LLC
# 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
#
# Unl... |
# Copyright (C) 2010 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 of conditions and the ... |
import warnings
warnings.simplefilter(action="ignore", category=RuntimeWarning)
warnings.simplefilter(action="ignore", category=PendingDeprecationWarning)
import pytest
from tempfile import NamedTemporaryFile
import os
from psutil import virtual_memory
import hicexplorer.hicAggregateContacts
mem = virtual_memory()
me... |
"""
nosetests setuptools command
----------------------------
The easiest way to run tests with nose is to use the `nosetests` setuptools
command::
python setup.py nosetests
This command has one *major* benefit over the standard `test` command: *all
nose plugins are supported*.
To configure the `nosetests` comman... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.