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 |
|---|---|---|---|---|---|---|---|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | ttrifonov/horizon | horizon/horizon/base.py | Python | apache-2.0 | 25,216 | [
"VisIt"
] | ee470961b56a1b66dad753952d55409e098931f94c7acd1e23d4efefd028e5ea |
import time
tic=time.time()
import matplotlib
matplotlib.use('Agg')
import trackeddy
import trackeddy.tracking as ttrack
from trackeddy.geometryfunc import *
from pylab import *
import random
import pdb
import cmocean as cm
import matplotlib.gridspec as gridspec
import trackeddy.utils.field_generator as fg
import im... | Josue-Martinez-Moreno/trackeddy | validation/so_synthetic.py | Python | mit | 8,413 | [
"Gaussian"
] | c6846268f13f6258fbef8955a9323121ad1a0f250032e858fe2357b650e90f89 |
#!/usr/bin/env python3
"""
Copyright 2020 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 ... | pwillworth/galaxyharvester | html/delCreatureResource.py | Python | gpl-3.0 | 3,507 | [
"Galaxy"
] | 510aeef8a1645e5b83834b444ca3efd1bdd8f26f01ceefe5168441b4f91a857a |
from salmon import server, utils, mail, routing, queue, encoding, version
import salmon
import argparse
import email
import glob
import mailbox
import os
import shutil
import signal
import sys
COMMANDS = (
("start", "starts aserver"),
("stop", "stops a server"),
("status", "displays status of server"),
... | waynew/salmon | salmon/commands.py | Python | gpl-3.0 | 16,347 | [
"BLAST"
] | 660ab48a88aa1a365620a4534eaca0e1d96061297cf6a6f465e7abb69f32e960 |
# -*- coding: utf-8 -*-
import json
from typing import Any, Dict, Iterable
from guardian.utils import get_anonymous_user
from django.http import HttpRequest, JsonResponse
from django.contrib.auth.decorators import user_passes_test
from django.contrib.auth import views as auth_views
from django.contrib.auth.mixins im... | tomka/CATMAID | django/applications/catmaid/control/user.py | Python | gpl-3.0 | 6,080 | [
"NEURON"
] | 9edea1f8737e034f53461e3b3d30aa264cdeb0c96524e29e0e5547037cfc661c |
#
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El, time
n0=20
n1=20
output = False
display = Tr... | justusc/Elemental | examples/interface/BPComplex.py | Python | bsd-3-clause | 2,761 | [
"Gaussian"
] | cbbf34ba946a93e17bee2f695708acd7f15e872731f81f7a0c7d6995da8940a8 |
import os
import warnings
import nibabel
import numpy as np
from scipy import sparse
warnings.simplefilter('ignore', sparse.SparseEfficiencyWarning)
from .. import dataset
def get_mapper(subject, xfmname, type='nearest', recache=False, **kwargs):
from ..database import db
from . import point, patch, volume, ... | smerdis/pycortex | cortex/mapper/__init__.py | Python | bsd-2-clause | 6,249 | [
"Gaussian"
] | 1729cb5821bb73f68f688614190df89dbc4c050357e7e0f19b1bce4171cf8980 |
#!/bin/python
import vtk
import vtk.util.colors
points = vtk.vtkPoints()
points.InsertNextPoint(0, 0, 0)
points.InsertNextPoint(0, 1, 0)
points.InsertNextPoint(1, 0, 0)
unstructuredGrid = vtk.vtkUnstructuredGrid()
unstructuredGrid.SetPoints(points)
unstructuredGrid.InsertNextCell(vtk.VTK_TRIANGLE, 3, [0,1,2])
mappe... | trianam/tests | python/vtkTriangle.py | Python | gpl-2.0 | 915 | [
"VTK"
] | 782c2949563520a89ec1c6043c721668d92062d6aa7550a87c54a91440a47474 |
#!/usr/bin/env python
# Copyright (c) 2012 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.
"""\
Wrapper script around Rietveld's upload.py that simplifies working with groups
of files.
"""
import json
import optparse
impo... | xuyuhan/depot_tools | gcl.py | Python | bsd-3-clause | 51,359 | [
"VisIt"
] | e8955d4bd44bca455d09db1716b5e08d50d0feef82f9d64aac13a81369ba2d24 |
from OWWidget import *
import OWGUI, OWDlgs, numpy, user, sys
import OWGraphTools
from orngVizRank import *
from orngScaleData import getVariableValuesSorted
_graph_dialogs = True
try:
from OWGraph import *
except ImportError:
_graph_dialogs = False
class OWVizRank(VizRank, OWWidget):
settingsList = ["k... | yzl0083/orange | Orange/OrangeWidgets/OWkNNOptimization.py | Python | gpl-3.0 | 96,357 | [
"Gaussian"
] | afdc5603e337a0e94c523507ef42fa01dd5b75c933725cf18a95ddd1c9ea78ea |
# Imports
import os
import sys
import vcf
import math
import h5py
import time
import pysam
import vqsr_cnn
import numpy as np
from Bio import Seq, SeqIO
from collections import Counter
# Keras Imports
import keras.backend as K
def run():
args = vqsr_cnn.parse_args()
if 'write_reference_and_annotation_tensors'... | ksthesis/gatk | src/main/resources/org/broadinstitute/hellbender/tools/walkers/vqsr/training.py | Python | bsd-3-clause | 46,416 | [
"pysam"
] | 64b15abb4e46288a06df508cfadebf8b7ed42a35f063de9ed1ac307844b7daa8 |
import string,os
import sys # for listing directory contents
import logging
import time
from collections import deque
class Node(object):
def __init__(self, LocalIndex=None,GlobalIndex=None,Descendant=None,SnapNum=None,BreadthFirstIndex=None,DepthFirstIndex=None,SubTreeSize=None):
self.data = {'LocalInde... | IntersectAustralia/asvo-tao | core/sageimport_mpi_HDF/ProcessTreeTraversal.py | Python | gpl-3.0 | 4,381 | [
"Galaxy"
] | 8175186b2bb957225c1539b8e6bccd34380b0e9e1bc01dc7e209efac44b6ccb0 |
from __future__ import print_function, division
import IMP
import IMP.atom
import IMP.isd.gmm_tools
import IMP.pmi
import IMP.pmi.tools
from collections import defaultdict
from math import pi
import os
def resnums2str(res):
"""Take iterable of TempResidues and return compatified string"""
if len(res)==0:
... | shanot/imp | modules/pmi/pyext/src/topology/system_tools.py | Python | gpl-3.0 | 16,983 | [
"Gaussian"
] | 55670de03bbfd4716ca12248c3bc9a7baa27937690b3b7c2adf9a0566c329061 |
# (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.cache import BaseCacheModule
DOCUMENTATION = ... | vmindru/ansible | test/integration/targets/gathering_facts/cache_plugins/none.py | Python | gpl-3.0 | 1,114 | [
"Brian"
] | 1f693882e9a87600099bb7f797ffb1f78d0a257f353f60609f68bb3a6290254a |
# Copyright 2013-2020 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 Orthofinder(Package):
"""OrthoFinder is a fast, accurate and comprehensive analysis tool f... | rspavel/spack | var/spack/repos/builtin/packages/orthofinder/package.py | Python | lgpl-2.1 | 1,318 | [
"BLAST"
] | e657fa0851a67d2135201fcdb79e05ca71fdb090eae9518c96b3ea67ade051fc |
#!/usr/bin/env python
###############################################################################
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License... | Ecogenomics/GTDBNCBI | scripts_dev/ltp_ssu_classifcation_fetch.py | Python | gpl-3.0 | 5,188 | [
"BLAST"
] | b47c89bb82c992c16082a647257e5a9e034b62a7925e223b4cc32dcf1bf2a0f1 |
# -*- coding: utf-8 -*-
"""
This file contains methods for a power vs. fluorescence fitting, these methods
are imported by class FitLogic.
Qudi 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 ... | drogenlied/qudi | logic/fitmethods/powerfluorescencemethods.py | Python | gpl-3.0 | 5,317 | [
"Gaussian"
] | aa61e619dc8b3942d73ebb1a530268544b967b821082884a7462308830b59100 |
# -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
# standard library imports
import logging
import jso... | shupelneker/gae_new_structure | bp_content/themes/default/handlers/handlers.py | Python | lgpl-3.0 | 65,445 | [
"VisIt"
] | 98ec35c8191003345b4ba02c974311a423b8bdcff5583af8ade017c9a9c19175 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#===============================================================================
# Copyright (c) 2012 - 2014, GPy authors (see AUTHORS.txt).
# Copyright (c) 2014, James Hensman, Max Zwiessele
# Copyright (c) 2015, Max Zwiessele
#
# All rights reserved.
#
# Redistribution a... | befelix/GPy | setup.py | Python | bsd-3-clause | 9,322 | [
"Gaussian"
] | 15562108a7d827c2b5215c090662979b91379b390bd1f8087773aaaf7c9df854 |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | espressomd/espresso | testsuite/python/observable_cylindricalLB.py | Python | gpl-3.0 | 10,956 | [
"ESPResSo"
] | 8d7f59380b9cab9bb543561a73481dfefbd131f23d68d7b95d1edc9bd809dda2 |
'Test ase.dft.wannier module with k-points.'
from ase.structure import bulk
from ase.dft.wannier import Wannier
from gpaw import GPAW
from gpaw.mpi import world, serial_comm
si = bulk('Si', 'diamond', a=5.43)
k = 4
if 1:
si.calc = GPAW(kpts=(k, k, k), txt='Si-ibz.txt')
e1 = si.get_potential_energy()
si.... | ajylee/gpaw-rtxs | gpaw/test/wannierk.py | Python | gpl-3.0 | 1,733 | [
"ASE",
"GPAW"
] | f05a445217ac68fc58ad2dc440e63657708880bb809e269e4ebbbaebf5568fd5 |
from datetime import datetime
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.mail import mail_admins
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
from django.shortcuts import re... | doismellburning/whereami | whereami/main/views.py | Python | mit | 3,277 | [
"VisIt"
] | 955c09f453f4fb85a6d0770f40c5b4db7eb3272eb41eb9e7915922b8609cb114 |
# Copyright (C) 2014,2015 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | osrg/gobgp | tools/pyang_plugins/bgpyang2golang.py | Python | apache-2.0 | 26,622 | [
"VisIt"
] | 0b38222d03875a12f4a09f47b506af794adab0019efeaed70ec0450406f2fe9c |
#!/usr/bin/env python
'''
Fly Copter in SITL
AP_FLAKE8_CLEAN
'''
from __future__ import print_function
import copy
import math
import os
import shutil
import time
import numpy
from pymavlink import mavutil
from pymavlink import mavextra
from pymavlink import rotmat
from pysim import util
from pysim import vehiclei... | ChrisBird/ardupilot | Tools/autotest/arducopter.py | Python | gpl-3.0 | 303,127 | [
"Gaussian"
] | 66a37f30a0e61533fc856d9e3005341eed5ce2744b6a59ed65ceb7c939ad4bb8 |
# 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 PyScinum(PythonPackage):
"""Scientific numbers with multiple uncertainties and
corr... | LLNL/spack | var/spack/repos/builtin/packages/py-scinum/package.py | Python | lgpl-2.1 | 659 | [
"Gaussian"
] | 8160edccf05667da0844985ede3c4e6a600bbcefcc1f9bd04a36544bf5d91e28 |
#------------------------------------------------------------------------------
# pycparser: c_generator.py
#
# C code generator from pycparser AST nodes.
#
# Copyright (C) 2008-2012, Eli Bendersky
# License: BSD
#------------------------------------------------------------------------------
from . import c_ast
class... | pombredanne/pycparser-1 | pycparser/c_generator.py | Python | bsd-3-clause | 13,165 | [
"VisIt"
] | 4865ea16ab8ee31fa307c9729af04af6e9f100d2d255e9cf93d23bc8d7a44973 |
# Copyright 2015 Docker, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | retr0h/maquina | test/unit/test_interpolation.py | Python | mit | 3,426 | [
"Galaxy"
] | 432e33b37f3c928ff900dfe84aa3a68561e70ed3423b07738470d19195e02e34 |
import numpy as np
import numpy.random as npr
# import numpy.random
def spherical_proposal(theta, prop_scale=.05):
""" jitters theta with spherical gaussian noise """
thp = theta + prop_scale*np.random.randn(len(theta))
if np.any(thp < 0):
print thp
return None
else:
return thp
def slicesample... | andymiller/flecks | inference/slicesample.py | Python | mit | 8,298 | [
"Gaussian"
] | 3c4388719ccfa2fbe184a0c128d689e87236850ffdd5c5b89d853ce20578499b |
#
# Copyright (C) 2000-2008 greg Landrum
#
""" code for dealing with forests (collections) of decision trees
**NOTE** This code should be obsolete now that ML.Composite.Composite is up and running.
"""
from __future__ import print_function
from rdkit.six.moves import cPickle
import numpy
from rdkit.ML.DecTree impor... | jandom/rdkit | rdkit/ML/DecTree/Forest.py | Python | bsd-3-clause | 8,004 | [
"RDKit"
] | 07ee73bb9ebf58837b991c12788e031d3cf8e2e8b2c22c07ea9501064c21e067 |
#!usr/bin/env python3
# Version 1.0.8 13.9.2014
# Copyright 2014 Jere Oikarinen
# This file is part of RetPro.
#
# RetPro 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 L... | Shakajiub/RetPro | games/pong.py | Python | gpl-3.0 | 15,113 | [
"BLAST"
] | a9cd4fbe297099230ad2123490163071080c057518f89462535011dae1b65dbc |
import os
import sys
import yaml
import pivotaltracker
from pivotaltracker._termcolor import styled
from pivotaltracker._helpers import command, choose_command
__CONFPATH = os.path.join(os.path.expanduser("~"), ".pivotaltracker")
def required_style(msg):
return styled(" %s " % msg, attrs=["reverse"])
def optiona... | harperreed/pivotaltracker | pivotaltracker/tool.py | Python | bsd-3-clause | 5,691 | [
"VisIt"
] | dca48387de87cd25b5013cc173afb215d8fcde9d6dc63e68bae928a7124412b1 |
# ============================================================================
#
# Copyright (C) 2007-2010 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... | kurtraschke/camelot | camelot/view/controls/editors/smileyeditor.py | Python | gpl-2.0 | 3,755 | [
"VisIt"
] | 75ae363505dff85cb72f5f5ccbcbd97db66ff92065eb74c91e8cf27df65e5391 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 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 General Public License as published by
## the Free Software Foundati... | andrebellafronte/stoq | stoqlib/gui/test/test_paymentmethoddialog.py | Python | gpl-2.0 | 2,113 | [
"VisIt"
] | 264b8d8768c7b05a7462c23f33e04cd2237ec3a8dfa6b6b358f2459dc79d1abf |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/addlocation.py | Python | gpl-2.0 | 5,235 | [
"VisIt"
] | 3a863685d2c178e817a708261b0948cba14d2914471e09c7d2c54a438a03d5dd |
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_numbers('../data/fm_train_real.dat')
testdat = lm.load_numbers('../data/fm_test_real.dat')
parameter_list=[[traindat,testdat,1.9],[traindat,testdat,1.7]]
def kernel_io_modular (fm_train_real=traindat,fm_test_real=testdat,width=1.9):
from shogun.Fea... | ratschlab/ASP | examples/undocumented/python_modular/kernel_io_modular.py | Python | gpl-2.0 | 1,024 | [
"Gaussian"
] | ca46d48a6409cc64838ead9801bab93608c3a5d9fab1d3ea24ed2abc09c031d2 |
"""Mayavi/traits GUI for setting MRI fiducials."""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)
import os
from ..externals.six.moves import map
from mayavi.core.ui.mayavi_scene import MayaviScene
from mayavi.tools.mlab_scene_model import MlabSceneModel
import numpy as np
from... | jaeilepp/mne-python | mne/gui/_fiducials_gui.py | Python | bsd-3-clause | 17,299 | [
"Mayavi"
] | 5d3910988b2b58fc5b98982c8527dceba400322041ccc8fe132dc4f211bdbaf9 |
#!/usr/bin/env python
#
# GPytage version.py module
#
############################################################################
# Copyright (C) 2008-2009 by Kenneth Prugh, Brian Dolbec #
# ken69267@gmail.com #
# ... | Ken69267/gpytage | gpytage/version.py | Python | gpl-2.0 | 1,464 | [
"Brian"
] | 4e1a893a97d964233d2ce2cc7b118f489fc32d642e23f25fb85894e386af39ff |
from __future__ import absolute_import
import logging
from functools import partial, update_wrapper
from django.contrib import messages
from django.contrib.auth import login as login_user, authenticate
from django.template.context_processors import csrf
from django.core.urlresolvers import reverse
from django.db impo... | beeftornado/sentry | src/sentry/web/frontend/accounts.py | Python | bsd-3-clause | 8,897 | [
"VisIt"
] | 0b117ab5cf266991483357306c29403ea193d22aeef8b2e21f6d90bbaaecefec |
# -*- coding: utf-8 -*-
# HiPart is a program to analyze the electronic structure of molecules with
# fuzzy-atom partitioning methods.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>
#
# This file is part of HiPart.
#
# HiPart is free software; you can redistribute it and/or
# modify it under t... | molmod/hipart | hipart/gint/tests/utils.py | Python | gpl-3.0 | 1,244 | [
"Gaussian"
] | dd3231c20614ff686ee94ea832129cdfefe0333eae0955aa6fbd2adf2b53e5bb |
# $HeadURL$
__RCSID__ = "$Id$"
from DIRAC.Core.Utilities import Time
def tupleToMessage( varTuple ):
varList = list( varTuple )
varList[ 2 ] = Time.fromString( varList[ 2 ] )
return Message( *varList )
class Message:
def __init__( self, systemName, level, time, msgText, variableText, frameInfo, subSystemNam... | avedaee/DIRAC | FrameworkSystem/private/logging/Message.py | Python | gpl-3.0 | 2,032 | [
"DIRAC"
] | 3ddce22598501b54f86ac54effd3b75a62564865589dd3ae4b46fdd3e51ee0c9 |
'''
This example file shows for a CIS calculations of a LiH molecule
how to use detCI@ORBKIT to compute and visualize several quantities
related to the electronic continuity equation for
multi-determinant CI wavefunctions.
This example is based on the second example of the detCI@ORBKIT publication.
It is s... | orbkit/orbkit | examples/detci/lih_example.py | Python | lgpl-3.0 | 8,070 | [
"Psi4"
] | b45578d0bd848b49528c3dff91c2b703a306bb3d7c31b3440ad29eec38af560b |
""" test for RFIO plugin
"""
#FIXME: doesn't work ATM
from __future__ import print_function
import unittest
import time
import os
import shutil
import mock
from DIRAC import S_OK
from DIRAC.Resources.Storage.test.Test_FilePlugin import mock_StorageFactory_getConfigStorageOptions, \
... | fstagni/DIRAC | Resources/Storage/test/FIXME_Test_RFIOPlugIn.py | Python | gpl-3.0 | 31,667 | [
"DIRAC"
] | 6226bc203e94ce5e123620a3cd0a2c59d32d70dc30457fb4688f8702e6c2b254 |
"""
Course Outline page in Studio.
"""
from bok_choy.javascript import js_defined, wait_for_js
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from selenium.webdriver.support.ui import Select
from common.test.acceptance.pages.studio.container import ContainerPage
from common.tes... | msegado/edx-platform | common/test/acceptance/pages/studio/overview.py | Python | agpl-3.0 | 12,915 | [
"VisIt"
] | 381f66da446caf6f3c3e42576274152f9a2562531eddc514c62fcb5268598d1d |
"""Test generation helpers
Intended to functionalize common tasks when working with the pytest_generate_tests hook.
When running a test, it is quite often the case that multiple parameters need to be passed
to a single test. An example of this would be the need to run a Provider Add test against
multiple providers. W... | jkandasa/integration_tests | cfme/utils/testgen.py | Python | gpl-2.0 | 14,588 | [
"VisIt"
] | d3123be4aa9aaf6ab2c22d03308ade7b2b60d0680b69abd66f00f473340475d0 |
"""
Class that holds a fit page state
"""
# TODO: Refactor code so we don't need to use getattr/setattr
################################################################################
# This software was developed by the University of Tennessee as part of the
# Distributed Data Analysis of Neutron Scattering Experimen... | SasView/sasview | src/sas/sascalc/fit/pagestate.py | Python | bsd-3-clause | 57,173 | [
"Gaussian"
] | 8008037c33584ec1bd23ff25232a5c86bcdc537a380671d39dd3eeb0a588b15b |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-proxy-init.py
# Author : Adrian Casajus
########################################################################
__RCSID__ = "$Id$"
import sys
import os.path
import DIRAC
from DIRAC.Core.Base i... | Sbalbp/DIRAC | FrameworkSystem/scripts/dirac-proxy-info.py | Python | gpl-3.0 | 5,770 | [
"DIRAC"
] | 2be17bfb51e61c0ab6f74f17971e961bad0958238c214b744fd0ae28d93e024e |
#!/usr/bin/env python
"""
Creates a simple testing dataset that will be
easily verifiable after import
Contents:
----------
* Two fake Lausanne atlases, consisting of labeled cubes
* scale60.nii.gz
* scale33.nii.gz
"""
import numpy as np
import nibabel as nib
from scipy.io.matlab import savemat
from gzip imp... | mattcieslak/DSI2 | tests/create_testing_data.py | Python | gpl-3.0 | 15,845 | [
"Mayavi"
] | fc7517ad68f27e150cb1d3231c133b30776ac045076ab176e6b45a9141c3dcac |
"""The suite of window functions."""
import operator
import warnings
import numpy as np
from scipy import linalg, special, fft as sp_fft
__all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall',
'blackmanharris', 'flattop', 'bartlett', 'hanning', 'barthann',
'hamming', 'kaiser',... | pizzathief/scipy | scipy/signal/windows/windows.py | Python | bsd-3-clause | 74,101 | [
"Gaussian"
] | 9c3396303deaabcca2727b9670c670643e0adf9f4d35e8d2f63da0a42fd5ce24 |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/pbc/df/test/test_mdf.py | Python | apache-2.0 | 8,245 | [
"PySCF"
] | a6f8987e951d6908adeb1515f8e926a697b353ac397fe71fc327fa0beffc8489 |
# -*- coding: utf-8 -*-
#
# City Energy Analyst documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 31 15:57:58 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated... | architecture-building-systems/CEAforArcGIS | docs/conf.py | Python | mit | 10,414 | [
"VTK"
] | d1f0b3d2526b8f6ec7da732ee79e7b965e78bfd3062eb540236392e40bd0089a |
################################################################################
# #
# Copyright (C) 2010-2017 The ESPResSo project #
# ... | KonradBreitsprecher/espresso | doc/tutorials/06-active_matter/SOLUTIONS/enhanced_diffusion.py | Python | gpl-3.0 | 5,411 | [
"ESPResSo"
] | d5cad2fa59f832c48f0333367376b9e7a70122e1c3db02f66e64c6b602338f5a |
import utils.dave_logger as logging
from astropy.modeling.models import Const1D, Gaussian1D, Lorentz1D
from astropy.modeling.powerlaws import PowerLaw1D, BrokenPowerLaw1D
from stingray.modeling import ParameterEstimation, PSDLogLikelihood
import scipy.stats
# get_astropy_model:
# Returns an astropy.models object fro... | StingraySoftware/dave | src/main/python/utils/model_helper.py | Python | apache-2.0 | 7,734 | [
"Gaussian"
] | 10ae29ebf0c7a487807f0d2466055073baf1be5694d8a7ea32e3274e9547c6f4 |
""" DIRAC FileCatalog Security Manager mix-in class with full access checks
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import os
from DIRAC import S_OK
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.SecurityManager.Sec... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/SecurityManager/FullSecurityManager.py | Python | gpl-3.0 | 2,718 | [
"DIRAC"
] | 9a164288c2bfb5457c827da9ec6fe4a91cf70e5d866768cac76153d7cbe82b1e |
"""XML-RPC Servers.
This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.
It can also be used to handle XML-RPC requests in a CGI
environment using CGIXMLRPCRequestHandler.
The Doc* classes can be... | MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.0/Lib/xmlrpc/server.py | Python | mit | 31,664 | [
"Brian"
] | 52f7d4645d92bd4d4b3f1f38610d2d5a7c1fe15435a1c4d29a7b901f1d72b0b9 |
#!/usr/bin/python
import argparse
import cmd
import codecs
import datetime
import json
import sys
import textwrap
import uuid
from . import config
from . import validation
sd = {}
def add_argument(con_text=None, prem_text=None, con_id=None, prem_id=None):
"""
Syntactic sugar to create an argument structure ... | siwells/SADFace | tools/python/sadface/sadface.py | Python | gpl-3.0 | 37,097 | [
"Cytoscape"
] | 166793e62fb180cd9c0bdad6b19d2267607b0093087ff1dae687203ddb464139 |
"""
Find intermediate evalutation results in assert statements through builtin AST.
This should replace oldinterpret.py eventually.
"""
import sys
import ast
import py
from _pytest.assertion import util
from _pytest.assertion.reinterpret import BuiltinAssertionError
if sys.platform.startswith("java"):
# See htt... | ktan2020/legacy-automation | win/Lib/site-packages/pytest-2.3.4-py2.7.egg/_pytest/assertion/newinterpret.py | Python | mit | 12,258 | [
"VisIt"
] | 238d5ac5cfcf3672c0204721be037d615731e14ac791b531e41ff61f5fb77446 |
"""Functions for processing version numbers.
@since: 1.13
"""
# Copyright (C) 2012, Thomas Leonard
# See the README file for details, or visit http://0install.net.
import re
from zeroinstall import SafeException, _
_version_mod_to_value = {
'pre': -2,
'rc': -1,
'': 0,
'post': 1,
}
# Reverse mapping
_version_va... | michel-slm/0install | zeroinstall/injector/versions.py | Python | lgpl-2.1 | 3,432 | [
"VisIt"
] | b4b67272c7e00f7594196d9eb41740c2c0b7243a0d6de0a77683dc9bdd11e30c |
# 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... | capoe/espressopp.soap | src/FixedTupleListAdress.py | Python | gpl-3.0 | 2,954 | [
"ESPResSo"
] | ec020d7483fcca6a860a79904d56be4aa95e72c79dd65acbb6fc81d64de0db8f |
from __future__ import division
import numpy as np
from numpy import newaxis as na
import itertools, collections, operator, random, abc, copy
from matplotlib import pyplot as plt
from matplotlib import cm
from warnings import warn
from basic.abstractions import Model, ModelGibbsSampling, \
ModelEM, ModelMAPEM,... | bikash/pyhsmm | models.py | Python | mit | 44,437 | [
"Gaussian"
] | 9104e7978ad82d60079b0e4dce241c5041b08fca943bd036f7bcf7a004dae770 |
import os
import ctypes
import numpy
_cint = numpy.ctypeslib.load_library('libcint', os.path.abspath(os.path.join(__file__, '../../build')))
from pyscf import gto, lib
mol = gto.M(atom='''H 0 0 0;
H .2 .5 .8;
H 1.9 2.1 .1;
H 2.0 .3 1.4''',
basis = {'H': gto.basis.pars... | sunqm/libcint | testsuite/test_int2e_f12_etc.py | Python | bsd-2-clause | 3,852 | [
"PySCF"
] | 034bd7bf21d378ff40108ffde79392f47e8da2d4c2174609c2d91cb00345295d |
# Copyright 2014-2015 Novartis Institutes for Biomedical Research
# 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 applic... | Novartis/railroadtracks | src/model/aligners.py | Python | apache-2.0 | 50,362 | [
"BWA",
"Bowtie"
] | e02cbd8763cc9dceb1e136e5a0a9a82bc661c7ea2059b005b635b274ad7bb0e9 |
# (C) British Crown Copyright 2013 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | decvalts/iris | lib/iris/tests/test_pp_module.py | Python | gpl-3.0 | 20,455 | [
"Brian"
] | d2d01cc86194e465e99c92cf4f5a89fc404348806e735e7648203896261d9351 |
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import os
import re
import pyte... | resmo/ansible | test/units/galaxy/test_api.py | Python | gpl-3.0 | 31,934 | [
"Galaxy"
] | 37eb090b9e66699050251e0998cc539141cd428e55dcefc6fee3b863bdaab456 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Simone Donadello
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | simondona/img-fft-filter-bec-tn | libraries/imagelab.py | Python | gpl-3.0 | 47,424 | [
"Gaussian"
] | 9c6d47adf746fc4eeea5ba0065e642f5fce88da965171fe9bbc400849b1e66fd |
# Version: 0.18
"""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, 3.6, and pypy
* [![Latest Version]
... | wheeler-microfluidics/mr-box-peripheral-board.py | versioneer.py | Python | mit | 68,688 | [
"Brian"
] | f740459b8ea2e5ae44df27bd687ea63bd00da0dbf69931b99c0772a2b2bec4ab |
"""
Support code for 0alias scripts.
@since: 0.28
"""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import _, SafeException
from zeroinstall import support
_old_template = '''#!/bin/sh
if [ "$*" = "--versions" ]; then
exec 0launch -gd '%s' "$... | dsqmoore/0install | zeroinstall/alias.py | Python | lgpl-2.1 | 3,113 | [
"VisIt"
] | cb8792d301a8d2fff4508e88c5b93dc3a7637c1d9d3b0a11303141ca932fa223 |
# ---==============================================---
# ---======== Directory and File Structure ========---
# ---==============================================---
# The following parameters describe the location of the required input and eventual output files.
# Note that Morph directories must be specified, even fo... | matty-jones/MorphCT | tests/assets/update_pickle/MCT3.0_pickle/code/MCT3.0_pickle_par.py | Python | gpl-3.0 | 16,470 | [
"Gaussian",
"ORCA"
] | 8b1911e4abec50f51d82f3a187a12f19ab7fe0b12c281c0784c4f6ea6340094d |
"""Passport and Visit entity
Revision ID: 503ad9403152
Revises: None
Create Date: 2015-06-14 21:36:29.185951
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from sqlalchemy.schema import DDL
# revision identifiers, used by Alembic.
revision = '503ad9403152'
down_revision... | arsgeografica/kinderstadt-registry | registry/migrations/versions/503ad9403152_passport_and_visit_entity.py | Python | gpl-3.0 | 2,185 | [
"VisIt"
] | 39e9843851c654516a4b4e48e6e1c0709a7b5c9c7d33fa80f7b3f716973f4ce8 |
from lib.loghelper import Logger
import numpy as np
def visitPebbleMetrics(visitMetrics, visitobj):
visit = visitobj['visit']
pebbles = visitobj['pebbles']
pebbleCrossSections = visitobj['pebbleCrossSections']
channelUnits = visitobj['channelUnits']
# ChampMetricVisitInformation.AvgFastWaterCo... | SouthForkResearch/CHaMP_Metrics | tools/auxmetrics/metriclib/pebbleMetrics.py | Python | gpl-3.0 | 8,472 | [
"VisIt"
] | 3b24529f200ef87d9b969728bd2019118c760b2055959798501524d54b8b29b9 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Development script to test the algorithms of all the model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "2.0"
__maintainer__ = "David ... | materialsproject/pymatgen | dev_scripts/chemenv/test_algos_all_geoms.py | Python | mit | 4,618 | [
"pymatgen"
] | 0c7b7091e484516e2743509672ef081abef1e1ecf2e859fffb8462bbae18bc09 |
# -*- coding: utf-8 -*-
"""
Acceptance tests for Video.
"""
from nose.plugins.attrib import attr
from unittest import skipIf, skip
from ..helpers import UniqueCourseTest, is_youtube_available, YouTubeStubConfig
from ...pages.lms.video.video import VideoPage
from ...pages.lms.tab_nav import TabNavPage
from ...pages.lms... | DefyVentures/edx-platform | common/test/acceptance/tests/video/test_video_module.py | Python | agpl-3.0 | 38,300 | [
"VisIt"
] | 457031d8cda76841a9a1ab9ac8ff1823d1fa2748f370c309d20c1e9240efec98 |
import importlib, re
def http_to_https(url):
if url.startswith("http://"):
return url.replace("http://", "https://", 1)
return url
def cdn_url_to_http(url):
if url.startswith("//"):
return "http://" + url.lstrip("//")
return url
# TODO: rename to work with methods too
def import_class... | AlJohri/craigslist | craigslist/utils.py | Python | mit | 2,088 | [
"VisIt"
] | 154a57f79fdbcd9e806c76879c85bb723e89e26ac37473209989a3d226bdc423 |
#
# 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 n... | lhfei/spark-in-action | spark-2.x/src/main/python/sql/datasource.py | Python | apache-2.0 | 9,077 | [
"COLUMBUS"
] | 6bb2315ce91afd4beb13864407d2bc822eaffd651d66c2396e1ba9e48c1f00f5 |
''' Utility Class for threaded agents (e.g. TransformationAgent)
Mostly for logging
'''
from DIRAC import gLogger
__RCSID__ = "$Id$"
AGENT_NAME = ''
class TransformationAgentsUtilities( object ):
''' logging utilities for threaded TS agents
'''
def __init__( self ):
''' c'tor
'''
self.transIn... | avedaee/DIRAC | TransformationSystem/Agent/TransformationAgentsUtilities.py | Python | gpl-3.0 | 1,834 | [
"DIRAC"
] | 646ba2d6ffd381a0fbe5077e87f2812c64d9b8c6ede36825c946779096990c18 |
"""
This is the Data Integrity Client which allows the simple reporting of
problematic file and replicas to the IntegrityDB and their status
correctly updated in the FileCatalog.
"""
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.DataManagementSystem.Client.DataManag... | fstagni/DIRAC | DataManagementSystem/Client/DataIntegrityClient.py | Python | gpl-3.0 | 8,812 | [
"DIRAC"
] | 370fe1d4b49b622ccccfda9e14a6bd781bcf29151e8859213e8a25ab1924ab96 |
"""
XElement is a DOM that makes sense for Python. We use the SAX interface to
build the XElement tree.
"""
import string
import sys
import types
from xml.sax import saxexts
from xml.sax import saxlib
from UserStack import UserStack
class XAttributes:
def __init__(self, attrs=None):
self.attributes = {}... | aarestad/gradschool-stuff | xml-class/python-xml/PhoneBookValidatingDemo/xelement.py | Python | gpl-2.0 | 11,051 | [
"VisIt"
] | 1e238c442328fce24ba571803ed31f4cea7ef41a09d14a86f0ce39da4410db3f |
"""
Split a sequence into a set of stills.
Example:
dials.sequence_to_stills sequence.expt sequence.refl
"""
from __future__ import annotations
import logging
from dxtbx.model import MosaicCrystalSauter2014
from dxtbx.model.experiment_list import Experiment, ExperimentList
from libtbx.phil import parse
from sci... | dials/dials | command_line/sequence_to_stills.py | Python | bsd-3-clause | 9,507 | [
"CRYSTAL"
] | c262fde75b5c5e69ddcf6313b97f27c5d515917e1e86694cf27a113eb2a03a11 |
'''pymolprobity: A MolProbity plugin for PyMOL
REQUIREMENTS
The PyMOLProbity Plugin depends on programs from the Richardson lab at Duke
University, which must be installed locally. These programs, Reduce,
Prekin, Flipkin, and Probe, are available for download from the Richardson
lab website:
... | jaredsampson/pymolprobity | pymolprobity/__init__.py | Python | mit | 1,757 | [
"PyMOL"
] | 8c8e2a96b81e20ef518383ebbd312d8469d83309a476ee1697efc8d99540d6e1 |
import lie_group_diffeo as lgd
import odl
import numpy as np
action_type = 'geometric'
transform_type = 'affine'
space = odl.uniform_discr([-1, -1], [1, 1], [101, 101], interp='linear')
coord_space = odl.uniform_discr([-1, -1], [1, 1], [101, 101], interp='linear').tangent_bundle
# Select deformation type of the targ... | adler-j/lie_grp_diffeo | examples/diffemorphism_2d_shepp_regularized.py | Python | gpl-3.0 | 3,610 | [
"Gaussian"
] | 7da93cd1d42acef960b2b5c0743e76770788f73063b8867eb9d6914e753689c4 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
A module to perform experimental thermochemical data analysis.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping O... | dongsenfo/pymatgen | pymatgen/analysis/thermochemistry.py | Python | mit | 3,277 | [
"pymatgen"
] | 7536cc05bf05b8a5cbb8f5409b7820678675d8a937e12224b6575bcec5d79591 |
# compartment_net.py ---
#
# Filename: compartment_net.py
# Description:
# Author:
# Maintainer:
# Created: Sat Aug 11 14:30:21 2012 (+0530)
# Version:
# Last-Updated: Sun Aug 12 15:45:38 2012 (+0530)
# By: subha
# Update #: 521
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
# A dem... | dilawar/moose-full | moose-examples/snippets/compartment_net.py | Python | gpl-2.0 | 5,676 | [
"MOOSE",
"NEURON"
] | 821ee67c246e8ed776c911caec497bf489b4ba582d944f4b192f5f5778e7d240 |
import time
from xml.etree.ElementTree import Element as e, SubElement as se
from xml.etree import ElementTree
from xml.dom import minidom
import pickle as pickle
import collections
class OrderedSet(collections.MutableSet):
def __init__(self, iterable=None):
self.end = end = []
end += [None, en... | KaliLab/optimizer | optimizer/optionHandler.py | Python | lgpl-2.1 | 19,887 | [
"Gaussian"
] | 4c8cf44b716dd4535ac7094d5a7fa18552d6582f9c553f4c652f24ba63ccec98 |
import sys
sys.path.append('..')
from gir import Gdk, Gtk, cairo
SIZE = 30
def triangle(ctx):
ctx.move_to(SIZE, 0)
ctx.rel_line_to(SIZE, 2 * SIZE)
ctx.rel_line_to(-2 * SIZE, 0)
ctx.close_path()
def square(ctx):
ctx.move_to(0, 0)
ctx.rel_line_to(2 * SIZE, 0)
ctx.rel_line_to(0, 2 * SIZE)
ctx.rel_line_to(-2 * ... | pombreda/pygir-ctypes | examples/example3.py | Python | bsd-3-clause | 2,396 | [
"Bowtie"
] | 0b4a89b1a4e4b96723223f5db25a97205c9f5ca01345e93294fe21e516b1db6b |
#!/usr/bin/env python
colors = ['read', 'green', 'blue']
print colors[0]
print colors[1]
print colors[2]
for str1 in colors:
print str1
squares = [1, 2, 3, 4, 5]
sum = 0
for num in squares:
sum += num
print sum
list = ['larry', 'curly', 'moe']
if 'larry' in list:
print "in this list"
| DeercoderPractice/python | practice0/pyList.py | Python | mit | 294 | [
"MOE"
] | 3352b02900255fa6e98191bf833c1a31c126e1b9f1a37dcb00ead0c1cbcbeaab |
"""
Copyright (c) 2009 John Markus Bjoerndalen <jmb@cs.uit.no>,
Brian Vinter <vinter@nbi.dk>, Rune M. Friborg <rune.m.friborg@gmail.com>.
See LICENSE.txt for licensing details (MIT License).
"""
import sys
from pycsp_import import *
elements = 64
@process
def element(this_read, next_write):
while True:
... | runefriborg/pycsp | examples/MultipleTokenRing.py | Python | mit | 1,775 | [
"Brian"
] | fdd31daa5dab9fe7f31c29c941f2094f918b166e6e2dcb129e25198b9907a610 |
# -*- coding: utf-8 -*-
# xbmctr MEDIA CENTER, is an XBMC add on that sorts and displays
# video content from several websites to the XBMC user.
#
# Copyright (C) 2011, Dr Ayhan Colak
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | noba3/KoTos | addons/plugin.video.magicTR/resources/lib/cozuculer.py | Python | gpl-2.0 | 27,652 | [
"VisIt"
] | a805909dd4c69e0b6f638b76562c2c1ae043ee27d14f6c676a847038711189ce |
from __future__ import absolute_import
from __future__ import division
import logging
import time
import functools
import random
import warnings
import json
from tornado.ioloop import PeriodicCallback
import tornado.httpclient
import tornado.gen
from ._compat import integer_types
from ._compat import iteritems
from ... | bitly/pynsq | nsq/reader.py | Python | mit | 32,057 | [
"BLAST"
] | f1ed53577fa49361638c5e46da627937a30026089f8e09b931e89361198ed5a5 |
#!/usr/bin/env python
'''
revised at 11/24/2013
note:
The .py file mainly designed to deal with 5 different situations: 1.the gnd and galF on same contig; 2.the two genes on different contigs;
3.the two genes on different contigs, and gnd gene is splitted by two contigs; 4.the two genes on different contigs, and... | denglab/SeqSero | libs/Otype_determine_analysis.py | Python | gpl-2.0 | 34,096 | [
"BLAST"
] | 1ec99372e0135cdf815d8e2b505d53253dc25139d238abe296f321c7b6d876d0 |
"""Bowtie exceptions."""
class YarnError(Exception):
"""Errors from ``Yarn``."""
class WebpackError(Exception):
"""Errors from ``Webpack``."""
class SizeError(Exception):
"""Size values must be a number."""
class GridIndexError(IndexError):
"""Invalid index into the grid layout."""
class NoUnu... | jwkvam/bowtie | bowtie/exceptions.py | Python | mit | 811 | [
"Bowtie"
] | dfcb26ec27e3ea4c74b2b9ca586cd194f89d1a4f029129665e40a7627dc452ea |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import math
import warnings
import numpy as np
from . import solver, terms
from .modeling import ModelSet, ConstantModel
__all__ = ["GP"]
class GP(ModelSet):
"""The main interface to the celerite Gaussian Process solver
Args:
... | dfm/celerite | celerite/celerite.py | Python | mit | 19,496 | [
"Gaussian"
] | 8c11af308887f2614ccf87026bce209de67df64b3116961dad4c9fdbdbfde920 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import pytest
from nose.tools import * # noqa: F403
from osf_tests import factories
from tests.base import OsfTestCase
from website.util import api_url_for
from website.views import find_bookmark_collection
@... | Johnetordoff/osf.io | osf_tests/test_search_views.py | Python | apache-2.0 | 15,204 | [
"Brian"
] | 615e07dd6072e78bbab17e635073ff668a9382b778be250aa5604652377cea64 |
import numpy as np
from ase.io.pupynere import NetCDFFile
# Write array
a1 = np.random.rand(5, 5)
a2 = a1 * 2 - 5
nc = NetCDFFile('test.nc', 'w')
nc.createDimension('dimx', a1.shape[0])
nc.createDimension('dimy', a1.shape[1])
nc.createVariable('matrix1', 'd', ('dimx', 'dimy'))[:] = a1
nc.createVariable('matrix2', 'd',... | grhawk/ASE | tools/ase/test/fio/netcdf.py | Python | gpl-2.0 | 524 | [
"ASE"
] | a8cb6bd20151721af8e326d891da5507ef6d0e719b975aa7cfd796b659542465 |
#!/usr/bin/env python
'A model of the earth and its magnetic field, with earth center as origin.'
from __future__ import division # avoid integer division
import numpy as np
import mayavi
from mayavi.mlab import *
def makeRcoordinates(x,y,z):
'''Makes r length and r^hat from coordinates'''
r = np.sqrt(x**2 + ... | arve0/TFY4240-Semester-project | src/mag_field_quiver.py | Python | mit | 3,046 | [
"Mayavi"
] | b014fc9f1914f216a067f8c76ca24c4a072daa5961131388a6a6265066ff2117 |
# -*- coding: utf-8 -*-
"""
=====================
Statistical inference
=====================
Here we will briefly cover multiple concepts of inferential statistics in an
introductory manner, and demonstrate how to use some MNE statistical functions.
.. contents:: Topics
:local:
:depth: 3
"""
# Authors: Eric ... | mne-tools/mne-tools.github.io | 0.17/_downloads/c9f0d27ccf7f2c25e1415377a13840a6/plot_background_statistics.py | Python | bsd-3-clause | 29,342 | [
"Gaussian"
] | 450f8f1ad79126b65d1f62c8725e1064da593203dfbfac3761e4e47c4b25bd12 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | psci2195/espresso-ffans | testsuite/python/reaction_ensemble.py | Python | gpl-3.0 | 8,831 | [
"ESPResSo"
] | fba001329b752eea0c3bd1424ff3e204b84a792ea6003d3d5af2a262a6ecd694 |
#
# Copyright 2013 The Regents of The University California
#
# 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 applicab... | ThomasDq/sparrowBenchmark | deploy/ec2/ec2_exp.py | Python | apache-2.0 | 28,141 | [
"VisIt"
] | a52d27357a68223812f29eacbb3179eac0bd2744fa632f9575d93e036187a153 |
#!/usr/bin/env python2
# * **************************************************************** **
# File: compiler.py
# Requires: Python 2.7+ (but not Python 3.0+)
# Note: For history, changes and dates for this file, consult git.
# Author: Brian Danilko, Likeable Software (brian@likeablesoftware.com)
# Copyright 2015-201... | Bdanilko/EdPy | src/lib/compiler.py | Python | gpl-2.0 | 92,632 | [
"Brian"
] | db999844b36446f9f3cb20e285cf134dfc6694c727ea29c35d256e9a9a5a0d0c |
#generic python modules
import argparse
import operator
from operator import itemgetter
import sys, os, shutil
import os.path
##########################################################################################
# RETRIEVE USER INPUTS
###############################################################################... | jhelie/leaflets_ratio | leaflets_ratio.py | Python | gpl-2.0 | 14,639 | [
"MDAnalysis"
] | caa2f84b0345aa478fd76044ae8072cf7441541425edbcb7dfb895a3fa273409 |
"""
This is a script to build the NetPyNE html documentation
All steps should be executed from netpyne/doc
The following are required:
1) Sphinx documentation generator: https://www.sphinx-doc.org/en/master/
2) Sphinx RTD Theme
3) Autodoc summary table: https://autodocsumm.readthedocs.io/en/latest/index.html
4) Wheel... | Neurosim-lab/netpyne | doc/build.py | Python | mit | 4,489 | [
"NEURON"
] | c785e37e1cce081e7356451888ab39c13036492d9f63e0d69a03ffb921a563e9 |
import numpy as np
from gpaw.test import equal
from gpaw.utilities.lapack import sqrt_matrix
# check sqrt of a matrix
A = [[20, 4], [4, 1]]
a = [[4.4, .8], [.8, .6]]
A = np.array(A, float)
print 'A=', A
a = np.array(a)
b = sqrt_matrix(A)
print 'sqrt(A)=', b
equal(((a-b)**2).sum(), 0, 1.e-12)
| qsnake/gpaw | gpaw/test/lapack.py | Python | gpl-3.0 | 296 | [
"GPAW"
] | 857aa8644e36da2333be6ee1c2ed011bf0a9e832cc6af54afd0beac6ac317b39 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.