text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
import operator
import time
import Options
# as a rule, functions starting with 'query..' need db as first param - others are standalone
def queryGenerateWindows(db,x,y,z,windowsize=60,distance=30,windows=1):
if distance>=windowsize:
print("Distance cannot be larger than window size!\nSearch windows are creat... | BeTeK/EliteMerchant | src/Queries.py | Python | bsd-3-clause | 35,783 | [
"Galaxy"
] | a679595de6770b1528dd930720b64480c11a2305eb587a89c30d1543146caf3c |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
import json
import numpy as np
from pymatgen import Structure
from pymatgen.io.lobster import Cohpcar, Icohplist, Doscar, Charge
from pymatgen.electronic_structure.core import Spin, Or... | montoyjh/pymatgen | pymatgen/io/tests/test_lobster.py | Python | mit | 30,467 | [
"pymatgen"
] | 7b8a082065de2fdaccc896758cc8d76f316c2dd0df09542147ee61e7565b3c28 |
"""
Views related to the Custom Courses feature.
"""
import csv
import datetime
import functools
import json
import logging
import pytz
from copy import deepcopy
from cStringIO import StringIO
from django.core.urlresolvers import reverse
from django.http import (
HttpResponse,
HttpResponseForbidden,
HttpR... | shubhdev/openedx | lms/djangoapps/ccx/views.py | Python | agpl-3.0 | 18,738 | [
"VisIt"
] | 7a2c5da5fb20b4b4ab18dee2131dc808785fe94e7bff2ea53def61331dc9a06a |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# This script subtracts the 2D laplacian from an image to enhance the edges.
# Image pipeline
reader = vtk.vtkPNGReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/fullhead1... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Imaging/Core/Testing/Python/LaplacianEdgeEnhance.py | Python | gpl-3.0 | 957 | [
"VTK"
] | 5888bda028e7f218b11e02200a017fdbdd2d48fc897779e327bbe819f4c87003 |
import unittest
import numpy as np
import pysal.lib
import pysal.model.spreg.diagnostics as D
from pysal.model.spreg.twosls_sp import BaseGM_Lag, GM_Lag
from pysal.lib.common import RTOL
import pysal.model.spreg
class TestBaseGMLag(unittest.TestCase):
def setUp(self):
self.w = pysal.lib.weights.Rook.from_s... | lixun910/pysal | pysal/model/spreg/tests/test_twosls_sp.py | Python | bsd-3-clause | 21,993 | [
"COLUMBUS"
] | 32688ad90ba83ebfea05f17b3df03425b1f9cae50bf1099aa4a647fa3fb7d155 |
"""
.. module:: services.py
:platform: Windows, Linux
:synopsis: Represents functions/classes used to control Feature Services,
Feature Service Layer, Map Service, etc...
.. moduleauthor:: Esri
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import... | BrunoCaimar/ArcREST | src/arcrest/agol/services.py | Python | apache-2.0 | 109,489 | [
"VisIt"
] | 24e1e30a83d6b13488e67708af0878ecf0081aa8f89e14b20edba8f03d2e490c |
#!/usr/bin/env python
# Copyright 2014-2021 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... | sunqm/pyscf | pyscf/cc/ccsd_rdm.py | Python | apache-2.0 | 21,091 | [
"PySCF"
] | c38951d7e68092a39d804afc94703f4e69b52da9705d4444b82c3dd2fbe6779a |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi4/psi4 | psi4/driver/qcdb/psiutil.py | Python | lgpl-3.0 | 5,058 | [
"Psi4"
] | 1967ab0a4031af01bfc562c936c204a966def6b8386d4d99d56a88210ab78b3b |
#!/usr/bin/env python
import gym
import gym.spaces
import numpy as np
from PIL import Image
from copy import deepcopy
from collections import OrderedDict
import mujoco_py
from mujoco_py import MjViewer, MujocoException, const, MjRenderContextOffscreen
from safety_gym.envs.world import World, Robot
import sys
# Dis... | openai/safety-gym | safety_gym/envs/engine.py | Python | mit | 72,367 | [
"Gaussian"
] | 9d52a3206648938408c05473eb48f12a78230938ea5c4b9ca878afaab087693c |
""" Compares the performance of the MDI algorithm on time-series with a varying ratio of anomalies. """
import sys
sys.path.append('..')
import numpy as np
import matplotlib.pylab as plt
import argparse, time
from maxdiv import maxdiv, maxdiv_util, preproc, eval
# ensure reproducable results
np.random.seed(0)
def ... | cvjena/libmaxdiv | tools/test_anomaly_ratio.py | Python | lgpl-3.0 | 3,784 | [
"Gaussian"
] | e61cf6fbf1240f158ed04676733ac834c93472b3e583e97027f16e812c7f2b81 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# PCR-GLOBWB (PCRaster Global Water Balance) Global Hydrological Model
#
# Copyright (C) 2016, Ludovicus P. H. (Rens) van Beek, Edwin H. Sutanudjaja, Yoshihide Wada,
# Joyce H. C. Bosmans, Niels Drost, Inge E. M. de Graaf, Kor de Jong, Patricia Lopez Lopez,
# Stefanie Pes... | openstreams/wflow | wflow/pcrglobwb/parameterSoilAndTopo.py | Python | gpl-3.0 | 22,905 | [
"NetCDF"
] | 6f2400acb6c2f0035a738ac8295498d6b95dac413862144fef2e306473633518 |
# -------------------------------------------------------------
#
# 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 unde... | deroneriksson/systemml | src/main/python/systemml/random/__init__.py | Python | apache-2.0 | 1,459 | [
"Gaussian"
] | b513adbcde1acb1f536e0a62ee0afadff7222a0f04dba841522f3b501d8b0682 |
import numpy as np
def noisegen(x,m,sd):
"""This function outputs Gaussian distributed noise for incoming data x
First argument x := the data
Second argument m:= the mean
third argument sd:= the standard deviation of the Gaussian distribution from which it samples"""
noise = (x + np.random.nor... | Ignaola/casimir-programming | peakfinder/noisegenerator.py | Python | mit | 354 | [
"Gaussian"
] | 2aab64d04cd9b8dc20861ec7357ce1101a76c7012c7eaa2589649b6beccaea91 |
import os
import sys
import click
from alembic import command
from alembic.config import Config
from . import app, update_database
from .database import db, session
from .model_helpers import update_names_from_csv
from .models import Assignment, Repo, User
def assert_github_token():
token_name = 'GITHUB_API_TOK... | osteele/assignment-dashboard | assignment_dashboard/commands.py | Python | mit | 3,428 | [
"VisIt"
] | 6a0038b8e6ab6ea163c4e89a6c3ea3bfb75b86618a9a935b2a663ac1076186b5 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Intensity-based image registration
"""
import numpy as np
import scipy.ndimage as nd
from nibabel import Nifti1Image
from .optimizer import configure_optimizer
from .affine import inverse_affine, subg... | alexis-roche/register | register/histogram_registration.py | Python | bsd-3-clause | 22,039 | [
"Gaussian"
] | 711badaa1a6221b89a5e14bfa86a4ecffa6f3e32286be0e3332d232803a6ebe7 |
# $Id$
"""
Workflow Utility module contains a number of functions useful for the
client operations
"""
__RCSID__ = "$Revision: 1.1 $"
from DIRAC.Core.Workflow.Workflow import Workflow
from DIRAC.Core.Workflow.Step import *
def createSingleModuleWorkflow(module,name):
""" Creates a workflow based on a sing... | calancha/DIRAC | Core/Workflow/WF_utilities.py | Python | gpl-3.0 | 1,174 | [
"DIRAC"
] | 7c6bc6b1d11995f5c93758f57cd932f463094ffb396ad9bf21a4d95afb6b59d9 |
#!/usr/bin/env python
# Copyright 2017 Calico LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | calico/basenji | bin/archive/basenji_sadf.py | Python | apache-2.0 | 16,264 | [
"pysam"
] | e08586d03d1328d5b5aeb9c01dac72250c0f37c19e96f5ab8b579948e928d199 |
import unittest
import numpy as np
from pcanet import Patches, PCANet, image_to_patch_vectors
from pcanet import binarize, binary_to_decimal, to_tuple_if_int
from ensemble import most_frequent_label
try:
import cupy as xp
from cupy.testing import assert_array_equal
except ImportError:
import numpy as xp
... | IshitaTakeshi/PCANet | test.py | Python | mit | 6,832 | [
"VisIt"
] | a304bdf9980069f842eeed77dcce739eb6d17e659fb397e248ee56b55a91ce39 |
'''
Provides scenarios for testing the estimation of the parameters (error variances and mean map parameters, which correspond to generalized calibration constants)
For each, three estimation results are reported:
- triple collocation (assumes linear mean maps),
- variational EM algorithm using the triple coll... | szwieback/nlscaling | testScenarios/testEstimation.py | Python | gpl-3.0 | 10,866 | [
"Gaussian"
] | d1581526aa9edfea14aa63436b615c6b4dfd4b072f221e9bfdcfbfd747fa1481 |
from Bio import SeqIO
# sizes = [len(rec) for rec in SeqIO.parse("umbel_all.fasta", "fasta")]
# f = open("seq_length.txt", "w")
# f.write("Length"+"\n")
# for seq in SeqIO.parse("umbel_all.fasta", "fasta"):
# f.write(str(len(seq))+"\n")
# f.close()
# import pylab
# pylab.hist(sizes, bins=20)
# pylab.title("%i Umbel... | Apiaceae/biopython | test.py | Python | gpl-2.0 | 626 | [
"BLAST"
] | bc0edd790b472db4c33d8417830dd9911f3ecec05527b82c0cd8c7323cf3b9c0 |
from numpy.fft import fft, ifft
from .tools import nextpow2
from numpy import real
from spectrum.levinson import LEVINSON
__all__ = ['lpc']
def lpc(x, N=None):
"""Linear Predictor Coefficients.
:param x:
:param int N: default is length(X) - 1
:Details:
Finds the coefficients :math:`A=(1, a(2)... | cokelaer/spectrum | src/spectrum/lpc.py | Python | bsd-3-clause | 2,023 | [
"Gaussian"
] | 7466d289cac16f33b27d4c4a5ed77c4c32971c954ed96d23b708bbac8b5254b6 |
# Sample module in the public domain. Feel free to use this as a template
# for your modules (and you can remove this header and take complete credit
# and liability)
#
# Contact: Brian Carrier [carrier <at> sleuthkit [dot] org]
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is f... | sleuthkit/autopsy | pythonExamples/July2015FileTutorial_BigRound/FindBigRoundFiles.py | Python | apache-2.0 | 6,817 | [
"Brian"
] | 6487d5e0f94cac3f0dfb598780cc72bf48dd50a4f7a803c87c30d2fc647c7ba4 |
import logging
import subprocess
import threading
from kalliope.core.NeuronModule import NeuronModule, MissingParameterException
logging.basicConfig()
logger = logging.getLogger("kalliope")
class AsyncSearch(threading.Thread):
"""
Class used to run an asynchrone Shell command
.. notes:: Impossible to ge... | mrdev023/KALLIOPE_FRENCH_PERSONALISATION | resources/neurons/search/search.py | Python | gpl-3.0 | 2,548 | [
"NEURON"
] | 5cac571f10b92961f411ba3b328cf749a201943b7d8e2b9dce32184b6a8b23ef |
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--group")
args = parser.parse_args()
import yaml
import numpy as np
from lfd import registration, tps
import os.path as osp
tps.VERBOSE=False
np.seterr(all='raise')
np.set_printoptions(precision=3)
def axisanglepart(m):
if np.linalg.det(... | dhadfieldmenell/bootstrapping-lfd | test/run_registration.py | Python | bsd-2-clause | 2,346 | [
"Mayavi"
] | 54605140cb6ab0dd8889b5e2ef9c20bc390d4cd7244cfac01703cd25d8781c5f |
# 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 module provides code to access resources at ExPASy over the WWW.
http://www.expasy.ch... | bryback/quickseq | genescript/Bio/ExPASy/__init__.py | Python | mit | 3,688 | [
"Biopython"
] | a730c8198c224b77b861762c70e432fc39cf70f66d335c597d17f622d2af7b1d |
# -*- coding: utf-8 -*-
#
# Genomics Tutorial documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 19 11:28:35 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated f... | sschmeier/genomics-tutorial | conf.py | Python | mit | 13,833 | [
"BLAST",
"BWA",
"Bowtie"
] | 57df41dc39ed19c485d907cd4fb285bdb6e5b64b54a4bbd8f619973141f39cff |
import sys
import subprocess
import random
import numpy as np
import math
import re
import scipy as sp
import scipy.stats
import chess
import collections
import operator
from chess import uci
from chess import Board
from chess import Move
from chess import syzygy
from numpy import sqrt
from scipy.stats import chi2
from... | lantonov/Rockstar | diffevol.py | Python | gpl-3.0 | 14,383 | [
"Gaussian"
] | add886e0bc49652946cfbca573dd3ab4776c6d9d17565ba9153a095dacecc058 |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Filename: test_vacs.py
# Project: tools
# Author: Brian Cherinka
# Created: Sunday, 15th September 2019 7:56:52 pm
# License: BSD 3-clause "New" or "Revised" License
# Copyright (c) 2019 Brian Cherinka
# Last Modified: Sunday, 15th September 2019 8:15:11 pm
# Modified... | sdss/marvin | tests/tools/test_vacs.py | Python | bsd-3-clause | 1,659 | [
"Brian",
"Firefly"
] | 0ca36facc2f9e4685653565b47aa007d5f9925250a0d50e3c6e9e48d6b803b3a |
## Project by Chris DeLaGarza, Deep Desai, Ryan King, Justin Carter,
##Ryan Jacobs, Zach Gray, Alyssa Rios, Iori Koh, Josh Harlan, Ayush Agarwal,
##Ryan Noeske, Cosme Tejada, Devin Popcock, Serath Mudana, Ryan Vanet, Brian Teh,
##Brett Philips, Ammar Sheikh, Andrew Bryant
##Sense Hat code by Computer Science 3 Class o... | ComputerScience3/piballoon-october-launch-group-2 | Echo Server.py | Python | gpl-3.0 | 7,387 | [
"Brian"
] | 69ec227557f2eb0096069409b7602e82feeb134ec0e5c53d868c04f9166ed95e |
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import os, sys
def open_in_browser(link):
browser = os.environ.get('BROWSER', 'firefox')
child = os.fork()
if child == 0:
# We are the child
try:
os.spawnlp(os.P_NOWAI... | pombredanne/0install | zeroinstall/gui/browser.py | Python | lgpl-2.1 | 464 | [
"VisIt"
] | 66d4ec55f95d2733751326e92f2962436488c692a03337f58ede930a14c77992 |
#!/usr/bin/env python
"""
Tests for the UVar object
"""
from __future__ import (absolute_import, division, print_function)
import os
import numpy as np
import pytest
from gridded.pyugrid.uvar import UVar
from .utilities import chdir
# pytestmark = pytest.mark.skipif(True, reason="gridded does not support UVars an... | NOAA-ORR-ERD/gridded | gridded/tests/test_ugrid/test_uvar.py | Python | unlicense | 2,573 | [
"NetCDF"
] | 693ba2f7bd5ec252b9600984cb02708eabc813ea7535aeda24958c3f94e8a91d |
# -*- coding: utf-8 -*-
"""Some utility functions"""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
import warnings
import logging
import time
from distutils.version import LooseVersion
import os
import os.path as op
from funct... | dgwakeman/mne-python | mne/utils.py | Python | bsd-3-clause | 59,547 | [
"Mayavi"
] | b7336a80685052d25886b768280a576e176c31eb1625d1bf6c843a86fccac161 |
# (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | duncanwp/iris | lib/iris/coords.py | Python | lgpl-3.0 | 81,148 | [
"NetCDF"
] | a55d6103adbce22748576a02662574a656739749262b037ec5de7b8e006535a4 |
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# 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.
# T... | Donkyhotay/MoonPy | zope/app/file/browser/file.py | Python | gpl-3.0 | 17,315 | [
"VisIt"
] | 0678c5bc5b573e5b6d8d889849e3017a6a1cbdd2815f8ca8eca70e6d6628b5e7 |
# context.py - changeset and file context objects for mercurial
#
# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
from node import nullid, nullrev, short
from i18n import _
... | carlgao/lenga | images/lenny64-peon/usr/share/python-support/mercurial-common/mercurial/context.py | Python | mit | 21,456 | [
"VisIt"
] | c77cd18601991fc0329e26e9ae4cf10520140fded2c9410e68815e8e15a24212 |
#!/usr/bin/env python
import tornado.websocket
import tornado.ioloop
import tornado.web
from tornado.options import define, options
import os
import json
import datetime
import socket
import config
root = os.path.dirname(__file__)
hostname = socket.gethostname()
# can be started on a different port using --port=9999 o... | sinoia/net_display | display.py | Python | mit | 3,955 | [
"VisIt"
] | a10c005bd0359724041ed2de5eca42a92e7f4c1a64f66d36f14706c0efddaeec |
#!/usr/bin/env python
from distutils.core import setup
setup(
name='annokey',
version='1.0.2',
author='Bernie Pope',
author_email='bjpope@unimelb.edu.au',
packages=['annokey'],
scripts=['annokey/get_ncbi_gene_snapshot_xml.py'],
entry_points={
'console_scripts': ['annokey = annokey.... | bjpop/annokey | setup.py | Python | bsd-3-clause | 1,244 | [
"Biopython"
] | fa7725183eb4c6b21973156bc51f3f3e1efb1ec316739c050e4db6bf19c43eee |
#
# Copyright (C) 2001 greg Landrum
#
""" unit testing code for the descriptor COM server
"""
from __future__ import print_function
from rdkit import RDConfig
import unittest
import Parser
from win32com.client import Dispatch
from Numeric import *
class TestCase(unittest.TestCase):
def setUp(self):
print('\... | jandom/rdkit | rdkit/ML/Descriptors/UnitTestCOMServer.py | Python | bsd-3-clause | 2,068 | [
"RDKit"
] | 724e7aea9563a569eaf428af9758c21aa492759c5e131c48ebc5807aae05e097 |
from behave import given, when, then
from page_object_models.forms import FormPage
from django.contrib.auth.models import User
from app.models.profile import Profile
from datetime import datetime
@when('the user enters a username not currently in the system')
def enter_new_username(context):
"""
Enter usernam... | Gimpneek/exclusive-raid-gym-tracker | app/features/steps/forms.py | Python | gpl-3.0 | 4,478 | [
"VisIt"
] | 9f60b4d9004b610e22d5eb5d9c53f7a27da167780a2deb50ae39e0cf5815f434 |
"""
This module is based on Steering Behaviors for Autonomous Characters
created by Craig Reynolds and expanded upon by many.
http://www.red3d.com/cwr/steer/
http://www.red3d.com/cwr/papers/1999/gdc99steer.html
http://opensteer.sourceforge.net/
http://www.steeringbehaviors.de/
Seek Class
===========... | buguen/pylayers | pylayers/mobility/transit/SteeringBehavior.py | Python | lgpl-3.0 | 22,698 | [
"Gaussian"
] | 25d3e3e1a49975f62d38f6fde4b176b8e42f4c05e30eb3ae405980cd456f0a4a |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from ..basic_graph_ops import delete_node, disconnect_edge
from .visitors im... | apple/coremltools | coremltools/converters/mil/frontend/tensorflow/tf_graph_pass/cond_to_where.py | Python | bsd-3-clause | 4,384 | [
"VisIt"
] | 43260f5afe2181b70b7712912718a90a8d35c462b5572e4eafca507f661cae9d |
#!/usr/bin/env python
########################################################################
# $HeadURL: svn+ssh://svn.cern.ch/reps/dirac/DIRAC/trunk/DIRAC/AccountingSystem/scripts/dirac-accounting-decode-fileid.py $
# File : dirac-accounting-decode-fileid
# Author : Adria Casajus
################################... | avedaee/DIRAC | AccountingSystem/scripts/dirac-accounting-decode-fileid.py | Python | gpl-3.0 | 1,631 | [
"DIRAC"
] | a4cd95d9ddf3bdb0354302bf0f1543d7de08da7de3f5aa4dc0e86a45d2c8348c |
""" Test parameters """
__author__ = 'Chaya D. Stern'
from torsionfit.tests.utils import get_fn
from torsionfit.backends import sqlite_plus
import torsionfit.parameters as par
from parmed.charmm.parameters import CharmmParameterSet
from parmed.charmm import CharmmPsfFile
import torsionfit.database.qmdatabase as qmdb
... | choderalab/Torsions | torsionfit/tests/test_parameters.py | Python | gpl-2.0 | 3,447 | [
"CHARMM",
"OpenMM"
] | 8e2b285559729024f42e266cc15dcf3d619454ddccadeaf6ff5da9226d5e58cc |
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #
# (c) 2010... | backmari/moose | python/chigger/RenderWindow.py | Python | lgpl-2.1 | 10,628 | [
"MOOSE",
"VTK"
] | 3ed77527de1b6ab26bf979004e63a47bbd19b537a85b3849e8dd3e1b05db7e58 |
"""
AmberTools utilities.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
from collections import OrderedDict
from cStringIO import StringIO
import numpy as np
import os
import shutil
import subprocess
import tempfile
from rdkit import Chem
from v... | rbharath/pande-gas | vs_utils/utils/amber_utils.py | Python | bsd-3-clause | 11,402 | [
"Amber",
"RDKit"
] | 6e66a70fbbfec718328d9739b6382be2fe4439f27943ed4e0754d3b90ecdbc3e |
#! /usr/bin/env python
try:
import wxversion
wxversion.ensureMinimal('2.6')
except ImportError:
pass
from enthought.mayavi.app import Mayavi
import sys
from os.path import isfile
from getopt import getopt, GetoptError
class HdfDisplay(Mayavi):
filename = None
timestep = 0
nx_redu = 0
... | geodynamics/citcoms | visual/mayavi2_citcoms_display.py | Python | gpl-2.0 | 4,159 | [
"Mayavi",
"VTK"
] | 2bb4fd5a1e4d59199a044c4602b84c1f80a549028e5af2c478b2c1d10cfe73ef |
# #
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... | migueldiascosta/easybuild-framework | easybuild/tools/filetools.py | Python | gpl-2.0 | 53,249 | [
"NetCDF"
] | 434be96da28d81ed1262a210eb7d3c998eea8a09ba2b930ecd2cf4b63f810d8a |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-dms | tests/unit/gapic/clouddms_v1/test_data_migration_service.py | Python | apache-2.0 | 193,674 | [
"Octopus"
] | 1c7ad312090ed8ce1636402e96c13517e612f9fec55636536debe4efe99ec859 |
# -*- coding: utf-8 -*-
from .wavelets import sinc
from .wavelets import ricker
from .wavelets import ormsby
from .wavelets import sweep
from .wavelets import rotate_phase
from .kernels import gaussian_kernel
from .kernels import gaussian
from .filters import snn
from .filters import kuwahara
from .filters import con... | agile-geoscience/agilegeo | bruges/filters/__init__.py | Python | apache-2.0 | 481 | [
"Gaussian"
] | 35f7b07fe2883e9de4ffce5c509925e736417b40e4a837eee88a16e8e34e0db6 |
from django.shortcuts import get_object_or_404, redirect
from django.views import generic
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.exceptions import ObjectDoesNotExist
from django import http
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
f... | dongguangming/django-oscar | src/oscar/apps/customer/views.py | Python | bsd-3-clause | 25,871 | [
"VisIt"
] | 76b9418c56fdfe93fe6e58b9695c27af83ae2672654c5f95ceed0a4127f2cea6 |
#Series of functions to parse molecules based on RDKit
import sys
from java import lang
lang.System.loadLibrary('GraphMolWrap')
# Pull it in as a stream of string
from org.RDKit import *
def parse_mol_simple(my_type, txt):
"""Function to parse individual mols given a type"""
if my_type == "mol":
try:
... | InformaticsMatters/squonk | components/rdkit-camel/src/main/python/mol_parsing/rdkit_parse.py | Python | apache-2.0 | 1,529 | [
"RDKit"
] | 5e043eb49aa3d2439676909de79e3e028289b52ed025b37c4c62c5879fc867cb |
# coding: utf-8
from __future__ import unicode_literals
import numpy as np
import unittest
import os
from pymatgen.analysis.structure_analyzer import VoronoiCoordFinder, \
solid_angle, contains_peroxide, RelaxationAnalyzer, VoronoiConnectivity, \
oxide_type
from pymatgen.io.vaspio.vasp_input import Poscar
fr... | Dioptas/pymatgen | pymatgen/analysis/tests/test_structure_analyzer.py | Python | mit | 8,145 | [
"pymatgen"
] | 1c5c03aeb41fc547ba4aa1d964c83375ac286018e372f0f3a08e9b940edba934 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | skosukhin/spack | var/spack/repos/builtin/packages/r-altcdfenvs/package.py | Python | lgpl-2.1 | 2,040 | [
"Bioconductor"
] | b3148065d7d6b5d431dc55a677e6ee0cc4f80167875f355b1491ffe8b269a9a0 |
#!/usr/bin/env python
## \file plot.py
# \brief python package for plotting
# \author T. Lukaczyk, F. Palacios
# \version 4.1.1 "Cardinal"
#
# SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com).
# Dr. Thomas D. Economon (economon@stanford.edu).
#
# SU2 Developers: Pr... | kulkarnimandar/SU2 | SU2_PY/SU2/util/plot.py | Python | lgpl-2.1 | 3,404 | [
"ParaView"
] | d0fc9183e3ccb2d9a4c307d03ab34d093e3b965f2365c12ce38e2690a36d40cf |
#
# Author: Henrique Pereira Coutada Miranda
# Run a BSE calculation using yambo
# one job per q-point for the dielectric function
#
from __future__ import print_function
from multiprocessing import Pool
from yambopy import *
from qepy import *
import multiprocessing
import argparse
import sys
yambo = "yambo"
prefix =... | alexandremorlet/yambopy | tutorial/mos2/bse_par_mos2.py | Python | bsd-3-clause | 3,391 | [
"Yambo"
] | 9d665c59f00b611f7b994f963f40d25c2062bbdc5e251fe2f9c41ffc039f0b99 |
"""The single layer SOINN algorithm procedures, for developers only."""
from numpy import *
import __grouping2 as grouping2
from math import isnan
from pygraph.classes.graph import graph
winner_index = 0
winner_2nd_index = 0
setN = [] #:neuron weights
gr = graph() #:topology structure implemented by python-gr... | sbxzy/pygks | build/lib/pygks/isoinn2.py | Python | bsd-3-clause | 6,961 | [
"NEURON"
] | 3d0104df880fea42e574ad900dd4c75eac4110339c5f7da73df8e6afefe77e8a |
# Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import math
import torch
import torch.nn as nn
from torch.distributions import MultivariateNormal, constraints
import pyro.distributions as dist
from pyro.contrib.timeseries.base import TimeSeriesModel
from pyro.nn import PyroPar... | uber/pyro | pyro/contrib/timeseries/gp.py | Python | apache-2.0 | 23,487 | [
"Gaussian"
] | af754312e1f2355402e225afabe00344d4b7954031a21af76081abf866a1e328 |
import requests
import json
import os
def shorten(url, config):
response = requests.post(
'http://api.adf.ly/v1/shorten',
data={
"url": url,
'_api_key': config['adfly_public_key'],
'_user_id': config['adfly_user_id']
}
)
try:
return json.... | Elishanto/HarryBotter | utils/url_shortener.py | Python | mit | 404 | [
"ADF"
] | 35f21386a77896895dac047b90ce82f177a881329b2f78f985ae006d8a66c6ab |
"""
Robust location and covariance estimators.
Here are implemented estimators that are resistant to outliers.
"""
# Author: Virgile Fritsch <virgile.fritsch@inria.fr>
#
# License: BSD 3 clause
import warnings
import numbers
import numpy as np
from scipy import linalg
from scipy.stats import chi2
from . import empi... | shyamalschandra/scikit-learn | sklearn/covariance/_robust_covariance.py | Python | bsd-3-clause | 33,286 | [
"Gaussian"
] | 128ae2cca0d1e1eb3695036d7c7991d9d9893e7f71b05a06c0a90a49e5415f08 |
#
# QAPI event generator
#
# Copyright (c) 2014 Wenchao Xia
#
# Authors:
# Wenchao Xia <wenchaoqemu@gmail.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.
# See the COPYING file in the top-level directory.
from ordereddict import OrderedDict
from qapi import *
def _generate_event_api_name(ev... | chunyanliu/qemu | scripts/qapi-event.py | Python | gpl-2.0 | 7,193 | [
"VisIt"
] | 100c2f7c40cdffa3920d45236b648641fefec7fb8cc700a4c53229224a63354f |
import pyfftw
import numpy as np
import tomviz.operators
import time
class ReconDFMOperator(tomviz.operators.CancelableOperator):
def transform_scalars(self, dataset):
"""3D Reconstruct from a tilt series using Direct Fourier Method"""
self.progress.maximum = 1
from tomviz import utils
... | cryos/tomviz | tomviz/python/Recon_DFT.py | Python | bsd-3-clause | 4,926 | [
"VTK"
] | bd550bedbcf777039014086dd32754e630cf23af8d6ba586b9ce2a61697448b9 |
#!/usr/bin/env python
'''
Master load script that is driven by a dictionary of campaigns and the
commands that load them. This dictionary also drives the campaigns
served by a deployment of stoqs via the stoqs/campaigns.py file.
Mike McCann
MBARI 5 September 2015
'''
import os
import sys
app_dir = os.path.abspath(o... | stoqs/stoqs | stoqs/loaders/load.py | Python | gpl-3.0 | 46,314 | [
"NetCDF",
"VisIt"
] | 8883cb25a66e79b5c0b456d85df1103546a824f33672e31fdb466dd4a04805b7 |
# -*- coding: utf-8 -*-
from __future__ import print_function
from time import time
import numpy as np
from pykrige.ok import OrdinaryKriging
np.random.seed(19999)
VARIOGRAM_MODELS = ['power', 'gaussian', 'spherical',
'exponential', 'linear']
BACKENDS = ['vectorized', 'loop', 'C']
N_MOVING_WINDOW =... | basaks/PyKrige | benchmarks/kriging_benchmarks.py | Python | bsd-3-clause | 3,496 | [
"Gaussian"
] | 184e01b8e1f7392a17cab25b500ce6ceae8a2bf6220d52fb39bd25e544d6b33a |
# -*- coding: utf-8 -*-
"""
Created on 01/02/2017
@Author: Carlos Eduardo Barbosa
Run pPXF to derive kinematic parameters
"""
import os
import pickle
import numpy as np
import pyfits as pf
import matplotlib.pyplot as plt
from matplotlib import gridspec
from astropy.stats import sigma_clip
from pandas import rollin... | cebarbosa/fossilgroups | run_ppxf.py | Python | gpl-3.0 | 17,941 | [
"Galaxy"
] | b3b7b3b2e8f961910a5887e573224fb5f1da9b0d128cf573927be220f1f20196 |
from grendel.interface.computation import Computation
from grendel.interface.computation_details import ComputationDetails
class PackageInterface(object):
""" Container for the various custom classes needed to run a calculation in a given software package.
"""
##############
# Attributes #
#######... | spring01/libPSI | lib/python/grendel/interface/package_interface.py | Python | gpl-2.0 | 2,304 | [
"Q-Chem"
] | c8ba12ef887dcc99b18b8625bbef3aa290a234070792456b009e02d3084baa63 |
#!/usr/bin/env python
'''
CREATED:2013-02-11 18:37:30 by Brian McFee <brm2132@columbia.edu>
Track beat events in an audio file
Usage: ./beat_tracker.py [-h] input_file.mp3 output_beats.csv
'''
from __future__ import print_function
import argparse
import sys
import librosa
def beat_track(input_file, output_csv... | ebattenberg/librosa | examples/beat_tracker.py | Python | isc | 1,931 | [
"Brian"
] | 4c31576460cb1088e5a829f7052d53860c1a8912244a4f4091d2a6097699a9a5 |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 10 09:18:14 2012
Author: Josef Perktold
"""
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, assert_allclose
from statsmodels.stats.inter_rater import (fleiss_kappa, cohens_kappa,
to_table, aggre... | bashtage/statsmodels | statsmodels/stats/tests/test_inter_rater.py | Python | bsd-3-clause | 12,751 | [
"ASE"
] | d18645555d3175db5b018b8a21f5511b790a3a5dde1b1f279795fee7764dacc4 |
import pytest
import re
class TestHasLink:
@pytest.fixture(autouse=True)
def setup_session(self, session):
session.visit("/with_html")
def test_is_true_if_the_given_link_is_on_the_page(self, session):
assert session.has_link("foo")
assert session.has_link("awesome title")
... | elliterate/capybara.py | capybara/tests/session/test_has_link.py | Python | mit | 1,477 | [
"VisIt"
] | 3ddbe1ce91e9c89b104a56f703e61032d1da968ce71f6306e3bf793d28124a56 |
# This file is part of BHMM (Bayesian Hidden Markov Models).
#
# Copyright (c) 2016 Frank Noe (Freie Universitaet Berlin)
# and John D. Chodera (Memorial Sloan-Kettering Cancer Center, New York)
#
# BHMM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public Licen... | jchodera/bhmm | bhmm/tests/benchmark_hidden.py | Python | lgpl-3.0 | 6,242 | [
"Gaussian"
] | 72ed3277ff11d066e976a5f6c7aa36243f4328f10b613db6b0d968d4c5ef045f |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS.
"""
from flaky import flaky
from textwrap import dedent
from unittest import skip
from nose.plugins.attrib import attr
from bok_choy.promise import EmptyPromise
from ..helpers import (
UniqueCourseTest,
EventsTestMixin,
load_data_str,
generate_... | Shrhawk/edx-platform | common/test/acceptance/tests/lms/test_lms.py | Python | agpl-3.0 | 45,727 | [
"VisIt"
] | 8e7590fdfa806a212e1f5b12f108b781bf4e4322de5d48a22009d0b8d9ff2bdf |
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU
# GPL v2 or later.
"""
example_geodynamic_adiabat
----------------
This example script demonstrates how burnman can be used to
self-c... | sannecottaar/burnman | examples/example_geodynamic_adiabat.py | Python | gpl-2.0 | 14,919 | [
"Gaussian"
] | 443573dbee3956ec5055dfd76e32aa6b603f1820a959a6c7a125f9f76cf10c12 |
import numpy as np
from ase import *
a = 3.60
b = a / 2
cu = Atoms('Cu',
positions=[(0, 0, 0)],
cell=[(0, b, b),
(b, 0, b),
(b, b, 0)],
pbc=1,
calculator=EMT())
e0 = cu.get_potential_energy()
print e0
cu.set_cell(cu.get_cell() * 1.001, scal... | freephys/python_ase | ase/test/emt.py | Python | gpl-3.0 | 1,539 | [
"ASE"
] | 97c19afa744eb763f4c389246387c267c1c81936d797a4736eb65c083a681e3e |
# -*- coding: utf-8 -*-
from __future__ import print_function
"""
Description:
Input: event / site data previously analyzed by photostim
Output:
- per-event probability of being direct / evoked / spont
- per-site probability of having evoked / direct input
- per-cell measurements of direct and presyna... | pbmanis/acq4 | acq4/analysis/modules/MapAnalyzer/MapAnalyzer.py | Python | mit | 42,651 | [
"Gaussian"
] | 84481e8567ca6a6f93e2686139a243bc12ebd4389579002363899b5193857fde |
""" PEP
PEP ( Policy Enforcement Point ) is the front-end of the whole Policy System.
Any interaction with it must go through the PEP to ensure a smooth flow.
Firstly, it loads the PDP ( Policy Decision Point ) which actually is the
module doing all dirty work ( finding policies, running them, merging their
... | DIRACGrid/DIRAC | src/DIRAC/ResourceStatusSystem/PolicySystem/PEP.py | Python | gpl-3.0 | 8,547 | [
"DIRAC"
] | ac958a87d35def03b3387fed84aa0d9a0ab5d62761b595dc6ede064e3270576b |
'''
GenderGenreMod1
Copyright 2016 Brian N. Larson and licensors
GENDER/GENRE PROJECT CODE: Module 1
This code is the first of several segments used to generate the data for the article
Gender/Genre: The Lack of Gendered Register in Texts Requiring Genre Knowledge.
_Written Communication_, 33(4), 360–384. https://doi.... | rhetoricked/WrittenCommunication2016 | Module1.py | Python | gpl-3.0 | 22,840 | [
"Brian"
] | 4a4891b00e5289dea63707a380ceb34b287d0fcd0a01923ee0cd0f6684f128f5 |
# -*- coding: utf-8 -*-
import numpy as np
from scipy.ndimage.measurements import maximum_position, label, find_objects
from scipy.ndimage.morphology import generate_binary_structure
from skimage.measure import regionprops
from skimage.morphology import opening
from candidates import Candidate
from utils import find_cl... | ipashchenko/frb | frb/search.py | Python | apache-2.0 | 16,216 | [
"Gaussian"
] | 2b5328958c9513c35f9f13cc27c627d137ab50a53e0879162d9ebf5cc83f4f08 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import numpy as np
from scipy.interpolate import CubicSpline
from sisl._internal import set_module
import sisl._array a... | zerothi/sisl | sisl/physics/hamiltonian.py | Python | mpl-2.0 | 24,077 | [
"Gaussian"
] | 99358655bb577343d04781940954418d9b0134ea439770283eb805ab68a1f916 |
#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Anders F Bjorklund <afb@users.sourceforge.net>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager 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 Softwar... | 64studio/smart | smart/interfaces/qt4/flags.py | Python | gpl-2.0 | 14,319 | [
"CRYSTAL"
] | 87b934fd470d82fcdafb12579480f99b3557b18dbf9945f588d1b42d955f7265 |
import common
import numpy as np
from cudamat import gnumpy as gp
class Sigmoid(object):
def activate(self, netInput):
return netInput.sigmoid()
def dEdNetInput(self, acts):
return acts*(1-acts)
def error(self, targets, netInput, acts = None):
#return (targets*logOnePlusEx... | gomyway/deeplink | activation.py | Python | gpl-3.0 | 9,034 | [
"Gaussian"
] | 4b124e0ddfe08d1aa287dacd210a2d28921c18f28d501f3c65a6c12691f7ddf2 |
'''
@author: Victor Barrera Burgos
Created on 09 Feb 2014
Description: This script permits the obtention of the
methylation profile of a CpGRegion indicating the
methylation status of each CpG dinucleotide.
Addition on 02 March 2014
Description: permits the obtention of the
methylation profile of the whole genome usi... | vbarrera/thesis | Odd_Methylated_CpG_Identification/Python/MethProfile.py | Python | gpl-2.0 | 5,897 | [
"pysam"
] | 48ca359638a76710b75308fa9f0364cfbd3c378fec6e02869976b27b534de71f |
'''
PathwayGenie (c) University of Manchester 2017
PathwayGenie is licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
from pathway_genie.utils import PathwayThread
from synbiochem.utils.ice_utils import DNAWriter
from synbiochem.ut... | synbiochem/PathwayGenie | ice/ice.py | Python | mit | 1,801 | [
"VisIt"
] | b8c4ff8ee3125684c943a3a73ed588e79657646fadcb987dcaedbe395947b5a1 |
#!/usr/bin/env python3
# Copyright (C) 2013-2018 Florian Festi
#
# 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.... | florianfesti/boxes | boxes/generators/flexbox4.py | Python | gpl-3.0 | 3,865 | [
"FEFF"
] | 211b529ebaf0d8441af90266843a9c612099c521005d6bdf809442ab6b2fbff2 |
"""Data and formats used by _js.py module
to render a graph using cytoscape.js API
"""
from itertools import count
_next_uid = count(1)
next_uid = lambda: next(_next_uid)
def _attrs_to_json(attrs:dict):
return ', '.join(f"'{k}': " + (f"'{v}'" if isinstance(v, str) else str(v)) for k, v in attrs.items())
def JS... | Aluriak/bubble-tools | bubbletools/_js_data.py | Python | gpl-3.0 | 8,762 | [
"Cytoscape"
] | 2f7e1f1b89d420e225d2d0e5ecb35cad3934fe8e436bd37b46baadd600f4d2f1 |
import datetime
import dateutil.parser
import hashlib
import io
import json
import os
import random
import requests
import shutil
import string
import tempfile
import time
import unittest
from utils import generate_rand_string
from OTXv2 import OTXv2, OTXv2Cached, InvalidAPIKey, BadRequest, RetryError, NotFound
import... | AlienVault-Labs/OTX-Python-SDK | tests/test_client.py | Python | apache-2.0 | 58,298 | [
"Amber"
] | 0c0514e50c803dfbcb04cf49a8869bbd9370466b75ddc96ad605ec336efd0bc6 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | kratman/psi4public | psi4/driver/qcdb/pdict.py | Python | gpl-2.0 | 4,568 | [
"Psi4"
] | 74668c73821ae77919d802d4b5e4d60f5470898ea2b12120c608cc75a11cbc93 |
#
# Copyright (C) 2007, Mark Lee
#
# http://rl-glue-ext.googlecode.com/
#
# 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 require... | evenmarbles/rlglued | rlglued/types.py | Python | bsd-3-clause | 3,772 | [
"Brian"
] | 90698503d335d68b2c7ff4a67134af4f5d30fe5c1167c4493fa8fa66481b0ba0 |
import os
import numpy as np
import matplotlib.pyplot as plt
from ase.calculators.jacapo import *
from ase.dft.dos import DOS
class BandStructure:
'''outline of class to facilitate band structure calculations
'''
def __init__(self,
atoms,
BZpath=[],
npoint... | conwayje/ase-python | ase/calculators/jacapo/utils/bandstructure.py | Python | gpl-2.0 | 7,089 | [
"ASE"
] | 720e156cade4c54872c6947ae229dba02822d6b76fcdc63520f6d886bfe29a4b |
#!/usr/bin/env python3
import argparse
from lxml import etree
from pprint import pprint
from lucidSubject import Subject
from lucidQuery import Query
from lucidAlignment import Alignment
import lucidArtist
def parse_BLAST(args):
"""
Selects which parsing method to use. Currently only format supported is XML... | hunter-cameron/Bioinformatics | python/lucidBLAST/BLAST_parser.py | Python | mit | 7,964 | [
"BLAST",
"Biopython"
] | 33907d7aa9f505bfe67c0a62f2347ce0e835ecf8d11acb951f791a682ddfd1b4 |
from lwr.tools.validator import ExpressionValidator
from xml.etree import ElementTree
from os.path import join, abspath, dirname
from io import open
from logging import getLogger
log = getLogger(__name__)
class ToolBox(object):
"""
Abstraction over a tool config file largely modelled after
Galaxy's shed... | jmchilton/lwr | lwr/tools/toolbox.py | Python | apache-2.0 | 5,274 | [
"Galaxy"
] | c2c7dfb61d338f96ea17342624509e09a272e8596519cc4030bab27430b76bea |
"""
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permission to us... | bgoli/pysces | pysces/PyscesContrib.py | Python | bsd-3-clause | 6,369 | [
"PySCeS"
] | 42697c0bb9501c32197cae340a16f3e288ec23640aaefac085b738adb1bfa7ac |
#!/usr/bin/python
# *-* coding: utf-8 *-*
# Author: Thomas Martin <thomas.martin.1@ulaval.ca>
# File: spectrum.py
## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca>
##
## This file is part of ORB
##
## ORB is free software: you can redistribute it and/or modify it
## under the terms of the GNU Gener... | thomasorb/orb | orb/utils/spectrum.py | Python | gpl-3.0 | 28,575 | [
"Gaussian"
] | f60047bff183872adf2958b8a9d327d276382a34ab5d41d01e9d66ab16647fad |
# -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | seckcoder/lang-learn | python/sklearn/sklearn/naive_bayes.py | Python | unlicense | 14,346 | [
"Gaussian"
] | 44a1587e00a18de5190c7b4a28f6725240b249468006e84c5cf27829d44aa915 |
#!/usr/bin/env python
# This code is a direct translation of the Tcl code in
# ImagePlaneWidget.tcl. It could easily be written using a nice class
# to do the job but the present code should definitely make for an
# illustrative example.
# This example demonstrates how to use the vtkImagePlaneWidget
# to probe a 3D ... | naucoin/VTKSlicerWidgets | Examples/GUI/Python/ImagePlaneWidget.py | Python | bsd-3-clause | 10,174 | [
"VTK"
] | 44b56ff1ebb81f99cc94c15f69d2460cb941514576b42b88c8f8c04445ce3c88 |
'''Test the Task data type'''
import pytest
from collections import namedtuple
Task = namedtuple('Task', ['summary', 'owner', 'done', 'id'])
Task.__new__.__defaults__ = (None, None, False, None)
def test_defaults():
'''Using no parameters should invoke defaults'''
t1 = Task()
t2 = Task(None, None, F... | leon-lei/learning-materials | pytest-ex/ch1/tasks/test_three.py | Python | mit | 602 | [
"Brian"
] | 06f84694db57ac268c23b7bc7afc4fa751c3278b6131cd1b4463f86a696acedb |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | numenta/nupic.vision | src/nupic/vision/regions/ImageSensorExplorers/Jiggle.py | Python | agpl-3.0 | 5,979 | [
"VisIt"
] | 21016b268da2044a05d26d6f569742eaa4cba588fcd5eb4c40e7d356c799a883 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS LLP and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import json
from frappe.utils import getdate, cint
from frappe import _
import datetime
from frappe.c... | TRUFIL/erpnext | erpnext/healthcare/doctype/patient_appointment/patient_appointment.py | Python | gpl-3.0 | 11,946 | [
"VisIt"
] | 284189bd0768634576a144b4123913c389b666ec24fc15d0160077a221aa2ca7 |
"""
Main module from which the application is started and the web interface mounted
To start the application directly using the python web server, you can just do
::
python web.py
Refer to server installation documentation for more details how to deploy in production.
"""
from octopus.core import app, initialis... | JiscPER/jper | service/web.py | Python | apache-2.0 | 3,184 | [
"Octopus"
] | 1680bf2e9d71d1eed6b20fd1dafb9f47d205774ff686879b481ef180e9e9aff9 |
# -*- coding: utf-8 -*-
# Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
# Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc.,... | copasi/COPASI | copasi/bindings/python/unittests/Test_CFunctionParameter.py | Python | artistic-2.0 | 2,766 | [
"COPASI"
] | e6e1961c73ff3ee16084ba4eda379bcf6cc6a5bbe09e793a7d1085a936361c27 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-dialogflow | tests/unit/gapic/dialogflow_v2/test_conversation_datasets.py | Python | apache-2.0 | 100,080 | [
"Octopus"
] | 76050aedb426ffe0f29f5b8f265e7119fff72524d15080506cc2885e197ead02 |
import decimal
import json
import math
import re
from collections import defaultdict
from django.db import connection
from django.http import HttpResponse
from catmaid.models import UserRole, Treenode, BrokenSlice, ClassInstance, \
ClassInstanceClassInstance
from catmaid.control.authentication import require... | AdaEne/CATMAID | django/applications/catmaid/control/treenode.py | Python | gpl-3.0 | 22,254 | [
"NEURON"
] | 8c0c426113f6f638812475ed334f6a789e2529343eb78c3ceb0ad6daf58c61b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.