text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python3
r"""
Use robot framework API to extract test result data from output.xml generated
by robot tests. For more information on the Robot Framework API, see
http://robot-framework.readthedocs.io/en/3.0/autodoc/robot.result.html
"""
import sys
import os
import getopt
import csv
import robot.errors
im... | openbmc/openbmc-test-automation | tools/ct_metrics/gen_csv_results.py | Python | apache-2.0 | 11,930 | [
"VisIt"
] | cd88005dfe6fd8e756608229c1932bae6eb4ea7552705fdd287236e32117b91f |
#! /usr/bin/env python
import simulation
import unittest
import numpy as np
import copy
from basic_defs import *
def int_r(f):
""" Convert to nearest integer. """
return int(np.round(f))
# a simple mock source layer
class SimpleNeurons(object):
def __init__(self, N, out_step=1, out_fct=None):
self.N = N
... | ttesileanu/twostagelearning | tests.py | Python | mit | 99,178 | [
"NEURON"
] | 1070dfbb2a34a06ee0933e5c025993aa4b3bf1271e01a8a36e63e8b9422e1912 |
"""
Page objects for interacting with the test site.
"""
import os
import time
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from bok_choy.javascript import js_defined, requirejs, wait_for_js
class SitePage(PageObject):
"""
Base class for all pages in the test site.
... | edx/bok-choy | tests/pages.py | Python | apache-2.0 | 10,245 | [
"VisIt"
] | dcc1d02e5e58d093fed5919dd7d9d6d377a5031bc507930b6004923dd635ac02 |
from __future__ import division
__all__ = \
['Gaussian', 'GaussianFixedMean', 'GaussianFixedCov', 'GaussianFixed',
'GaussianNonConj', 'DiagonalGaussian', 'DiagonalGaussianNonconjNIG',
'IsotropicGaussian', 'ScalarGaussianNIX', 'ScalarGaussianNonconjNIX',
'ScalarGaussianNonconjNIG', 'ScalarGaussianFixe... | michaelpacer/pybasicbayes | pybasicbayes/distributions/gaussian.py | Python | mit | 51,874 | [
"Gaussian"
] | 94a0bb57b259a57e1abe887adf1087f58abb49e3e92a8e045209a27c4744d2ce |
# -*- coding: utf-8 -*-
'''
Copyright (c) 2018 by Tobias Houska
This file is part of Statistical Parameter Optimization Tool for Python(SPOTPY).
:author: Tobias Houska and the SALib team
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ imp... | thouska/spotpy | spotpy/algorithms/fast.py | Python | mit | 10,004 | [
"Gaussian"
] | 2c01cdc615ddf3b730d659b11dd5a70c5fccffbf4fd889ab9001708082b3790f |
"""
Helper functions for the course complete event that was originally included with the Badging MVP.
"""
import hashlib
import logging
import six
from django.urls import reverse
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _
from lms.djangoapps.badges.models import B... | stvstnfrd/edx-platform | lms/djangoapps/badges/events/course_complete.py | Python | agpl-3.0 | 4,669 | [
"VisIt"
] | 454f4e3c376713f3fcbc7de6fc4ff89efd2bf32f42a97366f632ab0589c9ff80 |
from numpy import array_equal
from numpy import exp
from numpy import dot
from neural_network.neurallayer import NeuralLayer
class NeuralNetwork:
"""
A basic multilayered neural network. Contains variable input nodes, inner layers, and outputs. Input and output are both
considered layers (i.e. "single la... | maxleblanc/making_a_neural_network | neural_network/neuralnet.py | Python | apache-2.0 | 6,736 | [
"NEURON"
] | 58ef9f21efeecc6deaad8b404efc8f7d7bd07a0971b304893a0571a99e48d4c7 |
# 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... | reminisce/mxnet | python/mxnet/numpy/random.py | Python | apache-2.0 | 7,462 | [
"Gaussian"
] | 73d2d9dad71c29ac0097b1b235609555fadbb2a57b655fb6b16b5ac9e1d77c1b |
# This module provides classes that represent VRML objects for use
# in data visualization applications.
#
# Written by: Konrad Hinsen <hinsen@cnrs-orleans.fr>
# Last revision: 2001-1-3
#
"""This module provides definitions of simple 3D graphics objects and
VRML scenes containing them. The objects are appropriate for ... | fxia22/ASM_xf | PythonD/site_python/Scientific/Visualization/VRML.py | Python | gpl-2.0 | 19,509 | [
"VMD"
] | 6d28056fef17761bb62fff3bac383a45043cf0c385f4f1089eb6682f6a3ab4da |
"""
Regression tests for the Test Client, especially the customized assertions.
"""
from django.test import Client, TestCase
from django.core.urlresolvers import reverse
from django.core.exceptions import SuspiciousOperation
import os
import sha
class AssertContainsTests(TestCase):
def test_contains(self):
... | diofeher/django-nfa | tests/regressiontests/test_client_regress/models.py | Python | bsd-3-clause | 14,482 | [
"VisIt"
] | 59061d192405ee81a55343ed76fd6c4cc8c79f819f70246674c4e9c949ff040e |
#
# @file TestSpeciesConcentrationRule.py
# @brief SpeciesConcentrationRule unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Ben Bornstein
#
# $Id$
# $HeadURL$
#
# ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ======
#
# DO NOT EDIT THIS FILE.
#
# This file was generat... | alexholehouse/SBMLIntegrator | libsbml-5.0.0/src/bindings/python/test/sbml/TestSpeciesConcentrationRule.py | Python | gpl-3.0 | 3,332 | [
"VisIt"
] | d0d452ba52a92efe5edf84c86a99ed7b14a6ba0ad4fadcb7616d779f645b16cd |
""" :mod: GFAL2_XROOTStorage
=================
.. module: python
:synopsis: XROOT module based on the GFAL2_StorageBase class.
"""
# from DIRAC
from DIRAC import gLogger
from DIRAC.Resources.Storage.GFAL2_StorageBase import GFAL2_StorageBase
class GFAL2_XROOTStorage( GFAL2_StorageBase ):
""" .. cla... | marcelovilaca/DIRAC | Resources/Storage/GFAL2_XROOTStorage.py | Python | gpl-3.0 | 1,841 | [
"DIRAC"
] | 516bc1bac45135e7e33349bffb5f5d8e26e32a4b7083c0641328154d6eeac22b |
# -----------------------------------------------------------------------------
# Milky Way - Turn based strategy game from Milky Way galaxy
#
# URL: https://github.com/FedericoRessi/milkyway/
# License: GPL3
# -----------------------------------------------------------------------------
'''
@author: Federic... | FedericoRessi/milkyway | milkyway/pyside/main_window.py | Python | gpl-3.0 | 3,439 | [
"Galaxy"
] | ce37952d98b39847d032a6e6704fe1117fed47a909079d72face2822bc1f975a |
# !usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Licensed under a 3-clause BSD license.
#
# @Author: Brian Cherinka
# @Date: 2017-02-12 17:38:51
# @Last modified by: Brian Cherinka
# @Last Modified time: 2017-06-23 13:55:06
from __future__ import print_function, division, absolute_import
| sdss/marvin | tests/web/__init__.py | Python | bsd-3-clause | 297 | [
"Brian"
] | ceb84eb099701a775642397422f1c4661b962b09f65e026045a5952451e88843 |
import unittest
import numpy as np
from pymatgen.analysis.nmr import ChemicalShielding, ElectricFieldGradient
from pymatgen.util.testing import PymatgenTest
class TestChemicalShieldingNotation(PymatgenTest):
def test_construction(self):
cs = ChemicalShielding(np.arange(9).reshape((3, 3)))
self.a... | vorwerkc/pymatgen | pymatgen/analysis/tests/test_nmr.py | Python | mit | 3,057 | [
"pymatgen"
] | 082981f25c57a7f55b63623cc7fbc85bf836a19aabc01e2cc6871b40b5cb0108 |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/delegates/notedelegate.py | Python | gpl-2.0 | 1,320 | [
"VisIt"
] | 91c468b2420e88a6ba7c7ab8f84ace980ce0cda94da46fb0ae257eb1aac2c3f9 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from forocacao.app.views import HomeView
urlpatterns = [... | guegue/forocacao | config/urls.py | Python | bsd-3-clause | 1,421 | [
"VisIt"
] | 5f2eadff8ac39c298f50994ee915baff2f052f997c87033cd351c2efeae3e7d3 |
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2006, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Public version 2.1 or later. You s... | ghutchis/cclib | src/cclib/progress/textprogress.py | Python | lgpl-2.1 | 1,618 | [
"cclib"
] | 922d7c4acef11b2c5a4bd4c69221340aa719e51561c40e21d617efef4abac2a4 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Write Prismatic (http://prism-em.com/) input files.
"""
class Prismatic:
"""
Class to write Prismatic (http://prism-em.com/) input files.
This is designed for STEM image simulation.
"""
def __init__... | vorwerkc/pymatgen | pymatgen/io/prismatic.py | Python | mit | 1,339 | [
"pymatgen"
] | 20f96cff714a28d6ec5f8cb5ebb04afecd964424d8fdf51bb32e0b6f5e52146b |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from Conexion import DbPrecio_Sector
Sectores ={
"Sector_A":{
"N":["Condado del Rey","Los Andes N° 1", "Pan de Azucar","9 de Enero","Fátima","El Martillo","El Cristo"]
,"S":["Santa Clara","Villa Lucre","Colonia Las Lomas","La Pulida","Punta Fresca"]
},
"Sector_B":{
... | mdmirabal/Parcial2-Prog3 | att.py | Python | mit | 3,199 | [
"SIESTA"
] | 94d9509c0c618266fba94087ce3ecdbe9a60a9dc4bda5719db8d9836d1d50777 |
# encoding: utf-8
# TODO: make abstract class for all models/managers
# to prevent code coping of common methods (for example _predict method)
from PyQt4.QtCore import *
import copy
import numpy as np
from processing.molusce.algorithms.dataprovider import Raster, ProviderError
from processing.molusce.algorithms.m... | alfanugraha/LUMENS-repo | processing/molusce/algorithms/models/mlp/manager.py | Python | gpl-2.0 | 18,963 | [
"NEURON"
] | e11bae10a44d7906522a899fe677ab20d3cf1a448198ffd8facfb8ea61ec7cc8 |
# coding: utf-8
# Copyright © 2016 Bharadwaj Raju <bharadwaj.raju777@gmail.com>
# Contributor: Maksudur Rahman Maateen <ugcoderbd@gmail.com>
# This file is part of TextSuggest.
# TextSuggest is free software.
# Licensed under the GNU General Public License 3
# See included LICENSE file or visit https://www.gnu.org/l... | maateen/TextSuggestBangla | languages.py | Python | gpl-3.0 | 1,440 | [
"VisIt"
] | 4a318ce8576227e089c2b5d07bff3260fbfb89cde84848d3bd0ddacbd52a55da |
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import BaggingClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.neural_network import MLPClassifie... | rupakc/Kaggle-Compendium | Multimodal Sentiment Analysis/multimodal_baseline.py | Python | mit | 3,373 | [
"Gaussian"
] | 05bf9b2a7320e13c8b1b7842d97ce2cb9ef089847606c3ec846eb8302297fed3 |
from eventize.events import Handler
from eventize.typing import Modifier
def is_string(event):
return isinstance(event.content, str)
def titlecase(event):
event.content = event.content.title()
class WeirdVisitor(Modifier):
def visit(self, handler):
handler.prepend([self.save_default])
def sa... | apieum/eventize | eventize/tests/examples/subject_observer.py | Python | lgpl-3.0 | 1,938 | [
"VisIt"
] | 156ba4f93f2da29935837a0d4bc1d0805c699457cae38c84a36b88f965e37e28 |
#!/usr/bin/env python
#
# Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002 Bryce "Zooko" Wilcox-O'Hearn
# This file is licensed under the
# GNU Lesser General Public License v2.1.
# See the file COPYING or visit http://www.gnu.org/ for details.
#
__cvsid = '$Id: mencode_unittests.py,v 1.1 200... | zooko/egtp | common/mencode_unittests.py | Python | agpl-3.0 | 13,498 | [
"VisIt"
] | 867ecb790fd290632f8197e3d8a11cf7f5cef7ad3c2300fa20bec22d37ee3e45 |
# teams.prac.py
teams_list = [{"Real Madrid" : [["Cordoba", "24.8.2014", "Home"],["Real Sociedad", "31.8.2014","Away"],
["Atletico Madrid","14.9.2014","Home"], ["Deportivo", "21.9.2014","Away"],
["Elche","24.9.2014","Home"], ["Villarreal", "28.9.2014","Away"],
["Athletic Bilbao","5.10.2014","Home"],["Levante","19.1... | supercr7/foot-fixtures | teams_prac.py | Python | mit | 7,324 | [
"CRYSTAL"
] | 0888a50584edd68bbd24e0e2493eefbbcf9324ecb669e632ce1c15b2dcb2b3bf |
# Based on this example: http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt2
from PySide import QtCore, QtGui
import vtk
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow... | heartvalve/occmodel | examples/viewer/vtkviewer.py | Python | gpl-2.0 | 2,593 | [
"VTK"
] | 8615424d06537815633c2b7439ea749c86884df72954509ada12747510c314e8 |
# Implements auto-encoding variational Bayes.
from __future__ import absolute_import, division
from __future__ import print_function
import autograd.numpy as np
import autograd.numpy.random as npr
import autograd.scipy.stats.norm as norm
from autograd.scipy.special import expit as sigmoid
from autograd import grad
fr... | HIPS/autograd | examples/variational_autoencoder.py | Python | mit | 5,491 | [
"Gaussian"
] | c5005c84e9278c4d99d4516693cdaa74da0a6eda4f537cc2313c3f9c3692d966 |
"""General plotting functions.
Functions
---------
- set_axis - Set many different axis properties at once.
- twin_axis - Easily create and set a new twin axis (like `twinx()` or `twiny()`)
- set_lim - Set limits on an axis
- set_ticks
- zoom - Zoom-in at a... | lzkelley/zcode | zcode/plot/plot_core.py | Python | mit | 56,864 | [
"Amber"
] | 3f56e426e18c3a5e62139aae1facb006606ab65d7c82988eeac693e08d0b36f5 |
""" DIRAC FileCatalog component representing a directory tree with simple nodes
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import os
from DIRAC import S_OK, S_ERROR
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.Direct... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DirectoryManager/DirectoryNodeTree.py | Python | gpl-3.0 | 5,996 | [
"DIRAC"
] | 233e097ca1cc16bbf78afe8f00431206430e6e26e704ebaa0cdaaef20c68b6bb |
""" FileManagerBase is a base class for all the specific File Managers
"""
# pylint: disable=protected-access
import six
import os
import stat
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities.List import intListToString
from DIRAC.Core.Utilities.Pfn import pfnunparse
class FileManagerBase(object):... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/FileManager/FileManagerBase.py | Python | gpl-3.0 | 54,505 | [
"DIRAC"
] | c11982273e13d35cc6b3f4f10e23b936b1f3f14cf1cb748fd0336d6a5e19877e |
#### PATTERN | NL | INFLECT ########################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
######################################################... | EricSchles/pattern | pattern/text/nl/inflect.py | Python | bsd-3-clause | 16,402 | [
"MOE"
] | 5db99193d457dda5adf8b16d3bd69ef3c63485adb15f7c7a448f2fffe8e7df2e |
__author__ = 'Matteo'
__doc__ = ''''''
N = "\n"
T = "\t"
# N="<br/>"
from Bio import SeqIO
from Bio import Seq
import csv
import math
from Bio.Blast import NCBIXML
def get_genome(fp):
return list(SeqIO.parse(open(fp, "rU"), "genbank"))
def genelooper(genome):
return [gene for chr in genome for gene in chr.f... | matteoferla/Geobacillus | fusionmatch.py | Python | gpl-2.0 | 5,821 | [
"BLAST"
] | 31ee510c1402cab7eeda56da56f9472c861038f5e5e0ea73ff6456c2d91a5ef9 |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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 2 of the License, o... | godfryd/pylint | checkers/design_analysis.py | Python | gpl-2.0 | 14,359 | [
"VisIt"
] | 1ba9760ed67276227aec49a6bbe770b156d205e0d6d45bbca557dffcf6520202 |
## \file
## \ingroup tutorial_roofit
## \notebook -nodraw
##
## \brief Likelihood and minimization: fitting with constraints
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Verkerke (C++ version)
from __future__ import print_function
import ROOT
# Create model and dataset
# ------------... | karies/root | tutorials/roofit/rf604_constraints.py | Python | lgpl-2.1 | 2,727 | [
"Gaussian"
] | 1105e1261a78ac09e2029a732c97c8d79142f3503e6fa7a3cbcd3cd6d329dea3 |
"""Scatterplots."""
import pandas as pd
import matplotlib.pyplot as plt
from util import get_data, plot_data, compute_daily_returns
import numpy as np
def test_run():
# Read data
dates = pd.date_range('2009-01-01', '2012-12-31') # date range as index
symbols = ['SPY','XOM','GLD']
df = get_data(symbol... | bluemurder/mlfl | udacity course code/01-06-scatterplots.py | Python | mit | 2,878 | [
"Gaussian"
] | e78aabdd0369bcd3410ae02d4f6556f2253811dab58ea9d18794471b53a16502 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
test_fsed.py
(c) Will Roberts 12 December, 2015
Test the ``fsed`` module.
'''
from __future__ import absolute_import, print_function, unicode_literals
from .. import ahocorasick
from .. import fsed
from click.testing import CliRunner
from fsed.compat import PY3
from... | wroberts/fsed | fsed/tests/test_fsed.py | Python | mit | 5,901 | [
"COLUMBUS"
] | a67bddb42ad7776d5493f7ce6299b936365eee9d7616abdad8d0b2f6f0bddbaf |
""" Class that contains client access to the StorageManagerDB handler.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import six
import random
import errno
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.ConfigurationSystem.Clie... | ic-hep/DIRAC | src/DIRAC/StorageManagementSystem/Client/StorageManagerClient.py | Python | gpl-3.0 | 9,962 | [
"DIRAC"
] | 9a2368fb10c9c5d9434a38af21ae31c6d31b32e412cd07af737893cecccdba47 |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import ensure_csrf_cookie
from django.views.generic import TemplateView
from django.urls import reverse_lazy
from rest_framework.decorat... | tomka/CATMAID | django/applications/catmaid/urls.py | Python | gpl-3.0 | 38,907 | [
"NEURON"
] | f6764a5093cf19fb54a6d5c4195d1a92cd6d6b4ad11d766fde0e1e8952f5f5c1 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2007 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program 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 F... | andrebellafronte/stoq | stoqlib/lib/test/test_cardinals_pt.py | Python | gpl-2.0 | 5,510 | [
"VisIt"
] | d37bb3f028f7c885dd4213e9bd257b47017209ce448d8639b67d16c81a626056 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import warnings
from shutil import which
from pymatgen.command_line.enumlib_caller import EnumError, EnumlibAdaptor
from pymatgen.core.periodic_table import Element
from pymatgen.core.structure impor... | materialsproject/pymatgen | pymatgen/command_line/tests/test_enumlib_caller.py | Python | mit | 6,019 | [
"pymatgen"
] | 79143b2bdf720fde7182a6c489fe88d92f28cdf98a6b4e1a187d4db754fd7194 |
from __future__ import absolute_import
from __future__ import print_function
import operator
import itertools
from .base import NodeTransformer
from .. import nodes, errors, datatypes, functions
ifilter = itertools.ifilter
#==============================================================================#
class ScopeC... | colossalbit/cssypy | cssypy/visitors/solvers.py | Python | bsd-3-clause | 8,124 | [
"VisIt"
] | 47b679d2ae4b6c9f0a45afa0c746fb49e7aa3a46c32fffd0dd0a0219a5cb67c7 |
"""
Converting between nefis and netcdf
In a separate module to separate dependencies
Relies on the qnc wrapper of netcdf4
"""
from collections import defaultdict
from ...io import qnc
def nefis_to_nc(nef,squeeze_unl=True,squeeze_element=True,
short_if_unique=True,to_lower=True,unl_name='time',
... | rustychris/stompy | stompy/model/delft/nefis_nc.py | Python | mit | 3,795 | [
"NetCDF"
] | ca4bf356cdfe1ba5a87766176d7c5b5e0b862305c6c6fb2e64ca7ee0954db180 |
# TODO implement references as k-folds
import numpy as np
from scipy import ndimage
import scipy.misc as sp
import h5py
def flipz(h_arr):
""" Flip heart array along z axis """
return h_arr[:,:,:,::-1,:]
def flipy(h_arr):
""" Flip heart array along y axis """
return h_arr[:,:,::-1,:,:]
def gblur(h_ar... | Smith42/heart-cnn | augmentor.py | Python | gpl-3.0 | 2,876 | [
"Gaussian"
] | 53e1b09d16faed0bcb0804782223ac0072c69f0bb6339f700b89c6c4227b2f13 |
# Copyright 2000-2003 Jeff Chang.
# Copyright 2001-2008 Brad Chapman.
# Copyright 2005-2010 by Peter Cock.
# Copyright 2006-2009 Michiel de Hoon.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part ... | asherkhb/coge | bin/last_wrapper/Bio/SeqFeature.py | Python | bsd-2-clause | 38,411 | [
"Biopython"
] | 5b73f5f02d3e19ce4cce0732fb7e4b84d82b50b65cbcf02d130651622f6c53fb |
# coding: utf-8
# Copyright (c) Henniggroup.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, print_function
"""
Geometry module:
This module contains classes to hold geometry-specific data and operations,
including any additional constraints. All geometry classes... | henniggroup/GASP-python | gasp/geometry.py | Python | mit | 22,771 | [
"pymatgen"
] | a4b2164b8bce0c581d7197f63cec61455bb8d6323c8384629bbfb910cf738b96 |
# -*- coding: utf-8 -*-
"""Test functions for probability distributions.
"""
# Author: Taku Yoshioka
# License: MIT
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_allclose
from scipy import stats
from scipy.special import gamma
from bmlingam.prob import ll_laplace, l... | taku-y/bmlingam | bmlingam/tests/test_prob.py | Python | mit | 2,731 | [
"Gaussian"
] | d1555309c5e655c1bb9426d17671ee56db240aac2acb6e909e3af13992398a6d |
"""Provides all the data related to text."""
__all__ = ["WORDLIST"]
WORDLIST = [
"abandon",
"ability",
"able",
"about",
"above",
"absent",
"absorb",
"abstract",
"absurd",
"abuse",
"access",
"accident",
"account",
"accuse",
"achieve",
"acid",
"acousti... | lk-geimfari/elizabeth | mimesis/data/int/cryptographic.py | Python | mit | 27,537 | [
"BLAST",
"CASINO",
"CRYSTAL",
"Galaxy",
"Jaguar",
"VisIt"
] | 8f635f808f3b62ac996b773801434dad94b6386c71274158595265cc811a4c78 |
#!/usr/bin/env python
# coding: utf-8
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | G-P-S/depot_tools | third_party/upload.py | Python | bsd-3-clause | 100,112 | [
"VisIt"
] | 7695103c6fd037d5a56216ea17d4a88851f45c6a677dbec8ee191b482021742f |
#!/usr/bin/env python
import sys
import inspect
import re
import optparse
import vtk
from pydoc import classname
'''
This is a translation from the TCL code of the same name.
The original TCL code uses catch {...}
catch returns 1 if an error occurred an 0 if no error.
In this code TryUpdate(), TryShutdow... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Common/Core/Testing/Python/TestEmptyInput.py | Python | gpl-3.0 | 16,244 | [
"VTK"
] | 16e2b0c9e588bc480d37b382bec768b3d90c4498f47f52c18acace726f9fd60a |
#!/usr/bin/python
import argparse
import arguments
import logconfig
import session
from app.elk.tiny_builder import TinyElkBuilder
def create_stack(args):
boto3_session = session.new(args.profile, args.region, args.role)
builder = TinyElkBuilder(args, boto3_session, False)
return builder.build(args.dry_... | mccormickmichael/laurel | create_tiny_elk_stack.py | Python | unlicense | 2,193 | [
"Elk"
] | 1ed420b96bc3ba40051566956029f3e5fd2a0a629d12d04ddce85458a9288e55 |
# pylint: disable=C0111
# pylint: disable=W0621
# Disable the "wildcard import" warning so we can bring in all methods from
# course helpers and ui helpers
# pylint: disable=W0401
# Disable the "Unused import %s from wildcard import" warning
# pylint: disable=W0614
# Disable the "unused argument" warning because let... | jswope00/GAI | common/djangoapps/terrain/steps.py | Python | agpl-3.0 | 6,709 | [
"VisIt"
] | 3769fdc8270ce9ace32c7fa57541c7c90cdc32df9e9cd8e3017e50d303920b17 |
# Interface for registration
# Written by: Amber Thatcher, Stephen Coakley, Nyia Lor, and Jaiden Trinh
# Written for: Instant messenger project
# Created on: 4/10/2016
from client import rpc
from tkinter import *
from tkinter import messagebox
from tkinter.ttk import *
import queue
# Set up a global inco... | cs460-group1/chat-client | client/ui.py | Python | mit | 18,643 | [
"Amber"
] | f09db4d644d6cc4c93753b110b08078cb176d711d19987a3e5793c5f73ee4ed2 |
"""
This sample demonstrates a new channel of customer service via Amazon Alexa Skills.
This demo shows a conversation between a customer and an intelligent agent (IA) Alexa via Amazon Echo
to collect information and setup a customer service callback. This new channel is an augmentation to the
traditional channels suc... | ameerbadri/amazon-alexa-twilio-customer-service | Lambda Function/lambda_function.py | Python | mit | 21,342 | [
"VisIt"
] | 4be8edb5049351ad3da1b733ff6ea2dba5a5aeaa0711d9ea9f4984cebebc1df4 |
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
import subp... | harterj/moose | python/TestHarness/tests/test_PBS.py | Python | lgpl-2.1 | 1,925 | [
"MOOSE"
] | 3c7f4a2fc713e1b552f707e9449c09f5dbc9747666276c150b89298df34b7bb9 |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | brianmay/karaage | karaage/projects/xmlrpc.py | Python | gpl-3.0 | 2,722 | [
"Brian"
] | 1becc665c34cc02d742ad3c71eff9cfa5d9105ff2fc7931db569ba29d404ac89 |
# Copyright 2008, 2009 CAMd
# (see accompanying license files for details).
"""Atomic Simulation Environment."""
from ase.atom import Atom
from ase.atoms import Atoms
| grhawk/ASE | tools/ase/__init__.py | Python | gpl-2.0 | 170 | [
"ASE"
] | c2c4a9d39d556a71f686cc4f73fd9918251cbe65b9dfa4842265d7e83882d7cf |
# This is not a random import, it's quite pertinent to the code
from random import random
# First, we create this maze world
length = 10
density = 0.2 # probability of generating a barrier in a cell
barrier = '+'
space = '_'
def gen_row():
def gen_cell():
if random() > 1 - density:
return bar... | FluxLemur/fluxlemur.github.io | assets/python/maze.py | Python | mit | 2,080 | [
"VisIt"
] | 1657b2d17f1f37b81adb1fbc8dd10f7f6cff48b408d18077e5fa9d013821c5f9 |
###############################################################################
# Copyright 2017-2021 - Climate Research Division
# Environment and Climate Change Canada
#
# This file is part of the "fstd2nc" package.
#
# "fstd2nc" is free software: you can redistribute it and/or modify
# it under... | neishm/fstd2nc | setup.py | Python | lgpl-3.0 | 2,432 | [
"NetCDF"
] | dc667e33c7e67d6e61e0b5e66ba7e8bb9a3b259ce912dc1794c82b0c24eb466c |
# -*- coding: utf-8 -*-
"""
***************************************************************************
translate.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*****************************... | CS-SI/QGIS | python/plugins/processing/algs/gdal/gdaladdo.py | Python | gpl-2.0 | 5,418 | [
"Gaussian"
] | 5585e2693e2a751aae19afb968f588abb820ee7ce5781486852bfe8dbd4f650d |
"""
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.domains.std import Cmdoption
from sphinx.util.compat import Directive
fr... | mitya57/django | docs/_ext/djangodocs.py | Python | bsd-3-clause | 10,891 | [
"VisIt"
] | b94c795b2b2674ef233f20d3f14b437c5d945df25f828ad8af2c9858eaa3fee9 |
import os
import numpy as np
from numpy import ma
from what_file import what_format
from metadata import run_shp_info
try:
import gdal
except ImportError:
from osgeo import gdal
try:
import ogr
except ImportError:
from osgeo import ogr
try:
import osr
except ImportError:
from osgeo import os... | MBoustani/GISCube | giscube_app/scripts/conversion.py | Python | apache-2.0 | 11,449 | [
"NetCDF"
] | d35214bba4cfee5fae9a2e7a5a41a8fd323d809be02cbe5557fa0cbd5bbfd2d1 |
#!/usr/bin/env python
# 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.
"""
Unit tests for the contents of device_utils.py (mostly DeviceUtils).
"""
# pylint: disable=protected-access
# pylint: disable=unuse... | catapult-project/catapult | devil/devil/android/device_utils_test.py | Python | bsd-3-clause | 183,737 | [
"MOE"
] | e788d44a885085ccbe191ccd12bda59cc00ce3d9d090f245f92c499465950977 |
# -*- coding: utf-8 -*-
#AUTHOR: Samuel M.H. <samuel.mh@gmail.com>
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect
im... | samuelmh/django-smh_redirections | views.py | Python | lgpl-3.0 | 2,555 | [
"VisIt"
] | 84b93a2d79c08138c1c26f987aa4417a57e4e988d22c73e3cde04feb2269bb20 |
"""
==================================================
Automatic Relevance Determination Regression (ARD)
==================================================
Fit regression model with Bayesian Ridge Regression.
See :ref:`bayesian_ridge_regression` for more information on the regressor.
Compared to the OLS (ordinary l... | zaxtax/scikit-learn | examples/linear_model/plot_ard.py | Python | bsd-3-clause | 2,828 | [
"Gaussian"
] | 9e724505902f79bd04a96db7eb55f103c8819f461a8326a00f4702f5dcddc39d |
# coding: utf-8
from __future__ import unicode_literals
import io
import logging
import os
config_text = 'site_name: My Docs\n'
index_text = """# Welcome to MkDocs
For full documentation visit [mkdocs.org](http://mkdocs.org).
## Commands
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start th... | samhatfield/mkdocs | mkdocs/new.py | Python | bsd-2-clause | 1,433 | [
"VisIt"
] | c20ad2d1b85cca487c945fa3c70dfd06ad6f64304289629474adab24d1ff09ca |
import os
import sys
import version
from setuptools import setup, find_packages
_here = os.path.dirname(__file__)
f = open(os.path.join(_here, 'README.md'), 'r')
README = f.read()
f.close()
install_requires = ['lxml', 'PyICU']
if sys.version_info[0] == 2:
# python2 does not have mock in the standard lib
ins... | vanguardistas/mp.importer | setup.py | Python | mit | 1,151 | [
"Brian"
] | 70634d86bcb99a0e85beec2cec3f613ab8f075387fdd2c615eba93d71fbaad73 |
#!/usr/bin/env python
import os
import sys
import sqlite3
from collections import defaultdict, namedtuple
import atexit
import json
import subprocess
import tempfile
import numpy as np
from scipy.stats import mode
import pysam
import cyvcf as vcf
from gemini.annotations import annotations_in_region, annotations_... | heuermh/gemini | gemini/gemini_annotate.py | Python | mit | 15,422 | [
"pysam"
] | 5f21c5861601396e0629a034fda9521544b30a638f670cca61ca659892d6c518 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google 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... | googleapis/python-documentai | tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py | Python | apache-2.0 | 131,323 | [
"Octopus"
] | f011262fd20e17c5cdb109855daf3ca7fa277dd18b46805723d4c1f0965129e6 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on May 1, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Sh... | aykol/pymatgen | pymatgen/electronic_structure/tests/test_plotter.py | Python | mit | 4,584 | [
"pymatgen"
] | f2391d5d81dc0e99e08c32acd85db2125eae9b529b2a404dc3bdbafa67a85c31 |
""" Affine image registration module consisting of the following classes:
AffineMap: encapsulates the necessary information to perform affine
transforms between two domains, defined by a `static` and a `moving`
image. The `domain` of the transform is the set of points in the
`static` image'... | demianw/dipy | dipy/align/imaffine.py | Python | bsd-3-clause | 52,941 | [
"Gaussian"
] | 2b7a997035b86a7c88821374bf887c48536c0980302c8501e805fe5d913e35f5 |
#!/usr/bin/env python
import os
import sys
from subprocess import check_output
from distutils import log
from distutils.core import Command
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from setuptools.command.develop import develop as DevelopCommand
from setupto... | dropbox/strongpoc | setup.py | Python | apache-2.0 | 3,108 | [
"GULP"
] | 04aea004aa3c7a154611abb6495f997b936ab838d46ec90d6882a987ada31ff4 |
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
import tensorflow.contrib.layers
from tensorflow.contrib.layers.python import layers as tf_layers
from models.conv_lstm import basic_conv_lstm_cell
# Amount to use when lower bounding tensors
RELU_SHIFT = 1e-12
FC_LAYER_SIZE = 512
# ke... | jonasrothfuss/DeepEpisodicMemory | models/model_zoo/model_conv4_fc512.py | Python | mit | 8,430 | [
"Gaussian"
] | 7890aafdaebbf4dadc795fbfee848a0c69934352ce811e3297c70eaa434397de |
'''<b>Automatic spot detection</b> - Extended morphological processing: a
practical method for automatic spot detection of biological markers from
microscopic images
<hr>
This is an implementation of the Extended morphological processing, published
by Yoshitaka Kimori, Norio Baba, and Nobuhiro Morone
in 2010 in BMC Bio... | Xqua/SpotAnalizer | spotanalyzer.py | Python | gpl-2.0 | 17,971 | [
"Gaussian"
] | 2e15836d4a700735f0ac65ea48e2eb94129559589a624924c8306b13d0dccaee |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | paradigmadigital/marketingMonitoringTool | multiple_channel_sample.py | Python | gpl-3.0 | 7,357 | [
"VisIt"
] | 4fdec2aafdbdd8cf64645455679c762be140abc2d792f2fd702de8a28a239c2d |
##
# Copyright 2009-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | ocaisa/easybuild-easyblocks | easybuild/easyblocks/q/quantumespresso.py | Python | gpl-2.0 | 15,880 | [
"ESPResSo",
"Quantum ESPRESSO",
"Wannier90",
"Yambo"
] | 4e8612555791c2a64fff3f1d223e5e03a3dcbfdaab1d2b69f5714d58170b204b |
import encrypt.scrypt as scrypt
import encrypt.aes as aes
import num.enc as enc
import hashlib
import math
def encrypt(seed, passphrase):
"""
Encrypt the Electrum seed
"""
#1. Decode the seed value to the original number
seed = mn_decode(seed.split())
#2. Take a hash of the decoded seed to act as a scrypt salt... | inuitwallet/bippy_old | encrypt/electrum.py | Python | mit | 20,149 | [
"CRYSTAL",
"VisIt"
] | f8f785b10e582287b523dad34bafdb4fe6343d22b0ae9fd91edf4eb4a86c0c0b |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... | SKIRT/PTS | modeling/tests/Spiral/test.py | Python | agpl-3.0 | 7,394 | [
"Galaxy"
] | 6657267edcb81bd23dc3a0bc000165b464e9ad8755245ae1cbb43fce7ace0942 |
# (c) 2012-2018, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... | chouseknecht/galaxy | galaxy/main/templatetags/galaxyhelpers.py | Python | apache-2.0 | 2,772 | [
"Galaxy"
] | fa8f971e60a8034ef3772590ec12c9d1b88c238c8bbe79090e2aee9e9932be7b |
# -*- coding: utf-8 -*-
""" Volunteer Management System """
#from gluon.sql import Rows
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="index"))
# Options Menu (available ... | ptressel/sahana-eden-madpub | controllers/vol.py | Python | mit | 48,999 | [
"Amber"
] | 9c933ddae0f05a397a67aa8eb736dfb5898850bde517b4b0da8caed3d9582448 |
../../../../../../../share/pyshared/orca/scripts/apps/soffice/formatting.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/soffice/formatting.py | Python | gpl-3.0 | 75 | [
"ORCA"
] | 2faabe0d317d859ecf91901406b3c44f1f3779a1cffe23ba61eef8341813fa38 |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 Yahoo! 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
#
# ... | junneyang/taskflow | taskflow/types/tree.py | Python | apache-2.0 | 14,198 | [
"VisIt"
] | 3541f065a06b30f6ac9c3fd54214fa89edb2b57dc04f28eca61712f0b658f6e2 |
#!/usr/bin/python
#
# Copyright 2011 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 b... | nearlyfreeapps/python-googleadwords | tests/adspygoogle/adwords/util/__init__.py | Python | apache-2.0 | 9,270 | [
"VisIt"
] | 8a2fab5896e609518d09cc6207d5edd3915d5472b37213526fb652ae827ea313 |
# -*- coding: utf-8 -*-
""" Sahana Eden IRS Model
@copyright: 2009-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
... | flavour/iscram | modules/eden/irs.py | Python | mit | 52,100 | [
"VisIt"
] | 78a0d4ff291d8339003ec8d12f98dcdca5d555597f5d4b3b0ee81e812bc17ada |
import logging
import sys
import random
import math
import matplotlib
import numpy as np
def wmean(vals, weights=None):
np.average(vals, weights=weights)
def wstd(vals, weights=None):
"""
compute a weighted standard deviation
"""
mean = wmean(vals, weights)
vals = np.array(vals).astype(float)
weights =... | sirrice/scorpion | scorpion/util/prob.py | Python | mit | 2,501 | [
"MOE"
] | 375d5af58fcaa9065c38cb6f0171dfd5925c8c9f7f7e50ccbb0a24ae335017a1 |
from __future__ import print_function
# Copyright (C) 2012, Jesper Friis
# (see accompanying license files for ASE).
"""
Determines space group of an atoms object using the FINDSYM program
from the ISOTROPY (http://stokes.byu.edu/iso/isotropy.html) software
package by H. T. Stokes and D. M. Hatch, Brigham Young Univers... | suttond/MODOI | ase/lattice/spacegroup/findsym.py | Python | lgpl-3.0 | 8,346 | [
"ASE",
"CRYSTAL"
] | 12220a9bc72f39cfd609fd844cd2c4e0906c822c960e6c73abd00cf0d46303f9 |
# $Id$
#
# Copyright (C) 2006 greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from contextlib import closing
import unittest
from ... | rvianello/rdkit | rdkit/Chem/FeatMaps/UnitTestFeatMapParser.py | Python | bsd-3-clause | 4,301 | [
"RDKit"
] | a45c2505c1f2b1d77353d8a1c0439057c9079e5c34745cf354c900d76cab3e40 |
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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 Licen... | cylc/cylc | cylc/flow/host_select.py | Python | gpl-3.0 | 17,133 | [
"VisIt"
] | 9e55595a539c4eeb5e215f855433e85da071b1f519215c703a3c9b3136a7052f |
#!/usr/bin/env python
# Install.py tool to build the GPU library
# used to automate the steps described in the README file in this dir
from __future__ import print_function
import sys,os,subprocess
# help message
help = """
Syntax from src dir: make lib-gpu args="-m machine -h hdir -a arch -p precision -e esuffix -... | quang-ha/lammps | lib/gpu/Install.py | Python | gpl-2.0 | 5,290 | [
"LAMMPS"
] | e43e70fc9bc083e3fdabd562bd1cc8a2e2f06d090b739a54ffddce073bfe20f8 |
# Created by John Travers, Robert Hetland, 2007
""" Test functions for rbf module """
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import (assert_, assert_array_almost_equal,
assert_almost_equal, run_module_suite)
from numpy import l... | asnorkin/sentiment_analysis | site/lib/python2.7/site-packages/scipy/interpolate/tests/test_rbf.py | Python | mit | 4,604 | [
"Gaussian"
] | 641805bebaf386e9f55cd989e2bf3ce365293fbccfe0d7adaba85759181a45f6 |
#!/usr/bin/env python3
"""Merge Bowtie statistics."""
import os
import sys
if len(sys.argv) < 2:
sys.stderr.write("No stats file given.\n")
exit(1)
for i in range(2, len(sys.argv), 2):
if not os.path.isfile(sys.argv[i]):
sys.stderr.write("Stats file {} not found.\n".format(sys.argv[i]))
e... | genialis/resolwe-bio | resolwe_bio/tools/mergebowtiestats.py | Python | apache-2.0 | 1,819 | [
"Bowtie"
] | f18e3f9efaab1f9fc80b20a82931290bcc70fce73bf838c5ca3b87b14ff31cb3 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2010 - 2011, University of New Orleans
#
# 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 2 of the License, or (at your o... | gblanchard4/viamics | framework/modules/blast.py | Python | gpl-2.0 | 6,151 | [
"BLAST"
] | 2523682838cf05361c21b53cd9f33ccbdbf646194139957b2868037f10f402f0 |
from abc import ABCMeta
from util.reflection import deriving
from util.functions import unique_id
import special
import attributes
# pylint: disable=W0231
class Node(deriving('eq', 'show')):
__metaclass__ = ABCMeta
def __init__(self):
self._attrs = attributes.Attributes()
self._unique_name... | dacjames/mara-lang | bootstrap/mara/node.py | Python | mit | 7,858 | [
"VisIt"
] | da33f18a00a45ad97b3aab2a93cb11330511ab131dd3ca29403b0520235656c1 |
#!/usr/bin/env python
# coding: utf-8
# # Resampling Methods
#
# ## Introduction
#
# Resampling methods are an indispensable tool in modern
# statistics. They involve repeatedly drawing samples from a training
# set and refitting a model of interest on each sample in order to
# obtain additional information about th... | CompPhysics/MachineLearning | doc/LectureNotes/_build/jupyter_execute/chapter3.py | Python | cc0-1.0 | 93,304 | [
"Gaussian"
] | 1305f66b01aec555840261a12850bbc69ab507b27b0bb43a7e3b060a4bd94297 |
from __future__ import unicode_literals
from datetime import datetime
import os
from django.utils import html
from django.utils._os import upath
from django.utils.encoding import force_text
from django.utils.unittest import TestCase
class TestUtilsHtml(TestCase):
def check_output(self, function, value, output=... | mdj2/django | tests/utils_tests/test_html.py | Python | bsd-3-clause | 7,539 | [
"ADF"
] | ecb5178b9bd214bc9e00a578209b51c3ea65051b67289ab1732315d801f78e20 |
"""Generate quantities reated to the symmetry of the lattice. This module
draws heavily from Setyawan, Wahyu, and Stefano Curtarolo. "High-throughput
electronic band structure calculations: Challenges and tools." Computational
Materials Science 49.2 (2010): 299-312.
"""
import numpy as np
from numpy.linalg import norm... | jerjorg/BZI | BZI/symmetry.py | Python | gpl-3.0 | 135,404 | [
"ASE",
"CRYSTAL",
"Gaussian",
"VASP"
] | 8208d5017a7c97d2e20182e1ad3f0e9cd126ae7f8bc46fa7ff3ed29de0888034 |
#!/usr/bin/env python
#
# $File: defdict.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute it... | BoPeng/simuPOP | docs/defdict.py | Python | gpl-2.0 | 1,481 | [
"VisIt"
] | 0be80283603b6ee76366e31ff41679d6417dc71ad6a8e8a20f1e7f693ed6691b |
from neuron import h
from cell_template import Cell
import helper_functions as hf
class Mn(Cell): #### Inherits from Cell
"""Motoneuron"""
#### __init__ is gone and handled in Cell.
#### We can override __init__ completely, or do some of
#### our own initialization first, and then let Cell do its
... | penguinscontrol/Spinal-Cord-Modeling | Python/Mn_template.py | Python | gpl-2.0 | 2,319 | [
"NEURON"
] | 4bbba36c39617e6720f6114f078c7036db9d14cf71e685d51d38e9ba3c4e7a7d |
#!/usr/bin/python
#
# This example shows how to use the MITIE Python API to train a named_entity_extractor.
#
#
import sys, os
# Make sure you put the mitielib folder into the python search path. There are
# a lot of ways to do this, here we do it programmatically with the following
# two statements:
parent = os.pa... | siraj/plexydesk-1 | deps/mitie/examples/python/train_ner.py | Python | lgpl-3.0 | 4,833 | [
"Brian"
] | 5e39bb6fcef402e1901763f6c08a18b50ff40af86ae7222b76fa70528bd0fc8d |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
The initial version of this module was based on a similar implementation
present in FireWorks (https://pypi.python.org/pypi/FireWorks).
Work done by D. Waroquiers, A. Jain, and M. Kocher.
The main differenc... | johnson1228/pymatgen | pymatgen/io/abinit/qadapters.py | Python | mit | 87,373 | [
"ABINIT",
"pymatgen"
] | 1437b0f82bdfde33f4bb87d505e7ba21cd3109bc87ea764a6e2561493e07de2c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.