text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
class codata2016:
def __init__(self):
self.mp = 1.672621898e-27 # kg
self.me = 9.10938356e-31 # kg
# end def
# end class
# HELPER FUNCTIONS
# ======================================
from lxml import etree
def xml_print(node):
print etree.tostring(node,pretty_print=Tru... | Paul-St-Young/QMC | setup_polarized.py | Python | mit | 11,381 | [
"GAMESS",
"Gaussian",
"QMCPACK"
] | c19599d38560cf21553ecdb950e3a837bc075a5caecdb73a9ce71952d57af093 |
"""Configuration for the documentation scripts."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import glob
import logging
import argparse
from pprint import pformat
from configparser import ConfigParser
LOG = logging.getLogger(__name__)
K_DO... | ic-hep/DIRAC | docs/diracdoctools/Config.py | Python | gpl-3.0 | 8,487 | [
"DIRAC"
] | ec7a6bebdc954764d25ffc1153c1b2b3d345ac53edb236e422b1f950ed26e912 |
#!/usr/bin/env python
"""
TO-DO:
* Define a constructor if one is not present in the Python File
* Actually, we should ALWAYS define the "new" constructor
ourselves. Need to track the parameters to the __init__
function so we can call it from our "new"
* Find and Track instance variables so they ca... | ypkang/Dato-Core | src/unity/python/graphlab/Lua_Translator.py | Python | agpl-3.0 | 30,207 | [
"VisIt"
] | 1196f8f351d7236f69173d82d0c1a8060e2d885e16cdb671bca089ebd659f096 |
try:
from ..nbody_graph_search import Ugraph
except:
# not installed as a module
from nbody_graph_search import Ugraph
# To find 4-body "improper" interactions,
# (by default, most of the time), we would use this subgraph:
# 0
# * 1st bond connects atoms 1 and 0
#... | quang-ha/lammps | tools/moltemplate/moltemplate/nbody_alt_symmetry/cenJswapIL.py | Python | gpl-2.0 | 3,203 | [
"LAMMPS"
] | 3b1cb9be667cebc0b8784b96e7b063e6d871e1d382df56840f48a9bcd6145662 |
#!/usr/bin/env python
# Dan Blankenberg
from __future__ import print_function
import optparse
import os
import subprocess
import sys
from json import dumps, loads
CHUNK_SIZE = 2**20
TWO_GB = 2**30 * 2
DEFAULT_DATA_TABLE_NAME = "bwa_mem_indexes"
def get_id_name( params, dbkey, fasta_description=None):
# TODO: en... | blankclemens/tools-iuc | data_managers/data_manager_bwa_mem_index_builder/data_manager/bwa_mem_index_builder.py | Python | mit | 3,896 | [
"BWA"
] | efd5466e1256c298010c6eb6659df4bee1b5bab553f736030718c9e25db61ec1 |
"""
============================================================
Sparse recovery: feature selection for sparse linear models
============================================================
Given a small number of observations, we want to recover which features
of X are relevant to explain y. For this :ref:`sparse linear ... | mrshu/scikit-learn | examples/linear_model/plot_sparse_recovery.py | Python | bsd-3-clause | 7,103 | [
"Gaussian"
] | 9ad15b0768595b0d0ecb252ee84530a107905d2b5a706efa522e0366a13d03d0 |
#!/usr/bin/env python
"""
Reads amber .prmtop and .inpcrd
Outputs gaussian .com
"""
import argparse
import os
import sys
# oniomMacGyver modules
from omg import prmtop
def get_args():
"""
Parse arguments of amb_prmtop2gaucom.py
"""
parser = argparse.ArgumentParser(
description="""
... | eduardoftoliveira/qt_scripts | scripts/gau_prmtop2gaucom.py | Python | gpl-3.0 | 1,560 | [
"Amber",
"Gaussian",
"VMD"
] | cb6b924ffd93f9c989e68de6b30aa7da58e1b23f1da43097751a74afd5bdaa47 |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['architectures', 'name','version','moduleid','descripti... | kommitters/co.kommit.gtm | iphone/build.py | Python | mit | 8,618 | [
"VisIt"
] | bcb3525d645c0b0b17c90a617b4bc1129facbf8091430ecc128898eaf92be67d |
# -*- coding: utf-8 -*-
#
# Buildbot documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 10 15:13:31 2010.
#
# This file is exec()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... | shoelzer/buildbot | master/docs/conf.py | Python | gpl-2.0 | 11,555 | [
"Brian"
] | 4d51b3fc7aacd2fa1e9b478edc36a16034b6e1a86b408788b3624e65c754d3b3 |
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2015, Anima Istanbul
#
# This module is part of anima-tools and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause
import functools
import os
import re
import tempfile
from anima.ui.progress_dialog import ProgressDialogManager
from anima.... | sergeneren/anima | anima/env/mayaEnv/toolbox.py | Python | bsd-2-clause | 180,988 | [
"VisIt"
] | ad1c1de23c313976e7ae8afb59eb8c112079903e511de78118879eed2eb95371 |
# convert_Genesis2Sbml.py ---
#
# Filename: convert_Genesis2Sbml.py
# Description:
# Author:Harsha Rani
# Maintainer:
# Created: Mon Jan 19 09:16:58 2015 (+0530)
# Version:
# Last-Updated: Mon Nov 7 15:155:38 2012 (+0530)
# By: Harsha Rani
# Update #:
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:... | BhallaLab/moose-examples | snippets/convert_Genesis2Sbml.py | Python | gpl-2.0 | 1,729 | [
"MOOSE"
] | 0e52447d27afd50cc0e34a6742ea7d49bf590009608cb50c83d4a4e0497a6a8f |
from datetime import timedelta
from django.conf import settings
from django.db.models import Q
from django.utils.timezone import now
from user_sessions.models import Session
from .models import PrivateMessage
def inbox_messages(request):
inbox_unread_count = 0
if request.user.is_authenticated:
# get... | sairon/score-phorum | src/phorum/context_processors.py | Python | bsd-3-clause | 1,201 | [
"VisIt"
] | a7aa0187d0a110dccc501894f04ffff7abeeb70b9c1981f0a7b1be81b4dcefb1 |
# coding: utf-8
#!/usr/bin/env python
"""
Script to plot density of states (DOS) generated by an FEFF run
either by site, element, or orbital
"""
from __future__ import division
__author__ = "Alan Dozier"
__credits__= "Anubhav Jain, Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ ... | ctoher/pymatgen | scripts/feff_plot_dos.py | Python | mit | 1,948 | [
"FEFF",
"pymatgen"
] | be2b5658108eb30849f74c66a2240d53724523127a0d3a6c411d365d4a03f354 |
import os
import numpy as np
from nose import tools as nt
from neurom.core.types import NeuriteType
import neurom.view._dendrogram as dm
from neurom import load_neuron, get
_PWD = os.path.dirname(os.path.abspath(__file__))
DATA_PATH = os.path.join(_PWD, '../../../test_data/h5/v1/Neuron.h5')
NEURON = load_neuron(DATA_P... | liesbethvanherpe/NeuroM | neurom/view/tests/test_dendrogram.py | Python | bsd-3-clause | 3,738 | [
"NEURON"
] | 47bc3dc33cbd3e9d4365fbc9487bd703e8ec6f7cd42affb0fbae718236256b19 |
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source... | arokem/PyEMMA | pyemma/coordinates/tests/test_featurereader_and_tica_projection.py | Python | bsd-2-clause | 4,977 | [
"MDTraj"
] | 36f8d780fc36962019ee6c271e9b863dc0c76a27ba159f923eeb2eb1cf10834c |
import theano
import theano.tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams
from theano.tensor.nnet.conv import conv2d
from theano.tensor.signal.downsample import max_pool_2d
from theano.tensor.shared_randomstreams import RandomStreams
import numpy as np
from toolbox import *
from modelbase import *
... | codeaudit/Theano-Lights | models/ffn_bn.py | Python | mit | 4,888 | [
"Gaussian"
] | 0b9bf76e94ac08e882a2d6d75c9260a67aecaf161c7d15a3986e70d796ee5bc2 |
# -*- coding: utf-8 -*-
#
# helpers.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (... | terhorstd/nest-simulator | pynest/examples/Potjans_2014/helpers.py | Python | gpl-2.0 | 14,627 | [
"NEURON"
] | a9a0dd016a9934a75421a6443f778c218fb54b85ce665c3433fce67edeb0ac79 |
# -*- coding: utf-8 -*-
"""
Default Django settings. Override these with settings in the module pointed to
by the DJANGO_SETTINGS_MODULE environment variable.
"""
from __future__ import unicode_literals
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module d... | jarshwah/django | django/conf/global_settings.py | Python | bsd-3-clause | 21,946 | [
"VisIt"
] | 5e384f207be3d984c1b3a7c7708044c6797f9aad3fc4ce875867d4848ca1a7ab |
"""
Collection of DIRAC useful operating system related modules
by default on Error they return None
"""
from __future__ import print_function
import os
import distutils.spawn # pylint: disable=no-name-in-module,import-error
import DIRAC
from DIRAC.Core.Utilities.Subprocess import shellCall, systemCall
from DI... | fstagni/DIRAC | Core/Utilities/Os.py | Python | gpl-3.0 | 4,356 | [
"DIRAC"
] | 6530a34b77e44638605de659a7280d10f2a1206599c255dfa61b9e9e52399be0 |
# Copyright (c) 2015 James Hensman
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import GP
from . import GPLVM
from .. import mappings
class BCGPLVM(GPLVM):
"""
Back constrained Gaussian Process Latent Variable Model
:param Y: observed data
:type Y: np.n... | jameshensman/GPy | GPy/models/bcgplvm.py | Python | bsd-3-clause | 1,466 | [
"Gaussian"
] | 231937c08535c858ded18efe1b0cff4b4e8bb6f3897737eb6d95a5fecc9e0eb3 |
import unittest
from StringIO import StringIO
from robot.result import ExecutionResult
from robot.reporting.outputwriter import OutputWriter
from robot.utils import XmlWriter
from robot.utils.asserts import assert_equals
from robot.utils import ET, ETSource
from test_resultbuilder import GOLDEN_XML, GOLDEN_XML_TWICE
... | JackNokia/robotframework | utest/result/test_resultserializer.py | Python | apache-2.0 | 1,854 | [
"VisIt"
] | 9aae02805f7099111361fa8847030adc6d573a4b43655e50a170a6777183da83 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/plugins/custom/forms/editcustomform.py | Python | gpl-2.0 | 10,952 | [
"Brian"
] | 9e320091fb426e3379666bdd35a0ef90794ed3b92bf3ed07ad21c491ebdffa0e |
# Copyright 2014 Andrew Owen Martin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | AndrewOwenMartin/sds-recipes | solutions/line_estimation_problem.py | Python | apache-2.0 | 4,116 | [
"Gaussian"
] | db65d4a442384869c816aec0f6a311eb9c31410b6d741751f4933f301b261a86 |
"""
Datatype classes for tracks/track views within galaxy.
"""
import binary, binascii, logging
from galaxy import util
from galaxy.web import url_for
from galaxy.util.hash_util import hmac_new
from urllib import quote_plus
log = logging.getLogger(__name__)
# GeneTrack is no longer supported but leaving the datatype... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/datatypes/tracks.py | Python | gpl-3.0 | 1,861 | [
"Galaxy"
] | 231dd11f8329c08420a61c54d04837c28f7d7ffc023a64f89b15ed2aeadf56f1 |
"""
Instruction transformations.
"""
from __future__ import absolute_import
from .ast import Def, Var, Apply
from .ti import ti_xform, TypeEnv, get_type_env, TypeConstraint
from collections import OrderedDict
from functools import reduce
try:
from typing import Union, Iterator, Sequence, Iterable, List, Dict # no... | sunfishcode/cretonne | lib/cretonne/meta/cdsl/xform.py | Python | apache-2.0 | 14,763 | [
"VisIt"
] | b9db7dd9a4b32e2cfc34def1d2e3213f1fb250a0f66b3aca2c1f30129437d4b6 |
##
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | tinyendian/eb_cray | easyblocks/ncl.py | Python | gpl-2.0 | 7,879 | [
"NetCDF"
] | c3f6dff7f1b19e622d542803fb61cddbcf3850d7a47122dc5ad1115f9a875ed9 |
# Created by Eugene M. Izhikevich, 2003 Modified by S. Fusi 2007
# Ported to Python by Eilif Muller, 2008.
#
# Notes:
#
# Requires matplotlib,ipython,numpy>=1.0.3
# On a debian/ubuntu based system:
# $ apt-get install python-matplotlib python-numpy ipython
#
# Start ipython with threaded plotting support:
# $ ipython -... | meduz/NeuroTools | examples/matlab_vs_python/smallnet_inlineC.py | Python | gpl-2.0 | 5,107 | [
"NEURON"
] | 6e294de388db34053c9b2f1cf2788df9c159c18267a1e047b381986fdce11c14 |
"""Gaussian Mixture Model."""
# Author: Wei Xue <xuewei4d@gmail.com>
# Modified by Thierry Guillemot <thierry.guillemot.work@gmail.com>
import numpy as np
from scipy import linalg
from .base import BaseMixture, _check_shape
from ..externals.six.moves import zip
from ..utils import check_array
from ..utils.validatio... | olologin/scikit-learn | sklearn/mixture/gaussian_mixture.py | Python | bsd-3-clause | 23,400 | [
"Gaussian"
] | cee42dd83cbc40a117be283360ba1c98596619940ff523203067184fe727ced5 |
'''cgat_logfiles2tsv.py - create summary from logfiles
===================================================
Purpose
-------
This script takes a list of logfiles and collates summary information
about execution times. This can be useful for post-mortem
benchmark analysis.
This script uses the ``# job finished`` tag t... | AntonioJBT/CGATPipeline_core | scripts/cgat_logfiles2tsv.py | Python | mit | 5,268 | [
"BWA"
] | e1cc312e2fdba2ff5bc9252ce9a93d29ac39aa2d2647ee2cce8621860516cd37 |
from flask import Flask
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__)
auth = HTTPBasicAuth()
host_cert_file = "/opt/dirac/etc/grid-security/hostcert.pem"
host_key_file = "/opt/dirac/etc/grid-security/hostkey.pem"
port = 5010
users = {
"john": "hello",
"susan": "bye"
}
@auth.get_passwor... | SuperDIRAC/TESTDIRAC | WebServerSystem/tmpdir/xalfonso/ora-server.py | Python | gpl-3.0 | 935 | [
"DIRAC",
"Galaxy"
] | 40b8cf30949ca990fff5eeb5d04b06e1d1be8ea60090de4f30a5e238fa5964e7 |
"""Simple molecular dynamics.
A block of 27 cubic unit cells of Cu is set up, a single atom is given
a significant momentum, and constant energy molecular dynamics is
performed.
"""
from numpy import *
from asap3 import Atoms, EMT, units
from ase.lattice.cubic import FaceCenteredCubic
from asap3.md.verlet import Vel... | miroi/open-collection | theoretical_chemistry/software_runs/ase/runs/simple_md_asap3/SimpleMD.py | Python | mit | 1,162 | [
"ASE"
] | d7965bb917f44c587eb70f1506c6bbedea843f71b11475d7aea525939c0c130a |
from ..c import nodes as C
import ast
op_map = {
C.Op.Add: lambda x, y: x + y,
C.Op.Div: lambda x, y: x / y,
C.Op.Mul: lambda x, y: x * y,
C.Op.Lt: lambda x, y: x < y,
C.Op.Sub: lambda x, y: x - y,
}
class ConstantFold(ast.NodeTransformer):
""" TODO: Support all folding situations """
de... | alphaFred/Sejits4Fpgas | sejits4fpgas/src/vhdl_ctree/transforms/constant_fold.py | Python | gpl-3.0 | 1,899 | [
"VisIt"
] | eebdcc8cb7e1a586e2c8e2b4fb80ab5b43f1fa0afabe47a0c18efb93b54b1f19 |
# Copyright (C) 2010-2018 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... | mkuron/espresso | testsuite/python/analyze_itensor.py | Python | gpl-3.0 | 2,464 | [
"ESPResSo"
] | 7e7d3cb5f577bed1400c902eb77abcc96b6eadbc12959f4ee053f30790554592 |
import sys, shutil
sys.path.insert(1, "../../../")
import h2o
import random
def cars_checkpoint(ip,port):
cars = h2o.upload_file(h2o.locate("smalldata/junit/cars_20mpg.csv"))
s = cars.runif()
train = cars[s > .2]
valid = cars[s <= .2]
print "\n*** Description (chunk distribution, etc) of training... | weaver-viii/h2o-3 | h2o-py/tests/testdir_algos/gbm/pyunit_NOPASS_cars_checkpointGBM.py | Python | apache-2.0 | 7,714 | [
"Gaussian"
] | 3a71b484ff7c5dad57b6ea3f84a59076b101855eacb7426a7f189a8534baa741 |
#!/usr/bin/env python
"""
"""
import os
import vtk
def main():
colors = vtk.vtkNamedColors()
fileNames = get_program_parameters()
# Set up the stocks
renderers = list()
topRenderer = vtk.vtkRenderer()
bottomRenderer = vtk.vtkRenderer()
renderers.append(topRenderer)
renderers.appen... | lorensen/VTKExamples | src/Python/VisualizationAlgorithms/Stocks.py | Python | apache-2.0 | 4,298 | [
"VTK"
] | 1f3e76177283befb61bb38331cddd286a2d2a7ca6eabfc583a3082c2d4b8b99f |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.utils import html
#Local Imports
import models as cont
import utils.admin as utils
class ConnectionInline(admin.TabularInline):
model = cont.Connection
extra = 0
class Note... | tperrier/mwachx | contacts/admin.py | Python | apache-2.0 | 6,505 | [
"VisIt"
] | 72117b9d803b18d5b7b8db9a0841af1942c4c8ed60652ccc1f5f1d15096209e4 |
# neubot/utils_path.py
#
# Copyright (c) 2012-2013
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of ... | neubot/neubot | neubot/utils_path.py | Python | gpl-3.0 | 5,763 | [
"VisIt"
] | 83acd1d0b7f28d9fabacf24bad6491b5daa4ee56b72d3463353dba58e3287c58 |
"""Tornado handlers for the notebooks web service.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distribu... | WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/IPython/html/services/notebooks/handlers.py | Python | bsd-3-clause | 10,572 | [
"Brian"
] | 8007df24ff185547d752b193025f26f403fc89a51a69bff8a3ee28750b981d22 |
#!/usr/bin/env python2
"""
Parse SAM file and output only pairs with at least one read aligned.
Compatible with bowtie/bwa output - one entry per read.
SAM file has to be sorted by read name.
USAGE:
samtools view -St yeast_chromosomes.fa.fai 409.sam -f3 | sam2aligned.py > 409.aligned.sam
"""
from datetime import... | lpryszcz/bin | sam2aligned.py | Python | gpl-3.0 | 1,558 | [
"BWA",
"Bowtie"
] | 851c601f68e4f0a86df6719937efa1427484a1e220ca4084e34be187933e27c4 |
'''Main file'''
if __name__ == '__main__':
from tablecontroller import *
class MainMenu(Menu):
# default parameters
def __init__(self, relational_table_controller):
assert isinstance(relational_table_controller, VisualRelationalTableController), \
"MainMenu should ... | sanchaez/python_labs | Lab1/main.py | Python | mit | 3,496 | [
"Galaxy"
] | 0caf7e4ce655154b94fb52c9810253d674acf67271422150f48fd19cf2ed6ed2 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the ... | pmghalvorsen/gramps_branch | gramps/gen/filters/rules/person/_hasnote.py | Python | gpl-2.0 | 1,754 | [
"Brian"
] | 5774b0400826f8660956f023f8615e463fdea85f5bec57705b71fc6053a2f58f |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | jkbradley/spark | python/pyspark/ml/regression.py | Python | apache-2.0 | 87,709 | [
"Gaussian"
] | 8633c960479b9d70cbbb9989e6b8a45b0f03fcb5f3f9fddb0a2dc7c377e98247 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Test for the piezo tensor class
"""
__author__ = "Handong Ling"
__version__ = "0.1"
__maintainer__ = "Handong Ling"
__email__ = "handongling@berkeley.edu"
__status__ = "Development"
__date__ = "4/23/19"
import os
import... | vorwerkc/pymatgen | pymatgen/analysis/tests/test_piezo_sensitivity.py | Python | mit | 14,582 | [
"phonopy",
"pymatgen"
] | c68bba87de6509fb19d20580d16ba11803b580185facb267256ad30918ef76e4 |
from math import pi, cos, sin, sqrt, acos
from ase.atoms import Atoms
from ase.parallel import paropen
def read_sdf(fileobj):
if isinstance(fileobj, str):
fileobj = open(fileobj)
lines = fileobj.readlines()
# first three lines header
del lines[:3]
#
L1 = lines.pop(0).split()
nat... | grhawk/ASE | tools/ase/io/sdf.py | Python | gpl-2.0 | 591 | [
"ASE"
] | 94167bc84a1c746d6711fbc48138464740fd2186a50e95c065f429a3feb88eaf |
"""
Course Outline page in Studio.
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from .course_page import CoursePage
from .unit import UnitPage
class CourseOutlineContainer(object):
"""
A mixin to a CourseOutline page object that adds the ability to load
a chil... | wwj718/murp-edx | common/test/acceptance/pages/studio/overview.py | Python | agpl-3.0 | 5,973 | [
"VisIt"
] | e559c0df69f171ae19fba87fd653750a64169a5e7c45565b541f4e6d2ae4f2a7 |
"""
.. currentmodule:: pygmin.amber
Module containing files for simulating bio-molecules using AMBER force-field
AMBER
------------------------------------
.. autosummary::
:toctree: generated/
system
openmm_potential
gmin_potential
"""
| js850/PyGMIN | pygmin/amber/__init__.py | Python | gpl-3.0 | 267 | [
"Amber"
] | f7bfc0927c0bca4e6dc7d1b66f4e88f3bd5b185e5e672e698f80c52cf50d695b |
import numpy as np
class NETCDFHandler(object):
""" Child class to ease netCDF file handling.
Usage:
* Class variable __file__ contains the netCDF file object
* __file__ needs to be properly initialized by parent class
* Complex types are supported in the following way... | pakodekker/oceansar | oceansar/ocs_io/netcdf.py | Python | gpl-3.0 | 1,612 | [
"NetCDF"
] | 73d4da7dd15efbc81f9e304300fb04da9aba797b031b2dc37f72c1cac38bf675 |
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__), "..", "..", "..",
'test_files')
import scipy
... | dongsenfo/pymatgen | pymatgen/phonon/tests/test_dos.py | Python | mit | 3,281 | [
"pymatgen"
] | 7bf60f9309c9e4ac8d9864b26daa8a4bc3815792c67c69806caed6e0d2ac4ded |
#! PsiAPI energy example
import psi4
psi4.set_output_file("output.dat", False)
psi4.set_options({"SCF_TYPE": "DF", "BASIS": "cc-pVDZ", "REFERENCE": "ROHF"})
# just check if it runs :)
psi4.wrapper_database.database('scf', 'O24by5mb', cp=1, subset=["4-0.9", "12-0.9", "20-0.9", "23-0.9"])
#psi4.wrapper_database.databa... | jturney/psi4 | tests/python/databases/input.py | Python | lgpl-3.0 | 600 | [
"Psi4"
] | 6d5d8f76a444e0a05cd378849267a1a63e94c96036f75c2d1d217836671163a2 |
# nachans.py ---
#
# Filename: nachans.py
# Description:
# Author: subhasis ray
# Maintainer:
# Created: Fri Apr 17 23:58:13 2009 (+0530)
# Version:
# Last-Updated: Sat Dec 8 15:51:51 2012 (+0530)
# By: subha
# Update #: 402
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
#... | dilawar/moose-full | moose-examples/traub_2005/py/nachans.py | Python | gpl-2.0 | 5,936 | [
"MOOSE",
"NEURON"
] | ba3759ee6a0cac845e3d5bf929a646670a34f9ddb5141ce8db852dde49b8eb44 |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Provides an interface to manage URI scheme support in iris.
"""
import collections
from collections import OrderedDict
im... | rcomer/iris | lib/iris/io/__init__.py | Python | lgpl-3.0 | 14,713 | [
"NetCDF"
] | 7b30d9efbea76183556f97a9076d32b0431f99bf30b1ef91f76818ae0d4fda0b |
#!/usr/bin/env python
"""
Determine number of processors and memory for the worker node
"""
__RCSID__ = "$Id$"
from DIRAC.Core.Base import Script
from DIRAC import gLogger
from DIRAC.WorkloadManagementSystem.Utilities import JobParameters
Script.setUsageMessage('\n'.join(['Get the parameters (Memory and Number of ... | andresailer/DIRAC | WorkloadManagementSystem/scripts/dirac-wms-get-wn-parameters.py | Python | gpl-3.0 | 1,529 | [
"DIRAC"
] | 732bfd113269317415aeeb687a50ec4c731ad78a959140f067cbc07a5aee7b45 |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import pytest
from shuup import configuration
from shuup.admin.vi... | shoopio/shoop | shuup_tests/admin/test_sample_data.py | Python | agpl-3.0 | 9,616 | [
"VisIt"
] | 4d72746c50f07bb8c494f6a5457b23fefd12a86157e2e3821262f292d3166a23 |
import numpy as np
from neuroanalysis.fitting import Gaussian, SearchFit
import pyqtgraph as pg
pg.dbg()
# make some noise with a gaussian bump
model = Gaussian()
x = np.linspace(0, 100, 1000)
y = np.random.normal(size=len(x)) + model.eval(x=x, xoffset=71, yoffset=0, sigma=5, amp=10)
plt = pg.plot()
plt.plot(x, y, pe... | campagnola/neuroanalysis | examples/search_fit.py | Python | mit | 1,395 | [
"Gaussian"
] | 1ece1cf7faf366d2dd44764fec1e8da63ff5c1a3c842b8447423a0acf1d5f163 |
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2021, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software you can redistribute it and/or modify
# it under... | mrcslws/nupic.research | packages/dendrites/src/nupic/research/frameworks/dendrites/mixins/prototype_figure_1b.py | Python | agpl-3.0 | 4,062 | [
"NEURON"
] | 3f02dc9be23d366d621e637212690c62b77313c880740d962199ac74a13cf22c |
"""Rewrite assertion AST to produce nice error messages"""
import ast
import errno
import functools
import importlib.machinery
import importlib.util
import io
import itertools
import marshal
import os
import struct
import sys
import tokenize
import types
import atomicwrites
from _pytest._io.saferepr import saferepr
f... | ekwoodrich/python-dvrip | env/lib/python3.5/site-packages/_pytest/assertion/rewrite.py | Python | mit | 39,456 | [
"VisIt"
] | 90605415410cc00873ef7daea6bade30cd74cdc82fdbe2af61b9dade7e10197f |
import os
import logging
import re
import simtk.unit as units
import numpy as np
from intermol.forces import *
import intermol.forces.forcefunctions as ff
from intermol.exceptions import (UnimplementedFunctional, UnsupportedFunctional,
UnimplementedSetting, UnsupportedSetting,
... | ctk3b/InterMol | intermol/lammps/lammps_parser.py | Python | mit | 53,114 | [
"CHARMM",
"Desmond",
"Gromacs",
"LAMMPS"
] | dd50f069928afe79b31f4c3d3968e993d1ae44e9890295dd5f5d5d68c92d3900 |
# Copyright 2018, Brian May
#
# This file is part of Karaage.
#
# Karaage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Karaage i... | brianmay/karaage | karaage/datastores/ldap_schemas.py | Python | gpl-3.0 | 7,236 | [
"Brian"
] | 17adc35aed242f95f229a2dbaaf76c5e58a74b08e2eabffb5270cc44bf0d007e |
########################################################################
# $HeadURL$
########################################################################
""" DIRAC FileCatalog Security Manager mix-in class
"""
__RCSID__ = "$Id$"
import os
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Security.Properties import ... | Sbalbp/DIRAC | DataManagementSystem/DB/FileCatalogComponents/SecurityManager.py | Python | gpl-3.0 | 5,772 | [
"DIRAC"
] | bc5c7fb9cf03efdd313e9effe1a6c585075ac6095ce0715b6dd06af0a7faa640 |
#!/usr/bin/env python3
## This scripts automates the processes of calling the Reborn script for each model run and generates the new spawnfiles accordingly.
import os
import argparse
import numpy as np
#parser = argparse.ArgumentParser()
#parser.add_argument('-n', '--file number', required=True, help='How many file... | abstractwisdom/Age-Tracer | Combine.py | Python | gpl-3.0 | 1,710 | [
"NetCDF"
] | ad08d6dba2114f12c78540fda7b2aacef3d5a7829cf82140c6bb8e9f516b2228 |
# 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/nao/m_dens_libnao.py | Python | apache-2.0 | 1,403 | [
"PySCF"
] | b077865f9371e20fd42b7068fcb66d67940724d4ea2192d3ce7abf712bf7b832 |
from collections import defaultdict
from rdkit import Chem
from .. RINGParser import Read
import yaml
import os
from .. Error import PatternMatchError
from . Group import Group
from . DataDir import get_data_dir
# Scheme contains the group pattern information, and can assign groups
# based on the smiles.
class Schem... | VlachosGroup/VlachosGroupAdditivity | pgradd/GroupAdd/Scheme.py | Python | mit | 18,324 | [
"RDKit"
] | 064f3990030c64dacbb0121f2c52be5ef7f2908daf346f3d10c509a016a3f61c |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/plugins/songs/lib/songproimport.py | Python | gpl-2.0 | 6,318 | [
"Brian"
] | d71f65d54e366998a60335be58e11bce247f459f5731e42faa84d8e32d9abc19 |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | hfp/tensorflow-xsmm | tensorflow/python/ops/gradients_impl.py | Python | apache-2.0 | 57,017 | [
"VisIt"
] | cc9337363be811592e49d1773b2eb94f7ac348368b07acd05d23ba052c8421ce |
# Copyright 2018 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.
"""Implements commands for running and interacting with Fuchsia on devices."""
import boot_data
import logging
import os
import pkg_repo
import re
import su... | scheib/chromium | build/fuchsia/device_target.py | Python | bsd-3-clause | 14,384 | [
"Amber"
] | a776c16233c3d174870ec93496500f1aa3de7322c5e9367c64f30c8dad7661e5 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path as op
import sys
import re
import logging
from astropy.table import Table, Column
from maize.apps.base import AttrDict, str2bool, eprint, sh, mkdir, which
from maize.formats.base import must_open
from maize.formats.pbs import PbsJob, create_job_ch... | orionzhou/robin | old/pipelines/dnaseq.py | Python | gpl-2.0 | 7,532 | [
"BWA"
] | 757d34f230bbcfc78c879b688b933a95b75ee040bb0ec1f29d21acccff079509 |
#!/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/grad/test/test_hf.py | Python | apache-2.0 | 3,540 | [
"PySCF"
] | bff5d301bd249dd8f0647777bd5fb77943cb9ded280761a13d91b89bb7a5d3ba |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$', TemplateView.as_view(templ... | pyve/pyconve-site | config/urls.py | Python | bsd-3-clause | 1,310 | [
"VisIt"
] | 41a9d3dfb314edaf8944332639f2bd1422de2d51136f4d77511ee45a7f8196fe |
#!/usr/bin/env python
"""
segmentation-fold can predict RNA 2D structures including K-turns.
Copyright (C) 2012-2016 Youri Hoogstrate
This file is part of segmentation-fold
segmentation-fold is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by t... | yhoogstrate/segmentation-fold | scripts/energy-estimation-utility/segmentation_fold_utils/CLI.py | Python | gpl-3.0 | 7,998 | [
"pysam"
] | 02d9de1692eaab77fc2aefc1d8467052ead4a53dcc7b95665b6e25135ccc5cc4 |
from vtk import *
reader1 = vtkXMLTreeReader()
reader1.SetFileName("treetest.xml")
reader1.Update()
view = vtkTreeMapView()
view.SetAreaSizeArrayName("size")
view.SetAreaColorArrayName("level")
view.SetAreaLabelArrayName("name")
view.SetAreaLabelVisibility(True)
view.SetAreaHoverArrayName("name")
view.SetLayoutStrate... | collects/VTK | Examples/Infovis/Python/treemap_view.py | Python | bsd-3-clause | 569 | [
"VTK"
] | ced25688602f418ff5a66e47cfd92a71315952284ed9a6dae5e3b091022a67cf |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This module is also sponsored by E.T.A.I. (www.etai.fr)
# 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
ANSIBLE_METADATA = {'metadata_version... | EvanK/ansible | lib/ansible/modules/cloud/vmware/vmware_guest.py | Python | gpl-3.0 | 134,112 | [
"VisIt"
] | 35f136c4f5f72c91b51c982e3f504204e7a37bd9635476ee5fd7c1a75e938c84 |
"""Functions to plot epochs data."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Jaakko Leppakangas <jaeilepp@student.jyu.fi>
# ... | mne-tools/mne-python | mne/viz/epochs.py | Python | bsd-3-clause | 43,604 | [
"Gaussian"
] | a058fecdd970a7abb85d7796b6559ad950e6f2732459006e80df3994ef157383 |
#------------------------------------------------------------------------------
# pycparser: c-to-c.py
#
# Example of using pycparser.c_generator, serving as a simplistic translator
# from C to AST and back to C.
#
# Copyright (C) 2008-2012, Eli Bendersky
# License: BSD
#------------------------------------------------... | songjiguo/interface-code-generator | examples/c-to-c.py | Python | bsd-3-clause | 1,579 | [
"VisIt"
] | c0684a1d0494eacd4b5bcb4242e1980c2a6d6d9e16796d5afca530e6c6ae9c44 |
import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, text_output
@click.command('update_quota')
@click.argument("quota_id", type=str)
@click.option(
"--name",
help="Name for the new quota. This must be unique within a Galaxy instance.",
type=str
)
@c... | galaxy-iuc/parsec | parsec/commands/quotas/update_quota.py | Python | apache-2.0 | 1,997 | [
"Galaxy"
] | b2ae0e23d53c25e8982157c931d45a6b284418645e05a362e3fbb0eefba3ae3f |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Tiger Soldier
#
# This file is part of OSD Lyrics.
#
# OSD Lyrics 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 ... | lenoch/osdlyrics | python/dbusext/service.py | Python | gpl-3.0 | 16,811 | [
"VisIt"
] | 2fe1f42ef6a9e96a7494bbe8d66afe258f7ef7e4d30b794bccff6dd4939cc758 |
#!/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
from netCDF4 import Dataset
import argparse
from mpl_toolkits.basemap import Basemap
import datetime
from matplotlib.colors import LinearSegmentedColormap
import matplotlib.patches as mpatches
import matplotlib.lines as mlines
parser = argparse.Argu... | abstractwisdom/Age-Tracer | Hex.py | Python | gpl-3.0 | 3,449 | [
"NetCDF"
] | 9a1f49a7f29d6d8a682fb362b414282f2d5fa1e1935cd9e9cdb707913bd9252a |
"""
A helper file to produce GROMACS metadata based on the type of computation
"""
data_keys = [
"defaults", "atomtypes", "nonbond_params", "moleculetype", "atoms",
"bonds", "pairs", "angles", "dihedrals", "system", "molecules"
]
# Units based GROMACS unit styles (http://lammps.sandia.gov/doc/units.html)
#u... | dgasmith/EEX_scratch | eex/translators/gromacs/gromacs_metadata.py | Python | bsd-3-clause | 5,090 | [
"CHARMM",
"Gromacs",
"LAMMPS"
] | 42807cd2839db376330326ebfe98e8646045d9be8e545a1e22b1e2480a5f28e8 |
"""Bravais.py - class for generating Bravais lattices etc.
This is a base class for numerous classes setting up pieces of crystal.
"""
import math
import numpy as np
from ase.atoms import Atoms
import ase.data
class Bravais:
"""Bravais lattice factory.
This is a base class for the objects producing various ... | slabanja/ase | ase/lattice/bravais.py | Python | gpl-2.0 | 18,737 | [
"ASE",
"CRYSTAL"
] | 2c0dd258ab67f88bfa13f68ad6d13bfd9d5509bb5df7bfed4da5ad09b1369e03 |
#!/usr/bin/env python
# Media Dragon - the modular media manager
# Copyright (C) 2012 Brian Hrebec
#
# 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 y... | bhrebec/mediadragon | src/lib/plugin.py | Python | gpl-3.0 | 3,104 | [
"Brian"
] | eb69684593f79cc7346bf2d489a57b9e41dc756c611b57e3337fc6e8eb0141be |
"""A handy collection of functions to write different filetypes.
"""
# This file is part of ManipulateAggregates.
#
# Copyright (C) 2016 by Torsten Sachse
#
# ManipulateAggregates 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 S... | razziel89/ManipulateAggregates | ManipulateAggregates/collection/write.py | Python | gpl-3.0 | 12,663 | [
"Gaussian"
] | f26c900ee8d00faa0d6b5d296b837da49425b53f8ae046d650e9dfea3cf2945e |
# Copyright (C) 2017 Martin Nilsson
# This file is part of the Memtran compiler.
#
# The Memtran compiler 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
# ... | LJMNilsson/memtran | src/slot_collection.py | Python | gpl-3.0 | 20,038 | [
"VisIt"
] | 079bb47a97d5b05f5d4eeec5424676b6b8905a2b2c7ff99c90327c210d7672f7 |
"""
A script to calculate the projection of 3D world coordinates to
2D display coordinates (pixel coordinates) for a given scene.
The 2D pixel locations of objects in the image plane are related to their
3D world coordinates by a series of linear transformations. The specific
transformations fall under the group known... | liulion/mayavi | examples/mayavi/advanced_visualization/mlab_3D_to_2D.py | Python | bsd-3-clause | 11,049 | [
"Mayavi",
"VTK"
] | fc298bb6de89724149bde835ce97cf93a0e6b87e7b3c029959fb12de130ce05f |
"""
.. _tut_viz_stcs:
Visualize Source time courses
=============================
This tutorial focuses on visualization of stcs.
.. contents:: Table of Contents
:local:
Surface Source Estimates
------------------------
First, we get the paths for the evoked data and the time courses (stcs).
"""
import os
impo... | adykstra/mne-python | tutorials/source-modeling/plot_visualize_stc.py | Python | bsd-3-clause | 5,780 | [
"Mayavi"
] | a001ea185cd3730d64b1f7850a4101e6f87a83e28b35ed80493eec67b49bf616 |
#!/usr/bin/python
#
# sync Remote ftp directory to local - 2015 by meigrafd - v0.74
# source: remote
# target: local
#
# http://www.forum-raspberrypi.de/Thread-python-python-skript-ftp-sync?pid=154491#pid154491
#
import time, sys, os, re, curses
from datetime import datetime
from ftplib import FTP
#Dictionary doc... | meigrafd/Sample-Code | ftp_sync.py | Python | mit | 12,099 | [
"VisIt"
] | 712f682378d9061ad506ca6b45a5220842ed0d642e3d776c9228e0cadb37ff8d |
#!/usr/bin/env python3
import os
import shutil
from jinja2 import Environment, FileSystemLoader
from subprocess import Popen, PIPE
ref_map = {
'business-cards': ['http://www.ctan.org/tex-archive/macros/latex/contrib/bizcard'],
'cheatsheet': ['http://www.stdout.org/~winston/latex/'],
'ieee-1.8': [
... | bamos/latex-templates | generate.py | Python | mit | 2,784 | [
"Brian"
] | 1364ac5b50965d2d44e21339409a1f6a36ed03f236906efd8566b79452128020 |
from DIRAC.TransformationSystem.Client.TransformationClient import TransformationClient
from WebAppDIRAC.Lib.WebHandler import WebHandler, WErr, asyncGen
from DIRAC import gConfig, gLogger
from DIRAC.Core.Utilities import Time
import json
class TransformationMonitorHandler( WebHandler ):
AUTH_PROPS = "authenticated... | atsareg/WebAppDIRAC | WebApp/handler/TransformationMonitorHandler.py | Python | gpl-3.0 | 21,055 | [
"DIRAC"
] | c3d1987fdb465f6953d0e610833389ffc90657af78624f3d377e1cf05a5fe728 |
from mpi4py import MPI
from scipy import optimize
from scipy import linalg
import glm
from lib import *
from mcmc_updates_serial import mh_update
from fisher_weighting import *
import emulate
#==============================================================================
# Specialized sampling routines for parallel ... | awblocker/quantitation | lib/quantitation/mcmc_updates_parallel.py | Python | bsd-3-clause | 32,314 | [
"Gaussian"
] | eec521bfcad6dc9816d080466008191e9e45a6e4cb6323805d48d566a76caf6c |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-site-mask-logging
# Author : Stuart Paterson
########################################################################
"""
Retrieves site mask logging information.
Example:
$ dirac-admin-site-mask-l... | ic-hep/DIRAC | src/DIRAC/Interfaces/scripts/dirac_admin_site_mask_logging.py | Python | gpl-3.0 | 1,199 | [
"DIRAC"
] | e47e16d1b54b10c886a2086a0153b5666cbd86e4a08f7b354778283b352944a0 |
import uuid
import jobs.test_rules
from galaxy.jobs.mapper import (
JobRunnerMapper,
ERROR_MESSAGE_NO_RULE_FUNCTION,
ERROR_MESSAGE_RULE_FUNCTION_NOT_FOUND,
)
from galaxy.jobs import JobDestination
from galaxy.util import bunch
WORKFLOW_UUID = uuid.uuid1().hex
TOOL_JOB_DESTINATION = JobDestination()
DYNA... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/test/unit/jobs/test_mapper.py | Python | gpl-3.0 | 5,801 | [
"Galaxy"
] | 90a12c8db03d252e979e6bc917535ea360dd3e9952f8fd11f26ba2e2b6fc162f |
import copy
import Code.SQL.Base as SQLBase
class BMT(SQLBase.DBBase):
def __init__(self, nomFichero):
SQLBase.DBBase.__init__(self, nomFichero)
self.tabla = "DATOS"
if not self.existeTabla(self.tabla):
cursor = self.conexion.cursor()
for sql in (
... | lukasmonk/lucaschess | Code/BMT.py | Python | gpl-2.0 | 4,802 | [
"SIESTA"
] | e0f9fc3bc889f92c2c0c9059beb756a27b65446304fdbcb97a89a4f0c339be71 |
#!/usr/bin/env python3
#!/usr/bin/python
"""Cheap and simple API helper
This program is part of "Dive Into Python", a free Python book for
experienced programmers. Visit http://diveintopython.org/ for the
latest version.
"""
__author__ = "Mark Pilgrim (mark@diveintopython.org)"
__version__ = "$Revision: 1.3 $"
__da... | jtraver/dev | python3/help/apihelper.py | Python | mit | 1,830 | [
"VisIt"
] | e9389d94997352bf6b58498f4bf77050a6172ae652967f73dec94174ca568438 |
#!/usr/bin/python3
from __future__ import absolute_import
from __future__ import print_function
#ensure# encoding: utf-8
"""
Module to set up run time parameters for Clawpack.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
import os
# to exract... | mandli/surge-examples | sandy/setrun.py | Python | mit | 16,806 | [
"NetCDF"
] | 90603f75f838a3026ab1088c9a4b892dc0a717398617c2b2ee343fd90cd64eb5 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Brewing Classic Styles: 80 Winning Recipes Anyone Can Brew
by Jamil Zainasheff and John J. Palmer
Munich Madness
Used by permission of Brewers Publications (2007). All rights reserved.
You can purchase the book here:
- http://www.brewerspublications.com/books/brew... | chrisgilmerproj/brewday | examples/brewing_classic_styles/munich_madness_dict.py | Python | mit | 2,085 | [
"ADF"
] | cae4c1e3503c5201f4225922beda80f6b13905a0c0c9fb5e12484e3022e151e6 |
from __future__ import generators
class TreeWalker(object):
VERBOSE = 0
def __init__(self):
self.node = None
self._cache = {}
def default(self, node, *args):
for child in node.getChildNodes():
self.dispatch(child, *args)
def dispatch(self, node, *args):
se... | srusskih/SublimeBicycleRepair | bike/parsing/visitor.py | Python | mit | 1,307 | [
"VisIt"
] | 1c4812da5c45cc88c8f4051aa6954241281252cfc4033a811b90e0d18127fe60 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
import warnings
import numpy as np
from monty.os.path import which
from monty.serialization import loadfn
from pymatgen.core.lattice import Lattice
from pymatgen.core.per... | gmatteo/pymatgen | pymatgen/transformations/tests/test_advanced_transformations.py | Python | mit | 32,270 | [
"VASP",
"pymatgen"
] | ab089ca311e821a1c0ef3788a440ccb195a2012752cf6bb1390e6c9ddcfd4c67 |
class OWLAnnotationAxiomVisitor(object):
"""Marker class"""
def visit(self, axiom):
"""
:param axiom: an object of one of these classes:
- owlapy.model.OWLAnnotationAssertionAxiom
- owlapy.model.OWLSubAnnotationPropertyOfAxiom
- owlapy.model.OWLAnnotationProp... | patrickwestphal/owlapy | owlapy/model/owlannotationaxiomvisitor.py | Python | gpl-3.0 | 912 | [
"VisIt"
] | 83e24c5c9cc563a7e8a5ca2550750f3e95fca28b3e434514e68ec8298d6bb112 |
"""
A module defining a function :func:`~mockdata` which is able to generate 1D mock data given a model, selection function
and several other parameters.
"""
from .model import Schechter
import numpy as np
from scipy.integrate import quad
from scipy.interpolate import InterpolatedUnivariateSpline as spline
from .dffit... | steven-murray/pydftools | pydftools/mockdata.py | Python | mit | 8,710 | [
"Galaxy",
"Gaussian"
] | e1539170fe6eeeafbce416d7d6dde916e35583ac5ce55269db82781a55c0101e |
"""CRAWL-E is a highly distributed web crawling framework."""
import Queue, cStringIO, gzip, httplib, logging, mimetypes, resource, socket
import sys, subprocess, threading, time, urllib, urlparse
from optparse import OptionParser
VERSION = '0.6.4'
HEADER_DEFAULTS = {'Accept':'*/*', 'Accept-Language':'en-us,en;q=0.8'... | davesabatini/crawl-e | crawle.py | Python | bsd-3-clause | 27,065 | [
"VisIt"
] | b87f936616fc17538ba22261ea9c5b729e0cad21837f5ef8cdb2d5005105bd01 |
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
"""Perform quick astronomical stellar analysis.
**Plugin Type: Local**
``Pick`` is a local plugin, which means it is associated with a channel.
An instance can be opened for each channel.
**Usage**
The ``Pick... | naojsoft/ginga | ginga/rv/plugins/Pick.py | Python | bsd-3-clause | 77,921 | [
"Gaussian"
] | 445ca1b21066094a321a330942dfe0a07ac0f6263dac3a867edac54ed20090ea |
# coding: utf-8
"""
This module provides objects describing the basic parameters of the
pseudopotentials used in Abinit, and a parser to instantiate pseudopotential objects..
"""
from __future__ import unicode_literals, division, print_function
import sys
import os
import abc
import collections
import json
import six... | Dioptas/pymatgen | pymatgen/io/abinitio/pseudos.py | Python | mit | 90,927 | [
"ABINIT",
"WIEN2k",
"pymatgen"
] | 0e87ca095816223a4096315172bef33b0a292f22e8547d68fb19cd6e1b30da64 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.