text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
import operator
from ..node import NodeVisitor
from ..parser import parse
class Compiler(NodeVisitor):
"""Compiler backend that evaluates conditional expressions
to give static output"""
def compile(self, tree, expr_data, data_cls_getter=None, **kwargs):
"""Compile a raw AST into a form with con... | anthgur/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/static.py | Python | mpl-2.0 | 6,487 | [
"VisIt"
] | b2167a70f5493ac3baaa3f7df226d3fa4d1f01b344783c0b9cc46c7cda3190d1 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Copyright (C) 2020 Stoq Tecnologia <http://www.stoq.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 Software Foundation;... | stoq/stoq-server | stoqserver/lib/test/test_restful.py | Python | gpl-2.0 | 20,135 | [
"VisIt"
] | 2f07dfb95eef3ba5b465885b3b674b677ad60caef4f67ae964fe12753e0c11cc |
#!/usr/bin/python
#
# www.darkc0de.com
# code : low1z
# name : darkKML.py
# version : 0.3
#
# this script requires GeoIP
# LINUX ONLY
#
# change the installation path of geoip after installation
import socket, sys, urllib2
try:
import GeoIP
except:
print "\nGeoIP Module/Database NOT found, try:"
... | knightmare2600/d4rkc0de | others/darkKML.py | Python | gpl-2.0 | 5,408 | [
"VisIt"
] | 01b8f10cce6915cfc7655b9218d8672ea41ce5e1a1416c7056b997f18360f4d5 |
"""
Gauss' Law of Electrostatics
============================
Here we use the discretize package to solve for the electric potential
(:math:`\phi`) and electric fields (:math:`\mathbf{e}`) in 2D that result from
a static charge distribution. Starting with Gauss' law and Faraday's law:
.. math::
&\\nabla \\cdo... | simpeg/discretize | tutorials/pde/1_poisson.py | Python | mit | 5,115 | [
"DIRAC"
] | 82c4caa50ef7b5332f02ac74d0fd2fa0f9176d834044896c968f338b3aaf24e9 |
"""
==========================
FastICA on 2D point clouds
==========================
This example illustrates visually in the feature space a comparison by
results using two different component analysis techniques.
:ref:`ICA` vs :ref:`PCA`.
Representing ICA in the feature space gives the view of 'geometric ICA':
ICA... | shyamalschandra/scikit-learn | examples/decomposition/plot_ica_vs_pca.py | Python | bsd-3-clause | 3,340 | [
"Gaussian"
] | e3bc1d79c245162f2849c6c8c810e0e1e4aa315651c4a42d1538929a7c6ccec9 |
from collections import namedtuple
from itertools import groupby
from .instance_lru import lru_cache
CODE2CIGAR = "MIDNSHP=XB"
CIGAR2CODE = dict([y, x] for x, y in enumerate(CODE2CIGAR))
CIGAR = namedtuple('CIGAR', 'operation length')
MATCH = 0
INSERTION = 1
DELETION = 2
SOFT_CLIP = 4
HARD_CLIP = 5
# Op BAM Descrip... | bardin-lab/readtagger | readtagger/cigar.py | Python | mit | 14,235 | [
"BWA"
] | cbb52d61f4d927f2d6d2a7cf19cf753d2008e9bb678281feee9797e1686c98d9 |
import xmlrpclib
from SimpleXMLRPCServer import SimpleXMLRPCServer
from SocketServer import ThreadingMixIn
import tempfile
import os
import shutil
import glob
import string
import subprocess
import threading
from lxml import etree
# Threadpool needed
from multiprocessing import Pool
# This function calc the energy a... | zxjzxj9/MDTools | svrtest/PIserver.py | Python | bsd-3-clause | 4,842 | [
"SIESTA"
] | cc5a38fa000c29ed370d808fcb6738d96b31f6ceebb46ca72931ff6f9737aa37 |
"""cursor.py - Cursor handler."""
import gobject
import gtk
NORMAL, GRAB, WAIT = range(3)
class CursorHandler:
def __init__(self, window):
self._window = window
self._timer_id = None
self._auto_hide = False
self._current_cursor = NORMAL
def set_cursor_type(self, cursor):
... | bloopletech/Comix | src/cursor.py | Python | gpl-2.0 | 2,243 | [
"FLEUR"
] | a4a301e33d58065eef160818475a9a7f3e567e672de7ea57d4c0045e3cb7bba7 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django.contrib.au... | electrolinux/pootle | pootle/core/initdb.py | Python | gpl-3.0 | 9,241 | [
"VisIt"
] | feb82cafb576518864978a541fad25b940d38622837084d0e11c9608ba895a61 |
# 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... | AnishShah/tensorflow | tensorflow/python/ops/distributions/distribution.py | Python | apache-2.0 | 43,623 | [
"Gaussian"
] | 10a1caa63a9dcdc59826e01c8b2e570b38d6f6913345332157b5b31124332ab8 |
"""
1. Gather blasted bacteriocins and context genes
2. Cluster bacteriocins and context genes
3. Run naive bayes to classify individual bacteriocins/context genes
4. Run majority vote to classify entire clustesr
"""
import Bio
from Bio import SeqIO, SeqFeature
from Bio.SeqRecord import SeqRecord
from collections im... | idoerg/BOA | src/pipeline/sim_pipeline.py | Python | gpl-3.0 | 8,944 | [
"BLAST"
] | db2c479c0550c8b240885431b6f036a4530bd31ca657f6c4701ffabae8d05629 |
#!/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... | clreinki/GalaxyHarvester | message.py | Python | agpl-3.0 | 4,303 | [
"Galaxy"
] | cb80d4e2bde67f89834937a2ca3c9ef556d4e94f1643619e91d848aea066f259 |
"""
UI-level acceptance tests for OpenAssessment.
"""
import os
import unittest
import time
from functools import wraps
from nose.plugins.attrib import attr
from bok_choy.web_app_test import WebAppTest
from bok_choy.promise import BrokenPromise
from auto_auth import AutoAuthPage
from pages import (
SubmissionPage, ... | kursitet/edx-ora2 | test/acceptance/tests.py | Python | agpl-3.0 | 6,753 | [
"VisIt"
] | a3addf405102e29be5cb3d6873b6f3e81352cb7684a1820c3e93ba08c18afa41 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to fitting models with quantity parameters
"""
import numpy as np
import pytest
from ..models import Gaussian1D
from ... import units as u
from ...units import UnitsError
from ...tests.helper import assert_quantity_allclose
from .... | DougBurke/astropy | astropy/modeling/tests/test_quantities_fitting.py | Python | bsd-3-clause | 4,165 | [
"Gaussian"
] | 17d0e5f146f144cda41b9d4cfa35a4afc4aa8d385b9203a5019cb06ae2763e28 |
# Copyright (c) 2016-present, Facebook, Inc.
#
# 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... | Yangqing/caffe2 | caffe2/python/layers/semi_random_features.py | Python | apache-2.0 | 6,625 | [
"Gaussian"
] | 4045e5519317f9ca96bfdd65fad9206821352f3fa5f3a7a95c05e793be73bff5 |
# -*- coding: utf-8 -*-:
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""
This module contains the basic API for splinter drivers and elemnts.
"""
from splinter.meta import InheritedDocs
from splinter.req... | lrowe/splinter | splinter/driver/__init__.py | Python | bsd-3-clause | 20,713 | [
"VisIt"
] | 43e473fabb25f6ff5e39e936cc1831067270f586bbc3b6985fb1646995e94a46 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | abdasgupta/kubernetes | cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py | Python | apache-2.0 | 29,651 | [
"CDK"
] | 313447d43932407f070da2c3e818b4b5e6b7741da088b77470dcad7a7af87107 |
# -*- coding: utf-8 -*-
"""
karnickel
~~~~~~~~~
AST macros for Python.
:copyright: Copyright 2010 by Georg Brandl.
:license: BSD, see LICENSE for details.
"""
import os
import ast
import imp
import new
import sys
from copy import deepcopy
from itertools import izip
def macro(func):
"""Decor... | macro/karnickel | karnickel.py | Python | bsd-2-clause | 10,788 | [
"VisIt"
] | 6bffa37ace27fb5e92454ee68594332aa3c55bb394249e7eb8cd64bde2cf8e23 |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | Kleptobismol/scikit-bio | skbio/stats/ordination/_canonical_correspondence_analysis.py | Python | bsd-3-clause | 9,596 | [
"scikit-bio"
] | e40e62e9f42d81b7c0979505541236d7142f0d8377e4b34e5e355a1682c3b032 |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string, optparse, subprocess
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','desc... | cw-miyashita/cw_ac2013_timods | build.py | Python | mit | 8,790 | [
"VisIt"
] | 7d900600e0ae0063ca70ddc34200ca13383952be35975220af1ec51fe1f57327 |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
# Andrew Dykstra <andrew.r.dykstra@gmail.com>
# Teon Brooks <teon.brooks@gmail.c... | pravsripad/mne-python | mne/channels/channels.py | Python | bsd-3-clause | 75,044 | [
"Mayavi"
] | 52fc5d16d0693822a0c9644fe69317e1310bdb7177f7b8449575e4f5ed9481e4 |
# coding=utf-8
# !/usr/bin/env python
import sys
try:
from setuptools import setup
except ImportError:
sys.stderr.write('using distutils\n')
from distutils.core import setup
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
name='amber-python-drivers',
packages=[
... | showmen15/testEEE | setup.py | Python | mit | 2,675 | [
"Amber"
] | 747c4014389e8d22f9783c8dceda46cd66ac175726b177775178e5fd981ce1e6 |
#!/usr/bin/env python
"""
# Created: Mon, 18 Mar 2013 11:57:13 +1000
Quick example test of binCrisp script. Just run 'python binCrisp.py -v'.\
Requires remote file list. (Default: fas-loc in runex dir)
Dependencies include:
* Python 2.7+
* pilercr must be installed and on PATH: http://www.drive5.com/... | happykhan/binCrisp | runex/binCrisp-Example.py | Python | gpl-3.0 | 5,548 | [
"BLAST",
"Biopython"
] | 67216f0b6e02864bbfd14ee0c3013dff8b12d17d4a2f621e6e00826917ff7b57 |
import pandas as pd
import sys, os, csv
from scipy.optimize import curve_fit
from helper import *
#from cobra.manipulation import remove_genes, undelete_model_genes
#from cobra.flux_analysis import single_gene_deletion
from cobra.flux_analysis.parsimonious import optimize_minimal_flux
sys.path.append(os.path.expanduser... | dandanvidi/capacity-usage | scripts/untitled3.py | Python | mit | 5,683 | [
"Avogadro"
] | 68621b3ba21ca7b74f923c08f442c074ab249ca5919ecc48e13280013c0c5e0a |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | KaiSzuttor/espresso | testsuite/python/elc.py | Python | gpl-3.0 | 2,384 | [
"ESPResSo"
] | 4b9a7079f5505b3a53c724ce42b1c20b5a726b9ea188677661f9440df8d1c0fa |
__author__ = 'Mikhail Pedrosa <mikhailj.pedrosa@gmail.com> e Arthur Costa <arthur.opa@gmail.com>'
__description__ = 'Methods for Plot Images, Vector and Graphs'
__version__ = '0.1'
__date__ = '13/04/2015'
import pyart
import wradlib as wrl
import matplotlib.pyplot as plt
from filters import *
from memory_profiler impo... | mikhailpedrosa/radar_wind | graphical.py | Python | gpl-2.0 | 10,473 | [
"Gaussian"
] | b5d1c502b1e8358908f6edb16bf786a2b4c2c2c6f167ca96cd2f3d5ea3aa528a |
from time import gmtime, strftime
import logging
import iris.cube
import iris.std_names
import numpy as np
from cis.data_io.common_data import CommonData, CommonDataList
from cis.data_io.hyperpoint import HyperPoint
from cis.data_io.hyperpoint_view import GriddedHyperPointView
import six
def load_cube(*args, **kwar... | cedadev/cis | cis/data_io/gridded_data.py | Python | lgpl-3.0 | 26,821 | [
"NetCDF"
] | ed9bcc5a99649b53580b9c28ac8aabae20e06e8fd09dbcd1c7030d9e68c87cb9 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | skosukhin/spack | var/spack/repos/builtin/packages/jmol/package.py | Python | lgpl-2.1 | 1,973 | [
"Jmol"
] | 4106547aad27d30f5de96fc6179efe8216ac799b33c86310b90cd53caf8c74e0 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgarren/spack | var/spack/repos/builtin/packages/trilinos/package.py | Python | lgpl-2.1 | 27,389 | [
"NetCDF"
] | 721ef1d0a51fc5c6e7b0322ae611216bcf55f68361a7f71893445292bac66f6f |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Paper classes.
"""
__author__ = "Cristóbal Carnero Liñán"
__copyright__ = "Copyright 2011, GEB (Universidad de Málaga)"
__credits__ = ["Cristóbal Carnero Liñán", ] # Code writers, bug reporters, suggestions, ...
__license__ = ""
__version__ = "0.0.2"
__maintainer__ = "Crist... | BlogomaticProject/Blogomatic | opt/blog-o-matic/lib/paper.py | Python | gpl-2.0 | 3,165 | [
"Biopython"
] | 88a583c4b919341ba89499a92ae68227b9920fba2853d37e42e9a0ba3e802159 |
"""
"""
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.CFG import CFG
from DIRAC.Core.Utilities import List
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.Core.Utilities.JDL import loadJDLAsCFG, dumpCFGAsJDL
from DIRAC.WorkloadManagementSystem.Agent.SiteDirector import... | fstagni/DIRAC | WorkloadManagementSystem/Client/JobState/JobManifest.py | Python | gpl-3.0 | 8,349 | [
"DIRAC"
] | e9ae8a965a68ab41895e68e77a8fdc396c3de297c501a6c02651f55a62ee7435 |
"""AmplitudeHistogram view plugin.
This plugin adds a matplotlib view showing amplitude histograms for
the selected clusters. The percentage of undetected spikes for selected
clusters are estimated by fitting a gaussian function with a cutoff,
and displayed on the command line.
To activate the plugin, copy this file ... | CINPLA/expipe-dev | phy-contrib/phycontrib/views/amplitude_histogram.py | Python | gpl-3.0 | 6,399 | [
"Gaussian"
] | b93660af9ccf083d7af98555035115f87539804043cc3c0fb0c29d73e7e082a1 |
""" This module contain solvers for all kinds of equations:
- algebraic, use solve()
- recurrence, use rsolve()
- differential, use dsolve()
- transcendental, use tsolve()
- nonlinear (numerically), use nsolve()
(you will need a good starting point)
"""
from sympy.core.compatibility imp... | minrk/sympy | sympy/solvers/solvers.py | Python | bsd-3-clause | 44,846 | [
"Gaussian"
] | 4fa1c1fc43c1ebba6ec07e5caf34be366f78e9dc92b76cad4fddae603f445a5d |
#!/usr/bin/env python
'''
The MIT License (MIT)
Copyright (c) <2016> <Mathias Lesche>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | mlesche/dsp | dsp/src/report_scripts/calculate_mappingstatistics.py | Python | mit | 22,545 | [
"BWA",
"pysam"
] | c46d6cfb42885a42de8839c3be3d4c04b093999c0d06dc1b163c938e0ba34ecc |
# -*- coding: utf-8 -*-
"""
celery.datastructures
~~~~~~~~~~~~~~~~~~~~~
Custom types and data structures.
"""
from __future__ import absolute_import, print_function, unicode_literals
import sys
import time
from collections import defaultdict, Mapping, MutableMapping, MutableSet
from heapq import heapify... | sunze/py_flask | venv/lib/python3.4/site-packages/celery/datastructures.py | Python | mit | 18,647 | [
"VisIt"
] | 9acb597e8d57faf19c85c8a7aa29077b00042d5459c146ac2a5fa2af167e3bef |
"""
cclib (http://cclib.sf.net) is (c) 2006, the cclib development team
and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html).
"""
__revision__ = "$Revision: 668 $"
import re
import numpy
import logfileparser
import utils
class ORCA(logfileparser.Logfile):
"""An ORCA log file."""
def __ini... | keceli/RMG-Java | source/cclib/parser/orcaparser.py | Python | mit | 14,842 | [
"Gaussian",
"ORCA",
"cclib"
] | 6fbf83880dd852293ef7882f9f0526eaa4b4560c0a21a6724c2a97ac331eae46 |
"""
Filename: gth_solve.py
Author: Daisuke Oyama
Routine to compute the stationary distribution of an irreducible Markov
chain by the Grassmann-Taksar-Heyman (GTH) algorithm.
"""
import numpy as np
try:
xrange
except: # python3
xrange = range
def gth_solve(A, overwrite=False):
r"""
This routine c... | chenxulong/quanteco | quantecon/gth_solve.py | Python | bsd-3-clause | 3,053 | [
"Gaussian"
] | 57ea1e173be4b3de265292f7ec55ac830893ac94bf3ecac5298ef6f5e1d02011 |
# coding: utf-8
# In[ ]:
import numpy as np
'''Handles analytically deconvoving two Gaussians and finding of a common beam.'''
def quadratic2elliptic(A,B,C,D=0,E=0,F=-np.log(2)):
"""Invert:
(A0 cos^2 phi + c0 sin^2 phi)k = A
(A0-C0)sin 2phi k = B
(a0 sin^2 phi + c0 cos^2 phi) k = C
returns bma... | Joshuaalbert/RadioAstronomyThings | src/rathings/notebooks/BeamDeconvolution.py | Python | apache-2.0 | 14,134 | [
"Gaussian"
] | a8c576eb14f4e952be6508d2b64751f40fc1c69ccbb56e92341fc5dc8cd985f7 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This script aims at constructing a logistic regression model to explain the uv upturn of early-type galaxies in
redshift.
The model consists in a Bayesian Logistic Regression
@author: Maria Luiza Linhares Dantas
@date: 2017.09.20
@version: 0.0.1... | mdastro/UV_ETGs | Coding/Model/logit.py | Python | mit | 3,218 | [
"Galaxy"
] | bf5d097a35769229f5c6be24905f225a2c3b17a5e02320a1fcdda2c0da7e1d57 |
import ast
import re
import warnings
from operator import attrgetter
from hyperopt import space_eval
class ImportParser(ast.NodeVisitor):
def __init__(self):
self.lines = []
self.line_numbers = []
def visit_Import(self, node):
line = 'import {}'.format(self._import_names(node.names))... | pkainz/hyperas | hyperas/utils.py | Python | mit | 5,784 | [
"VisIt"
] | 9985166c1b763a7f47aaf608fad9c109cd20096195d0eea03c36ae1f35bc4971 |
"""
cclib (http://cclib.sf.net) is (c) 2006, the cclib development team
and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html).
"""
__revision__ = "$Revision: 861 $"
import numpy
import logfileparser
import utils
class ADF(logfileparser.Logfile):
"""An ADF log file"""
def __init__(self, *arg... | faribas/RMG-Java | source/cclib/parser/adfparser.py | Python | mit | 36,017 | [
"ADF",
"cclib"
] | 101ab244168321082e75102073e9d5c3102e868e021a0d58f318774051570b08 |
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 16 17:56:14 2016
@author: agiovann
"""
import os
import cv2
import h5py
import numpy as np
import pylab as pl
from glob import glob
# import ca_source_extraction as cse
import calblitz as cb
from scipy import signal
import scipy
import sys
from ipyparallel import Client
f... | agiovann/CalBlitz | calblitz/granule_cells/utils_granule.py | Python | gpl-3.0 | 44,647 | [
"NEURON"
] | 7bee6b8b6f56393d2e3142a27f6d20b97ca389ee853909fcc65a4cbafbf657cd |
# Turta IoT HAT Helper for Raspbian
# Distributed under the terms of the MIT license.
# Python Driver for Bosch Sensortec BME680 Environmental Sensor
# Version 1.01
# Updated: July 14th, 2018
# Visit https://docs.turta.io for documentation.
import time
import math
from enum import IntEnum
from smbus import SMBus
#E... | Turta-io/IoTHAT | DriverSource/Raspbian/Python/Turta_BME680.py | Python | mit | 22,247 | [
"VisIt"
] | 44fe8a4b6b100052ca2636ee5ba16b94cc0e592cf4a0006a56520e4fd1e4a267 |
#!/usr/bin/env ipython
from pylab import *
import numpy as np
from scipy.io.netcdf import netcdf_file
import os, sys
import matplotlib.patches as patches
import matplotlib.transforms as transforms
from numpy import array
from matplotlib.gridspec import GridSpec
import matplotlib.pyplot as plt
from os.path import isdir,... | jimsrc/seatos | mixed.icmes/src/report/tt2.py | Python | mit | 11,197 | [
"NetCDF"
] | cbe32325e042745af6536b353a2cfee28a0224ee399d5c5a012946750f67cfe7 |
import math
import logging
from decimal import Decimal
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# TODO: do the moe by adding all component MOEs instead of doing them at addition/subtraction
class Value(object):
""" Represents a value from any Census data source.
MOE, if applicable... | 216software/Profiles | communityprofiles/census/data.py | Python | mit | 6,712 | [
"MOE"
] | 2bf113f2d8bcdef91cac8a1f96e5035cf6bad8845d6f8bdb5acb16c04cf745e3 |
import logging
from mayavi.modules.api import Surface, Glyph
from mayavi.tools.tools import _typical_distance
from tvtk.tvtk_classes.sphere_source import SphereSource
from simphony.core.cuba import CUBA
from simphony.cuds.abc_mesh import ABCMesh
from simphony.cuds.abc_particles import ABCParticles
logger = logging.g... | simphony/simphony-mayavi | simphony_mayavi/modules/default_module.py | Python | bsd-2-clause | 2,505 | [
"Mayavi"
] | 2c4e4aa953a6e0f22a8d272b74ea160d0e941b851121e858ff6e9e0a9307c88a |
#! /usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-stager-stage-files
# Author : Daniela Remenska
########################################################################
"""
- submit staging requests for a particular Storage Element! Default D... | sposs/DIRAC | StorageManagementSystem/scripts/dirac-stager-stage-files.py | Python | gpl-3.0 | 2,833 | [
"DIRAC"
] | d38619170dfa280c1e064c54bbdf7371762fad5b8214f96a5e61f6190bebb3dd |
from abc import ABCMeta
from abc import abstractmethod
from string import Template
try:
from StringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
try:
from six import text_type
except ImportError:
from galaxy.util import unicodify as text_type
try:
from urllib import urlen... | jmchilton/pulsar | pulsar/client/interface.py | Python | apache-2.0 | 5,687 | [
"Galaxy"
] | 36908a0579eb7082475231b2a719ec8693ab8d0b6f24918ba82717e3e9fa744e |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/Cookies.py | Python | gpl-3.0 | 3,549 | [
"ORCA"
] | 72a28188eeeb5468498a77d62a2410c37f3be76e7d2f9ef8e3e4601417d46a62 |
# 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 NetcdfC(AutotoolsPackage):
"""NetCDF (network Common Data Form) is a set of software libra... | iulian787/spack | var/spack/repos/builtin/packages/netcdf-c/package.py | Python | lgpl-2.1 | 11,002 | [
"NetCDF"
] | d10b220dcf5d5ddd9f65765aa3593b3812baa37f18863914f740350e69e19cb7 |
"""
$Id$
"""
__version__='$Revision$'
import unittest, copy, shutil, tempfile
from numpy.testing import assert_array_equal
from param import normalize_path,resolve_path
import topo
import __main__
from topo.base.sheet import Sheet
from topo.sheet import GeneratorSheet
from topo.command.basic import save_snapshot,lo... | jesuscript/topo-mpi | topo/tests/testsnapshots.py | Python | bsd-3-clause | 2,638 | [
"Gaussian"
] | ed6bf7f741bcbaaae92af93a1b0dde763c3d53c8abebb8ca956fdbb443a850bd |
"""The registration module contains classes for image registration.
Image registration aims to align two images using a particular transformation.
miapy currently supports multi-modal rigid registration, i.e. align two images of different modalities
using a rigid transformation (rotation, translation, reflection, or t... | mrunibe/MIALab | mialab/filtering/registration.py | Python | apache-2.0 | 16,112 | [
"Gaussian"
] | fa42eafc7eca9d995a11c58cfb6bb85afe22b30e9d1acd3c5f145e320f2adc1b |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-pilot-summary
# Author : Stuart Paterson
########################################################################
__RCSID__ = "$Id$"
# pylint: disable=wrong-import-position
import DIRAC
from DIRAC.... | andresailer/DIRAC | Interfaces/scripts/dirac-admin-pilot-summary.py | Python | gpl-3.0 | 624 | [
"DIRAC"
] | 8b8441994f77a72b46421188d456f1adf43c2c6821f7937faeb4fc1d6bfd67df |
#!/usr/bin/env python
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation
Required: Python 2.1 or later
Recommended: Python 2.3 or later
Recommended: CJKCodecs... | directeur/socnode | network/feedparser.py | Python | mit | 154,919 | [
"NetCDF",
"VisIt"
] | 900f577c33fe4bf09381718e8bf9c7156da386dde2e1ade454344c56c145c956 |
import theano
import numpy
import collections
from theano import tensor as TT
from neuron import Neuron
# an example of implementing a rate-mode neuron
class LIFRateNeuron(Neuron):
def __init__(self, size, dt=0.001, tau_rc=0.02, tau_ref=0.002):
"""Constructor for a set of LIF rate neuron
... | printedheart/opennars | nars_gui/src/main/python/nef_theano/neuron/lif_rate.py | Python | agpl-3.0 | 2,092 | [
"NEURON"
] | ede43e869df0e71db6df3528accc8742550172f044834c6844a42d136195bd21 |
"""
NetCDF reader/writer module.
This module is used to read and create NetCDF files. NetCDF files are
accessed through the `netcdf_file` object. Data written to and from NetCDF
files are contained in `netcdf_variable` objects. Attributes are given
as member variables of the `netcdf_file` and `netcdf_variable` objects... | sargas/scipy | scipy/io/netcdf.py | Python | bsd-3-clause | 30,912 | [
"NetCDF"
] | 8e8065ce9e1f1502421bb289e7ed594764e025b58cb6e7d0261c9592ff18d2a8 |
# coding=UTF-8
import pytest
import psycopg2
from pgspecial.main import PGSpecial
from pgcli.packages.function_metadata import FunctionMetadata
from textwrap import dedent
from utils import run, dbtest, requires_json, requires_jsonb
@dbtest
def test_conn(executor):
run(executor, '''create table test(a text)''')
... | darikg/pgcli | tests/test_pgexecute.py | Python | bsd-3-clause | 9,553 | [
"MOE"
] | 819f1d86c33f00f6a3627afc17239bb60f13548c36a855ba00d40fdce0984edc |
# Copyright (C) 2003 CAMP
# Please see the accompanying LICENSE file for further information.
import os
import time
import xml.sax
import numpy as np
import ase
from ase.version import version as ase_version
import gpaw
try:
#new style cmr io
import cmr
from cmr.base.converter import Converter
from... | qsnake/gpaw | gpaw/io/cmr_io.py | Python | gpl-3.0 | 7,487 | [
"ASE",
"GPAW"
] | 2fd75eb2d9baffd921e612f1ad0fb16f64a8600fafb8242e9fece4346332da56 |
import arrow
from django.apps import apps as django_apps
from django.db.models.deletion import ProtectedError
from edc_facility import FacilityError
from .appointment_creator import AppointmentCreator, CreateAppointmentError
class AppointmentsCreator:
appointment_creator_cls = AppointmentCreator
def __in... | botswana-harvard/edc-appointment | edc_appointment/creators/appointments_creator.py | Python | gpl-2.0 | 3,199 | [
"VisIt"
] | 08088747d3ea3baf0aa7f4488d8edc2b7bab464e928899acccf47745b924bb47 |
#!/galaxy/home/mgehrin/hiclib/bin/python
"""
Find continuous regions that are covered by the first bed file (`bed_file_1`)
but not by the second bed file (`bed_file_2`)
usage: %prog bed_file_1 bed_file_2
"""
import sys
from warnings import warn
from bx.bitset_builders import binned_bitsets_from_file
from bx.cookbook... | bxlab/HiFive_Paper | Scripts/HiCLib/bx-python-0.7.1/build/scripts-2.7/bed_subtract_basewise.py | Python | bsd-3-clause | 1,073 | [
"Galaxy"
] | 2eee078ee1648776fff4587602cd042b5d1988d22b011056c6b507b5f537c2ff |
from nose.tools import assert_equal
import deeptools.estimateReadFiltering as est
import deeptools.alignmentSieve as sieve
import os.path
from os import unlink
import hashlib
import pysam
ROOT = os.path.dirname(os.path.abspath(__file__)) + "/test_data/"
BAMFILE_FILTER = ROOT + "test_filtering.bam"
BEDFILE_FILTER = RO... | fidelram/deepTools | deeptools/test/test_readFiltering.py | Python | gpl-3.0 | 6,045 | [
"pysam"
] | 7bd8d45a097d5eaa44e9a457cbaeed4e3ca2aee4cf3cbefce8d087e19e47841b |
from __pyshell__ import *
class MD_Operator(object):
def __init__(self):
seed = int(np.random.uniform(1,1000000)+0.5)
self.mdrun_cmd = ''
self.grompp_cmd = ''
self.tag = 'MD_'
self.opt ={'_INTEGRATOR' : 'md', # steep md sd ...
'_DT' : 0.001,
'_NSTEPS... | 12AngryMen/votca-scripts | lib/Carlstuff/__mdshell__.py | Python | apache-2.0 | 12,954 | [
"Gromacs"
] | ca4306025d5a1aacab0e284932e743ba6163e4bed8449b89c2b30cadb3d3123e |
#!/bin/env python
import subprocess,pysam, sys, re
def namesortbam(inbam,outbam):
print "sorting by name:",inbam,"-->",outbam
outbam = re.sub('.bam$','',outbam)
sortargs = ['samtools','sort','-n','-m','20000000000',inbam,outbam]
subprocess.call(sortargs)
def compare(bamfile1,bamfile2):
bam1sort ... | chaelir/bamsurgeon | etc/comparemapping.py | Python | mit | 2,109 | [
"pysam"
] | 73d0513a004a28cef152e26027770deea06421fe02ca44f9d79227318e9b4951 |
import re
from setuptools import setup
def remove_extra_line(text):
text = text.split('\n')
i = 0
while i < len(text):
m = re.match(r'\s*:alt:\s*(\w*).*', text[i])
if m:
alt_text = m.group(1)
i += 1
while i < len(text):
if alt_text in tex... | terencezl/pydass_vasp | setup.py | Python | mit | 1,697 | [
"VASP"
] | c4231d584e6e886fba2191ad045ddb2292a1254254e987ef099fa3a1bdb15ec8 |
import os
import sys
# setting the absolute path of the previous directory
# getting the this py module path by __file__ variable
# pass that __file__ to the os.path.dirname, returns the path of this module
__curDir__ = os.path.dirname(__file__)
diagDir = os.path.abspath(os.path.join(__curDir__, '../..'))
# adding the ... | arulalant/mmDiagnosis | diagnosis1/miso/harmonic/extract_JJAS_obs_anomaly.py | Python | gpl-3.0 | 3,431 | [
"NetCDF"
] | 1a3a114cab489e5481d3fa81c4c6fdada96ca646448e42a4eae39b04d2b552ee |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Input Generator and Parser
###############################
"""
from .editor import Editor
_template = """\
{seward}
{calc}
{postcalc}
"""
_seward = """\
&SEWARD &END
Title
... | exa-analytics/exatomic | exatomic/molcas/inputs.py | Python | apache-2.0 | 6,379 | [
"MOLCAS"
] | bbbd2fe85579258242edcf63e20df99476ed3bd10bb4442bb5a92adb6cbd81ee |
#=====================================================================================================================================
#Copyright
#=====================================================================================================================================
#Copyright (C) 2014 Alexander Blaessle... | alexblaessle/PyFRAP | pyfrp/gui/pyfrp_gui_analysis_dialogs.py | Python | gpl-3.0 | 11,496 | [
"Gaussian"
] | 01eb8385532594d52513320283f2b796aa806a4580b412c734fc0848f48df917 |
''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html '''
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.ops import rnn
import random
import matplotlib.pyplot as plt
import re, string
from sklearn.feature_extraction.text import CountVectorizer
from collections impo... | dricciardelli/vae2vec | def_def_var.py | Python | mit | 36,348 | [
"Gaussian"
] | 7859d419a3c625920a03aba010d3355a94949472bd94332e876c0927f90d6f6c |
#!/usr/bin/python
# twitter help:
# http://www.dototot.com/reply-tweets-python-tweepy-twitter-bot/
import httplib
import httplib2
import os
import random
import sys
import time
from apiclient.discovery import build
from apiclient.errors import HttpError
from apiclient.http import MediaFileUpload
from oauth2cli... | sloev/obama_puppet | Modules/youtubeapi.py | Python | gpl-2.0 | 6,689 | [
"VisIt"
] | cb7717b98d0c375f7091b3ea98541802ab29eeccd2d9863b52d1fbf46a966d9f |
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/eventcal.py
# Event Calendar widget
# author: Andy Robinson
__version__=''' $Id$ '''
__doc__="""This file is a
"""
from reportlab.lib import colors
from reportlab.lib.validato... | Microvellum/Fluid-Designer | win64-vc/2.78/python/lib/reportlab/graphics/widgets/eventcal.py | Python | gpl-3.0 | 13,239 | [
"Brian"
] | 66a87e0d80a68d5af00dd524030fdc8749aa7955d09d2de8f79930826b911e19 |
import time
import pytest
import numpy as np
import multiprocessing
import psi4
# Test below is fine on its own but erratic through pytest. Most likely
# to succeed as first test collected, so here it lies.
@pytest.mark.xfail(True, reason='threading treatment suspect', run=True)
def disabled_test_threaded_blas():
... | CDSherrill/psi4 | tests/pytests/test_aaa_profiling.py | Python | lgpl-3.0 | 1,796 | [
"Psi4"
] | 4279818eed458356220ba5ef0a01b50a959a0922cf9befff7207668f5dcba658 |
# coding: utf-8
from .util import StopWatch
class RequestsBackend(object):
"""
HTTP backend using Requests
"""
def __init__(self, *args, **kwargs):
super(RequestsBackend, self).__init__(*args, **kwargs)
self._r = None
self._roundtrip = None
import requests
self... | ahri/pycurlbrowser | pycurlbrowser/backend/req.py | Python | agpl-3.0 | 1,815 | [
"VisIt"
] | 1352dc76b09908fb25e833f45266dea7acf0ace09550764c55cf16e63a315f24 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import numpy as np
from pymatgen.analysis.magnetism.jahnteller import JahnTellerAnalyzer, Species
from pymatgen.io.cif import CifParser
from pymatgen.util.testing import PymatgenTest
class JahnTel... | materialsproject/pymatgen | pymatgen/analysis/magnetism/tests/test_jahnteller.py | Python | mit | 5,038 | [
"pymatgen"
] | 2ccdc83d869513ecf1bbfde0f4185e702a8615c195a40127b18eba203ef797c2 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | h3biomed/ansible | lib/ansible/modules/network/avi/avi_pool.py | Python | gpl-3.0 | 20,389 | [
"VisIt"
] | 6366e8bca7c6cebae40f53228614b5d48c04664180b401e211157e77721c1c9a |
# 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... | wangyum/tensorflow | tensorflow/contrib/distributions/python/ops/mvn_diag_plus_low_rank.py | Python | apache-2.0 | 9,693 | [
"Gaussian"
] | 0a2a60707b5b2e435f32131fda24a4bf11372e1e93fc9257e6acc4db531df5ed |
""" SandboxMetadataDB class is a front-end to the metadata for sandboxes
"""
__RCSID__ = "$Id$"
import types
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.Base.DB import DB
from DIRAC.Core.Utilities import List
from DIRAC.Core.Security import Properties, CS
class SandboxMetadataDB( DB ):
def __init__(... | hgiemza/DIRAC | WorkloadManagementSystem/DB/SandboxMetadataDB.py | Python | gpl-3.0 | 16,694 | [
"DIRAC"
] | a44be6535c4a7ab1d061eb25eed7eda4baaac952998bfcaa24704fa0bb9f4870 |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
###########################################################################
# #
# ESPResSo++ Benchmark Python script for a polymer melt #
# ... | acfogarty/espressopp | bench/polymer_melt/espressopp/espressopp_polymer_melt.py | Python | gpl-3.0 | 5,227 | [
"ESPResSo",
"Gromacs",
"LAMMPS"
] | 479f469ecb311b756d47af17a25a3f6d8513cc22d0308c27449ce35f60f80b98 |
# -*- coding: utf-8 -*-
# Django settings for seahub project.
import sys
import os
import re
from seaserv import FILE_SERVER_ROOT, FILE_SERVER_PORT, SERVICE_URL
PROJECT_ROOT = os.path.join(os.path.dirname(__file__), os.pardir)
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.c... | saukrIppl/seahub | seahub/settings.py | Python | apache-2.0 | 20,942 | [
"VisIt"
] | fd66df65b2a69f494a9a4b2e32f6e4507f26971849a9cc969dac68953b078f91 |
#
# Exercises from http://learnpythonthehardway.org
#
print
# Exercise 1
print "Really? :)"
print "I'm not writing a hello world, am I?"
print 'No way!!! Where\'s the link to the next exercise?'
print 'Oh, right, "double quotes" in print; next, please'
print
# Exercise 2
print "I think my previous code shows that I... | CodeCatz/litterbox | Goranche/goranche.py | Python | mit | 1,530 | [
"Galaxy"
] | b2431c4a1ad35fe320c39caa4ea1b1a3567e8964a63f6ec2863258bfd07e787e |
from __future__ import absolute_import
from __future__ import print_function
import matplotlib.pyplot as plt
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd.numpy.linalg import solve
import autograd.scipy.stats.multivariate_normal as mvn
from autograd import value_and_grad
from scipy.opti... | blutooth/gp-svi | examples/gaussian_process.py | Python | mit | 4,122 | [
"Gaussian"
] | f50a42378839784a2132eef067494c5a844b892e65a46cefed4693d6f0cf315a |
# Copyright (C) 2012,2013,2019
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of ... | espressopp/espressopp | src/esutil/RNG.py | Python | gpl-3.0 | 1,746 | [
"ESPResSo"
] | 8ad2ec5ee11e064b200fbb531e61bcc243ffeb971dc53378f62145fcfcffbb16 |
import unittest
import numpy as np
import pysal.lib
import pysal.model.spreg.diagnostics_tsls as diagnostics_tsls
import pysal.model.spreg.diagnostics as diagnostics
from pysal.model.spreg.ols import OLS as OLS
from pysal.model.spreg.twosls import TSLS as TSLS
from pysal.model.spreg.twosls_sp import GM_Lag
from scipy.s... | lixun910/pysal | pysal/model/spreg/tests/test_diagnostics_tsls.py | Python | bsd-3-clause | 2,068 | [
"COLUMBUS"
] | a34bb2781e0485e17e70fe190fb91975f776230bb946548c80ddfcbd5f8f39a6 |
"""
python walker.py [OPTIONS] tconsdatabase cufflinks.diff <bamfile1> [bamfile2, ...]
Goes through a cuffdiff diff file and gets counts at the transcripts
"""
import optparse, sys, csv, os, sqlite3, pysam, re
import numpy as np
from pySeq.pysam_callbacks.geneCounter import geneCounter
def main():
p = op... | jeffhsu3/genda | scripts/tconsGet.py | Python | bsd-3-clause | 2,313 | [
"pysam"
] | 4b1da7f0bd04a2b23e202f007db8bdaf6df1fbbefafa8f0dd9b475297e6b3c2b |
"""
Implementing the questionaty library to fetch the users choices for different arguments
"""
import sys
import questionary
from clear_screen import clear
from conf import api_example_conf
from conf import browser_os_name_conf as conf
from conf import remote_credentials
def display_gui_test_options(browser,browser_v... | qxf2/qxf2-page-object-model | utils/interactive_mode.py | Python | mit | 25,835 | [
"Galaxy"
] | 840b5845410715548d1f1a1794f7564e4bcb8c7cf23c3406c1acdea2271d47ed |
'''
Module: jelephant.analysis.rate_estimation
Contains utility functions for instantaneous rate estimation of SpikeTrains.
'''
import quantities as pq
import numpy as np
import numpy
import scipy.signal
import neo
#def make_kernel(form, sigma, resolution, direction=1):
#
#
# """Creates kernel functions for convo... | SPP1665DataAnalysisCourse/elephant | elephant/rate_estimation.py | Python | bsd-3-clause | 20,840 | [
"Gaussian",
"NEURON"
] | f587e6a909bd804b82319a6ae3685b7e37c50be39712e426d8094a8a5fb83c85 |
# -*- coding: UTF-8 -*-
__revision__ = '$Id$'
# Copyright (c) 2007-2009 Michael Jahn
#
# 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) a... | FiloSottile/Griffith-mirror | lib/plugins/movie/PluginMovieFilmDb.py | Python | gpl-2.0 | 10,899 | [
"Brian"
] | e497598cf6d7f87144b8b15817951b10b00ad723673227117769ddc61541b86e |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" Calculation of topo... | rdkit/rdkit-orig | rdkit/Chem/GraphDescriptors.py | Python | bsd-3-clause | 19,929 | [
"RDKit"
] | 94b55a903a50d9db3d917f0bd9a9233ac1dd9de98d01655b1595d16a8d472ef6 |
import ResolvedStellarPops.graphics.GraphicsUtils as rspg
import ResolvedStellarPops as rsp
import ResolvedStellarPops.convertz as convertz
import numpy as np
import matplotlib.pyplot as plt
import os
import brewer2mpl
from TPAGBparams import research_path
import scipy.integrate
import galaxy_tests
from matplotlib.tick... | philrosenfield/TPAGB-calib | lmc_cal.py | Python | bsd-3-clause | 18,202 | [
"Galaxy"
] | 5dddd8ada28bec861925016e66a4ab974e1b95b628353d21d0e7b45500b78da0 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class REnrichplot(RPackage):
"""Visualization of Functional Enrichment Result
The 'enric... | LLNL/spack | var/spack/repos/builtin/packages/r-enrichplot/package.py | Python | lgpl-2.1 | 2,364 | [
"Bioconductor"
] | d966659a1457277d4a4a56f53bd50cd169d40b723821f8bb86fa81dd24c4c4ef |
#!/usr/bin/python
#Audio Tools, a module and set of tools for manipulating audio data
#Copyright (C) 2007-2012 Brian Langenberger
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2... | Excito/audiotools | audiotools/py_encoders/flac.py | Python | gpl-2.0 | 32,813 | [
"Brian"
] | 53d46ca90a244611f6f1da1927f7d45ea4cb4433449a48beabdf797f85ee1878 |
import re
from os.path import abspath
from build.project import Project
from build.zlib import ZlibProject
from build.meson import MesonProject
from build.autotools import AutotoolsProject
from build.ffmpeg import FfmpegProject
from build.boost import BoostProject
libmpdclient = MesonProject(
'https://www.musicpd... | habbbe/MPD | python/build/libs.py | Python | gpl-2.0 | 13,058 | [
"DIRAC"
] | 87e90c9e907887b8c94fa2dc8868452d5f8cd111885e541a54643168d9da36a4 |
"""
Utility functions to mimic the template support functions for vtkVariant
"""
import vtk
import vtkConstants
from vtk import vtkVariant
_variant_type_map = {
'void' : vtkConstants.VTK_VOID,
'char' : vtkConstants.VTK_CHAR,
'unsigned char' : vtkConstants.VTK_UNSIGNED_CHAR,
'signed char' : vtkConstan... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/Wrapping/Python/paraview/variant.py | Python | gpl-3.0 | 6,359 | [
"VTK"
] | 63a352e739d059f79d111b76b5ffc91fac3072b511eaa22aae3a00948cb95f99 |
"""
Tests i18n in courseware
"""
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import Client
from django.utils import translation
from nose.plugins.attrib import attr
from op... | synergeticsedx/deployment-wipro | lms/djangoapps/courseware/tests/test_i18n.py | Python | agpl-3.0 | 8,509 | [
"VisIt"
] | f3bd5476b97300e227704c8c852f5c0df0a30f3239cddf2c79e6f5642335a8d4 |
from gravray import *
qload=1
try:qload=int(argv[1])
except:pass
if qload>0:
props="Perihelion_dist, e, i"
listdict=mysqlSelect(props,
condition="where NEO_flag and e>0 and e<1")
elements=listdict2matrix(listdict,keys=props.split(", "))
def plotDistribution(el,limits=[1.0,0.1,1.2... | seap-udea/GravRay | dev/distribution.py | Python | gpl-3.0 | 4,842 | [
"Gaussian"
] | 2b5dc8d78f96c56e3ee2bdac9d4e621449e16477ca8e2c79821a412eaa5f49a7 |
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import vtk
import wx
class JPEGReader(ScriptedConfigModuleMixin, ModuleBase):
def __init__(self, module_manager):
ModuleBase.__init__(self, module_manager)
self._reader = vtk.vtkJPEGRea... | chrisidefix/devide | modules/readers/JPEGReader.py | Python | bsd-3-clause | 3,500 | [
"VTK"
] | e0db2797bb1a2a0eb41fc7125aa501d20746528bf46fd997dddff316fa14c140 |
#!/usr/bin/env python
#
# Protein Engineering Analysis Tool DataBase (PEATDB)
# Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen
#
# 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 ver... | dmnfarrell/peat | PEATDB/plugins/biodatabaseplugin.py | Python | mit | 4,663 | [
"Biopython"
] | 80c867f33026c7bd6924d0f3c45ba2007d701c639ac0a08e4f35014236fc467f |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""
This module has methods for parsing names and versions of packages from URLs.
The idea is to allow package creators to... | LLNL/spack | lib/spack/spack/url.py | Python | lgpl-2.1 | 32,061 | [
"BLAST",
"HOOMD-blue",
"VTK"
] | 7c9644c011afd9a88e706f079b1f0531a23fb37c83d1c21e6180c7a84c0a259e |
import pickle
import pybel as pb
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rdkit.Chem import Descriptors
from rdkit.ML.Descriptors import MoleculeDescriptors
class PredictBpSol(object):
'''
Provide a user interface for predicting boiling points of alkanes.
Inpu... | py-chemist/web_apps | models/ml_models.py | Python | gpl-3.0 | 6,227 | [
"Pybel",
"RDKit"
] | ccdf1c0772bf792abdf6d09fe195c064fd76650a28a185d3bd8a6b188b43939c |
# Author: Travis Oliphant 2001
__all__ = ['quad', 'dblquad', 'tplquad', 'quad_explain', 'Inf','inf']
import _quadpack
import sys
import numpy
from numpy import inf, Inf
error = _quadpack.error
def quad_explain(output=sys.stdout):
"""
Print extra information about integrate.quad() parameters and returns.
... | lesserwhirls/scipy-cwt | scipy/integrate/quadpack.py | Python | bsd-3-clause | 21,003 | [
"Gaussian"
] | 6e26a851740a638579998842767d094a5fc23fa079018a5c8a7dd0726a8a4e40 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from numpy.testing import assert_allclose
import abel
# Curve A, Table 2, Fig 3. Abel transform pair Hansen&Law JOSA A2 510 (1985)
def f(r):
return 1-2*r**2 if np.all(r) <= 0.5 else 2*... | DanHickstein/pyBASEX | abel/tests/test_onion_bordas.py | Python | gpl-2.0 | 3,940 | [
"Gaussian"
] | 093cae4e114a8787973804a78ee2fff2d335ab5e11e078a9374bb74ea74c8c32 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.