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 |
|---|---|---|---|---|---|---|---|
### Code written for STDP tutorial @ CAMP 2016
### Adapted from Song et al 2000 (Competitive Hebbian Learning through spike-timing-dependent synaptic plasticity)
### With independent Poisson inputs (relevant figures : Fig 2)
### Author: Harsha Gurnani
### Date: June 15, 2016
#######################################
f... | h-mayorquin/camp_india_2016 | tutorials/LTP-I/Demo1/Full_demo1_abbott.py | Python | mit | 4,275 | [
"Gaussian",
"NEURON"
] | d615a01232e38e82ef40a96120c33092fef42e0f3b2fab55615c813c7166940f |
#!/usr/bin/env python
import os, pickle, time
try:
os.remove('my_gp_module.pyc')
except OSError:
pass
import scipy as sp
from scipy.linalg import eigh
from my_gp_module import GaussianProcess
import matplotlib.pyplot as plt
import matplotlib.cm as cm
def randint_norepeat(low, exclude=None, high=None, size=Non... | marcocaccin/MarcoGP | predict_alpha2.py | Python | apache-2.0 | 6,522 | [
"Gaussian"
] | 9790abd32fbaeb5afaacbdd3e2a27a40736190615bac3aaaf46b2970c6b2e3ef |
#!/usr/bin/python
import math
import os,sys
ncs_lib_path = ('../../../../python/')
sys.path.append(ncs_lib_path)
import ncs
def run(argv):
voltage_channel = {
"type": "voltage_gated_ion",
"m_initial": 0.0,
"reversal_potential": -80,
"v_half": -44,
"deactivation_slope": 40,
"activation_slope... | BrainComputationLab/ncs | python/samples/models/test/ncs_neuron_test.py | Python | bsd-2-clause | 1,999 | [
"NEURON"
] | 0cb1de69f2f7fad4b6f6a0de9bcb7b5ae9636c106caa5575c2080a755cfdabf7 |
# Usage: DipoleCalc.py file.mol2 #
# #README: Basically, each atom has its XYZ coordinates multiplied by their #
# electrostatic charges (in dic2, on the grep_line function). That creates on #
# vectorial component on each axis, which are summed. #
... | NutsII/PyMol-DipoleManager | DipoleManager-v0.13.py | Python | mit | 5,765 | [
"PyMOL"
] | 4ab0f0869a65ac6a4cfce82472df728b21908d7a38610b29d523cf770459f81f |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
from __future__ import print_function
from abc import abstractproperty
import MDAnalysis
import importlib
import numpy as np
from .atoms_maps import atoms_maps
from difflib import get_close_ma... | Marcello-Sega/pytim | pytim/properties.py | Python | gpl-3.0 | 8,159 | [
"LAMMPS",
"MDAnalysis"
] | d2e2368495d7b24b27f098dcb081e900a24b220ba920451d23a2919f99013002 |
"""
:mod: DataManager
.. module: DataManager
:synopsis: DataManager links the functionalities of StorageElement and FileCatalog.
This module consists of DataManager and related classes.
"""
# # RSCID
__RCSID__ = "$Id$"
# # imports
from datetime import datetime, timedelta
import fnmatch
import os
import time
from ... | fibbo/DIRAC | DataManagementSystem/Client/DataManager.py | Python | gpl-3.0 | 70,724 | [
"DIRAC"
] | 167387332b2e7037ed782436e64874777b7d80fba8cfc3503ece1a25ee4978c6 |
"""interp_time_series.py is a basic interpolation and extraction script which interpolates wind speed and direction to locations and heights.
Only nearest neighbour interpolation is used, i.e. the value from the centre of the grid cell containing the location
Usage:
interp_time_series.py <file>... --loc=<file> --... | envhyf/wrftools | wrftools/interp_time_series.py | Python | gpl-3.0 | 11,732 | [
"NetCDF"
] | c7ed8de30b84fbe261d406b968ed57111fcad77813b6d1e53746e8a25a87d2fd |
# CREATED:2015-09-16 14:46:47 by Brian McFee <brian.mcfee@nyu.edu>
# -*- encoding: utf-8 -*-
'''Evaluation criteria for hierarchical structure analysis.
Hierarchical structure analysis seeks to annotate a track with a nested
decomposition of the temporal elements of the piece, effectively providing
a kind of "parse tr... | bmcfee/mir_eval | mir_eval/hierarchy.py | Python | mit | 25,014 | [
"Brian"
] | 5c1e3bca617e33593ee248864454549bcef805203ef742aded380386774512d8 |
from __future__ import print_function
# husk:
# Exit*2? remove pylab.show()
# close button
# DFT
# ADOS
# grey-out stuff after one second: vmd, rasmol, ...
# Show with ....
# rasmol: set same rotation as ag
# Graphs: save, Python, 3D
# start from python (interactive mode?)
# ascii-art option (colored)|
# option -o (ou... | suttond/MODOI | ase/gui/gui.py | Python | lgpl-3.0 | 48,962 | [
"ASE",
"Avogadro",
"CASTEP",
"CRYSTAL",
"FHI-aims",
"GPAW",
"NetCDF",
"RasMol",
"TURBOMOLE",
"VASP",
"VMD",
"WIEN2k",
"exciting"
] | 105d5dc91302b095db7292c53580519da5794bdcc039f08dd250f57584f9bdad |
from ase.calculators.test import make_test_dft_calculation
from ase.dft.stm import STM
atoms = make_test_dft_calculation()
stm = STM(atoms, [0, 1, 2])
c = stm.get_averaged_current(-1.0, 4.5)
x, y, h = stm.scan(-1.0, c)
stm.write('stm.pckl')
x, y, h2 = STM('stm.pckl').scan(-1, c)
assert abs(h - h2).max() == 0
stm = ST... | suttond/MODOI | ase/test/stm.py | Python | lgpl-3.0 | 500 | [
"ASE"
] | e68108f0576f3243818e032a04f4c50b08b636bc5cb8e56703d57434932f49e4 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import pymatgen.io.jarvis as jio
from pymatgen.io.vasp.inputs import Poscar
from pymatgen.util.testing import PymatgenTest
class JarvisAtomsAdaptorTest(unittest.TestCase):
@unittest.skipIf(not... | vorwerkc/pymatgen | pymatgen/io/tests/test_jarvis.py | Python | mit | 1,261 | [
"VASP",
"pymatgen"
] | e0f320632f1d6062c1209915677cdc6068c23e2fa5ebdd5a15e71e0c36e97251 |
from itertools import product
import numpy as np
import nose.tools as nt
from ..convenience import lasso, step, threshold
def test_marginalize():
np.random.seed(10) # we are going to freeze the active set for this test
n, p = 20, 5
X = np.random.standard_normal((n, p))
X /= np.sqrt((X**2).sum(0))[No... | selective-inference/selective-inference | selectinf/randomized/tests/sandbox/test_decompose_subgrad.py | Python | bsd-3-clause | 3,259 | [
"Gaussian"
] | 98300f27974c6d5712805945a3defd9b0be902178bb60bf021c33d471f772332 |
'''
Created on Oct 30, 2014
@author: rene
'''
import re
import string
from helper import DataObject, DataField, ListField
class IDDParser():
def _is_new_field(self, line):
return re.search(r"^\s*[AN]\d+\s*[,;]", line) is not None
def _is_list(self, line):
return re.search(r"^\s*L\d+\s*[,;]... | rbuffat/pyepw | generator/iddparser.py | Python | apache-2.0 | 5,051 | [
"EPW"
] | b76d4a97315550f15ff7f713cfc4ccc8703241673739684886adc23e24e0ddba |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a simple algorithm for extracting nearest neighbor
exchange parameters by mapping low energy magnetic orderings to a Heisenberg
model.
"""
import logging
import sys
from ast import l... | gVallverdu/pymatgen | pymatgen/analysis/magnetism/heisenberg.py | Python | mit | 37,618 | [
"pymatgen"
] | f25bfb2c0b5645336d4ea478f4be37660d0945750e6f692970e840a970ded505 |
"""
ReportCLI class implementing command line interface to DIRAC Accounting
ReportGenerator Service. It is not complete yet
Once ready it could be used with a script as simple as:
from DIRAC.Core.Base.Script import Script
Script.localCfg.addDefaultEntry("LogLevel", "info")
Script.parseCommandLine()
from DIRAC.Acco... | DIRACGrid/DIRAC | src/DIRAC/AccountingSystem/Client/ReportCLI.py | Python | gpl-3.0 | 1,913 | [
"DIRAC"
] | 5df2b0477eeeabd4b3d1677e2f624ab7286f792e0a6530ff9dc48bdcce37d56e |
# sql/elements.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Core SQL expression elements, including :class:`.ClauseElement`,
:class:`.ColumnE... | MarkWh1te/xueqiu_predict | python3_env/lib/python3.4/site-packages/sqlalchemy/sql/elements.py | Python | mit | 148,818 | [
"VisIt"
] | 28a993ef9fabc1b694b0dff93b6c6131b8db253186a43589e3899d3aa19091e7 |
from command import Command
import control
class Dots(Command):
OFF = '0'
RED = '1'
GREEN = '2'
AMBER = '3'
colors = {' ': OFF, 'r': RED, 'g': GREEN, 'a': AMBER, 'o': AMBER}
def __init__(self, dots, label='A', locked=True, width=None, height=None):
Command.__init__(self)
se... | ctmyers/sign | protocol/dots.py | Python | mit | 1,374 | [
"Amber"
] | e12a546c35af3f0ebd6bc9b5e10055bb0c336c34f88906649207e6411d31af84 |
# Licensed under GPL version 3 - see LICENSE.rst
import numpy as np
import pytest
from scipy.stats import normaltest
from astropy.table import Table, QTable
from astropy.coordinates import SkyCoord
import astropy.units as u
from ...source import (SymbolFSource, Source, poisson_process,
PointSour... | Chandra-MARX/marxs | marxs/source/tests/test_source.py | Python | gpl-3.0 | 9,880 | [
"Gaussian"
] | 906fa88199a8c0f95fa3a4787f4ee24cc2c6618cc005c8e2b6956dfeb29ba659 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | anderspitman/scikit-bio | skbio/io/format/tests/test_genbank.py | Python | bsd-3-clause | 19,935 | [
"scikit-bio"
] | 193226a8d7eba4ffe6cf0a0a2f326a3129727b9c11d7769d7ad7784ec63ca151 |
import numpy as np
from math import pi, sqrt
from ase import Atoms, io, optimize
from ase.calculators.lj import LennardJones
from ase.optimize.basin import BasinHopping
from ase.io import Trajectory, read
from ase.units import kB
# Global minima from
# Wales and Doye, J. Phys. Chem. A, vol 101 (1997) 5111-5116
E_globa... | suttond/MODOI | ase/test/basin.py | Python | lgpl-3.0 | 1,794 | [
"ASE"
] | 7b905a90311bc483f40acafd6f9ad7b1af314aec43f365e75e49499d07171a45 |
"""
A collection of Naive Bayes type classifier models.
.. autoclass:: revscoring.scoring.models.GaussianNB
:members:
:member-order:
.. autoclass:: revscoring.scoring.models.MultinomialNB
:members:
:member-order:
.. autoclass:: revscoring.scoring.models.BernoulliNB
:members:
:member-order:
""... | wiki-ai/revscoring | revscoring/scoring/models/naive_bayes.py | Python | mit | 909 | [
"Gaussian"
] | a2541ac6713b59f5428c83c5f8c352117eaffbd6aa2f4658de38d7bd32a6cca4 |
import argparse
import gzip
import sys
import array
import pysam
class SNP:
"""SNP objects hold data for a single SNP"""
def __init__(self, snp_line):
"""
Initialize SNP object.
Parameters:
-----------
snp_line : str
Line from SNP file.
A... | cdeboever3/WASP | mapping/find_intersecting_snps.py | Python | apache-2.0 | 31,164 | [
"pysam"
] | 29c6a5c6a41f8fcf187502a86ad197f1bfb75b760904a81ea8fca32cc8948c94 |
#!/usr/bin/env python
from __future__ import print_function
import os
import string
import sys
from pulsar.main import (
ArgumentParser,
DEFAULT_APP_YAML,
DEFAULT_INI
)
try:
import pip
except ImportError:
pip = None # type: ignore
try:
import virtualenv
except ImportError:
virtualenv = ... | natefoo/pulsar | pulsar/scripts/config.py | Python | apache-2.0 | 13,153 | [
"Galaxy"
] | 887e6b8207092a0d770322aa4e2597d9d0a294790f90d4b39926d7dd97207f8e |
import simtk.openmm.app as app
import simtk.openmm as mm
import simtk.unit as u
from parmed import gromacs
# user parameters
integrator_timestep_ps = 0.005 # picoseconds
save_traj_ps = 10 # picoseconds
save_full_traj_ps = 100 # picoseconds
save_restart_file_ns = 100 # nanoseconds
# physical values:
temperature = 3... | markovmodel/adaptivemd | examples/files/ntl9/openmmsetup.py | Python | lgpl-2.1 | 1,102 | [
"Gromacs",
"OpenMM"
] | 858015cc989f027886a718879500b4eb7c0ffb937e0405aca1285ad035aaa7a7 |
#!/usr/bin/env python
# Copyright (c) 2014, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" A... | PaloAltoNetworks-BD/SplunkforPaloAltoNetworks | SplunkforPaloAltoNetworks/bin/lib/pandevice/examples/upgrade.py | Python | isc | 3,615 | [
"Brian"
] | 479b590f274a17d25de7cea9f5063f8e157e9c539db83bd23f7672ec3f6b05a4 |
# coding=utf-8
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | google/grumpy | compiler/stmt_test.py | Python | apache-2.0 | 16,868 | [
"VisIt"
] | ff3b46467f241915f671d931f7c95a47848eccc52d948f71d29d731340eba077 |
import sys
import cPickle as pickle
import numpy as np
def augmentVisit(visit, code, treeList):
for tree in treeList:
if code in tree:
visit.extend(tree[code][1:])
break
return
def countCooccurrenceProduct(visit, coMap):
codeSet = set(visit)
for code1 in codeSet:
for code2 in codeSet:
if code1 == cod... | mp2893/gram | create_glove_comap.py | Python | bsd-3-clause | 1,120 | [
"VisIt"
] | 814f0c6e3fc780ea4f1d124cb9fdfb07e394ef88b12cad0f27cf349135837d5c |
import sys
try:
from setuptools import setup
except ImportError as e:
print 'setuptools package is not installed'
print 'On linux install with the following command:'
print 'wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python '
print 'For more info please visit: https://pypi.python.org/pypi/setuptools'... | kantale/pyVEP | setup.py | Python | mit | 1,061 | [
"VisIt"
] | c830694419f99f87c22cfd67fffa37dcc7e5c406bbc9ceb753e442efe751aa48 |
# Orca
#
# Copyright (C) 2015 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# 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 yo... | pvagner/orca | src/orca/scripts/apps/evolution/braille_generator.py | Python | lgpl-2.1 | 2,352 | [
"ORCA"
] | f05385e654d218eab3b340f414eebbb0afe3aff73a71a772eae4c4d04c44b3b2 |
LOEC_URL = 'https://github.com/KAMI911/loec'
def main():
import sys
import getopt
import argparse
parser = argparse.ArgumentParser(description='Update an EuroOffice Extension Creator project. Works by comparing file modification dates and overwrites files in the project that are older than the corresponding templa... | KAMI911/loec | update.py | Python | gpl-3.0 | 2,666 | [
"VisIt"
] | e12aa2339e6f648ea00abc6b5a23f7ea7895d087fa7851d3653db5fddfdc4971 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/e2openplugin-OpenWebif | plugin/controllers/views/ajax/boxinfo.py | Python | gpl-2.0 | 20,479 | [
"VisIt"
] | 4d07dd313cdf9e3fa3bc6cc74082d14f38328e3102450abb15ff0b46fb578257 |
"""
file kept for reference only. Do NOT use this file. use dropbox.py instead
as all methods are now in there
"""
# Include the Dropbox SDK libraries
from dropbox import client, rest, session
# Get your app key and secret from the Dropbox developer website
APP_KEY = 'y7cxubkm19o3f9b'
APP_SECRET = '8rguqnx7oqwjqtm'
... | levibostian/VSAS | leviTesting/dropbox_sdk/testScripts/request_dropbox_token.py | Python | mit | 1,367 | [
"VisIt"
] | 115331f2211cac7ff576fe801b43194173c15bdde91a2b96917566c79d338e90 |
########################################################################
# This program is copyright (c) Upinder S. Bhalla, NCBS, 2015.
# It is licenced under the GPL 2.1 or higher.
# There is no warranty of any kind. You are welcome to make copies under
# the provisions of the GPL.
# This programme illustrates buildi... | dilawar/moose-full | moose-examples/paper-2015/Fig5_CellMultiscale/Fig5BCD.py | Python | gpl-2.0 | 11,428 | [
"MOOSE",
"NEURON"
] | 345924cc8bd3386b0a10a4a9f9d29b3694306dba390a8a5a1d7549e46e20bc4f |
from sqlalchemy.sql import table, column, ClauseElement, operators
from sqlalchemy.sql.expression import _clone, _from_objects
from sqlalchemy import func, select, Integer, Table, \
Column, MetaData, extract, String, bindparam, tuple_, and_, union, text,\
case, ForeignKey, literal_column
from sqlalchemy.testing... | malkoto1/just_cook | SQLAlchemy-1.0.4/test/sql/test_generative.py | Python | gpl-2.0 | 67,780 | [
"ADF",
"VisIt"
] | 0e4b38e142ff038258bc1296c9300d5cd857c12dd9c0c1663163d3bffe66b2ce |
"""
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | mayblue9/scikit-learn | sklearn/tree/tree.py | Python | bsd-3-clause | 37,579 | [
"Brian"
] | 7d690f5a20b617a7c02bca1d390899239b3236d03938873a8ad0aa7696060b9f |
#!/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... | harterj/moose | modules/combined/examples/geochem-porous_flow/forge/natural_reservoir.py | Python | lgpl-2.1 | 3,075 | [
"MOOSE"
] | 3d7258e7555124be559c45695315810a314e04487ba47349cf2643d9ae609d40 |
# Copyright Yair Benita Y.Benita@pharm.uu.nl
# Biopython (http://biopython.org) license applies
"""Simple protein analysis.
Example::
X = ProteinAnalysis("MAEGEITTFTALTEKFNLPPGNYKKPKLLYCSNGGHFLRILPDGTVDGTRDRSDQHIQLQLSAESVGEVYIKSTETGQYLAMDTSGLLYGSQTPSEECLFLERLEENHYNTYTSKKHAEKNWFVGLKKNGSCKRGPRTHYGQKAILFLPLPV")
... | updownlife/multipleK | dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/SeqUtils/ProtParam.py | Python | gpl-2.0 | 10,964 | [
"Biopython"
] | fbf2315b8bd85f89ebe87dcc074562bf646d293c63884c0c9efed9eba8e2f3e5 |
#!/usr/bin/env python
import unittest
import numpy
from pyscf import lib, gto, scf, dft
from pyscf.gw import ugw_ac
mol = gto.Mole()
mol.verbose = 7
mol.output = '/dev/null'
mol.atom = 'O'
mol.basis = 'aug-cc-pvdz'
mol.spin = 2
mol.build()
mf = dft.UKS(mol)
mf.xc = 'pbe0'
mf.kernel()
def tearDownModule():
globa... | sunqm/pyscf | pyscf/gw/test/test_ugw.py | Python | apache-2.0 | 1,084 | [
"PySCF"
] | a2d3f5488cc930e06a185632294b6a77a32fb097da8199c0d411e90191779f6b |
# Copyright 2017 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... | drpngx/tensorflow | tensorflow/contrib/autograph/pyct/transformer_test.py | Python | apache-2.0 | 6,367 | [
"VisIt"
] | 788ce57901de7b922c10f0f8514c3c82ea8a684f587346f638dc7f7cabf07b04 |
"""Runs Grad-CAM (gradient-weighted class-activation maps)."""
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import copy
import argparse
import numpy
import keras.models
from keras import backend as K
from gewittergefahr.gg_io import storm_tracking_io as tracking_io
from gewittergefahr.gg_utils import file_syste... | thunderhoser/GewitterGefahr | gewittergefahr/scripts/run_gradcam.py | Python | mit | 15,741 | [
"NEURON"
] | aee36b90cc207699bbdc810b9f509e4c8b028d22f638d9fb6acc9d46ac4b50f3 |
## \file
## \ingroup tutorial_roofit
## \notebook -nodraw
## Likelihood and minimization: fitting with constraints
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Verkerke (C++ version)
from __future__ import print_function
import ROOT
# Create model and dataset
# ----------------------... | root-mirror/root | tutorials/roofit/rf604_constraints.py | Python | lgpl-2.1 | 2,705 | [
"Gaussian"
] | eecbbfac08a77a48026b03e94a6e38df2d7c4350dcc99484bd6355a9d229b006 |
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#
# This file is part of phono3py.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# noti... | atztogo/phono3py | phono3py/phonon3/conductivity.py | Python | bsd-3-clause | 21,914 | [
"phonopy"
] | 88a07219cbdcd148a1ea1e8f70164e24e4439da0e87faf56af34810b4cd9ac14 |
# -*- coding: utf-8
from __future__ import print_function
import pprint
iso_two_to_three = {
"AF": "AFG",
"AX": "ALA",
"AL": "ALB",
"DZ": "DZA",
"AS": "ASM",
"AD": "AND",
"AO": "AGO",
"AI": "AIA",
"AQ": "ATA",
"AG": "ATG",
"AR": "ARG",
"AM": "ARM",
"AW": "ABW",
"... | iDigBio/idb-backend | idb/data_tables/locality_data.py | Python | gpl-3.0 | 93,190 | [
"BWA"
] | 9f85d25cf57ce8bed98efd797b4da970afe4f3922da5072584d2941a4c8cdb06 |
#!/usr/bin/env python
"""Module for making tests on small molecules in GPAW.
One molecule test to rule them all
One molecule test to run them
One molecule test to save them all
And on the webpage plot them (implementation pending)
"""
from gpaw import GPAW, ConvergenceError
from ase.structure import molecule
from as... | ajylee/gpaw-rtxs | gpaw/testing/molecule_test.py | Python | gpl-3.0 | 2,509 | [
"ASE",
"GPAW"
] | 4986436f0212a46c87a73da1f8e6a4beb169a027aa380efb5e7f79b5c66441dc |
#!/usr/bin/env python
"""
tide.py
Methods for working tidal forcing files in ROMS
Written by Brian Powell on 04/05/16
Copyright (c)2017 University of Hawaii under the MIT-License.
"""
import numpy as np
import netCDF4
import seapy
import datetime
from warnings import warn
def create_forcing(filename, tide... | ocefpaf/seapy | seapy/roms/tide.py | Python | mit | 5,936 | [
"Brian",
"NetCDF"
] | 5e0e9e21bd593018271df12ba46fda6b027490a0c5461179b9ccd2acab7b873f |
# -*- coding: utf-8 -*-
import os, re, sqlite3, sys; sys.path.insert(0, os.path.join("..", ".."))
import string
from datetime import datetime
from pattern.web import Spider, DEPTH, BREADTH, FIFO, LIFO, URL,plaintext,DOM
from django.utils.encoding import smart_str, smart_unicode
from whooshHelper import *
def encode(s)... | Carlosmr/WhooshSearcher | modules/spiders.py | Python | mit | 6,999 | [
"VisIt"
] | e63a907173ff5d4ed0b3a52acd9e7bf1edd6e18add2a8aa5fef364e89536e4b7 |
"""Support for control of ElkM1 sensors."""
from elkm1_lib.const import (
SettingFormat,
ZoneLogicalStatus,
ZonePhysicalStatus,
ZoneType,
)
from elkm1_lib.util import pretty_const, username
import voluptuous as vol
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import... | w1ll1am23/home-assistant | homeassistant/components/elkm1/sensor.py | Python | apache-2.0 | 9,302 | [
"Elk"
] | ea5f38078b090f9da6ae4740b1f5c6d96eb3f5a2276fe2d005fa52196662fef5 |
# -*- coding: utf-8 -*-
# Copyright 2010-2014 Will Barton.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# no... | willbarton/observation-charts | src/observation/catalogs/objects.py | Python | bsd-3-clause | 17,122 | [
"Galaxy"
] | 513784231edc722ce7d801229c88fcddb81400ffaebc2455a525e4d478687acc |
#!/usr/bin/python
work_dir = ''
import numpy as np
from scipy.io import FortranFile as ufmt
if __name__ == '__main__':
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
# See GALAXY 14.50 Manual, Sec. 9.2, P54
header_dtype = [('n1', '<i4'), ('n2', '<i4'), ('n3', '<i4'),
('nco... | shiaki/iterative-modelling | src/pcs_snap.py | Python | bsd-3-clause | 3,204 | [
"Galaxy"
] | ac0f003396f871e895f974c18824d2fe1b2cfdda376060abfe744665f7736b9d |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Kyle A. Beauchamp
# Contributors: Robert McGibbon, Matthew Har... | hainm/mdtraj | mdtraj/tests/test_topology.py | Python | lgpl-2.1 | 7,339 | [
"MDTraj",
"OpenMM"
] | 80293481198b6145b697195e061ac7c10fee20ab40b7ea46db45c992e166f0bc |
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
from . import run_context
from . import submit
| google/lecam-gan | third_party/dnnlib/submission/__init__.py | Python | apache-2.0 | 274 | [
"VisIt"
] | e53c22c853c105651d0bc238126c8ed0136f9b2107221857b533c7ffef9db5fc |
# -*- coding: utf-8 -*-
# Part of the psychopy.iohub library.
# Copyright (C) 2012-2016 iSolver Software Solutions
# Distributed under the terms of the GNU General Public License (GPL).
"""iohub wintab util objects / functions for stylus, position traces,
and validation process psychopy graphics.
"""
from __future__ im... | isolver/OpenHandWrite | distribution/getwrite/experiments/Builder_AV_Example/wintabgraphics.py | Python | gpl-3.0 | 25,146 | [
"Gaussian"
] | 3bab5073b90330394763dd1cf1751a0ee0e8db83f8dae39f6e269eec4d765850 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# models.py
#
# Copyright 2014 Gary Dalton <gary@ggis.biz>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Lice... | gary-dalton/Twenty47 | twenty47/models.py | Python | mit | 6,040 | [
"Dalton"
] | c8aceb28b7de054610f0731219ec90a014c2797e45c7903271716c61b69d748d |
# 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... | wangyum/mxnet | example/reinforcement-learning/a3c/a3c.py | Python | apache-2.0 | 9,642 | [
"Gaussian"
] | 15b341d9c0a7f779133548819465724bb222d11104a63c59d937991c6058e6ac |
# Orca
#
# Copyright 2016 Igalia, S.L.
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# 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 opt... | GNOME/orca | src/orca/scripts/terminal/speech_generator.py | Python | lgpl-2.1 | 1,335 | [
"ORCA"
] | 5d746b615561ca4e4ba9eefb236c9f7c2d8a138695195539cc3031ea8c01248e |
# Time-stamp: <2019-09-25 10:15:20 taoliu>
"""Module Description
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file LICENSE included with
the distribution).
"""
# ------------------------------------
# python modules
# -------------------------------... | taoliu/MACS | MACS2/OptValidator.py | Python | bsd-3-clause | 28,454 | [
"Bowtie"
] | 56da4bd230c4b8a6a58f5f8bbd44e85fcbbaa754ef28d42c9ea59d6c233b144a |
"""Support integration with Illumina sequencer machines.
"""
import glob
import json
import os
import operator
import subprocess
from xml.etree.ElementTree import ElementTree
import logbook
import requests
import yaml
from bcbio import utils
from bcbio.log import setup_local_logging
from bcbio.illumina import demulti... | Cyberbio-Lab/bcbio-nextgen | bcbio/illumina/machine.py | Python | mit | 7,179 | [
"Galaxy"
] | 15ad1afdc958734fdc1b4ad81a54715840de756bd749c4dbe9991b6099a8b72e |
#Twitter Profiler app. This is a simple script to configure the Twitter API
import tweepy
import time #https://github.com/tweepy/tweepy
# Twitter API credentials. Get yours from apps.twitter.com. Twitter acct rquired
# If you need help, visit https://dev.twitter.com/oauth/overview
consumer_key = ""
consumer_secret = ... | cdconrad/shiftkey-py | week1/src/twitter-profiler.py | Python | mit | 1,022 | [
"VisIt"
] | c59b24208f5487499a298b1b531374abf5bd24853e61a930d9ce3f52b4e319b3 |
import numpy as np
import shtns
import sphTrans as sph
import matplotlib.pyplot as plt
import time
import AdamsBashforth
nlons = 256 # number of longitudes
ntrunc = int(nlons/3) # spectral truncation (for alias-free computations)
nlats = int(nlons/2) # for gaussian grid.
dt = 150 # time step in seconds
itmax = 6*... | JoyMonteiro/parSpectral | pspec/shallowWater.py | Python | bsd-3-clause | 3,160 | [
"Gaussian"
] | 014f5f8e4eb0a930db70d1007073004797d8b0af6d74e14dc0c78b61467fe32a |
from __future__ import division
from astropy.io import fits
from astropy import units as u
from astroML.plotting import hist as histML
from matplotlib import pyplot as plt
from matplotlib import cm
import numpy as np
import bgb
fits_path = "../fits"
paper_path = "../paper"
def get_data():
# Plot the peak frequ... | willettk/blazar_clustering | python/blazars_meyer.py | Python | mit | 6,869 | [
"Galaxy"
] | 7f00711f248e9b811bf3a37f7d4d388a8e3817130aa40c408b3e1a4dbbc7b448 |
import re
import time
from copy import deepcopy
import itertools
import MDAnalysis
from MDAnalysis.analysis import distances
import numpy as np
from .Biochemistry import *
from .LogPool import *
from ..cy_modules.cy_gridsearch import cy_find_contacts
def weight_function(value):
"""weight function to score conta... | maxscheurer/pycontact | PyContact/core/multi_trajectory.py | Python | gpl-3.0 | 22,417 | [
"MDAnalysis"
] | 8644d00ab537a635baa1cc7eb026164cc8dc7333f28b9b41f87b36403040e1af |
#-*- coding:utf-8 -*-
#
#
# Layout Module
#
# unittesting in tests/test_layout_u.py
#
"""
.. currentmodule:: pylayers.gis.layout
.. autosummary::
"""
from __future__ import print_function
try:
from tvtk.api import tvtk
from mayavi import mlab
except:
print('Layout:Mayavi is not installed')
import pdb... | pylayers/pylayers | pylayers/gis/layout.py | Python | mit | 367,668 | [
"Mayavi"
] | 436b86fad2dd4dd7f89da729b63263a5d2a468f840dc80744b26437777b2f688 |
from __future__ import print_function
import json
import os
import os.path
import re
import sys
import warnings
from collections import defaultdict
from distutils.command.build_scripts import build_scripts as BuildScripts
from distutils.command.sdist import sdist as SDist
try:
from setuptools import setup, find... | 2ndQuadrant/ansible | setup.py | Python | gpl-3.0 | 13,081 | [
"Galaxy"
] | 4500dc85b70e57d018ebd30512ae59dfeba5321b70d87a30d4db27319619ad1b |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | donspaulding/adspygoogle | examples/adspygoogle/dfp/v201208/misc/use_oauth2.py | Python | apache-2.0 | 3,643 | [
"VisIt"
] | a9f4034bb54e91949c8c846c1877437e19e4a9e8551b3e01be486160089edb9c |
"""
Kernel Density Estimation
-------------------------
"""
# Author: Jake Vanderplas <jakevdp@cs.washington.edu>
import numpy as np
from scipy.special import gammainc
from ..base import BaseEstimator
from ..utils import check_random_state
from ..utils.validation import _check_sample_weight, check_is_fitted
from ..uti... | glemaitre/scikit-learn | sklearn/neighbors/_kde.py | Python | bsd-3-clause | 10,839 | [
"Gaussian"
] | 5163d51e1e9391b5db021d89977d2e2d716bcc3cef373f4808695bf3d81175b0 |
# -*- coding: utf-8 -*-
#
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pu... | thica/ORCA-Remote | src/scripts/discover/discover_elvmax/script.py | Python | gpl-3.0 | 11,740 | [
"ORCA"
] | bd379a9a46b5d006161b24a580dd5762df46cc17a5878d44c4679e50043ac7b4 |
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | tempson-py/tempson | tempson/RestrictedPython/MutatingWalker.py | Python | mit | 2,436 | [
"VisIt"
] | f5b2b703368b191c426d9c38324201e0223d93a5d2aa08ed6a0ea45ab05bbbf9 |
# Copyright 2017-2020 The GPflow Contributors. 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 appli... | GPflow/GPflow | gpflow/expectations/misc.py | Python | apache-2.0 | 6,697 | [
"Gaussian"
] | 7b6b2b40e22b54fbb28be8d6a198796c6679d4d61cadf2a0a6595072be4f10c7 |
''' Tratihubis converts Trac tickets to Github issues by using the
following steps:
1. The user manually exports the Trac tickets to convert to a CSV file.
2. Tratihubis reads the CSV file and uses the data to create Github issues and milestones.
Installation
============
To install tratihubis, use ``pip`` or ``eas... | ahelsing/tratihubis | tratihubis.py | Python | bsd-3-clause | 67,669 | [
"VisIt"
] | def5ac6e0ee0c8e3204a424c28ad356940790f4c7f13f807c4f67b30fea44842 |
import itertools
from typing import Container, ItemsView, List, Optional, Tuple
from data import iter_util
from data.graph import _op_mixin, bloom_node
from data.graph.ops import anagram_op, anagram_transform_op
def merge(host: 'bloom_node.BloomNode') -> None:
op = host.op
_, merge_fn, _ = _operator_functions[op... | PhilHarnish/forge | src/data/graph/bloom_node_reducer.py | Python | mit | 8,155 | [
"VisIt"
] | 665c3e3c39ba3f50c6f9bca40e67b74beefdd397dd7be3c36af7d7a62cc8da25 |
# Copyright 2012 Tom Hayward <tom@tomh.us>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distrib... | cl4u2/chirp | chirpui/fips.py | Python | gpl-3.0 | 250,263 | [
"COLUMBUS",
"Elk"
] | fdca78da308d097848b0e628aba8a394bf839a2b473ec4073e471b39428dd742 |
import numpy as np
import cudamat as cm
import time
import optparse
import matplotlib.pyplot as plt
import os
def save_plot(fname, x, train, cv, xlines=None, min_line=False, dpi=80):
#plt.figure(figsize=(max(16, min(int(8*len(train)/dpi), 160)), 12), dpi=dpi)
plt.figure(figsize=(18, 12), dpi=dpi)
plt.plot... | mephistopheies/nn | rbm_cudamat/train_rbm.py | Python | gpl-2.0 | 17,818 | [
"Gaussian"
] | 28f3f48d7ae5b012a696f324c27b15ad1849e6a7bc7dd385faa08db510bbbb2f |
#
# Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any late... | p-l-/miasm | miasm2/expression/expression_helper.py | Python | gpl-2.0 | 17,609 | [
"VisIt"
] | 6b5c69e06307825b7c6c5af69f4728e2dc306117a77d3b2d413d04b1ee0dc6a3 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Run this test like so:
# vtkpython TestStackedPlot.py -D $VTK_DATA_ROOT \
# -B $VTK_DATA_ROOT/Baseline/Charts/
import os
import vtk
import vtk.test.Testing
import math
month_labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct"... | cjh1/VTK | Charts/Core/Testing/Python/TestStackedPlot.py | Python | bsd-3-clause | 3,643 | [
"VTK"
] | 5eca9fc347269924c294407b827a7e40a8351a82345af52edef1146fda4e0efb |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* 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
... | nuclear-wizard/moose | python/chigger/tests/annotations/logo_annotation.py | Python | lgpl-2.1 | 1,241 | [
"MOOSE"
] | 6481ed5a121a23e8e443272a2d2ce66479183d8c2ae8fc4292782812589ba990 |
from threading import Thread
def auto_builder_thread():
import time
from enum import IntEnum
from ui.xnova.xn_data import XNPlanet, XNPlanetBuildingItem
from ui.xnova.xn_world import XNovaWorld_instance, XNovaWorld
from ui.xnova.xn_techtree import XNTechTree_instance
from ui.xnova import xn_lo... | minlexx/xnovacmd | scripts/auto_builder.py | Python | gpl-2.0 | 11,689 | [
"CRYSTAL"
] | 31e2e337e35384a489fc7bfb43dea65d535edd80c3ac1472782c077ff869e89a |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/editors/coloreditor.py | Python | gpl-2.0 | 3,083 | [
"VisIt"
] | a4b07eb898d56a4d695b15a641f5f4791eb9ca802e171d1f50781ef6c75cdac6 |
# [the original paper](https://arxiv.org/abs/1404.3606)
import itertools
from chainer.cuda import to_gpu, to_cpu
from chainer.functions import convolution_2d
import numpy as np
from sklearn.decomposition import IncrementalPCA
from utils import gpu_enabled
if gpu_enabled():
try:
import cupy as xp
e... | IshitaTakeshi/PCANet | pcanet.py | Python | mit | 13,966 | [
"VisIt"
] | 2aff4c0af19ee86fd645f1d602f3b29eb1d690d1f40064b325db01a94881f401 |
import numpy as np
import ray
from ray import tune
from ray.tune.suggest.bayesopt import BayesOptSearch
from ray.tune.suggest import ConcurrencyLimiter
import unittest
def loss(config, reporter):
x = config.get("x")
reporter(loss=x**2) # A simple function to optimize
class ConvergenceTest(unittest.TestCas... | richardliaw/ray | python/ray/tune/tests/test_convergence_gaussian_process.py | Python | apache-2.0 | 1,336 | [
"Gaussian"
] | 1ea0caf4b8d810fdad3336572c5df0359892577e9608e20a651532c485d25e7a |
import warnings
import operator
import sys
import functools as ft
from functools import reduce
import numpy as np
import xarray as xr
import pandas as pd
import dask.array as dsar
from dask import delayed
import scipy.signal as sps
import scipy.linalg as spl
from .detrend import detrend as _detrend
__all__ = [
... | rabernat/xrft | xrft/xrft.py | Python | mit | 44,136 | [
"Gaussian"
] | d69c2d5e722c9ed5cc888875702e3f6a3fbe43a5507840be497e1902bf07860b |
#!/usr/bin/env python
from __future__ import division
import imp
import os
import threading
import time
import numpy as np
import cv2
from cv_bridge import CvBridge, CvBridgeError
import rospy
import dynamic_reconfigure.server
from sensor_msgs.msg import Image
from std_msgs.msg import Float32, Header, String
from m... | tom-f-oconnell/multi_tracker | nodes/tracker_simplebuffer.py | Python | mit | 12,727 | [
"Firefly"
] | f0b09d445ee38861b69ad530faa8029e3f69f54ac388157aa8fd8b4ccdcd7274 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Tcoffee(MakefilePackage):
"""T-Coffee is a multiple sequence alignment program."""
ho... | LLNL/spack | var/spack/repos/builtin/packages/tcoffee/package.py | Python | lgpl-2.1 | 1,103 | [
"BLAST"
] | 33e03c9037adb3856f251e4d399286dfb1a59f16d2959d7384c1c550925f00e6 |
# -*- coding: utf-8 -*-
# Copyright 2007-2021 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... | ericpre/hyperspy | hyperspy/_signals/lazy.py | Python | gpl-3.0 | 56,329 | [
"Gaussian"
] | 279dd2586d1a1c0a3741d72eef66d3cf596c54a7e7724c2c2ad8fb5784ccc2c6 |
"""Computes partition function for RBM-like models using Annealed Importance Sampling."""
import numpy as np
from deepnet import dbm
from deepnet import util
from deepnet import trainer as tr
from choose_matrix_library import *
import sys
import numpy as np
import pdb
import time
import itertools
import matplotlib.pypl... | smoitra87/gerbil | deepnet/impute.py | Python | bsd-3-clause | 24,315 | [
"Gaussian"
] | 3ac901c5d7f9625a12866172fde5f94c772c0f5aa2ebd0b1b0360ba6003af8ad |
"""
Example to generate a .fit, .mod and .dat file to feed in MrMoose for
demonstration. The model consists of one single power-laws and two black
bodies, with 15 data points. All is a mixture of unresolved and
blended/spatially identified components, with the black bodies being at
different redshifts (z=2 and z=4)... | gdrouart/MrMoose | examples/example_6zz.py | Python | gpl-3.0 | 7,371 | [
"Gaussian"
] | 8748ab0877d9af77439af6a71b131af1ec437f3b99771d2eff3e5f1a7c7d509c |
"""Handle extraction of final files from processing pipelines into storage.
"""
import datetime
import os
import six
import toolz as tz
from bcbio import log, utils
from bcbio.upload import shared, filesystem, galaxy, s3, irods
from bcbio.pipeline import run_info
from bcbio.variation import vcfutils
import bcbio.pipe... | lbeltrame/bcbio-nextgen | bcbio/upload/__init__.py | Python | mit | 41,834 | [
"Galaxy"
] | dab92ce1d481c4bb79abc63bd52eed6ad3241efd3854f14598329cda85afe3bd |
#!/usr/bin/env python
'''Run a simple, single-neuron-from-each-population simulation.'''
from __future__ import absolute_import, print_function, division
from grid_cell_model.submitting.base.parsers import GenericSubmissionParser
from grid_cell_model.submitting.arguments import ArgumentCreator
from grid_cell_model.sub... | MattNolanLab/ei-attractor | grid_cell_model/simulations/007_noise/submit_single_neuron.py | Python | gpl-3.0 | 1,822 | [
"NEURON"
] | bd5bb2dd3b717cc4a86e30928ad4ac76487c19235de78802f9302ed3178cc3b3 |
import re, os, sys
from Tester import Tester
from RunParallel import RunParallel # For TIMEOUT value
class RunApp(Tester):
@staticmethod
def validParams():
params = Tester.validParams()
params.addRequiredParam('input', "The input file to use for this test.")
params.addParam('test_name', ... | waxmanr/moose | python/TestHarness/testers/RunApp.py | Python | lgpl-2.1 | 10,527 | [
"MOOSE"
] | e3fa525a09c7c250a49b5a69af861606ac292bcf9f25b6359c84178f29811216 |
####################################################################
# Class PROGRAM: contral External programs #
####################################################################
# External modules
import os,sys,signal
import re,shutil
import subprocess
import numpy
import time
# Internal mo... | phyzhangyang/EasyScan_HEP | src/program.py | Python | apache-2.0 | 47,915 | [
"Gaussian"
] | 13e27039fec751a656a68e3a8374bc094e8b411389e2cd999999ca58ea7fcdae |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
import os, random, stat
from collections import OrderedDict
from copy im... | AmrnotAmr/zato | code/zato-cli/src/zato/cli/quickstart.py | Python | gpl-3.0 | 14,479 | [
"VisIt"
] | 031fd049712fe48f2322cf8fd869b736d6db1b2c7eb90992519466cfdb74a2b7 |
"""
Module provides utility functions to manipulate netCDF dataset.
- classify variable types of coordinate, coordinate bounds, grid mapping, scientific data,
auxiliary coordinate
- show original metadata of a variable
Reference code
http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
"""
imp... | RENCI/xDCIShare | hs_file_types/nc_functions/nc_utils.py | Python | bsd-3-clause | 18,904 | [
"NetCDF"
] | 67128b009cc95431ba30501d64ae588eb3bb0f2ea2504e0d516b4f403df1d9c6 |
# (c) 2015 - Jaguar Land Rover.
#
# Mozilla Public License 2.0
#
# Python-based partition manager PoC
import gtk
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
import sys
import time
import swm
#
# Partition manager service
#
class PartMgrService(dbus.service.Object):
def __init__(... | magnusfeuer/genivi_software_management | partition_manager/partition_manager.py | Python | mpl-2.0 | 8,847 | [
"Jaguar"
] | 0b25768284a2305c3fbfa1bd76ecf5bf42ea302ec80d44846f35350ca71e0ea6 |
from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_raises, assert_equal,
assert_warns, assert_array_equal, assert_array_almost_equal,
suppress_warnings)
from numpy import random
from numpy.c... | asnorkin/sentiment_analysis | site/lib/python2.7/site-packages/numpy/random/tests/test_random.py | Python | mit | 61,831 | [
"Gaussian"
] | dead70b0a5a0cfb06d6b30f1e533b623b2a37bddd99bb36099ae1af3b0f57c6d |
from datetime import datetime
import unittest
import pandas as pd
from espresso import convert
class ConvertTest(unittest.TestCase):
def setUp(self):
self.df = pd.DataFrame([
{'datetime': datetime(2000,1,1,0,0), 'value': 0.0},
{'datetime': datetime(2000,1,1,2,0), 'value': 1.0},
... | jsheedy/affogato | espresso/test/test_convert.py | Python | unlicense | 587 | [
"ESPResSo"
] | e87b3482e7290b4403802f9bbd43951ea9a80799f2efc9f654e51aff91c28e32 |
"""
========================
Decimating scalp surface
========================
This can be useful to reduce computation time when
using a cloud of digitization points for coordinate alignment
instead of e.g. EEG-cap positions.
"""
print(__doc__)
# Authors: Denis Engemann <denis.engemann@gmail.com>
# Alexand... | effigies/mne-python | examples/plot_decimate_head_surface.py | Python | bsd-3-clause | 1,105 | [
"Mayavi"
] | 3dcb18f09f4fb03935822cf8debc758b7cb45130278d7bb6f3f4dfcf27e8e38d |
from gaussfitter import gaussfit
import numpy as np
from util import utils
import matplotlib.pyplot as plt
import sys
def aperture(startpx,startpy,radius=3):
r = radius
length = 2*r
height = length
allx = xrange(startpx-int(np.ceil(length/2.0)),startpx+int(np.floor(length/2.0))+1)
ally = xrange(st... | bmazin/ARCONS-pipeline | examples/Pal2012-nltt/view_frameBlue.py | Python | gpl-2.0 | 1,390 | [
"Gaussian"
] | c809e6d7503aa893d8987c8c3f1ceab334df04db5afc6c251b53cb4f13a69b0c |
import os
import time
import numpy as np
import OpenGL.GL as gl
import OpenGL.GLU as glu
import OpenGL.GLUT as glut
import Image
import PIL.ImageOps as iops
from fos.core.utils import list_indices as lind
from os.path import join as pjoin
from dipy.core import track_metrics as tm
import fos.core.collision as cll
dat... | fos/fos-legacy | scratch/very_scratch/primitives.py | Python | bsd-3-clause | 18,231 | [
"Mayavi",
"VTK"
] | 4fec180d9e3baab67ff891ac5bb3c2653dfe30eb5d2caf945ba505e368b11711 |
# .. coding: utf-8
# $Id: __init__.py 8676 2021-04-08 16:36:09Z milde $
# Author: Engelbert Gruber, Günter Milde
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""LaTeX2e document tree Writer."""
__docformat__ = 'reStructuredText'
# code contributi... | sonntagsgesicht/regtest | .aux/venv/lib/python3.9/site-packages/docutils/writers/latex2e/__init__.py | Python | apache-2.0 | 132,799 | [
"VisIt"
] | e35de26b047ea0338c8d71ed739868fe0b9dd52b58c85d0adf650709c1cf1cdf |
"""Generate Java code from an ASDL description."""
# TO DO
# handle fields that have a type but no name
import os
import sys
import traceback
import asdl
TABSIZE = 4
MAX_COL = 76
def reflow_lines(s, depth):
"""Reflow the line s indented depth tabs.
Return a sequence of lines where no li... | xia-st/JPython | ast/asdl_java.py | Python | gpl-2.0 | 12,721 | [
"VisIt"
] | a29b91f9e3c3fc38b05c99c6e6c5cd58da1132242f6ad88a23b0437adae04b83 |
"""
Utility functions for the HapMix workflow
"""
def which(program):
"""Check if binary exists"""
import os
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
re... | Illumina/HapMix | bin/HapMixUtil.py | Python | gpl-3.0 | 9,343 | [
"VisIt"
] | ed7a1f29a30d8e21fcb2f1b072cb8f3ea48d7e1d0fb9102e12622281911dde01 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.