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 |
|---|---|---|---|---|---|---|---|
########################################################################
# This program is copyright (c) Upinder S. Bhalla, NCBS, 2015.
# It is licenced under the GPL 2.1 or higher.
# There is no warranty of any kind. You are welcome to make copies under
# the provisions of the GPL.
# This programme illustrates buildi... | BhallaLab/moose | moose-examples/paper-2015/Fig2_elecModels/Fig2C.py | Python | gpl-3.0 | 14,223 | [
"MOOSE",
"NEURON"
] | 5eb6a5a439a675762a02c12cdff996e6a0d98f6ee874773cba2951727562aac5 |
# creates: N.LDA
import os
from gpaw.test import gen
gen('N')
os.system('cp N.LDA ../_build')
| qsnake/gpaw | doc/setups/N.py | Python | gpl-3.0 | 94 | [
"GPAW"
] | ad7d53917d97406476db3321deeeb0fb89711b3341fa301373e89d7cf3800a42 |
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | misko/neon | tests/test_model.py | Python | apache-2.0 | 5,468 | [
"Gaussian"
] | 3bfd6fb19f3b714563f6e85de7e32ae6cf3194700cb2bc8edfd82d289f9d24bc |
#!/usr/bin/env python
"""Extract read start from BAM files to Wig format for PAUSE.
Usage:
bam_to_wiggle.py <BAM file>
"""
import os
import tempfile
from contextlib import contextmanager
import pysam
import subprocess
import argparse
@contextmanager
def indexed_bam(bam_file):
if not os.path.exists(bam_file.... | TAMU-CPT/galaxy-tools | tools/pause/pause_starts_to_wiggle.py | Python | gpl-3.0 | 4,610 | [
"Galaxy",
"pysam"
] | 7a17a731153d43766a00672d66cbc22da6041df4aad39283a34c65b81a35440d |
#!/usr/bin/env python
""" check_pseudo.py calculates energy for 7 alat points near SIESTA equilibrium to fine tune the delta-factor.
"""
import os
import sys
import uuid
import glob
import numpy as np
import shutil
import matplotlib.pyplot as plt
from generate import PGInputFile, PTInputFile
from get_energies import... | ansobolev/PseudoGenerator | pseudogen/check_pseudo.py | Python | mit | 2,386 | [
"SIESTA",
"WIEN2k"
] | 2286a65136ae498e930e31d1f7c6bfcf92c0cc82d6b4540635ee0de03e12cad9 |
from copy import deepcopy as dc
from itertools import combinations
import ase.io as aseio
import numpy as np
from ase.atoms import Atoms as AAtoms
from pyiid.asa import calculate_asa, get_neighbor_list, get_coordination
__author__ = 'christopher'
def convert_stru_to_atoms(stru):
symbols = []
xyz = []
t... | CJ-Wright/pyIID | pyiid/utils.py | Python | bsd-3-clause | 5,803 | [
"ASE"
] | 5e32988f1ea4991d436343938a03c8967054e4336fc3660a3273e5bdda9ddf19 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A app configuration defines the user-tunable parameters of the application and also the quality evaluation such as the:
* Amazon Mechanical Turk HIT description, pricing, keywords, etc.
* The description and instructions of the task
* The configuration of the type of t... | mcartwright/CAQE | src/caqe/configuration.py | Python | mit | 19,785 | [
"VisIt"
] | 60f1965a4f5b55df7d2bb1ddb9a6d553291e0b68e9e279e55f56f6f2698d3754 |
#!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime is invoked with the right options.
# Adapted from https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/1.16.16/peptide-shaker.py (accessed June, 21th 2019).
#
# Program Parameters
#
import os
... | cokelaer/bioconda-recipes | recipes/gemoma/GeMoMa.py | Python | mit | 3,169 | [
"Bioconda"
] | 018ca2619f82a0002e2334d695e8fe532aec2293d4d5bda0711ecab68d30118d |
# sql/elements.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Core SQL expression elements, including :class:`.ClauseElement`,
:class:`.ColumnEle... | alex/sqlalchemy | lib/sqlalchemy/sql/elements.py | Python | mit | 80,420 | [
"VisIt"
] | 86bfc65f9d734ee04a7c2773fb927f89f54190ec9301257a444d40b24eadaa09 |
from .base import *
class session(object):
"""
cytoscape session interface as shown in CyREST's swagger documentation for 'session'.
:param url: an url of the type 'http://' + host + ':' + str(port) + '/' + version + '/'.
"""
def __init__(self, url):
self.__url = url + 'commands/session'
... | idekerlab/py2cytoscape | py2cytoscape/cyrest/session.py | Python | mit | 4,191 | [
"Cytoscape"
] | fe26253e7102c00f30e59407705c422f04c4aea74d370ec2e61a6ff1b43b3e24 |
#!/usr/bin/env python3
from abc import ABC, abstractproperty
import torch
from .. import settings
from ..distributions import Delta, MultivariateNormal
from ..module import Module
from ..utils.broadcasting import _mul_broadcast_shape
from ..utils.memoize import cached, clear_cache_hook
class _VariationalStrategy(M... | jrg365/gpytorch | gpytorch/variational/_variational_strategy.py | Python | mit | 6,122 | [
"Gaussian"
] | cbf329ff3ac64378b8e2456fbfd4a4611c6f179ada0ab8216307b67e4a26bc48 |
from __future__ import division, unicode_literals
import warnings
import matplotlib
matplotlib.use('pdf')
import unittest as unittest
import numpy as np
from pymatgen import Composition
from pymatgen.entries.computed_entries import ComputedEntry
from pymatgen.analysis.phase_diagram import PhaseDiagram, \
GrandP... | nisse3000/pymatgen | pymatgen/analysis/tests/test_interface_reactions.py | Python | mit | 17,218 | [
"pymatgen"
] | 5ab5543c3163c6a13a930820d2e2aad8e90291dea8fb5580e6fc7d826acf1d31 |
from __future__ import unicode_literals
import datetime
import requests
from requests_oauthlib import OAuth1
from oauthlib.oauth1 import (SIGNATURE_RSA, SIGNATURE_TYPE_AUTH_HEADER,
SIGNATURE_HMAC)
from six.moves.urllib.parse import urlencode, parse_qs
from .constants import (XERO_BASE_URL,... | MJMortimer/pyxero | xero/auth.py | Python | bsd-3-clause | 13,625 | [
"VisIt"
] | e7c50eaf91b091a9ca538d2b45240df1a54ccca446f71eff0b782f19c8a6baa2 |
import ast
import collections
from ..visitor import ClassVisitor, handle
from . import Metric
class _TypeCountVisitor(ClassVisitor):
@handle(ast.AST)
def __visit_ast(self, node):
return (node.__class__,) + tuple(cls for name in node._fields for cls in self.visit(getattr(node, name)))
@handle(co... | herczy/pydepend | pydepend/metric/cyclomatic.py | Python | bsd-3-clause | 1,908 | [
"VisIt"
] | c66a25e202655c7f073a823fb8d8dccc257ea7f48e319421947bec27c7206669 |
from django.conf import settings
from django.contrib.sites.models import get_current_site
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponse
from django.shortcuts import redirect
from .models import APIKey, Short, Visit
def _record_visit(request, short):
remote_addr = (
... | sneeu/little | little/views.py | Python | mit | 1,560 | [
"VisIt"
] | 5044b35c3eb85a66e78dc6ba0307c40f432a7e54e2055aee67a8bee015916f5c |
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD-3-Clause
import os
import os.path as op
import re
import shutil
import numpy as np
from numpy.testing import assert_allclose, assert_array_almost_equal
import pytest
import warnings
import mne
from mne.datasets import testing
from mne.io impor... | bloyl/mne-python | mne/gui/tests/test_coreg_gui.py | Python | bsd-3-clause | 17,357 | [
"Mayavi"
] | 7b2eab80347728042def65e93368d029b3a5e05cf40ed46c7f88bc14362b4fb9 |
# Copyright 2018 Open Source Robotics Foundation, 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... | ros2/launch | launch/test/launch/actions/test_declare_launch_argument.py | Python | apache-2.0 | 3,551 | [
"VisIt"
] | 966797089121da9911a1feaea06c8d1935e69018bad76da622c74db14fbff0ed |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','description','copyright','license','co... | atsusy/Gesture-Recognizer | build.py | Python | mit | 5,858 | [
"VisIt"
] | 465200aeae16f4231749cbb7cb86141dc29e25b87dd2dec0229c02103ee5cc41 |
#!/usr/bin/python
#==========================================================================
#
# Copyright NumFOCUS
#
# 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:... | richardbeare/ITK | Utilities/Maintenance/UpdateCopyrightStatementsInITK.py | Python | apache-2.0 | 6,453 | [
"VTK"
] | 70f5abe5d90fab68c9f4a9c60dde4a634c70587a826adbdb9b9060b21fbc4c56 |
import numpy as np
import itertools
import logging
import time
import traceback
import threading
from collections import Mapping
from distutils.version import StrictVersion
from ..conventions import cf_encoder
from ..core.utils import FrozenOrderedDict
from ..core.pycompat import iteritems, dask_array_type, OrderedDic... | NicWayand/xray | xarray/backends/common.py | Python | apache-2.0 | 7,876 | [
"NetCDF"
] | 6b70bb9f1a602b9f0e9932ff55ae5efcc049d59ab08b72b0865f4605bf34616c |
#!/usr/bin/python
#
# Copyright (C) 2014, Jaguar Land Rover
#
# This program is licensed under the terms and conditions of the
# Mozilla Public License, version 2.0. The full text of the
# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
#
#
# Simple RVI service caller
#
import sys
from rvilib impor... | magnusfeuer/rvi_core | python/rvi_call.py | Python | mpl-2.0 | 1,624 | [
"Jaguar"
] | 9d61ad24355832a2b36eb1e737da5748e50d47487823333b79eb1e452182e1ed |
# coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats = (
'{{first_name_male}} {{last_name}}',
'{{first_name_male}} {{last_name}}',
'{{first_name_male}} {{last_name}}',
'{{first_name_male}} {{last_na... | deanishe/alfred-fakeum | src/libs/faker/providers/person/dk_DK/__init__.py | Python | mit | 7,620 | [
"Brian"
] | a401ce9b3640495f6c4a3b61aac789b56ece4a0c1b7a8993eef49c44f78657e9 |
################################################################################
# Copyright (C) 2013-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Unit tests for gaussian_markov_chain module.
"""
import nump... | dungvtdev/upsbayescpm | bayespy/inference/vmp/nodes/tests/test_gaussian_markov_chain.py | Python | mit | 34,665 | [
"Gaussian"
] | b44dc7a0ffb7c06f44560960b5fa4b98d8c27ce95ceddaf1526a240d3ae8a0d1 |
#!/usr/bin/env python
# Copyright (c) 2012, 2014 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | kaiyuanl/gem5 | util/streamline/m5stats2streamline.py | Python | bsd-3-clause | 42,084 | [
"VisIt"
] | 2b9bc9aac676a08ead6cd3c135469cfffe4bb25e74d59d3810d9536ef6fa15ac |
#import sys, os
#sys.path.insert(0, '/media/nmsutton/Ext3Drive/General/NEST/NEST/lib64/python3.4/site-packages')
#print (os.path.dirname(sys.executable))
#print (os.environ)
import pylab
import nest
print ("test")
neuron = nest.Create("iaf_neuron")
nest.GetStatus(neuron)
nest.GetStatus(neuron, "I_e")
print (nest.... | nmsutton/MemoryModule | python_version/examples/nestTest.py | Python | mit | 693 | [
"NEURON"
] | 116d5d448f085debfd8d290233cf104c14341f60e9d3483cd06449145556c813 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf import gto
from pyscf import scf
'''
Specify irrep_nelec to control the wave function symmetry
'''
mol = gto.Mole()
mol.build(
verbose = 0,
atom = '''
C 0. 0. 0.625
C 0. 0. -0.625 ''',
basis =... | gkc1000/pyscf | examples/scf/13-symmetry.py | Python | apache-2.0 | 1,324 | [
"PySCF"
] | 1e05657a8616f7299ec08fbcfae6f552af6f9075690569e62988ad36d5bfe0d1 |
"""
Acceptance tests for the teams feature.
"""
import json
import random
import ddt
from flaky import flaky
from nose.plugins.attrib import attr
from uuid import uuid4
from ..helpers import UniqueCourseTest
from ...fixtures import LMS_BASE_URL
from ...fixtures.course import CourseFixture
from ...fixtures.discussion ... | zerobatu/edx-platform | common/test/acceptance/tests/lms/test_teams.py | Python | agpl-3.0 | 50,559 | [
"VisIt"
] | 8617aedf98c8d8b02d476a672f3dd751a0e4affd5c7a96f378223f10c7e26bad |
""" This handler basically provides a REST interface to interact with the OAuth 2 authentication server
.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN Auth:
:end-before: ##END
:dedent: 2
:caption: Auth options
"""
import json
import pprint
from dominate import tags as dom
... | DIRACGrid/DIRAC | src/DIRAC/FrameworkSystem/API/AuthHandler.py | Python | gpl-3.0 | 22,010 | [
"DIRAC"
] | ecf64c9f29117fa8d8b937412d19da8ae573d06a50ac2b582c2c2777a69654c1 |
# Copyright (C) 2012,2013,2015
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms... | fedepad/espressopp | src/ParticleGroup.py | Python | gpl-3.0 | 2,244 | [
"ESPResSo"
] | aeff8bcf0c31118ec17b5df32e97cdb06e59c28f589eb11f1dcab4b7b6a53595 |
# Copyright 2014 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... | hgaspar/cuda-convnet2 | layer.py | Python | apache-2.0 | 82,481 | [
"Gaussian",
"NEURON"
] | 8deb05a78844813bf5d2758584c3179192e3f25d4f7ed212856973883fa574e9 |
#!/usr/bin/python
import pymol
from pymol import stored
from pymol import cmd, CmdException
cmd=pymol.cmd
import export_to_gl as glmol
def out_atoms(modelName):
#print modelName
| S-John-S/MAT | sb_script_gl.py | Python | mit | 181 | [
"PyMOL"
] | 0c076cb4abb60cc00faaf67f180414675a101b0e9a44bb5e7e656b1b44f8916e |
from collections import defaultdict
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def serialize(root):
if root is None:
return '#'
q = [root]
i, j = 0, 0
while i <= j:
node = q[i]
i += 1
if nod... | shenfei/oj_codes | leetcode/python/n652_Find_Duplicate_Subtrees.py | Python | mit | 1,746 | [
"VisIt"
] | 5b5df5dbc6cc2d991e970140bcec388fc063ff4d5b72a1b760a911eb3a9a620b |
'''
DQN approach for different RL problems
as part of the basic series on reinforcement learning @
https://github.com/vmayoral/basic_reinforcement_learning
FIXME:
- ANN not performing at all
Inspired by
- https://gym.openai.com/evaluations/eval_kWknKOkPQ7izrixdhriurA
- http://outlace.com/Rei... | vmayoral/basic_reinforcement_learning | tutorial5/tests/dq-learning-gym.py | Python | gpl-3.0 | 11,084 | [
"NEURON"
] | c0e9cf990ff631b2cd011818812dcf7a2650dd5714c436f61b8292ac675d5a74 |
from datetime import timedelta, datetime
from tapiriik.database import cachedb
from tapiriik.database.tz import TZLookup
import hashlib
import pytz
class ActivityType: # taken from RK API docs. The text values have no meaning except for debugging
Running = "Running"
Cycling = "Cycling"
MountainBiking = "... | marxin/tapiriik | tapiriik/services/interchange.py | Python | apache-2.0 | 31,215 | [
"VisIt"
] | 3ce1e836415f91fee00b6d8bb199e3ffe96ddbd2836c6423549b77bd577ac022 |
"""
Probability density functions.
This module defines L{AbstractDensity}: a common interface for all PDFs.
Each L{AbstractDensity} describes a specific type of probability distribution,
for example L{Normal} is an implementation of the Gaussian distribution:
>>> pdf = Normal(mu=10, sigma=1.1)
>>> pdf.mu, pdf... | csb-toolbox/CSB | csb/statistics/pdf/__init__.py | Python | mit | 24,534 | [
"Gaussian"
] | b28670682f0432df6655811d805f72e3eb354d924163666284a3e9a564a61626 |
""" Tests for ProxyProvider modules module
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import re
import sys
import shutil
import unittest
from diraccfg import CFG
import DIRAC
from DIRAC import gConfig
from DIRAC.Core.Security.X509Chain i... | yujikato/DIRAC | tests/Integration/Resources/ProxyProvider/Test_DIRACCAProxyProvider.py | Python | gpl-3.0 | 3,956 | [
"DIRAC"
] | 7071ed2f3eae5c508c39c6e44af1b33bdc81ed2af29a7d44e61533c5b0ea6b7c |
# Import of the relevant tools
import time
import numpy as np
import theano
import theano.tensor as T
from theano import pp, config
import os
from plotly.tools import FigureFactory as FF
import plotly.graph_objs as go
from ..io.read_vtk import ReadVTK
from ..data_attachment.measures import Measures
from ..data_at... | jeanfeydy/lddmm-ot | LDDMM_Python/lddmm_python/modules/manifolds/theano_hamiltonianclouds.py | Python | mit | 8,642 | [
"Gaussian"
] | 9936c3809c04da18547ffc4bca2164745bda11d1fc5daa601a6fcfc12756a41c |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | susilehtola/psi4 | psi4/driver/procrouting/mcscf/mcscf_solver.py | Python | lgpl-3.0 | 14,311 | [
"Psi4"
] | 710b32e6dd48f0115908640eacf559d0266ce4aa7b3b22594e13701b07530f8a |
# -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @Daddy_Blamo wrote this file. As long as you retain this notice you
# can do whatever you want wi... | RuiNascimento/krepo | script.module.lambdascrapers/lib/lambdascrapers/sources_placenta/en_placenta-1.7.8/to_be_fixed/needsfixing/watch32.py | Python | gpl-2.0 | 3,615 | [
"Galaxy"
] | 9410bfae75decbc44d65c44ddf0ee11863e8969cb68e529028f6d7fb8feb4d86 |
import unittest
import warnings
from nose.tools import assert_equal
import numpy as np
import iminuit
from iminuit import describe
from iminuit.iminuit_warnings import InitialParamWarning
from probfit.funcutil import rename
from probfit.pdf import gaussian, linear
from probfit.costfunc import UnbinnedLH, BinnedLH, Bin... | mtresch/probfit | test/testfit.py | Python | mit | 3,327 | [
"Gaussian"
] | 2895219b50d6413f95cfc8ff7bc5ba966d2169de3a60b82cc63c3c261a9a9484 |
__all__ = [ 'Generator' ]
import numpy as np
import molecules
a0 = 0.52917721092
class Generator( dict ):
"""
Used to create molecules, write dalton .mol files
using -param for study with use_calculator.py
water currently implemented only
plans to implement methanol
"""
def __init__... | fishstamp82/moltools | moltools/generator.py | Python | mit | 18,121 | [
"Dalton"
] | cbad4eae034f472005d10777208f2e474bb61c0b69701d3bd79c56aded6d2dfe |
################################################################################
# Peach - Computational Intelligence for Python
# Jose Alexandre Nalon
#
# This file: tutorial/basic-neural-network.py
# Basic example of using neural networks
###############################################################################... | anki1909/peach | tutorial/neural-networks/basic-neural-network.py | Python | lgpl-2.1 | 2,642 | [
"NEURON"
] | cebf1a465015b778f4b3538d4ce9cd5b0b3af5915fbc7b30ed5701d5594bc981 |
r"""OS routines for NT or Posix depending on what system we're on.
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is ... | prefetchnta/questlab | bin/x64bin/python/37/Lib/os.py | Python | lgpl-2.1 | 38,984 | [
"VisIt"
] | 0d2e9b0c308d8120d3a459abcdfcee65d8c25d8197ecf84fe9107fa225a35580 |
# GromacsWrapper: core.py
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
"""
:mod:`gromacs.core` -- Core functionality
=========================================
Here the basic command class :class:`Groma... | pslacerda/GromacsWrapper | gromacs/core.py | Python | gpl-3.0 | 29,173 | [
"Gromacs"
] | fd27e388c57bc84d66de1cbc8a644222508b9a178d18e380b248b59ca6119267 |
"""
Unit tests for the module.
Thomas Ogden <t@ogden.eu>
"""
import os
import unittest
import numpy as np
from maxwellbloch import mb_solve, t_funcs, spectral, utility
# Absolute path of tests/json directory, so that tests can be called from
# different directories.
JSON_DIR = os.path.abspath(os.path.join(__file... | tommyogden/maxwellbloch | maxwellbloch/tests/test_mb_solve.py | Python | mit | 12,255 | [
"Gaussian"
] | da505c5672d383276369e2d681bba230df4a29edebbeb3b956bd1f47e0689899 |
# -*- coding: utf-8 -*-
# Copyright 2018 IBM.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | antoniomezzacapo/qiskit-tutorial | community/aqua/artificial_intelligence/datasets.py | Python | apache-2.0 | 22,782 | [
"Gaussian"
] | 83ee06babdc0f5c11522cc2e9df559a42a8f7b6515c1c6a37440be639c8451fb |
"""
==============================================
Denoise images using Non-Local Means (NLMEANS)
==============================================
Using the non-local means filter [Coupe08]_ and [Coupe11]_ and you can denoise
3D or 4D images and boost the SNR of your datasets. You can also decide between
modeling the n... | villalonreina/dipy | doc/examples/denoise_nlmeans.py | Python | bsd-3-clause | 3,046 | [
"Gaussian"
] | 156a7b2623b8173997821d7acf4ba32d300fec656bfb744be2dd9dda02ea4b33 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | krafczyk/spack | var/spack/repos/builtin/packages/visit/package.py | Python | lgpl-2.1 | 3,084 | [
"VTK",
"VisIt"
] | 7287066b4bc70d5890b68af17bdb8586e9fb4e4865a54465f0a779867339bc6d |
from collections import defaultdict
import datetime
import sys
import threading
import tornado.ioloop
import tornado.web
import urllib
import uuid
from prisoner.workflow import PolicyProcessor, SocialObjectGateway
SERVER_URL = "http://localhost:8888"
class ExperimentBuilder(object):
""" The ExperimentBuilder is the... | uoscompsci/PRISONER | prisoner/workflow/ExperimentBuilder.py | Python | bsd-3-clause | 9,921 | [
"VisIt"
] | a40c8b65628183bc02f6210e37fe04d05602d863dd4571781b54baaf47d6ab71 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Introduction: This script is used to get effective number of codons (ENC) from fasta
# Input is a Seq format object (Bio.SeqIO)
# Created by galaxy on 2017/3/10 0010 17:37
from collections import defaultdict
from src.global_items import *
def degenerated():
... | cvn001/codonPY | src/get_ENC_from_fasta.py | Python | mit | 2,880 | [
"Galaxy"
] | 2ed881516e92ee4e0addf19ce7ad6e7e2bd439ac546694a1aeb5ba7113628f5d |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Tinker(CMakePackage):
"""The Tinker molecular modeling software is a complete and general... | LLNL/spack | var/spack/repos/builtin/packages/tinker/package.py | Python | lgpl-2.1 | 758 | [
"TINKER"
] | e4920a6f0a73d35c262f517e490f412b092a869e2997880bfdb5808e89b30941 |
#
# 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 us... | cloud-fan/spark | python/pyspark/pandas/generic.py | Python | apache-2.0 | 102,541 | [
"Elk"
] | 3e141125b1f153e6cc0dff52269cb92276f321d83f5c96ab3e2dd2d24cb572fb |
import ConfigParser
import datetime
import Queue
import logging
import os
import pickle
import socket
import sys
import time
import thread
import traceback
import modules.logger as logger
import modules.protocol as protocol
import modules.scrapping as scrapping
sys.setrecursionlimit(10000)
buffSize =... | Diastro/Zeek | src/client.py | Python | mit | 13,765 | [
"VisIt"
] | 811ffb2583d036725443f20e4f336539cd0fa9768ddd32e26d5a160f6bdb995b |
import requests
import json
import os
import sys
import re
import traceback
from adsputils import setup_logging, get_date, date2solrstamp
from aip.classic import enforce_schema
logger = setup_logging('solr_adapter')
ARTICLE_TYPES = set(['eprint', 'article', 'inproceedings', 'inbook'])
AUTHOR_TYPES = set(['regular',... | adsabs/ADSimportpipeline | aip/classic/solr_adapter.py | Python | gpl-3.0 | 25,646 | [
"Galaxy"
] | fed38c892335794f81b809163ff6dd9f761055a29bff6146badbf2f95c3ac425 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the Account Settings page.
"""
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.account_settings import AccountSettingsPage
from common.test.acceptance.tests.helpers import AcceptanceTest, EventsTestMixin
cl... | stvstnfrd/edx-platform | common/test/acceptance/tests/lms/test_account_settings.py | Python | agpl-3.0 | 2,482 | [
"VisIt"
] | 2cb6c193b297d4e082fd061cadad8fcf5f2d33ee9aa21baca6780492547a6e90 |
#!/usr/bin/env python
__author__ = 'Mike McCann'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'mccann at mbari.org'
__doc__ = '''
Master loader for all October 2013 SIMZ activities.
Mike McCann
MBARI 24 October 2013
@var __date__: Date of last svn commit
@undocumented: __doc__ parser
@status... | josephmfaulkner/stoqs | stoqs/loaders/MolecularEcology/loadSIMZ_oct2014.py | Python | gpl-3.0 | 5,630 | [
"NetCDF"
] | a9907c788021dfeda7cb05a16764332e66360e1cf92900d6d52fd31ae25db6a7 |
# Copyright 2017 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... | drpngx/tensorflow | tensorflow/contrib/autograph/pyct/common_transformers/anf.py | Python | apache-2.0 | 1,791 | [
"VisIt"
] | 783395f0b79dd59ea5bd649c2c5707152e51e71b39d08169634acc6ec560cbc8 |
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2012 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... | thiagodasilva/swift | test/unit/proxy/test_server.py | Python | apache-2.0 | 417,412 | [
"MOOSE"
] | df3e150f8c114cfe59d9b21103de0aa3d2337a0bfa64cb03a6b8a06abd197a74 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | beernarrd/gramps | gramps/plugins/tool/patchnames.py | Python | gpl-2.0 | 23,530 | [
"Brian"
] | 9cbcb17580b052d2083007f47b15529e20799bc591ae11a683470c0d336c6405 |
"""Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 encoded w... | xyuanmu/XX-Net | python3.8.2/Lib/email/_header_value_parser.py | Python | bsd-2-clause | 106,460 | [
"CRYSTAL"
] | 033ade7a9948d073b07e4f9d3dedfe0662ae1ce865b62cda317741e57728c449 |
#Turbomole converter
#Converts basis files in turbomole format to C++ files readable by Fermion Mingle
import glob
import os
def extract_m_basisinfo(filename, printing = False):
#Extract multiple basises from a turbomole file
swtch = 0
f = open(filename)
comments = []
basis_sets ... | CompPhysics/ThesisProjects | doc/MSc/msc_students/former/AudunHansen/Audun/Pythonscripts/TurbomoleConverter/TurbomoleConverter.py | Python | cc0-1.0 | 15,786 | [
"TURBOMOLE"
] | 8d491cb6a67df6c33eb84bb9f720eaf073fe6322c1c3e2d52f24159e31de0b6d |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def initial_data(apps, schema_editor):
TC = apps.get_model('tech', 'TechCategory')
T = apps.get_model('tech', 'Tech')
tc = TC(name='Physics', cost=50, category='PH')
tc.save()
T(name='Laser Cannon', ... | dwagon/pymoo | moo/tech/migrations/0009_physics_techs.py | Python | gpl-2.0 | 7,981 | [
"BLAST"
] | e67103871ebf7d93cc0c27126bfe732c3304eed720219e8f17c9cb49690f75c2 |
''' Some tests for filters '''
from __future__ import division, print_function, absolute_import
import sys
import numpy as np
from numpy.testing import (assert_equal, assert_raises, assert_allclose,
assert_array_equal, assert_almost_equal,
TestCase, run_module_sui... | asnorkin/sentiment_analysis | site/lib/python2.7/site-packages/scipy/ndimage/tests/test_filters.py | Python | mit | 14,168 | [
"Gaussian"
] | d08d63c3a206179a591249dfd700f0d0f112b2cda15847b41c4592f5d2761f37 |
"""
This class brings together a L{solve.Solver} to choose a set of implmentations, a
L{fetch.Fetcher} to download additional components, and the user's configuration
settings.
@since: 0.53
"""
# Copyright (C) 2011, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall impor... | dabrahams/zeroinstall | zeroinstall/injector/driver.py | Python | lgpl-2.1 | 7,058 | [
"VisIt"
] | 00fb21a9a22477aa506d412ac294ca2fe2fd95a322bed847e2bef7386f67dc4a |
# -*- coding: utf-8 -*-
# Copyright (c) 2007, 2008, Benoît Chesneau
# Copyright (c) 2007 Simon Willison, original work on django-openid
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | coffenbacher/askbot-devel | askbot/deps/django_authopenid/views.py | Python | gpl-3.0 | 56,136 | [
"VisIt"
] | d150af7d91a6b46eafedad91b2cf48dec13315a1971f72c6d60dc303f466e8f9 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example script, part of MDAnalysis
"""
Example: Comparing a trajectories from different methods
========================================================
Example implementation of Path Similarity Analysis that shows how to read in a
set of trajectories, compute (discrete)... | Becksteinlab/PSAnalysisTutorial | psa_hausdorff-pairs.py | Python | gpl-3.0 | 5,431 | [
"CRYSTAL",
"MDAnalysis"
] | 767cc82b4cd05836007fd59c897e6c105a735819c48d916d263b2a11e7639364 |
#! /usr/bin/env python
import os, sys, glob, subprocess
from setuptools import setup, find_packages, Command
PACKAGENAME = 'spiralgalaxygame'
INSTALL_REQUIRES = [
'preconditions >= 0.1',
'twisted >= 14.0',
'txpostgres >= 1.2.0',
'psycopg2 >= 2.5.2',
'mock >= 1.0.1',
]
def main(args = sys.ar... | nejucomo/sgg | setup.py | Python | agpl-3.0 | 4,730 | [
"Galaxy"
] | a5b0fdc4f70379580296b794c883425b25ee2c0ec453773d82f91d60d59eb34d |
#!/usr/bin/env python
"""
This file reads arguments and generate vacancy and antisite structures
in intermetallics.
"""
__author__ = "Bharat Medasani, Enze Chen"
__data__ = "Aug 10, 2020"
import os
from argparse import ArgumentParser
from pymatgen.io.vasp.sets import MPMetalRelaxSet
from pymatgen.ext.matproj import... | pydii/pydii | pydii/scripts/gen_def_structure.py | Python | mit | 11,604 | [
"NetCDF",
"VASP",
"pymatgen"
] | d8e7ee45e80ea8d0d50302b2b4f8076edb2f751d9a608a53bcbc7ce45e8cb62e |
# Python module
import itertools
# Python extension modules (require extension installations)
import numpy as np
from scipy.stats import futil
from scipy.sparse.csgraph import _validation
from scipy.stats import uniform, norm, triang, lognorm, beta
## Sample generator
## * Generates sample multipliers from ... | GlobalEcologyLab/SARDM | SampleGenerator.py | Python | gpl-3.0 | 11,017 | [
"Gaussian"
] | 73a61629b776cd486d71c57ed8014f2833f2c7d10a9c93fa2cd063512958a55c |
from scipy.ndimage import filters
from PIL import Image
#from numpy import *
from pylab import *
def Gausian_response(img,sigma=1):
""" Compute Gaussian response function
for each pixel in a graylevel image. """
# Gausian response
img_sigma = zeros(img.shape)
filters.gaussian_filter(img, (... | wasit7/cs634 | 2016/lab3_find_stable_keypoints.py | Python | bsd-2-clause | 878 | [
"Gaussian"
] | 1de22a443d075f6b62347bb3b715c8e245eb0cb8f4de4f8a2b3ff386bf9174b7 |
# -*- coding: utf-8 -*-
# coding=utf-8
__author__ = 'ben'
import os
from os import walk
import boto.mturk.connection
from boto.s3.connection import S3Connection
from boto.mturk.qualification import LocaleRequirement, Qualifications, Requirement
import datetime
import csv
import yaml
import sys
import datetime
import p... | bdyetton/MODA | Tools/MturkTools.py | Python | mit | 27,434 | [
"VisIt"
] | ab927917a1e3f2d3695d11297f243949ebb9de9fa029fe3a5c85b35a8f2d670d |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import sys
sys.path.insert(0, os.path.abspath('../../src'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx... | pybel/pybel-tools | docs/source/conf.py | Python | mit | 4,949 | [
"Pybel"
] | 26bcdd0dd51573997bf9662db84c88476628f77f6aa796400db1f19f48139cc7 |
# Module adapting imagen classes for use with boxflow
#
#
from __future__ import absolute_import
import os
import base64
from PIL import Image
from io import BytesIO
import imagen
from imagen import PatternGenerator, Gaussian
from imagen import image
from imagen import random
from imagen.random import RandomGenerator... | ioam/boxflow | boxflow/interface/imagen.py | Python | bsd-3-clause | 8,311 | [
"Gaussian"
] | c963bc611605176c6ab0600b2ae8eb1da236734d12f2853103773a24c23a8190 |
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | Multiscale-Genomics/mg-process-fastq | tool/bwa_indexer.py | Python | apache-2.0 | 5,186 | [
"BWA"
] | 12bca1721455d88dbfe99c3c5bedc6c03015942d582a3c78ea7846b64b1e8645 |
########################################################################
# $HeadURL $
# File: RemoveFile.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/25 07:44:19
########################################################################
""" :mod: RemoveFile
================
.. module: RemoveFile
... | vmendez/DIRAC | DataManagementSystem/Agent/RequestOperations/RemoveFile.py | Python | gpl-3.0 | 7,595 | [
"DIRAC"
] | 3f45b997f7d8f0ee48940e4e8235a32659e455f83366efa10e24bb781b7803d2 |
#!/usr/bin/env python3
# encoding: utf-8
from qcl.ccdata_xyz import ccData_xyz
from qcl.stretch import stretch
from cclib.parser import ccopen
def main():
stretch('product.out')
rfiles = ['r1.out', 'r2.out']
reactants = []
for rfile in rfiles:
tmp = ccopen(rfile).parse()
reactants.a... | ben-albrecht/qcl | test/tree/a.py | Python | mit | 514 | [
"cclib"
] | 935adf2ad82db1426985e45c4b4aac0397a847807d4783aa2e40b8cdbc82bd8e |
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
#
# 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... | ilpianista/ansible | lib/ansible/executor/module_common.py | Python | gpl-3.0 | 60,557 | [
"VisIt"
] | 9b8818ef015edf7c45884b92840dc1cd6da1e71dc40e648a53fec777ff104b3f |
"""
Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1.
AUTHORS
The original version of this software, called LMFIT, was written in FORTRAN
as part of the MINPACK-1 package by XXX.
Craig Markwardt converted the FORTRAN code to IDL. The information for the
IDL version is:
Cr... | bmazin/ARCONS-pipeline | util/mpfit.py | Python | gpl-2.0 | 80,276 | [
"Gaussian"
] | 6315585e7fb3e3eadf6877166b15758799e24c17a9640e413845b7a73a1dc2e7 |
#!/usr/bin/env python3
#* 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/lgp... | harterj/moose | python/moosesqa/get_sqa_reports.py | Python | lgpl-2.1 | 3,041 | [
"MOOSE"
] | 569e6a7017c34eef199cd3c2dfecd8e7c694d3e7c815c08611491e9e8ba06717 |
"""Testing for kernels for Gaussian processes."""
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# License: BSD 3 clause
import pytest
import numpy as np
from inspect import signature
from sklearn.gaussian_process.kernels import _approx_fprime
from sklearn.metrics.pairwise \
import PAIRWISE_KERNEL_... | anntzer/scikit-learn | sklearn/gaussian_process/tests/test_kernels.py | Python | bsd-3-clause | 14,237 | [
"Gaussian"
] | 402e9de70dd84ae4a9ad9de0afa78a3f637d2a82eac7befa12c3e781284cf597 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/analysis/Energy.py | Python | gpl-3.0 | 2,570 | [
"ESPResSo"
] | 78f0914b5380d2801a1fefb14d3f729fdbcb9a9db97fd4c5d6f8d1e4438df379 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | sandbox_tapo/src/skin_related/BMED_8813_HAP/Features/single_feature/best_kNN_PC/cross_validate_categories_kNN_PC_BMED_8813_HAP_scaled_method_II_shape.py | Python | mit | 4,446 | [
"Mayavi"
] | 4ab2168370e8212873ab6639ff2ce37df4e1ec7ff80cc00f0fccabf63498bd88 |
from distutils.core import setup
setup(name="bikeshed",
version="1.0",
description="bikeshed REST API",
author_email="brian@python.org",
url="http://www.bikeshed.io",
keywords="bikeshed",
py_modules=["bikeshed"],
)
| briancurtin/bikeshed | setup.py | Python | mit | 258 | [
"Brian"
] | cf8080315a0717e812f785d79fa508197833d380c2f71a9938fe1e2466cf2b3e |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/analysis/test_gnm.py | Python | gpl-2.0 | 6,875 | [
"MDAnalysis"
] | 0cec2cc8103f68934b64beddf9a4b62d04a043521c182b691589f18235485e9f |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2005 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2012 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the term... | beernarrd/gramps | gramps/gen/plug/_manager.py | Python | gpl-2.0 | 24,793 | [
"Brian"
] | 8da6f46ffa280186edc0440725b602d5e4e8e73399d609a86b80fecb96d0e49a |
''' Tests for netcdf '''
from __future__ import division, print_function, absolute_import
import os
from os.path import join as pjoin, dirname
import shutil
import tempfile
import warnings
from io import BytesIO
from glob import glob
from contextlib import contextmanager
import numpy as np
from numpy.testing import a... | lhilt/scipy | scipy/io/tests/test_netcdf.py | Python | bsd-3-clause | 19,261 | [
"NetCDF"
] | 08e3c126ca23ad52a2391b246a18055648bfc4cde00b24b0491f64da17272c44 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 gimoh
#
# This file is part of devops-utils.
#
# devops-utils 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, o... | gimoh/devops-utils | devops_utils/__init__.py | Python | gpl-3.0 | 1,021 | [
"Galaxy"
] | 03cc5c7470322f33a0bec2c8e80747a3ab6d5767a5c6b4e2cff9daa008aac7a8 |
#!/usr/bin/python
import unittest
import os
import random
import json
import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.core.lattice import Lattice
from pymatgen.core.surface import Slab, SlabGenerator, generate_all_slabs, \
get_symmetrically_distinct_miller_indices, get_symmetrical... | mbkumar/pymatgen | pymatgen/core/tests/test_surface.py | Python | mit | 35,374 | [
"pymatgen"
] | ea48e5be1834160cd9e1bfe10281013827c96568af5e8b928ad1bba2033b079b |
# -*- coding: utf-8 -*-
"""
Convert the simuPOP documentation to Sphinx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: 2007-2008 by Georg Brandl.
:license: BSD.
"""
import sys
import os, re
import sys
import os
import glob
import shutil
import codecs
from os import path
from converter.token... | BoPeng/simuPOP | doc/tools/convert.py | Python | gpl-2.0 | 12,679 | [
"VisIt"
] | 814ccfc9923431302f3cdeacc17b481cacaa490598f1ef57d01c8cbb0173af5a |
import logging
import numpy as np
import scipy.ndimage as ndim
from skimage.morphology import binary_dilation
from scipy.spatial.distance import dice
import nibabel as nib
from dipy.io.utils import (create_nifti_header, get_reference_info)
from dipy.tracking.streamline import select_random_set_of_streamlines
import ... | arokem/pyAFQ | AFQ/utils/volume.py | Python | bsd-2-clause | 5,768 | [
"Gaussian"
] | 088416cf8d00e6ee2f0d08336d2601cf4191006030ee13d02c269428bb3215b7 |
"""Tests for wien2k interface."""
import os
import numpy as np
from phonopy.interface.phonopy_yaml import read_cell_yaml
from phonopy.interface.wien2k import parse_wien2k_struct
data_dir = os.path.dirname(os.path.abspath(__file__))
def test_parse_wien2k_struct():
"""Test structure parsing."""
filename_BaGa... | atztogo/phonopy | test/interface/test_wien2k.py | Python | bsd-3-clause | 799 | [
"WIEN2k",
"phonopy"
] | c7d7b84bc76c4bfe65f44c47ac92b5535b6b47312260b7bd57bb68ec46db39cd |
import logging
from post_request_task.task import task
from mkt.feed.models import FeedApp, FeedCollection
log = logging.getLogger('z.feed')
@task
def _migrate_collection_colors(ids, model):
"""Migrate deprecated background color (hex) to color (name)."""
cls = FeedApp
if model == 'collection':
... | jasonthomas/zamboni | mkt/feed/tasks.py | Python | bsd-3-clause | 1,054 | [
"Amber"
] | 2e22a33207d693aac69598dec17993702fd9facbbb973d787c9aae66329bdab6 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Interfaces to assorted Freesurfer utility programs.
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> d... | christianbrodbeck/nipype | nipype/interfaces/freesurfer/utils.py | Python | bsd-3-clause | 44,609 | [
"Gaussian",
"VTK"
] | 49f9b27397b7a10b051d405ea4d38d50a9a157275bbac4089c60cfd4c755602b |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
unsmuggle_url,
)
from ..compat import (
compat_parse_qs,
compat_urlparse,
)
class SenateISVPIE(InfoExtractor):
_COMM_MAP = [
["ag", "76440", "http://ag... | lzambella/Qyoutube-dl | youtube_dl/extractor/senateisvp.py | Python | gpl-3.0 | 6,265 | [
"EPW"
] | e3793a0fba7b8b31b08e1f9fca0dcdb3a82bcdfcfeec998e0c5483f5292abc23 |
"""
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | wazeerzulfikar/scikit-learn | sklearn/tree/tree.py | Python | bsd-3-clause | 60,513 | [
"Brian"
] | a7dc3b1a4d263c0be1643dd6f18ca291a2ea365152b33259899f7ffebe8e283d |
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/cidfonts.py
#$Header $
__version__='3.3.0'
__doc__="""CID (Asian multi-byte) font support.
This defines classes to represent CID fonts. They ... | sandeepkoduri/GAE-html-to-pdf | libs/reportlab/pdfbase/cidfonts.py | Python | mit | 18,851 | [
"Brian"
] | 34a923080ab34a3582bde863f47cda128a3d3fda480f2a4325d64001756a794b |
import re
import ast
import sys
try:
from distutils.util import get_platform
is_windows = get_platform().startswith("win")
except ImportError:
# Don't break install if distuils is incompatible in some way
# probably overly defensive.
is_windows = False
try:
from setuptools import setup
except I... | ssorgatem/pulsar | setup.py | Python | apache-2.0 | 3,786 | [
"Galaxy"
] | 9eceb8a6cb38ed09c35aef9367684404bf3d2dfc6dd2325e9fbfb600692c2f58 |
import os
from django.test import TransactionTestCase
from django.contrib.auth.models import Group
from django.core.exceptions import ValidationError
from rest_framework.exceptions import ValidationError as DRF_ValidationError
from hs_core.testing import MockIRODSTestCaseMixin
from hs_core import hydroshare
from hs_... | hydroshare/hydroshare | hs_file_types/tests/test_netcdf_metadata.py | Python | bsd-3-clause | 51,039 | [
"NetCDF"
] | cb71d5aaef65a79d7171d11149e4776b63a141d8709c578c44a8d378ce9ffe4e |
import numpy as np
from scipy import ndimage
from dipy.align import floating
from dipy.align.metrics import SSDMetric, CCMetric, EMMetric
from numpy.testing import (assert_array_equal,
assert_array_almost_equal,
assert_raises)
def test_exceptions():
for invali... | villalonreina/dipy | dipy/align/tests/test_metrics.py | Python | bsd-3-clause | 9,239 | [
"Gaussian"
] | 7e1dbedad84ddb71a165218eed7884de6cc3c53eb5613cb2ea72ec1ad89774db |
# -*- coding: utf-8 -*-
# Version: 0.17
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and pypy
* [... | scikit-build/ninja-python-distributions | versioneer.py | Python | apache-2.0 | 69,301 | [
"Brian"
] | 908af127bf45df4a83917278b0c728785cc81ed8c4330d014d44d091d72f0e57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.