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 |
|---|---|---|---|---|---|---|---|
"""Testing for Gaussian process regression """
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Modified by: Pete Green <p.l.green@liverpool.ac.uk>
# License: BSD 3 clause
import sys
import re
import numpy as np
import warnings
from scipy.optimize import approx_fprime
import pytest
from sklearn.gaussi... | huzq/scikit-learn | sklearn/gaussian_process/tests/test_gpr.py | Python | bsd-3-clause | 23,033 | [
"Gaussian"
] | d571d6a82d17c77dc287377f12122a0ffc7adab68278f0eed3a6bf04391a3f07 |
import logging
import math
import time
from collections import defaultdict
from typing import Callable, Tuple, List, Dict, Any, Optional, Union
import cv2
import numpy as np
import opensfm.synthetic_data.synthetic_dataset as sd
import scipy.signal as signal
import scipy.spatial as spatial
from opensfm import (
geo... | mapillary/OpenSfM | opensfm/synthetic_data/synthetic_generator.py | Python | bsd-2-clause | 16,551 | [
"Gaussian"
] | fc200d04e4a537f00e039e88d152bc21d4ae10d44353781e880bd6c9703653ef |
__all__ = [
'ManySlicesAlongPoints',
'ManySlicesAlongAxis',
'SlideSliceAlongPoints',
'SliceThroughTime',
]
__displayname__ = 'Slicing'
import numpy as np
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
import pyvista as pv
from .. import _helpers
from ..base import FilterBase
cla... | banesullivan/ParaViewGeophysics | PVGeo/filters/slicing.py | Python | bsd-3-clause | 16,114 | [
"ParaView",
"VTK"
] | f29407551e6d0258ed0c970d604162de53f57e7409ee0066e5516a6f25cb261c |
#!/usr/bin/env python
# coding: utf-8
# Leechr
# http://ashysoft.wordpress.com
#
# Copyright 2008-2015 Paul Ashton <drashy@gmail.com>
#
# This file is part of Leechr.
#
# Leechr 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 Sof... | drashy/leechr | main.py | Python | gpl-3.0 | 72,723 | [
"VisIt"
] | 1174009a56bcc21ebd5d4596a3aeeb72c7a63a2773f93a2008c4dd249478a6d8 |
import os
import unittest
from __main__ import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import numpy as np
import logging
import math
import time
#
# DualModalityCalibration
#
class DualModalityCalibration(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
... | SlicerIGT/SlicerTrackingErrorInspector | DualModalityCalibration/DualModalityCalibration.py | Python | bsd-3-clause | 29,516 | [
"VTK"
] | d9a8f9035e10e51873f35faec87fc19ca96aa15ff4cf46137e2fcbc727c46eb0 |
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_parse_qs,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class ScreencastIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?screencast\.com/t/(?P<id>[a-zA-Z0-9]+... | pim89/youtube-dl | youtube_dl/extractor/screencast.py | Python | unlicense | 4,326 | [
"VisIt"
] | 585e396167bf20c9dd70e9db0d2deb0e38759f7ad15a431b0d0690f0db373a0f |
import argparse
import logging
import os
import typing
from collections import Counter
from csv import DictWriter, DictReader
from datetime import datetime
from glob import glob
from io import StringIO
from itertools import groupby
from operator import itemgetter
from shutil import rmtree
from subprocess import run, PI... | cfe-lab/MiCall | micall/core/denovo.py | Python | agpl-3.0 | 10,477 | [
"BLAST"
] | bb78b3c50182ba7a82d25426647109aab156455cef75dc32bf54432eea2ef3c1 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Created on Jul 16, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyue@mit.edu"
__date__ = "Jul 16, 2012"
import unittest
import ... | yanikou19/pymatgen | pymatgen/io/vaspio/tests/test_vasp_input.py | Python | mit | 18,082 | [
"VASP",
"pymatgen"
] | 80bcf16de2a992d84a8e37c5c123651963e307cf748269cc7cb9a38ef29478c3 |
# Copyright 2020 Google LLC
#
# 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, ... | datacommonsorg/data | scripts/biomedical/us_fda/drugs/utils/config.py | Python | apache-2.0 | 29,858 | [
"CRYSTAL"
] | 2155e80801b3fd9b8f2629ed98091b1b076eb1e4ad4f2dd9f96e5aad5885b6f8 |
import enum
import inspect
import pydoc
import unittest
import threading
from collections import OrderedDict
from enum import Enum, IntEnum, EnumMeta, Flag, IntFlag, unique, auto
from io import StringIO
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
from test import support
from datetime import timede... | FFMG/myoddweb.piger | monitor/api/python/Python-3.7.2/Lib/test/test_enum.py | Python | gpl-2.0 | 107,316 | [
"MOE"
] | 1cc9c5f7bf80ddb2355c6a90e8812f40054f8561514441f06fa980ec4699f98a |
import pysam
def filter_reads(sam,filters=list()):
'''
Returns a generator of pysam reads which have passed all filters.
Filters must take a pysam read and return:
False - read is not to be filtered (keep it)
True - read is to be filtered (discard it)
'''
return (r for r in pysam.Samfile(sam) if not... | WhiteLab/utils | utils/bamfilter.py | Python | apache-2.0 | 354 | [
"pysam"
] | 739e2f6852fbcaeec2c37e5b9c025a712697d79f515d98124f3cc3ef9f2e74f1 |
import sys
tests = [("python", "testReactionWrapper.py", {}), ]
longTests = []
if __name__ == '__main__':
import sys
from rdkit import TestRunner
failed, tests = TestRunner.RunScript('test_list.py', 0, 1)
sys.exit(len(failed))
| jandom/rdkit | Code/GraphMol/ChemReactions/Wrap/test_list.py | Python | bsd-3-clause | 238 | [
"RDKit"
] | 84ef2607eeb6007279297b6b4bf1c82aa2b53dd412834dcb90fcd81d51ac92c8 |
#!/usr/bin/env python3
import itertools
from collections import defaultdict
import logging
import networkx as nx
import numpy as np
import pandas as pd
from pgmpy.base import DirectedGraph
from pgmpy.factors import TabularCPD, TreeCPD, RuleCPD
class BayesianModel(DirectedGraph):
"""
Base class for bayesian... | vivek425ster/pgmpy | pgmpy/models/BayesianModel.py | Python | mit | 23,441 | [
"VisIt"
] | c030eeccfbff8d529f34c8241e6491392fa2c758ecd518063f57f56296e3ba58 |
from ase import Atoms, Atom
from ase.structure import molecule
from ase.parallel import barrier
from ase.units import Hartree, mol, kcal
from gpaw import GPAW, setup_paths
from gpaw.mixer import Mixer, MixerSum
from gpaw.occupations import FermiDirac
from gpaw.atom.generator import Generator
from gpaw.atom.configuratio... | robwarm/gpaw-symm | gpaw/test/AA_exx_enthalpy.py | Python | gpl-3.0 | 7,599 | [
"ASE",
"GPAW"
] | 7a0bf4f7dc1570d61d9f8e2de7452ad0fc719ac0ab0fecbc6a9be982a470ab8a |
from ..language.ast import (FragmentDefinition, FragmentSpread,
OperationDefinition)
from ..language.visitor import ParallelVisitor, TypeInfoVisitor, Visitor, visit
from ..type import GraphQLSchema
from ..utils.type_info import TypeInfo
from .rules import specified_rules
def validate(schem... | wandb/client | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | Python | mit | 5,580 | [
"VisIt"
] | 851a957ecde3a741859b8e030df2908a96f4044b3e76011e83c5f905c5dff250 |
# 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 the G... | espressopp/espressopp | testsuite/interaction_potentials/unittest/testLennardJones.py | Python | gpl-3.0 | 2,341 | [
"ESPResSo"
] | 10c98e77942a3ea15f13493c713b0dec4679270abcb44df24a68fb178e669424 |
#!/usr/bin/env python
"""
This is a contextualization script required by CloudMan; it is automatically run
at instance startup (via an upstart job).
Requires:
PyYAML http://pyyaml.org/wiki/PyYAMLDocumentation (easy_install pyyaml)
boto http://code.google.com/p/boto/ (easy_install boto)
Assumptions:
DEFAUL... | heuermh/cloudbiolinux | installed_files/ec2autorun.py | Python | mit | 22,240 | [
"Galaxy"
] | 9d803efda7cca4ef5723dd24186f04272699cf579d8b5a92b5c73571d9f58ea6 |
# File: ctscan.py
# Description: MPR rendering
from vtk import *
#needed to determine the path to the source files
from os.path import dirname, realpath, join
def get_binary_relative_file(filepath):
basedir = dirname(realpath(__file__)) #Get the directory of the .py file, courtesy of http://stackoverflow.c... | RDeckers/ScientificVisualization-1TD389 | Assignments/Assignment 2/Part 2/ctscan.py | Python | gpl-3.0 | 9,502 | [
"VTK"
] | 0e0a7268fde9821e9ff9c46d1ae2ce7115c34e10bfe9e054d85736c3d2f4ee6c |
import sys; import os.path; sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from bigfile import BigFile
from mpi4py import MPI
from pypm.particlemesh import ParticleMesh
import numpy
from pypm.transfer import TransferFunction
from pypm.tools import FromRoot
import numba
class QPM(object):
# v... | rainwoodman/pypm | nbody/qpm.py | Python | gpl-3.0 | 5,437 | [
"Gaussian"
] | 33eeb6040b4fbb43db13c5219310a39cf280a7bed2d481e5c6284037b8fb0094 |
# Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
# Copyright 2018-2019 Igalia, S.L.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your ... | GNOME/orca | src/orca/eventsynthesizer.py | Python | lgpl-2.1 | 18,562 | [
"ORCA"
] | 5862a5ab6b18fd5c2bcdd604ea62afea599a3e74bf84c2999fafb9ed9c2f940b |
#!/usr/bin/env python
# -*- coding : utf8 -*-
#
# This file is a part of Siesta Help Scripts
#
# (c) Andrey Sobolev, 2012
#
''' Voronoi tesselation module - numpy version
'''
import ngbr as MN
import voronoi as MV
def demo():
pass
if __name__ == '__main__':
demo()
| ansobolev/shs | shs/voronoi/numpy/__init__.py | Python | mit | 275 | [
"SIESTA"
] | c981dfc342a263f657c13c087c94067f5c4451ebe2ff50352dc0cc98ee58c65a |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the main LMS Dashboard (aka, Student Dashboard).
"""
import datetime
from nose.plugins.attrib import attr
import unittest
import ddt
from ..ga_helpers import GaccoTestMixin
from ..helpers import UniqueCourseTest
from ...fixtures.config import ConfigModelFixture
from ..... | nttks/edx-platform | common/test/acceptance/tests/lms/test_lms_dashboard.py | Python | agpl-3.0 | 13,244 | [
"VisIt"
] | 14aa5878ceb880c0d82f19e00db7853e8ea2de48f85398c937092836715a8735 |
import numpy as np
def affine_forward(x, w, b):
"""
Computes the forward pass for an affine (fully-connected) layer.
The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N
examples, where each example x[i] has shape (d_1, ..., d_k). We will
reshape each input into a vector of dimension D = ... | zlpure/CS231n | assignment2/cs231n/layers.py | Python | mit | 31,530 | [
"NEURON"
] | 407e78c87fb067d0c047e79b27cc402cb424625e90e60207d0ab47c68e04e495 |
import numpy as np
import scipy.linalg
from scipy.interpolate import RectBivariateSpline
from ..util import img_as_float
from ..filters import sobel
def active_contour(image, snake, alpha=0.01, beta=0.1,
w_line=0, w_edge=1, gamma=0.01,
bc='periodic', max_px_move=1.0,
... | kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/skimage/segmentation/active_contour_model.py | Python | gpl-3.0 | 7,288 | [
"Gaussian"
] | 13d27516930ad3eb3cdc604487533bba9095c5011138a5bc195a943bd8389e65 |
##############################################################################
# pymbar: A Python Library for MBAR
#
# Copyright 2016-2017 University of Colorado Boulder,
# Copyright 2010-2017 Memorial Sloan-Kettering Cancer Center
# Portions of this software are Copyright (c) 2010-2016 University of Virginia
#
# Autho... | mrshirts/pymbar | pymbar/exp.py | Python | mit | 9,515 | [
"Gaussian"
] | 00a8e30ee4e474af3fd2506b848f9f7134987c3e9087e460aaf5bd42e3b8306b |
#
# Brian C. Lane <bcl@redhat.com>
#
# Copyright 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be useful,... | kellinm/anaconda | tests/pyanaconda_tests/pwpolicy.py | Python | gpl-2.0 | 2,163 | [
"Brian"
] | 4cab01b53a474ea9a30e1d033d3ede0659aada8d1da3350e5eb34e6208967194 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Transform a operator from four-component picture to two-component picture
'''
from pyscf import lib
from pyscf import gto
from pyscf.x2c import x2c, sfx2c1e
mol = gto.M(
verbose = 0,
atom = '''8 0 0. 0
1 0 -0.757 ... | gkc1000/pyscf | examples/x2c/10-picture_change.py | Python | apache-2.0 | 1,680 | [
"PySCF"
] | 709641f9fe883be57264e472246e63c23acaedc67c0689028610ea6ddb296857 |
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2002 Bruce J. DeGrasse
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2008 James Friedmann <jfriedmannj@gmail.com>
# Copyright (C) 2009 Benny Malengier <b... | jralls/gramps | gramps/plugins/textreport/detancestralreport.py | Python | gpl-2.0 | 42,359 | [
"Brian"
] | ce98e818c96c75ed5c83436e0d05eac43a02349d5824aa4192c7df9595137374 |
""" Test_RSS_Policy_JobRunningWaitingRatioPolicy
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
import DIRAC.ResourceStatusSystem.Policy.JobRunningWaitingRatioPolicy as moduleTested
#####################################################... | ic-hep/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/test/Test_RSS_Policy_JobRunningWaitingRatioPolicy.py | Python | gpl-3.0 | 3,742 | [
"DIRAC"
] | 8ae5d5ccdfdb1220d61325bb0e9cca7e6bb2215f473b8bcb54c62ac33a08cf53 |
# LAMMPS Documentation Utilities
#
# Copyright (C) 2015 Richard Berger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | quang-ha/lammps | doc/utils/converters/tests/test_lammps_filters.py | Python | gpl-2.0 | 2,210 | [
"LAMMPS"
] | e1c79791a72f310d1be90a49ddc41fbeaf7da17288c5e03cedf8adfdc2558d65 |
# coding: utf-8
# In[ ]:
import numpy as np
import math
import matplotlib.pyplot as plt
import sys
import time
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from skimage import measure
from skimage.draw import ellipsoid
from numpy import linalg, random, ones, zeros, eye, dot
from numpy.linalg import norm, ... | michrawson/SVM_Implicit_Surface_Reconstruction | Primal-Slab-SVM-Rabbit.py | Python | mit | 36,905 | [
"Mayavi"
] | 4333529e9f5b806506725251bf5710b89427ec6a9e8a9cb79eebcc81f92fa517 |
from django.core.validators import MinValueValidator
from django.db import models
from django.db.models.deletion import PROTECT
from edc_base.model_fields.custom_fields import OtherCharField
from edc_base.model_managers import HistoricalRecords
from edc_base.model_mixins.base_uuid_model import BaseUuidModel
from edc_co... | botswana-harvard/ambition-subject | ambition_subject/models/medical_expenses_two_detail.py | Python | gpl-3.0 | 4,129 | [
"VisIt"
] | f0bd5f16ab1d2739b51ff2d2e3c0a37a82b7cfea3ab2e2bc2497daf9d3c03865 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
def GetRGBColor(colorName):
'''
Return the red, green and blue components for a
color as doubles.
'''
rgb = [0.0, 0.0, 0.0] # black
vtk.vt... | hlzz/dotfiles | graphics/VTK-7.0.0/Filters/General/Testing/Python/mcubes.py | Python | bsd-3-clause | 1,928 | [
"VTK"
] | 139a58bbc51b4fb2c291649bd10a7e587681e1e627f400ed86f2f7428326ae28 |
from __future__ import print_function
__author__ = "Martin Felder, felder@in.tum.de"
from numpy import zeros, where, ravel, r_, single
from numpy.random import permutation
from pybrain.datasets import SupervisedDataSet, SequentialDataSet
class ClassificationDataSet(SupervisedDataSet):
""" Specialized data set fo... | pybrain/pybrain | pybrain/datasets/classification.py | Python | bsd-3-clause | 15,053 | [
"NetCDF"
] | cd74ba90dde109dc1785d39013432b12a48c765e7b1609a4d3df07595f7e00f8 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/freer/workspace/MSMCreatorPython/MSMCreator/ui/mainwindow.ui'
#
# Created: Tue May 15 17:24:48 2012
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try... | mfreer/asmm-creator | ui/Ui_mainwindow.py | Python | bsd-3-clause | 102,126 | [
"NetCDF"
] | a39c51ae0e55ea1d34548907da68e079c89c712004dda0532d1cc97a2edebaad |
"""
To know more or get code samples, please visit my website:
https://morvanzhou.github.io/tutorials/
Or search: 莫烦Python
Thank you for supporting!
"""
# please note, all tutorial code are running under python3.5.
# If you use the version like python2.7, please modify the code accordingly
# 8 - RNN LSTM Regressor ex... | tencrance/cool-config | ml_keras_learn/tutorials/kerasTUT/8-RNN_LSTM_Regressor_example.py | Python | mit | 2,189 | [
"VisIt"
] | 42195a3ebc28934a7877f3a7ae6aedcce632f5ce4d106b2619f08ab6b191a441 |
# Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com)
# 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.
"""Classes corresponding to phyloXML elements.
See Also
--------
Official specification... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/Phylo/PhyloXML.py | Python | gpl-2.0 | 45,874 | [
"Biopython"
] | 051a7378834ffcd4760a3f4c7bc317a0bf0867408042764b7f4a0a359f8b5e8c |
#!/usr/bin/env python
import csv
import numpy as np
import pandas as pd
import scipy.stats as stats
from datetime import datetime
from datetime import timedelta
## load data
df_people = pd.read_csv("people-data.csv")
def generate_person(fm_ratio=0.5):
"""
generate a new person using df_people
"""
... | ajrichards/bayesian-examples | useful/generate-random-people.py | Python | bsd-3-clause | 4,078 | [
"Gaussian"
] | aff190945cc1d941e17eb3d9a647575ca58d43ce81fb9de9e777de67d1e9420a |
# Copyright (C) 2004-2008 Paul Cochrane
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distribut... | paultcochrane/pyvisi | pyvisi/renderers/vtk/ellipsoid_plot.py | Python | gpl-2.0 | 10,357 | [
"VTK"
] | 4faaf3113b32ea822a3987b420b4e42f8a7b6fc503621b9981a7df9e12908794 |
#!/usr/bin/env python
#
# Copyright (c) 2004, 2005 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, th... | sjl/hyde | lib/sitemap_gen-1.4/test_sitemap_gen.py | Python | mit | 27,786 | [
"COLUMBUS"
] | c36654945c36eac8e0f7ccf2d6f1b49c12a8ffb844b61cb32b1dd1d65ce88c05 |
import tempfile
import os.path
from stat import S_IXUSR
from os import makedirs, stat, symlink, chmod, environ
from shutil import rmtree
from galaxy.tools.deps import DependencyManager, INDETERMINATE_DEPENDENCY
from galaxy.tools.deps.resolvers.galaxy_packages import GalaxyPackageDependency
from galaxy.tools.deps.resolv... | jmchilton/pulsar | test/test_tool_deps.py | Python | apache-2.0 | 14,513 | [
"BLAST",
"BWA",
"Galaxy"
] | c25ad2e7e326271f5eeeb487aba07d214fc7cba7580e969f8b90d1e8f58587e6 |
#!/usr/bin/env python
"""
kafe2 example: Gaussian approximation of Poisson distributions for small N
==========================================================================
This example is a continuation of the Poisson cost function example. While a Poisson distribution with mean N is
inherently asymmetric, it can ... | dsavoiu/kafe2 | examples/007_cost_functions/03_gaussian_approximation_bad.py | Python | gpl-3.0 | 6,450 | [
"Avogadro",
"Gaussian"
] | 7477e431f4d2ea778f733cea9d0cd5db324fb3f709c2017546297b7f9c540e71 |
import functools
from wadl2rst.nodes.base import BaseNode
from wadl2rst.nodes.parameters import ParametersNode
def collapse_resources(tree):
""" In the input wadl, the resource uris are split out into a nested
structure with each resource slug having it's own level. For the output,
we only care about t... | annegentle/wadl2rst | wadl2rst/transformations/collapse_resources.py | Python | apache-2.0 | 5,403 | [
"VisIt"
] | 5662edd2fe94498a0828557d0bac9b08fe573f233c9490f8c2de653e87356424 |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkImageFFT(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vtkIm... | chrisidefix/devide | modules/vtk_basic/vtkImageFFT.py | Python | bsd-3-clause | 479 | [
"VTK"
] | 670fa1c077fa65c260c733e3f71ce8df5acb765e1980ed18b992706b8e65e78c |
##############################################################################
# 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/jmol/package.py | Python | lgpl-2.1 | 1,972 | [
"Jmol"
] | 483197c9019870f44ad15fd3d5484a16083c143059daefb9b5f357ac79625e87 |
# -*- coding: utf-8 -*-
# PEP8 asserts
from copy import deepcopy
import httplib as http
import mock
import time
from nose.tools import * # noqa
from modularodm.exceptions import ValidationValueError
from tests.base import OsfTestCase, fake
from tests.factories import (
UserFactory, NodeFactory, ProjectFactory,... | dplorimer/osf | website/addons/wiki/tests/test_wiki.py | Python | apache-2.0 | 53,414 | [
"VisIt"
] | 6124adbdc920d2635429fc3287aed04499fbcc293e0089879e391e3063413241 |
# -*- coding: utf-8 -*-
import logging
import os
import bpy
import math
from mathutils import Vector, Quaternion
from mmd_tools import utils
from mmd_tools.bpyutils import matmul
from mmd_tools.core import vmd
from mmd_tools.core.camera import MMDCamera
from mmd_tools.core.lamp import MMDLamp
class _MirrorMapper:
... | powroupi/blender_mmd_tools | mmd_tools/core/vmd/importer.py | Python | gpl-3.0 | 25,901 | [
"VMD"
] | 10fce42314e1e3216ef8c22ebbf9fa21f858c85d97451af7088ac0d4f1634123 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
multiqc.multiqc
~~~~~~~~~~~~~~~~~~~~~
The main function to run MultiQC. Sorry about the messy namespace.
Primarily called by multiqc.__main__.py
Imported by __init__.py so available as multiqc.run()
"""
from distutils import version
from distutils.dir_util import copy_t... | ewels/MultiQC | multiqc/multiqc.py | Python | gpl-3.0 | 46,536 | [
"VisIt"
] | e01f300c365bafe32b40b30cf37df736eb75369b76f6151a5bc8eb9e96b4361c |
import re
from pycparser import c_parser, c_ast
RE_HASH_CMT = re.compile(r'^#\s*\d+.*$', flags=re.MULTILINE)
# Ref: ISO/IEC 9899:TC2
# http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
def c_to_ast(parser, c_str):
"""Transform a @c_str into a C ast
Note: will ignore lines containing code refs ie:
... | cea-sec/miasm | miasm/core/ctypesmngr.py | Python | gpl-2.0 | 23,630 | [
"VisIt"
] | 54e9681458a7bdfb635e4b1f673af6add6712c531e0413bb6dde0a6c081724bc |
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 (... | ppiotr/Bibedit-some-refactoring | modules/websession/lib/websession_templates.py | Python | gpl-2.0 | 102,859 | [
"VisIt"
] | 4b79d16ef1c777af7f444ee8d0c03d72a6486ad5a252419857370d0ffedad45c |
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Land Equilibrium")
def land_equilibrium(card, abilities):
def land_equilibrium():
return AbilityNotImplemented
... | Julian/cardboard | cardboard/cards/sets/legends.py | Python | mit | 59,143 | [
"BLAST"
] | b74810d67fb209bb62aeae83ad0249d237a1f8f014795ca6df874e91b42fd0b8 |
"""
Provides mapping between extensions and datatypes, mime-types, etc.
"""
import os, tempfile
import logging
import data, tabular, interval, images, sequence, qualityscore, genetics, xml, coverage, tracks, chrominfo, binary
import galaxy.util
from galaxy.util.odict import odict
class ConfigurationError( Exception ):... | volpino/Yeps-EURAC | lib/galaxy/datatypes/registry.py | Python | mit | 18,485 | [
"Galaxy"
] | b4ee5d081efde309b3fd315ecb263d0299098022a197fb11aedc601b213c4008 |
import os.path
from galaxy.util import in_directory
from .action_mapper import FileActionMapper
from .action_mapper import path_type
from .staging import CLIENT_INPUT_PATH_TYPES
from .util import PathHelper
class PathMapper:
""" Ties together a FileActionMapper and remote job configuration returned
by the P... | galaxyproject/pulsar | pulsar/client/path_mapper.py | Python | apache-2.0 | 4,511 | [
"Galaxy"
] | 181cbe7e1516001cf5a25e91d50bf910f2351b70180a809e43553805584aa4ec |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
# Authors: Christoph Klein
# Contributors:
#
# MDTraj is free software: yo... | swails/mdtraj | mdtraj/tests/test_xyz.py | Python | lgpl-2.1 | 3,492 | [
"MDTraj"
] | 90766e93e8ae6c18522025a46fc788b0c56c9fe37f4e8c15a1f8ed904922cd2c |
# -*- coding: utf-8 -*-
usage = \
'''
$ python analysis_obj.py [input:obj filename] [output:vtk filename]
'''
import sys
import random
vtk_header = '''\
# vtk DataFile Version 1.0
Unstructured Grid Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS %d float
'''
def read_obj_file(filename):
points = []
f = op... | neuroinformatics/bah2015_registration | analysis_obj/analysis_obj.py | Python | mit | 1,129 | [
"VTK"
] | 76e4c3464374c1ea906e6b5ba817652ac894e302a13c587157f28f5a7a54593d |
import openvoronoi as ovd
import ovdvtk
import ovdgenerators as gens
import randompolygon as rpg # random polygon generator see https://github.com/aewallin/CGAL_RPG
import time
import vtk
import datetime
import math
import random
import os
import sys
import pickle
import gzip
if __name__ == "__main__":
# w=2500
... | aewallin/openvoronoi | python_examples/chain_2_rpg.py | Python | lgpl-2.1 | 4,074 | [
"VTK"
] | 8d4b2c3273413d4feab90d12b0cc3032f5bad927e65ffbc008751eba4415136c |
##############################################################################
# adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD)
# Simulations on HPC Resources
# Copyright 2017 FU Berlin and the Authors
#
# Authors: Jan-Hendrik Prinz
# Contributors:
#
# `adaptiveMD` is free software: ... | thempel/adaptivemd | adaptivemd/util.py | Python | lgpl-2.1 | 2,997 | [
"MDTraj"
] | ca8135e54a081dd57b38324cd13895d5fc1dbea352f2daaa88016f7164d213c0 |
from collections import namedtuple
from dataclasses import make_dataclass
import numpy as np
import warnings
from itertools import combinations
import scipy.stats
from scipy.optimize import shgo
from . import distributions
from ._continuous_distns import chi2, norm
from scipy.special import gamma, kv, gammaln
from . im... | WarrenWeckesser/scipy | scipy/stats/_hypotests.py | Python | bsd-3-clause | 45,046 | [
"ASE"
] | 20859fb76bbabd364179d9b4adae1afe4821550cb70550c4a32493000d606f71 |
################################################################################
# Copyright (C) 2011-2013 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
General numerical functions and methods.
"""
import functool... | SalemAmeen/bayespy | bayespy/utils/misc.py | Python | mit | 43,915 | [
"Gaussian"
] | 0bf9c2da42f3e48d17d8ffe7d2e04697e296924a82b9fa8b716c0a0f7cdb2b91 |
from config import config
from titanembeds.redisqueue import RedisQueue
from titanembeds.commands import Commands
from titanembeds.socketio import SocketIOInterface
from titanembeds.poststats import DiscordBotsOrg, BotsDiscordPw
from collections import deque
# from raven import Client as RavenClient
# import raven
impo... | TitanEmbeds/Titan | discordbot/titanembeds/bot.py | Python | agpl-3.0 | 12,426 | [
"VisIt"
] | 8831c67a49d8add16f575fa7c90bfecf07b90ac38f719f6b2c42132d14b9dad5 |
from __pyosshell__ import *
def write_xqmp_options(jobfile):
ofs = open('options.xml','w')
ofs.write('''<options>
<xqmultipole>
<multipoles>system.xml</multipoles> <!-- XML allocation polar sites -> fragment -->
<control>
''')
ofs.write(' <job_file>%s</job_file>\n' % jobfile)
ofs.write(''' <emp_file>mps.... | 12AngryMen/votca-scripts | lib/Carlstuff/votca/__ctpxqm__.py | Python | apache-2.0 | 1,410 | [
"Gaussian"
] | 05822717544eb5a0e8e533ae0417efbf3b9a79662af335a790ea0dedb797fc85 |
from rdkit import Chem
from mordred import Calculator
from mordred.GeometricalIndex import Radius3D
# Start Code 6
calc = Calculator(Radius3D)
result = calc(Chem.MolFromSmiles("c1ccccc1"))
err = result[0]
print(repr(err))
print(err.error)
| mordred-descriptor/mordred | examples/article/Code6.py | Python | bsd-3-clause | 241 | [
"RDKit"
] | 213e433e7ecaeea0d9efd8f8fb510a68cdcff812b86d6a184ab24819ac83b0d9 |
from vtk import *
source = vtkRandomGraphSource()
source.SetNumberOfVertices(75)
source.SetEdgeProbability(0.02)
source.SetUseEdgeProbability(True)
source.SetStartWithTree(True)
create_index = vtkProgrammableFilter()
create_index.AddInputConnection(source.GetOutputPort())
def create_index_callback():
input = creat... | b3c/VTK-5.8 | Examples/Infovis/Python/programmable_pipeline.py | Python | bsd-3-clause | 1,615 | [
"VTK"
] | ae3344295f1d36b8271e85b6fdbfe131a1728c81f4ea2cbb346248164f929e03 |
# -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | chrsrds/scikit-learn | sklearn/naive_bayes.py | Python | bsd-3-clause | 36,365 | [
"Gaussian"
] | b59b2196917d1249fbda7e5147f016500dfd865acfca473da10313082de46ace |
########################################################################
# $HeadURL $
# File: TransferDBMonitoringHandler.py
########################################################################
""" :mod: TransferDBMonitoringHandler
=================================
.. module: TransferDBMonitoringHandler
... | avedaee/DIRAC | DataManagementSystem/Service/TransferDBMonitoringHandler.py | Python | gpl-3.0 | 14,412 | [
"DIRAC"
] | 95387ac0e350aac36dd196524bb8906eb40c3105b91b8e0fdd989cc44f8c3a90 |
"""
Created on Jun 16, 2016
@author: Chris Smith -- csmith55@utk.edu
"""
from __future__ import division, print_function, absolute_import
import os
from multiprocessing import cpu_count
from warnings import warn
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import leastsq
from scipy.signal im... | anugrah-saxena/pycroscopy | pycroscopy/processing/image_processing.py | Python | mit | 53,543 | [
"Gaussian"
] | aeb72e499ef2636fb09bf99c0d2eeaa3e395886b90005f4668aef2563d5dad0d |
"""
Modified from
https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10.py
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import re
import sys
import glob
import random
import tensorflow as tf
import sres_input
f... | EdwardJKim/enhance | sres.py | Python | apache-2.0 | 9,492 | [
"Gaussian"
] | b6200f2b24e7b0e5ef1631c44985c1e5a62da750ec9aabcf80865a48c3669e94 |
########################################################################
# This example demonstrates a multiscale bistable model.
# In the low state there is no spiking, no Ca entry, and the KA channel
# is unophosporylated and hence active. This keeps the potential low.
# In the high state, there is sustained spikin... | BhallaLab/moose-examples | tutorials/Rdesigneur/ex8.0_multiscale_KA_phosph.py | Python | gpl-2.0 | 2,317 | [
"MOOSE"
] | 9372749ec0eff67f5dade934eddb456f5d55ab160c3f24806fec7c3105cf2d76 |
import numpy as np
from ase.units import Hartree
from gpaw.xc import XC
from gpaw.utilities import unpack
def vxc(paw, xc=None, coredensity=True):
"""Calculate XC-contribution to eigenvalues."""
ham = paw.hamiltonian
dens = paw.density
wfs = paw.wfs
if xc is None:
xc = ham.xc
el... | robwarm/gpaw-symm | gpaw/xc/tools.py | Python | gpl-3.0 | 1,924 | [
"ASE",
"GPAW"
] | a79bd457f26fa82fb9c6c5daccad5240aedf480509907df3b560bf4505628b64 |
"""
Module which interprets textX model based on viewX model and generates preview.html file
with Cytoscape.js graph model used for visualization of textX model. The preview.html file is hosted on file server
and can be loaded with multiple clients (regular internet browser or Visual Studio Code extension) and previewe... | danielkupco/viewX-vscode | src/python/viewx_interpreter.py | Python | mit | 27,366 | [
"Cytoscape"
] | fbedcb73be66785860739f9fdbdbade2801c4ad7008ab8281e892bb299cbfbcb |
#PBS -l nodes=20:ppn=4:opteron4
#PBS -q verylong
#PBS -N amc_n100_conv1
#PBS -m ae
import os
from montecarlo import SurfaceMonteCarloData
from ase.cluster.cubic import FaceCenteredCubic
from ase.cluster import data
from asap3.MonteCarlo.Metropolis import Metropolis
from asap3.MonteCarlo.Moves import SurfaceMove
from as... | auag92/n2dm | Asap-3.8.4/Projects/NanoparticleMC/resume_amc_vac.py | Python | mit | 2,344 | [
"ASE"
] | 03aa10164ef1aa319998bec70d09e929f9009292621b45deecda55f9b0f983e4 |
##
# Copyright 2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# Flemish Research Foundation (FWO)... | wpoely86/easybuild-easyblocks | easybuild/easyblocks/c/charmm.py | Python | gpl-2.0 | 6,101 | [
"CHARMM",
"GAMESS",
"Gaussian",
"Q-Chem"
] | 76a200a994551b5bbbcef44f3505dd7859b94eae3a55aaf90c7ec0973967dea9 |
import suspect.basis
import numpy
def gaussian_window(t, params):
"""
Calculates a Gaussian window function in the time domain which will broaden
peaks in the frequency domain by params["line_broadening"] Hertz.
Parameters
----------
t : arange ndarray
time axis
params :
Ret... | openmrslab/suspect | suspect/processing/_apodize.py | Python | mit | 758 | [
"Gaussian"
] | 08fa3e6182474b1a91b5016d1e5ede48de1f63fb8eef00cd90eee208e5bf0760 |
"""Teptools helpers."""
import configparser
import glob
import os
import re
def parse_rcfile(rcfile, section, default):
"""Return the specified section configurations from users rc file."""
if rcfile is None:
rcfile = os.path.join(os.path.expanduser('~'), '.teptoolsrc')
if not os.path.isfile(rcfi... | nelsyeung/teptools | teptools/helpers.py | Python | mit | 4,920 | [
"ONETEP"
] | 079d6257afb03917fcb91a51044cf31f1a79b22769273ead8168709e4a5e1c1a |
from subprocess import check_call,check_output
import numpy as np
import pandas as pd
import re
import itertools
import os
import scipy
import timeit
import sys
import pickle
import bisect
from scipy.stats import binom
import matplotlib.pyplot as plt
import seaborn as sns
def sim_data_readcounts(K,M,alltrees,num_mut... | HoseinT/BAMSE | simdata.py | Python | gpl-3.0 | 12,449 | [
"Gaussian"
] | 9981fed54f46f40ccfa759f4dd0415eadba4f43ea007cbf8e09180b9e325a6b7 |
# -----------------------------------------------------------------------------
# User configuration
# -----------------------------------------------------------------------------
dataset_destination_path = '/Users/seb/Desktop/spheres_%s'
vti_sphere_path = '/Users/seb/Downloads/spheres.vti'
# -----------------------... | Kitware/tonic-data-generator | scripts/vtk/samples/multi-spheres-volume.py | Python | bsd-3-clause | 3,105 | [
"VTK"
] | 40dc032f684dd03053bb2ece38f86284ea7ae4c6c0d83ed689f0fc5d0baece41 |
# -*- coding: utf-8 -*-
#@author: ilyass.tabiai@polymtl.ca
#@author: rolland.delorme@polymtl.ca
#@author: patrickdiehl@lsu.edu
import yaml
import os.path
from . import geometry
import sys
from . import output
from ..util import condition
from . import vis
from . import dic
import numpy as np
## Class handeling the inp... | lm2-poly/PeriPyDIC | peripydic/IO/deck.py | Python | gpl-3.0 | 25,943 | [
"VTK"
] | 68334faa3ce5d6337fc98a7b0944feefca34b4042c107eb7fb3a66ca3aba31fb |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi4/psi4 | psi4/driver/qcdb/qchem.py | Python | lgpl-3.0 | 18,398 | [
"CFOUR",
"Psi4",
"Q-Chem"
] | 3294ff7db63eed6bfcae7e0e6403b97297a29c19240164a94f53a825ae0afe03 |
# Visualizing neural fingerprints.
# This file recreates the plots in Figure 4 of the paper.
#
# It first learns a neural fingerprint with a linear model on top.
# Then, it
#
# David Duvenaud
# Dougal Maclaurin
# 2015
import os, pickle
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd impor... | HIPS/neural-fingerprint | examples/visualization.py | Python | mit | 10,614 | [
"RDKit"
] | db2072be164f742bf33525e3d90d0ab5ec285b00648c48ae8c05084adbd85b2e |
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import gobject
import gtk, pango
from zeroinstall import _, translation
from zeroinstall.support import tasks, pretty_size
from zeroinstall.injector import model, reader, download
import properties
f... | dabrahams/0install | zeroinstall/0launch-gui/iface_browser.py | Python | lgpl-2.1 | 20,203 | [
"VisIt"
] | 4ddb40e9791ae84652e7dc2f8715237af67d68e7bd1d82bd02a86f8273f4017f |
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
PROJECT_ABSPATH = os.path.abspath(os.path.dirname(__file__))
###############################################################################
# Steps for developing
# 1. $ workon_bk (for enivronment)
# 2. $ make devserver... | bkimmig/personal_webpage_pelican | pelicanconf.py | Python | gpl-2.0 | 3,996 | [
"Brian"
] | c4631dd7b258dfd304285c2bf4f2cde44ab5e066711bbaa727e8d0bb1d8e25f9 |
from __future__ import division, print_function
import numpy as np
from matplotlib import pyplot as plt
import abel
from abel.tools.polynomial import ApproxGaussian, PiecewisePolynomial
r = np.arange(201)
r0 = 100
sigma = 20
# actual Gaussian function
gauss = np.exp(-((r - r0) / sigma)**2 / 2)
# approximation with de... | PyAbel/PyAbel | doc/tools/approx_gaussian.py | Python | mit | 1,756 | [
"Gaussian"
] | fca6be0db112d772a165b9fc332e6b2fbd6b997901dce694ca705f737dfa9984 |
from __future__ import absolute_import
import re
import json
import time
import logging
import random
import six
from django.conf import settings
from django.core.cache import cache
from six.moves.urllib.parse import parse_qsl
from sentry import http
from sentry.utils.strings import count_sprintf_parameters
logger ... | jean/sentry | src/sentry/lang/javascript/errormapping.py | Python | bsd-3-clause | 3,747 | [
"VisIt"
] | b4a06ab728a08c2ad7b42bd52047c3983426914d901b2c4323667369eed30498 |
###########################################################################
#
# Copyright (C) 2010, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# For complete infor... | zenoss/ZenPacks.jschroeder.GangliaMonitor | ZenPacks/jschroeder/GangliaMonitor/datasources/GangliaMonitorDataSource.py | Python | gpl-2.0 | 3,746 | [
"VisIt"
] | 1d8da448c88ae61b66065541a3ac78ff8311c9b91bd1459dc0df0d2c482dd4c3 |
from __future__ import print_function
from __future__ import division
__author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor
import numpy as np
import itertools #to calculate all subsets
from copy import deepcopy
from math import atan, pi, cos, sin, sqr... | alexholcombe/movingCue | helpersAOHtargetFinalCueLocatn.py | Python | mit | 32,987 | [
"Gaussian"
] | eb8585913c85cb65211afe3f2528325e933e630a46eec64a0818b61bab54fe36 |
# Lint as: python3
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | google/tf-quant-finance | tf_quant_finance/models/hjm/gaussian_hjm.py | Python | apache-2.0 | 19,040 | [
"Gaussian"
] | 6709c9fb5c255939be54d6df3867c4ccd77040483598004a916f667644de95b8 |
import arcpy
import time
import numpy as np
import csv
import os
import gc
# Reusable includes that are used by several programs
#
# Released under the MIT License (MIT)
#
# Copyright (c) 2016 Andy Davies
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software ... | marbiouk/dsmtools | Tools/Includes.py | Python | mit | 17,269 | [
"NetCDF"
] | 70845ad094d8dfa2384fc7b09a5fd7b528b7f2e17f73276819c91a1f6702d4ef |
"""
Base class for tensor-product style meshes
"""
import numpy as np
import scipy.sparse as sp
from discretize.base.base_mesh import BaseMesh
from discretize.utils import (
is_scalar,
as_array_n_by_dim,
unpack_widths,
mkvc,
ndgrid,
spzeros,
sdiag,
sdinv,
TensorType,
interpolat... | simpeg/discretize | discretize/base/base_tensor_mesh.py | Python | mit | 48,927 | [
"Gaussian"
] | 800a436cc4702e6af7b1c0325da4cd1883542841e2cb848d4ee6db9fe1e75a7c |
__source__ = 'https://leetcode.com/problems/sliding-puzzle/'
# Time: O()
# Space: O()
#
# Description: Leetcode # 773. Sliding Puzzle
#
# On a 2x3 board, there are 5 tiles represented by the integers 1 through 5,
# and an empty square represented by 0.
#
# A move consists of choosing 0 and a 4-directionally adjacent n... | JulyKikuAkita/PythonPrac | cs15211/SlidingPuzzle.py | Python | apache-2.0 | 10,994 | [
"VisIt"
] | d01c0a697c99f1f082ffa80c0214c5abb0e40f6525e2e5de7668b4f9547553e3 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/bug_1117098 | openlp/core/lib/toolbar.py | Python | gpl-2.0 | 4,009 | [
"Brian"
] | cc2a37bd27440e9bfc2f0ba7c632cb71b289331a7348d632e6d2011341ac68ee |
#!/usr/bin/env python
'''
Created on Jan 5, 2011
@author: mkiyer
chimerascan: chimeric transcript discovery using RNA-seq
Copyright (C) 2011 Matthew Iyer
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 Founda... | genome/chimerascan-vrl | chimerascan/chimerascan_run.py | Python | gpl-3.0 | 51,684 | [
"Bowtie",
"pysam"
] | 8ff9dc0d094d08c24ae986c971d9cce2c40fe76440ce3861859abe7a9dab5fcf |
__author__ = "Brian O'Neill" # BTO
__doc__ = """
Configurable decorator for debugging and profiling that writes
caller name(s), args+values, function return values, execution time,
number of call, to stdout or to a logger. log_calls can track
call history and provide it in CSV format and Pandas DataFrame format.
NOTE:... | Twangist/log_calls | log_calls/log_calls.py | Python | mit | 124,843 | [
"Brian"
] | 4789b0f0fc87251437b2dab30af52765e526d3c488ffaf1e8e34079b3332064d |
# 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, software
# distributed under th... | iskandr/fancyimpute | fancyimpute/solver.py | Python | apache-2.0 | 7,938 | [
"Gaussian"
] | 0b7345c856d6b644d9bc6c2a90c728411a0ac34cab44133ad4337d528b12ce29 |
import time,math
import systemcommander
import aicommander
from Net import *
from worldnetclient import NetData
try: import cPickle as pickle
except: import pickle as pickle
import zlib
class WorldCommander:
def __init__(self):
self.sysComm = systemcommander.SystemCommander()
#self.aiComm = aico... | remremrem/EV-Tribute | world/worldcommander.py | Python | mit | 1,673 | [
"Galaxy"
] | 34434279e65ba365297fc51ee44e483594ec5d6d15793cf495f491823b41bef2 |
#
# Copyright 2016 The BigDL Authors.
#
# 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 ... | intel-analytics/BigDL | python/orca/src/bigdl/orca/ray/ray_on_spark_context.py | Python | apache-2.0 | 31,818 | [
"ORCA",
"VisIt"
] | d5f4bb19339a1c6fbd0759badf6b1109050944b37b764c88da926bdc2ddc8977 |
import numpy as np
from util import warning, fatalError
#from callCount import FunctionCallCount
try:
# Look for PyNIO ...
import Nio as reader
print "Using PyNIO as data reader."
except ImportError:
# PyNIO is not installed, so ...
try:
from netCDF4 import Dataset as reader
warnin... | pulsatrixwx/PulsatrixWx | util/dataIO.py | Python | mit | 25,986 | [
"NetCDF"
] | 781105629de29f82e13dd9f77625f0a5693b4058e0f8164066dca826f134278c |
'''Functions and variables for working with Mongo DB'''
from amber import settings
import pymongo
MDB = pymongo.Connection(
settings.MONGO_DB['connection'])[settings.MONGO_DB['database_name']]
MAIN_COLLECTION = MDB['main']
SERVERS_COLLECTION = MDB['servers']
def split_words(name):
'''Splitting words in the ... | yl3dy/amber | amber/mongo_db.py | Python | bsd-3-clause | 641 | [
"Amber"
] | 9d80934cfacf659d5e434b6b96566dafdff2a291c44c8999a3061f4439c56c91 |
# Copyright 2016 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... | krikru/tensorflow-opencl | tensorflow/contrib/learn/python/learn/estimators/__init__.py | Python | apache-2.0 | 11,427 | [
"Gaussian"
] | 819684a98055b5dc852aca9c8e2a12580d8db4f4025a890ac73ca845e120ba33 |
"""
Find intermediate evalutation results in assert statements through builtin AST.
This should replace _assertionold.py eventually.
"""
import sys
import ast
import py
from py._code.assertion import _format_explanation, BuiltinAssertionError
if sys.platform.startswith("java") and sys.version_info < (2, 5, 2):
... | toomoresuch/pysonengine | eggs/py-1.4.0-py2.6.egg/py/_code/_assertionnew.py | Python | mit | 12,757 | [
"VisIt"
] | cb0e59e5ba29d3a9b9f820d366a387561b46f3736d7717eae2f9a1cd7b832973 |
from asap3 import *
from ase.lattice.cubic import FaceCenteredCubic
from asap3.testtools import ReportTest
from asap3.md.velocitydistribution import MaxwellBoltzmannDistribution
from asap3 import mpi
from ase.data import reference_states
import numpy as np
import time
import sys
import os
debug = 0
if debug == 1:
... | auag92/n2dm | Asap-3.8.4/Test/Timing/OpenKIM_ParTiming.py | Python | mit | 4,170 | [
"ASE"
] | 598d9b1e9f4c3954cbfdff71ea73bd8c0e3a463adcd66f628ed5871b7ebfcde4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.