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 |
|---|---|---|---|---|---|---|---|
from com.im.lac.types import MoleculeObject, MoleculeObjectIterable
from java import lang
import sys
#Place the python module on the path
#sys.path.append('/lac/components/rdkit-camel/src/main/python')
from java.util import ArrayList
from find_props.find_props import calc_props
from java.lang import Class
lang.Syste... | InformaticsMatters/squonk | components/rdkit-camel/src/main/python/calc_props.py | Python | apache-2.0 | 580 | [
"RDKit"
] | e2403e23b630abe3b1255a5f497c34e7c31b0db7411a05f933a323b88e138f50 |
#!/usr/bin/env python2
##################################################
# GNU Radio Python Flow Graph
# Title: FM Radio
# Author: Brian McLaughlin (bjmclaughlin@gmail.com)
# Generated: Sun Mar 6 13:27:58 2016
##################################################
if __name__ == '__main__':
import ctypes
import ... | SpinStabilized/fm_radio | fm_radio.py | Python | gpl-3.0 | 50,200 | [
"Brian"
] | 76a3e1629042f032f55bed5eee5946436a1c183cb00547ab0146bf4cc1d0ef51 |
"""
Initializers
"""
import numpy as np
import theano
from blocks.initialization import NdarrayInitialization
class GlorotUniform(NdarrayInitialization):
"""Initialize parameters from an isotropic Gaussian distribution.
Parameters
----------
std : float, optional
The standard deviation of the... | tombosc/dict_based_learning | dictlearn/inits.py | Python | mit | 1,120 | [
"Gaussian"
] | 299bf04a21a2a5a77f4c314438016dd12cdef37a54042e9ce400270d1ad1a3b7 |
from sword2 import HttpLayer, HttpResponse
from octopus.lib import http
import json
from requests.auth import HTTPBasicAuth
class OctopusHttpResponse(HttpResponse):
def __init__(self, *args, **kwargs):
self.resp = None
if len(args) > 0:
self.resp = args[0]
def __getitem__(self, att... | JiscPER/magnificent-octopus | octopus/modules/swordv2/client_http.py | Python | apache-2.0 | 1,816 | [
"Octopus"
] | 467a08682df310f9300d5a34951feeaa048f209168c6977e8c5db44c9793ddac |
"""
Tests the converters
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import tempfile
import unittest
import pysam
import ga4gh.backend as backend
import ga4gh.client as client
import ga4gh.converters as converters
class TestSamConverter(unittest... | diekhans/ga4gh-server | tests/unit/test_converters.py | Python | apache-2.0 | 4,241 | [
"pysam"
] | 15aaf3474627ea95fc3c9521021358d1948376ceebb94b300cfd0cf85a0870f3 |
# 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 Fpocket(MakefilePackage):
"""fpocket is a very fast open source protein pocket detection a... | iulian787/spack | var/spack/repos/builtin/packages/fpocket/package.py | Python | lgpl-2.1 | 879 | [
"NetCDF"
] | 510254068062a27e7f5e3997b3f8b065b3452561ad1fc08ccd9a7d68a4b6df88 |
'''
Created on Feb 5, 2017
@author: Jake
'''
from Neuron import *
from Connection import *
import numpy as np
import Draw_Test
import Population
class Individual(object):
genome = {}
inputNodes = []
hiddenNodes = []
outputNodes = []
neuronList = []
fitness = 0.0
ID = 0
def __... | JakeShulman/G-Neat | Individual.py | Python | apache-2.0 | 7,797 | [
"NEURON"
] | a5d6bdfa52cf2df94a2f6b997261d2108ccda55579bcc5775da8637abed965d3 |
import networkx as nx
import numpy as np
class Skeleton(object):
def __init__(self, skeleton_id, graph ):
self.skeleton_id = skeleton_id
self.graph = graph
def get_skeleton(connection, skeleton_id):
""" Fetch a skeleton from the database and return it as a Skeleton object containing
a Net... | catmaid/CAT | cat/morphology.py | Python | mit | 3,392 | [
"NEURON"
] | 93e357538f66217325f9c19f0aed164c8f45c68d0746650d58d1f1d6afb21578 |
# Copyright (C) 2010 CAMd
# Copyright (C) 2010 Argonne National Laboratory
# Please see the accompanying LICENSE file for further information.
import numpy as np
from gpaw.mpi import SerialCommunicator, serial_comm
from gpaw.matrix_descriptor import MatrixDescriptor, \
BandMatrixDescriptor, \
BlacsBandMatrix... | ajylee/gpaw-rtxs | gpaw/kohnsham_layouts.py | Python | gpl-3.0 | 25,588 | [
"GPAW"
] | a1d36321222e10ae0c02321db1e2954750d4b926d7820d323ca36338d45db954 |
from __future__ import print_function, absolute_import
import modeller
from allosmod.modeller import _truncated_gaussian
class TruncatedGaussian(modeller.forms.RestraintForm):
"""AllosMod truncated Gaussian restraint.
This is implemented as a C extension (_truncated_gaussian.so)
to Modeller."""
... | salilab/allosmod-lib | lib/allosmod/modeller/forms.py | Python | lgpl-2.1 | 1,018 | [
"Gaussian"
] | 5e63a3f03229cb231dce831b6f1ba0a8af70e07a4377f95eca708f43ca189dba |
import glob
import hashlib
import os
from subprocess import check_call
import h5py
import openmc
import pytest
from tests.testing_harness import TestHarness
from tests.regression_tests import config
vtk = pytest.importorskip('vtk')
class PlotVoxelTestHarness(TestHarness):
"""Specialized TestHarness for running ... | liangjg/openmc | tests/regression_tests/plot_voxel/test.py | Python | mit | 1,877 | [
"VTK"
] | ca4050e72c841d1eda1b6f6697cce0a5b09640336c9ea558bf11911fc0cbd580 |
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software ... | j00bar/ansible | lib/ansible/galaxy/api.py | Python | gpl-3.0 | 11,030 | [
"Galaxy"
] | ac84f6d36ad39338ac65067db0e24aaed48d70054d9c8bb1851c2e234f121ad3 |
# 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_openmx_import_scfout.py | Python | apache-2.0 | 4,547 | [
"OpenMX",
"PySCF"
] | 22edb83662a04b38afac9340f05eab602864c8c9c6055f035880956ed5374fa5 |
# -*- coding: utf-8 -*-
"""Timesketch enhancer that exports Timesketch results."""
import time
from typing import List, Optional, TYPE_CHECKING
from dftimewolf.lib import module
from dftimewolf.lib import timesketch_utils
from dftimewolf.lib import utils
from dftimewolf.lib.containers import containers
from dftimewo... | log2timeline/dftimewolf | dftimewolf/lib/enhancers/timesketch.py | Python | apache-2.0 | 18,046 | [
"VisIt"
] | a5f968240c29a30950521379b98afe80037b471d639ace0914d844c3a2591a38 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Development script to get the multiplicity of the separation facets for some model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__ve... | gVallverdu/pymatgen | dev_scripts/chemenv/plane_multiplicity.py | Python | mit | 1,764 | [
"pymatgen"
] | c37a962038812a1bf9ceb589fa8cae9bc9fe555e4d6fcf33a7d63763daf8303f |
#!/usr/bin/env python
import sys
import os
import re
import glob
import xmltodict
import json
import yaml
import copy
import logging
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
from elasticsearch1 import Elasticsearch
from collections import OrderedDict
import datetime
import d... | ICGC-TCGA-PanCancer/pcawg-central-index | pcawg_metadata_parser/generate_QC_reports.py | Python | gpl-2.0 | 63,250 | [
"BWA"
] | b500860c33a285df54eda75f22c9ec6375aa5e5e80aa0ab80f9f8334ea69ca0b |
"""
Painless environment setup for acceptance tests. Powered by behave.
Visit the docs at
https://behave.readthedocs.io/en/latest/tutorial.html#environmental-controls
"""
from contextlib import contextmanager
from os import chdir, getcwd, system
from os.path import dirname, join
from shutil import rmtree
from tempfile... | painless-software/painless-continuous-delivery | tests/acceptance/environment.py | Python | apache-2.0 | 2,100 | [
"VisIt"
] | b2b8e449d29175e08629771911b14f49de46edefe08fec2ec34ba877f72cec98 |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | PeterLauris/aifh | vol3/vol3-python-examples/examples/example_xor.py | Python | apache-2.0 | 2,029 | [
"VisIt"
] | e4a73ee0dba42cba3b48bd0ed52736511099ed95ea934453e9fa69d9b63ab2c5 |
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
from sympy.... | nuclear-wizard/moose | python/mms/moosefunction.py | Python | lgpl-2.1 | 1,501 | [
"MOOSE"
] | b4828ffef7e72816374a1220fab531765c3d4e65e92f955bcb9089f6b1549263 |
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Core module for Pelix.
Pelix is a Python framework that aims to act as OSGi as much as possible
:author: Thomas Calmant
:copyright: Copyright 2016, Thomas Calmant
:license: Apache License 2.0
:version: 0.6.4
..
Copyright 2016 Thomas Calmant
Licensed... | ahmadshahwan/ipopo | pelix/framework.py | Python | apache-2.0 | 56,724 | [
"VisIt"
] | aa82497d6387fd9e49d8f709a6f5511209978d4a01c8c732d74c938fcbac85a8 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | capoe/espressopp.soap | src/RealND.py | Python | gpl-3.0 | 3,386 | [
"ESPResSo"
] | 675c29809b1f0d3296b91c56db1938bb374e4ca5cbac2369838bbd6035c073a1 |
# Script to parse ECP files into XML format for use by libecpint
# Usage: python parseecp.py [NAME]
# will convert raw/NAME.ecp into xml/NAME.xml
# which can then be found by libecpint using reference "NAME"
from lxml import etree
# letter symbols for angular momentum shells
# can be added to if needed
angular_shells ... | robashaw/libecpint | share/libecpint/parseecp.py | Python | mit | 6,428 | [
"Gaussian",
"Molpro"
] | e7c8ef5f834efbc0dc7a0fa2e5b79b20303a69cb379ecac0565297362b957224 |
#!/usr/bin/env python
"""Display mean length of sequences in a fasta file.
Usage:
%program file.fasta"""
import sys
try:
from Bio import SeqIO
except:
print "This program requires the Biopython library"
sys.exit(0)
try:
handle = open(sys.argv[1], 'rU')
lengths = map(lambda seq: len(seq.seq),... | enormandeau/Scripts | fasta_mean_len.py | Python | gpl-3.0 | 440 | [
"Biopython"
] | 0080d15e4e4dd9e199e5c44e876c01340bf395bac40fda5d16063cd826fab26d |
import click
from .pottemps import compute_pottemps
@click.group()
def generators():
return
@generators.command()
@click.argument('dest_dir')
@click.option('--num_procs', type=int,
default=1,
help="Number of processes to use. Default: 1.")
@click.option('--test', is_flag=True,
... | laliberte/pyteos_nc | pyteos_nc/generators/__init__.py | Python | gpl-3.0 | 1,575 | [
"NetCDF"
] | ccf0121a7ebc0f3a6ff46a5f29aeb52f01d1b0e6c2c7346537dd35ed747be1a4 |
"""Host configuration parameters.
Modify these paths to suit your installation.
"""
# Main modelsim executable, full absolute path.
MODELSIM_EXEC_PATH = "D:/dev/FPGA/Modelsim-ASE/modelsim_ase/win32aloem/vsim.exe"
# Software simulator executable, relative path (with extension if in win32).
SWSIM_EXEC_PATH = "../../to... | jaruiz/ION | tools/runtest/config.py | Python | lgpl-3.0 | 352 | [
"ASE"
] | 61363a5c91fe77bdece60d714645062c73292b784072c3d81f6f1a09b2b61009 |
__author__ = 'sibirrer'
from astrofunc.LensingProfiles.nfw import NFW
from astrofunc.LensingProfiles.nfw_ellipse import NFW_ELLIPSE
import numpy as np
import numpy.testing as npt
import pytest
class TestNFW(object):
"""
tests the Gaussian methods
"""
def setup(self):
self.nfw = NFW()
d... | sibirrer/astrofunc | test/test_nfw.py | Python | mit | 4,093 | [
"Gaussian"
] | 373cf8764814b8e48f3c7cab4af65a5d8ff6b94fdd560a1b43b4991b9e6e2ebb |
from director import vtkAll as vtk
from director import vtkNumpy as vnp
from director.shallowCopy import shallowCopy
import numpy as np
def encodePolyData(polyData):
'''Given a vtkPolyData, returns a numpy int8 array that contains
the serialization of the data. This array can be passed to the
decodePolyDa... | RobotLocomotion/director | src/python/director/geometryencoder.py | Python | bsd-3-clause | 1,432 | [
"VTK"
] | 991dc6649f0b38fc27276ec38fa19186cb4394603dc3c4e50d1fbd43649e1f47 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Django
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
# app
from apps.books.views import BookView
urlpatterns = [
url(r'^api-auth/', include('... | TraMZzz/test | server/project/urls.py | Python | bsd-3-clause | 1,132 | [
"VisIt"
] | e434a189f1332fd48ecd523ee768496e409ca5252fdeaefe29ab751443142117 |
r"""
Sequences (:mod:`skbio.sequence`)
=================================
.. currentmodule:: skbio.sequence
This module provides classes for storing and working with biological sequences,
including generic sequences which have no restrictions on which characters can
be included, and sequences based on IUPAC-defined se... | demis001/scikit-bio | skbio/sequence/__init__.py | Python | bsd-3-clause | 7,644 | [
"scikit-bio"
] | b161b5d5b352534a88e7d29501a29336284882f5923b0fb657e770cb100cf3c6 |
#!/usr/bin/env python
#--------------------------------------------------------------------
# load module
#
import time
start_time = time.time()
import sys
import os
import numpy as np
import scipy.io.netcdf as nio
from netCDF4 import Dataset as NCDataset
# from Scientific.IO.NetCDF import NetCDFFile as NCDataset # No... | TheEarnest/Spectral_nudging | models/CAM4/func_change_CAM_yymmddss.py | Python | gpl-3.0 | 1,345 | [
"NetCDF"
] | 69f810b88b95c35e55f4d877264c6d26e3fb115582b1f3fc7a00997a94128a20 |
#!/usr/bin/env python3
#
# Copyright (C) 2018-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... | KaiSzuttor/espresso | maintainer/gh_post_docs_warnings.py | Python | gpl-3.0 | 3,198 | [
"ESPResSo"
] | 7e237716066761a9a6a8a22a7b9f1b19b926bf341b2c4aed5c8a0b7cea1f2ea5 |
# objectedit.py ---
#
# Filename: objectedit.py
# Description:
# Author: Subhasis Ray
# Maintainer:
# Created: Wed Jun 30 11:18:34 2010 (+0530)
# Version:
# Last-Updated: Fri Feb 01 11:05:59 2017 (+0530)
# By: Harsha
# Update #:
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
# This code is for ... | BhallaLab/moose | moose-gui/objectedit.py | Python | gpl-3.0 | 21,805 | [
"MOOSE"
] | ecdfdb1eb8988809ffcc37ab7935d6d872a28cd5c58baed23e7d54a7b4986576 |
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#
# This file is part of phono3py.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# noti... | atztogo/phono3py | phono3py/phonon3/conductivity_LBTE.py | Python | bsd-3-clause | 70,974 | [
"phonopy"
] | e5825704eec975a50e045eaed95084012aa77e488b5000ac6eb562f7129d40cf |
#################################################################
# $HeadURL$
#################################################################
"""
.. module:: Pfn
:synopsis: ProcessPool and related classes
ProcessPool
ProcessPool creates a pool of worker subprocesses to handle a queue of tasks
much like the produ... | vmendez/DIRAC | Core/Utilities/ProcessPool.py | Python | gpl-3.0 | 31,382 | [
"DIRAC"
] | 65c1c5e109a3463da84c33f43cc6d1319e7b2cd9812fce7d49bf6cef38666a28 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | camradal/ansible | lib/ansible/utils/color.py | Python | gpl-3.0 | 3,194 | [
"Brian"
] | e4e766e7c99cdcbbf4ee3a52eeb9ee59d0c8c40a215fc1cce4d7a6868d696d1a |
import sys
import math
import time
from pymol import cmd
import os
# Point to Leap SDK
# leap_path = os.path.join()
# sys.path.append(os.environ["LEAPPATH"])
# Import Leap
import Leap
from Leap import Matrix, Vector, CircleGesture
class PymolListener(Leap.Listener):
def __init__(self, *args, **kwargs):
sup... | lqtza/OcuMOL_Leap | ocumol/src/hands/leap_only.py | Python | apache-2.0 | 5,877 | [
"PyMOL"
] | 6d280af82479218597e90062db601b56e204f59128f2cdafb8f1c2960731f2f6 |
# -*- coding: utf-8 -*-
"""An implementation of Reverse Causal Reasoning (RCR) described by [Catlett2013]_.
.. [Catlett2013] Catlett, N. L., *et al* (2013). `Reverse causal reasoning: applying qualitative causal knowledge to
the interpretation of high-throughput data <https://doi.org/10.1186/1471-21... | pybel/pybel-tools | src/pybel_tools/analysis/rcr.py | Python | mit | 4,230 | [
"Pybel"
] | e55f00a8f214952cabf82a938d3485ce1c9b2d84b4d9f14d6fe8b32df35521e8 |
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
from django.views import defaults as default_views
from . import views
app_name="myaccounts"
urlpatterns = [
#url(r'^... | yohanswanepoel/django-openshift-js | config/urls.py | Python | mit | 1,758 | [
"VisIt"
] | 48856bf3865d929dc0c41d9264a3aaaf2097ed60eab48f85124e32eb7cbc2493 |
import numpy as np
from numpy.testing import assert_equal, assert_raises, assert_almost_equal
from skimage.measure import LineModelND, CircleModel, EllipseModel, ransac
from skimage.transform import AffineTransform
from skimage.measure.fit import _dynamic_max_trials
from skimage._shared._warnings import expected_warnin... | jwiggins/scikit-image | skimage/measure/tests/test_fit.py | Python | bsd-3-clause | 10,423 | [
"Gaussian"
] | 836c22ac8fad27d89e5d549894480d69b840625914270b7a6cf025207a36d98c |
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.algorithms.rapidart as ra
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
import nipype.interfaces.utility as util
class TestSCA(object):
def __init__(self, rest_res_filt, ref, standar... | FCP-INDI/C-PAC | CPAC/sca/tests/test_sca.py | Python | bsd-3-clause | 15,189 | [
"Gaussian"
] | 21fd77aa2057c9471c358eb11a7d5b8f1f429a6401510a5a738dce72de509e61 |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | donspaulding/adspygoogle | examples/adspygoogle/adwords/v201302/campaign_management/validate_text_ad.py | Python | apache-2.0 | 2,895 | [
"VisIt"
] | 23ae2957f35cf716bedaa0c9cc1c120b9672f9aa910a32bccac8e650b0cd614f |
# $Id$
#
# Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" Functionality for ... | rdkit/rdkit-orig | rdkit/Chem/SATIS.py | Python | bsd-3-clause | 3,432 | [
"RDKit"
] | 035b583fdfeefa167831c6bca50dc317dfe6ac5538a2e55e33a7769e5051b8e6 |
import numpy as np
def runge_kutta(t, efields, n_recorded, hamiltonian):
""" Evolves the hamiltonian in time using the runge_kutta method.
Parameters
----------
t : 1-D array of float
Time points, equally spaced array.
Shape T, number of timepoints
efields : ndarray <Complex>
... | wright-group/WrightSim | WrightSim/mixed/propagate.py | Python | mit | 9,642 | [
"Gaussian"
] | 8708f55215b2eb7c60cb11e6012185cf1f2d1bee586bd2be7a8a39a024e1df50 |
"""
This example apply the abx evaluation on 2D data sampled from gaussian distributions (diagonal covariance)
"""
from __future__ import print_function
import abx_numpy
import numpy as np
def sample_data(parameters):
data = []
n_samples = []
for klass in parameters:
sample = np.empty((klass['N']... | bootphon/abx_numpy | examples/2D_normal_example.py | Python | gpl-3.0 | 1,680 | [
"Gaussian"
] | 72ed78c59a43fef859a47cf3f73ab8dbaee4b79c14f2f640b7a848dfa18c6240 |
import bpy
from io_scene_cs.utilities import rnaType, rnaOperator, B2CS, BoolProperty
from io_scene_cs.utilities import HasSetProperty, RemoveSetPropertySet
from io_scene_cs.utilities import RemovePanels, RestorePanels
class csFactoryPanel():
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_contex... | baoboa/Crystal-Space | scripts/blender/io_scene_cs/ui/data.py | Python | lgpl-2.1 | 2,734 | [
"CRYSTAL"
] | 5bca0eba1cb3b03deff7d6dcd82ae9be2305925e4317e6ca9f1c4b3f93d50e9a |
#!/usr/bin/env python
import os
from adaptivemd import Project
from adaptivemd import LocalResource
from adaptivemd import OpenMMEngine
from adaptivemd import PyEMMAAnalysis
from adaptivemd import File
from adaptivemd import WorkerScheduler
import mdtraj as md
if __name__ == '__main__':
Project.delete('exam... | thempel/adaptivemd | adaptivemd/tests/test_simple.py | Python | lgpl-2.1 | 3,373 | [
"MDTraj",
"OpenMM"
] | f255d6a6fc9aefd3d8c48181de253bece2f5324bbc6003ca83f36902df0e951a |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Created on Mar 18, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "Mar 18, 2012"
import unittest
impo... | Dioptas/pymatgen | pymatgen/entries/tests/test_computed_entries.py | Python | mit | 2,811 | [
"pymatgen"
] | 1cb6deed82fa29bc5bacd35db7058dc9b11f28ff3c16538bd2076ad4a9c32868 |
from datetime import datetime
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
import time
from .vk_support import get_last_visit_vk
from .engine import *
from .models import *
def process_message(message_id):
message = session.query(Message)\
.filter(Me... | nixorn/iamripbackend | src/loop.py | Python | mit | 2,235 | [
"VisIt"
] | 6c678d4559e462c213c038517854a3ba73e8afd7c30013bd0fc411b3cbbe8432 |
# python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. 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... | deepmind/bsuite | bsuite/utils/wrappers.py | Python | apache-2.0 | 11,819 | [
"Gaussian"
] | 6f94b4a2fbc2aa2e4948322a5256c94cf43a348086361f91ebe8840f7f0a4b73 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# altair documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 7 12:52:48 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | jakevdp/altair | doc/conf.py | Python | bsd-3-clause | 10,616 | [
"Brian"
] | 1c549ae0e6a1be74161c695f91e9071709bddd1992b5893c6c7d35a083c380cc |
"""
A library of spatial network kernel density functions.
Not to be used without permission.
Contact:
Andrew Winslow
GeoDa Center for Geospatial Analysis
Arizona State University
Tempe, AZ
Andrew.Winslow@asu.edu
"""
import operator
import unittest
import test
import priordict as priordict
import network as pynet
f... | darribas/pysal | pysal/contrib/network/kernel.py | Python | bsd-3-clause | 6,004 | [
"Gaussian"
] | 0c565e8e83fd081222d6cec2e32b63ae91c850ada9d0d2e4bfbe77e9ebf38ba3 |
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio 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 (at your opti... | l0b0/cds-invenio-vengmark | modules/websubmit/lib/functions/Stamp_Uploaded_Files.py | Python | gpl-2.0 | 27,593 | [
"VisIt"
] | d887f39401c1837a37ed7b4dbf10b1d7ef5838528a1cae44c77d690e61d4689f |
#
# Adrian Soto
# 22-12-2014
# Stony Brook University
#
# Scissor correction to bands structure in
# Quantum Espresso format.
#
class band:
def __init__(self, numkpoints, bandenergies):
self.nks = numkpoints
if (len(bandenergies) != numkpoints):
print "ERROR: list of band ene... | adrian-soto/QEdark_repo | tools/bandsndos/scissor_old.py | Python | gpl-2.0 | 3,508 | [
"Quantum ESPRESSO"
] | 637a521323fd4e126623e3c854d2b3fd2b8529444e8fc24a1cf92000c265ec8f |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the main LMS Dashboard (aka, Student Dashboard).
"""
import datetime
from nose.plugins.attrib import attr
from ..helpers import UniqueCourseTest
from ...fixtures.course import CourseFixture
from ...pages.lms.auto_auth import AutoAuthPage
from ...pages.lms.dashboard impo... | IndonesiaX/edx-platform | common/test/acceptance/tests/lms/test_lms_dashboard.py | Python | agpl-3.0 | 10,275 | [
"VisIt"
] | 9e9de3fad4ffda1066e3d168a52d15d0f9a36d8c1d3a5a1cd0e001c2224286f9 |
# Copyright 2017 Xiaomi, 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 writing,... | dlzhangxg/cloud-ml-sdk | cloud_ml_common/cloud_ml_common/auth/constant.py | Python | apache-2.0 | 854 | [
"Galaxy"
] | bb3a4447ad276db053156ef6665e06d610c6f15f4b7bab6ab697e2e9feada578 |
#!/usr/bin/env python
"""
Ban one or more Storage Elements for usage
Example:
$ dirac-admin-ban-se M3PEC-disk
"""
import DIRAC
from DIRAC.Core.Base.Script import Script
@Script()
def main():
read = True
write = True
check = True
remove = True
sites = []
mute = False
Script.registerSwi... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/scripts/dirac_admin_ban_se.py | Python | gpl-3.0 | 10,005 | [
"DIRAC"
] | b8035ba4fa1124fd64247056e09189040caf9947db2c99a7a9ee3d5bd16b769e |
#!/usr/bin/env python
# prepare configuration files for Circos!
import sys
import time
import optparse
import general
import numpy
import pickle
import pdb
import metrn
import fasta
import modencode
import os
print "Command:", " ".join(sys.argv)
print "Timestamp:", time.asctime(time.localtime())
""" define a functio... | claraya/meTRN | python/mapCircos.py | Python | mit | 14,748 | [
"BWA",
"Bowtie"
] | 859cc8e32720b970c1a8d8b62e8856989a3864941da3ecada414b094b7dee949 |
#
# 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... | RyanSkraba/beam | sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | Python | apache-2.0 | 65,693 | [
"VisIt"
] | 31a26c8603f2e673d162d61664b62ad0b99aca7ea8e663e34420417bc77258a6 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'NeuronArticleMap'
db.create_table('neuroelectro_neuronarticlemap', (
... | lessc0de/neuroelectro_org | neuroelectro/south_migrations/0021_auto__add_neuronarticlemap.py | Python | gpl-2.0 | 15,155 | [
"NEURON"
] | 55db47f9655cea72fe2feece7346a206091586ee8d7ea2527bf71217c2bfaf75 |
# Copyright (c) Charl P. Botha, TU Delft
# All rights reserved.
# See COPYRIGHT for details.
import itk
import module_kits.itk_kit as itk_kit
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
class cannyEdgeDetection(ScriptedConfigModuleMixin, ModuleBase):
def __init__(self, m... | nagyistoce/devide | modules/insight/cannyEdgeDetection.py | Python | bsd-3-clause | 4,373 | [
"Gaussian"
] | 9bf6e46a3d55c96be4607fd7616b281a43198bb5b8b0f7df02287315fbc3b170 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime as dt
import simplejson as json
import decimal
import random
from collections import namedtuple, OrderedDict
import pytest
from marshmallow import (
Schema, fields, utils, MarshalResult, UnmarshalResult,
validates, validates_schema
)
from marshmal... | xLegoz/marshmallow | tests/test_schema.py | Python | mit | 76,291 | [
"Brian"
] | fe7e6324e5986ea2a24317fa578b0fab840fc353074f51102216631b04bd4822 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | jimmidyson/minishift | scripts/boilerplate/boilerplate.py | Python | apache-2.0 | 5,868 | [
"VisIt"
] | c537b2fb196549fa939f7ebd14037a38d3e5356669b46b662fe994ff3cfc4c1b |
#!/usr/bin/env python
# CHANGED:2015-03-05 17:53:32 by Brian McFee <brian.mcfee@nyu.edu>
"""Test the util module"""
import tempfile
import os
import pytest
import numpy as np
from jams import core, util
import six
def srand(seed=628318530):
np.random.seed(seed)
pass
@pytest.mark.parametrize('ns, lab, in... | marl/jams | tests/test_util.py | Python | isc | 5,008 | [
"Brian"
] | 09dc1890462f3f9119e1a24063d5cab21fa25c5582b11e288cfc5f64dc81d986 |
# encoding: utf-8
'''Functional tests for CKAN's builtin page view tracking feature.'''
import tempfile
import csv
import datetime
import routes
import ckan.tests.legacy as tests
class TestTracking(object):
def tearDown(self):
import ckan.model as model
model.repo.rebuild_db()
def _get_ap... | NicoVarg99/daf-recipes | ckan/ckan/ckan/ckan/tests/legacy/functional/test_tracking.py | Python | gpl-3.0 | 30,370 | [
"VisIt"
] | abc9f93f5eabfa0bbd8bd685b6057f891973e681689e8ae6416e105a9726c798 |
#!/usr/bin/env python3
#
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2006-2014, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Publ... | Clyde-fare/cclib | setup.py | Python | lgpl-2.1 | 2,481 | [
"ADF",
"GAMESS",
"Gaussian",
"Jaguar",
"Molpro",
"NWChem",
"ORCA",
"cclib"
] | cdc093e584dcf2d2e75a33de875902e0e9295c426cd66a8537cff0380d0e745f |
import unittest
import numpy as np
from pyscf.pbc import gto
from pyscf.pbc import scf,cc
from pyscf import cc as mol_cc
from pyscf.pbc.tools.pbc import super_cell
a0 = 4
vac = 200
bas = [[ 3.0/2.0*a0,np.sqrt(3.0)/2.0*a0, 0],
[-3.0/2.0*a0,np.sqrt(3.0)/2.0*a0, 0],
[ 0, 0,va... | gkc1000/pyscf | pyscf/pbc/cc/test/test_h_2x2x1.py | Python | apache-2.0 | 1,747 | [
"PySCF"
] | f8429df6f89e0711200fc28765d09070664af2ca1788f212582ba297286ace7b |
"""Bartlett test for common dispersion."""
import numpy as np
from scipy import stats
def bartlett_test(models):
"""
Bartlett test for common dispersion.
Performs an Bartlett test for common dispersion between the models. The
idea for age-period-cohort models is described in Harnau (2018). The test... | JonasHarnau/apc | apc/bartlett_test.py | Python | gpl-3.0 | 2,562 | [
"Gaussian"
] | 36d0a63aa36d0fdaf6aa2d2be6196000d3d6c729ba1e6cfa419c26f969fa6ff6 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2018, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Overlap computation
######################
Utilities for computing the overlap between gaussian type functions.
"""
import numpy as np
from numba import jit, prange
from .numeri... | avmarchenko/exatomic | exatomic/algorithms/overlap.py | Python | apache-2.0 | 9,560 | [
"Gaussian"
] | b858ee1039a5369b612a3c74f830817e11c9a978d25a23d0ce7f87cbb1f4c99f |
# coding=utf-8
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | AlexEKoren/grumpy | compiler/expr_visitor_test.py | Python | apache-2.0 | 8,527 | [
"VisIt"
] | 69b0d2b6b80159e4075627ccfd1dc4a520043bc1443122fb85c1d327d06b8c07 |
from math import sqrt
def is_prime(n):
if n <= 1:
return False
elif n in [2, 3]:
return True
# To understand the statement below, please visit https://github.com/mre/the-coding-interview/pull/33
elif n % 6 not in [1, 5]:
return False
for i in range(3, int(sqrt(n))+1, 2):... | mre/the-coding-interview | problems/prime-number/prime-number.py | Python | mit | 443 | [
"VisIt"
] | 37171ca739f3990fc13790fb23f8f24a074a87380e055423c1ceaec4658e08dc |
# this program corresponds to special.py
### Means test is not done yet
# E Means test is giving error (E)
# F Means test is failing (F)
# EF Means test is giving error and Failing
#! Means test is segfaulting
# 8 Means test runs forever
### test_besselpoly
### test_mathieu_a
### test_mathieu_even_coef
##... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/scipy/special/tests/test_basic.py | Python | agpl-3.0 | 109,372 | [
"Elk"
] | 602d90081350127a5aadbaeea0e01cb60bbaaa1bd7d69b1f4f39d76605f25a9d |
"""
Views related to the Custom Courses feature.
"""
import csv
import datetime
import functools
import json
import logging
import pytz
from contextlib import contextmanager
from copy import deepcopy
from cStringIO import StringIO
from django.conf import settings
from django.core.urlresolvers import reverse
from djan... | Emergya/icm-openedx-educamadrid-platform-basic | lms/djangoapps/ccx/views.py | Python | agpl-3.0 | 27,223 | [
"VisIt"
] | fdfc7c21b0511cf3b824af84f56d2a992cc4aa67df78f857164fa8bb8a7b6e8d |
__RCSID__ = "$Id$"
""" FileCatalogFactory class to create file catalog client objects according to the
configuration description
"""
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCatalogPath
from DIRAC.Resources.Catalog.FileCatalogProxyClient ... | calancha/DIRAC | Resources/Catalog/FileCatalogFactory.py | Python | gpl-3.0 | 2,270 | [
"DIRAC"
] | 89950624c86707247f110838eea3353d21481e0decd0d8e175462fcaf11dbeca |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QMainWindow, QDockWidget, QTabWidget, QWidget, QVBoxLayout
from ert_gui import ERT
from ert_gui.ertwidgets import showWaitCursorWhileWaiting
from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName
from ert_gui.plottery import PlotContext, PlotDataGatherer a... | Ensembles/ert | python/python/ert_gui/tools/plot/plot_window.py | Python | gpl-3.0 | 8,510 | [
"Gaussian"
] | fc88916b106037da300c137d1e36671286c2594f3d4fe140a1f179d0eb1b6a2d |
#!/usr/bin/env python
# add paths
import os
import sys
import traceback
import warnings
sys.path.append('../utils')
# import modules
from co2 import CO2
from fillgaps import fill
from dewpoint import dewpoint
import os, re, stat, datetime
from netCDF4 import Dataset as nc
from optparse import OptionParser
from collec... | RDCEP/psims | pysims/translators/dssat46/psims2wth.py | Python | agpl-3.0 | 12,398 | [
"NetCDF"
] | 3dbc1a6a106ed0497851e545bb70c7d04fa4bfb25fb1cf9ce4555a66549917af |
#!/usr/bin/env python
"""
Start a given production
Example:
$ dirac-prod-start 381
"""
import DIRAC
from DIRAC.Core.Base.Script import Script
@Script()
def main():
# Registering arguments will automatically add their description to the help menu
Script.registerArgument("prodID: Production ID")
_, args ... | DIRACGrid/DIRAC | src/DIRAC/ProductionSystem/scripts/dirac_prod_start.py | Python | gpl-3.0 | 797 | [
"DIRAC"
] | f3ab069d5000745e12fe2f31b0f0856fa4e9a518e88979f385de74ace3e614b3 |
# flake8: noqa: S1
# -*- coding: UTF-8 -*-
from __future__ import unicode_literals
import math
from rdkit import Chem
from ._base import Descriptor
from .Weight import Weight
__all__ = ("LogS",)
_smarts_logs = {
"[NH0;X3;v3]": 0.71535,
"[NH2;X3;v3]": 0.41056,
"[nH0;X3]": 0.82535,
"[OH0;X2;v2]": 0... | mordred-descriptor/mordred | mordred/LogS.py | Python | bsd-3-clause | 1,540 | [
"RDKit"
] | f2502f1c9bd22338e5390752ed5dce8746fa2a985f6750819817fa2886ca5750 |
# -*- coding: utf-8 -*-
#
# 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 "L... | brad-kaiser/spark | python/pyspark/ml/tests.py | Python | apache-2.0 | 109,332 | [
"Gaussian"
] | 1cdc333f55d4e1850c98fcf5d463cf4cf4ea3fc5bf2edd1989a9c29bbdda9029 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 OpenStack Foundation
# 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.a... | Triv90/Nova | nova/tests/compute/test_resource_tracker.py | Python | apache-2.0 | 33,938 | [
"exciting"
] | b121583c2e399e96bb02a9998d5f35ca6e6f1faba4bf4ce7af0e41825e51b5db |
import cv2
from matplotlib import pyplot as plt
orig = cv2.imread("noise3.jpg", cv2.IMREAD_GRAYSCALE)
#orig = cv2.imread("noise2.jpg", cv2.IMREAD_GRAYSCALE)
# Gaussian blur for different kernel size
gaussian_blur_3 = cv2.GaussianBlur(orig, (3, 3), 0)
gaussian_blur_5 = cv2.GaussianBlur(orig, (5, 5), 0)
gaussian_blur_7... | anooptoffy/Masters-Course-Work-Repository | Semester_2/Machine Perception/Assignment1/question_6.py | Python | mit | 648 | [
"Gaussian"
] | 56caf4f29f9717fc6f50819321a1dceae496c9bd597b02eacfb8fb26ec4d926a |
"""
Spglib interface for ASE
"""
import pyspglib._spglib as spg
import numpy as np
from pylada import periodic_table
def get_spacegroup(bulk, symprec=1e-5, angle_tolerance=-1.0):
"""
Return space group in international table symbol and number
as a string.
"""
lattice = np.array(bulk.cell*bulk.sca... | pylada/pylada-defects | pyspglib/spglib.py | Python | gpl-3.0 | 21,936 | [
"ASE"
] | e1029687c9a59e87a9b355fb7f61cfd6c4db888d153b96cd1574f5ec0a4f5fc5 |
from paraview.simple import *
import sys, time
# Path to Leap Motion Python Library
leapPath = "LeapDeveloperKit/LeapSDK/lib"
sys.path.append(leapPath)
print leapPath + " has been appended to library. Enjoy Leap Motion"
import Leap
from Leap import CircleGesture, KeyTapGesture, ScreenTapGesture, SwipeGesture
# Para... | VictorLoren/leapmotion-paraview | Code/test_rotate.py | Python | mit | 6,329 | [
"ParaView"
] | 167366941092f0f7ac5c34a5c25c8e52e1ff46966bbaa55fdf94e0ca5d0777e9 |
"""
Logout Page
"""
import os
from bok_choy.page_object import PageObject
from selenium.common.exceptions import WebDriverException
from regression.pages.whitelabel import ECOM_URL_WITH_AUTH
from regression.pages.whitelabel.home_page import HomePage
class EcommerceLogoutPage(PageObject):
"""
E-Commerce Logo... | edx/edx-e2e-tests | regression/pages/whitelabel/logout_page.py | Python | agpl-3.0 | 888 | [
"VisIt"
] | 4c2bf4d0e660d77d56057f91756bac3813c689bf9d250142629bba2d06eabc72 |
"""Main entry points for scripts."""
from __future__ import print_function, division
from argparse import ArgumentParser
from collections import OrderedDict
from copy import copy
from datetime import datetime
import glob
import json
import logging
import math
import os
import scipy.stats
import numpy as np
from .ve... | snfactory/cubefit | cubefit/main.py | Python | mit | 26,267 | [
"Galaxy",
"Gaussian"
] | fdc3cf376c7295f49148a9f7760f0abee6e02f6750406ebb03136010f0d903d7 |
# Copyright 2012 Brian Waldon
#
# 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 writing,... | sjsucohort6/openstack | python/venv/lib/python2.7/site-packages/warlock/model.py | Python | mit | 3,998 | [
"Brian"
] | 5bd51de318674fb1a38c1bd21f358257310a8f9a8b15ba749f9e4d56a9104587 |
import re
import os
import os.path as op
import requests
import psutil
import time
import shutil
import logging
import atexit
import subprocess
import shlex
import six
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.SubsMat import MatrixInfo
from . import conf, helper, error... | ostrokach/elaspic | elaspic/elaspic_sequence.py | Python | mit | 14,136 | [
"BLAST"
] | cd84ed8123917139cb5989f04f538bffbb992e96c0de1120e0552fb741bb6c77 |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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... | lahwaacz/qutebrowser | scripts/dev/pylint_checkers/qute_pylint/settrace.py | Python | gpl-3.0 | 1,643 | [
"VisIt"
] | 01a172195a0153c5d572206a91d31673db108a42152b0461a08660cb24bd56e9 |
import sys, os, os.path, textwrap, hashlib
from pysamimport import pysam
import re
import inspect
from configparser import SafeConfigParser
from collections import defaultdict
class BadRead(RuntimeError):
def __init__(self):
RuntimeError.__init__(self, self.header)
class IsBadRead(BadRead):
header ... | HorvathLab/NGS | common/src/util.py | Python | mit | 23,699 | [
"pysam"
] | 245db59589656471adc33afe21b5eb211d28d9afc85796a04d8df1e19ab6f84f |
### Refer to G. Kresse, Phys. Rev. B 73, 045112 (2006)
### for comparison of macroscopic and microscopic dielectric constant
### and absorption peaks.
import os
import sys
import numpy as np
from ase.units import Bohr
from ase.structure import bulk
from ase.parallel import paropen
from gpaw import GPAW, FermiDirac
... | ajylee/gpaw-rtxs | doc/tutorials/dielectric_response/silicon_ABS.py | Python | gpl-3.0 | 1,536 | [
"ASE",
"GPAW"
] | a552bcc37a48c51f431266301d26a01f7f5a9e43498b3b69ad9f8de1cb591cf6 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Test the empirical null estimator.
"""
import warnings
import numpy as np
from nose.tools import assert_true
from ..empirical_pvalue import (
NormalEmpiricalNull, smoothed_histogram_from_samples, ... | bthirion/nipy | nipy/algorithms/statistics/tests/test_empirical_pvalue.py | Python | bsd-3-clause | 2,172 | [
"Gaussian"
] | 6f3cf94236d09e1c568fdc3ef8f02a4e4542c6e3c0683ac27bb2561252523290 |
#!/usr/bin/env python
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2013, The Materials Virtual Lab"
__version__ = "0.2"
__maintainer__ = "Shyue Ping Ong"
__email__ = "ongsp@ucsd.edu"
__date__ = "Aug 3, 2015"
from setuptools import setup, find_packages
import os
if __name__ == "__main__":
setup(
... | materialsvirtuallab/fireworks-vasp | setup.py | Python | mit | 1,514 | [
"VASP",
"pymatgen"
] | e4d30b6e47c0e5a703fcf161906cc4ba5449c441ce4f80a3b27caec29d66b123 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""priors.py -- This module contains various objects to be used as priors.
When called these return the ln-prior-probability, and they can also be used to
construct prior transforms (for nested sampling) and can be sampled from.
"""
import numpy as np
import scipy.stats
... | bd-j/bsfh | prospect/models/priors.py | Python | gpl-2.0 | 13,637 | [
"Gaussian"
] | 624d54528342ec0eb6b04c479fb250edb71e9e16ab5f99eb039ab2c84ad824c5 |
"""
Plugin architecture for pymatgen.
"""
import pkg_resources
discovered_plugins = {
entry_point.name: entry_point.load() for entry_point in pkg_resources.iter_entry_points("pymatgen.plugins")
}
locals().update(discovered_plugins)
| davidwaroquiers/pymatgen | pymatgen/plugins/__init__.py | Python | mit | 239 | [
"pymatgen"
] | 5c5c36d7b72295864c4c70f1fb5b188dcfc41da0ab1577f2f6da31878717b289 |
""" PDP
PDP ( PolicyDecisionPoint ) is the back-end for the PolicySystem. It discovers
the policies, finds the best match, evaluates them, merges their results taking
the most penalizing one, computes the set of actions to be triggered and returns
all the information to the PEP which will enforce the actions.
... | fstagni/DIRAC | ResourceStatusSystem/PolicySystem/PDP.py | Python | gpl-3.0 | 15,211 | [
"DIRAC"
] | 615655dc87fc66fa4ffbf3eda22454219a0f32f72e985eb02e0bd07c08cc84a2 |
# -*- coding: utf-8 -*-
"""
Shortest paths and path lengths using A* ("A star") algorithm.
"""
__author__ =\
"""Salim Fadhley <salimfadhley@gmail.com>
Matteo Dell'Amico <matteodellamico@gmail.com>"""
# Copyright (C) 2004-2008 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter... | marco-mariotti/selenoprofiles | libraries/networkx/algorithms/shortest_paths/astar.py | Python | gpl-2.0 | 4,301 | [
"VisIt"
] | 4d53919a6414dcba00cfd92b40985ab0f6f0841b7c0dc1c8abd85bc1539a37a8 |
#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2012-2013 Esteban Tovagliari, Jupiter Jazz Limited
# Copyright (c) 2014-2017 Esteban Tovagliari, The appleseedhq Organization
#
# P... | gospodnetic/appleseed | src/appleseed.python/logtarget.py | Python | mit | 2,555 | [
"VisIt"
] | 10cd178b9b86a03edb8df4ea3c17164b305c6da0a70b74873766729c4e86c90d |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
class Esmf(MakefilePackage):
"""The Earth System Modeling Framework (ESMF) is high-pe... | LLNL/spack | var/spack/repos/builtin/packages/esmf/package.py | Python | lgpl-2.1 | 11,522 | [
"NetCDF"
] | 18565d25e0342d7b1b488132473fa1c272264ee9f60970ede153970bd9789259 |
#!/usr/bin/env python
# This example shows how to construct a surface from a point cloud.
# First we generate a volume using the
# vtkSurfaceReconstructionFilter. The volume values are a distance
# field. Once this is generated, the volume is countoured at a
# distance value of 0.0.
import os
import string
import vtk... | naucoin/VTKSlicerWidgets | Examples/Modelling/Python/reconstructSurface.py | Python | bsd-3-clause | 2,614 | [
"VTK"
] | ab5df1545e698a5af1d8903d51a6963e79adea15ffd108c1d3462fce02ef318d |
import warnings
from pandas import DateOffset, DatetimeIndex, Series, Timestamp
from pandas.compat import add_metaclass
from datetime import datetime, timedelta
from dateutil.relativedelta import MO, TU, WE, TH, FR, SA, SU # noqa
from pandas.tseries.offsets import Easter, Day
import numpy as np
def next_monday(dt):... | zfrenchee/pandas | pandas/tseries/holiday.py | Python | bsd-3-clause | 16,264 | [
"COLUMBUS"
] | 43e95709c0dd4dfb51174e3f46c636c5439669ab0a632237b77cba362136015a |
# Standard Python modules
# =======================
import os
import copy
# External modules
# ================
from PyQt5.QtCore import pyqtSignal, pyqtProperty
from PyFoam.Basics.STLFile import STLFile
from PyFoam.Error import FatalErrorPyFoamException
# DICE modules
# ============
from dice.dice_extras.vis import ... | Leopardob/dice-dev | apps/OpenFOAM_230/Preprocessing/STL_Import/app.py | Python | gpl-3.0 | 11,118 | [
"ParaView"
] | 00684f2d3c0b5dfe863e39f488f910d3c9b935bcca4ea352b7c09c609f494ecd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.