text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
import h5py
import numpy
from rdkit import Chem
from steps.featuregeneration.shared import substructure_feature_generator
from util import data_validation, misc, file_structure, file_util, logger, process_pool, constants, \
hdf5_util, multi_process_progressbar
class SaliencyMapSubstructureFeatureGeneration:
... | patrick-winter-knime/mol-struct-nets | molstructnets/steps/featuregeneration/saliencymapsubstructurefeaturegeneration/saliency_map_substructure_feature_generation.py | Python | gpl-3.0 | 6,334 | [
"RDKit"
] | 5440d74ecbc43b7ebdd9b6ca5fb2c40aceef9965530a03b4181aacf3df097db5 |
""" RemoveNestedFunctions turns nested function into top-level functions. """
from pythran.analyses import GlobalDeclarations, ImportedIds
from pythran.passmanager import Transformation
from pythran.tables import MODULES
import ast
class _NestedFunctionRemover(Transformation):
def __init__(self, pm, ctx):
... | artas360/pythran | pythran/transformations/remove_nested_functions.py | Python | bsd-3-clause | 3,162 | [
"VisIt"
] | f5afa3a583b492e25cd795691eb916d8bf20600b6108f5329b28051121820e95 |
#!/usr/bin/env python
'''
This is an implementation of the Metropolis Hastings algorithm.
This is used for Bayesian sampling from a distribution that's typically multidimensional and can't be numerically integrated.
It utilizes Markov chains, which are ordered lists of stochastic (random) variables.
The Markov chain w... | mlskit/astromlskit | MCMC/mh.py | Python | gpl-3.0 | 4,354 | [
"Gaussian"
] | 6e505aa705c66246de72e082ffe8000de637a8fb3ef11738e712965fd08f8ed6 |
# -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from scipy.stats import multivariate_normal
from pgmpy.factors.continuous import ContinuousFactor
class JointGaussianDistribution(ContinuousFactor):
u"""
In its most common representation, a multivariate Gaussian distribution
ov... | sandeepkrjha/pgmpy | pgmpy/factors/continuous/JointGaussianDistribution.py | Python | mit | 13,522 | [
"Gaussian"
] | fdf275bdd8112a4ecc72ae0601b24d5700a2245ad9f8f573e3651e1ebcf87aeb |
#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
"""
This is a script that runs a simulation of a small OB model.
It consists of an input signal and some OB columns. A column is a set of one
glomerule, its connected mitral cells, and the granule cells.
Script Overview
---------------
1. Import the model and necessary s... | neuro-lyon/multiglom-model | src/multiglom_network.py | Python | mit | 12,424 | [
"Brian",
"NEURON"
] | 18bc96f03e1847c7ac04524bf41be322e6de88fb452dcb5cca1edde08f8b72a2 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Mozilla Firefox history database plugin."""
import collections
import unittest
from plaso.lib import definitions
from plaso.parsers.sqlite_plugins import firefox_history
from tests.parsers.sqlite_plugins import test_lib
class FirefoxHistoryPluginTest(... | kiddinn/plaso | tests/parsers/sqlite_plugins/firefox_history.py | Python | apache-2.0 | 5,892 | [
"VisIt"
] | b86510d401cebd0ac91b1dc304ad6f35245e58cf8deb5a2eb52a8e6bf9371f3f |
# Scan a genome database using BLAST
# Created by Bryan White, 2015
# input: list of FASTA files
# output: completed BLAST database
#
# Copyright (c) 2015-2016 Bryan White, bpcwhite@gmail.com
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | bpwhite/bioinformatics-toolbox | src/blst_scan_genomes.py | Python | gpl-3.0 | 9,596 | [
"BLAST"
] | 277e443463d9a36fc05f250ad1b07e5893a6f66d5f8d99ecd43ccdf111e99be6 |
# This file is part of PyEMMA.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# PyEMMA 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 vers... | gph82/PyEMMA | pyemma/util/tests/statistics_test.py | Python | lgpl-3.0 | 1,944 | [
"Gaussian"
] | 8eeab67c3d4c1342f5d56c916e7f231a97226c120cecffa15e8d023c0f7d18cd |
__author__ = 'Tom Schaul, tom@idsia.ch'
from scipy import zeros, randn
from random import random, sample, gauss
from topology import TopologyEvolvable
class MaskedParameters(TopologyEvolvable):
""" A module with a binary mask that can disable (=zero) parameters.
If no maximum is set, the mask can potentiall... | daanwierstra/pybrain | pybrain/structure/evolvables/maskedparameters.py | Python | bsd-3-clause | 3,787 | [
"Gaussian"
] | 7e18ebfb8ea0d8ec62ed2375956c67a486a0f888734336912f84cf1a2a471b3c |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | pkreissl/espresso | testsuite/python/brownian_dynamics_stats.py | Python | gpl-3.0 | 4,981 | [
"ESPResSo"
] | 6bc8cf7270a1329f25508092dce1a6019601d3bdcb82b672b5742717db5b56ce |
# coding: utf-8
from __future__ import unicode_literals, division, print_function
"""
Error handlers for errors originating from the Submission systems.
"""
__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "mjvansetten@gmail.com"
__date__ = "... | yanikou19/pymatgen | pymatgen/io/gwwrapper/scheduler_error_handlers.py | Python | mit | 3,375 | [
"pymatgen"
] | a3913abe1f8848dd8dc5d195aed21f3990bd32e8a870f37addb2c347453a91c7 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | KaiSzuttor/espresso | testsuite/python/magnetostaticInteractions.py | Python | gpl-3.0 | 2,066 | [
"ESPResSo"
] | a6a7fa1c3c30be3c20e7daf453c5cfc1805f3318c48e4f05f0d44107bcc9fac8 |
import random
from _collections import OrderedDict
import quantities
import theano
from theano import tensor as TT
import numpy as np
from . import ensemble
from . import simplenode
from . import probe
from . import origin
from . import input
from . import subnetwork
from . import helpers
class Network(object):
... | ctn-waterloo/nengo_theano | nengo_theano/network.py | Python | mit | 23,984 | [
"NEURON"
] | 93d54c17c84fd58a86f6616434194ea0b0b4d9f6d4395475a3c65a0e9042c400 |
#
# Copyright 2001 - 2016 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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
# (... | ospaceteam/outerspace | client/osci/gdata.py | Python | gpl-2.0 | 8,560 | [
"Galaxy"
] | 25c497eca7cf3eaca4c954913db32425b1538a48edbe36e55b54998a6f8cb3e6 |
#pylint: disable=missing-docstring
####################################################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment ... | liuwenf/moose | python/MooseDocs/commands/check.py | Python | lgpl-2.1 | 4,200 | [
"MOOSE"
] | e4aad2de50566454d8795fe8b4b33afb14b57ba7dd9b01aafcbb3d7e935fc7c8 |
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems 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.apa... | matthijsvk/multimodalSR | code/Experiments/neon-master/neon/optimizers/optimizer.py | Python | mit | 40,063 | [
"Gaussian"
] | 1633e9a7cad0e80811427adbaf6876f2bad6116243665b3c170dfedf772c26e4 |
# Compare Algorithms
import pandas
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from sklearn import model_selection
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.discriminant_... | alod83/osiris | plot/compare_algorithms.py | Python | mit | 1,613 | [
"Gaussian"
] | 1ba223496fed266a6f91dabe42dc1da718cc5044f9a0a3fe6a3d9a026786fc9d |
import ocl
import camvtk
import time
import vtk
if __name__ == "__main__":
print ocl.version()
myscreen = camvtk.VTKScreen()
stl = camvtk.STLSurf("../stl/gnu_tux_mod.stl")
print "STL surface read"
myscreen.addActor(stl)
stl.SetWireframe()
polydata = stl.src.GetOutput()
s... | JohnyEngine/CNC | opencamlib/scripts/pathdropcutter_test_1.py | Python | apache-2.0 | 2,141 | [
"VTK"
] | c7e124db64cc3bb5302c5a0f7fd789e99aab4c328de83d15cd684ef90e1020f6 |
import unittest
from itertools import combinations, permutations
from phevaluator.hash import hash_quinary
from phevaluator.tables import NO_FLUSH_5
class TestNoFlush5Table(unittest.TestCase):
TABLE = [0] * len(NO_FLUSH_5)
VISIT = [0] * len(NO_FLUSH_5)
CUR_RANK = 1
NUM_CARDS = 5
@classmethod
... | HenryRLee/PokerHandEvaluator | python/tests/table_tests/test_hashtable5.py | Python | apache-2.0 | 4,398 | [
"VisIt"
] | 7966de771333a029c9ccab2e15b565f43e31ad994c58534ad1ef442cc6863113 |
'''
ray optics
'''
from numpy import pi
from ocelot.optics.elements import *
import numpy as np
intersection_tol = 1.e-6
class Ray(object):
def __init__(self,r0=[0,0,0], k=[0,0,1], lamb = 2.0):
self.r0 = [np.array(r0)]
self.k = [np.array(k)]
self.lamb = lamb
self.s = [1]
... | ocelot-collab/ocelot | ocelot/optics/ray.py | Python | gpl-3.0 | 10,620 | [
"CRYSTAL"
] | 97ffb4ae71b95abaeed7c35b597c994119f316c02a266c977d4271d20cc80739 |
# Copyright 2006, 2007, 2008, 2009 Brailcom, o.p.s.
#
# Author: Tomas Cerha <cerha@brailcom.org>
#
# 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 ... | pvagner/orca | src/orca/speechdispatcherfactory.py | Python | lgpl-2.1 | 19,547 | [
"ORCA"
] | 74f7a59cb608d4109ac7d85c0c38338af84cff9c8a705d447217ee13f1ec4fc5 |
import logging
import os
import re
import shutil
from functools import partial, wraps
import netCDF4
import numpy as np
from django.core.exceptions import ValidationError
from django.conf import settings
from django.db import models, transaction
from django.forms.models import formset_factory, BaseFormSet
from django.... | hydroshare/hydroshare | hs_file_types/models/netcdf.py | Python | bsd-3-clause | 44,595 | [
"NetCDF"
] | 6bb452f85bebf0b2225e0d316a03436cb9f804c78f57d1902166aa84fbf858a0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals, \
absolute_import
import os
import unittest
from pymatgen.io.lammps.input import LammpsInput
__author__ = 'Kiran Mathew'
__email__ = 'km... | setten/pymatgen | pymatgen/io/lammps/tests/test_input.py | Python | mit | 2,251 | [
"CHARMM",
"LAMMPS",
"pymatgen"
] | 76fa6df1f42b5de6ba07d7f660e1be0a0201c4fdd6127119672ab188b84cc363 |
# -*- coding: utf-8 -*-
# Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
# Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc.,... | copasi/COPASI | copasi/bindings/python/unittests/Test_CCopasiContainer.py | Python | artistic-2.0 | 1,692 | [
"COPASI"
] | c819a8e7e086114d36a35f52ac5ff0668320644fd692257f39f6a5f9d4856e16 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Appcelerator Titanium Mobile
# Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.
# Licensed under the terms of the Apache Public License
# Please see the LICENSE included with this distribution for details.
#
# Android Application Script
#
import os, s... | appcelerator/titanium_mobile_tooling | scripts/android/android.py | Python | apache-2.0 | 14,251 | [
"VisIt"
] | 3aaa38262de212ad4fdec28e31ebbbd68084a45d950b976bbc1022b45b53f853 |
#
# 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... | jasonkuster/incubator-beam | sdks/python/apache_beam/transforms/ptransform.py | Python | apache-2.0 | 24,237 | [
"VisIt"
] | ead86e7ea09bfd223da32b4606822850cc2eabfea47200f363f8ca313d38cc20 |
#!/usr/bin/env python
__author__ = "waroquiers"
import unittest
import numpy as np
from pymatgen.util.testing import PymatgenTest
from pymatgen.analysis.chemenv.utils.math_utils import (
_cartesian_product,
cosinus_step,
divisors,
get_center_of_arc,
get_linearly_independent_vectors,
power3_... | vorwerkc/pymatgen | pymatgen/analysis/chemenv/utils/tests/test_math_utils.py | Python | mit | 5,110 | [
"pymatgen"
] | b61d969685843b2a112cbd61b35eedbeb0bca13090d8ad4290965cc7bc8cbc4c |
# Placeholder because util moved
# Remove this in version 1.0
from __future__ import absolute_import
import warnings
with warnings.catch_warnings():
warnings.simplefilter('always', DeprecationWarning)
warnings.warn(("util has moved to MDAnalysis.lib.util "
"and will be removed from here in r... | kain88-de/mdanalysis | package/MDAnalysis/core/util.py | Python | gpl-2.0 | 398 | [
"MDAnalysis"
] | ca1387a1088ed4df3f16198a31402f63bf0df7835aa0a71d67ed73f8b9c1c392 |
# tronutils: Utilities library for a TronBot for the Google AI Challenge 2010
# Copyright (C) 2010 Corey Abshire
#
# 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... | jogo279/trobo | opponents/corey_abshire/tronutils.py | Python | bsd-2-clause | 14,000 | [
"VisIt"
] | ba579f8fa1cdffc0f7af739249f72ee10e073215017e723878533f1b3b8cfef6 |
import struct, sys, zlib, StringIO, time
def get_block_bounds(filename):
"""Pre block starts
start 0-indexted, end 1-indexted
:param filename: filename
:type filename: string
:return: 0-index start and 1-index end
:rtype: array of arrays with the [start end] of each block
"""
bs = []
with open(filename,'r... | jason-weirather/py-seq-tools | seqtools/format/bgzf.py | Python | apache-2.0 | 8,243 | [
"Biopython"
] | dca01e1424f4078e8dc84cbb000f549247086590dc610295dfd031f833d1be84 |
#-*- coding: utf8
# Author: David C. Lambert [dcl -at- panix -dot- com]
# Copyright(c) 2013
# License: Simple BSD
"""The :mod:`random_layer` module
implements Random Layer transformers.
Random layers are arrays of hidden unit activations that are
random functions of input activation values (dot products for simple
ac... | holandajunior/ExtremeLearningMachine | Python-ELM/src/random_layer.py | Python | mit | 18,813 | [
"Gaussian"
] | 8ab2cc84500d1f94cdc1b156e880fc52e5446d6275a20da99c17b4e8dc257b2b |
"""
Support for generating the options for a SelectToolParameter dynamically (based
on the values of other parameters or other aspects of the current state)
"""
import operator, sys, os, logging
import basic, validation
from galaxy.util import string_as_bool
log = logging.getLogger(__name__)
class Filter( object ):
... | volpino/Yeps-EURAC | lib/galaxy/tools/parameters/dynamic_options.py | Python | mit | 19,570 | [
"Galaxy"
] | 7888874ff11e5b8840f11778224dfe608aaa1b6dedb0282d51d066ebaf288736 |
# Copyright (c) 2015, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
from yambopy import *
from yambopy.plot import *
import os
class YamboBSEAbsorptionSpectra(YamboSaveDB):
"""
Create a file with information about the excitons from Yambo files
"""
def __init__(... | palful/yambopy | yambopy/bse/bse_absorption.py | Python | bsd-3-clause | 10,079 | [
"Yambo"
] | 05ad07cfbd62841ee2937f566884c1982b13702148cee9cbf1ee13b48b7e3ece |
#!/usr/bin/env python
##
## See COPYING file distributed along with the ncanda-data-integration package
## for the copyright and license terms
##
"""
XNAT Sessions Report
Check for valid scanning sessions and time windows by first caching all the
XNAT session XML files and then parsing these files for necessary in... | sibis-platform/ncanda-data-integration | scripts/reporting/xnat_sessions_report.py | Python | bsd-3-clause | 11,745 | [
"VisIt"
] | 11924db1891618d2dfaaa732deb10615d7c600498aaa7dc38bfae243972d14a9 |
import numpy as np
import time
import pygmin.utils.readAmberParam as readAmb
import ambgmin_ as GMIN
import pygmin.potentials.gminpotential as gminpot
import pygmin.basinhopping as bh
from pygmin.storage import savenlowest
from pygmin.NEB import NEB
from pygmin.utils.rbtools import *
from pygmin.takestep import generic... | js850/PyGMIN | examples/amber/metenk/run_gui.py | Python | gpl-3.0 | 2,507 | [
"Amber"
] | 681272b3e1c4651aba04db353925d435270eee30a73e1ad52434082ca06c6492 |
from Sire.Mol import *
from Sire.IO import *
from Sire.Vol import *
from Sire.FF import *
from Sire.MM import *
from Sire.CAS import *
from Sire.Cluster import *
from Sire.Squire import *
from Sire.Maths import *
from Sire.Qt import *
from Sire.Units import *
import time
timer = QTime()
#read in all of the molecule... | chryswoods/SireTests | unittests/Squire/threadmolpro.py | Python | gpl-2.0 | 2,844 | [
"Molpro"
] | 8376436c730a5d72d29c8b4590fc0c11aaf096d873c749c07e465e7f3b786d3a |
"""Quality control and summary metrics for next-gen alignments and analysis.
"""
import collections
import contextlib
import csv
import os
import shutil
import subprocess
import pandas as pd
import lxml.html
import yaml
from datetime import datetime
# allow graceful during upgrades
try:
import matplotlib
matpl... | verdurin/bcbio-nextgen | bcbio/pipeline/qcsummary.py | Python | mit | 43,958 | [
"pysam"
] | 3fcf43ec1eef81f3e7a453c57c7c2b4b0570bf648f5f624b6fa3f973272d7644 |
#* 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
import sys
... | harterj/moose | python/peacock/PostprocessorViewer/plugins/AxesSettingsPlugin.py | Python | lgpl-2.1 | 6,046 | [
"MOOSE"
] | 3689f1a458896c897dbcbb7b04c82b314841ad175b438acf38a1f7ca4595a6bd |
#!/usr/bin/env python2
desc="""Filter pairs with at least one read aligned.
"""
epilog="""Author: l.p.pryszcz+git@gmail.com
Mizerow, 25/06/2014
"""
import os, sys
import pysam
from datetime import datetime
from Bio.Seq import Seq
def pair2interleaved_fasta(pair):
"""Report interleaved fasta."""
return "".join... | lpryszcz/bin | sam2one_aligned.py | Python | gpl-3.0 | 2,667 | [
"BWA",
"pysam"
] | c39b1c97c46101f29ba9b78cebf9233386e4e20638eab5deae0e48a7a756a6d9 |
import unittest, random, sys, time
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_glm, h2o_import as h2i, h2o_exec as h2e
def define_params():
paramDict = {
'standardize': [None, 0,1],
'beta_epsilon': [None, 0.0001],
'family': [None, 'gaussian', 'binomial', 'poisson... | 111t8e/h2o-2 | py/testdir_single_jvm/test_GLM2_lambda_search.py | Python | apache-2.0 | 2,630 | [
"Gaussian"
] | 69c14962cd2b5df0f586b13f9e95685a730cb6473ff39263b8d4d04126327be3 |
#
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2015 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License versio... | BhallaLab/moose-examples | snippets/diffSpinyNeuron.py | Python | gpl-2.0 | 10,880 | [
"MOOSE",
"NEURON"
] | 2b5117f4a3f0f22c1676a952932f5d3109da0b9e40def856b1e129b1a8113297 |
#!/usr/bin/env python
###############################################################################
# This script intends to create a model of disk and envelope (Keto&Zhang 2010)#
# And would produce SPARX compatible HDF and VTK file used for visualization #
##########################################################... | itahsieh/sparx-alpha | preprocessor/script/CYL2D_preprocessor.py | Python | gpl-3.0 | 12,902 | [
"VTK"
] | bd03dcbf498da9c5c0a9f4d055e98563ff3955a60d1ee463b3c6f378249599ac |
#!/usr/bin/env python
# Kyle Hernandez
# Although not required in any sense, share the love and pass on attribution
# when using or modifying this code.
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwi... | kmhernan/Publications | Lowry-2013-FxH-Map/python/SyntenyScripts/extract_fox.py | Python | unlicense | 3,469 | [
"BLAST"
] | ba84fd3a832ff78cb539d22ddefc85f320786fdf25474753e9e72070aa1fc543 |
import genepy
import numpy as np
import os
from Bio import SeqRecord
# NEXT TIME :
# Two errors to deal with :
# - Err.: one or more missing sequences in block 2
# --- solutions - Guindon ?
# --- solutions - read .phy generated by ClustalO, and rewrite it using BioPython
# - Duplicate names in PHYLIP files due to... | QCaudron/genepy | genepy/seqarray.py | Python | mit | 6,327 | [
"Biopython"
] | 5a08932a7d8506a509633804f9fbe5deb4d85dbb9707960c228a8b4962f92b87 |
#!/usr/bin/python
# -*- coding: utf8 -*-
import numpy as np
import math
import time
from scipy.ndimage import correlate1d
def convol1d(array,kernel,scale_factor=None):
"""
The convol1d function convolves an array with a kernel 1D,
and returns the result. Convolution is a general process
that can be used for var... | Hypnus1803/FlowMapsGUI | GUI/MainCodes/convol.py | Python | bsd-2-clause | 2,872 | [
"Gaussian"
] | 63f485b738d21954df4a59c3c469d47ac9c7d9c513566ae50d68e7393ed4ef3c |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.cm
import snn_utils.plotter as plotter
import snn_utils.plotter.backends.mpl as mpl_plotter
import snn_utils.plotter.interface as interface
import snn_utils.plotter.plots as plots
from config import *
from snn_utils.comm.serializer im... | IGITUGraz/spore-nest-module | examples/lever_press_showcase/python/interface.py | Python | gpl-2.0 | 3,490 | [
"NEURON"
] | dde2c975be811329320285e0436050df60b0bf3ac1f57721d15719fbfbceb67c |
#
#-*- coding:utf-8 -*-
"""
Gentoo-keys - base.py
Command line interface argsparse options module
and common functions
@copyright: 2012-2015 by Brian Dolbec <dol-sen@gentoo.org>
@license: GNU GPL2, see COPYING for details.
"""
from __future__ import print_function
import argparse
import os
imp... | gentoo/gentoo-keys | gkeys/gkeys/base.py | Python | gpl-2.0 | 14,995 | [
"Brian"
] | e8d35516e7a1aa00b6175d0798ef9dfe3ccc2eb1d8a9424b767fbecc326fd395 |
from collections import namedtuple
from django.test import SimpleTestCase, TestCase
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.locations.models import LocationType, SQLLocation
from corehq.apps.locations.tree_utils import TreeError, assert_no_cycles, expansion_validators
from corehq.apps.... | qedsoftware/commcare-hq | corehq/apps/locations/tests/test_bulk_management.py | Python | bsd-3-clause | 40,566 | [
"Galaxy"
] | 1ec47bba318b91aa1f73a9376f3a4c6fb7ae807de15f089c2f09afb17fb862f6 |
import numpy as np
import os
import os.path as op
from os.path import join as pjoin
import re
import shutil
import subprocess
from nose.tools import assert_equal
from numpy.testing import assert_raises, assert_array_equal
from tempfile import mkdtemp, mktemp
import nibabel as nib
from surfer import Brain, io, utils
fr... | diego0020/PySurfer | surfer/tests/test_viz.py | Python | bsd-3-clause | 11,223 | [
"Mayavi"
] | c084a82534e50edd04043c60f3780458c89579cb4a87454b753c43a391bfdc62 |
from mcpi.minecraft import Minecraft
from mcmodels import Rocket, LaunchPad
from time import sleep
import math
def findPointOnCircle(cx, cy, radius, angle):
x = cx + math.sin(math.radians(angle)) * radius
y = cy + math.cos(math.radians(angle)) * radius
return((int(x + 0.5),int(y + 0.5)))
if __name__ == "_... | astro-pi/SpaceCRAFT | spacecraft/mcrocketlaunch.py | Python | bsd-3-clause | 1,969 | [
"BLAST"
] | 2ac74a51f5afe864e513dbe0b07e7a960578e0421b301aaa0653bb060341b704 |
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
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='page... | forestdussault/olc_webportalv2 | config/urls.py | Python | mit | 1,664 | [
"VisIt"
] | ae51a17b621804e7f3d5e8c6fda5b67355baa3fabe3b44b1fb5cd9e1e41be548 |
# Steps specific to the day-view
from behave import step
from pages.day_view import DayViewPage
@step('we visit the view for day {day:Int}')
def step_impl(context, day):
page = DayViewPage(context)
page.visit(day)
| abingham/accu-2017-elm-app | tests/features/steps/day_view.py | Python | mit | 225 | [
"VisIt"
] | 1b6824ff4ea5cddab994b6ca7223ac07c78d4220b5d01183d047630c77dbe54e |
# -*- coding:utf-8 -*-
# ----------------------------------------------------------------------
# Copyright 2016 Juergen Probst
#
# This file is part of pyMPB.
#
# pyMPB 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 Fou... | probstj/pyMPB | pympb/phc_simulations.py | Python | gpl-3.0 | 75,418 | [
"CRYSTAL",
"TINKER"
] | 5a427bd594ef0a022edf239c9760f0fa67ed2bd3baef7d7b9ffa3c5617a2e545 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Mega-DatA-Lab/mxnet | example/reinforcement-learning/dqn/base.py | Python | apache-2.0 | 13,774 | [
"Gaussian"
] | 482b0902ac17850ab9b9fabc86056bbea65e650539fb2f878b1aa995945a55dc |
from math import ceil, log2
def one_bits(n):
"""
Returns the number of 1s in the binary representation of a non-negative integer.
Brian Kernighan’s algorithm. Note that x - 1 toggles all bits starting from the last 1-bit (inclusive). This has the
same effect as n -= n & -n, which is used in Fenwick... | liboyin/algo-prac | mathematics/bleak_number.py | Python | gpl-3.0 | 1,490 | [
"Brian"
] | 70c8a050a83726b57a6a6bdee77a73e1989dbe6e8bc94b13e92f80fb77a935dc |
"""
Numerical python functions written for compatability with MATLAB
commands with the same names.
MATLAB compatible functions
-------------------------------
:func:`cohere`
Coherence (normalized cross spectral density)
:func:`csd`
Cross spectral density uing Welch's average periodogram
:func:`detrend`
... | Reagankm/KnockKnock | venv/lib/python3.4/site-packages/matplotlib/mlab.py | Python | gpl-2.0 | 128,046 | [
"Gaussian"
] | de289236a11c26ba41b95347b0a8ef99778ff6e9cf8e9811af0c9b5173152091 |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | snyderr/robotframework | src/robot/model/testsuite.py | Python | apache-2.0 | 6,114 | [
"VisIt"
] | 06cb69c2ca4b6fb5a1caa2ee90babb7b4d2f38e9408b88ad025041d5ce4ea9ab |
from .. import nengo as nengo
from ..nengo.connection import gen_transform
## This example demonstrates how to create a neuronal ensemble that will combine two 1-D
## inputs into one 2-D representation.
##
## Network diagram:
##
## [Input A] ---> (A) --.
## v
## ... | jaberg/nengo | examples/combining.py | Python | mit | 1,970 | [
"NEURON"
] | 33aa9fd75f1d286fb0fd796158d912ab03b6eb1cef6d88fcb9bc19c9ce820214 |
from multiasecalc.lammps import unitconversion
from ase.optimize.optimize import Dynamics
from ase.io.trajectory import PickleTrajectory
from ase.md.logger import MDLogger
from ase import units
from random import random
import numpy as np
class LAMMPSOptimizer(Dynamics):
""" Geometry optimizer for LAMMPS. works only ... | csmm/multiase | multiasecalc/lammps/dynamics.py | Python | gpl-2.0 | 7,937 | [
"ASE",
"LAMMPS"
] | 85f65c9b7d7d6acfac34a9174000b319bc7ac363020801bb3b93f93d6c460361 |
'''
Created on Aug 5, 2014
@author: gearsad
'''
# To allow the project to be run from outside Eclipse PyDev
import sys
sys.path.append('../')
import vtk
from math import cos, sin
from scene import Terrain
from scene import Bot
from scene import Axes
from scene import LIDAR
from scene import InteractorMapUser
from s... | GearsAD/semisorted_arnerve | sandbox/bot_vis_platform_oculus/bot_vis_platform/bot_vis_main.py | Python | mit | 3,432 | [
"VTK"
] | b4ef0995167be55e8f5f3a8b3f69a2dfec29518870024fc8722a879cc8833973 |
"""siegert.py: Function calculating the firing rates of leaky
integrate-and-fire neurons given their parameter and mean and variance
of the input. Rates rates for delta shaped PSCs after Brunel & Hakim 1999.
Rate of neuron with synaptic filtering with time constant tau_s after
Fourcoud & Brunel 2002.
Authors: Moritz H... | INM-6/neural_network_meanfield | siegert.py | Python | gpl-3.0 | 5,026 | [
"Gaussian",
"NEURON"
] | 36e8ebbf063ba7bf72026dd77a338621c418223eb79bbc1067e530912725fa07 |
from espressomd import System, shapes, electrokinetics
import sys
system = System(box_l = [10, 10, 10])
system.set_random_state_PRNG()
#system.seed = system.cell_system.get_state()['n_nodes'] * [1234]
system.cell_system.skin = 0.4
system.time_step = 0.1
ek = electrokinetics.Electrokinetics(
lb_density=1, frict... | KonradBreitsprecher/espresso | samples/ekboundaries.py | Python | gpl-3.0 | 1,441 | [
"VTK"
] | b4e9504edb7b23a5c5f40a1104a773679393c6e8b58d517caa88f2d08058ff9f |
##===============================================================================
# This file is part of TEMPy.
# It describes the implementation of Assembly class for the purpose of fitting multiple component into the assembly map
#
# TEMPy is a software designed to help the user in the manipulation
... | OniDaito/ChimeraXTempy | TEMPy/Assembly.py | Python | mit | 12,365 | [
"Gaussian"
] | 481ef716a6d29b3939ca87007410705224067e8e1aa6b16d568d8612f695fe33 |
from keras.models import Sequential, Model
from keras.layers import Flatten, Dense, Dropout, Reshape, Permute, Activation, Input #, merge
from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D
from keras.optimizers import SGD, Adam
import numpy as np
from scipy.misc import imread, imresize, i... | babraham123/deepdriving | alexnet_13.py | Python | mit | 3,156 | [
"Gaussian"
] | cd7b1c2f394ed5eedb3456ca4cf6373ef69dfcb3d6128872d3948e67c9c54ff8 |
import cPickle as pickle
import datetime
import signal
import numpy as np
import theano, theano.tensor as T
from DataHandler import MidiDataHandler as MDH
class connectionTransformation(theano.Op):
"""
theano op class to implement the connection of nodes the neuron connections of the rnn
and the ... | Ilya-Simkin/MusicGuru-RNN-Composer | DeepLearning/DeepLearningHandler.py | Python | lgpl-3.0 | 5,523 | [
"NEURON"
] | 3c873f2538ef5ba62235a3c44e823244d6ee6267a79e83091ee1169386680b15 |
# Copyright: 2005 Gentoo Foundation
# Author(s): Brian Harring (ferringb@gentoo.org)
# License: GPL2
import sys
from portage.cache import template, cache_errors
from portage.cache.template import reconstruct_eclasses
class SQLDatabase(template.database):
"""template class for RDBM based caches
This class is desig... | funtoo/portage-funtoo | pym/portage/cache/sql_template.py | Python | gpl-2.0 | 9,396 | [
"Brian"
] | 907f6fc66d6d12aa8d7bd92adb35772bb528e75c0b6ebb709ca45791e09e69c7 |
from math import sqrt
import numpy as np
from ase.data import covalent_radii
from ase.atoms import Atoms
from ase.calculators.singlepoint import SinglePointCalculator
from ase.io import read, write, string2index
from ase.constraints import FixAtoms
from ase.gui.defaults import read_defaults
from ase.quaternions impor... | PHOTOX/fuase | ase/ase/gui/images.py | Python | gpl-2.0 | 16,499 | [
"ASE"
] | 7b6de0a17fbd36620e38be1b01b00b421362d10f6d2de74a947c4c8db57a8e5b |
# ################################################################
#
# Active Particles on Curved Spaces (APCS)
#
# Author: Silke Henkes
#
# ICSMB, Department of Physics
# University of Aberdeen
# Author: Rastko Sknepnek
#
# Division of Physics
# School of Engineering, Physics and Mathem... | sknepneklab/SAMoS | analysis/batch_nematic/batch_analyze_nematic_R30c.py | Python | gpl-3.0 | 2,511 | [
"VTK"
] | ea830e03ac8ad689bfe53a06b3dfd8d7faf7bff53ee60b19441d6fa5d75fa74b |
"""
Instructor Dashboard Views
"""
import datetime
import logging
import uuid
from functools import reduce
from unittest.mock import patch
import pytz
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponseServerError
from django.urls i... | eduNEXT/edunext-platform | lms/djangoapps/instructor/views/instructor_dashboard.py | Python | agpl-3.0 | 33,422 | [
"VisIt"
] | ede08f20c3270d13ba616525c16da85a6bc5b33b9fcaa2da2ea9b79c7c31c4b7 |
#Character level RNN
import numpy as np
file = open('alice.txt' , 'r').read()
chars = list(set(file))
file_size , char_size = len(file) , len(chars)
print "File has %d characters and %d unique characters" %(file_size,char_size)
#Builds the Vector model
char_ix = {ch:i for i,ch in enumerate(chars)}
ix_... | PadamSethia/shakeyshakespeare | main.py | Python | mit | 2,679 | [
"NEURON"
] | 58ec70b0d955f7a7ec7f4047e205df3c80d0a205bc26a39ba97ed3944f685acb |
# Moogul.py: MOOSE Graphics 3D.
# Copyright (C) Upinder S. Bhalla NCBS 2022
# This program is licensed under the GNU Public License version 3.
#
import moose
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import vpython as vp
import time
from packaging import version
#from mpl_toolkits.mplot3d.a... | BhallaLab/moose-core | python/rdesigneur/moogul.py | Python | gpl-3.0 | 25,407 | [
"MOOSE"
] | 7ad2bf32fd36f87066e4cd6937ba4a13b9fcae005f2da14fcfd1bc2325e6ef54 |
import numpy as np
import numpy.random as rng
from Gaussian import Gaussian
class Track:
"""
A trajectory in space
"""
def __init__(self, num=10, ndim=6):
"""
num = number of points in the track
ndim = dimensionality of the space
"""
self.num, self.ndim = num, ndim
self.pos = np.empty((num, ndim))
de... | eggplantbren/MogTrack | code/python/Track.py | Python | mit | 1,365 | [
"Gaussian"
] | e4ad96cc77d09cb00655a410006540c8e7dfac2d8561b1fb439fb60d4f32e97c |
# Load the list of available alignments when the tool is initialized
aligndb = dict()
for line in open( "/depot/data2/galaxy/alignseq.loc" ):
fields = line.split()
if fields[0] == "align":
try: aligndb[fields[1]].append( fields[2] )
except: aligndb[fields[1]] = [ fields[2] ]
def get_available_a... | jmchilton/galaxy-central | tools/extract/extractAxt_wrapper_code.py | Python | mit | 780 | [
"Galaxy"
] | f3f909f3d1c4fcf5783e40ad1552ffbfa454e5ffbbab56d51325648370228e5a |
""" ..mod: FTSRequest
=================
Helper class to perform FTS job submission and monitoring.
"""
# # imports
import sys
import re
import time
# # from DIRAC
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.File import checkGuid
from DIRAC.Core.Utilities.Adler import compareAdler, intAd... | vmendez/DIRAC | DataManagementSystem/Client/FTSRequest.py | Python | gpl-3.0 | 37,935 | [
"DIRAC"
] | a077a45e0f91428a10d39e39374321f902c34493a4dac2c69f8f2762cdd7f3dd |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Development script to test the algorithms of a given model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "2.0"
__maintainer__ = "David... | vorwerkc/pymatgen | dev_scripts/chemenv/test_algos.py | Python | mit | 3,355 | [
"pymatgen"
] | 02023b34d0fa52490426841f56e3c138cfe3a23fb853632945f27367ab3dbd20 |
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 15 10:10:15 2016
@author: Steven_Pellizzeri (spelliz[@]clemson.edu)
"""
import sys
from ase.atoms import string2symbols
from ase.thermochemistry import HarmonicThermo,IdealGasThermo
from ase.io import write, read
from glob import glob
## user input
shape = str(sys.argv[1... | spelliz/Various-Bash-Commands | ase-thermo-gaussian-arg.py | Python | gpl-3.0 | 2,845 | [
"ASE",
"Gaussian"
] | 087b62c571277c0d5781726eaf670d9e58088ebf39a808c366630a2e92d0f79f |
###############################################################################
# AST visualizer - generates a DOT file for Graphviz. #
# #
# To generate an image from the DOT file run $ dot -Tpng -o ast.png ast.dot #
... | LucasMagnum/simple-interpreter | scripts/genastdot.py | Python | mit | 5,360 | [
"VisIt"
] | a0ef06d4c91031aacb9d38f2b0ff7333b64b82ad5223840fc4f055fa67901fb3 |
data = (
'ha', # 0x00
'hu', # 0x01
'hi', # 0x02
'haa', # 0x03
'hee', # 0x04
'he', # 0x05
'ho', # 0x06
None, # 0x07
'la', # 0x08
'lu', # 0x09
'li', # 0x0a
'laa', # 0x0b
'lee', # 0x0c
'le', # 0x0d
'lo', # 0x0e
'lwa', # 0x0f
'hha', # 0x10
'hhu', # 0x11
'hhi', # 0x12... | avian2/unidecode | unidecode/x012.py | Python | gpl-2.0 | 4,293 | [
"BWA"
] | 5e889116f36d1d5dbd43be8a7293c14ab0b8b0b77a7da4f3e2d29910c210e393 |
# -*- coding: utf-8 -*-
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
from Plugins.Extensions.MediaPortal.resources.messageboxext import MessageBoxExt
def openloadApi(self, data):
if re.search('IP address not authorized', data):
message = self.se... | schleichdi2/OpenNfr_E2_Gui-6.0 | lib/python/Plugins/Extensions/MediaPortal/resources/hosters/openload.py | Python | gpl-2.0 | 595 | [
"VisIt"
] | 0f65000189d88f24e45d696e46b54c8fc2bcc84b1ac55b11972d0794e934e1bf |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 5 15:15:09 2014
@author: drew
"""
from __future__ import division
from matplotlib import use
use('agg')
import matplotlib.pyplot as plt
from matplotlib import cm, _cm
from matplotlib import patches
import numpy as np
import sunpy
from sunpy.map import Map, GenericMap
fr... | drewleonard42/CoronaTemps | create_tempmap.py | Python | bsd-2-clause | 8,857 | [
"Gaussian"
] | 3e083eb8ad40c18ce1c595b6f6583ac9ac4533a1fe88138696dabe1b81ae4a85 |
# Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | mkuron/espresso | testsuite/python/lb_stokes_sphere.py | Python | gpl-3.0 | 4,213 | [
"ESPResSo"
] | 5607359f517c26aa2d8db11b2c135f73691d56f27785af03b4e15d321d3c9c2a |
#!/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_iris_anneal.py | Python | apache-2.0 | 4,527 | [
"VisIt"
] | 1fafdce754f02432e6422c80bc691ee60877afbac1b5e35fc33cc81ee9812910 |
# -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | CodeMonkeyJan/hyperspy | hyperspy/signal.py | Python | gpl-3.0 | 180,567 | [
"Gaussian"
] | 9396948d60350cdbb390b5f5cad774a531050f2660d77ee8df02cf91a9220ecb |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apach... | sridevikoushik31/openstack | nova/tests/api/openstack/test_xmlutil.py | Python | apache-2.0 | 25,723 | [
"VisIt"
] | df08200ec0d25ae481a588c5f8c0d704bec7294e68f86c8419e5f1d339e11320 |
#!/usr/bin/python
#
# Copyright 2011 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... | mzdaniel/oh-mainline | vendor/packages/gdata/samples/apps/provisioning_oauth2_example.py | Python | agpl-3.0 | 5,260 | [
"VisIt"
] | f516adb36fd271ee230b7c956c085746e144f9e7680a77726b316a3c494da9cf |
#!/usr/bin/python
# (c) 2013, Cove Schneider
# (c) 2014, Joshua Conner <joshua.conner@gmail.com>
# (c) 2014, Pavel Antonov <antonov@adwz.ru>
#
# 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... | romain-dartigues/ansible-modules-core | cloud/docker/_docker.py | Python | gpl-3.0 | 74,953 | [
"VisIt"
] | f3b89dc1f96a4082ea26684a9e986bfea1586b14374b42c85de6021df6b70477 |
import os
import unittest
from monty.os.path import which
from monty.serialization import loadfn
from pymatgen.command_line.mcsqs_caller import run_mcsqs
from pymatgen.util.testing import PymatgenTest
__author__ = "Handong Ling, Rachel Woods-Robinson"
__maintainer__ = "Handong Ling, Rachel Woods-Robinson"
__email__ ... | mbkumar/pymatgen | pymatgen/command_line/tests/test_mcsqs_caller.py | Python | mit | 3,703 | [
"pymatgen"
] | d71c01d419579acab28c47e711b0fc1acdde2a09221f3fd3ebd86bccb74e9950 |
#!/usr/bin/env ipython3
##
# @file
# Calculate approximative stellar masses from V-band magnitude, V-I color, distance to dwarf galaxy.
# Read in [some].bin.[MV,V-I], output ID,Mstar
# (c) 2013 Pascal Steger, psteger@phys.ethz.ch
import numpy
import sys
if(len(sys.argv)<2):
print "use: stellarmass.py [car,scl... | PascalSteger/gravimage | programs/stellarmass.py | Python | gpl-2.0 | 2,675 | [
"Galaxy"
] | 6877843b4137a6265b1bfa0c0a5dde6e3002c259305266fb052b3bf0f3e250ca |
# -*- coding: utf-8 -*-
# Copyright 2016-2020 Fabian Hofmann (FIAS), Jonas Hoersch (KIT, IAI) and
# Fabian Gotzens (FZJ, IEK-STE)
# 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 ... | FRESNA/powerplantmatching | powerplantmatching/data.py | Python | gpl-3.0 | 53,638 | [
"BLAST"
] | 36b564b75d5450310528bd59007af3c57023fa932ca26791e484f4cc0840c3e7 |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code ... | adalke/rdkit | rdkit/Chem/Suppliers/UnitTestSmilesMolSupplier.py | Python | bsd-3-clause | 3,033 | [
"RDKit"
] | ba1d36b979bd81fe3cd661e4976fffbff4c00ab979d9590b2a0cdd7634c97ee2 |
import numpy as np
__all__ = ["OneHotFeaturizer"]
class Featurizer(object):
"""
Abstract class for calculating a set of features for a molecule.
Child classes implement the _featurize method for calculating features
for a single molecule.
"""
def featurize(self, mols, verbose=True, log_every... | cxhernandez/molencoder | molencoder/featurizers.py | Python | mit | 4,722 | [
"RDKit"
] | 25c223e958bda1580a09f9542f70b28340e02a57e70a3bfab489011772b1439e |
import ast
import unittest
import mnfy
class FunctionToLambdaTests(unittest.TestCase):
def setUp(self):
self.transform = mnfy.FunctionToLambda()
def _test_failure(self, fxn_code):
fxn_ast = ast.parse(fxn_code)
new_ast = self.transform.visit(fxn_ast)
new_fxn = new_ast.body[0]... | brettcannon/mnfy | tests/test_unsafe_transforms.py | Python | apache-2.0 | 2,323 | [
"VisIt"
] | 9863c3f3bd72b5ddfe4c728f24be57086f5bd4d6474a4153c1348e85bcecc3af |
""" Unit tests for vector functions """
import unittest
import os
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import json
import picogeojson
from test_helper import TESTDATA
import karta.vector as vector
import karta.vector._geojson as geojson
from karta.vector.geometry im... | fortyninemaps/karta | tests/geojson_tests.py | Python | mit | 12,954 | [
"COLUMBUS"
] | e050050830ed2d81230125b1def8197f8a04c3f17277f8558c27ab10ea1bd060 |
import numpy as np
from ctypes import c_int, c_double, c_bool, c_float, c_char_p, c_bool, c_void_p
import ctypes
import os
LIB_PATH = os.path.dirname( os.path.realpath(__file__) )
LIB_PATH_CPP = os.path.normpath(LIB_PATH+'../../../'+'/cpp/Build/libs/Molecular')
def recompile(path):
print( "recompile path ... | ProkopHapala/SimpleSimulationEngine | python/pyMolecular/CLCFGO.py | Python | mit | 19,696 | [
"Gaussian"
] | 103ef737b5699ba6677f0929fec2ed32844771a6681695332892e2ccef43b27d |
import tensorflow as tf
import utils.utils as utils
class Cifar10CNN:
def __init__(self, config):
self.config = config
def conv2d(self, data, weight):
return tf.nn.conv2d(data,
weight,
strides=[1, 1, 1, 1],
p... | chiochio/pwnml | dpwn/models/cifar10_cnn.py | Python | mit | 6,216 | [
"Gaussian"
] | e465aaf7470c5dee77f5148e7aa8b2f3fa119d00ceab8ae50411bc51f86345a7 |
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from lettuce.django import django_url
from nose.tools import assert_equal
def create_cert_course():
world.clear_courses()
org = 'edx'
number = '999'
name = 'Certificates'
world.scenario_dict... | olexiim/edx-platform | lms/djangoapps/courseware/features/certificates.py | Python | agpl-3.0 | 9,052 | [
"VisIt"
] | 56823adaf2af72af5c6224c0eaee2e5160115437bf5e38898d989ca8429a132a |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013 CERN.
##
## 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 option) a... | MSusik/invenio | invenio/modules/deposit/form.py | Python | gpl-2.0 | 11,838 | [
"VisIt"
] | c09a6e51e2deb8bbf0164a2a319ea35b615b7e7944631f86ff3332fa7fdd4db6 |
import math
"""
Parameters for instruments and Abins
"""
# Instruments constants #############################
# These parameters can be changed by a user if necessary
fwhm = 3.0 # approximate value for the full width at half maximum for Gaussian experimental resolutions
# TwoDMap instrument
delta_width = 0.1 # w... | wdzhou/mantid | scripts/AbinsModules/AbinsParameters.py | Python | gpl-3.0 | 2,417 | [
"CRYSTAL",
"DIRAC",
"Gaussian"
] | e474c4cc085a7859ffa16f0a435408ca2be70cc8cb14fcb52e3334f9ea747007 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | skosukhin/spack | var/spack/repos/builtin/packages/py-phonopy/package.py | Python | lgpl-2.1 | 1,833 | [
"phonopy"
] | 28fee2f0a1237a6e25f6fe5d93fe6a7d86c78c765455f148003886e122ee5de7 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | tiagocardosos/stoq | stoqlib/gui/test/test_widgets_webview.py | Python | gpl-2.0 | 4,647 | [
"VisIt"
] | 1fb6d4fbd640e2dcbd49545e530f5c4f28fbb82d7876526acb9754f7d3f9c316 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.