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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/python
'''
The MIT License (MIT)
Copyright (c) 2016 SLU Global Bioinformatics Centre, SLU
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 ... | fikipollo/iRODS-in-Galaxy | irods_pull/iRODSManager.py | Python | mit | 12,765 | [
"Galaxy"
] | ace69d88479f3544bb5dca250b5b67ba8656833fe9491bbe6e32998a65c0e2d9 |
######################################################################
##
## Copyright 2010-2011 Ondrej Certik <ondrej@certik.cz>
## Copyright 2010-2011 Mateusz Paprocki <mattpap@gmail.com>
## Copyright 2011 Christian Iversen <ci@sikkerhed.org>
##
## Permission is hereby granted, free of charge, to any person
## obtain... | chrivers/pyjaco | pyjaco/compiler/javascript.py | Python | mit | 14,249 | [
"VisIt"
] | 3977990c84db2bd48e0c287c096fe859f71c4fb0728e0eb7ca57285aa5420b9c |
""" Defines prior distributions for bayesian changepoint detection
Formulas adapted from
https://en.wikipedia.org/wiki/Conjugate_prior#Continuous_distributions
"""
from __future__ import division
from scipy import stats
import numpy as np
class Distribution(object):
"""Base class for probability distributions ... | concord/bfd | concord_ml/bcd/distributions.py | Python | apache-2.0 | 3,661 | [
"Gaussian"
] | 1343b04131a7f10b91bdb35965a5939220a9675781a3ee5be4dde440076e5572 |
# Copyright (C) 2012,2013,2016
# 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 ... | kkreis/espressopp | src/analysis/Configurations.py | Python | gpl-3.0 | 3,283 | [
"ESPResSo"
] | a17aae31c3c23983614e92f4729f1d2319014a228441e6b8f255cc33d8d39fd4 |
# Authors: Christian Lorentzen <lorentzen.ch@gmail.com>
#
# License: BSD 3 clause
import numpy as np
from numpy.testing import assert_allclose
import pytest
import warnings
from sklearn.datasets import make_regression
from sklearn.linear_model._glm import GeneralizedLinearRegressor
from sklearn.linear_model import Tw... | sergeyf/scikit-learn | sklearn/linear_model/_glm/tests/test_glm.py | Python | bsd-3-clause | 15,324 | [
"Gaussian"
] | ca1a9cf522ca41ee706d62466134264e115434f45ee47d148bcf1734c884a779 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgarren/spack | var/spack/repos/builtin/packages/r-gviz/package.py | Python | lgpl-2.1 | 3,127 | [
"Bioconductor"
] | f3fcb0fd8d32c415b0e0874fa50a430c773ca5131ac2765628d2fdb1874a04ee |
""" Repaso interactivo de python
Traducido de: http://grading.codingthematrix.com/edition1/index.html
"""
def minutes_in_weeks(weeks):
""" 1: (Task 0.5.1) Minutes in a Week
>>> minutes_in_week(1)
604800
>>> minutes_in_week(2)
1209600
"""
def reminder_without_mod(numerator, divisor):... | elviejo79/scrum_developer | practicas/clean_python_lab.py | Python | gpl-3.0 | 7,860 | [
"MOE"
] | ec60ec9eec520b1a5f0b233c10213b8cb6f322b6bb7295b3b5abe7e3ef786b02 |
# 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/prop/__init__.py | Python | apache-2.0 | 853 | [
"PySCF"
] | f4c6268c875cd5e50138761efa8255ba959c3a49e08d92b488708457f75bfd62 |
#!/usr/bin/env python
# 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
#
# U... | gkc1000/pyscf | pyscf/cc/rccsd.py | Python | apache-2.0 | 16,576 | [
"PySCF"
] | 0fcff77c1f2d8f50a46beda1e3670dc5c94ba767b33c7668cd3ecb882baeeaea |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import ast
import io
import operator
import os
import sys
import token
import tokenize
class Visitor(ast.NodeVisitor):
def __init__(self, lines):
self._lines = lines
self.line_numbers_with_nodes = set()
... | jwatson/dotfiles | config/coc/extensions/node_modules/coc-python/pythonFiles/normalizeForInterpreter.py | Python | mit | 5,011 | [
"VisIt"
] | 7495e9af18612d051a51b6c8ee8396664ff6f73ee0c4b729ea83326ba3e9ea3a |
# Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
"""Unittest for ipaddress module."""
import unittest
import re
import contextlib
import operator
import pickle
import ipaddress
import weakref
from test.support import LARGEST, SMALLEST
class BaseTestCase(unittest.TestCase):
# One b... | brython-dev/brython | www/src/Lib/test/test_ipaddress.py | Python | bsd-3-clause | 117,920 | [
"FEFF"
] | 33acef2fe56aa5161aa4428d6a807964461cb1cf846da484c64a3a116c05ef7a |
# +
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | intel-analytics/analytics-zoo | pyzoo/zoo/chronos/autots/model/auto_arima.py | Python | apache-2.0 | 6,350 | [
"ORCA"
] | 63d9ef2d50d5ef53daddc19411200ecca4020a391af570ee1891aa5e6dda84ed |
import numpy
import os
if not "ETS_TOOLKIT" in os.environ:
os.environ["ETS_TOOLKIT"] = "wx"
from mayavi import mlab
from pyface.api import GUI
from pyface.timer.api import Timer
from tvtk.tools import visual
import atexit
import threading
from espressomd.interactions import NonBondedInteractions
# workaround for htt... | tbereau/espresso | src/python/espressomd/visualization.py | Python | gpl-3.0 | 5,472 | [
"ESPResSo",
"Mayavi",
"VTK"
] | 9ac91e15dbf0282371ed37ad6983a3d426b635adab3302120e17ab74ea68a6ac |
# -*- coding: utf-8 -*-
"""
Regression tests for the Test Client, especially the customized assertions.
"""
import os
from django.conf import settings
from django.test import Client, TestCase
from django.test.utils import ContextList
from django.core.urlresolvers import reverse
from django.core.exceptions import Suspi... | sam-tsai/django-old | tests/regressiontests/test_client_regress/models.py | Python | bsd-3-clause | 40,837 | [
"VisIt"
] | 3db9f4afc340111a38b1f11025f115c243c6d6e1da18d26cf0d6c5339a0f283f |
#Import OpenCV and Numpy
import numpy as np
import cv2
import matplotlib.pyplot as plt
#Read the image
img = cv2.imread('pepper.png')
'''
OpenCV represents RGB images as multi-dimensional NumPy arrays
but in reverse
order!This means that images are actually represented in BGR order rather than
RGB!
'''
img = cv2.cvtC... | eyantrainternship/eYSIP_2015_Marker_based_Robot_Localisation | Task-3/Image Filtering/src/GaussFilter.py | Python | cc0-1.0 | 779 | [
"Gaussian"
] | aa0aa2075125bdd30c625ba06b03ee1d9bc243b1a2a3887a9e533b6e16f343ca |
from functools import partial
from qt_common import *
class SendToButton(QPushButton):
pass
class SiteSelect(QDialog):
def __init__(self, parent, sites=[]):
super(SiteSelect, self).__init__(parent)
self.sites = sites
self.setModal(True)
self.setStyleSheet(base_css)
... | opennx/nx.client | dlg_sites.py | Python | gpl-3.0 | 884 | [
"Firefly"
] | b789adb9d7ab6b4340ff35e2fbe596c58ffcf7315ae1ddd1c5df3ca025098b7c |
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2010 (ita)
"""
Classes and functions required for waf commands
"""
import os, re, imp, sys
from waflib import Utils, Errors, Logs
import waflib.Node
# the following 3 constants are updated on each new release (do not touch)
HEXVERSION=0x1080e00
"""Constant updat... | mattaw/SoCFoundationFlow | admin/waf/waf-1.8.14/waflib/Context.py | Python | apache-2.0 | 19,429 | [
"VisIt"
] | f4c11bbfe392070a31c0d376b97267f31e26131ba93cc2fd0a17c2ff15af8b38 |
# Copyright (c) 2014 Kontron Europe GmbH
#
# 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... | kontron/python-ipmi | pyipmi/msgs/picmg.py | Python | lgpl-2.1 | 24,493 | [
"Amber"
] | 01108626eb19da2a2e89e93cf3c9d1d41f4f50dbeb6504d27dc6f2f87c95016a |
"""
Module extracts metadata from NetCDF file to complete the required HydroShare NetCDF
Science Metadata
References
reprojection
http://gis.stackexchange.com/questions/78838/how-to-convert-projected-coordinates-to-
lat-lon-using-python
datatype
http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html
... | FescueFungiShare/hydroshare | hs_app_netCDF/nc_functions/nc_meta.py | Python | bsd-3-clause | 16,689 | [
"NetCDF"
] | 8132e13f05f501442765fb16b55e407d90564cd867f09395e9b85eeea743f6c9 |
"""This module defines the Atom object."""
import numpy as np
from ase.data import atomic_numbers, chemical_symbols
# singular, plural, type, shape
data = {'symbol': ('symbols', str, () ),
'number': ('numbers', int, () ),
'position': ('positions', float, (3,)),
'... | freephys/python_ase | ase/atom.py | Python | gpl-3.0 | 7,449 | [
"ASE"
] | 0ee78d7af69e906527e6c0997ab7995a99e15c0681951bddcd6eec44e8f45a43 |
"""Module to run some visual tests by creating plots and having
the user visually compare things to look good
"""
from point_cloud import wavefront
from visualization import graphics
from dynamics import asteroid
from mayavi import mlab
import pdb
import threading
def mlab_show():
mlab.show()
print('Opened M... | skulumani/asteroid_dumbbell | integration/tests/test_graphics.py | Python | gpl-3.0 | 1,634 | [
"Mayavi",
"VTK"
] | 294a1edbc3df3297c1bd440faec02e0382624816e966d7be062c5450591c6532 |
##
## Events analysis
##
import os
import csv
import sys
import subprocess
from collections import defaultdict
import pysam
import misopy
import misopy.gff_utils as gff_utils
import misopy.as_events as as_events
import misopy.run_miso as run_miso
import misopy.misc_utils as misc_utils
import misopy.exon_utils as exon... | kdaily/altanalyze | misopy/run_events_analysis.py | Python | apache-2.0 | 11,143 | [
"pysam"
] | a3ce7c3527114804dc1200bd6e60b1f1682c60b79615cbb04225874c421489de |
#!/opt/anaconda/bin
import glob
import argparse
import subprocess
import os
from Bio import SeqIO
from Bio.Blast import NCBIXML
def system_call(command_string):
'''wrapper for the system call that catches
non-zero returncodes logs and raises an error'''
with open('/dev/null', 'w') as devnull:
# d... | fmaguire/scripts | PhD/sequence_tools/auto_BLAST.py | Python | mit | 5,224 | [
"BLAST"
] | 0fa5bb13efec16ccc606603c2016f41bef3ddfee22e24875beaffed50e6d2ca6 |
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_true # pylint: disable=E0611
from auth.authz import get_user_by_email, get_course_groupname_for_role
from django.conf import settings
from selenium.webdriver.common.keys import Keys
import time
import os
fr... | PepperPD/edx-pepper-platform | cms/djangoapps/contentstore/features/common.py | Python | agpl-3.0 | 8,850 | [
"VisIt"
] | 3daed312f49b52c03a6a016de17fe8157ca3b30257c77b23b216761ddfc1dea9 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/chronos/example/tcmf/run_electricity.py | Python | apache-2.0 | 6,747 | [
"ORCA"
] | 832ee3762ad47320a1b48234f0f517785fb484f09fc03306bda42177cd5dd396 |
# Copyright (C) 2012,2013,2015
# 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 ... | espressopp/espressopp | src/ParticleGroup.py | Python | gpl-3.0 | 2,358 | [
"ESPResSo"
] | 76328c92933f0a9c7ab338df1fca1d04420036f2ace4bf004d541c881c6bf0d7 |
#!/usr/bin/env python
# coding: utf-8
"""
.. module:: BUSCO
:synopsis: BUSCO - Benchmarking Universal Single-Copy Orthologs.
.. moduleauthor:: Felipe A. Simao <felipe.simao@unige.ch>
.. moduleauthor:: Robert M. Waterhouse <robert.waterhouse@unige.ch>
.. moduleauthor:: Mathieu Seppey <mathieu.seppey@unige.ch>
.. vers... | nextgenusfs/funannotate | funannotate/aux_scripts/funannotate-BUSCO2-py2.py | Python | bsd-2-clause | 144,316 | [
"BLAST",
"VisIt"
] | 64c1eaf96691a4abe2f742d9f39689a763795a0059dce65a93d46fd8960f95e8 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | capoe/espressopp.soap | src/interaction/TersoffTripleTerm.py | Python | gpl-3.0 | 7,195 | [
"ESPResSo"
] | 6a2892a26cf915e129d1d9a9d8ac029477ff6d06b09c6ab228332291f4e52fd5 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# we have to make sure it works with multiple scalar components
# Image pipeline
reader = vtk.vtkBMPReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/masonry.bmp")... | hlzz/dotfiles | graphics/VTK-7.0.0/Imaging/Core/Testing/Python/ResliceColorWrap.py | Python | bsd-3-clause | 978 | [
"VTK"
] | 88aa0e3c97219fcc114e7461652442a0bd2c89e87e68835ce1a12c248677263e |
########################################################################
# $HeadURL$
# File : InputDataByProtocol.py
# Author : Stuart Paterson
########################################################################
""" The Input Data By Protocol module wraps around the Replica Management
components to provid... | Sbalbp/DIRAC | WorkloadManagementSystem/Client/InputDataByProtocol.py | Python | gpl-3.0 | 11,587 | [
"DIRAC"
] | 3acb2e63616363c031069c4fce6b04cf42950c28c4055664c9d3c65ab8debffd |
# Author: Artem Pulkin
"""
This and other `_slow` modules implement the time-dependent Hartree-Fock procedure. The primary performance drawback is
that, unlike other 'fast' routines with an implicit construction of the eigenvalue problem, these modules construct
TDHF matrices explicitly via an AO-MO transformation, i.... | gkc1000/pyscf | pyscf/pbc/tdscf/krhf_slow_gamma.py | Python | apache-2.0 | 7,783 | [
"PySCF"
] | 89362cf87545bb9ed6e84d5137f95189fbe387bd5c6038817486e72285994237 |
from __future__ import print_function
import contextlib
from pyRSD import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline as spline
# tools
from pyRSD.rsd._cache import parameter, cached_property, interpolated_function, CachedProperty
from pyRSD.rsd.tools import BiasToSigmaRelation
# base mode... | nickhand/pyRSD | pyRSD/rsd/power/biased/power_biased.py | Python | gpl-3.0 | 18,237 | [
"Gaussian",
"TINKER"
] | 6b00a8b703c03e37c8ec7982832940302852b80652c353145045b37878dc997b |
import os.path
import re
# don't use slots since we only have a few of these guys
class _sampleRec():
def __init__(self, name, mean, std, condition):
self.name = name
self.mean = int(mean)
self.std = int(std)
self.condition = int(condition)
class SeqUtils():
def __init__(self... | mbiokyle29/pipelines | seq/seq_utils.py | Python | mit | 7,955 | [
"Bowtie"
] | d15c6a4754a5dc9f10046c2d62706c8de3a2fce998045e6dbfd34b9dfa2e6c30 |
# -*- coding: utf-8 -*-
"""
provide a .xyz file with m*A followed by n*B coordinates. The order of atoms in each single molecule should be same as
in A.data and B.data
"""
# hyper parameter
dirName = r"F:\simulations\asphaltenes\production\largeClay\athInHeptane-single/"
firstDataFileName = "ath.data"
secon... | riddlezyc/geolab | src/io/buildFromMolecules.py | Python | gpl-3.0 | 13,249 | [
"LAMMPS"
] | 245c845b21c849dc7517379e2d8f37576910bb9a1de3ff5d4334d44fe0586bba |
"""
Gaussian quadrature utilities for use with the Python Active-subspaces Utility
Library.
"""
import numpy as np
import misc as mi
import logging
def r_hermite(N):
"""Recurence coefficients for the Hermite orthogonal polynomials.
:param int N: The number of recurence coefficients.
:return: ab, An `N`-... | meyersw3476/active_subspaces | active_subspaces/utils/quadrature.py | Python | mit | 4,057 | [
"Gaussian"
] | cc9e198f081754a05af781a902fe7c0db33212856d71ead1462ec841750ed4db |
"""
Course Outline page in Studio.
"""
import datetime
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from bok_choy.javascript import js_defined, wait_for_js
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import Select
from selenium.webdriver.comm... | caesar2164/edx-platform | common/test/acceptance/pages/studio/overview.py | Python | agpl-3.0 | 38,663 | [
"VisIt"
] | d62c1ee2d608be3e7466683ec575ed2be630910f8ea51af5c7322c4a8cc4054e |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi-rking/psi4 | psi4/driver/schema_wrapper.py | Python | lgpl-3.0 | 22,866 | [
"Gaussian",
"Psi4"
] | d4cfb61441f275329f288a9c06b4e5e4c08d7e6d6967ff8b24e5f7d7d7fe2356 |
""" Python test discovery, setup and run of test functions. """
import fnmatch
import py
import inspect
import sys
import pytest
from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr
import _pytest
import pluggy
cutdir2 = py.path.local(_pytest.__file__).dirpath()
cutdir1 = py.path... | nicoddemus/repo-test | _pytest/python.py | Python | mit | 80,527 | [
"VisIt"
] | 8186fe683e575efec398e7dfe364b8b81a5f5ee8b6f8e163c2c7a2e45b6a0986 |
# -*- coding: utf-8 -*-
"""
Unitary Event (UE) analysis is a statistical method to analyze in a time
resolved manner excess spike correlation between simultaneously recorded
neurons by comparing the empirical spike coincidences (precision of a few ms)
to the expected number based on the firing rates of the neurons
(see... | JuliaSprenger/elephant | elephant/unitary_event_analysis.py | Python | bsd-3-clause | 28,150 | [
"NEURON"
] | 89ea8b199551ad03a44118b9812aec373ccb491646a49a5df14ca051ee0ce531 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# showre - Display a runtime environment
# Copyright (C) 2003-2014 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... | heromod/migrid | mig/shared/functionality/showre.py | Python | gpl-2.0 | 5,920 | [
"Brian"
] | f01ec00aeb30cf230a47ba1d929e3acd6c5b2d42e1424485adf7cd10d40e7dbf |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | alxgu/ansible | lib/ansible/modules/network/panos/_panos_dag_tags.py | Python | gpl-3.0 | 7,481 | [
"Galaxy"
] | 7a89fe07a52f8d067e7e8056897850dcc878cdeb068fb84abe9db17a84d9c3bb |
#!/usr/bin/env python
# Created: Wed Jun 21 10:28:14 2000
# Last changed: Time-stamp: <01/09/04 09:42:06 thomas>
# thomas@cbs.dtu.dk, http://www.cbs.dtu.dk/thomas
# File: xbb_widget.py
# Copyright 2000 by Thomas Sicheritz-Ponten. All rights reserved.
# This code is part of the Biopython distribution and governed by i... | updownlife/multipleK | dependencies/biopython-1.65/Scripts/xbbtools/xbb_widget.py | Python | gpl-2.0 | 17,499 | [
"BLAST",
"Biopython"
] | bc69dd82f516ee56b884846d4ee2bf34954bf96ecd62241eda587196a7a72652 |
# coding: utf8
from jinja2 import nodes
from jinja2.compiler import CodeGenerator, CompilerExit, dict_item_iter
from jinja2.ext import Extension
from .new_nodes import PrefixExtends
from .utils import ensure_jinja_iterable
class PrefixStatements(Extension):
tags = ("prefix_extends", "prefix_include")
def ... | ondrejkajinek/pyGrim | pygrim/components/jinja_ext/prefix_statements.py | Python | mit | 4,241 | [
"VisIt"
] | b07c5fde4181ee2a0d33423bdbc0e4560b519bf1b3fe69f9b57130942d4f4c22 |
from diraccfg import CFG
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import List
def loadJDLAsCFG(jdl):
"""
Load a JDL as CFG
"""
def cleanValue(value):
value = value.strip()
if value[0] == '"':
entries = []
iPos = 1
current = ""
... | DIRACGrid/DIRAC | src/DIRAC/Core/Utilities/JDL.py | Python | gpl-3.0 | 5,634 | [
"DIRAC"
] | 7bcc10b6fcf8a0f93a5e463725c1a99b152d8dbfe4b6f766fa8c1a4554e9db9e |
from django.shortcuts import render
from django.conf import settings
from django.core.files import File
from protein.models import ProteinFamily, ProteinAlias, ProteinSet, Protein, ProteinSegment
from common.views import AbsTargetSelection
from common.views import AbsSegmentSelection
from common.views import Abs... | fosfataza/protwis | phylogenetic_trees/views.py | Python | apache-2.0 | 15,155 | [
"CRYSTAL"
] | 32741661f41ff72c02353fab88c57a105af46e1a4cb3f655feed25496806e4ba |
# mako/_ast_util.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
ast
~~~
The `ast` module helps Python applications to process trees of the Pyth... | sunze/py_flask | venv/lib/python3.4/site-packages/mako/_ast_util.py | Python | mit | 25,652 | [
"VisIt"
] | d908285f2ca43e56a156a1cf940460952e00c39f4bd2b755b7f9e80cf51f6496 |
from margin.utils import AlignedPair, getFastaDictionary, getFastqDictionary, samIterator
import os, sys
from optparse import OptionParser
import pysam
import xml.etree.cElementTree as ET
from jobTree.src.bioio import reverseComplement, prettyXml, system
from itertools import product
class SubstitutionMatrix():
""... | benedictpaten/marginAlign | scripts/substitutions.py | Python | mit | 4,546 | [
"pysam"
] | a388aea011a96e9f451b4ff9a410509183d42be62c290831f6da052ff9a5f36f |
#!/usr/bin/env python
"""The script will take a BAM file and fw/rv primer positions and
remove any reads perfectly overlapping these primer positions. It will
also clip bases partially overlapping with the primer regions.
"""
#--- standard library imports
#
from __future__ import division
import os
import sys
import l... | CSB5/vipr | src/mark_primer.py | Python | gpl-2.0 | 15,707 | [
"pysam"
] | 7858ba830f4adb91b00b5d67c876fa4d90a7b04f35fc8a61ab4387c89423c0c4 |
import unittest
from test import support
from itertools import *
import weakref
from decimal import Decimal
from fractions import Fraction
import operator
import random
import copy
import pickle
from functools import reduce
import sys
import struct
maxsize = support.MAX_Py_ssize_t
minsize = -maxsize-1
def lzip(*args):... | anbangleo/NlsdeWeb | Python-3.6.0/Lib/test/test_itertools.py | Python | mit | 94,652 | [
"GULP"
] | 95d4be61e12e5e828d37e1b60d4f1842d8483df131046c97365cc355dadefae0 |
# Copyright 2016 ASLP@NPU. 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 applicable law or ag... | npuichigo/voicenet | src/models/tf_model.py | Python | apache-2.0 | 13,402 | [
"Gaussian"
] | 5ddfb784af936f6813149c4e6cba96c34e75bdafc1bd1c6cc59fdfd19958a68a |
# -*- coding: utf-8 -*-
"""
ncstructure:
Class for structure of a classic netCDF file
"""
# --- Imports ---
from __future__ import unicode_literals, print_function
import sys
import os
from operator import attrgetter
from collections import OrderedDict
import itertools as it
import codecs
from xml.etree import El... | bjornaa/netcdf-utilites | netcdf_utilities/ncstructure.py | Python | mit | 14,411 | [
"NetCDF"
] | 77393d60f2122f88ad8cbf275c4686b7ada488b3b81b4ba614ba39045d8aee04 |
# Include the Dropbox SDK libraries
from dropbox import client, rest, session
from ConfigParser import SafeConfigParser
from itertools import product
from string import ascii_lowercase
from time import sleep
import json
import os, sys
path = os.path.abspath(os.path.dirname(sys.argv[0]))
configfile = path + '/localcon... | laidig/RandomScripts | dropbox_del_restore/restore.py | Python | mit | 1,364 | [
"VisIt"
] | b176e7e1569bf2bccfb4be9d866117a674a0034329433218d9b7bca726f2b2e4 |
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# 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.
"""This provides code for a general Naive Bayes learner.
Naive Bayes is a supervised classifi... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/NaiveBayes.py | Python | gpl-2.0 | 8,639 | [
"Biopython"
] | f445f5d7083831a523b4fa6593cf58cf3319af4d46038138959e16ad9af0886f |
import arrow
from copy import deepcopy
from datetime import datetime
from dateutil.relativedelta import relativedelta, SU, MO, TU, WE, TH, FR, SA, weekday
from django.test import TestCase, tag
from edc_facility.import_holidays import import_holidays
from edc_visit_schedule.schedule.visit_collection import VisitCollect... | botswana-harvard/edc-appointment | edc_appointment/tests/test_appt_datetimes.py | Python | gpl-2.0 | 9,074 | [
"VisIt"
] | 0efad588b6d02a6e15a12bbd648efb9dec1c6ab0abb9ce3a08e4176830e57d93 |
#!/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 | python/MooseDocs/test/extensions/test_autolink.py | Python | lgpl-2.1 | 17,778 | [
"MOOSE"
] | c72504319106e5bb011de30ed3c9606e809b5a4f9b6e5840a41f90c38dd30de0 |
#===============================================================================
#
# CSR_T.py
#
# This file is part of ANNarchy.
#
# Copyright (C) 2016-2020 Julien Vitay <julien.vitay@gmail.com>,
# Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com>
#
# This program is free software: you can redistr... | ANNarchy/ANNarchy | ANNarchy/generator/Projection/OpenMP/CSR_T.py | Python | gpl-2.0 | 7,148 | [
"NEURON"
] | 027dc5df1e3bfd154da9285a125cc3da6236fd6e082eb770c570aec320788929 |
# Todd Miller jmiller@stsci.edu
from __future__ import division
import os, sys, math
import Tkinter as Tk, FileDialog
import tkagg # Paint image to Tk photo blitter extension
from backend_agg import FigureCanvasAgg
import os.path
import matplotlib
from matplotlib.cbook import is_string_like
from ... | tkaitchuck/nupic | external/linux64/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py | Python | gpl-3.0 | 24,593 | [
"FLEUR"
] | 411b23bce7c053a916e77343e649cb0d220cec93c43b2a66340563c4a47da7b5 |
# Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | google/makani | config/m600/sim/wing_imus_sim.py | Python | apache-2.0 | 10,648 | [
"Gaussian"
] | d556239998ccc346a33f1917a2969a1ad6b5faab6762932787b81560218cf78d |
""" General Message Queue Interface to create Consumers and Producers
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from DIRAC import gLogger, S_OK
from DIRAC.Resources.MessageQueue.MQProducer import MQProducer
from DIRAC.Resources.MessageQueue.MQConsu... | yujikato/DIRAC | src/DIRAC/Resources/MessageQueue/MQCommunication.py | Python | gpl-3.0 | 2,892 | [
"DIRAC"
] | f454643e5c5a728dc12e0287905f8cdbcb0cf8d8e02f1b1a694399bea32fe924 |
"""Script that formats substitution matrices obtained from NCBI
This folder contains substitution matrices (mostly PAM and BLOSUM) used by
NCBI's BLAST tool. Data was obtained from
ftp://ftp.ncbi.nih.gov/blast/matrices/ on 2/14/16.
* PAM matrices - in two formats: PAM{n} and PAM{n}.cdi. N ranges from 10 to
500 in ... | jlumpe/pyalign | pyalign/matrix/matrices/create_matrices.py | Python | mit | 5,544 | [
"BLAST"
] | 7254d847ab5fbdefa1dd171ba29f4025344d5dd21ad1e2dd43f08b3803d3c4df |
# /usr/bin/python
# To run this test you need python nose tools installed
# Run test just use:
# nosetest tests.py
#
# *Note: If you add additional test, please prefix the function name
# to the type of operation being performed. For instance modifying an
# image, test_image_erode(). If you are looking for lines, t... | nils-werner/SimpleCV | SimpleCV/tests/tests.py | Python | bsd-3-clause | 107,836 | [
"Gaussian"
] | ea8d140bfd0e7dc65a728991bd31735a66117b883e305c1a5f57674aefd9999d |
"""
CircleLayout.py
Arranges selected entities in a simple circle, possibly setting the stage for
spring layout.
Running time is O(n)
Created Summer 2005, Denis Dube
"""
import math
from CircleOptionsKeys import FORCE_TOPLEFT_TO_ORIGIN
from CircleOptionsKeys import MIN_NODE_SPACING
from CircleOption... | Balannen/LSMASOMM | atom3/Kernel/LayoutModule/CircleLayoutModule/CircleLayout.py | Python | gpl-3.0 | 8,099 | [
"VisIt"
] | 1c271bb9298d22e182e7c4079724f03682de8d32feb7a312b221598563daba25 |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | BenKaehler/q2-feature-classifier | q2_feature_classifier/_consensus_assignment.py | Python | bsd-3-clause | 10,360 | [
"BLAST"
] | 5d69e3064bcb957aa70cf7c26dd57bbefef4b71c2d3013114e7fd5cfd103f537 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | mikehulluk/morphforge | src/morphforgeexamples/exset2_singlecell_simulations/singlecell_simulation060.py | Python | bsd-2-clause | 5,087 | [
"NEURON"
] | bfdcc7764ff7faf85bbe9ad58e6591d47f56ef0aedbc1bc18d0439deadb156f0 |
# stdlib
from secrets import randbelow
left_name = [
"admiring",
"adoring",
"affectionate",
"agitated",
"amazing",
"angry",
"awesome",
"beautiful",
"blissful",
"bold",
"boring",
"brave",
"busy",
"charming",
"clever",
"cool",
"compassionate",
"comp... | OpenMined/PySyft | packages/hagrid/hagrid/names.py | Python | apache-2.0 | 2,651 | [
"exciting"
] | 15d0b77811e9f56a9ab622464f210e8d6fe1e9b072a724a4ce2624d9aff4d697 |
# Note: no __unicode__ stuff at the top due to mapnik. Perhaps 2.2
# works, though.
import datetime
import math
import os
import logging
from django.utils.functional import cached_property
from django.conf import settings
from django.http import Http404
from django.contrib.gis.geos import Point
import mapnik
import p... | lizardsystem/lizard-ocean | lizard_ocean/layers.py | Python | gpl-3.0 | 10,869 | [
"NetCDF"
] | 1fdc038c6040ea00fd26291a022224f52a4fcec1a073348068e1b645bb1ec7bd |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# __init__ - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of ... | heromod/migrid | mig/shared/functionality/__init__.py | Python | gpl-2.0 | 1,160 | [
"Brian"
] | 0aec02dc90e6836a3e0850d72e09fdb13774a4b5ea94c9a309176243fedfa862 |
""" This agent syncs CS and pilot files to a web server of your choice
.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN PilotSyncAgent
:end-before: ##END
:dedent: 2
:caption: PilotsSyncAgent options
"""
from __future__ import absolute_import
from __future__ import division
from __future__ impor... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py | Python | gpl-3.0 | 4,589 | [
"DIRAC"
] | 01defaec648fb9148172a058bd686434f3ac0442f777ec4ee7a1794721125b6b |
import os, inspect
dir_external_paths = os.path.dirname(os.path.abspath(\
inspect.getfile(inspect.currentframe())))
def findPath(locations):
"""
Parses a list of locations, returning the first file that exists.
If none exist, then None is returned.
"""
import os.path
for location in locations:
if loc... | luizcieslak/AlGDock | Pipeline/_external_paths.py | Python | mit | 4,966 | [
"Amber",
"NAMD",
"VMD"
] | 34cf40586a858eeef39d5169f5964dfb299f8a975f84f0bd01ca26933fb78097 |
#!/usr/bin/python
#Audio Tools, a module and set of tools for manipulating audio data
#Copyright (C) 2007-2012 Brian Langenberger
#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... | Excito/audiotools | audiotools/__init__.py | Python | gpl-2.0 | 180,133 | [
"Brian"
] | e13659ab6aa779b806c2fb193332cbe3a34651d4289e3cfd8b5059e1e01aabfd |
'''
Runs exome pipeline from within web app.
'''
# TODO Get project organization from Brian first thing
from google.cloud import storage
import googleapiclient.discovery
import os
import shutil
import glob
import json
import urllib
import urllib2
from ConfigParser import ConfigParser
from string import Template
import ... | dkdeconti/DFCI-CCCB-GATK-Cloud-pipeline | Web_app_submission/Mutect2/variant_process_submission.py | Python | bsd-2-clause | 8,538 | [
"Brian"
] | 983f779727fe0c6cd9022570d4a3da2ef9ad073f930f2ffc7009b4b1f41a4658 |
#__docformat__ = "restructuredtext en"
# ******NOTICE***************
# optimize.py module by Travis E. Oliphant
#
# You may copy and use this module as you see fit with no
# guarantee implied provided you keep this notice in all copies.
# *****END NOTICE************
# A collection of optimization algorithms. Version ... | jlcarmic/producthunt_simulator | venv/lib/python2.7/site-packages/scipy/optimize/optimize.py | Python | mit | 96,391 | [
"Gaussian"
] | f7e2b4bd25392cb8895ca6108ab24a9462675c8f9ed6039ad489ca29cad3c86e |
from ..utils import *
##
# Hero Powers
class NAX1_04:
"Skitter"
activate = Summon(CONTROLLER, "NAX1_03")
class NAX1h_04:
"Skitter (Heroic)"
activate = Summon(CONTROLLER, "NAX1h_03")
class NAX2_03:
"Rain of Fire"
activate = Hit(RANDOM_ENEMY_MINION, 1) * Count(ENEMY_HAND)
class NAX2_03H:
"Rain of Fire (Hero... | beheh/fireplace | fireplace/cards/naxxramas/adventure.py | Python | agpl-3.0 | 6,426 | [
"BLAST",
"CRYSTAL"
] | 4ca527e40218afc17ca71fa6ba64f2c3df4a7016ea6735405a8a81928a43cee4 |
"""
Copyright (C) <2010> Autin L.
This file ePMV_git/lightGridCommands.py is part of ePMV.
ePMV 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
(... | corredD/ePMV | lightGridCommands.py | Python | gpl-3.0 | 138,257 | [
"CRYSTAL"
] | b2dba1c7357bdff5c73c029cf602947a47cfc805850b0d7cdc578d744ad57c4f |
import pygame,random
from pygame.locals import *
from constantes import *
from evenement import *
from boiteOutils import *
from interrupteur import *
from evenementConcret import *
from pnj import *
class Narrateur(Evenement):
def __init__(self, jeu, gestionnaire):
super().__init__(jeu, gestionnaire)
... | Rastagong/A-Scholar-In-The-Woods | Releases/Compo/Sources/listeEvenementsLD26.py | Python | mit | 30,672 | [
"FLEUR"
] | fe98e4e4ddb893a41a9f0bd38d2a2a4c1e0f550c7632f30b28506c38e33b4d7f |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 2: Nature-Inspired Algorithms
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2014 by Jeff Heaton
Licensed under the Apache License, Versi... | PeterLauris/aifh | vol2/vol2-python-examples/examples/capstone_titanic/titanic_milestone1.py | Python | apache-2.0 | 22,692 | [
"VisIt"
] | a35aaf341e8c8da429e7d93e6b411dee98324b42a2bb0d1b450a7f83d92a2e88 |
# Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | vmthunder/nova | nova/tests/compute/test_resource_tracker.py | Python | apache-2.0 | 61,228 | [
"exciting"
] | dbed7477f737b2ee82866a515b8895d734c8da877c76ffd0cde3c057879a1b46 |
#!/usr/bin/env python
import os
import re
import netCDF4 as nc
import numpy as np
import pandas as pd
import pickle
from natsort import natsorted
# mpi
from joblib import delayed, Parallel
from multiprocessing import cpu_count, Pool
def get_value(nc_obj, label):
return nc_obj.variables[label][:].flatten()
def ge... | rhyswhitley/savanna_iav | src/data_preproc/pickleit/pickle_landsurf.py | Python | cc0-1.0 | 2,656 | [
"NetCDF"
] | fcc84b140368499dfb8200f69f606498652686d429f50856a515fa91c63a8faf |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 2 18:06:40 2017
Data Aggregation
@author: svimal
"""
import glob
import numpy as np
import xarray as xray
from affine import Affine
from rasterio import features
import geopandas
#from numba import jit
import pandas as pd
import os
def transform_... | solomonvimal/UCLA-Hydro | MRPI/Python/aggregation.py | Python | gpl-3.0 | 11,998 | [
"NetCDF"
] | 6766ea31ffd63cf1ece40b30123fe9ba55ca675f9b44d60d3f3ed59286eba9bc |
# Orca
#
# Copyright 2004-2009 Sun Microsystems Inc.
# Copyright 2010-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... | pvagner/orca | src/orca/messages.py | Python | lgpl-2.1 | 115,950 | [
"ORCA"
] | ee8f5528f1ad191def2a8439706427d80f93217fdfd251eb923032c06d77c3ad |
# -*- coding: utf-8 -*-
"""
Re-implementation of [1] in Tensorflow for volumetric image processing.
[1] Zheng et al.
"Conditional random fields as recurrent neural networks." ICCV 2015.
https://arxiv.org/abs/1502.03240
"""
from __future__ import absolute_import, print_function
import numpy as np
import tensorflow as ... | NifTK/NiftyNet | niftynet/layer/crf.py | Python | apache-2.0 | 20,370 | [
"Gaussian"
] | 7fa233c8972762bc5358b718ef5a3c63a25f6e4391a60eddb950e237eceff127 |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | QuantumElephant/horton | horton/scripts/atomdb.py | Python | gpl-3.0 | 22,763 | [
"CP2K",
"ORCA",
"Psi4"
] | 0eebedf85edca213c6496aca2485fe699c6d65dd3ce0229d4cbba654f20af8cc |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/chronos/src/bigdl/chronos/autots/deprecated/regression/base_predictor.py | Python | apache-2.0 | 7,797 | [
"ORCA"
] | 7ed8637435794cc7a5298c092fa2f590ba6bf14b14f5a994d4c86d30c14d2e42 |
import argparse
import glob
import collections
import json
import matplotlib
matplotlib.use("AGG")
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
import subprocess
_WINDOW_NAME = "Whatever"
def advance(pos, npos):
pos = pos + 1
if pos == npos:
return 0
return pos
def reverse(po... | danblick/robocar | lines/script.py | Python | mit | 11,703 | [
"Gaussian"
] | 86f8fed2eef9a4073ceb0ea0bcbf2358ab342a963bd5f9533e1ad4a777c8fa9c |
# 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... | xodus7/tensorflow | tensorflow/python/autograph/pyct/compiler.py | Python | apache-2.0 | 4,937 | [
"VisIt"
] | 94a0413960bba69823698e873979dad03cc14b736cb9eb281215f478c547e8c7 |
from distutils.core import setup
setup(
name='VASPmanager',
version='0.1.0',
author='Paul Pflugradt',
author_email='paulpflugradt@googlemail.com',
license='LICENSE',
description='Tool for managing VASP calculations on a PBS based cluster',
long_description=open('README.txt').read(),
pac... | paulpflug/VASPmanager | setup.py | Python | mit | 345 | [
"VASP"
] | 9d35da12409873c086f7d55ec3151601f0bf3cc1c6e9fbc0b3333aed6b6389b4 |
## \file
## \ingroup tutorial_hist
## \notebook
## Example of a fit residual plot.
##
## Creates a histogram filled with random numbers from a gaussian distribution
## and fits it with a standard gaussian function. The result is passed to the `TRatioPlot`
## constructor. Additionally, after calling `TRatioPlot::Draw` t... | mhuwiler/rootauto | tutorials/hist/ratioplot2.py | Python | lgpl-2.1 | 923 | [
"Gaussian"
] | a74544951c43f3bcac8f1f66c2546449b0ce6e27e5d7332a3d81b27376d08040 |
#
# Copyright (C) 2000-2008 greg Landrum
#
""" handles doing cross validation with k-nearest neighbors model
and evaluation of individual models
"""
from __future__ import print_function
from rdkit.ML.Data import SplitData
from rdkit.ML.KNN import DistFunctions
from rdkit.ML.KNN.KNNClassificationModel import KNNCl... | rvianello/rdkit | rdkit/ML/KNN/CrossValidate.py | Python | bsd-3-clause | 3,911 | [
"RDKit"
] | a296adb77a906d90802bd232c66457b60b2a2fbda8b12a647b55b5fafbb8d4f4 |
"""
Various bayesian regression
"""
# Authors: V. Michel, F. Pedregosa, A. Gramfort
# License: BSD 3 clause
from math import log
import numpy as np
from scipy import linalg
from .base import LinearModel
from ..base import RegressorMixin
from ..utils.extmath import fast_logdet, pinvh
from ..utils import check_arrays
... | mrshu/scikit-learn | sklearn/linear_model/bayes.py | Python | bsd-3-clause | 15,385 | [
"Gaussian"
] | e4d4340f21e62ff491ee312e2ae3f66561916cbf998db893586525022020f7a8 |
# -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at ... | francisco-dlp/hyperspy | hyperspy/models/edsmodel.py | Python | gpl-3.0 | 35,223 | [
"Gaussian"
] | 0ad3e05058a08ffbd86d21b5d4618da84344e5869414ba4c68ee1481a57357a2 |
#!/usr/bin/env python
"""cable.py: A passive cable of n compartments.
Last modified: Wed Apr 08, 2015 03:15PM
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2013, NCBS Bangalore"
__credits__ = ["NCBS Bangalore", "Bhalla Lab"]
__license__ = "GPL"
__version__ ... | BhallaLab/benchmarks | Rallpacks/moose_vs_neuron/rallpack1/moose_sim.py | Python | gpl-2.0 | 8,425 | [
"MOOSE"
] | c894e25446e1bd7bd9034b658c0fdc82dfe9f2a1aa2965bc975bf769c146b898 |
#!/usr/bin/env python
#
# $File: selectParents.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 redistrib... | BoPeng/simuPOP | docs/selectParents.py | Python | gpl-2.0 | 1,655 | [
"VisIt"
] | d2cb8eb1b3bb9a4359172fcf66f3505ad5a600aed1d1592259de7050c41aa9dc |
import argparse
import os
import chainer
from chainer import cuda, serializers
from skimage import img_as_float
from skimage.io import imread, imsave
from gp_gan import gp_gan
from model import EncoderDecoder, DCGAN_G
basename = lambda path: os.path.splitext(os.path.basename(path))[0]
"""
Note: source image, de... | wuhuikai/GP-GAN | run_gp_gan.py | Python | mit | 5,535 | [
"Gaussian"
] | e208a5f5c7e00380056b9da20879530db8e66c226356c712ca730e3fb5b9ba6c |
# 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 | test/unit/command/init/test_role.py | Python | mit | 5,090 | [
"Galaxy"
] | fec0d4f42e1fac1d1d087f8645695fd11f2616dba74eb329da91fb393598f939 |
import re
import os
import six
class Compiler(object):
RE_INTERPOLATE = re.compile(r'(\\)?([#!]){(.*?)}')
doctypes = {
'5': '<!DOCTYPE html>'
, 'xml': '<?xml version="1.0" encoding="utf-8" ?>'
, 'default': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR... | jjz/pyjade | pyjade/compiler.py | Python | mit | 14,182 | [
"VisIt"
] | 60bd86f2bb9493d77a62970963361ca25d2fe20a611010c557c317ff4c2bdd4f |
# ======================================================================
# USER-GFMD - Elastic half-space methods for LAMMPS
# https://github.com/Atomistica/user-gfmd
#
# Copyright (2011-2016,2021)
# Lars Pastewka <lars.pastewka@imtek.uni-freiburg>,
# Tristan A. Sharp and others.
# See the AUTHORS file in the top... | Atomistica/user-gfmd | tests/_DISABLED_TEST_probe_contact_map_potential/der.py | Python | gpl-2.0 | 1,819 | [
"LAMMPS"
] | 92bf421d72eacdebecb23c0c0f9c0d59a242ca0f828ed625d74c3667201f3deb |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Search Amazon books and return results as a Markdown list.
"""
vers_date = '2015-06-30'
copyright = 'Copyright (c) 2015 Brian High'
license = 'MIT'
repos_url = 'https://github.com/brianhigh/amazon-search'
"""
Searches Amazon API by subject to produce a list of matching b... | brianhigh/amzn-srch | amznsrch.py | Python | mit | 6,970 | [
"Brian"
] | 8b14125a3b5c887973702cba31dccd734e4d81df77291de12b0ae5512c531051 |
#!/usr/bin/env python
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistri... | psi-rking/psi4 | psi4/share/psi4/fsapt/copy_pymol2.py | Python | lgpl-3.0 | 1,345 | [
"Psi4",
"PyMOL"
] | af47a56bc03fc4ab4a05fc49e10eeffbf591d98d972feeb5128701da6df18094 |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def EstimateObservationNoise(csvfile, sensor_number, start_obs, stop_obs, plot=False):
'''
Estimate the Gaussian noise over an observation period. Just subtract mean and estimate variance. NaN's are omitted.
Parameters
---... | erccarls/berkely_snowfall | notebooks/observation_helpers.py | Python | mit | 2,269 | [
"Gaussian"
] | 10575c46f76543c452879b491f7a3e08931c8d8b9b3a9d71715c20741a345f3b |
#!/usr/bin/env python
# encoding: utf-8
"""
The IPython controller application.
Authors:
* Brian Granger
* MinRK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full ... | cloud9ers/gurumate | environment/lib/python2.7/site-packages/IPython/parallel/apps/ipcontrollerapp.py | Python | lgpl-3.0 | 18,565 | [
"Brian"
] | e61169478f2e5bd1b0fa11d3d6d1052ea0eb8e0331da412b52b29760a2c3314e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.