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
""" LMS Course Home page object """ from __future__ import absolute_import from collections import OrderedDict from bok_choy.page_object import PageObject from bok_choy.promise import BrokenPromise from six import text_type from .bookmarks import BookmarksPage from .course_page import CoursePage from .courseware im...
ESOedX/edx-platform
common/test/acceptance/pages/lms/course_home.py
Python
agpl-3.0
12,185
[ "VisIt" ]
73418071cdbea487a5b767a392189136b596a6e0389287e3dc269024e68073b3
import headering import glob import pprint import sys import os if len(sys.argv)>1: p = sys.argv[1:] else: print "Usage: pymol -cq ./headerTest.py -- MTZTestDirectory" sys.exit(1) for curPath in p: print "Processing MTZ files in path: '%s'" % curPath l = glob.glob(curPath + os.sep + "*.mtz") d = {} for mtz...
gratefulfrog/lib
python/pymol/pymol_path/test/headerTest.py
Python
gpl-2.0
650
[ "PyMOL" ]
41b4e3160fea68f98999b48386a825dede6d309ee8ed708ab170b3c213482d27
# Copyright (c) 2020 PaddlePaddle 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 app...
luotao1/Paddle
python/paddle/fluid/dygraph/dygraph_to_static/ifelse_transformer.py
Python
apache-2.0
20,452
[ "VisIt" ]
f3b82d5741c755b25d647a6a979e517c7b73db2fc35342523a56b743acf21310
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
google-research/google-research
representation_batch_rl/representation_batch_rl/policies_pixels.py
Python
apache-2.0
18,009
[ "Gaussian" ]
6a3a3a56ee33c6069b56bdba3172227893ad7ba6e5e641aa756793e1b8c932de
from ovito.io import import_file from ovito.vis import ParticleDisplay node = import_file("simulation.dump") node.add_to_scene() particle_display = node.source.particle_properties.position.display particle_display.shape = ParticleDisplay.Shape.Square
srinath-chakravarthy/ovito
doc/python/example_snippets/particle_display.py
Python
gpl-3.0
251
[ "OVITO" ]
528263718231786dc4b3cd1b45b395133e93818998ce774591dd2573338f6350
# Copyright (C) 2011 by Brandon Invergo (b.invergo@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. from __future__ import print_function import os import subprocess try: from os.path...
zjuchenyuan/BioWeb
Lib/Bio/Phylo/PAML/_paml.py
Python
mit
6,463
[ "Biopython" ]
afecf2f53565747a0288e6fc986e6dba536cf4ee7b00bb21120dd8163cfc1f2e
#!/usr/bin/env python # # $File: debug.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribute it a...
BoPeng/simuPOP
docs/debug.py
Python
gpl-2.0
2,006
[ "VisIt" ]
f6d8d06f6d96661486315551bea183413ff67f562558f43d31e624fa6a0d4373
''' PathwayGenie (c) GeneGenie Bioinformatics Ltd. 2018 PathwayGenie is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' # pylint: disable=invalid-name # pylint: disable=too-many-arguments import sys from scripts.writer import w...
neilswainston/PathwayGenie
scripts/plasmid_writer.py
Python
mit
754
[ "VisIt" ]
b89bd5071df6753732fb57ff435a3e57cfc8b81b5741ffa50038c8bfa4624a35
# -*- coding: utf-8 -*- """ Module for using a trained CNN model to predict network connectivity. Includes funtions for computing connection scores, generating a null distribution with surrogate shuffles, and reconstructing the estimated adjacency matrix of a network. Created on Wed Aug 23 14:24:32 2017 @author: pau...
orlandi/netcal
internal/networkInference/Connectomics/cnn/prediction.py
Python
mit
10,834
[ "NEURON" ]
5893873e8a432490086da4de5b84045c04f771beb1e8f1d1f2fd043996efefbb
# xarray removed version -- due to some SEVERE issues in pd.TimeStamp import rasterio, os import numpy as np import pandas as pd import geopandas as gpd from downscale import utils class DatasetFF( object ): ''' THIS SHOULD BE SUBCLASSED FROM `Dataset`, but is not because that class is poorly written and the __ini...
ua-snap/downscale
downscale/dataset_ff.py
Python
mit
7,316
[ "NetCDF" ]
7076e6459d85aa489719c259c59a0f92a69a2141f948a75b52b21ee7b607fa8d
# Copyright 2004-2017 Tom Rothamel <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, m...
kfcpaladin/sze-the-game
renpy/display/image.py
Python
mit
21,827
[ "VisIt" ]
9120faedc2f018e62abb728b3d43c5a6246b82fc57d8b7c909c8ae54b8272e2a
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
CraigHarris/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/aoco_alter/aoco_alter_sql_test/test_aoco_altercol.py
Python
apache-2.0
1,273
[ "ORCA" ]
9c0c6cbcd4114a5b5d58b4c07d765a90300a712941cf3ee0bd900e2d48e96adb
# -*- coding: utf-8 -*- """ Base Hamiltonian Monte Carlo algorithm. """ import theano as th import theano.tensor as tt class HamiltonianSampler(object): """Hamiltonian / Hybrid Monte Carlo sampler (Duane et al. 1987). Markov chain Monte Carlo sampler with transition operator constructed from simulated H...
matt-graham/thermodynamic-monte-carlo
thermomc/hmc.py
Python
mit
18,432
[ "Gaussian" ]
6514566e825c676ae6e309c9fc5645a8bee4823b76eebc312474dc6ebc1cd74a
######################################################################## # # File Name: Visitor.py # # Documentation: http://docs.4suite.com/4DOM/Visitor.py.html # """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserve...
carvalhomb/tsmells
guess/src/Lib/xml/dom/ext/Visitor.py
Python
gpl-2.0
2,485
[ "VisIt" ]
3a60d91201686de6f9b61a497f5cd3a41f8a051e7b3d0b14b26b1a250821949f
""" MIT License Copyright (c) 2017 Joris Gillis, KU Leuven Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
jgillis/simscape2casadi
run.py
Python
mit
24,768
[ "VisIt" ]
d7333995b002f0e043644f2a5b75ebd9c6d467b69a73a89693832669301ebb4a
# ---------------------------------------------------------------------- # LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator # http://lammps.sandia.gov, Sandia National Laboratories # Steve Plimpton, sjplimp@sandia.gov # # Copyright (2003) Sandia Corporation. Under the terms of Contract # DE...
milfeld/lammps
python/lammps.py
Python
gpl-2.0
7,036
[ "LAMMPS" ]
bd6b2f54411cb187b38e79b4d576522a368c4aa62c149b4905de1f40f917a227
""" TokenAgent This agent inspect all elements, and resets their tokens if necessary. The following options can be set for the TokenAgent. .. literalinclude:: ../ConfigTemplate.cfg :start-after: ##BEGIN TokenAgent :end-before: ##END :dedent: 2 :caption: TokenAgent options """ __RCSID__ = '$Id$' from date...
fstagni/DIRAC
ResourceStatusSystem/Agent/TokenAgent.py
Python
gpl-3.0
6,701
[ "DIRAC" ]
355d5e4d86b13f869abe9580a63aaa5b711597956ca3b1ae51ddbc0ff340d2c7
# Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import copy import io import os import pickle import re import shutil import tempfile import threading import time import unittest import warnings from unittest import mock from django.conf import settings from django.core...
denys-duchier/django
tests/cache/tests.py
Python
bsd-3-clause
91,107
[ "Brian" ]
f0336b4c0ec016411f0a60997fd63ed2bf436b18fc322bec09ea328b98f09629
import numpy as np import matplotlib.pyplot as plt from Other_samples.Regularization.reg_utils import sigmoid, relu, plot_decision_boundary, initialize_parameters, \ load_2D_dataset, predict_dec from Other_samples.Regularization.reg_utils import compute_cost, predict, forward_propagation, \ backward_propagation...
adexin/Python-Machine-Learning-Samples
Other_samples/Regularization/regularization.py
Python
mit
11,652
[ "NEURON" ]
29e13724e5edbadeef9dc142c23038ccd47b8ca7a7eaaac591957492009d92ba
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
soarpenguin/ansible
lib/ansible/module_utils/basic.py
Python
gpl-3.0
112,500
[ "VisIt" ]
beb265f5a84d553acf84c9a50e40b2a396a29dd360747296d173c645c842b6fb
# Made with contributions from : # disKret, Skeleton & DrLecter. # this script is part of the Official L2J Datapack Project. # Visit http://forum.l2jdp.com for more details. import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gam...
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/17_LightAndDarkness/__init__.py
Python
gpl-3.0
4,047
[ "VisIt" ]
4c9a198a63ce7a7c353a5bd864ba31e24d73382a34c9244f97abd04ae520fa07
import time import numpy as np import matplotlib.pyplot as plt from test_farfield import make_meshes from tectosaur.ops.sparse_integral_op import RegularizedSparseIntegralOp from tectosaur.ops.dense_integral_op import RegularizedDenseIntegralOp from tectosaur.ops.sparse_farfield_op import TriToTriDirectFarfieldOp from ...
tbenthompson/tectosaur
tests/test_regularized.py
Python
mit
8,089
[ "Gaussian" ]
e11fd7d87881a2946e4ff6a0b647f88ecae590c1154b47907883bcb184c6796d
"""Module containing functions for an MLP network""" # assumes all input features precede output(s) import random import math import mlp_exceptions def initialise_bias(params): """Function to initialise the neuron input biases to 1.0""" outputs_l_j = [] # plus one for input layer for _ in range(len(p...
farthir/msc-project
mlp_functions.py
Python
mit
9,441
[ "NEURON" ]
0af46924460604c20f3bf6389f059835e578aaf82e28ec708f4d0cfcf0d8b3ca
import unittest import scipy import pysal import numpy as np #from pysal.spreg import error_sp_regimes as SP #from pysal.spreg.error_sp import GM_Error, GM_Endog_Error, GM_Combo from functools import partial from pysal.contrib.handler import Model GM_Error = partial(Model, mtype='GM_Error') GM_Endog_Error = partial(M...
schmidtc/pysal
pysal/contrib/handler/tests/test_error_sp_regimes.py
Python
bsd-3-clause
15,309
[ "COLUMBUS" ]
a2189479b2298afe2da53f48372a2fa3ed28d22e946b1851c6c93c370372ec82
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import collections import importlib from pymatgen.util.plotting import pretty_plot """ This module defines generic plotters. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Pr...
nisse3000/pymatgen
pymatgen/vis/plotters.py
Python
mit
5,202
[ "pymatgen" ]
c2a1749a2cd7699e0fef8c7babb1e5faeff8525075dbf27322eeccf3af3620c0
#!/usr/bin/env python3 ######################################################################## # Solves problem 8 from projectEuler.net. # Finds the greatest product of five consecutive digits from the # 1000-digit number. # Copyright (C) 2010 Santiago Alessandri # # This program is free software: you can ...
salessandri/programming-contests
project-euler/problem008.py
Python
gpl-3.0
2,423
[ "VisIt" ]
35aec2f1fc510afe93cf82fd0e5b9c829e1bc947a894e1951510da31b19627ac
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
SKIRT/PTS
modeling/decomposition/decomposition.py
Python
agpl-3.0
36,896
[ "Galaxy" ]
9fdd3127109569bb5ee6f1510e79e1d9fa4af79c8a99cf74103a54f102ce573f
# Copyright (C) 2015 # Jakub Krajniak (jkrajniak at gmail.com) # 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 softw...
capoe/espressopp.soap
src/System.py
Python
gpl-3.0
7,799
[ "ESPResSo" ]
fec6e4597d84fcf8e66785fb94a01066b7ae1a296a117b4b78f586fef27b2380
# coding: utf-8 # # Copyright 2012 NAMD-EMAP-FGV # # This file is part of PyPLN. You can get more information at: http://pypln.org/. # # PyPLN 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 o...
fccoelho/pypln.backend
tests/test_worker_palavras_noun_phrase.py
Python
gpl-3.0
2,073
[ "NAMD" ]
796adf171a941f7adc2d465c547605169a5d2e8f1c9227384de49b241fd46798
#!/usr/local/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Test that all OpenMM systems in simtk.pyopenmm.extras.testsystems.* give the ...
choderalab/YankTools
testsystems/test_energies.py
Python
gpl-2.0
7,093
[ "OpenMM" ]
7a2e42c59b4434dda274d8e8d96ec3aad9f6a77fd69776012182bc7f83424ec4
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkImageSobel2D(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.v...
nagyistoce/devide
modules/vtk_basic/vtkImageSobel2D.py
Python
bsd-3-clause
487
[ "VTK" ]
c27ddd73d8ca8c89ee0c66c5643404059b24f4475d163760fb2bde4bca59235e
from __future__ import unicode_literals import argparse import ast import collections import sys from typing import List from typing import Optional from typing import Sequence from typing import Set BUILTIN_TYPES = { 'complex': '0j', 'dict': '{}', 'float': '0.0', 'int': '0', 'list': '[]', 's...
Harwood/pre-commit-hooks
pre_commit_hooks/check_builtin_literals.py
Python
mit
3,219
[ "VisIt" ]
49ed28f24cb0af00c9f95d3cb797cffcf608094d98b82023cf13ed273f0c9c9d
import multiprocessing import warnings import copy import sys import PyQt5.QtCore as QtCore from PyQt5.QtCore import pyqtSlot, QObject from PyQt5.QtWidgets import (QMainWindow, QTabWidget, QLabel, QDialog, QApplication, QGridLayout, QFileDialog, QWidget) from PyQt5.Qt import Qt from PyQt5....
maxscheurer/pycontact
PyContact/gui/MainWindow.py
Python
gpl-3.0
22,094
[ "VMD" ]
61e65db536c7df92fa11d2b43635dc1e7d7e232662ddc5fd9f510833f846e551
from __future__ import print_function, division import collections from sympy.core.add import Add from sympy.core.basic import Basic, C, Atom from sympy.core.expr import Expr from sympy.core.function import count_ops from sympy.core.power import Pow from sympy.core.symbol import Symbol, Dummy, symbols from sympy.core....
ojengwa/sympy
sympy/matrices/matrices.py
Python
bsd-3-clause
127,348
[ "DIRAC", "Gaussian" ]
894d157b1bf96fafe1167baa4384ca77138acc05dcb9573f98cc5eee5137717f
import os import re import json import logging import itertools import numpy as np import scipy.signal from mako.template import Template # initialize log logger = logging.getLogger(__name__) class WindsurfConfigurator: n = 0 # question counter supported_models = { 'xbeach':'xbeach', ...
openearth/windsurf
windsurf/configurator.py
Python
gpl-2.0
9,272
[ "NetCDF" ]
cedbb771005209819db89757a8fcfabbc7fe0330a57043c0870962d984a3e10f
# Orca # # Copyright 2013 The Orca Team. # # 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 option) any later version. # # This library is ...
ruibarreira/linuxtrail
usr/lib/python3/dist-packages/orca/scripts/apps/gnome-documents/script.py
Python
gpl-3.0
2,488
[ "ORCA" ]
03bfe0d762fecfd359f352342cf377b632767f60640b33089f3f8d2d01a29738
#!/usr/bin/env python # -*- coding: utf-8 -*- # relevant imports import sys import time import espressopp import mpi4py.MPI as MPI import Tetracryst # Preparation of tetrahedral crystal and constuctions of bonds in tetrahedral liquid from espressopp import Real3D, Int3D from espressopp.tools import decomp from espre...
capoe/espressopp.soap
examples/hadress/hadressDensityPressure/hadressDensity.py
Python
gpl-3.0
8,087
[ "CRYSTAL" ]
ac06155432c0c964d6253ef9bab28c7f124109a27944bbffbc013d0d50020809
#!/usr/bin/env/python ##============================================================ """ Some tests for deconvolution They aren't extreme """ import sys sys.path.append("../decon/") sys.path.append("../misc/") import DeconvolveToTargetPSF as DT import numpy,scipy import time def decontest(): ## Original...
drphilmarshall/HumVI
attic/test/decontest.py
Python
mit
5,714
[ "Gaussian" ]
250b0aa61814fafa1418fdf6c796d874849938df77e7a0f1ebb5914a7d2945cd
# Import of the relevant tools import time import numpy as np import theano import theano.tensor as T from theano import pp, config from plotly.tools import FigureFactory as FF import plotly.graph_objs as go from .curves import Curve class CurvesManifold : """ Encapsulates a few useful io + type conversion meth...
jeanfeydy/lddmm-ot
LDDMM_Python/lddmm_python/modules/manifolds/curves_manifold.py
Python
mit
4,841
[ "DIRAC" ]
fdb2b83bb0b42ee0c33483b390be8001f517f1e6e7a18e379a71b66991339332
# Copyright 2008-2009 Brian Boyer, Ryan Mark, Angela Nitzke, Joshua Pollock, # Stuart Tiffen, Kayla Webley and the Medill School of Journalism, Northwestern # University. # # This file is part of django-facebookconnect. # # django-facebookconnect is free software: you can redistribute it and/or modify # it under the te...
ryszard/django-facebookconnect
facebookconnect/management/commands/installfacebooktemplates.py
Python
gpl-3.0
2,621
[ "Brian" ]
4902a2a9e00d2ecf18492d4d36bafc72c91eff956ef0d87b588dc59d500591de
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2013 Async Open Source ## ## This program 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 ## of the License, or...
tiagocardosos/stoq
stoqlib/lib/environment.py
Python
gpl-2.0
1,083
[ "VisIt" ]
d77528ea11ecca0039daa3b108ab0ad200fd2d4d47fc89f4b50c45ce8f16270e
#!python # ChristmasTime.py # An Interactive Fiction game by Christopher "avarisclari" Weigle # IFID = B25D3DDC-238D-4D68-8AE7-956ACFF9110E import textwrap import sys import string import os sys.stdout.write("\x1b]2;Christmas Time\x07") scenes = { "title": { "description": "\n" " ...
avarisclari/HeartoGold
Examples/ChristmasTime.py
Python
mit
68,967
[ "VisIt" ]
198b00add42716fbf4500cfd5a9720687be81643bacce7540381551937795234
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
BackupTheBerlios/espressopp
src/interaction/DihedralHarmonicCos.py
Python
gpl-3.0
3,028
[ "ESPResSo" ]
fdfca8985a6b1da8c22b1afa99ac12c4c6478da6f368da952da622a556730d50
#!/usr/bin/env python """ utils for vasp only. """ import numpy as np import os.path from ase.io import read from ase.io.vasp import read_vasp from pyDFTutils.ase_utils.symbol import symbol_number, symnum_to_sym from ase.atoms import Atoms import re def read_sort(sort_file='ase-sort.dat'): """ get the second ...
mailhexu/pyDFTutils
pyDFTutils/vasp/vasp_utils.py
Python
lgpl-3.0
4,626
[ "ASE", "VASP" ]
5e61e6ca3b9ab5ca8015de25d683b772b2745156fecefe35eeb1f4ad7970b333
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/r-variantannotation/package.py
Python
lgpl-2.1
2,615
[ "Bioconductor" ]
4a3c2194cd2b532478e23e027242824f07cd8219e4178597411c80e98506a5fa
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from zeroinstall import _ from zeroinstall.support import tasks from zeroinstall.injector import handler, download gobject = tasks.get_loop().gobject glib = tasks.get_loop().glib version = '2.3.3' class GUIHandler(...
rammstein/0install
zeroinstall/0launch-gui/gui.py
Python
lgpl-2.1
3,029
[ "VisIt" ]
abe63a6d39dfa4f33d34ebd3185ea2d965dab05d0b193aa3a52d98de5d925f82
#!/usr/bin/env python # -*- coding: utf-8 -*- import math import vtk import vtk.test.Testing # ------------------------------------------------------------ # Purpose: Test more parametric functions. # ------------------------------------------------------------ class TestMoreParametricFunctions(vtk.test...
hlzz/dotfiles
graphics/VTK-7.0.0/Common/ComputationalGeometry/Testing/Python/TestMoreParametricFunctions.py
Python
bsd-3-clause
11,232
[ "VTK" ]
a0fa7ef580edf9d2578c3ab38e6106f82cb3e9aca634b0fb13f6e637328aa07b
#!/usr/bin/env python import sys import random import bisect import pysam import gzip try: import cPickle as pickle except: import pickle import numpy from time import time import argparse import math import os inds = {'A': 0, 'T': 1, 'G': 2, 'C': 3, 'N': 4, 'a': 0, 't': 1, 'g': 2, 'c': 3, 'n': 4} M...
hchyang/phyloVars
wes/wessim/__sub_wessim2.py
Python
gpl-3.0
34,602
[ "pysam" ]
47a870ffb7726272c979e02fee0dc931d9dd092df3aec434b2a558ef595f6992
''' Examine the line shapes that result from a mixture of thermal line width Gaussian components. I'm getting the moments of the normal mixture model from: http://onlyvix.blogspot.ca/2011/05/mixture-of-normal-formulas-for-skew-and.html which uses the derivation from: GENERATING DAILY CHANGES IN MARKET VARIABLES USING...
e-koch/VLA_Lband
14B-088/HI/analysis/mixture_of_normals.py
Python
mit
10,965
[ "Gaussian" ]
426a67fd07a7de757dad4c93181285006196b61ed22aac46b7e08344e4a8264f
import numpy as n import glob import h5py import os import time import sys h5_files = n.array(glob.glob(os.path.join(os.environ['MD10'], "h5", "hlist_?.?????_emerge.hdf5"))) h5_files.sort() bins = n.arange(6,13,0.1) xb = (bins[1:] + bins[:-1]) / 2. hh = 0.6777 def measureSMF(h5_file, volume=1000.**3./hh**3., update=...
JohanComparat/pyEmerge
bin/measure_SMF.py
Python
unlicense
1,980
[ "Galaxy" ]
b8e52afa0f6f0a9ec312c93772b2364142837cad9257aef39838840cd786004b
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import logging from pymatgen.io.qchem.inputs import QCInput from pymatgen.io.qchem.utils import lower_and_check_unique # Classes for reading/manipulating/writing QChem output files. __author__ = "Samuel Blau,...
dongsenfo/pymatgen
pymatgen/io/qchem/sets.py
Python
mit
7,699
[ "pymatgen" ]
250140063c8c076ff96ff80bf564b172c30d39a25f9ac8ef4cb06f4ed69698ed
import os from box import Atoms from box import md import numpy as np import ase from box.interpolation import VectorSplineFunction #from box.calculators import Calculator from scipy.linalg import norm import pylab as pl vec=np.array class LEPS_Calculator: """ ase Calculator class """ def __init__(self):...
pekkosk/hotbit
box/barriers.py
Python
gpl-2.0
13,845
[ "ASE", "VTK" ]
2be16a541d2dc381ef6b96469077b2e3e6ea102cb82278d855838930bcb90719
#!/usr/bin/python from __future__ import division from builtins import range import numpy as np import os.path as op import subprocess as sp import sys import tempfile as tf from optparse import OptionParser import forgi.threedee.utilities.average_atom_positions as ftua import forgi.threedee.utilities.pdb as ftup im...
ViennaRNA/forgi
examples/plot_average_atom_positions.py
Python
gpl-3.0
3,537
[ "PyMOL" ]
50088290b8109fc429aa0be0f5e0748eeed2261ba81628a09422706dcd25a4ec
# Copyright 2014 Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
openstack/osprofiler
osprofiler/tests/unit/cmd/test_shell.py
Python
apache-2.0
6,136
[ "Galaxy" ]
c9d79d89c27861edef62e153a94f5ecbc8b2527ea814f16dd8dc223e42d90508
# -*- coding: utf-8 -*- # Copyright © 2012-2013 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software without restriction, including without limitation # the rights t...
zhukite/nikola-install
nikola/main.py
Python
mit
5,111
[ "VisIt" ]
4287ad1cafc808c974e8aafc9a80c427472795858cc8b826f64dbd0f64c1d346
# Copyright (c) 2009-2021 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """HPMC updaters.""" from . import _hpmc from . import integrate from hoomd import _hoomd from hoomd.logging import log from hoomd.data.parameterdicts import Ty...
joaander/hoomd-blue
hoomd/hpmc/update.py
Python
bsd-3-clause
27,980
[ "HOOMD-blue" ]
f81bb3396e847c1c8f353def9df4430886f88412f900c6f59b3b2b9e004b3e43
#!/usr/bin/env python import os import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # This example demonstrates the reading of a field and conversion to PolyData # The output should be the same as polyEx.tcl. # Create a reader and write out the field reade...
biddisco/VTK
Filters/Core/Testing/Python/fieldToPolyData.py
Python
bsd-3-clause
2,400
[ "VTK" ]
1fc615ae6d71efc4644d1d9be479576d8ffadd589b4bf1ff955480b25d680c30
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Works for Abinit: """ from __future__ import unicode_literals, division, print_function import os import shutil import time import abc import collections import numpy as np import six import copy from six....
sonium0/pymatgen
pymatgen/io/abinitio/works.py
Python
mit
44,493
[ "ABINIT", "Gaussian", "NetCDF", "pymatgen" ]
6d9d26553d5ca6e0c925d67dcd8cc426e7d77d6c04c567dbfd83d4c76e31c2e2
# coding: utf-8 """ Task history related objects """ import collections import traceback import logging from monty.json import MontyDecoder, jsanitize, MSONable from pymatgen.util.serialization import pmg_serialize logger = logging.getLogger(__name__) class TaskHistory(collections.deque, MSONable): """ His...
gmatteo/abiflows
abiflows/fireworks/utils/task_history.py
Python
gpl-2.0
4,925
[ "ABINIT", "pymatgen" ]
859a99f82a5d6b5398284e88f6286576dfaaa0ed3ebccdf85de1d573bfeee340
# -*- coding:utf-8 -*- from rdkit import Chem from rdkit.DataStructs import cDataStructs from rdkit.Chem import MACCSkeys from rdkit.Chem import AllChem from rdkit.Chem.Fingerprints import FingerprintMols import os class SimOperation: # compute similarities, create sim_table, write sims p = {'maccs': 0.25, 'ecf...
HaoboGu/Structure-Similarity
Preprocess.py
Python
mit
3,473
[ "RDKit" ]
ef75a19b65bdaff4ae11854ff0eeb5dafb1d55e7a318ff3bf32993e5718b930f
""" Standard cells for nest :copyright: Copyright 2006-2016 by the PyNN team, see AUTHORS. :license: CeCILL, see LICENSE for details. """ from pyNN.standardmodels import cells, build_translations from .. import simulator class IF_curr_alpha(cells.IF_curr_alpha): __doc__ = cells.IF_curr_alpha.__doc__ tran...
anupkdas-nus/global_synapses
pyNN-dispackgaes/nest/standardmodels/cells.py
Python
gpl-3.0
12,609
[ "NEURON" ]
b7930a014252af89fb8a67310252120c52cf13cc8c460010e321d86bf5830aab
#!/usr/bin/env python3 import espressopp from espressopp.tools import replicate, readxyz from espressopp import Real3D import time, sys import numpy as np def bench_lj(xyz_file): # read from xyz file print("reading from: ", xyz_file) pid, type, xpos, ypos, zpos, xvel, yvel, zvel, Lx, Ly, Lz = readxyz(xy...
espressopp/espressopp
testsuite/potential_array/potential_array_test.py
Python
gpl-3.0
6,093
[ "ESPResSo" ]
2f12c0020f9a21329e724fbfcebb8a65fe31fece525498b1ca20457092b4ac8b
#!/usr/bin/env python import os import re try: from setuptools import setup # , Extension # from setuptools.command.build_ext import build_ext as _build_ext except ImportError: from distutils.core import setup # , Extension # from distutils.command.build_ext import build_ext as _build_ext from Cyt...
karenyyng/george
setup.py
Python
mit
6,172
[ "Gaussian" ]
765d82cfd96d126c9030f3644e8c9400addda369d56676da77c559fb7865ee73
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import unittest import os import json import numpy as np from pymatgen.analysis.structure_matcher import StructureMatcher, \ ElementComparator, FrameworkC...
xhqu1981/pymatgen
pymatgen/analysis/tests/test_structure_matcher.py
Python
mit
30,773
[ "pymatgen" ]
053624b929c04ed0886b3d3e22fdc069a7ac2f7b5b5b1d8484621ebfcb9271ec
#!/usr/bin/env python """ Setuptools script for pseudogenerator """ from setuptools import setup, find_packages from os.path import join, dirname from pseudogen import __version__ setup( name='pseudogen', description='Siesta Pseudopotential Generator', version=__version__, packages=find_packages(), ...
ansobolev/PseudoGenerator
setup.py
Python
mit
397
[ "SIESTA" ]
42f3494ffcfc0ff2fad47c6f6dbbd8cc734b643b3d5a6f7d38a0fc0a30923d2e
# 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...
adit-chandra/tensorflow
tensorflow/python/ops/linalg/linear_operator_test_util.py
Python
apache-2.0
36,518
[ "Gaussian" ]
2486444f7006f2a6319542a328e5be53f87afe7f6e60eb7712abc39d3fafecf4
""" Tests for miscellaneous utilities. """ import cPickle import unittest from rdkit import Chem from rdkit_utils import PicklableMol class TestPicklableMol(unittest.TestCase): def setUp(self): """ Set up for tests. """ self.mol = Chem.MolFromSmiles('CC(C)(C)NC[C@@H](C1=CC(=C(C=C...
skearnes/rdkit-utils
rdkit_utils/tests/test_init.py
Python
bsd-3-clause
933
[ "RDKit" ]
178a78e3fcc75c47940c15f8e4c1225587e4221d08dabc9f91b9b4c92fe8bf2e
# This module is an interface of the diceseq output, # with which you could easily access to the results, # also visualize the data. import sys import gzip import numpy as np import matplotlib.pyplot as plt class SampleFile: """docstring for SampleFile""" def __init__(self, sample_file): fid = gzip.op...
huangyh09/diceseq
diceseq/utils/out_utils.py
Python
apache-2.0
7,323
[ "Gaussian" ]
a476a24944770c3a701ca6203b2ceb993e7bd36923412dd3af862cfe6a48c6f5
'''The script reads a BAM file and report SNPs according to a position on a read. Note for a coordinate in SAM/BAM format: In SAM file, it is 1-based. In BAM file, it is 0-based. (http://genome.sph.umich.edu/wiki/SAM) ''' import sys import pysam def find_snp(md): '''Note for Cigar tag: I ...
likit/BioUtils
read_error_profile.py
Python
bsd-2-clause
4,185
[ "pysam" ]
142c52c488eb179afda9427c3e8a9c25ee00edabea6c95f989925f8d70d4e6cd
# -*- coding: utf-8 -*- """ Created on Mon May 15 10:18:49 2017 @author: S.Y. Agustsson module containing general purpouse function, usually shornamed wih gfs """ # %% imports import tkinter as tk from tkinter import filedialog from datetime import datetime import pickle import os import re import scipy.constants as...
steinnymir/RegAscope2017
lib/utils.py
Python
mit
8,915
[ "Gaussian" ]
f17488b06bec9eb9b07b90dc5991e448dc3ba1e111a0d215b6657305586f8521
#!/usr/bin/env python # # Copyright (C) 2014 Brian Caswell <bmc@lungetech.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights...
f0rki/cb-multios
tools/generate-polls/generator/graph.py
Python
mit
13,991
[ "Brian" ]
4f34850ef039fddecc6ac06d9870102aee63e99a82493267e2b39fe4f5889002
""" Copyright (c) 2011-2015 Nathan Boley This file is part of GRIT. GRIT 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. GRIT is distribut...
nboley/grit
setup.py
Python
gpl-3.0
2,074
[ "pysam" ]
5f29e3b1b6785f61c6580d4808f6d60f8177eb2a69a42c177abbf1ae73cb5c3b
#!/usr/bin/env python """ CEDA_download.py - Download CMIP5 output from the [Centre for environmental Data Archival][CEDA]. You'll need your own login (username/password) in order to use this. Once that's been obtained, these tools should help make it very easy to download batches of data, even when you don't know ex...
darothen/cmip5_download
CEDA_download.py
Python
mit
10,517
[ "NetCDF" ]
b1a97153bc440e6dfd4eb024957278d296c9624027540b709032937abb151783
# # Copyright Applied Language Solutions 2012 # # This file is part of Pypeline. # # Pypeline 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 3 of the License, or # (at your option) any l...
ianj-als/pypeline
src/pypeline/core/types/state.py
Python
gpl-3.0
2,742
[ "Brian" ]
b28ad46d9ac0cc729cb58b9a23da580fcabd725946eec161d9dea44daf848e73
# coding: utf-8 from __future__ import division, unicode_literals ''' Created on Sep 23, 2011 ''' __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __date__ = "Sep 23, 2011" import os import rand...
Dioptas/pymatgen
pymatgen/transformations/tests/test_standard_transformations.py
Python
mit
16,838
[ "pymatgen" ]
eed2e3fd9b3acc8084d0bbd4b0d6f824b88f38dbbf589dcb2a7c86e64cb77639
#!/usr/bin/env python3 #* 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/lgp...
nuclear-wizard/moose
python/peacock/tests/postprocessor_tab/test_VectorPostprocessorViewer.py
Python
lgpl-2.1
5,619
[ "MOOSE" ]
5fb7f204c2e80ae369778968cdce915ecc6d2cc961263277c2ad12d826c1eea7
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
gkc1000/pyscf
pyscf/nao/m_color.py
Python
apache-2.0
1,190
[ "PySCF" ]
9343ce851e32ebc09542c0189169aa7d57fbe8eba66029a4abca071614850b13
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010-2017 GEM Foundation # # The OQ-CATK (Lite) is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero General Public # License as published by the Free Software Foundation, either version # 3 of the License, or (at ...
klunk386/CatalogueTool-Lite
OQCatk/Exploration.py
Python
agpl-3.0
12,357
[ "Gaussian" ]
f446fe0c7f66a10331c353bad0b0794acaa9766f4aa1267bafdf797814a6533f
""" Test class for plugins """ # imports import unittest import importlib from mock import MagicMock from DIRAC import gLogger #sut from DIRAC.TransformationSystem.Agent.TransformationPlugin import TransformationPlugin paramsBase = {'AgentType': 'Automatic', 'DerivedProduction': '0', '...
vmendez/DIRAC
TransformationSystem/Agent/test/Test_Plugins.py
Python
gpl-3.0
3,344
[ "DIRAC" ]
796923f823d710ac63ad947d4a6f3f9b33b04c6522c96b34b4671c8ff5abf7df
#!/usr/bin/env python # Core from __future__ import print_function from decimal import * from functools import wraps import logging import math import pprint import random import re import time import ConfigParser # Third-Party import argh from clint.textui import progress import funcy import html2text from PIL im...
metaperl/revadbu
src/main.py
Python
mit
14,096
[ "VisIt" ]
bf1dc87f7ff93f311f7afdc4537ba951caddc5e0695486c29d4305e067138eba
from account.models import Team from milkyway.models import Solves, Challenge, Category import datetime import json from django.contrib import messages from django.shortcuts import redirect from django.shortcuts import render from django.views.generic.base import TemplateView from django.views.generic.detail import De...
galaxy-ctf/milky-way
milkyway/views.py
Python
agpl-3.0
5,615
[ "Galaxy" ]
6f492ee6d0fae164e51cc76ceb45ffe8299bb69e12c5e2071f9a369314e83d56
# # Gramps - a GTK+/GNOME based genealogy program # # Adapted from Graphviz.py (now deprecated) # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2005-2006 Eero Tamminen # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com> # Cont...
ennoborg/gramps
gramps/plugins/graph/gvrelgraph.py
Python
gpl-2.0
40,729
[ "Brian" ]
c64f0c2f8ffa56a838183efaaf4ca3ace7b6115eab63dd8a080ba3bdfb352ec9
# Copyright (C) 2000 Greg Landrum # # 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 of the License, or (at your option) any later version. # # This library is distribu...
jandom/rdkit
rdkit/sping/SVG/pidSVG.py
Python
bsd-3-clause
23,927
[ "RDKit" ]
25ed362f16233ffdbc1989fee9051108837f2629a486d4943c3b916c2474602d
# Regular Scripted module import from __main__ import vtk, qt, ctk, slicer # Other scripted modules import import SkinModelMaker # # Workflow # class Workflow: def __init__(self, parent): import string parent.title = "Bender FEM Workflow" parent.categories = ["", "Segmentation.Bender"] parent.contr...
ricortiz/BenderCraniosynostosis
Modules/Scripted/Workflow/Workflow.py
Python
apache-2.0
115,724
[ "VTK" ]
217007a982d04dc9af74cefac3635c9d181b2daefc440a6f3b669195148a9ae3
import requests import pytest import json import demistomock as demisto bundle_index = 0 submitted_indicators = 0 mocked_get_token_response = """{"access_token": "fababfafbh"}""" iocs_bundle = [ { "id": "bundle--f00374ec-429c-40cb-b7bb-61f920814775", "objects": [ { "cre...
demisto/content
Packs/Cybersixgill-DVE/Integrations/CybersixgillDVEFeed/CybersixgillDVEFeed_test.py
Python
mit
41,917
[ "Amber" ]
2836d8f67429291f6bc15eb7fd051d05b87b8e43571e8267e7e2dea6cdf3fcfc
### ### This script demonstrates the use of the new generic cinema io api to create ### a small dataset based on the Wavelet source. Several contours are created, ### and then images are saved from a set of camera angles. ### ### To use this script, follow the command example below, after changing the ### variable "o...
Kitware/cinema
scripts/data_generation/generateWaveletNewApi.py
Python
bsd-3-clause
4,656
[ "ParaView" ]
921b3591c6a753b0de2b31ad28db5ab68d86a83dbec9156470dc7ef3bcc3b80e
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
metacloud/molecule
molecule/model/schema_v2.py
Python
mit
30,692
[ "Galaxy" ]
98300e66bbc727163e80a4c49a98b516bde0b8775cb1e3250b236db1c586818a
############################################### ## PLANETOPLOT ## ## --> PPCLASS ## ## A generic and versatile Python module ## ## ... to read netCDF files and plot ## ############################################### ## Author: Aymeric Spiga. 02-03/...
aymeric-spiga/planetoplot
modules/ppclass.py
Python
gpl-2.0
111,044
[ "NetCDF" ]
a4bba8fc937b3a34941e22fae3e536f619880f2c814d48b0d883a0f44b64854b
# # Copyright (C) 2013,2014,2015,2016 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)...
KonradBreitsprecher/espresso
samples/load_properties.py
Python
gpl-3.0
4,526
[ "ESPResSo" ]
391528d4148cd9b996938c5dfc1d54878037576a7c06beb957a8a7d88b281ab4
""" Brian T. Bailey ITM 513 - MP4 Client program file """ import sys from socket import * from mp4domain.crypto import * import mp4domain.ioutils # Configure client for server address server_hostname = 'localhost' server_port = 48001 # Process Message File and send to server if len(sys.argv) > 1: messageobj = ...
briantbailey/ITM-513
mp4/src/client.py
Python
mit
875
[ "Brian" ]
d1761c08bc481f000d9cbb83e19004b6bf4add145249e539e71bab99f665568e
#!/usr/bin/env python3 #-*- coding: utf-8 -*- # Copyright 2017, National University of Ireland and The James Hutton Insitute # Author: Nicholas Waters # # This code is part of the riboSeed package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. i...
nickp60/riboSeed
riboSeed/make_riboSeed_config.py
Python
mit
15,909
[ "BWA" ]
715c3fcd7719a0564f8104fd22f7a2e8cdbfb73d143362153608393634c9c69c
"""Arithmetic simplification module using sympy. This module simplifies symbolic expressions using only arithmetic operators. """ # pylint: disable=unused-import,exec-used import ast import sympy from copy import deepcopy from sspam.tools import asttools def run(expr_ast, nbits): 'Apply sympy arithmetic simplif...
quarkslab/sspam
sspam/arithm_simpl.py
Python
bsd-3-clause
2,082
[ "VisIt" ]
79975232ad89747bd7033f156974f54b41582e3af2bf5c69fce378c49172b22b
# coding: utf-8 """ Demonstrate how to use MPI with kombine. Run this module with mpiexec -n <nprocesses> python mpi-demo.py where <nprocesses> is the number of processes to spawn. """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library...
stevertaylor/kombine
examples/mpi-demo.py
Python
mit
1,597
[ "Gaussian" ]
7b3b39d449e7e4a7c2f51d7b72bea596299933a58b15a51e9f8c2d4ce6b0fc25
########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2010-2012 Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License v...
epuzanov/ZenPacks.community.SQLDataSource
ZenPacks/community/SQLDataSource/services/SqlPerformanceConfig.py
Python
gpl-2.0
9,744
[ "VisIt" ]
9baaa9ff5cdb236c64a0e096d9b197f75a5a165dc58654adf3e6872afdffbcd5
### Part One ### with open('01.in') as input: line = input.read().rstrip().split(', ') # Convert our Ls and Rs to machine readable tuples rel_dirs = [((-1,1)[(x[0] == 'R')],int(x[1:])) for x in line] # Sum through all the directions D = 0 sums = [0,0,0,0] for dir in rel_dirs: D = (D + dir[0]) % 4 sums[D] += dir[1] #...
ghlmtz/advent16
01/01.py
Python
gpl-3.0
877
[ "VisIt" ]
166066a9918f80c3411014118ea641054a98b8ba62a31f0500f799333b066ea1
""" Extract and cluster EOD waverforms of pulse-type electric fish. ## Main function - `extract_pulsefish()`: checks for pulse-type fish based on the EOD amplitude and shape. """ import os import numpy as np from scipy import stats from scipy.interpolate import interp1d from sklearn.preprocessing import StandardSca...
tillraab/thunderfish
thunderfish/pulses.py
Python
gpl-3.0
80,646
[ "Gaussian" ]
218d6dfad9cf4dd7acea373f65b0d3ab91209ba9015f14fc95464e6aaf2562c9
import functools import itertools from collections import defaultdict from datetime import timedelta from distutils.version import LooseVersion from typing import Any, Dict, Hashable, Mapping, TypeVar, Union import numpy as np import pandas as pd import xarray as xr # only for Dataset and DataArray from . import ar...
jhamman/xarray
xarray/core/variable.py
Python
apache-2.0
82,893
[ "NetCDF" ]
107257bd050b0aba6103d394d361d42815660b06baee7b9e955860af00f6b9d6
import pytest from stix2 import exceptions from stix2.v20 import ( TLP_AMBER, TLP_GREEN, TLP_RED, TLP_WHITE, MarkingDefinition, TLPMarking, ) def test_bad_id_marking_tlp_white(): with pytest.raises(exceptions.TLPMarkingDefinitionError): MarkingDefinition( id='marking-definition--4c9faac1...
oasis-open/cti-python-stix2
stix2/test/v20/test_marking_definition.py
Python
bsd-3-clause
4,217
[ "Amber" ]
47938233661f8cac4d14d389d0b90d4f74bb2692732c6c0328905723208ac0b5
"""Testing for Gaussian process classification """ # Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # License: BSD 3 clause import numpy as np from scipy.optimize import approx_fprime import pytest from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.gaussian_process.kernels impor...
vortex-ape/scikit-learn
sklearn/gaussian_process/tests/test_gpc.py
Python
bsd-3-clause
5,989
[ "Gaussian" ]
a2019b07a9130608a410ed7b86ea48e5127368636115b8fdccd0cc1d068f9f8a
# -*- coding: utf-8 -*- ######################################################################### ## This program is part of 'MOOSE', the ## Messaging Object Oriented Simulation Environment. ## Copyright (C) 2014 Upinder S. Bhalla. and NCBS ## It is made available under the terms of the ## GNU Lesser General ...
upibhalla/moose-core
tests/python/testXreacs5a.py
Python
gpl-3.0
4,219
[ "MOOSE" ]
d0d8d0b5aa2b417d080d675a120bb3f16362863476d8dd8544f56c8713d4e8aa