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 |
|---|---|---|---|---|---|---|---|
import re
import os
import pwd
import sys
import logging
import parser
import resolver
try:
from distutils.util import get_platform
platform = get_platform()
except ImportError:
platform = None
def select_one(filename, section_name):
sections = parser.parse(filename)
section = sections.get(secti... | mcdonc/buildit | context.py | Python | bsd-3-clause | 9,921 | [
"VisIt"
] | 702a4f9cf497afc86a66558d3f52b5c5b338deb84ec13c914a532df2253c68fa |
"""Copyright (c) 2010-2012 David Rio Vierra
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA... | skinny121/MCEdit-TallWorlds | mcplatform.py | Python | isc | 47,038 | [
"Jaguar"
] | d4ff11bf45184370da74aa4be422c92ce796da3cb16d0f243bd2162db139e726 |
import unittest
from app import create_app, db
from app.mod_auth.models import UserAccount, UserAccountStatus, UserProfile
from sqlalchemy.exc import IntegrityError
from flask import url_for
from datetime import datetime
from flask_testing import TestCase
class ContextTestCase(TestCase):
render_templates = True
... | BrianLusina/Arco | server/tests/__init__.py | Python | mit | 3,931 | [
"Brian"
] | 3915dcdb6e19d52d0fe4adc70ce6025e44ba3625bad7f85c3f8e37c6ee83028a |
"""
This file is part of RAPD
Copyright (C) 2016-2018 Cornell University
All rights reserved.
RAPD 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, version 3.
RAPD is distributed in the hope that it will ... | RAPD/RAPD | src/sites/necat.py | Python | agpl-3.0 | 21,526 | [
"Gaussian"
] | a7fd09d70e3a7d11a555a7ae62026f1e840b4aeddea1b6c834925ed02e4752ef |
# Copyright 2014 The Oppia 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 applicable ... | kevinlee12/oppia | core/domain/email_manager_test.py | Python | apache-2.0 | 274,315 | [
"VisIt"
] | d33de3429fbe2f1665d3639d6d01ddd45d7b62bca4a1c23eb3db13a36b4eea8f |
##############################################################################
# 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-ggbio/package.py | Python | lgpl-2.1 | 3,491 | [
"Bioconductor"
] | 2a0b7e8fbf9bc706a71c08520978f8e9a6bd18a10485e0a078d7e414a56406f1 |
# GromacsWrapper environment.py
# Copyright (c) 2011 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
"""
:mod:`gromacs.environment` -- Run time modification of behaviour
========================================================... | PicoCentauri/GromacsWrapper | gromacs/environment.py | Python | gpl-3.0 | 8,039 | [
"Gromacs",
"MDAnalysis"
] | 98d47cfe80c9d9c492a344d621ebcb41f81463646970df18859654a3d967cae9 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/maarten/programming/subdownloader_old/scripts/gui/ui/main.ui'
#
# Created by: PyQt5 UI code generator 5.12.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(obj... | subdownloader/subdownloader | subdownloader/client/gui/generated/main_ui.py | Python | gpl-3.0 | 9,619 | [
"VisIt"
] | 7ca88dc19427d71a71a8bbce86c01ca968dd012868b8ceffca6900fb3deae28a |
# Sample module in the public domain. Feel free to use this as a template
# for your modules (and you can remove this header and take complete credit
# and liability)
#
# Contact: Brian Carrier [carrier <at> sleuthkit [dot] org]
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is f... | eXcomm/autopsy | pythonExamples/Sept2015ReportTutorial_CSV/CsvReportModule.py | Python | apache-2.0 | 4,244 | [
"Brian"
] | 1822ef99dcb2186357ada48ffc0292812d5333283aaf71706e115d39dd1cf485 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | andrebellafronte/stoq | stoqlib/domain/test/test_userbranchaccess.py | Python | gpl-2.0 | 1,574 | [
"VisIt"
] | 76fbf419317cbc3d8b008ee9dcb3c55a2de6df49c98d8eb3af533ec8dc789bb5 |
#!/usr/bin/env python
"""
compupute e_k according to e_{k-1} and p_{k-1}
author: Xiaowei Huang
"""
import numpy as np
import copy
from scipy import ndimage
from basics import *
from configuration import *
from networkBasics import *
############################################################
#
# initiali... | xiaoweih/DLV | safety_check/regionByDerivative.py | Python | gpl-3.0 | 14,933 | [
"NEURON"
] | 300570fe24cb43a1522bf3d153e991c4537c080015c1fda55d09bcc683ef1bb8 |
"""
Tests the SynthData class which is used to generate synthetic stellar
kinematic data from simple, Gaussian distributions.
"""
from __future__ import print_function, division, unicode_literals
from astropy.table import Table, join
import numpy as np
import pytest
import sys
sys.path.insert(0,'..')
from chronostar.... | mikeireland/chronostar | unit_tests/test_synthdata.py | Python | mit | 13,820 | [
"Gaussian"
] | a53131b7bf28a5787c3ba0f075ff59535f24453672c8f9ab760588ce423d4967 |
from ase import Atoms
from gpaw import GPAW
from gpaw.test import equal
from ase.units import Bohr, Hartree
a = 7.5 * Bohr
n = 16
atoms = Atoms('He', [(0.0, 0.0, 0.0)], cell=(a, a, a), pbc=True)
calc = GPAW(gpts=(n, n, n), nbands=1, xc='PBE')
atoms.set_calculator(calc)
e1 = atoms.get_potential_energy()
niter1 = calc.g... | ajylee/gpaw-rtxs | gpaw/test/revPBE.py | Python | gpl-3.0 | 805 | [
"ASE",
"GPAW"
] | 99ae5e8f8a1c1894333fe36f1d7c06e4a98608302eb4042b085abae6c35ce6d9 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/web/mediaplayerplay.py | Python | gpl-2.0 | 5,268 | [
"VisIt"
] | 8b72187c1ad93f53001c6c2c54d22a9019623d39954f4d8e2e608a05a7f9cf21 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Put SCF calculation in the background. Tune the SCF solver at runtime.
'''
import time
from pyscf import gto, scf, lib
mol = gto.Mole()
mol.build(
verbose = 4,
atom = [('H', (i*2.4, 0, 0)) for i in range(50)],
basis = 'sto6g',
)
m... | gkc1000/pyscf | examples/scf/70-background_and_hot_tuning.py | Python | apache-2.0 | 1,094 | [
"PySCF"
] | 6ec13d3691b582fa37013ccef1c6e3e218348c3562e43b6147bba99ddc840085 |
# -*- coding: utf-8 -*-
import datetime as dt
from warnings import warn
import numpy as np
from ..energy import Energy
from .tools import _CleanArgs, fproject, get_bragg_widths
class PlotInstrument(object):
r"""Class containing resolution plotting methods
Attributes
----------
description_string
... | granrothge/neutronpy | neutronpy/instrument/plot.py | Python | mit | 24,705 | [
"Gaussian"
] | ebeeb37cca40bd536c8f85c7b6642fceeda099172c3203e2839f884c355dfcd5 |
#!/usr/bin/env python
import json
import optparse
import os.path
def _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry ):
data_manager_dict['data_tables'] = data_manager_dict.get( 'data_tables', {} )
data_manager_dict['data_tables'][ data_table_name ] = data_manager_dict['data_tables... | Christian-B/galaxy_shedtools | tagdust_data_manager/data_manager/tagdust_architecture_data_manager.py | Python | gpl-2.0 | 4,451 | [
"Galaxy"
] | 0cb83f98f091f87c595a49974e82ffeb8899e50f522a4af8c382897ad5981dab |
""" JobMonitoringHandler is the implementation of the JobMonitoring service
in the DISET framework
The following methods are available in the Service interface
"""
__RCSID__ = "$Id$"
from types import IntType, LongType, ListType, DictType, StringTypes, StringType, NoneType, BooleanType
from DIRAC.Core.DISET.... | calancha/DIRAC | WorkloadManagementSystem/Service/JobMonitoringHandler.py | Python | gpl-3.0 | 18,691 | [
"DIRAC"
] | eb231c1de805691d30569e6212e8c75e06eead1aad05b4c6f5062c5abe2b9f96 |
########################################################################
# $HeadURL$
# File : JobHistoryAgent.py
# Author : A.T.
########################################################################
"""
JobHistoryAgent sends periodically numbers of jobs in various states for various
sites to the Monitoring s... | fibbo/DIRAC | WorkloadManagementSystem/Agent/JobHistoryAgent.py | Python | gpl-3.0 | 2,772 | [
"DIRAC"
] | 59f3a18815057b31594be0299b4ecaa9703e334604d7fa15e5d805257ae37581 |
from __future__ import division, absolute_import, print_function
import os
import sys
import types
import re
import warnings
from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype
from numpy.core import ndarray, ufunc, asarray
import numpy as np
# getargspec and formatargspec were removed in Python... | jjas0nn/solvem | tensorflow/lib/python2.7/site-packages/numpy/lib/utils.py | Python | mit | 36,568 | [
"VisIt"
] | 2eb04bbd6842d668a276aef589625fdd26c3ed04cb69590aea48ba3c702c11cf |
#!/usr/bin/env python
"""
kafe2 case study: Relative errors
=================================
Like many tools kafe2 supports specifying errors that are relative to measurement data: the errors
are calculated as the simple product of the absolute values of the data and the error values.
However, this approach results i... | dsavoiu/kafe2 | case_studies/relative_errors.py | Python | gpl-3.0 | 4,849 | [
"Gaussian"
] | 6dddb8cb8b8574ecf3bec89c2006401707161381138ce7ce393ad6f87c4f9d8e |
# This software is distributed under BSD 3-clause license (see LICENSE file).
#
# Authors: Heiko Strathmann, Cameron Lai
"""
Shogun Gaussian processes demo based on interactive SVM demo by Christian \
Widmer and Soeren Sonnenburg which itself is based on PyQT Demo by Eli Bendersky
Work to be done on parameter (e.g. k... | karlnapf/shogun | examples/undocumented/python/graphical/interactive_gp_demo.py | Python | bsd-3-clause | 13,912 | [
"Gaussian"
] | 625251cdb94882ad16b1e4baa70dcf5b60cf4a7cbe1bbbd34eb528f82dbe6700 |
import math
import numpy as np
import pytest
import ray
from ray import tune
from ray.tune.stopper import ExperimentPlateauStopper
from ray.tune.suggest import ConcurrencyLimiter
import unittest
def loss(config, reporter):
x = config.get("x")
reporter(loss=x ** 2) # A simple function to optimize
class Con... | ray-project/ray | python/ray/tune/tests/test_convergence.py | Python | apache-2.0 | 5,500 | [
"Gaussian"
] | 6b37d406c29e9230d7f30dd194a505876407769bd6bdebf752001f3de919dfa2 |
from __future__ import absolute_import
from __future__ import print_function
from owmeta_core.data import DataUser
from .DataTestTemplate import _DataTest
from owmeta.cell import Cell
class CellTest(_DataTest):
ctx_classes = (Cell,)
def test_DataUser(self):
do = Cell('', conf=self.config)
s... | openworm/PyOpenWorm | tests/CellTest.py | Python | mit | 2,908 | [
"BLAST"
] | f8a85bbf8038379bd74e29666d2ffd5b1378f3dea09f14173e240a07824ad9f7 |
# Copyright 2011 Rackspace
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2013 IBM Corp.
# 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
#
# ... | tianweizhang/nova | nova/tests/network/test_manager.py | Python | apache-2.0 | 156,562 | [
"FEFF"
] | fea3ca3db281eb62b630f2ee4318ee717d7edc3738c60f07653ce41780b410bc |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | espressomd/espresso | testsuite/python/brownian_dynamics.py | Python | gpl-3.0 | 5,990 | [
"ESPResSo"
] | db608ca515ba8ddbbda31b05653fe1a789d8106d28b1f7927785655a2d74feec |
'''
Author: Julian van Eyken
Date: Jan 25 2013
Routines for checking for hot-pixels in (uncalibrated) obs. files. In principle
should be relatively easily extendable to include other checks (e.g. for 'cold'
pixels).
The supplied obs. file is stepped through in short time steps, and a 2D mask
made for each step. The r... | bmazin/ARCONS-pipeline | hotpix/hotPixels.py | Python | gpl-2.0 | 62,569 | [
"Gaussian"
] | a6697e59384e09cf1581e6cb8150da2ffc197ef6348f4a70a697439ca4b754fd |
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print i
1
2
>>> g = f()
>>> g.next()
1
>>> g.next()
2
"Falling off the end" stops the generator:
>>> g.next()
Traceback ... | ktan2020/legacy-automation | win/Lib/test/test_generators.py | Python | mit | 52,546 | [
"VisIt"
] | 437692aa657889ed3c792b34fda56862e7d7465b8a0dadbde81209f6cefe6250 |
"""
Utility functions based on igakit.
"""
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import Struct
from sfepy.discrete.fem import Mesh
from sfepy.mesh.mesh_generators import get_tensor_product_conn
import six
from six.moves import range
def create_linear_fe_mesh(nurbs, pars=None):... | vlukes/sfepy | sfepy/discrete/iga/utils.py | Python | bsd-3-clause | 4,041 | [
"VTK"
] | 3bab1711998c6add356a096829592f26ca91dcf47aa2a67cf8d2b5e2ea002704 |
from __future__ import annotations
import math
from collections import namedtuple
from scitbx import matrix
from dials.algorithms.refinement.parameterisation.prediction_parameters import (
SparseGradientVectorMixin,
XYPhiPredictionParameterisation,
)
from dials.array_family import flex
class StateDerivativ... | dials/dials | algorithms/refinement/parameterisation/scan_varying_prediction_parameters.py | Python | bsd-3-clause | 28,449 | [
"CRYSTAL"
] | 2828a9d8ed072b149efac3b649e8b362e9bf41245b7f1077702c5ca492339aba |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkImageLuminance(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk... | nagyistoce/devide | modules/vtk_basic/vtkImageLuminance.py | Python | bsd-3-clause | 491 | [
"VTK"
] | 6af52a5b0511c85672fc1ebb3310440f9444e06b95a8f8bdc2d7630652b5b78d |
import sys
from token import ERRORTOKEN, OP, NAME
from tokenize import generate_tokens, untokenize
import ast
from cutter import cut
if sys.version_info[0] == 2:
from StringIO import StringIO
else:
from io import StringIO
def tokenize_bang(source):
"""Browse the source and replace any ! token by ._ast_re... | TeamSPoon/logicmoo_workspace | packs_web/butterfly/lib/python3.7/site-packages/cutter/utils.py | Python | mit | 2,634 | [
"VisIt"
] | efcca9d7baa2896b4b14881765e86068035c26945cf42dba700dec6cc7762094 |
"""
Wrapper on top of ElasticDB. It is used to manage the DIRAC monitoring types.
**Configuration Parameters**:
The following option can be set in `Systems/Monitoring/<Setup>/Databases/MonitoringDB`
* *IndexPrefix*: Prefix used to prepend to indexes created in the ES instance. If this
is not prese... | yujikato/DIRAC | src/DIRAC/MonitoringSystem/DB/MonitoringDB.py | Python | gpl-3.0 | 20,627 | [
"DIRAC"
] | 1a278cfe803339f4555e65955edd0f9151d25d471cda476eed23413cd2b3cca1 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Spatial_Resolution/space_resolution_per_meter_mov_fixed_percent.py | Python | mit | 4,190 | [
"Mayavi"
] | f583122a28b2b07aa3ef64118bff318050653dc561883cb94b1c4687e159d7fc |
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# 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.
import sys
__doc__="""
Consumer class that builds a Structure object. This is used by ... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/PDB/StructureBuilder.py | Python | apache-2.0 | 9,884 | [
"Biopython"
] | 81ce0dfe0a8c8725e539830d706e6b3240e71934b741864753c4aa46a0c0acac |
from __future__ import print_function
"""
Description:
Input: event / site data previously analyzed by photostim
Output:
- per-event probability of being direct / evoked / spont
- per-site probability of having evoked / direct input
- per-cell measurements of direct and presynaptic area
Whereas photo... | pbmanis/acq4 | acq4/analysis/tools/poissonScore/poissonScore.py | Python | mit | 53,882 | [
"Gaussian"
] | 45912a3f752e5417a2887ee0af5f4d9706bfa858b49535f76ad3d6670bc3a62c |
""" :mod: DMSRequestOperationsBase
====================
Just a collector of common functions
"""
__RCSID__ = "$Id $"
from DIRAC import S_OK, S_ERROR
from DIRAC.RequestManagementSystem.Client.Operation import Operation
from DIRAC.RequestManagementSystem.Client.File import File
c... | avedaee/DIRAC | DataManagementSystem/Agent/RequestOperations/DMSRequestOperationsBase.py | Python | gpl-3.0 | 2,051 | [
"DIRAC"
] | dd93cf56198988ce98d6847d0db38b5f1a61abaf983eb2406614ec66e12fc60c |
r"""
=======================================
Robust vs Empirical covariance estimate
=======================================
The usual covariance maximum likelihood estimate is very sensitive to the
presence of outliers in the data set. In such a case, it would be better to
use a robust estimator of covariance to guar... | RPGOne/Skynet | scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/examples/covariance/plot_robust_vs_empirical_covariance.py | Python | bsd-3-clause | 6,359 | [
"Gaussian"
] | c4e0cfb30a12b4959b7c23259af7c199eba5f695785ff7eee431fcaee53143e3 |
# ################################################################
#
# Active Particles on Curved Spaces (APCS)
#
# Author: Silke Henkes
#
# ICSMB, Department of Physics
# University of Aberdeen
# Author: Rastko Sknepnek
#
# Division of Physics
# School of Engineering, Physics and Mathem... | sknepneklab/SAMoS | analysis/batch_nematic/batch_analyze_nematic_long5_e.py | Python | gpl-3.0 | 2,574 | [
"VTK"
] | 61e24e8db61f568283c9fa7979e65ec7e745c0edf4f62fe10ed9a45ea80a1b77 |
# 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... | jendap/tensorflow | tensorflow/python/ops/gradients_util.py | Python | apache-2.0 | 41,439 | [
"VisIt"
] | e92440c4c5fcc942a6a0a59ab30d9cc7c2fc5a9ec5c506128ba9442ef5b7aa30 |
########################################################################
#
# File Name: __init__.py
#
#
from types import UnicodeType
"""
WWW: http://4suite.com/4DOM e-mail: support@4suite.com
Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved.
See http://4suite.com/COPYRIGHT for licen... | macosforge/ccs-calendarserver | txdav/xml/xmlext.py | Python | apache-2.0 | 24,916 | [
"VisIt"
] | 9b5c8daddd9dbf8b8672992ce789234afbf01cfc03d2a30f9612290f7e81df4f |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkSpherePuzzleArrows(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... | nagyistoce/devide | modules/vtk_basic/vtkSpherePuzzleArrows.py | Python | bsd-3-clause | 483 | [
"VTK"
] | af85f91b95a958f55f5bd069ef387eb044ce32c296e3387004fcdd4f1234c9c5 |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD-3-Clause
from copy import deepcopy
import itertools as itt
from math import log
import numpy as np
from .defaults import _EXTRAPOL... | mne-tools/mne-python | mne/cov.py | Python | bsd-3-clause | 79,341 | [
"Gaussian"
] | 42c9eb08dcc4202f6fe404e440ecae3413d1da6bba39aff5a34990d1a91a7b1d |
# 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 https://mozilla.org/MPL/2.0/.
from numbers import Integral
from itertools import product
from collections import deque, namedtuple
import numpy as np
... | zerothi/sisl | sisl/io/siesta/binaries.py | Python | mpl-2.0 | 83,380 | [
"SIESTA"
] | 69c13b486f61d33bcb594b3b2038008d9483fabad37ae41ed35cb4fdb2a6dd7b |
# MIT License
#
# Copyright (c) 2017, Stefan Webb. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | stefanwebb/tensorflow-models | tensorflow_models/models/vae_expconcrete.py | Python | mit | 10,517 | [
"Gaussian"
] | c26c4d29373620d5c37940f0c490987477b43ca9761521d1f716c871b3a45ef9 |
import pytest
import numpy as np
import elfi
from elfi.classifiers.classifier import LogisticRegression
from elfi.methods.bo.acquisition import LCBSC
from elfi.model.extensions import ModelPrior
def simple_gaussian_model(true_param, seed, n_summaries=10):
"""The simple gaussian model that has been used as a toy... | elfi-dev/elfi | tests/functional/test_bolfire.py | Python | bsd-3-clause | 3,240 | [
"Gaussian"
] | be5893bb1dbada3b68fc63154ea2f7ffbbdcd57c837e9f8dbd10b56d8ac6f7ed |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# viewuser - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of ... | heromod/migrid | mig/cgi-bin/viewuser.py | Python | gpl-2.0 | 1,104 | [
"Brian"
] | caafb22bc372f1218d149720d59602714084a605a8b8695e12f855766fd6db42 |
"""Service interface is the service which provide config for client and synchronize Master/Slave servers"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import os
import time
import re
import zipfile
import zlib
import DIRAC
from DIR... | ic-hep/DIRAC | src/DIRAC/ConfigurationSystem/private/ServiceInterfaceBase.py | Python | gpl-3.0 | 16,043 | [
"DIRAC"
] | 79628af6011be105795a651898db10116b0c5474030913a643b76e191c039aa0 |
"""
The MIT License
Copyright (c) 2008 Vijay Ganesh
2014 Jurriaan Bremer, jurriaanbremer@gmail.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
wit... | jirislaby/stp | bindings/python/stp/stp.py | Python | mit | 21,685 | [
"VisIt"
] | 5edfba08a184e22c32aeba6d2eaec516a46a0bfdf86d9b81ad11cead90586e37 |
import moose
import time
def profile_creation():
print('Only creation')
moose.Neutral('x')
t = time.time()
for i in range(10000):
moose.Neutral('x/x%d'%i)
print('Time taken %g s' % time.time()-t)
moose.delete('x')
def profile_creation_destruction():
print('Create and delete')
t... | dilawar/moose-core | tests/profiling/profile.py | Python | gpl-3.0 | 546 | [
"MOOSE"
] | 1d3829d7d782f88efafe0aa820ac4a9fe1a3f2427bedd58f15de486ab87e1e1d |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Cleaveland4(Package):
"""CleaveLand4: Analysis of degradome data to find sliced miRNA and ... | iulian787/spack | var/spack/repos/builtin/packages/cleaveland4/package.py | Python | lgpl-2.1 | 998 | [
"Bowtie"
] | a0cd7e4b7422f6149708e9ea14d9a1f9c1409aaf23cf1fca4d1c5d51effd4e43 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module contains some script utils that are used in the chemenv package.
"""
import re
import numpy as np
from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import (
SimplestChemenvStra... | materialsproject/pymatgen | pymatgen/analysis/chemenv/utils/scripts_utils.py | Python | mit | 17,180 | [
"pymatgen"
] | 7d0622a1fae80767623128f3a33d0fb56200a31b5d27bdf21f5a10a22082f60a |
#! /usr/bin/env python
#
# Copyright (C) 2015-2016 Rich Lewis <rl403@cam.ac.uk>
# License: 3-clause BSD
"""
## skchem.vis.atom
Module for atom contribution visualization.
"""
from rdkit.Chem.Draw import MolToImage, DrawingOptions
import numpy as np
from matplotlib import pyplot as plt
def plot_weights(mol, weight... | richlewis42/scikit-chem | skchem/vis/atom.py | Python | bsd-3-clause | 2,842 | [
"Gaussian",
"RDKit"
] | dabfab2ae84db72d5c7a9f1766ed61d232f18e98f8099e79dac02d719234902d |
# -*- coding: utf-8 -*-
"""
urls
~~~~
URL definitions.
:copyright: 2009 by tipfy.org.
:license: BSD, see LICENSE.txt for more details.
"""
from tipfy import Rule
def get_rules():
rules = [
Rule('/account/new', endpoint='users/new', handler='moe.users.handlers.SignupHandler'),
... | ac001/moe | project/app/moe/users/urls.py | Python | bsd-3-clause | 873 | [
"MOE"
] | a958296152c2004fcb2aba2a829bd84709c00f5edb2a4b194c250680ae988629 |
"""
Classes to wrap simulation engines for a uniform interface
* ``Python`` for simulations at the `channel` level
* ``NEURON`` for simulations at the `cellular` level
* ``Brian2`` for simulations at the `network` level
"""
from __future__ import print_function, division
import warnings
import logging
impo... | ProjectPyRhO/PyRhO | pyrho/simulators.py | Python | bsd-3-clause | 58,787 | [
"Brian",
"NEURON"
] | c13e3121725488caa19fbf1829382accf7e77ca58020b3a0d04196e01c6e9f4c |
from __future__ import division
from math import sqrt
from ase.atoms import Atoms, string2symbols
from ase.data import reference_states, atomic_numbers, chemical_symbols
def bulk(name, crystalstructure=None, a=None, c=None, covera=None, u=None,
orthorhombic=False, cubic=False):
"""Creating bulk systems.... | askhl/ase | ase/lattice/bulk.py | Python | gpl-2.0 | 7,325 | [
"ASE",
"CRYSTAL"
] | 025cb3f28e2ec8b3e8b8f1538aef6b3afdffeca82b379990cf267808053f7405 |
# Copyright (c) 2001 Autonomous Zone Industries
# This file is licensed under the
# GNU Lesser General Public License v2.1.
# See the file COPYING or visit http://www.gnu.org/ for details.
__revision__ = "$Id: MojoErrors.py,v 1.3 2003/01/08 13:14:09 myers_carpenter Exp $"
import exceptions
# throws by anythi... | zooko/egtp_new | egtp/MojoErrors.py | Python | lgpl-2.1 | 552 | [
"VisIt"
] | 6c9a7cfb3345112e33fa1cb5a9b3b3d531774cc7b50a00c429517a7a736678bd |
from MafiaBot.MafiaRole import MafiaRole
from MafiaBot.MafiaAction import MafiaAction
class Tracker(MafiaRole):
def GetRolePM(self):
ret = 'You are a Tracker. You may stalk another player at night and see the players they visit.'
if self.limiteduses > -1:
ret += ' You may only use thi... | LLCoolDave/MafiaBot | MafiaBot/Roles/Tracker.py | Python | mit | 2,183 | [
"VisIt"
] | 4a9f650e4aeddf99c1df0ec1ca9ab1d26dc21333c744da63305107c95491f031 |
try :
import pysam
except ImportError :
print "[Error] It seems that you haven't install \"pysam\" package.. Please do it before you run this script."
exit(-1)
import sys
from bs_align_utils import *
BAM = 'bam'
SAM = 'sam'
BS_SEEKER1 = 'bs_seeker1'
formats = [BAM, SAM, BS_SEEKER1]
class outfile:
de... | BSSeeker/BSseeker2 | bs_align/output.py | Python | mit | 5,535 | [
"pysam"
] | 52ffebd7b04be0dc82cac9b727d13248d51620b90919ced27afa8cb58907fc07 |
#! /usr/bin/env python
"""
Copyright 2016 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 or agreed to ... | haeusser/learning_by_association | semisup/mnist_train_eval.py | Python | apache-2.0 | 4,793 | [
"VisIt"
] | 984c136111f64414fcd06a8773e1724ae1217925969547e839cc887d9226841f |
########################################################################
# $HeadURL$
# File: RequestTests.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/07/24 10:23:40
########################################################################
""" :mod: RequestTests
=======================
.. module: R... | chaen/DIRAC | RequestManagementSystem/Client/test/Test_Request.py | Python | gpl-3.0 | 16,595 | [
"DIRAC"
] | 7a05e42fb592ef2104829e1bf25ac11d8590fa43a20e9f684944e009f891db19 |
"""`jacquard` command-line tool handling."""
import os
import sys
import logging
import pathlib
import argparse
import functools
import contextlib
import pkg_resources
from jacquard.config import load_config
from jacquard.plugin import plug_all
from jacquard.commands import CommandError
from jacquard.constants impor... | prophile/jacquard | jacquard/cli.py | Python | mit | 5,339 | [
"exciting"
] | 85ade87bca0d14044b3f04e1f3aeecf325a9c0b7e226490e32b80e3dbab5c785 |
# -*- coding: utf-8 -*-
"""
molvs.fragment
~~~~~~~~~~~~~~
This module contains tools for dealing with molecules with more than one covalently bonded unit. The main classes are
:class:`~molvs.fragment.LargestFragmentChooser`, which returns the largest covalent unit in a molecule, and
:class:`~molvs.fragment.FragmentRem... | bp-kelley/rdkit | rdkit/Chem/MolStandardize/fragment.py | Python | bsd-3-clause | 11,251 | [
"RDKit"
] | 6d540a31452d8fdf6dbf3644ca00af548643a5b1bd042781aba6c2b02d160dbf |
# Copyright 2005-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author(s): Brian Harring (ferringb@gentoo.org)
import os as _os
import sys
from portage.cache import template
from portage import os
from portage.proxy.lazyimport import lazyimport
lazyimport(globals(),
'port... | nullishzero/Portage | pym/portage/cache/fs_template.py | Python | gpl-2.0 | 2,809 | [
"Brian"
] | 5a52d87ff21b8f4b2a8a09e6ad99ade0919b6b985fda750054ba6bb23636120f |
#
# Copyright (C) 2015 Greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
from rdkit import Chem
from rdkit.Chem import AllChem
import nu... | adalke/rdkit | Contrib/PBF/pbf.py | Python | bsd-3-clause | 1,833 | [
"RDKit"
] | f483c181e8ba485f095fed9ec8228f9da7afee4da36f073c35d0cf0a2c84304f |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | theochem/horton | horton/io/test/test_molekel.py | Python | gpl-3.0 | 3,968 | [
"ORCA"
] | 26d34bc932e2a13737db37e0c5e9e3a8fdf32be02e6482ee784f0aaff9b06241 |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
'''
Nonlinear prediction
A number of phase space based prediction techniques are
implemented in TISEAN. They differ in the way in which
the dynamics is approximated. The very similar programs
zeroth and predict use locally constant fits. This is the
most robust approa... | sdia/tisane | nonlinear_prediction.py | Python | gpl-3.0 | 12,828 | [
"Gaussian"
] | 1c80698d613b6c6f1bb0ec847b04f373e431ed36adcd083f00cb57ee4ec8b3ff |
'''This is a test for functionality of ANN_simulation.py
'''
import sys, os, math, subprocess, matplotlib
from functools import reduce
matplotlib.use('agg')
sys.path.append('../src/') # add the source file folder
from ANN_simulation import *
from numpy.testing import assert_almost_equal, assert_equal
class test_S... | weiHelloWorld/accelerated_sampling_with_autoencoder | MD_simulation_on_alanine_dipeptide/current_work/tests/ANN_simulation_test.py | Python | mit | 34,218 | [
"MDTraj"
] | 23d6eb2b1dd637205f5ccce4cb036c6c54b9bc5d600f58110c796f17652dadfe |
"""
====================================================================
K-means clustering and vector quantization (:mod:`scipy.cluster.vq`)
====================================================================
Provides routines for k-means clustering, generating code books
from k-means models, and quantizing vectors ... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/scipy/cluster/vq.py | Python | agpl-3.0 | 25,571 | [
"Gaussian"
] | 0ac99657ab400dc23306e7fd1fdb95660266d6679c27bdd1c3021c1d32ce4601 |
import os
import sys
import nest
import time
import logging
import datetime
import numpy as np
import nest.topology as tp
import matplotlib.pyplot as plt
from collections import defaultdict
from parameters import *
from time import clock
from data import *
dictPosition_NeuronID = {} # position (1,0,1) : 6 neuron ID
... | research-team/NEUCOGAR | NEST/visual/association/scripts/func.py | Python | gpl-2.0 | 10,647 | [
"NEURON"
] | ed009153f98679e19602c4a6635cf139fed3a2001f12f17ef1a83db63bc9e171 |
# -*- coding: utf-8 -*-
"""
@author: sebi
gaussfit.py
Version: 0.4
Date: 2015-11-02
"""
import numpy as np
from scipy.optimize import curve_fit
from scipy import optimize
from pylab import *
# define your fitting function
def gaussian1D(x, bgrd, height, center, sigma):
"""Gauss 1D function y = a + (b-a)*exp(-(... | sebi06/PSF_XYZ_Bead_Fit | gaussfit.py | Python | bsd-2-clause | 3,098 | [
"Gaussian"
] | 62d3a777684adbf690dc72f28d427a4477165ce0dc99c95d79183a4af7a4f702 |
##############################################################################
# Copyright (c) 2013-2017, 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... | TheTimmy/spack | var/spack/repos/builtin/packages/cdo/package.py | Python | lgpl-2.1 | 5,115 | [
"NetCDF"
] | 33a195024f9bde2a526de77f76230b5c02d1c33599c7faae78cdb5dce0d24d50 |
"""
Rewrite of rgFastQC.py for Version 0.11.2 of FastQC.
Changes implemented from tmcgowan at
https://testtoolshed.g2.bx.psu.edu/view/tmcgowan/fastqc
and iuc at https://toolshed.g2.bx.psu.edu/view/iuc/fastqc
with minor changes and bug fixes
SYNOPSIS
rgFastQC.py -i input_file -j input_file.name -o output_html_fil... | jhl667/galaxy_tools | tools/fastqc/fastqc.py | Python | apache-2.0 | 6,443 | [
"Galaxy"
] | 420833c80a2e0e96faaf9846d08a660998507f6b0cd8b1bb7553f0d9b48e70c4 |
# FIXME: to bring back to life
""" This class fills the main and auxiliary tables of the Logging Database.
It provides the functions:
FillMesssageRepository()
"""
from random import randrange
import DIRAC
from DIRAC.Core.Utilities.Time import dateTime, toString, hour, second, minute
from DIRAC.FrameworkS... | Andrew-McNab-UK/DIRAC | tests/Integration/Framework/fillLoggingDB.py | Python | gpl-3.0 | 2,612 | [
"DIRAC"
] | f202fa59ca5c1c6a4d0553ba2d53c13d091d0d2d78f36f95ff539ad8ec2cf6ce |
from syntax import *
# ------------------------ EVALUATION ------------------------
class NoRuleApplies(RuntimeError):
pass
def isnumericval(term):
ty_term = type(term)
if ty_term is TmZero:
return True
elif ty_term is TmSucc:
isnumericval(term.term)
return False
def isval(term... | habibutsu/tapl-py | fullpoly/core.py | Python | mit | 12,036 | [
"VisIt"
] | 460f25a3a835bd0eba008138b035a26f49814f938fd16322f46d8481b1b6334a |
# 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/lb_streaming.py | Python | gpl-3.0 | 3,492 | [
"ESPResSo"
] | c63f5b702f21b14701b46a2a9f70beb180c82a7482666eee384d67228011aaa4 |
# Copyright 2015 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | planetlabs/datalake | ingester/setup.py | Python | apache-2.0 | 2,202 | [
"Brian"
] | 6505d3ea84c053b02b4149b4f18303a257279432d3dfb64001bae2b21f12f5ed |
#!/usr/bin/python
"""
# Created on Aug 12, 2016
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23
#
# module_check: not supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
"... | hryamzik/ansible | lib/ansible/modules/network/avi/avi_api_session.py | Python | gpl-3.0 | 8,314 | [
"VisIt"
] | 3ca003acab7f36e7c4ca1f79b2675d861d4fd62202590ad7155b543ad53a829b |
import datetime
import random
import string
from django.conf import settings
from django.core.files.temp import NamedTemporaryFile
from django.core.urlresolvers import reverse
from django.test import TestCase
from anagrafica.models import Delega
from anagrafica.permessi.applicazioni import PRESIDENTE, UFFICIO_SOCI
fr... | CroceRossaItaliana/jorvik | articoli/tests.py | Python | gpl-3.0 | 15,369 | [
"VisIt"
] | 405fe2d4509a845ba2ddcc5d984d185e81b29d553d3e554b3249b561a08e4d60 |
#!/usr/bin/env python2.7
#
# Copyright 2016 The AMP HTML 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
#
# ... | zhangsu/amphtml | validator/webui/build.py | Python | apache-2.0 | 5,619 | [
"GULP"
] | 7602ebca1ef376553b1933f45b7c12115774bee107820f4154cb1472ae010cb9 |
"""Criteria for Bayesian optimization
"""
import numpy as np
import scipy.stats
def EI_empirical(samples, thresh):
"""Expected Improvement over threshold from samples
(See example usage in EI_gaussian_empirical)
"""
improvement = np.maximum(samples - thresh, 0)
return improvement.mean()
def EI_... | w1kke/hyperopt | hyperopt/criteria.py | Python | bsd-3-clause | 2,631 | [
"Gaussian"
] | ef0c337351317ad4d3a62268b9fb43ac2c489d62bbe592785190898ff188e1da |
# -*- coding: utf-8 -*-
#
# sensitivity_to_perturbation.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... | SepehrMN/nest-simulator | pynest/examples/sensitivity_to_perturbation.py | Python | gpl-2.0 | 8,848 | [
"NEURON"
] | 850b6dec7f602551020faf0c76141a50330bb58776ba0be54ac3c43582c3c2f0 |
"""
Simple FASTA parsing library.
functions:
* seq = load_single(f, strict=1, force=None) -- load a single sequence from f
* dict = load(f, strict=1, force=None) -- load all the sequences in f
* is_protein(seq), is_DNA(seq) -- test for valid protein/DNA
* force_protein(seq), force_DNA(seq) ... | ctb/paircomp | tests/fasta.py | Python | lgpl-2.1 | 8,130 | [
"BLAST"
] | c829fe77be0f8e22040e7ecec9aeb1251f2d37f7a89734a9c338e1dad062f271 |
"""Check if ase issues a warning if level shift breaks symmetry."""
from warnings import catch_warnings, simplefilter
from ase import Atoms
from ase.calculators.nwchem import NWChem
def main():
"""The main routine for the prove of the warning."""
cr_atom = Atoms('Cr', positions=[(0, 0, 0)], pbc=False, magmom... | askhl/ase | ase/test/nwchem/nwchem_strong_levelshift.py | Python | gpl-2.0 | 889 | [
"ASE",
"NWChem"
] | 0a9ddd8ab702423534947ccfeb57741f5d67b6377e1a69024b5a50c6d0485bbe |
"""
This is the original exercise (43) from the book 'Learn Python the Hard Way'.
It is included here for reference and not used with Realm of Reckoning.
"""
from sys import exit
from random import randint
class Scene(object):
def enter(self):
print "This scene is not yet configured. Subclass ... | vonnenaut/realmofreckoning | ex43.py | Python | gpl-3.0 | 9,162 | [
"BLAST"
] | ca1cfa4119101294f48b72303ed4dde9b91ec6e8c9ccf8452614d24c053fa861 |
##############################################################################
# Copyright (c) 2013-2017, 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... | skosukhin/spack | var/spack/repos/builtin/packages/r-aneufinder/package.py | Python | lgpl-2.1 | 2,813 | [
"Bioconductor"
] | c471d6c633113e72b36e409ff8b08ce5572707be901159569a487d17b170103c |
# -*- coding: utf-8 -*-
"""test_muparser.py:
Modified from https://elifesciences.org/articles/25827 , Fig4.py
"""
import sys
import os
import numpy as np
import sys
import numpy as np
import moose
import abstrModelEqns9 as ame
import rdesigneur as rd
def singleCompt( name, params ):
mod = moose.cop... | upibhalla/moose-core | tests/python/test_muparser.py | Python | gpl-3.0 | 5,679 | [
"MOOSE",
"NEURON"
] | 122b0ad08c7d76ef473257f4a9e2b94fe71e0dfa5e3d7a4219a8a63bea9ab2b9 |
from gym.spaces import Space
from typing import Optional
from ray.rllib.utils.exploration.ornstein_uhlenbeck_noise import \
OrnsteinUhlenbeckNoise
from ray.rllib.utils.schedules import ConstantSchedule
class PerWorkerOrnsteinUhlenbeckNoise(OrnsteinUhlenbeckNoise):
"""A per-worker Ornstein Uhlenbeck noise cla... | richardliaw/ray | rllib/utils/exploration/per_worker_ornstein_uhlenbeck_noise.py | Python | apache-2.0 | 1,945 | [
"Gaussian"
] | 02dbc0c3ab2d229741f69a309cad92b9a040e1b7a058424ec08124f275a52f53 |
# -*- coding: utf-8 -*-
# This file is part of Bika LIMS
#
# Copyright 2011-2017 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.
import sys
import transaction
from magnitude import mg
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from plone.indexer import... | rockfruit/bika.lims | bika/lims/content/analysisservice.py | Python | agpl-3.0 | 62,129 | [
"VisIt"
] | d4059b56316eba965d1aafe2c69e07a072c15e6e2a057f522da72cae5fe1fda1 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
#!/usr/bin/env python
from __future__ import division, unicode_literals
"""
This module has been moved pymatgen.io.gaussian. This sub module will
be removed in pymatgen 4.0.
"""
__author__ = 'Shyue Ping Ong'
... | Bismarrck/pymatgen | pymatgen/io/gaussianio.py | Python | mit | 682 | [
"Gaussian",
"pymatgen"
] | afa11c28b34b4b0ac6282914debd1a94bcb2e410b59cb52fd30b5ab427c89962 |
import numpy as np
from copy import copy
from bokeh.core.properties import field
from bokeh.io import curdoc
from bokeh.layouts import layout,column,row
from bokeh.models import (
ColumnDataSource, HoverTool, SingleIntervalTicker, Slider, Button, Label,
CategoricalColorMapper,
)
from bokeh.models.widgets import... | sandipde/bokehplot | plot-server/cosmo2.py | Python | mit | 18,210 | [
"Jmol"
] | c18ab21b2f701f22d8c99ef7530b1fb93a2dc621a44ae17f19e918c7d644f18f |
import unittest
import networkx as nx
import os
import numpy as np
import sys
import math
'''
This class allows for testing of graph generation using unit tests and saves them to a log file so it can be ran from the command line
efficiently
'''
class TestGraph(unittest.TestCase):
'''
Cons... | kharris/prebotc-graph-model | testing/graph_tests.py | Python | bsd-3-clause | 5,017 | [
"NEURON"
] | 3237735d5d9a111d435f90f7f1910f13f9f6cf81b5067670498a1a4f341ace5f |
import os
from pytest import approx
from pymt.component.component import Component
from pymt.framework.services import del_component_instances
def test_no_events(with_no_components):
del_component_instances(["AirPort"])
comp = Component("AirPort", uses=[], provides=[], events=[])
comp.go()
assert c... | csdms/coupling | tests/component/test_one_component.py | Python | mit | 2,287 | [
"NetCDF"
] | 6872f2f0e938939974c92805d7a0f0b6f6099e270238ffcebb2ee9807d836b83 |
#!/usr/bin/env python3
from netcdfTools import *
import sys
import argparse
import numpy as np
from mapTools import readNumpyZTile
from utilities import writeLog
'''
Description:
Reads data from Numpy npz file and exports it as an array in NetCDF.
Note that dealing with larger rasters require a lot of memory.
'''
#===... | mjsauvinen/P4UL | pyNetCDF/rasterToNetCdf.py | Python | mit | 4,169 | [
"NetCDF"
] | b68175b3d7fff6e9f3d6b75bb364d2705833750ce7330149985ecb4d0a38ed32 |
#This script is responsible for crawling over Galaxy histories by taking in a
import optparse
import json
import bioblend,sys
import multiprocessing
import pandas
import collections
from bioblend.galaxy import GalaxyInstance
parser = optparse.OptionParser()
#parser.add_option("--job_id",action="store",type="string",... | wohllab/milkyway_proteomics | galaxy_milkyway_files/tools/wohl-proteomics/wohl_skyline/job_history_runner.py | Python | mit | 7,434 | [
"Galaxy"
] | 64040c8da0f6714ff79af6045da97ce51e8d5398028881b9f5263a8865414f97 |
from __future__ import nested_scopes
"""
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck@... | marco-mariotti/selenoprofiles | libraries/SOAPpy/Server.py | Python | gpl-2.0 | 27,136 | [
"Brian"
] | 4c5424cc388752657713a7c4e368e1bcf0576fb782860c859945af98dcd5e180 |
# -*- coding: utf-8 -*-
'''
Created on Mar 20, 2013
@author: Bartosz Alchimowicz
'''
from src.pytenseshift import PlPyTenseShift
from src.pytenseshift import EnPyTenseShift
pl = PlPyTenseShift()
#print pl.getPastTense("Jadę na rowerze.")
#print pl.getPastTense("Ala ma kota.")
print pl.getPastTense("Ja mam kota a Mar... | perfidia/pytenseshift | src/main.py | Python | mit | 1,589 | [
"VisIt"
] | 1ddebe09f691a9b6de9f26abbebee91f277793c303c32572c35a88ecd1a482d3 |
"""
Acceptance tests for the certificate web view feature.
"""
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.certificates import CertificateConfigFixture
from common.test.acceptance.fixtures.course import CourseFixture, CourseUpdateDesc, XBlockFixtureDesc
from common.test.acceptance.pages.c... | angelapper/edx-platform | common/test/acceptance/tests/lms/test_certificate_web_view.py | Python | agpl-3.0 | 10,271 | [
"VisIt"
] | 39e0c2c0a16fcb629a051ae888d3218ad4b1c7d2b7ac5f2b26acaff54505441e |
# This work was funded by Roche and generously donated to the free
# and open source cheminformatics community.
import warnings
warnings.simplefilter('default', DeprecationWarning)
warnings.warn("The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.",
DeprecationWarning,stacklevel... | greglandrum/rdkit | rdkit/Chem/MCS.py | Python | bsd-3-clause | 17,305 | [
"RDKit"
] | 0ac3d7f003c5a59d6451b3787baea5bd55a400c734b88e1ec76daa0754345a56 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/e2-openwbif | plugin/controllers/views/web/external.py | Python | gpl-2.0 | 5,602 | [
"VisIt"
] | e63d72e07463a1fe081c14a65632b5ad76948fb5c1ed3de3b3a0e9d2ffafc706 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.