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 |
|---|---|---|---|---|---|---|---|
# Copyright (C) 2008 University of Maryland
# All rights reserved.
# See LICENSE.txt for details.
# Author: Christopher Metting
#Starting Date:6/5/2009
from numpy import size,array,shape,indices, searchsorted, linspace
from numpy import log, log10, abs, min, max, nonzero,isnan
from .zoom_colorbar import *
import sys,c... | reflectometry/osrefl | osrefl/viewers/view.py | Python | bsd-3-clause | 6,038 | [
"Mayavi"
] | 06d982a0b68d5dea4c61ca1c10c6b25236a7e0520148f1c85d9383a0c0386039 |
# -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from .fake_webapp import EXAMPLE_APP
class MouseInteractionTest(object):
def test_mouse_over(self):
"Should be able to per... | bmcculley/splinter | tests/mouse_interaction.py | Python | bsd-3-clause | 2,108 | [
"VisIt"
] | 9a1b3a61145c0a8bcc1ce14e4528bf2b9a2ecf2d8d072bc596a1bf59155bdfe2 |
import warnings
from tvtk.api import tvtk
from tvtk import messenger
from traits.api import HasTraits, Any, Callable, Property, Instance, \
Bool, Enum, Int, on_trait_change
from numpy import arange, zeros, ascontiguousarray, reshape, uint8, any
from enable.api import AbstractWindow, MouseEvent, KeyEvent, \
... | tommy-u/enable | enable/vtk_backend/vtk_window.py | Python | bsd-3-clause | 20,351 | [
"VTK"
] | a62a8e0426237aae83e8d0937598fc0857d5fc53abbb5306abf13ed7d365823a |
# ##########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2008, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License vers... | zenoss/ZenPacks.zenoss.CloudFoundry | ZenPacks/zenoss/CloudFoundry/tests/__init__.py | Python | gpl-2.0 | 561 | [
"VisIt"
] | 5efb74ddb8bdd42a858bfe3442352ffdc41984b7e37d40f13e8f43cd4aa3c6e3 |
# This is a Makefile for the `mk` tool. (Limited) details for that here:
# <http://svn.openkomodo.com/openkomodo/browse/mk>
import sys
import os
from os.path import join, dirname, normpath, abspath, exists, basename
import re
from glob import glob
import codecs
import webbrowser
import mklib
assert mklib.__version_i... | gogobook/django-markdown-deux | Makefile.py | Python | mit | 21,742 | [
"VisIt"
] | 0f65980a8e1705e787b951fb06ea2e8001c2536d13aa864913d60254b562a2d8 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Show the constant kernel. Smooth an impulse function.
s1 = vtk.vtkImageCanvasSource2D()
s1.SetScalarTypeToFloat()
s1.SetExtent(0,255,0,255,0,0)
s1.SetDrawColor(0)
s1.FillBox(0,255,... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Imaging/Core/Testing/Python/TestCorrelation.py | Python | gpl-3.0 | 916 | [
"VTK"
] | 2f040f227e96d59e4282ca1fed62d591a657c1911f39ee21b2fd0a8623f642f9 |
#! /usr/bin/env python
"""
Functions for calculating the statistical significant differences between two dependent or independent correlation
coefficients.
The Fisher and Steiger method is adopted from the R package http://personality-project.org/r/html/paired.r.html
and is described in detail in the book 'Statistical... | JomnTAL/spp-wordsim | corrstats.py | Python | gpl-3.0 | 8,178 | [
"MOE"
] | b3abf4e767b162382c6f0a21f83091609533e731c67ec5da3700401b6a198c11 |
#!/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... | nuclear-wizard/moose | tutorials/darcy_thermo_mech/step10_multiapps/problems/step10micro.py | Python | lgpl-2.1 | 2,884 | [
"MOOSE",
"VTK"
] | 39548be4e1071e3abd86d4c0b2f1ccab2a0a546790f5ba5e1aeab40af9b29020 |
#!/usr/bin/env python
#==========================================================================
# Original "Mindy.py" copyright: Kumaran Santhanam
# <kumaran@alumni.stanford.org>
#
# Subsequent butchery, demork.py: Mike Hoye
# <mhoye@off.net>
#
# Just t... | KevinGoodsell/mork-converter | other/demork.py | Python | gpl-2.0 | 14,148 | [
"CRYSTAL"
] | 98e71459174148337bf4b800d0b6b497f216b602c7712cc80d4d74e16d99dbab |
#!/usr/bin/env python
#
# Copyright 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | arjunkumarbs/Test | web-service/main.py | Python | apache-2.0 | 13,560 | [
"ADF"
] | 1ceb022e561a65762d1b253984e44ea5dab322a607b6c97bb702b666951e84eb |
#!/usr/bin/env python
#
# $File: InfoEval.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute i... | BoPeng/simuPOP | docs/InfoEval.py | Python | gpl-2.0 | 1,541 | [
"VisIt"
] | ccf866ef8e066caade563ac2b742bc701d94104d759863449f7e4ac36a7b4241 |
# -*- coding: utf-8 -*-
"""owyl -- Owyl Behavior Trees
Behavior Trees are a form of U{hierarchical
logic<http://aigamedev.com/hierarchical-logic>}, and are quite useful
and flexible for implementing game AI.
Owyl implements a behavior tree using nested iterators/generators. A
top-level generator function, L{visit} (i... | eykd/owyl | src/owyl/__init__.py | Python | bsd-3-clause | 2,379 | [
"VisIt"
] | deed195b75f23395652e0ec98ec3a2ec6673737050367609c3c785aa73eeaad9 |
# coding: utf-8
"""Tools and helper functions for abinit calculations"""
from __future__ import unicode_literals, division, print_function
import os
import six
import collections
import shutil
import operator
import numpy as np
from fnmatch import fnmatch
from six.moves import filter
from monty.string import list_str... | Dioptas/pymatgen | pymatgen/io/abinitio/utils.py | Python | mit | 23,463 | [
"ABINIT",
"NetCDF",
"pymatgen"
] | 99f73efa3e089c18f97cb573e2d817296195e681ebb14a04369a5586778e923c |
import logging
from custom.bihar.calculations.utils import xmlns
VISIT_TYPES = {
'bp': xmlns.BP,
'del': xmlns.DELIVERY,
'pnc': xmlns.PNC,
'eb': xmlns.EBF,
'cf': xmlns.CF,
'reg': xmlns.REGISTRATION,
}
def visit_is(action, visit_type):
"""
for a given action returns whether it's a visi... | qedsoftware/commcare-hq | custom/bihar/calculations/utils/visits.py | Python | bsd-3-clause | 1,296 | [
"VisIt"
] | 9c11d9010799d1d7bef699734ed83b92619483a23d8ee481a11e582130fd50fc |
# -*- 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... | maxamillion/ansible | test/units/galaxy/test_api.py | Python | gpl-3.0 | 47,350 | [
"Galaxy"
] | d88f846ddd854b87b68f84cbdab04fffe541ebcd9afcc38454532bb78a6502e7 |
# -*- coding: utf-8 -*-
"""Constants for PyBEL tests."""
import logging
import re
import unittest
from json import dumps
from pybel import BELGraph
from pybel.canonicalize import edge_to_bel
from pybel.constants import (
ANNOTATIONS,
ASSOCIATION,
CITATION,
CITATION_TYPE_PUBMED,
DECREASES,
DIR... | pybel/pybel | tests/constants.py | Python | mit | 21,205 | [
"Pybel"
] | 6c8ce3f636bb94b522de9b2ed795e55dfd4f99e0c766caf3f6ad00c2d6703a39 |
import parabem
from parabem.pan3d import doublet_src_3_0_vsaero, src_3_0_vsaero_v
from parabem.vtk_export import VtkWriter
import numpy
from parabem.utils import check_path
v1 = parabem.PanelVector3(-0.5, -0.5, 0)
v2 = parabem.PanelVector3(0.5, -0.5, 0)
v3 = parabem.PanelVector3(0.5, 0.5, 0)
v4 = parabem.PanelVector3(... | looooo/panel-method | examples/vtk/vtk_panel_source.py | Python | gpl-3.0 | 937 | [
"VTK"
] | 7430d3df4aaa04b98a0ca3e894c21f68668d2bada3b1bc72bf1f07159b4feb0f |
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Digi International Inc., All Rights Reserved.
#
import splinter_tests
from hamcrest import asse... | brucetsao/XBeeZigBeeCloudKit | splinter_tests/test_login.py | Python | mpl-2.0 | 6,153 | [
"VisIt"
] | cd7b588fa583bfea0181cbc23691248487d55b7c241e6b988cccbd2b86ce3822 |
# 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 PyAbipy(PythonPackage):
"""Python package to automate ABINIT calculations and analyze
... | LLNL/spack | var/spack/repos/builtin/packages/py-abipy/package.py | Python | lgpl-2.1 | 2,451 | [
"ABINIT",
"pymatgen"
] | d7f92600428a0bd27003dbe602ed2ecc7a7320f47e77b434487c571a511b2df0 |
#! /usr/bin/python
import ast
import yaml
class DefinitionVisitor(ast.NodeVisitor):
def __init__(self):
super(DefinitionVisitor, self).__init__()
self.functions = {}
self.classes = {}
self.names = {}
self.attrs = set()
self.definitions = {
'def': self.fu... | iot-factory/synapse | scripts-dev/definitions.py | Python | apache-2.0 | 4,613 | [
"VisIt"
] | b753bb8cb65b467a184d9bd2c9e87722c177dde0a3099254c9f08392fdd12132 |
"""Test if the NumPy array support for VTK data arrays works correctly.
The test requires that numpy (http://numpy.scipy.org) work.
Run this test like so:
$ vtkpython TestNumpySupport.py
or
$ python TestNumpySupport.py
"""
import sys
import vtk
from vtk.test import Testing
try:
import numpy
except ImportError:... | msmolens/VTK | Common/Core/Testing/Python/TestNumpySupport.py | Python | bsd-3-clause | 4,853 | [
"VTK"
] | 2749ec6a5bc6f951b98a9ec8c645d75ee63803c8834be376fc2faf94f007c0c8 |
# Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Common SearchIO utility functions."""
from Bio._py3k import basestring
def get_proces... | updownlife/multipleK | dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/SearchIO/_utils.py | Python | gpl-2.0 | 4,714 | [
"Biopython"
] | 39dfd469efbdfe5c5090b92c827119219ac4fa36aa41395d21f4712556cc6b0d |
#######################################
# pyGPGO examples
# gif_gen: generates a gif (the one in paper.md) showing how the BO framework
# works on the Franke function, step by step.
#######################################
import numpy as np
from pyGPGO.covfunc import matern32
from pyGPGO.acquisition import Acquisition... | hawk31/pyGPGO | examples/gif_gen.py | Python | mit | 2,570 | [
"Gaussian"
] | fb0cda509c15cb163d59787c365a48ff8b655cd3a91d1c7a7b1e36f8e5af7a29 |
#! /usr/bin/python3
import json, re
regulars = {
r'csko\.cz\s{1,3}\|\s{1,3}': '',
r'aim\s?' : 'aim',
r'awp' : 'aw',
r'b(?:ase)?\s?b(?:uilder)[+]XP\s?': 'bb',
r'bh(?:op)\s?' : 'bh',
r'cod:mw\s?' : 'cod',
r'(?:\.\s-\s1\s)?itemy?\s?': '',
r'\s?,\s?fymaps' : 'fy',
r'capture\s?the\s?fla... | Naruto0/csmenu | modules/generator.py | Python | mit | 5,689 | [
"ASE"
] | 88d2e1236f4ea35db0fe012ee25cdb0990a15452dc96696bec95b39653002ffc |
# Copyright (C) 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 versio... | KaiSzuttor/espresso | testsuite/scripts/samples/test_gibbs_ensemble.py | Python | gpl-3.0 | 1,116 | [
"ESPResSo"
] | 4a6f2b0374c3c935d5bbf909a6ab5ba869bf8b58292fe459b5b18a2e97dc5cb1 |
# Wrapper for pomegranate.GeneralMixtureModel
import sys
import numpy as np
from pomegranate import GeneralMixtureModel as GMM
import chippr
from chippr import defaults as d
from chippr import utils as u
class gmix(object):
def __init__(self, amps, funcs, limits=(d.min_x, d.max_x)):
"""
Object ... | aimalz/chippr | chippr/gmix.py | Python | mit | 4,165 | [
"Gaussian"
] | eea40d74b6f1e512c0462a6266be566f34ebf29695fd421998ea1a479872daf9 |
# This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
from __future__ import annotation... | DolphinDream/sverchok | utils/tree_walk.py | Python | gpl-3.0 | 5,208 | [
"VisIt"
] | 953e8a733701afff3824809c2b1a69d4041a01fc3165e326b7007f63829f2583 |
#!/usr/bin/python
"""
Copyright 2016 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 of th... | druss316/G-Harvestor | html/getWaypoints.py | Python | gpl-3.0 | 9,928 | [
"Galaxy"
] | 09da9dc7e83674bd70e5341186efbf07be86edc8d5a7c96b5e3c5fa5ae5f985d |
#!/usr/bin/env python
# This example demonstrates the use of fields and use of
# vtkProgrammableDataObjectSource. It creates fields the hard way (as
# compared to reading a vtk field file), but shows you how to
# interface to your own raw data.
import os
import re
import vtk
from vtk.util.misc import vtkGetDataRoot
V... | naucoin/VTKSlicerWidgets | Examples/DataManipulation/Python/FinancialField.py | Python | bsd-3-clause | 8,694 | [
"VTK"
] | a8376bd168f7e93104acf674581748f07ae0a230f953e373973177d4a3a13250 |
#!/usr/bin/python
#FILE DESCRIPTION=======================================================
#~ Python script used for foam case construction (as automatic, as
#~ possible)
#~
#~ NOTES:
#~ - mesh grading in z direction
#~ USAGE:
#~ - modify and run the script
#~ TO DO:
#LICENSE=======================... | MartinIsoz/CFD_oF | 04_perforatedPlate/20_noTextureZigZagPerforationV1/00_Scripts/caseConstructorMappedV1.py | Python | gpl-2.0 | 21,592 | [
"ParaView"
] | 46f6df65094f49190fce762e2965bddbe1c8f5545f85b38c7680c297efc97f95 |
"""
network.py
~~~~~~~~~
A module to implement the stochastic gradient descent learning
algorithm for a feedforward neural network. Gradients are calculated
using backpropagation. Note that I have focused on making the code
simple, easily readable, and easily modifiable. It is not optimized,
and omits many desirabl... | jonkrohn/study-group | neural-networks-and-deep-learning/src/network.py | Python | mit | 6,296 | [
"Gaussian",
"NEURON"
] | 8c49d5190ec704d7171a47a0331c062ba8b0c08654dfaf5ca25b6c6448fd694c |
"""
Function-like objects that creates cubic clusters.
"""
import numpy as np
from ase.cluster.factory import ClusterFactory
from ase.data import reference_states as _refstate
class HexagonalFactory(ClusterFactory):
spacegroup = 191
xtal_name = 'hexagonal'
def set_lattice_constant(self, latticeconstant)... | slabanja/ase | ase/cluster/hexagonal.py | Python | gpl-2.0 | 2,926 | [
"ASE",
"CRYSTAL"
] | a92adde4b213432c2cd0e22db6de21b2c5c7b9006e9e3ef2080505e07fc1fce0 |
#!/usr/bin/env python
__author__ = 'waroquiers'
import unittest
from pymatgen.analysis.chemenv.coordination_environments.voronoi import DetailedVoronoiContainer
from pymatgen.core.structure import Structure
from pymatgen.core.lattice import Lattice
import os
import shutil
import random
import numpy as np
from pymatg... | matk86/pymatgen | pymatgen/analysis/chemenv/coordination_environments/tests/test_voronoi.py | Python | mit | 9,600 | [
"pymatgen"
] | 9953ea18adf12a0403f4204e4301c20fc6b4feab92041029d766daec6dca10a8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def test_input_simple():
"""Test input for a simple computation using the `ROOT_SYM` keyword."""
import forte
import psi4
import pytest
psi4.geometry("""
Li
H 1 3.0
units bohr
""")
ref_efci_0 = -8.008550659909
ref_efci_1 = -7.... | evangelistalab/forte | tests/pytest/input/test_input_simple.py | Python | lgpl-3.0 | 1,497 | [
"Psi4"
] | 3950b75a074ab7c4b77b863e3eca22cbe279fa7194e0bb7ec6d154681b88b1e9 |
'''
This script performs forced photometry of individual Legacy Survey
images given a data release catalog.
'''
import os
import sys
import shutil
import numpy as np
import fitsio
from astrometry.util.fits import fits_table, merge_tables
from astrometry.util.file import trymakedirs
from astrometry.util.ttime import T... | legacysurvey/legacypipe | py/legacypipe/forced_photom.py | Python | bsd-3-clause | 47,405 | [
"Galaxy"
] | 65820e31a1c220ba37b616278258ccb6235e0023b81e01fb8b84a09dfb7be32c |
import re
import argparse
import urllib.request
from bs4 import BeautifulSoup
import optparse # remove this, it's deprecated in favor of argparse
import urllib2 # remove this too
"""
TODOS:
1. implement all city searching
2. add category selection, for now it's searching through "all for sale"
- implement different o... | sbedell/pyTools | craigslist.py | Python | gpl-2.0 | 5,043 | [
"COLUMBUS"
] | 106856f9e6de3f335cca2e036304bc382ee3ec9ec8d8d2c887d6820f03541c07 |
#! /usr/bin/env python
"""
Read data from a NetCDF file into a RasterModelGrid.
"""
try:
import netCDF4 as nc4
except ImportError:
import warnings
warnings.warn('Unable to import netCDF4.', ImportWarning)
from scipy.io import netcdf as nc
import os
import types
import re
import numpy as np
from landlab... | decvalts/landlab | landlab/io/netcdf/read.py | Python | mit | 5,059 | [
"NetCDF"
] | d5b17d018ba41ea3d52ee073f3da9a93301b4532de5d3ca37e84d0439e095ca6 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import csv
import argparse
import traceback
from jinja2 import Template
def main():
parser = argparse.ArgumentParser()
parser.prog = 'zscaler-config.bulder.py'
parser.description = "Script builds configuraiton templates for Zscaler servi... | eparra/zscaler-config-builder | zscaler-config-builder.py | Python | mit | 2,373 | [
"VisIt"
] | bbef9fa4b2faa289206635663eabf82f5cc7823d3631205c4505dadbef9efd83 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('patient', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='DayTemplate',
fields=[
... | Foxugly/medagenda | agenda/migrations/0001_initial.py | Python | gpl-3.0 | 2,453 | [
"VisIt"
] | d0d83e26db2f66c080190791421f648f09ad9a2f4b1c4db23b805995e3f231ba |
# https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.list_objects
"""
Configuration of an S3 storage
Like others, but in protocol S3 add:
* SecureConnection: true if https, false otherwise
* Aws_access_key_i... | ic-hep/DIRAC | src/DIRAC/Resources/Storage/S3Storage.py | Python | gpl-3.0 | 28,294 | [
"DIRAC"
] | fc20609e949d8e661f21f41998f70a99aeeac2daa7d74ad7c549e92a2f5f6d97 |
# cython: infer_types=True
#
# Tree visitor and transform framework
#
from __future__ import absolute_import
import inspect
from . import TypeSlots
from . import Builtin
from . import Nodes
from . import ExprNodes
from . import Errors
from . import DebugFlags
import cython
class TreeVisitor(object):
"""
... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/Cython/Compiler/Visitor.py | Python | agpl-3.0 | 27,055 | [
"VisIt"
] | ee5cc5396addc376fc720ed2ade77a704379b5345bdb54a9a65d4c250d81f76e |
# $Id$
#
# Copyright (C) 2001-2008 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code ... | rdkit/rdkit-orig | rdkit/ML/Cluster/UnitTestCluster.py | Python | bsd-3-clause | 3,664 | [
"RDKit"
] | dc8d42616aef27576b2b5a2b5114d383a97e95091d3e7106871f5817fa0efa20 |
# -*- coding: utf-8 -*-
# Copyright Neil Brown ©2016-2021 <neil@brown.name>
# May be distributed under terms of GPLv2 - see file:COPYING
#
# edlib module for working with "notmuch" email.
#
# Two document types:
# - search list: list of saved searches with count of 'current', 'unread',
# and 'new' messages
# - messag... | neilbrown/edlib | python/module-notmuch.py | Python | gpl-2.0 | 117,643 | [
"VisIt"
] | c7c87524c5fce47c919cf05a4c52319f19a44bcda72c5a971278f13bcf56d561 |
#
# @file TestRDFAnnotation2.py
# @brief fomula units data unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Ben Bornstein
#
# ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ======
#
# DO NOT EDIT THIS FILE.
#
# This file was generated automatically by converting the fi... | TheCoSMoCompany/biopredyn | Prototype/src/libsbml-5.10.0/src/bindings/python/test/annotation/TestRDFAnnotation2.py | Python | bsd-3-clause | 10,528 | [
"VisIt"
] | ffaecbd2b705084a075c4714fdc9f202752bd206253b0044c17535969548ed6a |
""" Aliases gather aliasing informations. """
from pythran.analyses.global_declarations import GlobalDeclarations
from pythran.intrinsic import Intrinsic, Class, NewMem
from pythran.passmanager import ModuleAnalysis
from pythran.syntax import PythranSyntaxError
from pythran.tables import functions, methods, MODULES
im... | hainm/pythran | pythran/analyses/aliases.py | Python | bsd-3-clause | 10,584 | [
"VisIt"
] | c95e812fec1963a5e2b05b9f6c9452cbb50151a27ebf275d98271fbd0714a937 |
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2010 (ita)
"""
Classes and functions required for waf commands
"""
import os, re, imp, sys
from waflib import Utils, Errors, Logs
import waflib.Node
# the following 3 constants are updated on each new release (do not touch)
HEXVERSION=0x1081000
"""Constant updat... | evancich/apm_motor | modules/waf/waflib/Context.py | Python | gpl-3.0 | 19,541 | [
"VisIt"
] | 638f04d6c657f9a39b1ccc8d95385b9e8c41542695514d4f2324a9ec431a74dc |
# encoding: utf-8
"""
Standard cells for the nineml module.
:copyright: Copyright 2006-2013 by the PyNN team, see AUTHORS.
:license: CeCILL, see LICENSE for details.
"""
import logging
import nineml.user as nineml
import nineml.abstraction as al
from pyNN.standardmodels import cells, synapses, electrodes, build_tran... | anupkdas-nus/global_synapses | pyNN-dispackgaes/nineml/standardmodels.py | Python | gpl-3.0 | 15,363 | [
"NEURON"
] | b0661cc369952b14b65681da0d4ef238cb903a6d19ff21f546ce720678d2cdb6 |
#!/usr/bin/env python
#print __name__
import optparse
import json
usage_line = """
annotate_counts.py
Version 1.0 (28 August, 2014)
License: GNU GPLv2
To report bugs or errors, please contact Daren Card (dcard@uta.edu).
This script is provided as-is, with no support and no guarantee of proper or desirable functioni... | darencard/ContigAnnotator | annotate_counts.py | Python | gpl-2.0 | 4,282 | [
"BLAST"
] | 3228f35d523f9caf4c7cec8127d0550123aab8a8270a72578238b590cc73274b |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""SPM wrappers for preprocessing data
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path... | FredLoney/nipype | nipype/interfaces/spm/preprocess.py | Python | bsd-3-clause | 66,327 | [
"Gaussian"
] | 27b4cc071d60c9b5bda033eacd6cb16114c0d075ad89dc5c8f3d034de5bc1eb3 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | wangsheng1001/incubator-singa | python/singa/layer.py | Python | apache-2.0 | 44,971 | [
"Gaussian"
] | c2f939e6b9b767f6824d437a56da33db533aa1f7ad6629bee3ad6696a84c8856 |
##
## Copyright 2016 SRI International
## See COPYING file distributed along with the package for the copyright and license terms
##
"""
Create the SIBIS Locking Object
===============================
The SIBIS Locking Object provides functionality to lock, unlock, and report on the locking status of a visit
"""
fro... | sibis-platform/sibispy | redcap_locking_data.py | Python | bsd-3-clause | 8,348 | [
"VisIt"
] | 8710656c5f2e26f9fa02ff16ce4c628e1209d4efd2a5c45bd6581c3a1601695e |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Unit tests for parser utils module."""
import unittest
import cclib
class convertorTest(unittest.TestCase):
de... | gaursagar/cclib | test/parser/testutils.py | Python | bsd-3-clause | 2,024 | [
"cclib"
] | eb794bc1923d3bd1d7da2d200d6b3a13cf44c99e03ea2b4544cbf300274399cb |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rdkit
from rdkit import DataStructs
from rdkit.Chem.AtomPairs import Torsions
__license__ = "X11"
METADATA = {
"id": "method_rdkit_tt_tanimoto",
"representation": "tt",
"similarity": "tanimoto"
}
def _compute_fingerprint(molecule):
return Torsion... | skodapetr/lbvs-environment | methods/tt/tt_tanimoto.py | Python | mit | 1,389 | [
"RDKit"
] | 2cc6bbfd001b69f51aff7f8aeb3eb831c97b029c15cb48243d7acc4a2751a9f7 |
# setdiscovery.py - improved discovery of common nodeset for mercurial
#
# Copyright 2010 Benoit Boissinot <bboissin@gmail.com>
# and Peter Arrenbrecht <peter@arrenbrecht.ch>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""
Algo... | seewindcn/tortoisehg | src/mercurial/setdiscovery.py | Python | gpl-2.0 | 9,012 | [
"VisIt"
] | 3d49b4df8e5ae83272afb9616189d167e47c0f146a7b959496b1e341b15de944 |
# -*- coding: utf-8 -*-
# (c) 2015, Brian Coca <briancoca+dev@gmail.com>
# (c) 2018, Matt Martz <matt@sivel.net>
# 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__... | azaghal/ansible | lib/ansible/plugins/action/uri.py | Python | gpl-3.0 | 3,727 | [
"Brian"
] | 21d9354b9a2440c65fedcb2b17d1890d1067cfb4443937b4a9646ae624da15b8 |
"""
components/tools/OmeroPy/scripts/EMAN2/spider2omero.py
-----------------------------------------------------------------------------
Copyright (C) 2006-2010 University of Dundee. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Genera... | joshmoore/openmicroscopy | components/tools/OmeroPy/scripts/EMAN2/spider2omero.py | Python | gpl-2.0 | 11,393 | [
"VisIt"
] | cc933c25c1b46b8b4ced0222c7de6f699e93043b7eaf844f63e02783bba97de0 |
#!/usr/bin/env python
"""
Created on 28-02-2014
Script is used for modeling the solar core via solving the four linked
differential equations.
@author Kristoffer Braekken
"""
import sys
import numpy as np
from numpy import pi, log10, exp, zeros
"""CONSTANTS"""
_OPACITY_FILE = "../data/opacity.txt" # File with opac... | PaulMag/AST3310-Prj01 | python/SolarCoreModel.py | Python | mit | 11,598 | [
"Avogadro"
] | b6d346de211267e53bc72237b6ce274ba505f037b75f2c6a406305b2e7dc7480 |
import os
import json
import time
from nxtools import logging, log_traceback
from firefly.cellformat import FireflyObject
from firefly.core.enum import ObjectStatus
from firefly.core.common import config
from firefly.core.base_objects import (
AssetMixIn,
ItemMixIn,
BinMixIn,
EventMixIn,
UserMixIn... | immstudios/firefly | firefly/objects.py | Python | gpl-3.0 | 4,102 | [
"Firefly"
] | 1a1055aec03e0173af16e5d6abb1115d825a4d1a6743f566ef8035d23274dd96 |
'''
Reader for Molpro basis as user input
Written by Susi Lehtola, 2020
'''
import re
import regex
from .. import lut
from . import helpers
# Basis entry start: 'basis={' allowing whitespace
basis_start_re = re.compile(r'^\s*?basis\s*?=\s*?{\s*?$')
# Basis ends with '}' allowing whitespace
basis_end_re = re.compile(... | MOLSSI-BSE/basis_set_exchange | basis_set_exchange/readers/molpro.py | Python | bsd-3-clause | 6,383 | [
"Molpro"
] | 9a7ef74da1c2ce590ddeb878333183e926f182b40cb145ab7f08326f0738c9f3 |
#!/usr/bin/env python
#! -*- coding: utf-8 -*-
###
# Copyright (c) Paul Brian 2013
# This software is subject to
# the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
###
"""
setup for HomeSpendWatch
"""
from setuptools import setup, find_packages
import os... | lifeisstillgood/kashflo | setup.py | Python | agpl-3.0 | 1,202 | [
"Brian"
] | cfc707e0304d2e324214f98209f2a5399d7ac33ab914e93abc38fc38d845f508 |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | mganeva/mantid | scripts/AbinsModules/SPowderSemiEmpiricalCalculator.py | Python | gpl-3.0 | 34,903 | [
"CASTEP"
] | ff4fba572c33737cd4102bd78bed6100e6c3c7350f553da750b62708c838378d |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from __future__ import ... | jandom/rdkit | rdkit/Chem/Pharm2D/LazyGenerator.py | Python | bsd-3-clause | 4,360 | [
"RDKit"
] | ecb8c8be0c24b6dff45b192c16c019210d33f36ec8e9e34205c0c27cae3ed83f |
from __future__ import unicode_literals
import unittest
import os
import json
from pymatgen.core.periodic_table import Element
from pymatgen.phonon.dos import PhononDos, CompletePhononDos
from pymatgen.util.testing import PymatgenTest
test_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..",
... | czhengsci/pymatgen | pymatgen/phonon/tests/test_dos.py | Python | mit | 3,321 | [
"pymatgen"
] | 9b69962fda4754291c5e47930187d5b56c8e9b11527ff90e64d4da21fb083dd4 |
#!/usr/bin/env python -i
# preceeding line should have path for Python on your machine
# viz_vmd.py
# Purpose: viz running LAMMPS simulation via VMD
# Syntax: viz_vmd.py in.lammps Nfreq Nsteps
# in.lammps = LAMMPS input script
# Nfreq = dump and viz shapshot every this many steps
# Nsteps =... | SGenheden/lammps | python/examples/viz_vmd.py | Python | gpl-2.0 | 2,102 | [
"LAMMPS",
"VMD"
] | 21c92c5134de7c40612e8c6d523efddff421fc779d6e2a8e300b2b114520d554 |
"""
Image classes
"""
import imghdr
import logging
import zipfile
from urllib import quote_plus
from galaxy.datatypes.binary import Binary
from galaxy.datatypes.text import Html as HtmlFromText
from galaxy.datatypes.sniff import get_headers
from galaxy.datatypes.util.image_util import check_image_type
from galaxy.uti... | icaoberg/cellorganizer-galaxy-tools | datatypes/images.py | Python | gpl-3.0 | 11,054 | [
"Galaxy"
] | e3cfd367c474318f0c5e6b97e65b046f1e17f9a8d744b0cd76f291c06ae9fef9 |
"""
Acceptance tests for Studio.
"""
from bok_choy.web_app_test import WebAppTest
from ..pages.studio.asset_index import AssetIndexPage
from ..pages.studio.auto_auth import AutoAuthPage
from ..pages.studio.checklists import ChecklistsPage
from ..pages.studio.course_import import ImportPage
from ..pages.studio.course_i... | yokose-ks/edx-platform | common/test/acceptance/tests/test_studio_general.py | Python | agpl-3.0 | 5,024 | [
"VisIt"
] | 59e2adc25c79efb2df58aae1de1e3d2237ac4139ce1d0227dd4c2b4d7c812b6a |
import math, heapq, operator, gc
from itertools import count
import networkx as nx
from Common import extend_dictionary
from rtree import index
class GeoReachPaths:
_MIN_LAT = -90
_MAX_LAT = 90
_MIN_LNG = -180
_MAX_LNG = 180
_DEFAULT_RES = 1000
def __init__(self, G, RF, M):
"""
... | Nithanaroy/GeoReachPaths | GeoReachPaths.py | Python | apache-2.0 | 20,264 | [
"VisIt"
] | 9f097f32e764665c7a094b33133383df2565832fb35d891f4da4610bd4270d63 |
import os
import glob
import sys
import shutil
import pysam
from bcbio.pipeline import config_utils
from bcbio.distributed.transaction import file_transaction, tx_tmpdir
from bcbio.utils import (safe_makedir, file_exists)
from bcbio.provenance import do
from bcbio import utils
from bcbio.log import logger
from bcbio.p... | a113n/bcbio-nextgen | bcbio/ngsalign/bismark.py | Python | mit | 4,608 | [
"pysam"
] | 1f28b1fe6b97ab6fddb85ab38978db4121d7f574c2240f337a725df16f5dc49a |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
A module to perform diffusion analyses (e.g. calculating diffusivity from
mean square displacements etc.). If you use this module, please consider
citing the following papers::
Ong, S. P., Mo, Y., Richards, W. D., Mia... | materialsproject/pymatgen | pymatgen/analysis/diffusion_analyzer.py | Python | mit | 37,574 | [
"VASP",
"pymatgen"
] | c36044a09a79b53736fe3ce2173cd8c5899cf17f0a5f51463f6c16fcadb0ce4f |
import pathlib
import numpy as np
import xarray as xr
def to_netcdf(
grid, path, include="*", exclude=None, time=None, format="NETCDF4", mode="w"
):
"""Write landlab a grid to a netcdf file.
Write the data and grid information for *grid* to *path* as NetCDF.
If the *append* keyword argument in True,... | landlab/landlab | landlab/io/netcdf/dump.py | Python | mit | 4,884 | [
"NetCDF"
] | 906adb501f828719f97fa5ae21e64297f2655e472d314aa73258a8eff669977c |
##############################################################################
# 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/r-ctc/package.py | Python | lgpl-2.1 | 1,717 | [
"Bioconductor"
] | 4d6261f550e7ddc63139f7905648ce439ba8b9ac11f8639a4868b4d69f54ea99 |
import os
### BEGIN SYSADMIN EDIT ###
### BEGIN SYSADMIN EDIT ###
### BEGIN SYSADMIN EDIT ###
## DEBUG LEVEL
# __level__ = 'WARNING'
__level__ = 'DEBUG'
## INSTALLATION PATH
__installation_bin_path__ = '/share/apps/local/bin'
## CUDA DEFINITIONS ###
__cuda__ = False
#__cuda__ = True
__cuda_path__ = ... | madscatt/zazzie_1.5 | trunk/sassie/util/sasconfig.py | Python | gpl-3.0 | 1,439 | [
"NAMD"
] | ebc277def173985a3d41e9f87edf29c6c048b6166a2118d96e0f81faae93c1c4 |
import numpy as np
class RBM:
def __init__(self, numVisible, numHidden, learning_rate=0.1):
self.numHidden = numHidden
self.numVisible = numVisible
self.learningRate = 0.1
np.random.seed(123)
# Initialize a weight matrix, of dimensions (num_visible x num_hidden), using
... | snlpatel001213/algorithmia | DeepLearning/RBM/leysCode.py | Python | gpl-3.0 | 4,399 | [
"Gaussian"
] | b6dcde1920138b1c46a88c8ef9bc3bc88138fc2af2aa378a6dc26c70c2223805 |
# -*- coding: utf-8 -*-
"""
Make maps of physical parameters based on a spectrum3d object
"""
import scipy as sp
import numpy as np
import logging
import matplotlib.pyplot as plt
import time
import scipy.constants as spc
from joblib import Parallel, delayed
from ..utils.fitter import onedgaussfit
from .extract impor... | Kruehlio/MUSEspec | analysis/maps.py | Python | mit | 31,054 | [
"Galaxy",
"Gaussian"
] | d324cc9718259f9bd9ce3542bca4b23b9c64681982399619c284d2e968e941f6 |
from ispyb.interface.dataarea import DataArea
class XtalImaging(DataArea):
"""provides methods for accessing crystal imaging tables."""
def upsert_sample_image(
self,
id=None,
sample_id=None,
inspection_id=None,
microns_per_pixel_x=None,
microns_per_pixel_y=Non... | DiamondLightSource/ispyb-api | src/ispyb/sp/xtalimaging.py | Python | apache-2.0 | 4,101 | [
"CRYSTAL"
] | ae5d535e0ba0630f5c8fa06320d12a7adad0ca5dc43b3e3928390ae5f46b944e |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | peterbraden/tensorflow | tensorflow/contrib/distributions/python/ops/gaussian_conjugate_posteriors.py | Python | apache-2.0 | 5,574 | [
"Gaussian"
] | b1cb31ff2ed28fc39ede66ced3acee7dc0ef4a51829e488c5dd06028a723466a |
#! /usr/bin/python
# -*- coding: utf8 -*-
import tensorflow as tf
import tensorlayer as tl
import numpy as np
import time
import numbers
import random
import os
import re
import sys
import threading
# import Queue # <-- donot work for py3
is_py2 = sys.version[0] == '2'
if is_py2:
import Queue as queue
else:
... | zjuela/LapSRN-tensorflow | tensorlayer/prepro.py | Python | apache-2.0 | 62,978 | [
"Gaussian"
] | 99ecbbce365169f3e19560b5543eda7f1188a0d917589ea76d5f9a6314af5d6d |
## numpy-oldnumeric calls replaced by custom script; 09/06/2016
## Automatically adapted for numpy-oldnumeric Mar 26, 2007 by alter_code1.py
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner
##
## This program is free software; you can r... | graik/biskit | biskit/md/amberParmBuilder.py | Python | gpl-3.0 | 24,108 | [
"Amber"
] | e2720d3173a6167b771a198de0ff1117291cdd9497e15bc46660cd42169d7ba0 |
#!/usr/bin/python
"""Test of line navigation output of Firefox on the Orca wiki."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manually.
sequence.append(KeyComboAction("<Control... | pvagner/orca | test/keystrokes/firefox/line_nav_wiki_up.py | Python | lgpl-2.1 | 41,054 | [
"ORCA"
] | ecd5da78802a5b2218e4c7f4247c5c9d3177df4f8d6e1a16fe9ca66920537b8d |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | Kleptobismol/scikit-bio | skbio/alignment/tests/test_pairwise.py | Python | bsd-3-clause | 28,595 | [
"scikit-bio"
] | 696503f5b4e5d1a73fafda9e5f9ee311f5b1b5a3b75433b25f366131d49fe45b |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
"""
Unit test for Vesuvio reduction
Assumes ... | mganeva/mantid | Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py | Python | gpl-3.0 | 9,174 | [
"Gaussian"
] | 74e4414a4c2f7c5df2b2273eb5fc88a53fef652caf458a1cbbaf144d3c130738 |
""" GOCDBClient module is a client for the GOC DB, looking for Downtimes.
"""
import time
import socket
import requests
from datetime import datetime, timedelta
from xml.dom import minidom
from DIRAC import S_OK, S_ERROR, gLogger
__RCSID__ = "$Id$"
def _parseSingleElement( element, attributes = None ):
"""
Giv... | hgiemza/DIRAC | Core/LCG/GOCDBClient.py | Python | gpl-3.0 | 13,699 | [
"DIRAC"
] | b23d6316f0eade0d4f26df1e49e9fcb553d6998891d1909ce11bbf3e8beaba09 |
#!/usr/bin/env python
#
# vizmake is a simple textual monitoring tool
# ... | wenbinf/vizmake | vizmake.py | Python | gpl-3.0 | 44,937 | [
"VisIt"
] | f25e5b605257e325947b70955b63d97402abc5a093370fdd8b31f2c2f3f69c8e |
import json
import requests
from jsonpath_rw import parse
from .. import avogadro
from .. import openbabel
from .. import chemspider
from .. import semantic
from .. import constants
from molecules.models.molecule import Molecule as MoleculeModel
from girder.constants import TerminalColor
from girder.api.rest import R... | OpenChemistry/mongochemserver | girder/molecules/molecules/utilities/molecules.py | Python | bsd-3-clause | 4,593 | [
"Avogadro",
"Open Babel"
] | eea581386e8fcf97951bed3850daf88cb00fef4a14eec10ca245f2e4bf740c09 |
"""Acceptance tests for LMS-hosted Programs pages"""
from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogIntegrationMixin
from common.test.acceptance.fixtures.course import CourseFixture
from common.test.acceptance.fixtures.programs import ProgramsConfigMixin
from common.test.acceptance.pages.c... | stvstnfrd/edx-platform | common/test/acceptance/tests/lms/test_programs.py | Python | agpl-3.0 | 5,676 | [
"VisIt"
] | cd48f78a8f9b0f78ad24aa09dbec1e953ad7a8cd4fd62eca5a3c7cd99a90fbc2 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Procedures to validate and update golden path of a genome assembly. This relies
heavily on formats.agp, and further includes several algorithms, e.g. overlap
detection.
"""
import os
import os.path as op
import sys
import shutil
import logging
from copy import deepcop... | tanghaibao/jcvi | jcvi/assembly/goldenpath.py | Python | bsd-2-clause | 34,653 | [
"BLAST"
] | 29435c59218a19f29dbfa8c1019c0567b154d3f3be0a72632c699c623726fbf1 |
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2013 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License version 2... | dilawar/moose-full | moose-examples/snippets/reacDiffBranchingNeuron.py | Python | gpl-2.0 | 8,467 | [
"MOOSE",
"NEURON"
] | 786e3ee71834d68a88fe99aa70f97bb9c1cd4d565091029a8d44a7697f79f79f |
import math
import numpy as np
import tensorflow as tf
from scipy import ndimage
from tensorflow.python.framework import ops
from utils import *
try:
image_summary = tf.image_summary
scalar_summary = tf.scalar_summary
histogram_summary = tf.histogram_summary
merge_summary = tf.merge_summary
SummaryWriter ... | IgorSusmelj/ABC-GAN | ops.py | Python | mit | 4,829 | [
"Gaussian"
] | 11767048ecba5a180e9e2f20647bed4edf37aaf7aa5c25ae95713ee219811935 |
import os, sys, platform, functools
import argparse
from Bio import SeqIO
from geneparse import *
def createParser():
parser = argparse.ArgumentParser(
prog='Genbank to .tbl converter',
usage='\n%(prog)s <input_file> [options]',
description = '''This script allows to convert... | nikolaichik/SigmoID | Python/gbk2tbl.py | Python | gpl-3.0 | 3,760 | [
"Biopython"
] | 420a5c18b9c204a72c8f2043df685e9b2841b5ad111b446611cf6f490fe27cd5 |
"""
FileCatalogClientBase is a base class for the clients of file catalog-like
services built within the DIRAC framework.
The class contains variables defining lists of implemented catalog methods
READ_METHODS
WRITE_METHODS
NO_LFN_METHODS
ADMIN_METHODS
Those lists must be complemented ... | andresailer/DIRAC | Resources/Catalog/FileCatalogClientBase.py | Python | gpl-3.0 | 3,971 | [
"DIRAC"
] | 81a9ca907522d593e6f288b411e8c6aa72b7bdd106880a1611b6054a493de51a |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
from pymatgen.core.structure import Molecule
from pymatgen.io.nwchem import NwInput, NwInputError, NwOutput, NwTask
from pymatgen.util.testing import PymatgenTest
test_d... | gmatteo/pymatgen | pymatgen/io/tests/test_nwchem.py | Python | mit | 13,094 | [
"NWChem",
"pymatgen"
] | 7db9d5f4619fef69c8433cb142b226b7e362e3bd1350a47946af65c805419667 |
from gpaw.utilities.blas import czher, axpy
import numpy as np
from time import time
alpha = 0.5
x = np.random.rand(3) + 1j * np.random.rand(3)
a = np.random.rand(9).reshape(3,3) + np.random.rand(9).reshape(3,3) * 1j
# make a hermitian
for i in range(3):
for j in range(3):
a[i,j] = a[j,i].conj()
a[i,i... | robwarm/gpaw-symm | gpaw/test/zher.py | Python | gpl-3.0 | 797 | [
"GPAW"
] | 2f22a46157009587dca77fede60b4fa7204fb3dbe40ec99da720f3c71123166b |
from simphony.engine import ABCEngineExtension
from simphony.engine import EngineInterface
from simphony.engine.decorators import register
from .lammps_wrapper import LammpsWrapper
from .io.file_utility import read_data_file
__all__ = ["LammpsWrapper", "read_data_file"]
@register
class SimlammpsExtension(ABCEngineE... | simphony/simphony-lammps-md | simlammps/__init__.py | Python | bsd-2-clause | 2,127 | [
"LAMMPS"
] | 6fa29bfb13b866b6a2977ee0bb14c5dbdd997a6abda62f5c0649055a0babee8e |
"""Support for Konnected devices."""
import asyncio
import hmac
import json
import logging
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.web import Request, Response
import konnected
import voluptuous as vol
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.components.d... | Teagan42/home-assistant | homeassistant/components/konnected/__init__.py | Python | apache-2.0 | 19,487 | [
"VisIt"
] | a10397d7b2b3a3b13603c1266b25cc83ac25d80530577a25e0530d9e566fc565 |
# -*- coding: utf-8 -*-
"""
synapse - iq.py
Created on 10/21/17.
The IQ module contains the core test helper code used in Synapse.
This gives the opportunity for third-party users of Synapse to test their
code using some of the same of the same helpers used to test Synapse.
The core class, synapse.lib.iq.SynTest is ... | vivisect/synapse | synapse/lib/iq.py | Python | apache-2.0 | 37,507 | [
"NEURON"
] | 31d23ec7fa34eab86960a179616cfa4603efd393e25fe246667144822b3c616e |
from __future__ import print_function
import doctest
import gzip
import os
import shutil
import tempfile
import unittest
import numpy
from rdkit.Chem import PandasTools
from rdkit.six import PY3, StringIO, BytesIO
from rdkit import RDConfig, rdBase, Chem
try:
import IPython
except ImportError:
IPython = None
#... | rvianello/rdkit | rdkit/Chem/UnitTestPandasTools.py | Python | bsd-3-clause | 12,208 | [
"RDKit"
] | f5102bf24d71e7abe89e24d3e152def489401cf3e8f0b19e6cfdb044d4f56da7 |
from __future__ import print_function
#CW BOON 2018
# Use the following algorithms:
# CW Boon, GT Houlsby, S Utili (2012). A new algorithm for contact detection between convex polygonal and polyhedral particles in the discrete element method. Computers and Geotechnics 44, 73-82.
# CW Boon, GT Houlsby, S Utili (2015)... | cosurgi/trunk | examples/PotentialBlocks/WedgeYADE.py | Python | gpl-2.0 | 16,253 | [
"ParaView",
"VTK"
] | 7cd6be59c83a3a926b0d210fbbce160ad3cf209476cf38bde054abf012e05039 |
"""Calculate the vibrational modes of a H2O molecule."""
from ase.vibrations import Vibrations
from gpaw import GPAW
h2o = GPAW('h2o.gpw', txt=None).get_atoms()
# Create vibration calculator
vib = Vibrations(h2o)
vib.run()
vib.summary(method='frederiksen')
# Make trajectory files to visualize normal modes:
for mode... | qsnake/gpaw | doc/exercises/vibrations/H2O_vib.py | Python | gpl-3.0 | 359 | [
"ASE",
"GPAW"
] | c94b49edf6a71d43fc768ca87d0729ac22c8f72b8e444fd0e86928b1fd012cb5 |
import pytest
from python_parser.examples.calc import parser, interpreter, InterpreterError
def test_calc():
interpreter.visit(parser.parse('PROGRAM', 'a = 11'))
interpreter.visit(parser.parse('PROGRAM', 'b = -13'))
a, b = 11, -13
samples = (
'2+2',
'(((23 + -3.2)) / 34+(2*((3)) *(3.... | qweeze/python-parser | tests/test_calc.py | Python | mit | 687 | [
"VisIt"
] | 256eeb85ef2980e48cc6cc5af75f3470da048d9a05f79da76652d00be8a7ffbd |
#!/usr/bin/env python
# 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
#
# U... | sunqm/pyscf | pyscf/pbc/lib/test/test_kpts.py | Python | apache-2.0 | 2,033 | [
"PySCF"
] | e3d3fb60ac79812863a120e17c246eeff4169226729ee9c103635e21116023e7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.