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
#
# Josh Lifton 2004
#
# Permission is hereby granted to use and abuse this document
# so long as proper attribution is given.
#
# This Python script demonstrates how to use the numarray package
# to generate and handle large arrays of data and how to use the
# matplotlib package to generate plots fro... | ryandougherty/mwa-capstone | MWA_Tools/build/matplotlib/lib/mpl_examples/animation/old_animation/movie_demo.py | Python | gpl-2.0 | 5,207 | [
"Gaussian"
] | 89c50cee51a85b5b3f631e9476ca3952a3cbcb269fae185c9b883e01710d422e |
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 31 11:07:20 2014
@author: junz
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
import matplotlib.colors as col
import scipy.ndimage as ni
import tifffile as tf
import ImageAnalysis as ia
import cv2
def get_rgb(colorStr):
'''
get ... | jhyearsley/retinotopic_mapping | retinotopic_mapping/tools/PlottingTools.py | Python | gpl-3.0 | 15,113 | [
"Gaussian"
] | 4bead5da07873fa6e8af3673e092930cba3b8b52ecf2e488e286e72a62e8393c |
#!/usr/bin/env python
#
# Copyright 2013-2015 Matthew Wall, Andrew Miles
# See the file LICENSE.txt for your full rights.
#
# Thanks to Andrew Miles for figuring out how to read history records
# and many station parameters.
# Thanks to Sebastian John for the te923tool written in C (v0.6.1):
# http://te923.fukz.org... | tony-rasskazov/meteo | weewx/bin/weewx/drivers/te923.py | Python | mit | 93,889 | [
"COLUMBUS"
] | 9dad7711cd9de1b4b634a2b2408b4d29fdeae413b60a8ccf06b88e9d0fe21804 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# rmdir - [insert a few words of module description on this line]
# Copyright (C) 2003-2011 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... | heromod/migrid | mig/shared/functionality/rmdir.py | Python | gpl-2.0 | 5,420 | [
"Brian"
] | f1211e1831baa26ea19cb7be316ed8b86f796c43d8231aa7fcb34b23deb01453 |
"""Benchmarking the cfaidx module. Usage::
pytest benchmark/faidx_bench.py
"""
import os
import pysam
from TestUtils import BAM_DATADIR
def iterate_over_fastx(fn, persist=True):
return len(list(pysam.FastxFile(fn, persist=persist)))
def iterate_over_fastx_as_file(fn):
with open(fn) as inf:
return... | kyleabeauchamp/pysam | tests/faidx_bench.py | Python | mit | 2,084 | [
"pysam"
] | 8a5e14424964060cc75f6eb1e075f710aa1091bb5021b21555039710abe9e4e0 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-compile-externals
# Author : Adria Casajus
########################################################################
"""
Compile DIRAC externals (does not require DIRAC code)
"""
__RCSID__ = "$Id$"... | avedaee/DIRAC | Core/scripts/dirac-compile-externals.py | Python | gpl-3.0 | 9,932 | [
"DIRAC"
] | 827b69107987428e292ea96c6b3d64176904c06eaa2d50eb87f4f531a2d7f335 |
#
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3 only, as
# published by the Free Softwar... | graalvm/fastr | mx.fastr/copylib.py | Python | gpl-2.0 | 10,750 | [
"VisIt"
] | 178b9f3cf8b60ffa88db1f8f5d0b8656463bb08b9a100edaf72b7ab2e91bde6b |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2007-2009 Brian G. Matherly
# Copyright (C) 2009-2010 Benny Malengier <benny.malengier@gramps-project.org>
# Copyright (C) 2010 Peter Landgren
# Copyright (C) 2010 Tim Lyons
# Copyright (C) 2... | pmghalvorsen/gramps_branch | gramps/plugins/docgen/htmldoc.py | Python | gpl-2.0 | 22,694 | [
"Brian"
] | b209c64be063fb5ae38078c7c73894dd7e453b14bae35a58d30ea596b658e21e |
# LAMMPS Documentation Utilities
#
# Copyright (C) 2015 Richard Berger
#
# 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.... | rbberger/lammps-doc-utils | tests/test_lammps_filters.py | Python | gpl-3.0 | 2,219 | [
"LAMMPS"
] | 9f57017d704f22f32d097ddb0977585ec60540def969e00a4ed4a49a1e25f40a |
# -*- coding: utf-8 -*-
from kivy.app import App
from kivy.core.text import LabelBase
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.metrics import dp
from kivy.properties import OptionProperty, AliasProperty, ObjectProperty, \
StringProperty, ListProperty, BooleanProperty
from kivy.uix.... | PeterSurda/PyBitmessage | src/kivymd/theming.py | Python | mit | 12,806 | [
"Amber"
] | 9dcc568d5f1aea21c7e0d1ef40cbd1422ecba23e743aece79246052c0bcd201b |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
import vtk
def main():
colors = vtk.vtkNamedColors()
# Create a triangle
points = vtk.vtkPoints()
points.InsertNextPoint(1.0, 0.0, 0.0)
points.InsertNextPoint(0.0, 0.0, 0.0)
points.InsertNextPoint(0.0, 1.0, 0.0)
triangle = vtk.vtkTriangle()... | lorensen/VTKExamples | src/Python/GeometricObjects/Triangle.py | Python | apache-2.0 | 1,528 | [
"VTK"
] | f34ed31e53710fc5e607a8b754cb27a9140ff854c9d3ed52bdc2f2a88104622e |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RMsnbase(RPackage):
"""Base Functions and Classes for Mass Spectrometry and Proteomics.
... | rspavel/spack | var/spack/repos/builtin/packages/r-msnbase/package.py | Python | lgpl-2.1 | 2,696 | [
"Bioconductor"
] | 994b6b35fef1e01a5aa055baf58ce65b5cb8722da385e58e7a23156bc8011b9f |
"""
pyNEAT
Copyright (C) 2007-2008 Brian Greer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in ... | liquidkarma/pyneat | pyNEAT/__init__.py | Python | gpl-2.0 | 1,099 | [
"Brian"
] | 4eb87093396979e9d652a69d0725842f32e8a04e8bde6c6d3716496abd393473 |
"""
Acceptance tests for the certificate web view feature.
"""
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.certificates import CertificateConfigFixture
from common.test.acceptance.fixtures.course import CourseFixture, CourseUpdateDesc, XBlockFixtureDesc
from common.test.acceptance.pages.c... | procangroup/edx-platform | common/test/acceptance/tests/lms/test_certificate_web_view.py | Python | agpl-3.0 | 10,052 | [
"VisIt"
] | 49045428d4dfbc2f83dec9970cb0110d2f9db21c7116ecc9bac406c423dc721e |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FlatValue.indicator_slug'
db.add_column(u'profiles_flatvalue', 'indicator_slug', self.gf('... | ProvidencePlan/Profiles | communityprofiles/profiles/oldmigrations/0063_auto__add_field_flatvalue_indicator_slug__add_field_flatvalue_geograph.py | Python | mit | 22,049 | [
"MOE"
] | e93ea0e88cac760473979ef2263990a3f1436fad57b8f439b20cb7b95eb1ad5d |
#
# @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
#... | lothian/psi4 | psi4/share/psi4/databases/BBI.py | Python | lgpl-3.0 | 150,765 | [
"Psi4"
] | 82b151d56e098bd140917ae3b573dca902b1cb6cab5680727f2fca8f180268ba |
'''Unit test for roman1.py
This program is part of 'Dive Into Python 3', a free Python book for
experienced programmers. Visit http://diveintopython3.org/ for the
latest version.
'''
import roman7
import unittest
class KnownValues(unittest.TestCase):
known_values = ( (1, 'I'),
(2, 'II'),
... | ctasims/Dive-Into-Python-3 | examples/romantest7.py | Python | mit | 6,304 | [
"VisIt"
] | de1a5de9e96fd75614d3b7fef435606f62498100d52aa09758bb504a453ef192 |
"""
desispec.workflow.batch: utilities for working with slurm batch queues
"""
import os
from pkg_resources import resource_filename
import yaml
from desiutil.log import get_logger
def get_config(name):
"""
Return configuration dictionary for system `name`
Args:
name (str): e.g. cori-haswell, co... | desihub/desispec | py/desispec/workflow/batch.py | Python | bsd-3-clause | 1,794 | [
"DIRAC"
] | 243712187de286b2c81243a48a341037e83fd4cdd3bba2646965f285c2b3192b |
"""
This module implements the main Custodian class, which manages a list of jobs
given a set of error handlers, the abstract base classes for the
ErrorHandlers and Jobs.
"""
import datetime
import logging
import os
import subprocess
import sys
import tarfile
import time
import warnings
from abc import abstractmethod
... | materialsproject/custodian | custodian/custodian.py | Python | mit | 35,948 | [
"VASP"
] | f4efcce6232a62810186e388b02bb1196943452303770dd514a458518d7c1898 |
# Copyright (C) 2018 Henrique Pereira Coutada Miranda, Alejandro Molina Sanchez
# All rights reserved.
#
# This file is part of yambopy
#
from __future__ import print_function, division
import os
import re
from math import sqrt
import numpy as np
from qepy.auxiliary import *
eVtocm1 = 8065.54429
cm1toeV = 1.0/eVtocm1
... | alexmoratalla/yambopy | qepy/dynmat.py | Python | bsd-3-clause | 1,676 | [
"Quantum ESPRESSO"
] | 79adcf66e5fedd9c904b73f37a8fb9b24de4e58c2ac704d0cfec588c2c2bf17e |
"""
conversion/sonata.py
Functions to import/export to SONATA format
Contributors: salvadordura@gmail.com
"""
import os
import sys
try:
import tables # requires installing hdf5 via brew and tables via pip!
from neuroml.hdf5.NeuroMLXMLParser import NeuroMLXMLParser
from neuroml.loaders import read_neuro... | thekerrlab/netpyne | netpyne/conversion/sonataImport.py | Python | mit | 52,559 | [
"NEURON"
] | 0fb3dcbd4d72eb1de96f1ba0722655e6b175f25fea8beb6cc595c12e4e93189a |
"""
Test functions for multivariate normal distributions.
"""
from __future__ import division, print_function, absolute_import
from numpy.testing import (
assert_allclose,
assert_almost_equal,
assert_array_almost_equal,
assert_equal,
assert_raises,
run_module_suite,
)
from test_continuous_bas... | jsilter/scipy | scipy/stats/tests/test_multivariate.py | Python | bsd-3-clause | 24,306 | [
"Gaussian"
] | b01ac243f0eff331db28cd09640b86d3d72883fde5d04d154563b017f6ac4699 |
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import numpy as np
def gaussian_filter(data, sigma):
"""
Drop-in replacement for scipy.ndimage.gaussian_filter.
(note: results are only approxima... | Eric89GXL/vispy | vispy/util/filter.py | Python | bsd-3-clause | 1,397 | [
"Gaussian"
] | 43375dbcced11e3a039eb583a7c621ed72553ac02c2ed29c376d1c101442de69 |
# coding=utf-8
import logging
import re
from typing import Union
from . import presence
from .exceptions import IdMissing, AmberException
from .events import EventManager
from .utils import get_attribute_values
log = logging.getLogger(__name__)
def _get_amber():
if not presence.is_in_world("amber"):
rai... | DefaltSimon/Amber | amber/engine/types_.py | Python | mit | 18,294 | [
"Amber"
] | 41a588dc62a085e2cd649024acb94a0b87a39475e81d873f83e6204c2a974ae9 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fileencoding=utf-8
import math
import argparse
class CGError(Exception):
'''An error in the convolution kernel generator.'''
def __init__(self, desc):
super().__init__(desc)
class CGBadArg(CGError):
'''An exception indicating an invalid argum... | frantic1048/Vanilla | bin/bin/compton-convgen.py | Python | mit | 4,636 | [
"Gaussian"
] | 54f7d6dd1a91505f742fbce7ab62534900c86db43d223bccb1d90ebe2495e658 |
import os
import sqlite3
from collections import OrderedDict
from numpy.random import random, seed
import numpy, json
from lsst.sims.utils import ObservationMetaData
from lsst.sims.catalogs.generation.db import CatalogDBObject
from lsst.sims.utils import _raDecFromAltAz, _getRotSkyPos, _getRotTelPos, Site, \
... | lsst/sims_catalogs_generation | python/lsst/sims/catalogs/generation/utils/testUtils.py | Python | gpl-3.0 | 22,491 | [
"Galaxy"
] | d7454444a5c7bb2f863ee30e574edc549c6fc9438cc2f58456941e392be54722 |
"""
Detect and handle peaks and troughs as well as threshold crossings in data arrays.
## Peak detection
- `detect_peaks()`: peak and trough detection with a relative threshold.
- `peak_width()`: compute width of each peak.
- `peak_size_width()`: compute for each peak its size and width.
## Threshold crossings
- `t... | tillraab/thunderfish | thunderfish/eventdetection.py | Python | gpl-3.0 | 53,653 | [
"Gaussian"
] | 553b9b05782c993d39bc0f902c1643fa997dc65cf857d3bfbada98873ca4cd85 |
#! /usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright 2007-2011 Olivier Schwander <olivier.schwander@ens-lyon.org>
Copyright 2009-2011 Walther Maldonado <walther.md@gmail.com>
Copyright 2011 Bart Nagel <bart@tremby.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the ... | tremby/mpn | mpn.py | Python | gpl-2.0 | 33,812 | [
"Gaussian"
] | 2ca3373228ae159ef923b9965dc9c8b7255b99513c0147eb05d16a7442d55cde |
#!/usr/bin/env python
"""Render VTK Polydata and view or save PNG or save WebGL.
When an output PNG or WebGL file is not specified, an interactive windows is
displayed. To get the camera position from the interactive window, press the
"c" key.
"""
import argparse
import sys
import vtk
def three_floats(value):
... | InsightSoftwareConsortium/ITKExamples | Utilities/Visualization/VTKPolyData.py | Python | apache-2.0 | 4,527 | [
"VTK"
] | d1f2ffd1ad8a8bb15d1a7969b328e18235e6bf9a916bf791436af2e92c751be2 |
"""Test fixtures."""
import lxml
import yaml
import pytest
from napalm_base.test import conftest as parent_conftest
from napalm_base.test.double import BaseTestDouble
from napalm_junos import junos
@pytest.fixture(scope='class')
def set_device_parameters(request):
"""Set up the class."""
def fin():
... | pshemk/napalm-junos | test/unit/conftest.py | Python | apache-2.0 | 5,340 | [
"Firefly"
] | ec5972f3b79cd7c999341ad07baf669df644f23512d9a69f8d221a492fc2dfa0 |
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | Multiscale-Genomics/mg-process-fastq | tests/test_bwa_indexer.py | Python | apache-2.0 | 4,426 | [
"BWA"
] | 740952b02c711833b731de20039bffea8c9202f9b37231ad49086e1e00001886 |
import random, math, pylab, mpl_toolkits.mplot3d
x_list, y_list, z_list = [], [], []
nsamples = 1000
for sample in xrange(nsamples):
x_list.append(random.gauss(0.0, 1.0))
y_list.append(random.gauss(0.0, 1.0))
z_list.append(random.gauss(0.0, 1.0))
# begin graphics output
fig = pylab.figure()
ax = fig.gca(pr... | vinhqdang/my_mooc | MOOC-work/coursera/FINISHED/Statistical Mechanics Algorithms and Computations/Week 4/programs_lecture_4/gauss_3d_movie.py | Python | mit | 605 | [
"Gaussian"
] | 60de66954d17985f1533f7557c5e885c4f61c53e593580389b9b76b395868802 |
# -*- coding: utf-8 -*-
'''
diacamma.condominium tests package
@author: Laurent GAY
@organization: sd-libre.fr
@contact: info@sd-libre.fr
@copyright: 2015 sd-libre.fr
@license: This file is part of Lucterios.
Lucterios is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | Diacamma2/syndic | diacamma/condominium/tests_expense.py | Python | gpl-3.0 | 121,593 | [
"Dalton"
] | a60486123c22c0d1a3caa82626a10394b99af59ad42c03f593ee93f3f0a2176a |
# Copyright 2020 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 agreed to in writing, ... | google-research/graph-attribution | tests/test_tasks.py | Python | apache-2.0 | 6,364 | [
"RDKit"
] | f7d7b429de697ecb015f551e92eca0e4da0a16a2ce7d3bb4202633be58b38a9e |
import espressopp
from espressopp import Int3D, Real3D
from espressopp.tools import decomp
from espressopp.tools.init_cfg import lattice
import random
import sys
print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
print "+ Due to a recent change in the design of ESPResSo++ the Par... | capoe/espressopp.soap | examples/parallel_tempering/parallel_tempering.py | Python | gpl-3.0 | 3,278 | [
"ESPResSo"
] | ff5ea924dbd9c3552944de0def28ca6daa4769a405d9faee2d6ad46b080a0bee |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | V155/qutebrowser | scripts/dev/pylint_checkers/qute_pylint/config.py | Python | gpl-3.0 | 2,838 | [
"VisIt"
] | 226e08913b4a686adc7ff7167d23a88885dd37dccf959b409fbac7a2b1706762 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2010 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Softw... | andrebellafronte/stoq | stoqlib/gui/wizards/consignmentwizard.py | Python | gpl-2.0 | 10,658 | [
"VisIt"
] | e1313bac4b72b59881bbf11e816c10d690f41dc4881e80585aaf445b8972b201 |
#!/usr/bin/env python
from __future__ import print_function
import os
import glob
import libRun as LR
def build_cmd(patch, configFile, filt, input, output):
if not os.path.isdir("scripts/" + filt):
os.makedirs("scripts/" + filt)
cmd = "mv "+ patch + " scripts/" + filt
os.system(cmd)
cmd = ... | DarkEnergyScienceCollaboration/ReprocessingTaskForce | scripts/run_measureCoaddSources.py | Python | gpl-2.0 | 1,724 | [
"VisIt"
] | a9cb836cc2d5f89837196d26f2005da105ed97d880f4b26bbe8c2d0490747f2d |
#!/usr/bin/env python
""" Clean a tranformation
"""
from __future__ import print_function
import sys
from DIRAC.Core.Base.Script import parseCommandLine
parseCommandLine()
from DIRAC.TransformationSystem.Agent.TransformationCleaningAgent import TransformationCleaningAgent
from DIRAC.TransformationSystem.Client.T... | fstagni/DIRAC | TransformationSystem/scripts/dirac-transformation-clean.py | Python | gpl-3.0 | 895 | [
"DIRAC"
] | e4c1398abce20cc4f11b5186482fa15297a4240925b69840afe81e055be333ad |
"""Main entry point for distributed next-gen sequencing pipelines.
Handles running the full pipeline based on instructions
"""
from __future__ import print_function
from collections import defaultdict
import copy
import os
import sys
import resource
import tempfile
import toolz as tz
from bcbio import log, heterogen... | a113n/bcbio-nextgen | bcbio/pipeline/main.py | Python | mit | 26,813 | [
"Bowtie"
] | a7ab336515d72e336029226a6d552246e6fcd6aa2c0c34c3bcee1b939cc30086 |
from __future__ import division, print_function
import math
from sklearn import datasets
import numpy as np
from mlfromscratch.utils import normalize, euclidean_distance, calculate_covariance_matrix
from mlfromscratch.utils import Plot
class GaussianMixtureModel():
"""A probabilistic clustering method for determ... | eriklindernoren/ML-From-Scratch | mlfromscratch/unsupervised_learning/gaussian_mixture_model.py | Python | mit | 4,723 | [
"Gaussian"
] | f850d84f531af65ab40e312f0f469b8efb2dae9bd3435a06e4214ebaf75d0282 |
#### PATTERN | DE | INFLECT ########################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2012 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
######################################################... | decebel/dataAtom_alpha | bin/plug/py/external/pattern/text/de/inflect/__init__.py | Python | apache-2.0 | 27,922 | [
"ASE"
] | 3e246ce281af14275a23b50ac9b1da2462dd28e4ae403362ee466e90a86b6205 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005, 2006 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Sof... | tiagocardosos/stoq | stoqlib/enums.py | Python | gpl-2.0 | 2,678 | [
"VisIt"
] | d6fb51bbfe57a92fea9ce085701d821c444f9c673d063aff85c483825b67161e |
#
# line fitting program
#
import numpy as np
from scipy.integrate import quad
from scipy.special import gammaln
import pymc
def ln_poisson(lam, k):
"""
Log of the Poisson distribution
:param lam:
:param k:
:return: log of the Poisson distribution
"""
return k*np.log(lam) - lam - gammaln(k... | wafels/linefit | lf.py | Python | gpl-2.0 | 2,953 | [
"Gaussian"
] | 15bc8c1cc9e9a5830813fb2cd753b0dfc6481c4ead9f50bb4564ec7d69e3e4b9 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 Red Hat, Inc.
# This file is part of python-fedora
#
# python-fedora 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 Lice... | AdamWill/python-fedora | fedora/tg/identity/jsonfasprovider1.py | Python | gpl-2.0 | 10,987 | [
"VisIt"
] | 9295d8cc20b9e8496867e59676f2df1ec0eb9284381080bbb8e94b9057277c0d |
#!/usr/bin/env python
import pprint
import re
import os, sys
import unittest
sys.path[0:0] = ['.', '..']
from pycparser import c_parser
from pycparser.c_ast import *
from pycparser.c_parser import CParser, Coord, ParseError
_c_parser = c_parser.CParser(
lex_optimize=False,
yacc_debug... | dsjohns2/CS-241-Honors-Project | File_Encoder/parser/pycparser/tests/test_c_parser.py | Python | mit | 65,074 | [
"MOE",
"VisIt"
] | a50e716c2878f91e642436955f3cc2bc673c57f95562a6641fb9b8efb73f28ad |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
# Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk>
# Copyright (C) 2007-2009 Stephane Charet... | sam-m888/gramps | gramps/plugins/webreport/person.py | Python | gpl-2.0 | 92,286 | [
"Brian"
] | 34223d489cb9e2ac29a982a94597405fb3968be7b62d7ca0113b6bad1110ebe9 |
#!/usr/bin/env python
# Demonstrate how to use the vtkBoxWidget to translate, scale, and
# rotate actors. The basic idea is that the box widget controls an
# actor's transform. A callback which modifies the transform is
# invoked as the box widget is manipulated.
import vtk
# Start by creating some simple geometry;... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Examples/GUI/Python/TransformWithBoxWidget.py | Python | gpl-3.0 | 2,183 | [
"VTK"
] | 8db1387f9b0929eff73bc3adb7c12ac2f9d04f3d8db6180b275f0e5049a2224f |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
# Copyright 2010 Joanmarie Diggs, Mesar Hameed
#
# 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, ... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/orca_state.py | Python | gpl-3.0 | 2,292 | [
"ORCA"
] | 4141403ca8b95d9ce27f130465c6c47d1dd900f19c4c2650d9ecc25370cb2ec3 |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/editors/localfileeditor.py | Python | gpl-2.0 | 4,826 | [
"VisIt"
] | 5a34ba3b7c822429d2f23ebe81e14f29629f4ec2e518dc32f89268a6e5334d56 |
#execfile("Dark_Money_2012_Munging.py")
# In[247]:
from pandas.stats.api import ols
res = ols(y=issues_all_df['Percentage_of_Vote'], x=issues_all_df[['Rate', 'Spt/Week']])
res
# In[248]:
issues_all_df[['Rate', 'Number_of_Wks', 'Spt/Week', 'Total_Spots', 'Total_Dollars', 'Length_in_Sec', 'AM', 'PM',
... | aglorios/dark_money_predictions | Dark_Money_2012_Analysis.py | Python | apache-2.0 | 15,453 | [
"Gaussian"
] | dbfb5894084c278e638ec17a2170b29b6f823464ad545626e9a10c9e93ddd0f7 |
"""
===========================================
Sparse coding with a precomputed dictionary
===========================================
Transform a signal as a sparse combination of Ricker wavelets. This example
visually compares different sparse coding methods using the
:class:`sklearn.decomposition.SparseCoder` esti... | vortex-ape/scikit-learn | examples/decomposition/plot_sparse_coding.py | Python | bsd-3-clause | 4,216 | [
"Gaussian"
] | d955e681630310a3f35840fd391356f61afb14120695b7c3ff8473b0cd0a9557 |
"""Test the Transformationinfo."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import OrderedDict
from contextlib import contextmanager
import pytest
from mock import MagicMock as Mock, patch
from DIRAC import S_OK, S_ERROR
import DIRA... | ic-hep/DIRAC | src/DIRAC/TransformationSystem/test/Test_TransformationInfo.py | Python | gpl-3.0 | 15,551 | [
"DIRAC"
] | 2643d6b6b90ab65140d106da58844312b80c6f9634ed6c0f7775cdb0d50c221c |
import os
import re
from string import Template
from galaxy.util import sanitize_text
# extra mappings/escape to keep users from traversing around the
# filesystem and wreaking havoc
extra_mappings = { r"/": "__fs__", r"^manifest.tab$": "__manifest.tab__" }
def sanitize_name( name ):
name = sanitize_text( name )
... | dbcls/dbcls-galaxy | lib/galaxy/tracks/store.py | Python | mit | 2,937 | [
"Galaxy"
] | e8596d90e559468cdb10173eb2645c9a32703cf6d46613caabc5518bcd1dcdd6 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""Tools for the submission of Tasks."""
from __future__ import unicode_literals, division, print_function
import os
import time
import yaml
import pickle
from collections import deque
from datetime import tim... | migueldiascosta/pymatgen | pymatgen/io/abinit/launcher.py | Python | mit | 45,725 | [
"ABINIT",
"pymatgen"
] | 0d5ab2bcc1f57b7f2182e3d2c3dc12fe855639b90b7965032289205dabd7facd |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rdkit
from rdkit.Chem import AllChem
from rdkit import DataStructs
__license__ = "X11"
METADATA = {
"id": "method_rdkit_ecfp4_1024_tanimoto",
"representation": "ecfp4_1024",
"similarity": "tanimoto"
}
def _compute_fingerprint(molecule):
return Al... | skodapetr/lbvs-environment | methods/ecfp/ecfp4_1024_tanimoto.py | Python | mit | 1,396 | [
"RDKit"
] | 9b4cc978e1f5ce99a9b94501df4502ef16f427876a208689839346e7e7d6d7d0 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2014 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | andrebellafronte/stoq | stoqlib/gui/test/test_base_wizards.py | Python | gpl-2.0 | 3,242 | [
"VisIt"
] | f79e642dea1e8bb528ad99db04423f710865f23d87a436061b2eb0d5562effc8 |
# Copyright 2008 Brian Boyer, Ryan Mark, Angela Nitzke, Joshua Pollock,
# Stuart Tiffen, Kayla Webley and the Medill School of Journalism, Northwestern
# University.
#
# This file is part of Crunchberry Pie.
#
# Crunchberry Pie is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | brianboyer/newsmixer | pie/views.py | Python | gpl-3.0 | 2,528 | [
"Brian"
] | 5d73b2627303cd2df2484b0b50199bbe4b5391b213e473c05f2a81bea50604d9 |
# Copyright (c) 2012-2015 The GPy authors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from scipy import stats,special
import scipy as sp
from . import link_functions
from ..util.misc import chain_1, chain_2, chain_3, blockify_dhess_dtheta, blockify_third, blockify_h... | mikecroucher/GPy | GPy/likelihoods/likelihood.py | Python | bsd-3-clause | 31,107 | [
"Gaussian"
] | 81ae01cae6c5bb52daf77a877c657090dd5351ffad4d8975945779e7483b0914 |
import numpy as np
def affine_forward(x, w, b):
"""
Computes the forward pass for an affine (fully-connected) layer.
The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N
examples, where each example x[i] has shape (d_1, ..., d_k). We will
reshape each input into a vector of dimension D = ... | machinelearningnanodegree/stanford-cs231 | solutions/vijendra/assignment2/cs231n/layers.py | Python | mit | 25,365 | [
"NEURON"
] | 539039fcefb4be87f41716ed4b408cf106486a34aaaa5679e41e990a8bab5ff8 |
from netCDF4 import Dataset
from pyproj import Proj
from rasterio.enums import Resampling
from trefoil.netcdf.utilities import data_variables
from trefoil.netcdf.warp import warp_like
template_ds = Dataset('../test_data/ca_ru_1km.nc')
template_variable_name = 'data'
# ds = Dataset('../test_data/tmin.nc')
ds = Datas... | consbio/clover | trefoil/examples/warp_example.py | Python | bsd-3-clause | 783 | [
"NetCDF"
] | 69bbaf78b02072d9d27798a848a7d5f30448411b169540ab19f0ab0560221bb4 |
from __future__ import print_function
import json
import os
import os.path
import re
import sys
import warnings
from collections import defaultdict
from distutils.command.build_scripts import build_scripts as BuildScripts
from distutils.command.sdist import sdist as SDist
try:
from setuptools import setup, find... | aperigault/ansible | setup.py | Python | gpl-3.0 | 11,734 | [
"Galaxy"
] | 2ccec73a9295e5b302a035d355da067857aa18d38782ac2eb6789fd901abd2de |
# Copyright (c) 2012 OpenStack Foundation.
#
# 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... | Brocade-OpenSource/OpenStack-DNRM-Neutron | neutron/tests/unit/test_policy.py | Python | apache-2.0 | 22,743 | [
"BLAST"
] | 9b969798fbb0fa199ce9b8a9d685f4d7eca750a10b606b3cb051ad8b2ed9e1fe |
#pylint: disable=C0111
#pylint: disable=W0621
from lettuce import world
import time
import json
import platform
from textwrap import dedent
from urllib import quote_plus
from selenium.common.exceptions import (
WebDriverException, TimeoutException, StaleElementReferenceException)
from selenium.webdriver.support im... | heran7/edx-platform | common/djangoapps/terrain/ui_helpers.py | Python | agpl-3.0 | 15,703 | [
"VisIt"
] | a9d8323b0255ae9bafe7c8a11d5bb0a76ed1c4de449e542076acced5cb38d39f |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | modules/stochastic_tools/python/make_histogram.py | Python | lgpl-2.1 | 3,315 | [
"MOOSE"
] | 5fa5723915001aeb87f7b45846bbcde78883d9c0d8dc498361428a92af7d037a |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
(... | marcsowen/homematicip-rest-api | versioneer.py | Python | gpl-3.0 | 68,752 | [
"Brian"
] | 4f419840fab14b0b31c378792c1793f4ac50a6a6b5a79b47b91cb5c2a369e8fc |
#!/usr/bin/python
"""
Copyright 2010 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of th... | druss316/G-Harvestor | html/changeFriend.py | Python | gpl-3.0 | 3,165 | [
"Galaxy"
] | 5803731211060bc7f93db56743a9480cfbf5cecc2a7a370e4843904ec55fa942 |
"""
SeqRecord formatter.
"""
class SeqRecordFormatter(object):
"""Formatter for BioPython SeqRecord objects"""
def __init__(self, theme):
"""Creates a new SeqRecordFormatter instance"""
from cats.styles.sequence import SequenceFormatter
# Load sequence formatter
self.seq_formatt... | khughitt/cats | cats/formatters/seqrecord.py | Python | bsd-2-clause | 2,834 | [
"Biopython"
] | 1b1fc8fe7890e81c84f499bdc5f40e53d9c052c22a28ad0f8f88f9012480df60 |
#!/usr/bin/env python
import unittest
import os
import tempfile
import shutil
from bones import *
from bones.sequence import random_sequence
from bones.utils import temp_filename
from bones.fast import FastA
class TestConsensus(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()
... | vishnubob/bones | tests/test_consensus.py | Python | mit | 1,715 | [
"BWA"
] | 894f8c5440135c994c02156d3abd98ea3a33a6a1d6190e58faf41b76ff4e2129 |
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | VisTrails/VisTrails | vistrails/packages/vtk/tf_widget.py | Python | bsd-3-clause | 29,762 | [
"VTK"
] | c21bf000112cb3e3c4c3781821693b040ca7af0dd3a505b373ae24650ca788d0 |
################################################################################
# Copyright (C) 2015 Hannu Hartikainen, Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Tests for the module bayespy.plot.
This file m... | SalemAmeen/bayespy | bayespy/tests/test_plot.py | Python | mit | 4,916 | [
"Gaussian"
] | 420cf811a99408f59a7660b92d32f83d74daf26bf627dd812b275a737455510f |
from views import *
from lookups import *
import requests
import re
from utils import *
import itertools
from config import config
if config.IMPORT_PYSAM_PRIMER3:
import pysam
import csv
#hpo lookup
import orm
@app.route('/individual_json/<individual>')
@requires_auth
def individual_json(individual):
db=get_d... | logust79/phenopolis | views/individual.py | Python | mit | 19,449 | [
"pysam"
] | 7323a997abd4f7635615f3897ec3ab7b810a2f3771f7a1fa4fe8c4979a93dd44 |
#!/usr/bin/env python
# to run the script with the correct version of uvcdat:
# source /usr/local/uvcdat/1.4.0/bin/setup_runtime.sh
import cdms2
from cdms2 import MV2
import numpy
import glob
import sys
import os
from os import path
import re
import string
import random
import gc
import logging
import logging.handle... | IOC-CODE/esgf_ensemble_mean | ensemble_stats/bin/make_ensembleMean_tyx.py | Python | gpl-2.0 | 23,651 | [
"NetCDF"
] | a1890bcd0c38c6e6f31b0bc66e5efc75f091e5b2dcc0e2202026360e20f70fcb |
#
# Copyright 2008-2012 NVIDIA Corporation
# Copyright 2009-2010 University of California
#
# 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/L... | frgomes/copperhead | copperhead/compiler/rewrites.py | Python | apache-2.0 | 34,099 | [
"VisIt"
] | 0f8cc1d4dc0a9ae7752f995709b57d887abff429e7ee8183113ae3688da4ce3d |
# 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/.
try:
from StringIO import StringIO
except Exception:
from io import StringIO
import numpy as np
from numpy impo... | zerothi/sisl | sisl/io/tbtrans/se.py | Python | mpl-2.0 | 11,969 | [
"SIESTA"
] | 063cfd5741e3b16a6280c58fc6b698e124720080c71932b3fc00e40392e3c371 |
"""F-test for common linear predictors."""
import numpy as np
from scipy import stats
import pandas as pd
def f_test(model_full, sub_models):
"""
F-test for common linear predictors.
Performs an F-test for common linear predictors between model_full
and the combined sub_models. The idea is described... | JonasHarnau/apc | apc/f_test.py | Python | gpl-3.0 | 3,744 | [
"Gaussian"
] | 25e85630e4ecf92ac3820d0c5ade4ce8bc6ad582c8e02c862f9812fac5777a4e |
# $Id$
#
# Copyright (C) 2005 greg Landrum and Rational Discovery LLC
# All Rights Reserved
#
import gzip
import os
import unittest
from rdkit import RDConfig
from rdkit.DataStructs import ExplicitBitVect
from rdkit.DataStructs.VectCollection import VectCollection
from rdkit.ML import InfoTheory
from rdkit.ML.DecT... | bp-kelley/rdkit | rdkit/ML/DecTree/UnitTestSigTree.py | Python | bsd-3-clause | 4,996 | [
"RDKit"
] | 3e46c3c1b0f60c166184a6ed2f2050b1ee931dc5cfc73100351d35c18fce6a0f |
from mpp.models import SQLTestCase
import os
class test_statistics(SQLTestCase):
'''
@optimizer_mode on
JIRA related to bugs in statistics
MPP-21064: CBucket.cpp:324: Failed assertion: this->FContains(ppointLowerNew)
MPP-21973: Orca crashes on histogram generation query used for ANALYZE
'''
... | lintzc/gpdb | src/test/tinc/tincrepo/query/statistics/test_statistics.py | Python | apache-2.0 | 609 | [
"ORCA"
] | 3caee1dd8b3a68fd299c55a9818aba443bbf1cef32d535ad7c6c9616cd12ae54 |
"""
Created on Jan 17, 2013
@author: eric
"""
import unittest
from testbundle.bundle import Bundle
from ambry.identity import * #@UnusedWildImport
from test_base import TestBase
from osgeo.gdalconst import GDT_Float32
import ogr
class Test(TestBase):
def setUp(self):
self.copy_or_build_bundle()
... | kball/ambry | test/old_tests/test_geo.py | Python | bsd-2-clause | 5,525 | [
"Gaussian"
] | ce7c2a44bf96b22d11ae558125f5a3c620c09d0d9bc192f886b926da8dc07d7d |
# This file is part of the resampling package that can be found at https://github.com/bkrueger/resampling
# Copyright (c) 2015 Benedikt Krüger
# Resampling is published under the MIT license, see https://opensource.org/licenses/MIT or the LICENSE file in the root directory of the project
import sys
sys.path.append('.... | bkrueger/resampling | tests/test_resampling.py | Python | mit | 6,468 | [
"Gaussian"
] | 97843b8fecefda40196885af7479212ea20f6c853fca393de5de8a217ad0f934 |
#!/usr/bin/env python
# File: plot_icd_mass.py
# Created on: Tue Jun 4 11:31:32 2013
# Last Change: Mon Aug 12 14:09:04 2013
# Purpose of script: <+INSERT+>
# Author: Steven Boada
import pylab as pyl
import cPickle as pickle
def plot_icd_vs_mass():
galaxies = pickle.load(open('galaxies.pickle','rb'))
arrow_... | boada/ICD | sandbox/legacy_plot_code/plot_z_box.py | Python | mit | 4,752 | [
"Galaxy"
] | 78cb7367bd47be0a3ca23457ba418a115066a8a760b6ced0be205c8ae553a5cc |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides an interface to communicate with the device via the adb command.
Assumes adb binary is currently on system path.
"""
# pylint: disable-all
... | hgl888/chromium-crosswalk-efl | build/android/pylib/android_commands.py | Python | bsd-3-clause | 72,658 | [
"Galaxy"
] | 618b4c098e3d3f722f4d5719d8935a381b1833af9f71c28d10d2b50731f493e8 |
#!/usr/bin/env python
from peacock.utils import Testing
from PyQt5 import QtCore
from peacock.Input.ParameterInfo import ParameterInfo
class TestAddVariableAndBlock(Testing.PeacockAppImageTestCase):
"""
Tests that if variables are added that GUI maintains it selections
"""
def testAdd(self):
""... | backmari/moose | python/peacock/tests/peacock_app/check_add_variables_and_blocks/test_AddVariableAndBlock.py | Python | lgpl-2.1 | 4,029 | [
"VTK"
] | c339be000b0885aad692f60b9ed19af05048537679f60f9b3db9ac2fb0c8d5e0 |
from __future__ import division, absolute_import, print_function
import warnings
import numpy as np
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
from numpy import ra... | ahaldane/numpy | numpy/random/tests/test_random.py | Python | bsd-3-clause | 66,835 | [
"Gaussian"
] | 97e701fa5a7b740c4ca92bb32b7b796541715353daf8dd454c60f6e878e49696 |
#!/usr/bin/env python3
"""
Copyright 2020 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 ... | pwillworth/galaxyharvester | html/udUserImage.py | Python | gpl-3.0 | 4,187 | [
"Galaxy"
] | c25cece8349c272ed9772cf81c81f5a27de81573960945775ad4c5accca93483 |
# ======================================================================
# 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 | src/python/gfmd/_version.py | Python | gpl-2.0 | 19,513 | [
"LAMMPS"
] | 78fbd3ef3f8f776f62be36dbb70c641e84bce0d3075d80835036c769c8b06ccf |
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# 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.
"""mmCIF parser (partly implemented in C)."""
from string import ascii_letters
import nu... | bryback/quickseq | genescript/Bio/PDB/MMCIFParser.py | Python | mit | 7,197 | [
"Biopython"
] | 106eaf2661863b219241390e678f94adec8e4c2b1232327ecc9e2c010285ac77 |
"""
Dependencies lists the functions and types required by a function
"""
from pythran.passmanager import ModuleAnalysis
from pythran.conversion import demangle
import gast as ast
import math
class Dependencies(ModuleAnalysis):
OpMap = {
# binop
ast.Add: ('operator', 'add'),
ast.Sub: ('o... | pombredanne/pythran | pythran/analyses/dependencies.py | Python | bsd-3-clause | 4,759 | [
"VisIt"
] | e833060753b0189b422642c5608565ec95b6f2f450478093e2b37e3c1c42f795 |
from __future__ import division
import unittest
import itertools
from .checks import *
from .knownfailure import *
from nose import SkipTest
from nose.plugins.attrib import attr
from pymc3.tests.test_distributions import (build_model,
Domain, product, R, Rplus, Rplusbig, Unit, Nat, NatSmall,
I, Simplex, Vect... | evidation-health/pymc3 | pymc3/tests/test_distributions_random.py | Python | apache-2.0 | 25,522 | [
"exciting"
] | 1ab40eff466b108d92234c9a6be0352d69c9aa9d3a67a84091ebaacaadc08a83 |
# Copyright Yair Benita Y.Benita@pharm.uu.nl
# Biopython (http://biopython.org) license applies
"""Codon adaption indxes, including Sharp and Li (1987) E. coli index.
Currently this module only defines a single codon adaption index from
Sharp & Li, Nucleic Acids Res. 1987.
"""
SharpEcoliIndex = {
'GCA': 0.586, 'GCC... | zjuchenyuan/BioWeb | Lib/Bio/SeqUtils/CodonUsageIndices.py | Python | mit | 1,069 | [
"Biopython"
] | 7a9afcfa963e8bf09d0af5efadb9b1df3cb37bba5fe93df914c9b4ee3cf112d4 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import json
import frappe.utils
from frappe.utils import cstr, flt, getdate, comma_and, cint, nowdate, add_days
from frappe import _
from ... | indictranstech/erpnext | erpnext/selling/doctype/sales_order/sales_order.py | Python | agpl-3.0 | 28,000 | [
"VisIt"
] | 818a3d341a6bdd69aa346a962615725b18c540f424969988a5009be765a36602 |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | snnn/tensorflow | tensorflow/python/autograph/core/converter.py | Python | apache-2.0 | 12,090 | [
"VisIt"
] | 0491d9e0cb9086f31c3726c4836c06c81253364171104ad5124dd16de3485326 |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" は、"field1=\'newvalue\'" のようなオプションです。"JOIN の結果を更新または削除することはできません。',
'# Houses Damaged': '損傷した家屋の数',
'# Houses Flooded': '浸水した家屋数',
'# People Needing Food': '食料が必要な人の数',
'# People at ... | waidyanatha/sambro-eden | languages/ja.py | Python | mit | 410,117 | [
"VisIt"
] | e2592b85f15ca6434a66955bcf91d77ce738a4423faac735b70359a624f8385a |
# -----------------------------------------------------------------------
# OpenXenManager
#
# Copyright (C) 2009 Alberto Gonzalez Rodriguez alberto@pesadilla.org
# 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 Soft... | infosiftr/openxenmanager | window_vm_performance.py | Python | gpl-2.0 | 4,115 | [
"FLEUR"
] | aa5be5efdf450721f2d03f289df1d8daacb21d965d12cec7d496e37c4938ee2c |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, print_function
import itertools
import logging
from collections import defaultdict
import math
from math import cos
from math import sin
from fractions import... | xhqu1981/pymatgen | pymatgen/symmetry/analyzer.py | Python | mit | 54,088 | [
"CRYSTAL",
"pymatgen"
] | 623c8dbef71393d0ae95100ad2cf75f2b2d54b2e144a826bf9d56b54dfc10912 |
from random import random
from ase.io import write
from ase.ga.data import DataConnection
from ase.ga.population import Population
from ase.ga.standard_comparators import InteratomicDistanceComparator
from ase.ga.cutandsplicepairing import CutAndSplicePairing
from ase.ga.offspring_creator import OperationSelector
from ... | misdoro/python-ase | doc/tutorials/ga/ga_basic_pbs_main.py | Python | gpl-2.0 | 3,216 | [
"ASE"
] | 32c1027a71eafb9f96622bb737fa9bf0a740d64746449d2e3165835e09a49e13 |
import grass.script as gscript
import math, sys, os
gscript.run_command('g.remove', type_='rast', pat='*', flags='f')
gscript.run_command('g.remove', type_='vect', pat='*', flags='f')
# define region and mask
gscript.run_command('g.region', vect='hull', res=1000, flags='a', quiet=True)
gscript.run_command('r.mask', ve... | mlennert/RegionalTradeModel | MARCON_PUECH_INDICATOR/M.py | Python | gpl-3.0 | 21,654 | [
"Gaussian"
] | ff5c6218ffaa11978e6c8d3f6df4b2ec53bcfdf5bfbdaa77cc00dc17213932ce |
from math import sqrt as _sqrt
import pychemia.utils.constants as _pc
from pychemia.utils.computing import string2number
"""
A syntactic parser for ABINIT input files ".in"
"""
__author__ = "Guillermo Avendano-Franco"
__copyright__ = "Copyright 2016"
__version__ = "1.1"
__maintainer__ = "Guillermo Avendano-Franco"
__... | MaterialsDiscovery/PyChemia | pychemia/code/abinit/parser.py | Python | mit | 6,961 | [
"ABINIT"
] | b19f4d1fb8cd75e1ed6515bb2ab1e7c03ae9b1345f2c3c7eb07f48ab2ed544b8 |
# -*- coding: utf-8 -*-
"""Database models for the results of EpiCom Reloaded."""
from sqlalchemy import Column, Float, ForeignKey, Integer
from sqlalchemy.orm import relationship
from pybel.manager.models import Base, NamespaceEntry, Network
TABLE_BASE_NAME = 'epicom'
SCORE_TABLE_NAME = 'epicom_score'
class Scor... | pybel/pybel-tools | src/pybel_tools/analysis/epicom/models.py | Python | mit | 913 | [
"Pybel"
] | ea58c8a70592cb8afef3a094486a7eb50a61acc291f66c5f8c4d8e89dea48995 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from netCDF4 import Dataset
from compliance_checker.cf import util
# get current std names table version (it changes)
std_names = util.StandardNameTable()
# The meat and potatoes of most integration tests lies here
# To add a new integration test, simply... | ocefpaf/compliance-checker | compliance_checker/tests/test_cf_integration.py | Python | apache-2.0 | 22,048 | [
"NetCDF"
] | 03d58db2ed9912e21c80b13c3d480cb1e34d703480870cc213f3f9454b41568e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.