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 |
|---|---|---|---|---|---|---|---|
# Copyright 2012, SIL International
# All rights reserved.
#
# 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 License, or
# (at your option) any lat... | silnrsi/graide | lib/graide/slot.py | Python | lgpl-2.1 | 17,694 | [
"VisIt"
] | c9e532b2503d29713173c14bdb530a7e041c8ec3d0802e64ebdeb49f7204c0d4 |
import munkres
import numpy as np
def eigenshuffle(Asequence):
"""
Consistent sorting for an eigenvalue/vector sequence
Based on eigenshuffle.m 3.0 (2/18/2009) for MATLAB by John D'Errico
http://www.mathworks.com/matlabcentral/fileexchange/22885
Python adaptation by Brecht Machiels
... | bmachiel/python-nport | nport/eigenshuffle.py | Python | gpl-3.0 | 7,297 | [
"Brian"
] | 7b1c3c12f55860b44ace10ee8ac7f693a05288a20c43ea2e744820c1bc1be9e6 |
from tvtk.api import tvtk
from callout import Callout
from math import sqrt
import collections
class AccessObj:
""" Access object for the Plotter class. Takes input and displays an outline."""
def __init__(self, plotter):
self.plotter = plotter
class PointBounds(AccessObj):
""" Access object for... | bcorfman/stage | access.py | Python | mit | 7,452 | [
"BLAST",
"Mayavi"
] | 20a97be18df084736d0d834f3c0b7ca18c57799c3817a3e2be5e768862752c91 |
################################################################################
# Peach - Computational Intelligence for Python
# Jose Alexandre Nalon
#
# This file: nn/af.py
# Activation functions and base class
################################################################################
# Doc string, reStructur... | PaulGrimal/peach | peach/nn/af.py | Python | lgpl-2.1 | 18,365 | [
"Gaussian",
"NEURON"
] | 7c28c64264d26f1e8a7e3b5344af946ba43cd69df3693a96e83f67ed34c84e37 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides objects to inspect the status of the Abinit tasks at run-time.
by extracting information from the main output file (text format).
"""
import os
import numpy as np
import ruamel.yaml as ... | dongsenfo/pymatgen | pymatgen/io/abinit/abiinspect.py | Python | mit | 22,428 | [
"ABINIT",
"CRYSTAL",
"pymatgen"
] | 4f52b9068eabdeadc455316fafcc3a8ec727b7741dbfa3fdc9f88ce6ef0feea8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Deep learning via word2vec's "skip-gram and CBOW models", using either
hierarchical softmax or negative sampling [1]_ [2]_.
The train... | Jai-Chaudhary/gensim | gensim/models/word2vec.py | Python | gpl-3.0 | 46,570 | [
"VisIt"
] | 6aa1052cae8bf3562a2de8340b1e79eafc7c06b24c5219c461d0db5fe6883aa2 |
#############################################################################
# $HeadURL$
#############################################################################
""" ..mod: FTSRequest
=================
Helper class to perform FTS job submission and monitoring.
:deprecated:
"""
# # imports
import os
... | avedaee/DIRAC | DataManagementSystem/Client/FTSRequest.py | Python | gpl-3.0 | 46,202 | [
"DIRAC"
] | ee2dd5abcbb49e3df17cc0f44c689d5a5e1906a93c71ce914055b2b3c2242bcd |
"""Gaussian processes regression. """
# Authors: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
from operator import itemgetter
import numpy as np
from scipy.linalg import cholesky, cho_solve, solve_triangular
from scipy.optimize import fmin_l_bfgs_b
from sklearn.base im... | devanshdalal/scikit-learn | sklearn/gaussian_process/gpr.py | Python | bsd-3-clause | 19,178 | [
"Gaussian"
] | c3a96ee8bd7e72db60bb5ad6b56f04b7f95b07704648a87cf0f0255fc64ca004 |
import os
import numpy as np
import fitsio
from legacypipe.image import LegacySurveyImage
from legacypipe.survey import *
from astropy.io import fits as astro_fits
from astrometry.util.file import trymakedirs
from astrometry.util.util import Tan, Sip, anwcs_t
from tractor import ConstantSky, LinearPhotoCal
from tract... | legacysurvey/legacypipe | py/legacypipe/ptf.py | Python | bsd-3-clause | 19,724 | [
"Galaxy",
"Gaussian"
] | c049034e560a86a30e9c4a65bd173c3f3f04300b1d7767211d75d562ae0ec455 |
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 19 11:45:20 2016
@author: johnguttag
"""
import random, pylab, numpy
#set line width
pylab.rcParams['lines.linewidth'] = 4
#set font size for titles
pylab.rcParams['axes.titlesize'] = 20
#set font size for labels on axes
pylab.rcParams['axes.labelsize'] = 20
#set size ... | johntauber/MITx6.00.2x | Unit3/Lecture9Video3Notes.py | Python | mit | 5,091 | [
"Gaussian"
] | a6c764e61db4521467e5cd3adb392cc1c878e53c17336ba4b01bce629c329994 |
"""Unit-tests for `py2c.processing.to_ast`
"""
import ast
import difflib
from py2c.utils import is_py2c_temp_var
from py2c.tree.visitors import RecursiveNodeTransformer
from py2c.processing.to_ast import SourceToAST, SourceToASTTranslationError
from py2c.tests import Test, data_driven_test
from nose.tools import ass... | pradyunsg/Py2C | py2c/processing/tests/test_to_ast.py | Python | bsd-3-clause | 1,899 | [
"VisIt"
] | aed059e10c1ea3ff64cec83754fadc90e91f7f09e96883283048c1cc0ef00f01 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2016, 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 p... | numenta-ci/nupic | src/nupic/algorithms/anomaly_likelihood.py | Python | agpl-3.0 | 28,024 | [
"Gaussian"
] | 7b5ee99baf20b652649273a81f3b4f5043ee6864d9f6157e3343b52fff8fb5c8 |
"""Simulates signals from the DGSN. This is like simulator.py but
gives noisy data. Simulated effects are unequal intervals between
observations, Gaussian noise in observed coordinates, and gaps in
between observations. The gaps simulate the time when the station
will be out of range of the satellite.
"""
... | aerospaceresearch/orbitdeterminator | orbitdeterminator/propagation/dgsn_simulator.py | Python | mit | 7,082 | [
"Gaussian"
] | efc0a2e9a213ce2d34b948ec92e5c9518ff87b82b74885b02ae569950e016542 |
from django.utils import unittest
from django.test.client import Client
from django.core.urlresolvers import reverse
from oscar.apps.basket.models import Basket, Line
from oscar.test.helpers import create_product, TwillTestCase
class ViewTest(TwillTestCase):
def test_for_smoke(self):
self.visit('basket... | aykut/django-oscar | oscar/apps/basket/tests.py | Python | bsd-3-clause | 2,108 | [
"VisIt"
] | 504bb9a2c9b4bfd42255cbe39064e8508d99c9084b2ec0ccba713799ef300c78 |
# thermal comfort indices
#
# Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Ladybug.
#
# Copyright (c) 2013-2015, Djordje Spasic <djordjedspasic@gmail.com>
# Ladybug is free software; you can redistribute it and/or modify
# it under the terms of... | samuto/ladybug | src/Ladybug_Thermal Comfort Indices.py | Python | gpl-3.0 | 75,521 | [
"EPW"
] | 5085f65201c173c5449b9599dbd1f83abbfa955e85e36d7f51b2b85a8d2c360a |
#!/usr/bin/env python3
import sys
import optparse
try:
import numpy as np
except:
print("numpy must be installed, try: conda install -c anaconda numpy")
sys.exit()
import itertools
# Tree creation
try:
import pandas as pd
except:
print("pandas must be installed, try: conda install -c anaconda panda... | jasonsahl/LS-BSR | tools/BSR_to_cluster_dendrogram.py | Python | gpl-3.0 | 3,720 | [
"scikit-bio"
] | b73932165e716e7881d5fc65b6f800fc1d507f70d9e8a63064a55223563aa59b |
#!/usr/bin/env python
#
# Wrapper script for phylip program when installed from
# bioconda. Adapted from shell scripts provided in the biolbuilds
# conda recipe by Cheng H. Lee.
import sys
import os
import subprocess
def main():
print("running main")
print(sys.argv)
bindir = get_script_path(sys.argv[0])
... | JenCabral/bioconda-recipes | recipes/phylip/phylip.py | Python | mit | 8,830 | [
"Bioconda"
] | 29b3642adeb4031fd6b5508017ff55bc8640407ef9692b514b070c3000057d0d |
""" DISET request handler base class for the TransformationDB.
"""
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from DIRAC.TransformationSystem.DB.TransformationDB import TransformationDB
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
... | arrabito/DIRAC | TransformationSystem/Service/TransformationManagerHandler.py | Python | gpl-3.0 | 29,554 | [
"DIRAC"
] | 827414190e14b0a061e460b6b1a740633f304ad0d04b253787352ff4be5f94e2 |
# -*- coding: utf-8 -*-
#
# urbanczik_synapse_example.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 t... | SepehrMN/nest-simulator | pynest/examples/urbanczik_synapse_example.py | Python | gpl-2.0 | 12,225 | [
"NEURON"
] | a7e05a0bc75912d22f92a1e5751a29a6f9df8cdf8d07e1ddd1898efc9807c37a |
import os
import numpy as np
from scipy.spatial import cKDTree
from scipy.ndimage.interpolation import map_coordinates
from scipy.spatial.distance import mahalanobis
from dipy.utils.optpkg import optional_package
from dipy.io.utils import save_buan_profiles_hdf5
from dipy.segment.clustering import QuickBundles
from d... | FrancoisRheaultUS/dipy | dipy/stats/analysis.py | Python | bsd-3-clause | 10,573 | [
"Brian"
] | 0540f32769caf5e60cd459505353a7419dcd05fa24aa1c71ea57a23568a14940 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import math
import os
import pickle
import unittest
import warnings
from copy import deepcopy
import numpy as np
from pymatgen.core.periodic_table import (
DummySpecies,
Element,
ElementBase,
Species,
ge... | materialsproject/pymatgen | pymatgen/core/tests/test_periodic_table.py | Python | mit | 18,750 | [
"pymatgen"
] | 1855796866b1d5782ec233ac60bd139455c32f3cc9953bb0d59ff3e175f1a14f |
from ScriptingLanguage.Visitors.AssignmentVisitor import visit_assignment
from ScriptingLanguage.Visitors.ExpressionVisitor import visit_expression, visit_number, visit_var
__author__ = 'chronium'
class Ast:
def __init__(self, value, name):
self.value = value
self.name = name
def visit(self):... | chronium/ChronoScript | ScriptingLanguage/Parser/AstNode.py | Python | gpl-2.0 | 1,426 | [
"VisIt"
] | df2125402950ea21df342f5031eeccca6717beba1b8846251ed47156c3ea841c |
import sys
from django.utils import timezone
from django.core.urlresolvers import reverse
from galaxies.models import Galaxy
from django.test import TestCase
# Create your tests here.
class GalaxyDetailViewTest(TestCase):
def setUp(self):
super(GalaxyDetailViewTest, self).setUp()
self.galaxy = Gal... | craigderington/SagittariusA | milkyway/galaxies/tests.py | Python | gpl-3.0 | 1,300 | [
"Galaxy"
] | cc72ac1b0bc53991c6ab290462d0826f0c623a67bed39ae43cc372894fec2e9e |
""" Python test discovery, setup and run of test functions. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import fnmatch
import inspect
import os
import sys
import warnings
from functools import partial
from textwrap import dedent
i... | lmregus/Portfolio | python/design_patterns/env/lib/python3.7/site-packages/_pytest/python.py | Python | mit | 54,961 | [
"VisIt"
] | f1eb9c6a347ffb719fd69d0310584bf204816db9568989cb86d9f81ca03b5a56 |
# (c) 2015,2016 - Jaguar Land Rover.
#
# Mozilla Public License 2.0
#
# Python-based hmi PoC for Software Loading Manager
#
import gtk
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
import time
import threading
import code, signal
import traceback
import swm
from termios import tcflush, T... | rstreif/genivi_software_management | hmi/hmi.py | Python | mpl-2.0 | 9,441 | [
"Jaguar"
] | b0d28708b688eb8eb5e17367a0bd57050d36f7323ea45def137f5ccf64230bb0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines tools to analyze surface and adsorption related
quantities as well as related plots. If you use this module, please
consider citing the following works::
R. Tran, Z. Xu, B. Radhakri... | gmatteo/pymatgen | pymatgen/analysis/surface_analysis.py | Python | mit | 81,689 | [
"VASP",
"pymatgen"
] | a59b8e7e840b359a73d585b98aad8be4fd2ccdd07ab7b36d4e54436dab2e8664 |
"""This module imports many important modules at once."""
from ase.atom import Atom
from ase.atoms import Atoms
from ase.units import *
from ase.io import read, write
from ase.io.trajectory import PickleTrajectory
from ase.dft import STM, monkhorst_pack, DOS
from ase.optimize.mdmin import MDMin
from ase.optimize.lbfgs... | grhawk/ASE | tools/ase/all.py | Python | gpl-2.0 | 1,389 | [
"ASE",
"SIESTA",
"TURBOMOLE",
"VASP"
] | 73b4abb4453bd3e88ba309ba6aab644b23821e37c93f9609ec1a6f56dcea289c |
"""
Python Obit Visibility-based CLEAN class
CleanVis Members with python interfaces:
======== =======================================
List used to pass instructions to processing
Mosaic ImageMosaic
SkyModel Sky Model
======== =======================================
"""
# $Id$
#--------------------------... | kernsuite-debian/obit | python/CleanVis.py | Python | gpl-2.0 | 35,353 | [
"Gaussian"
] | 77ebecc21693151f34f78919a0ce8203cd4d9a8026f2f1be48325dcb06a91bb8 |
"""
VolumeVisualizationSimple
:Authors:
Berend Klein Haneveld
"""
from VolumeVisualization import VolumeVisualization
from VolumeVisualization import VisualizationTypeSimple
from vtk import vtkVolumeProperty
from vtk import vtkColorTransferFunction
from vtk import vtkPiecewiseFunction
from ui.widgets.SliderFloatWidge... | berendkleinhaneveld/Registrationshop | ui/visualizations/VolumeVisualizationSimple.py | Python | mit | 6,867 | [
"VTK"
] | aa0a986a3c7c972682683ff37fcc3bfda94eb8b5dd99f1cc547dca094ba7fa2e |
__author__ = 'ddeconti'
import FileHandler
import pickle
import sys
from bokeh.palettes import Blues9
from bokeh.plotting import output_file, figure, show, VBox, HBox
from bokeh.charts import Histogram, HeatMap
from rdkit import DataStructs
def similarity_compare(fp):
tanimoto_matrix = [[1] * len(fp)] * len(fp)
... | dkdeconti/PAINS-train | training_methods/classifier/basic_stats_plotting.py | Python | mit | 3,480 | [
"RDKit"
] | f30a43f569a41b491e995d19922d64330ab0324c2a7f4b1f58f62995b8d8c7c2 |
#!/usr/bin/python
# Copyright 2017 Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['deprecated']... | alxgu/ansible | lib/ansible/modules/cloud/google/_gcp_healthcheck.py | Python | gpl-3.0 | 15,588 | [
"VisIt"
] | 1e23b577accb999db00aab7ae2e3c24e958950b6c85f58e17dfdc52590d7f24b |
# Copyright (C) 2011 Mattias Slabanja <slabanja@chalmers.se>
#
# 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... | ThomasCOConnor/dynsf | dsf/trajectory_readers.py | Python | gpl-2.0 | 18,028 | [
"Gromacs",
"LAMMPS",
"VMD"
] | 0d4b484e54772466c69995176be0f4210923a09ef2d831d638229412825f10d9 |
# Script control setup area
# script info
__script__.title = 'KKB Plot and Reduction 25.1.2016'
__script__.version = '2.0'
# 15.6.2017 Allow to reduce the detector range
# 15.6. Throw out points below resolution
# 16.6. Tidy up run time to display in the reduction; tidy up display properties
from math... | Gumtree/Kookaburra_scripts | Internal/KKB-Plot and Reduction_Tube11_insteadof_9.py | Python | epl-1.0 | 57,695 | [
"CRYSTAL"
] | 9504c687fb26dca61c9c2635bc42636f57a849a58a420fa50788900decaf4bbc |
#!/usr/bin/env python
#Erin's code
from pylab import *
from pyraf import iraf
import pylab
import os
import numpy
import glob
import pyfits
# Import 24 micron data for one galaxy
# Initialize variables
data1 = numpy.genfromtxt("A2063-254017-cutout-24.dat", unpack=True)
row_num1 = data1[0,:]
sma_pix1 = data1[1,:]
inten... | rfinn/LCS | paper1code/LCSA2063ImPlots.py | Python | gpl-3.0 | 6,277 | [
"Galaxy"
] | 82c7ef3597cc99f5a6348284ec56c61da037c56910fe35710a9484f1f7800b7e |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/7/24 21:32
# @Author : Tom.lee
# @Site :
# @File : mlab_a.py
# @Software: PyCharm
def surface_3d():
"""
使用Mayavi将二维数组绘制成3D曲面 x * exp(x**2 - y**2)
:return:
"""
import numpy as np
# create data
x, y = np.ogrid[-2:2:20j, ... | amlyj/pythonStudy | 2.7/data_analysis/study_mlab/mlab_3d.py | Python | mit | 2,129 | [
"Mayavi"
] | b48a11c35ac0f766ff79644246e43218c46d32801ba4455392f43d58ff777c60 |
########################################################################
## Copyright (C) 2006 by Marek Wojciechowski
## <mwojc@p.lodz.pl>
##
## Distributed under the terms of the GNU General Public License (GPL)
## http://www.gnu.org/copyleft/gpl.html
###############################################################... | poelzi/uberclock | db/ffnet.py | Python | gpl-2.0 | 34,204 | [
"NEURON"
] | cb28939d1c328eebf20050370ca52df184e1df47d838d8ab71ad4f8c1c3587fd |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net>
# Copyright: (c) 2015, Brian Coca <bcoca@ansible.com>
# Copyright: (c) 2016-2017, Konstantin Shalygin <k0ste@k0ste.ru>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING... | pgmillon/ansible | lib/ansible/modules/files/find.py | Python | gpl-3.0 | 16,465 | [
"Brian"
] | 4e7319006082f1357d34c9acf15b1cc2ae06fceaa51a33029224d3406fd7bc90 |
from collections import defaultdict
from copy import deepcopy
import itertools as it
import numpy as np
from six import string_types
from six.moves import zip_longest
import mbuild as mb
__all__ = ['Lattice']
class Lattice(object):
"""Develop crystal structure from user defined inputs.
Lattice, the abstra... | ctk3b/mbuild | mbuild/lattice.py | Python | mit | 22,557 | [
"ASE",
"CRYSTAL"
] | 20501984ce438a53ffe2706955cd7a08def83adcf7fc46fd055a198956a5b722 |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | mgeplf/NeuroM | neurom/fst/tests/test_get_features.py | Python | bsd-3-clause | 33,092 | [
"NEURON"
] | 0d60203bf255067d93e0bcc59dd694f631e034da96bf8cb574d8046e4c53d925 |
"""%%%%%%%%%%%%%%%%%%%%%%%%%%
PARAMETERSPACE_AGNfitter.py
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This script contains functions that rule the exploration of the parameter space.
It contains:
"""
from __future__ import division
import pylab as pl
import numpy as np
from math import pi
import time
import pickle
import MOD... | GabrielaCR/AGNfitter | functions/PARAMETERSPACE_AGNfitter.py | Python | mit | 8,836 | [
"Galaxy"
] | a34205c74d980454b9d535504ea1ede482a977143c4abcd622c091c5938ffb4d |
"""
ReportCLI class implementing command line interface to DIRAC Accounting
ReportGenerator Service. It is not complete yet
Once ready it could be used with a script as simple as:
from DIRAC.Core.Utilities.DIRACScript import DIRACScript as Script
Script.localCfg.addDefaultEntry("LogLevel", "info")
Script.parseComma... | ic-hep/DIRAC | src/DIRAC/AccountingSystem/Client/ReportCLI.py | Python | gpl-3.0 | 2,404 | [
"DIRAC"
] | 30069aa1d9aeafb21a1e0091f1ac31b1ddcf0ebe968aefacbde21cf34e515e11 |
# Copyright (c) 2013-2014 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice,... | tulip-control/tulip-control | tulip/graphics.py | Python | bsd-3-clause | 7,574 | [
"Mayavi"
] | 2db3660b7f8b41c5533990f5a72866d2acf000a04c48d582b990ec59adae4f9e |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | jairideout/scikit-bio | skbio/io/_exception.py | Python | bsd-3-clause | 2,327 | [
"scikit-bio"
] | 1978eadabb8f45da2e9e4f6c823b43b36bb5f8efff4dcc515b51a58a263b54de |
from __future__ import print_function, division, absolute_import
from .utils import (linearize, index, findop, findallops,
opcodes, optypes, vmap, diff, collect_constants, substitute_args)
from .value import (Module, GlobalValue, Function, Block, Operation, FuncArg,
Constant, Va... | flypy/pykit | pykit/ir/__init__.py | Python | bsd-3-clause | 629 | [
"VisIt"
] | 8b41cd2097d82df50fea0f69bc7bfe749ea7e3a10cdde6bf5bb5572a864ec2e8 |
#!/usr/bin/env python
###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2011, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Genera... | zenoss/ZenPacks.zenoss.OpenStackSwift | ZenPacks/zenoss/OpenStackSwift/libexec/poll_swift_recon.py | Python | gpl-2.0 | 2,038 | [
"VisIt"
] | a57fa6aed640f1fbf09d17048df7874c81b4294d2b1251abf8fc15d7d2bf6e27 |
#!/usr/bin/env python
__license__ = '''
Copyright 2010 Jake Wharton
py-video-downloader 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 later versi... | JakeWharton/py-videodownloader | test.py | Python | apache-2.0 | 4,888 | [
"Brian"
] | cd46bb029a59ffd0a3bcc7b0ca867b52c383a20b022ae001be17c76cb919419d |
#!/usr/bin/env python
"""
Takes an MD-trajectory and a topology file of a molecule, analyzes the hydrogen
bond network and generates in input-JSON file for use in FlarePlot
(http://GPCRviz.github.io/FlarePlot). Each vertex will be a residue-number from
the structure and each edge will represent a hydrogen bond betw... | GPCRviz/FlarePlot | input/flare-scripts/legacy/contacts2flare.py | Python | apache-2.0 | 3,724 | [
"MDTraj"
] | c105bbdedfb5dd2f295c421f3fafc3e303d9ee32bcdd308b57c6463c340af97c |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | hainm/mdtraj | mdtraj/tests/test_reporter.py | Python | lgpl-2.1 | 7,867 | [
"MDTraj",
"OpenMM"
] | 252f34bd3c9f5f8aafed999da6fd9a450e72d79ef01257a22d7d43abca9406ed |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | Chuban/moose | python/chigger/tests/viewports/viewports.py | Python | lgpl-2.1 | 1,321 | [
"MOOSE"
] | 16de03027fd9bc01e8e728c65555c27327380d11f59652b4e2f92d32c4d7d4af |
# sybase/base.py
# Copyright (C) 2010-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
# get_select_precolumns(), limit_clause() implementation
# copyright (C) 2007 Fisch Asset Management
# AG http://www.fam.ch, with coding by Alexander Houben
# alexander.houben@thor-solutions.ch
#
# This module is par... | graingert/sqlalchemy | lib/sqlalchemy/dialects/sybase/base.py | Python | mit | 31,801 | [
"ASE"
] | 9152cfb6d9e966d03e4b248f1ff110a523072d698d9b11efba35b41c9baddd07 |
# perceptually linear colour scales based on those published by Haim
# Levkowitz at http://www.cs.uml.edu/~haim/ColorCenter/
# code by Peter R. Krekel (c) 2009
# modified by Charl Botha to cache lookuptable per range
import vtk
class ColorScales():
def __init__(self):
self.BlueToYellow = {}
self.... | nagyistoce/devide | module_kits/vtk_kit/color_scales.py | Python | bsd-3-clause | 56,308 | [
"VTK"
] | 3f1a43a6ec596f7a789033e3f12f8c251e02bb2604be1f5898c254a5c3f67df8 |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/xianci/__init__.py | Python | apache-2.0 | 626 | [
"PySCF"
] | 57b597f672f86e0cacfb7105124a805fab4aa31a16c21c4a9f608a91fafc740a |
# -*- coding: utf-8 -*-
# @Author: YangZhou
# @Date: 2017-06-19 13:13:46
# @Last Modified by: YangZhou
# @Last Modified time: 2017-06-19 13:13:59
from aces.materials import Material
from ase.dft.kpoints import ibz_points
from ase.lattice import bulk
class structure(Material):
def set_parameters(self):
... | vanceeasleaf/aces | aces/materials/Ar.py | Python | gpl-2.0 | 1,190 | [
"ASE"
] | 283287083c32616ca799cc8b92002d84a4079857a4b91502e0ab3fe4c4e0e8e1 |
#!/usr/bin/env python
import wx
oneline = 'A module which contains various messageboxes for SHS GUI'
def WrongInput():
wx.MessageBox('PLease enter positive or negative numbers divided by space', 'Warning',
wx.OK | wx.ICON_WARNING)
def NoResults(cdir, ctype):
wx.MessageBox(cdir + ' d... | ansobolev/shs | shs/gui/mbox.py | Python | mit | 2,116 | [
"SIESTA"
] | 6587259293548b00a37057e6777a1dd8626b530b247271eb71ff4564a52b8adb |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Brian Coca <bcoca@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
module: systemd
autho... | ademmers/ansible | lib/ansible/modules/systemd.py | Python | gpl-3.0 | 22,727 | [
"Brian"
] | 08f45a5415d8ca473a025f798e3235bc6224596bca08e1a473c46323746329ce |
from textwrap import dedent
import yaml
import os
import subprocess as sp
import sys
import pytest
import yaml
import tempfile
import requests
import glob
from ggd import install, uninstall
from future.utils import iteritems
#-------------------------------------------------------------------------------------------... | gogetdata/ggd-cli | tests/helpers.py | Python | mit | 7,533 | [
"Bioconda"
] | 47047d38bef40bf99562a6c366bb43d4a961406e66627d303d601be679c074c6 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# License: BSD style
import numpy as np
from scipy import linalg, optimize, rand
from ..base import BaseEstimator, RegressorMixin
from ..metrics.pairwise import m... | ominux/scikit-learn | sklearn/gaussian_process/gaussian_process.py | Python | bsd-3-clause | 31,960 | [
"Gaussian"
] | 588320069dd990f753f7477e87028b3ddd621adefcfaba9dfec66a031ef525d6 |
"""
Perform fourier analysis (i.e., look for frequency peaks) on the PCA-extracted
Most Correlated Components
"""
from make_apex_cubes import june2013datapath, april2014path
import numpy as np
from astropy.io import fits
import os
import pylab as pl
import paths
import matplotlib
from astropy.convolution import convolv... | adamginsburg/APEX_CMZ_H2CO | reduction/fourier_baseline_analysis.py | Python | bsd-3-clause | 10,122 | [
"Gaussian"
] | a1878446ad832ea6f847a4fb3d464ce6eb8703a364bc51675385b8e4741d3fc6 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyqt_filter_stacked.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | skoslowski/gnuradio | gr-filter/python/filter/gui/pyqt_filter_stacked.py | Python | gpl-3.0 | 95,512 | [
"Gaussian"
] | 35f5b4bc917dae65cff88d38705d3e1cabf4dc278d784b76a93af124d943e4af |
from ..utils import *
##
# Minions
class AT_006:
"""Dalaran Aspirant"""
inspire = Buff(SELF, "AT_006e")
AT_006e = buff(spellpower=1)
class AT_007:
"""Spellslinger"""
play = Give(ALL_PLAYERS, RandomSpell())
class AT_008:
"""Coldarra Drake"""
update = Refresh(FRIENDLY_HERO_POWER, {GameTag.HEROPOWER_ADDITIO... | jleclanche/fireplace | fireplace/cards/tgt/mage.py | Python | agpl-3.0 | 1,037 | [
"BLAST"
] | eed371a9aa5445e737e50e0651b632f54b5a92d7b4ef68b60d9ce1d27e643f79 |
# Copyright (c) 2012, Siu Kwan Lam
# All rights reserved.
import logging
import ast, inspect
from pymothoa.util.descriptor import Descriptor, instanceof
from pymothoa.compiler_errors import FunctionDeclarationError
from module import LLVMModule
from backend import LLVMCodeGenerator
from types import *
logger = loggi... | sklam/pymothoa | pymothoa/llvm_backend/function.py | Python | bsd-2-clause | 3,577 | [
"VisIt"
] | e7e5c396590c2e9ae141e7235b4a035d51cad605b491d546ab63e65d71ecf4e9 |
"""
Distance matrices and distance-based statistics (:mod:`skbio.stats.distance`)
=============================================================================
.. currentmodule:: skbio.stats.distance
This subpackage provides functionality for serializing, deserializing, and
manipulating dissimilarity and distance mat... | JWDebelius/scikit-bio | skbio/stats/distance/__init__.py | Python | bsd-3-clause | 9,543 | [
"scikit-bio"
] | be387b2e8ff97086d13d1a3a600948f0ac7fd46a08c96dddc6ed3011c4b1a600 |
"""
Copyright (C) 2014, Jaguar Land Rover
This program is licensed under the terms and conditions of the
Mozilla Public License, version 2.0. The full text of the
Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
Adapted from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
M... | rstreif/rvi_backend | util/daemon.py | Python | mpl-2.0 | 4,256 | [
"Jaguar"
] | d1c1b95118e7eccb5cb57d0dc1081d8b34b1d8117065df99aff3a36bb90a62d8 |
# This file is part of OpenHatch.
# Copyright (C) 2010 Parker Phinney
# Copyright (C) 2010 Jack Grigg
# Copyright (C) 2009, 2010 OpenHatch, Inc.
# Copyright (C) 2010 Jessica McKellar
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as... | nirmeshk/oh-mainline | mysite/search/tests.py | Python | agpl-3.0 | 57,916 | [
"VisIt"
] | ab875762e027ca77bac6c4b660d47fce9c025e0085a4d0722acc7cc154c74249 |
import errno
import fnmatch
import json
import os
import os.path
import re
import shutil
import subprocess
import sys
import tarfile
import requests
import stat
from typing import (
Type, NoReturn, List, Optional, Dict, Any, Tuple, Callable, Union
)
import dbt.exceptions
import dbt.utils
from dbt.logger import GL... | fishtown-analytics/dbt | core/dbt/clients/system.py | Python | apache-2.0 | 13,255 | [
"exciting"
] | 1229d2be59db2396edbd4e767abc54c8cd16b6a9cc7315294e50d15c0cd8f556 |
"""
It is a helper module used to create a certain plot...
"""
from DIRAC import S_OK, S_ERROR
__RCSID__ = "$Id$"
def _convertToSeconds(interval):
"""
Converts number of minutes, hours, days, weeks, months, years into seconds
"""
# unit symbols
units = ['s', 'm', 'h', 'd', 'w', 'M', 'y']
# this is the ... | fstagni/DIRAC | MonitoringSystem/private/DBUtils.py | Python | gpl-3.0 | 4,807 | [
"DIRAC"
] | 468e17f5856c4922b8022d0e734c0f127b07e4a44c271e911b154c1da58e8a34 |
# second step spectroscopic success rate
# opens parent plate and distributions for infinite SNR
# opens the plates one by one and produces the sample
platelistELG = [8763, 8765, 8767]
mjdlistELG = [57309, 57307, 57310]
ii=0
mjd = str(mjdlistELG[ii])
plate = str(plateListELG[ii])
hduSpPlate = fits.open(join(os.env... | JohanComparat/pySU | targetselection/bin/mkSample-sims.py | Python | cc0-1.0 | 2,847 | [
"Galaxy"
] | 8a7e3029b822e3b7a8ae5dc5785b964b79b017bd2209d06b55c916e5df728a0c |
import numpy as np
import os
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import matplotlib.pyplot as plt
import time
from datetime import datetime
from matplotlib.dates import date2num, num2date
import pyroms
import pyroms_toolbox
import _remapping
class nctime(object):
pass
def remap(src_... | kshedstrom/pyroms | examples/Yellow_Sea/Inputs/Initial/remap.py | Python | bsd-3-clause | 4,914 | [
"NetCDF"
] | 4a72f69e3fada559a2d601cd6dc03cfee0aa08ee801b1eba5f3f9edf104584d8 |
import tensorflow as tf
from .rbm import RBM
from .util import sample_bernoulli, sample_gaussian
class GBRBM(RBM):
def __init__(
self,
n_visible: int,
n_hidden: int,
sample_visible: bool = False,
sigma: float = 1.0,
**kwargs
):
"... | meownoid/tensorfow-rbm | tfrbm/gbrbm.py | Python | mit | 2,289 | [
"Gaussian"
] | be3260dfcfb6c6166aa6165c1718fbf05a9c5310c1c2bcbf0307bee04e1493f8 |
# 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 RRandomfields(RPackage):
"""Methods for the inference on and the simulation of Gaussian fi... | iulian787/spack | var/spack/repos/builtin/packages/r-randomfields/package.py | Python | lgpl-2.1 | 1,108 | [
"Gaussian"
] | 58e1165f3fc586ac358aa3453dcbf174c7c5d145eebdfccba668fb82c6faf4c3 |
import numpy as np
class Policy( object ):
def __init__( self, nn_params ):
self.nn_params = nn_params
# initialise the network
def optimise( self )
# calculates mean and covariance of gaussian controller
def train( self, xin, xout ):
return self.net.train( xin, xout )
# add objective function etc
... | marcino239/gps | policy.py | Python | gpl-3.0 | 391 | [
"Gaussian"
] | 863e4053640e5096ee640ab1dcabe45b9174d463c18b12b6c94e4a1589c2d258 |
from xml.etree import ElementTree as ET
import string
import moose
import sys, math
from ChannelML import *
from moose.utils import *
class MorphML():
def __init__(self,nml_params):
self.neuroml='http://morphml.org/neuroml/schema'
self.bio='http://morphml.org/biophysics/schema'
self.mml='... | BhallaLab/moose-thalamocortical | python/moose/neuroml/MorphML.py | Python | lgpl-2.1 | 18,603 | [
"MOOSE",
"NEURON"
] | 7b3ab5b9eb49eae7183a124c3763cd9fbca4759036079b0aef07aa8be03c0828 |
#!/usr/bin/env python
conversion_factor = {'CO2':1E-3*28.97/12.01, 'CH4':28.97/16.04, 'TCO':28.97/28.010}
rename = {'TCO':'CO'}
from argparse import ArgumentParser
parser = ArgumentParser(description='Produces an animation of the relative difference between two experiments.')
parser.add_argument('control', help='Cont... | neishm/EC-CAS-diags | reldiff_movie.py | Python | lgpl-3.0 | 7,014 | [
"NetCDF"
] | f9c0c616e5f78b39346f6d15b5a883f3ee2ff832a2e86ff132cebfe9b773e9bb |
"""Plottng functions for visualizing distributions."""
from __future__ import division
import colorsys
import numpy as np
from scipy import stats
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import warnings
try:
import statsmodels.api as sm
_has_statsmodels = True
except ImportE... | cpcloud/seaborn | seaborn/distributions.py | Python | bsd-3-clause | 33,129 | [
"Gaussian"
] | 067ab0a14abd380a5e7cfaea2d4fa87baf8af7243ccf0a0496a313292c5dc157 |
# Copyright (c) 2012 Spotify AB
#
# 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, s... | edx/luigi | setup.py | Python | apache-2.0 | 3,541 | [
"VisIt"
] | 27582e9837db47bc72ff87b9a8d71a0936d2ce63fa66a9655f17f1eaf6f91e6f |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import numpy as np
import matplotlib.pylab as plt
import seaborn as sns
db_dir = r'/Users/sealhuang/project/brainCoding/subjects/vim1_S1/prf/v1'
#-- plot histogram of difference between Gaussi... | CASIANICA/brainDecodingToolbox | braincode/prf/tfprf_quantitative.py | Python | bsd-3-clause | 1,030 | [
"Gaussian"
] | 112bf1b6e0092aa544e227fbc9cbd6fa83deef4ced3c69fedc22ee83256884b3 |
import ast
import vbench
import os
import sys
import astor
import glob
def vbench_to_asv_source(bench, kinds=None):
tab = ' ' * 4
if kinds is None:
kinds = ['time']
output = 'class {}(object):\n'.format(bench.name)
output += tab + 'goal_time = 0.2\n\n'
if bench.setup:
indented_se... | louispotok/pandas | asv_bench/vbench_to_asv.py | Python | bsd-3-clause | 4,844 | [
"VisIt"
] | 20f3132ab26239c503a6ce5135701e6e04fbf84416fe7739d6e69737585e1233 |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | yashdsaraf/scancode-toolkit | tests/licensedcode/test_match_set.py | Python | apache-2.0 | 4,903 | [
"VisIt"
] | 99b3f9d15a3e3e3e70ca90b9db405568c075969a16a6e27f1287d2d6597c4387 |
from django.core import serializers
from django.http import HttpResponse
from django.views.decorators.csrf import ensure_csrf_cookie
from tao.models import Snapshot, Simulation, GalaxyModel, DataSet, DustModel, DataSetProperty, BandPassFilter, StellarModel, GlobalParameter, Job
from tao import datasets
from tao.decora... | IntersectAustralia/asvo-tao | web/tao/json/views.py | Python | gpl-3.0 | 7,080 | [
"Galaxy"
] | 8563eba449c8e9f533626dc3b3b877239e8d93d36dc9c6e238f4987be489f9f3 |
#################################################################
# Code written by Edward Choi (mp2893@gatech.edu)
# For bug report, please contact author using the email address
#################################################################
import sys, random
import numpy as np
import cPickle as pickle
from colle... | mp2893/retain | retain.py | Python | bsd-3-clause | 25,737 | [
"VisIt"
] | 61fa70633e00e84938636b8c488c24e2c9412b5a33177aa6d566075ab96dc0a5 |
from .. import nengo as nengo
## This example demonstrates how to create a neuronal ensemble containing a pair of neurons.
##
## Network diagram:
##
## [Input] ---> (Neurons)
##
##
## Network behaviour:
## Neurons = Input
##
# Create the nengo model
model = nengo.Model('Two Neurons') # Create the... | jaberg/nengo | examples/twoneurons.py | Python | mit | 1,702 | [
"NEURON"
] | b221fc073bd9e215d4dcbebf55f612ed1135d0cef77b06f169da153cc8d7da7b |
from setuptools import find_packages, setup, Command
import os
from shutil import rmtree
import sys
# Package meta-data.
NAME = "sdhc"
DESCRIPTION = (
"Tools for computing spectral heat current distribution using LAMMPS simulations"
)
URL = "https://github.com/ksaaskil/shc-python-tools"
AUTHOR = 'Kimmo S"a"askila... | ksaaskil/shc-python-tools | setup.py | Python | gpl-3.0 | 4,231 | [
"LAMMPS"
] | 39b8fe8c412da26f983521e6b1b5770139dd2525e2944e854a1c5c1c8b9c7afb |
""" # lint-amnesty, pylint: disable=cyclic-import
Test utils for CCX
"""
import datetime
import pytz
from django.conf import settings
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import Course... | eduNEXT/edx-platform | lms/djangoapps/ccx/tests/utils.py | Python | agpl-3.0 | 4,140 | [
"VisIt"
] | 841e40b7ab53ba94ee50edba7e37b6f3ae348f07de0231c1c9786a795a2b1dac |
##########################################################################
#
# Copyright (c) 2016, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | andrewkaufman/gaffer | python/GafferArnoldTest/IECoreArnoldPreviewTest/RendererTest.py | Python | bsd-3-clause | 107,532 | [
"Gaussian"
] | 6d06785cd7c9c51adf95083f75f07492115165ce1e9979232115c526f5b77c85 |
# coding: utf-8
"""Test mdn.html."""
from __future__ import unicode_literals
from django.utils.six import text_type
from mdn.html import (
HTMLAttribute, HTMLAttributes, HTMLCloseTag, HTMLElement, HTMLInterval,
HTMLOpenTag, HTMLBaseTag, HTMLText, HTMLVisitor, HnElement, html_grammar)
from .base import TestCas... | renoirb/browsercompat | mdn/tests/test_html.py | Python | mpl-2.0 | 17,900 | [
"VisIt"
] | 8dc9c4590d3abff75c844d1af08586e4d49ee85dbe0bacfd6ef27eed7510fe4f |
#!/usr/bin/env python3
# Copyright (C) 2013, 2014, 2016, 2018, 2020 the PISM Authors
# This script sets up the bootstrap file.
# See also preprocess.sh.
import sys
import time
import subprocess
import argparse
import shlex
import numpy as np
try:
from netCDF4 import Dataset as CDF
except:
print("netCDF4 is ... | pism/pism | examples/labgum/preprocess.py | Python | gpl-3.0 | 6,665 | [
"NetCDF"
] | 375280a614624783af75fda67bb29738c362e800832e1c80e77c97d2ac1ffc43 |
"""
End to end tests for submitting a graded problem.
"""
from bok_choy.web_app_test import WebAppTest
from regression.pages.lms.course_page_lms import CourseHomePageExtended
from regression.pages.lms.lms_courseware import CoursewarePageExtended
from regression.pages.lms.utils import get_course_key
from regression.pa... | edx/edx-e2e-tests | regression/tests/lms/test_graded_problem.py | Python | agpl-3.0 | 1,840 | [
"VisIt"
] | 0a6d1eb921a83d41169ef9d50eaf8a7271ba2d23bad5de6a64faff5a5a1840ce |
"""Routes for tracking."""
import os
import base64
from datetime import datetime
from urlparse import urlparse
from urllib import unquote
from flask import request
from flask import Response
from flask import render_template
from flask import abort
from .. import app
from .. import db
from .. import geo
from ..models ... | bmweiner/crumby | crumby/views/tracking.py | Python | mit | 3,356 | [
"VisIt"
] | 62b421bdc25e4bb87b33a7e0eb8946d64095d6a85ba82681e92b29e122c15a00 |
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 12 14:30:12 2017
@author: danielgodinez
"""
from __future__ import print_function
import numpy as np
from scipy.integrate import quad
import peakutils
import tsfresh.feature_extraction.feature_calculators as ts
def shannon_entropy(mag, magerr):
"""Shanno... | dg7541/MicrolensingLCOGT | LIA/features.py | Python | gpl-3.0 | 21,594 | [
"Gaussian"
] | 0be5e25eff5e4fcdc6a07cfbb68ac91c6c317a06f01497224e78e0961e56fc4f |
import logging
import numpy as np
from nptyping import NDArray
from scipy.optimize import minimize
import scipy.stats as st
import Starfish.constants as C
from .kernels import global_covariance_matrix
def find_residual_peaks(
model, num_residuals=100, threshold=4.0, buffer=2, wl_range=(0, np.inf)
):
"""
... | iancze/Starfish | Starfish/models/utils.py | Python | bsd-3-clause | 7,119 | [
"Gaussian"
] | 244d3a535158f46c0d9bc05c09258341dda71e7b48a570c700c8c93a7e1ce031 |
#
# 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, software
# distributed under ... | facebook/presto | presto-docs/src/main/sphinx/conf.py | Python | apache-2.0 | 5,704 | [
"Amber"
] | eefb35448a3f215657c10b9a1e4cd4ccc13f32c19077d20ff0fa465dd46574e1 |
"""Classes and functions used by the OGGM workflow"""
# Builtins
import glob
import os
import tempfile
import gzip
import json
import time
import random
import shutil
import tarfile
import sys
import signal
import datetime
import logging
import pickle
import warnings
import itertools
from collections import OrderedDic... | OGGM/oggm | oggm/utils/_workflow.py | Python | bsd-3-clause | 139,637 | [
"NetCDF"
] | 785430f334f2926256dfef168ee08454c9e05b7b9ee4dc2ccfb3b5449165e12d |
"""Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
generate random permutation
distributions on the real line:
------------------------------
uniform
normal (Gaussian)
... | MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.2/Lib/random.py | Python | mit | 21,850 | [
"Gaussian"
] | e7093aa7c8d8487398daa56b3193515fa65e181af5a7bf712d58ff845f4b07cd |
#!/usr/bin/env python
"""
Get informations for a given production
"""
__RCSID__ = "$Id$"
import DIRAC
from DIRAC.Core.Base import Script
from DIRAC.Core.Utilities.PrettyPrint import printTable
Script.setUsageMessage('\n'.join([__doc__.split('\n')[1],
'Usage:',
... | fstagni/DIRAC | ProductionSystem/scripts/dirac-prod-get.py | Python | gpl-3.0 | 1,547 | [
"DIRAC"
] | e9cc2822ae23b7156b56fad89b6d8c9a028e6db39b963a037718af0f995d262a |
import os
import sys
import optparse
import traceback
from time import time
import numpy as np
from ase.parallel import world
from ase.visualize import view
from ase.io import read, write
from ase.io import string2index
from ase.constraints import FixAtoms
import ase.optimize
from ase.utils import Lock, devnull, prnt... | grhawk/ASE | tools/ase/tasks/task.py | Python | gpl-2.0 | 17,232 | [
"ASE"
] | f01d06c188d3850a149e9942c3ba162f73a82b78f92e56227bc684437a1eda70 |
#!/usr/bin/env python3
#### just plots a block of data on all antennas
#### usefull for health checks
import numpy as np
import matplotlib.pyplot as plt
from LoLIM.utilities import processed_data_dir
from LoLIM.IO.raw_tbb_IO import MultiFile_Dal1, filePaths_by_stationName, read_antenna_pol_flips, read_bad_antennas, ... | Bhare8972/LOFAR-LIM | LIM_scripts/examples/plot_data_block.py | Python | mit | 3,199 | [
"Brian"
] | 6db021278e2dc33a0a8b92c22a6ecc673faf885737b4545bba06a0c294bc839e |
# -*- encoding: utf-8 -*-
import urllib
import hashlib
import logging
import choices
import caching.base
from scielomanager import tools
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from django.db import (
models,
transaction,
IntegrityError,
... | jamilatta/scielo-manager | scielomanager/journalmanager/models.py | Python | bsd-2-clause | 47,268 | [
"VisIt"
] | 38cf8d260974d97719212212483e0cef3e1bbe1805d1567fd7807bb08c90f292 |
#
# This program accepts a list of variants (two modes available: SNPs [snp] / large insertions [lim])
# and returns their putative effect on genes and proteins. For that it needs a gff file and a fasta file
# of the genome.
#
# It is optimized for samples where a significant part of the mutation positions do not
# li... | davidwilson-85/easymap | varanalyzer/varanalyzer.py | Python | gpl-3.0 | 22,986 | [
"Biopython"
] | 052a8080959588c2c8985a575c1e1dba48ea247b7a51e096346263d0eec43f90 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
# create a test dataset
#
math = vtk.vtkMath()
# Note: the bigger the data the better vtkStaticPointLocator performs
#testSize = "large"
testSize = "medium"
#testSize = "small"
if testSize == "large":
numPts = 100000000
numProbes = ... | hlzz/dotfiles | graphics/VTK-7.0.0/Common/DataModel/Testing/Python/TestStaticPointLocator.py | Python | bsd-3-clause | 4,884 | [
"VTK"
] | b20325811ee5e390a888ce2b8a4522e312e5fb8d82c8b9ad7e89621118061ce9 |
# -*- coding: utf-8 -*-
"""
Test genbank feature annotations
"""
import os
import io
import csv
import pytest
from dgparse import genbank, exc
@pytest.mark.parametrize("file_name,expected_feature_count", [
('01-lentiCRISPRv2-add.gb', 19),
('02-pIB2-SEC13-mEGFP-snap.gb', 8),
('03-NM_024674-add-construct.g... | DeskGen/dgparse | tests/genbank/test_genbank_features.py | Python | gpl-2.0 | 7,607 | [
"BLAST"
] | 48622de13101a755733b019c22916ac234712ac65b454b055efdcf9234d124ce |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.