text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
import sqlite3
import sys
import numpy as np
import pylab as pl
from collections import Counter
filesql=sys.argv[1]
outfile=sys.argv[2]
def RepresentsInt(s):
try:
int(s)
return True
except ValueError:
return False
def readSqlall(sqlname,segment):
... | 12AngryMen/votca-scripts | xtp/xtp_neighborhist.py | Python | apache-2.0 | 1,519 | [
"VMD"
] | 714fb09f077c3da977d02637bcef96839c7364aa2ecfc6a81dbf2879c8c72949 |
# -*- coding: utf-8 -*-
import random
import openerp
from openerp import SUPERUSER_ID, tools
import openerp.addons.decimal_precision as dp
from openerp.osv import osv, orm, fields
from openerp.addons.web.http import request
from openerp.tools.translate import _
from openerp.exceptions import UserError
class sale_ord... | be-cloud-be/horizon-addons | server/addons/website_sale/models/sale_order.py | Python | agpl-3.0 | 24,934 | [
"VisIt"
] | ccdc6e7d955837c2896b9d14a56334b15528891c143ca7bb03cb7741ce2ac88a |
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611
from common import type_in_codemirror, press_the_notification_button, get_codemirror_value
KEY_CSS = '.key input.policy-key'
DISPLAY_NAME_KE... | yokose-ks/edx-platform | cms/djangoapps/contentstore/features/advanced_settings.py | Python | agpl-3.0 | 4,362 | [
"VisIt"
] | edcc34ae2b7041d4adfaea4651642d45e6935078f9ab78e9549a1c7fc4018b97 |
import HTSeq
import argparse
import os.path
from Bio.Seq import Seq
from CommonFastaFunctions import Create_Blastdb
from CommonFastaFunctions import runBlast
from CommonFastaFunctions import runBlastParser
from Bio.Blast.Applications import NcbiblastnCommandline
from Bio.Blast.Applications import NcbiblastpCommandline
... | mickaelsilva/pythonscripts | AlleleCalling/CreateSchema.py | Python | gpl-2.0 | 10,735 | [
"BLAST",
"HTSeq"
] | a3cf7c795917b20d723a0612fa67c1ef5012b376398fbe71ce49be8d94876c66 |
from django.conf import settings
from django.template import Context, loader
from django.test.utils import override_settings
from tao.forms import FormsGraph
from tao.models import Job, BandPassFilter, WorkflowCommand
from tao.tests import helper
from tao.tests.integration_tests.helper import LiveServerTest
from tao.t... | IntersectAustralia/asvo-tao | web/tao/tests/integration_tests/jobs_tests.py | Python | gpl-3.0 | 25,202 | [
"Galaxy",
"VisIt"
] | 517373f5221da97811484aa1d3ad8eaf6b13cb1e0020107a561f1ce0fe90e89b |
# Copyright (C) 2014. Ben Pruitt & Nick Conway
# See LICENSE for full GPLv2 license.
#
# 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 ... | Wyss/mascpcr | mascpcr/__init__.py | Python | gpl-2.0 | 2,092 | [
"Biopython"
] | ba9dfb7484e2cdc80960c54dff38815b3a8c24c3a70d2cddfd40715745bf4d37 |
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.dual import eig
from scipy.special import comb
from scipy import linspace, pi, exp
from scipy.signal import convolve
__all__ = ['daub', 'qmf', 'cascade', 'morlet', 'ricker', 'cwt']
def daub(p):
"""
The coefficient... | ales-erjavec/scipy | scipy/signal/wavelets.py | Python | bsd-3-clause | 10,472 | [
"Gaussian"
] | cb13172dc291733ef6f244a39aeff83cdbc058fa476a9a5b51741c59b8667fcb |
import os
import re
import sys
import textwrap
import pycparser.c_generator
def parse_constant(node):
if isinstance(node, pycparser.c_ast.Constant):
return node.value
elif isinstance(node, pycparser.c_ast.UnaryOp) and node.op == '-':
return '-' + parse_constant(node.expr)
else:
ra... | SimonSapin/cairocffi | utils/mkconstants.py | Python | bsd-3-clause | 2,978 | [
"VisIt"
] | 517f7ea2262f74ab8e5527ad25c820a7457d501718cf80f12a01ab5645e0035f |
import matplotlib
matplotlib.use("agg")
import numpy as np
import deepdish as dd
import sys,os, glob
# PFH python:
###from pfh_python import colors_sps.colors_table as sps
import gizmo_analysis as gizmo
import utilities as gizmo_ut
from utilities.basic.binning import BinClass
FIREDIR = "/scratch/projects/xsede/Galaxi... | aemerick/galaxy_analysis | gizmo/metal_profiles.py | Python | mit | 7,545 | [
"Galaxy"
] | 9a0127e19058f37e7f3660cdb6acfe1594f2ffbd779591dbe51db9193100adbe |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | python/MooseDocs/test/extensions/test_core.py | Python | lgpl-2.1 | 3,665 | [
"MOOSE"
] | 372049a316bba625419f7cced08dc1ba16ea1e04fbb92e121c71291ca5f81506 |
# -*- coding: utf-8 -*-
"""
Regression tests for the Test Client, especially the customized assertions.
"""
from __future__ import unicode_literals
import os
import itertools
from django.conf import settings
from django.core.urlresolvers import reverse, NoReverseMatch
from django.template import (TemplateSyntaxError,... | mbox/django | tests/test_client_regress/tests.py | Python | bsd-3-clause | 66,256 | [
"VisIt"
] | 680b1d7e63681ee27d6a4ac0fe7c717dc61685e484236a34bd0eb76f42f3c2d5 |
from PyContact.core.ContactAnalyzer import *
from PyContact.exampleData.datafiles import DCD, PSF
import MDAnalysis as mda
dcdfile = DCD
psffile = PSF
analyzer = Analyzer(psffile, dcdfile, 5.0, 2.5, 120, "segid RN11", "segid UBQ")
analyzer.runFrameScan()
| maxscheurer/pycontact | testing/profiling.py | Python | gpl-3.0 | 255 | [
"MDAnalysis"
] | 0248940c5d6341f448e7dcc216f9c39f43a2c415395edaccb7f6501b7066b05d |
"""
This script tests the ccsd module.
"""
import os
import numpy as np
import time
from frankenstein import scf, cc
from frankenstein.tools.lat_utils import get_mol
def test_ccsd_ch4():
nocc = 5
basis = "sto-3g"
if __name__ == "__main__":
xyz = "geom/ch4.zmat"
else:
xyz = os.path.di... | hongzhouye/frankenstein | tests/ccsd_test.py | Python | bsd-3-clause | 2,051 | [
"PySCF"
] | a3a0b13bfa3a1b2a61d6609f675f46fcafbf5c3d8a85075b69aaffa46ff11cdf |
"""Rewrite assertion AST to produce nice error messages"""
import ast
import errno
import functools
import importlib.abc
import importlib.machinery
import importlib.util
import io
import itertools
import marshal
import os
import struct
import sys
import tokenize
import types
from typing import Dict
from typing import L... | randyzingle/tools | kub/services/archive/cdk/python/sample-app/.env/lib/python3.6/site-packages/_pytest/assertion/rewrite.py | Python | apache-2.0 | 40,384 | [
"VisIt"
] | e6a624507f633d0ec6e6cb3e079cc877e8c3ae155e2460fb6347c750bdde0dbf |
#######################################################
# Program to test the reticulate and design its class
# Ramon Heberto Martinez
# 12 / 02 / 2014
#######################################################
import numpy as np
import matplotlib.pyplot as plt
from IF_class import Neuron
##
# Parameters
##
# Grid ... | h-mayorquin/Neural_Pattern_Doursat | reticulate_tester_01.py | Python | gpl-2.0 | 794 | [
"NEURON"
] | 239ab0af3cecd909af6567fe9f67bc29c6e5c7b0d5fe98866a908d463f24312d |
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#
# This file is part of phono3py.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# noti... | atztogo/phono3py | phono3py/cui/show_log.py | Python | bsd-3-clause | 9,946 | [
"CRYSTAL",
"phonopy"
] | eabac2baa8ab4efd5e50aa769f7ee174a0c9d3b4192d7b7f1485df2e70f6b81b |
"""
Module containing the base object for multivariate kernel density and
regression, plus some utilities.
"""
import numpy as np
from . import kernels
kernel_func = dict(gaussian=kernels.gaussian)
has_joblib = False
class GenericKDE(object):
"""
Base class for density estimation and regression KDE classes... | ZellMechanik-Dresden/dclab | dclab/external/statsmodels/nonparametric/_kernel_base.py | Python | gpl-2.0 | 7,098 | [
"Gaussian"
] | 2ec6f2346c1c986cf0275a3818fa63df9213a94f35463da2e4c6ecdffdce6e37 |
from enthought.mayavi import mlab
import tables
import string
import sys
import os
from numpy import *
fileh = tables.openFile(sys.argv[1])
frame_skip = 1
if len(sys.argv) > 2:
frame_skip = int(sys.argv[2])
filename = os.path.splitext(os.path.basename(sys.argv[1]))[0]
fmax = 0.0
fmin = 0.0
for frame in range(... | philscher/gkc | Simulations/plotting/makePhiPlot.py | Python | gpl-3.0 | 2,386 | [
"Mayavi"
] | b1aff76224c685242f51b8ad68e09931a1d145b42f7f40c61c92e60cf58be0dd |
# ----------------------------------------------------------------------------
# cocos2d
# Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa,
# Lucio Torre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided t... | shadowmint/nwidget | lib/cocos2d-0.5.5/cocos/director.py | Python | apache-2.0 | 26,462 | [
"VisIt"
] | 17d3493fa5037a7a801982084239dcca6ff91bb6369046ca8bca635b75057660 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Unit tests for defect transformations
"""
__author__ = "Bharat Medasani"
__copyright__ = "Copyright 2014, The Materials Project"
__version__ = "0.1"
__maintainier__ = "Bharat Medasani"
__email__ = "mbkumar@gmail.com"
__date__ = "Jul 1 2014"
impo... | Dioptas/pymatgen | pymatgen/transformations/tests/test_defect_transformations.py | Python | mit | 4,887 | [
"pymatgen"
] | a3ba8511274d0eed6b0094d773d537f9991be6d62fb9eb7ca46150ba054f08c6 |
import json
from indra.sources import sparser
from indra.sources.sparser.processor import _fix_agent
from indra.statements import Agent, Phosphorylation, Complex
from nose.plugins.attrib import attr
# ############################
# XML processing tests
# ############################
def test_invalid_xml():
sp = s... | pvtodorov/indra | indra/tests/test_sparser.py | Python | bsd-2-clause | 6,787 | [
"CDK"
] | 7830c0b8fa6774b37b2376e9bbc1752808731af825d63a30cfa9c05fa6d56978 |
"""
python-fedex API Documentation
==============================
The python-fedex module is a light wrapper around Fedex's Web Services SOAP API.
Using the excellent U{suds<https://fedorahosted.org/suds/>} SOAP client,
the Fedex requests and responses are trivial to work with.
What python-fedex is
-------------------... | Alwnikrotikz/python-fedex | fedex/__init__.py | Python | gpl-3.0 | 2,390 | [
"VisIt"
] | d1861b7bf0ee07edbd6cdf7ed5d36957c61aa8201ddf7c637c2bbbfc10fe0aa5 |
from __future__ import division, print_function, absolute_import
import numpy as np
from nibabel.affines import apply_affine
from dipy.viz.colormap import colormap_lookup_table, create_colormap
from dipy.viz.utils import lines_to_vtk_polydata
from dipy.viz.utils import set_input
# Conditional import machinery for vt... | nilgoyyou/dipy | dipy/viz/actor.py | Python | bsd-3-clause | 45,736 | [
"VTK"
] | 4dfcf42965dd64f6a894aa2028ce48abcc98e10968e4ce607aba60751078cc57 |
__author__ = 'adityabhasin'
import random
from faker import Faker
from faker.providers import BaseProvider
class TechDataProvider(BaseProvider):
base = '"name" : "{{att_name}}", "category" : "{{ cat_name }}", "parameters" : '
# bunch of pattersn for the Item properties. These are randomly chosed per item
... | conlini/h2h | tech/utilities/_SampleGenerator.py | Python | mit | 3,494 | [
"Elk"
] | 3c50b4e66c4541ddcc8fc340d11a41b8d1fbec36d653b52c3bdd11082bd1fdac |
# -*- coding: UTF-8 -*-
"""
``Generic``
-----------------------
:Authors: Liron Levin
:Affiliation: Bioinformatics core facility
:Organization: National Institute of Biotechnology in the Negev, Ben Gurion University.
Short Description
~~~~~~~~~~~~~~~~~~~~~
A generic module that enables the user to design new module... | bioinfo-core-BGU/neatseq-flow_modules | neatseq_flow_modules/main_NSF_classes/Generic_module/19_2_2021_Generic.py | Python | gpl-3.0 | 53,052 | [
"BLAST"
] | 42d0f8b57589dd76269fb633ab8cde66a819665855f52fdb904c9207b3a22c39 |
import os, tempfile, StringIO
from cgi import FieldStorage
from galaxy import datatypes, util
from galaxy.datatypes import sniff
from galaxy.util.json import to_json_string
from galaxy.model.orm import eagerload_all
import logging
log = logging.getLogger( __name__ )
def persist_uploads( params ):
"""
Turn any... | volpino/Yeps-EURAC | lib/galaxy/tools/actions/upload_common.py | Python | mit | 16,852 | [
"Galaxy"
] | 823ac2173a95b38c5d72a229a78bf0ce194ea265154bfef06370ea3cc7ee9c46 |
from ase.test import cli, require
require('fleur')
cli('ase-build -x fcc -a 4.04 Al | ase-run fleur -p kpts=3.0,xc=PBE')
| grhawk/ASE | tools/ase/test/fleur/fleur_cmdline.py | Python | gpl-2.0 | 121 | [
"ASE",
"FLEUR"
] | 4d0775dccbc7403618027d7f5d1c1b9c38dd93fbd8ec0720b8f733b3707e046d |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | theochem/horton | horton/gbasis/__init__.py | Python | gpl-3.0 | 938 | [
"Gaussian"
] | 9e2658e4532eb6ff6546f87253fcb06efd429f23392d20a7a151063163da14ae |
#!/usr/bin/env python
#
# Author: Patrick Hung (patrickh @caltech)
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/m... | jcfr/mystic | examples/test_mogi.py | Python | bsd-3-clause | 5,185 | [
"Gaussian"
] | 090beadf800d8282cd8f3775b2e30a667ace8e4a1f8d08db0fff5f01f5b9b05a |
# -*- coding: utf-8 -*-
#
# Neo4j.rb documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 9 22:41:19 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | neo4jrb/neo4j | docs/conf.py | Python | mit | 10,895 | [
"Brian"
] | a87a47d2419720c0a47d7903a9d9405e06a152cdd4e79c8da8234c9636414fc9 |
""" generate a single-file self-contained version of pytest """
import os
import sys
import pkgutil
import py
import _pytest
def find_toplevel(name):
for syspath in sys.path:
base = py.path.local(syspath)
lib = base/name
if lib.check(dir=1):
return lib
mod = base.joi... | jessekl/flixr | venv/lib/python2.7/site-packages/_pytest/genscript.py | Python | mit | 3,751 | [
"VisIt"
] | 6ccd75ecb1de95c6be534d9708c854348fba38a8cbb6e35dc077fc4af768123f |
#!/usr/bin/env python
# encoding: utf-8
'''
Licensed under a 3-clause BSD license.
Revision History:
Initial Version: 2016-02-23 14:13:28 by Brian Cherinka
2016-02-23 - made some test sample forms with wtforms+sqlalchemy - B. Cherinka
2016-03-02 - generalized the form to build all forms - B. Cherinka
'''
... | sdss/marvin | python/marvin/utils/datamodel/query/forms.py | Python | bsd-3-clause | 18,443 | [
"Brian"
] | 3832c8258ddb592aeaf8ee52072bb5df0ae6f83f2ae7429a4fb9a9a8fdda7db5 |
import sys
from mgescan import utils
from docopt import docopt
from subprocess import check_call
from multiprocessing import Process
from mgescan.biopython import reverse_complement_fasta, getid
import shutil
import os
import math
class nonLTR(object):
"""MGEScan non-LTR
Usage:
nonltr.py <input> <output... | MGEScan/mgescan | mgescan/nonltr/nonltr.py | Python | gpl-3.0 | 6,081 | [
"Biopython"
] | c708631886e11f14c4a51ec1ca1a9e34c402d27e75a2491055adffd0e1f4c0a4 |
##
## @file numfig.py
##
## @brief For numbering figures in Sphinx
##
## @version $Id: numfig.py 10 2012-10-07 14:39:47Z jrobcary $
##
## Started from https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home
##
## Copyright © 2005-2012, Tech-X Corporation, Boulder, CO
## Free for any use whatsoever.
##
from do... | bogdanvuk/sphinxpp | sphinxpp/numfig.py | Python | lgpl-2.1 | 4,051 | [
"VisIt"
] | 87aac068eecc597af362741d5a602bb91b2cdb78adf95337ea7cb1bb397c43d8 |
class BaseVisitor(object):
def __init__(self):
pass
def visit(self, node, *args):
name = "visit_%s" % type(node).__name__.lower()
if hasattr(self, name):
return getattr(self, name)(node, *args)
else:
return self.generic_visit(node)
def generic_visit(... | ssarangi/spiderjit | src/ir/base_ir_visitor.py | Python | mit | 2,377 | [
"VisIt"
] | 937395be5bbc9d7da3fee36c5f907b3211702330328554e9a96b17097c138fea |
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.utils import six
from djblets.webapi.decorators import (webapi_login_required,
webapi_response_errors,
webapi_request_fields)
from djblets.webapi... | custode/reviewboard | reviewboard/webapi/resources/base_archived_object.py | Python | mit | 3,437 | [
"VisIt"
] | 1386249c21f614b3293be58cc9b86b51864c40b591f4df4a16ddb0c8bc647b6b |
#!/usr/bin/env python
import roslib
import rospy
import smach
import smach_ros
from smach import StateMachine
import actionlib
import time
import threading
from smach_ros import SimpleActionState
from smach_ros import ActionServerWrapper
from std_msgs.msg import String
from std_msgs.msg import UInt8
from wm_interprete... | WalkingMachine/sara_commun | wm_robocup2016/src/stage1_speech_recognition.py | Python | apache-2.0 | 15,239 | [
"Galaxy"
] | 07950c5bcdf4797fde906d281e13cc682afc9c510f0e5de63cf2497b974641e6 |
import StringIO
import itertools
import logging
import os
import shutil
import stat
import sys
import yaml
import zookeeper
from twisted.internet.defer import (inlineCallbacks, Deferred,
fail, returnValue)
from juju.charm.directory import CharmDirectory
from juju.charm.tests.test_... | anbangr/trusted-juju | juju/unit/tests/test_lifecycle.py | Python | agpl-3.0 | 53,158 | [
"SIESTA"
] | 99b71b09b60c05abe72e4287be0dcb44579b9630f326946d9920748b5f15ac2e |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
freeseer - vga/presentation capture software
Copyright (C) 2013 Free and Open Source Software Learning Centre
http://fosslc.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the ... | Freeseer/freeseer | src/freeseer/plugins/videomixer/pip/widget.py | Python | gpl-3.0 | 3,065 | [
"VisIt"
] | e92c64afa363d8a16fe4665fc7979487dbfd04ffca8f5468eb033f5718d1bf18 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors: Kyle A Beauchamp
#
# MDTraj is... | kyleabeauchamp/mdtraj | mdtraj/testing/testing.py | Python | lgpl-2.1 | 8,004 | [
"MDTraj"
] | cc6457d5e4f2cc0c231c930059ff4d0d99a52c1d952da453180691a917fd86b2 |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | JWDebelius/scikit-bio | skbio/parse/sequences/iterator.py | Python | bsd-3-clause | 8,108 | [
"scikit-bio"
] | 58dec9d07bcffe5e28d2b57a75194ac018bde64d0c357cd70dc2e755349524a0 |
import os
import shutil
import tempfile
import numpy as np
from numpy.testing import assert_almost_equal as eq
from ..core import mi, nmi
from ..metrics import (AlphaAngleMutualInformation, ContactMutualInformation,
DihedralMutualInformation)
import mdtraj as md
from msmbuilder.example_dataset... | cxhernandez/mdentropy | mdentropy/tests/test_mi.py | Python | gpl-3.0 | 2,021 | [
"MDTraj"
] | 0a6684de0f38c08282ce7ad622fe3ec15b0200013cbfd303be902803cf69f1b5 |
#!/bin/env python2
# -*- coding: utf-8 -*-
#%% Information
# 86805 - Software Architectures for Robotics
# Assignment 03 - Localization system for a wheeled humanoid robot
# Rabbia Asghar, Ernest Skrzypczyk
# EKF - Extended Kalman Filter for nonlinear dynamic systems
# Based upon original Matlab code by Yi Cao f... | em-er-es/rollo | Scripts/Python/rollo_ekf.py | Python | gpl-2.0 | 13,374 | [
"Gaussian"
] | 21a6b23f26b66ee6d9803c53310d7515f09b8b6730712931f2a565fd3acd7042 |
"""
Check for updates in a background process. If we can start a program immediately, but some of our information
is rather old (longer that the L{config.Config.freshness} threshold) then we run it anyway, and check for updates using a new
process that runs quietly in the background.
This avoids the need to annoy peop... | dabrahams/zeroinstall | zeroinstall/injector/background.py | Python | lgpl-2.1 | 8,151 | [
"VisIt"
] | 13da93cbedd58d86c7b38f08ab15329f19f6fbd1ce59714d117921f5bc6b73ac |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | frreiss/tensorflow-fred | tensorflow/python/data/experimental/kernel_tests/sql_dataset_test.py | Python | apache-2.0 | 29,324 | [
"MOE"
] | 80bc29f65ce6d771f1058466724a1ec3c2e5e59f2a2b73e508bd9a980ef0730e |
import numpy
from chainer.backends import cuda
from chainer import initializer
# Original code forked from MIT licensed keras project
# https://github.com/fchollet/keras/blob/master/keras/initializations.py
class Normal(initializer.Initializer):
"""Initializes array with a normal distribution.
Each elemen... | rezoo/chainer | chainer/initializers/normal.py | Python | mit | 4,693 | [
"Gaussian"
] | 13e735bd2fc38c201f9b95380d7799b0100997bf5b40e87f35c9b5b59d4e4f23 |
#!/usr/bin/env python
'''
Anh Nguyen <anh.ng8@gmail.com>
2016
'''
import os, sys
os.environ['GLOG_minloglevel'] = '2' # suprress Caffe verbose prints
import settings
sys.path.insert(0, settings.caffe_root)
import caffe
import numpy as np
from numpy.linalg import norm
import scipy.misc, scipy.io
import argparse
i... | philkuz/ppgn | sampling_caption.py | Python | mit | 9,379 | [
"NEURON"
] | 89a6557968d274f9c6bf89880d613567e2cbbbc1ad5e649bc564b71a2e1b0cd6 |
# -*- coding: utf-8 -*-
#
# ConnPlotter.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 the License, or... | magnastrazh/NEUCOGAR | nest/serotonin/research/C/nest-2.10.0/extras/ConnPlotter/ConnPlotter.py | Python | gpl-2.0 | 80,830 | [
"Gaussian",
"NEURON"
] | aa00138cc1bc2c3d07a1ddcaabf00f863c18a0856127f2747c07141cb9e32f0f |
#! /usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-stager-monitor-file
# Author : Daniela Remenska
########################################################################
"""
-gives monitoring information regarding a staging file uniquely iden... | andresailer/DIRAC | StorageManagementSystem/scripts/dirac-stager-monitor-file.py | Python | gpl-3.0 | 4,420 | [
"DIRAC"
] | 20a5f110096e19faf9dc640d3a9f088ff701da72580cb98a54b9c2b155b89334 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.... | msmolens/VTK | Rendering/Core/Testing/Python/cells.py | Python | bsd-3-clause | 27,499 | [
"VTK"
] | 612195455a21eb2f7139e681d5fd5cf3abe4dd28e1e0eb99d0ae229d5a622fa3 |
# -*- coding: UTF-8 -*-
# OpenDict
# Copyright (c) 2003-2006 Martynas Jocius <martynas.jocius@idiles.com>
# Copyright (c) 2007 IDILES SYSTEMS, UAB <support@idiles.com>
#
# 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 F... | idiles/opendict | lib/gui/helpwin.py | Python | gpl-2.0 | 8,400 | [
"VisIt"
] | 319b97401d6a0db71dc20213e5b492daabae8131c27b4bf0643fccd061305572 |
import pytest
from io import StringIO
from django.core.management import call_command
def test_for_missing_migrations(db):
"""Look for missing migrations
Hat tip to David Winterbottom:
http://tech.octopus.energy/news/2016/01/21/testing-for-missing-migrations-in-django.html
"""
output = StringIO... | Candihub/pixel | apps/core/tests/test_migrations.py | Python | bsd-3-clause | 768 | [
"Octopus"
] | 9972aacd971d229b5309d27b7b8c1a7975d71bb90b1c37f7857a5b52dbd3eedf |
import numpy as np
from . import abcd
import matplotlib.pyplot as plt
class OpticalElement:
def __init__(self):
pass
class Cavitymode:
def __init__(self):
pass
class BowtieOPO:
"""
Implements bowtie geometry.
"""
def __init__(self, Lc, L1, L, R1, R2=np.inf, folding_angle=5,... | XueshiGuo/Gau-modematching | modematching/opo.py | Python | mit | 12,612 | [
"Bowtie"
] | eb42ca07d6de498ea17e43f1f704e2567f7dceb8902e1c5fba872e97f045a7e7 |
# Defines the models for the nodemanager class
from django.db import models
from mptt.models import MPTTModel, TreeForeignKey #for tree structure
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from ranking.models import RankingProcess
class CITreeInfo(models... | kevincwebb/conceptum | conceptum/nodemanager/models.py | Python | bsd-3-clause | 10,167 | [
"VisIt"
] | f75a200c445d333faad18de281b8f56b3f6701e9f80521483f705a487382b0fb |
# import_export_voting_info_project/views.py
# Brought to you by We Vote. Be good.
# https://github.com/votinginfoproject
# -*- coding: UTF-8 -*-
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from .con... | wevoteeducation/WeVoteBase | import_export_voting_info_project/views.py | Python | mit | 897 | [
"VisIt"
] | 549b028622bc7e1f1cda84f1951ae91b543f93dfb0adefa77b5a7e9fbd03571f |
# For displaying PIL images directly
from io import BytesIO
from IPython import get_ipython
from PIL import Image
import PIL.Image as PILImage
from IPython.display import Image as displayImage
from datauri import DataURI
from cStringIO import StringIO
from IPython.display import HTML, display
def display_pil_image(i... | SlideAtlas/SlideAtlas-Server | slideatlas/plugins/ipython/notebooks/ipython_slideatlas.py | Python | apache-2.0 | 3,648 | [
"exciting"
] | e269b69ad4b2c6dd4906a68aa0d4d81ca89d682692c174c67934cdb8f82b004b |
from luna import objects as obj
from luna.ast.visitors import GenericVisitor
from luna.vm import opcodes as ops
from luna.vm.frame import Frame
class Compiler(GenericVisitor):
def __init__(self):
self.code = []
self.consts = []
self.vars = []
self.binops = {
'+': ops.B... | numerodix/luna | luna/compiler.py | Python | mit | 2,246 | [
"VisIt"
] | c4b9122b5919e390446cd20e4c3a62a8a0eef1924d98c85f0be6360845279ee4 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""This module implements the base CCDPROC functions"""
import math
import numbers
import logging
from packaging import version as pkgversion
import warnings
import numpy as np
from scipy import ndimage
from astropy.units.quantity import Quantity
from ... | astropy/ccdproc | ccdproc/core.py | Python | bsd-3-clause | 76,092 | [
"Gaussian"
] | 9203111c6fa0c55dfec7c8133a6276e8c0194f0e8385031717afb16a22c90144 |
import subprocess
import tempfile
import shutil
import os.path as p
import re
import sys
import xmlrpclib
from Bio import SeqIO
import fasta_statter
"""
Uses three strategies to pick reference:
1) Use reference specified by job.
2) Look it up based on species.
3) Do a quick Velvet and find best match to fir... | crashfrog/Dispatch | reference_assembler.py | Python | unlicense | 3,765 | [
"BWA"
] | b2b4fa5b8dfc0cb2a8d9775057b176f1bf1fff2c5e23a187e46fc6ed9333e4f9 |
from lettuce import step,before,world
from django.contrib.auth.models import User
from lettuce.django import django_url
@step("When I click the login link")
def when_i_click_the_login_link(step):
world.browser.find_by_css('.login a').first.click()
world.wait_for_element_by_css('.login_submit a')
world.brow... | rossjones/ScraperWikiX | web/frontend/features/log_in_steps.py | Python | agpl-3.0 | 2,026 | [
"VisIt"
] | 4f11535c3f3d4b3b99d429eb74b60a3ff0558946e5e58e992d71b19653c8513c |
import gc, os, sys, string, re, pdb, scipy.stats
import Mapping2, getNewer1000GSNPAnnotations, Bowtie, binom, GetCNVAnnotations
TABLE=string.maketrans('ACGTacgt', 'TGCAtgca')
USAGE="%s mindepth snpfile readfiletmplt maptmplt bindingsites cnvfile outfile logfile ksfile"
def reverseComplement(seq):
tmp=seq[::-1]
... | gersteinlab/AlleleDB | alleledb_pipeline/NewGetSnpCounts.py | Python | cc0-1.0 | 6,858 | [
"Bowtie"
] | d38ca9353ca328b05fef1d0bc1f4963c5c1a58663320bb769ace5af2c24afe1f |
#!/usr/bin/env python
"""
This script can be useful when creating a large number of recipes that, if
submitted all at once, could result in timeout errors when building on
travis-ci. A common example is when recipes must be updated for a new
Bioconductor release. This script batches together recipes such that each bat... | JingchaoZhang/bioconda-recipes | scripts/toposort_recipes.py | Python | mit | 2,496 | [
"Bioconductor"
] | 6724b30b290f0b5bc59a728308eda6501ee0a734aefccafe02c571732a6766a2 |
import os
import re
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Q
from django.utils import timezone
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from djblets.util.db i... | atagar/ReviewBoard | reviewboard/reviews/models.py | Python | mit | 62,757 | [
"VisIt"
] | f7daa8721ac66209484fe3881bf2ade1952a157d797a8b3b5a0ac48180f68e7a |
"""
Created on March 17, 2019 by Andrew Abi-Mansour
This is the::
_ _ _ _____ ___ __ __ _ ____ _____ ___ _ _ ___
/ \ | | | |_ _/ _ \ | \/ | / \ | _ \_ _|_ _| \ | |_ _|
/ _ \| | | | | || | | | | |\/| | / _ \ | |_) || | | || \| || |
/ ___ \ |_| | | || |_| | | | | |/ ___ ... | tbereau/auto_martini | setup.py | Python | gpl-2.0 | 4,872 | [
"RDKit"
] | c8054002067c0847e2f8b47651fbd2f3ba56ecf2f7ceb6d392cdf3b9b7d106c1 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | le9i0nx/ansible | lib/ansible/modules/network/avi/avi_stringgroup.py | Python | gpl-3.0 | 4,751 | [
"VisIt"
] | f89405234fe38e1c37c73102af4990a6e37e014fb086ef5729f62daa1c7a4905 |
'''
Created on Jul 15, 2011
@author: sean
'''
from __future__ import print_function
import _ast
from meta.asttools import Visitor
from string import Formatter
import sys
from meta.utils import py3op, py2op
from contextlib import contextmanager
if sys.version_info.major < 3:
from StringIO import StringIO
else:
... | enthought/Meta | meta/asttools/visitors/pysourcegen.py | Python | bsd-3-clause | 24,097 | [
"VisIt"
] | 73999b753dace12f38c8e9e8b4daf3a0e614302798f68d84491cbb74708236e5 |
# Copyright 1999-2016. Parallels IP Holdings GmbH. All Rights Reserved.
#!@@PYTHON@@
#------------------------------------------------------------------------
# Copyright (c) 1998 by Total Control Software
# All Rights Reserved
#-----------------------------------------------------... | blackbeario/chpoa | test/fcgi/fcgi.py | Python | gpl-2.0 | 15,059 | [
"TINKER"
] | bffee5e177490cbf5673a85f451f0760bc6d2e987ec27033b36b9177943640e0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on Mar 8, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Sh... | sonium0/pymatgen | pymatgen/io/tests/test_ase.py | Python | mit | 1,649 | [
"ASE",
"VASP",
"pymatgen"
] | 3c140e893f91d3bbf183b79edd6a54dae07eed11dea3b33c93ab98a73aa034fa |
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | edallison/oppia | core/domain/email_manager.py | Python | apache-2.0 | 25,783 | [
"VisIt"
] | 07938b70b99f199a7cbc23023e40bb1a291c2fdc8d56475bc45386bcf1a709b5 |
import re
import dxr.indexers
from dxr.lines import Ref
# From http://stackoverflow.com/a/1547940
url_re = re.compile(r"https?://[A-Za-z0-9\-\._~:\/\?#[\]@!\$&'()*\+,;=%]+\.[A-Za-z0-9\-\._~:\/\?#[\]@!\$&'()*\+,;=%]+")
class FileToIndex(dxr.indexers.FileToIndex):
def refs(self):
for m in url_re.finditer... | pombredanne/dxr | dxr/plugins/urllink/__init__.py | Python | mit | 670 | [
"VisIt"
] | b642e0808a2dbba8bea5c3444676a0ff7e2636c59c635b507a5e31bce9b110ff |
import pdb
import numpy as np
from astropy.cosmology import FlatLambdaCDM
import astropy.units as u
pi=3.141592653589793
## B
def bin_ndarray(ndarray, new_shape, operation='sum'):
"""
Bins an ndarray in all axes based on the target shape, by summing or
averaging.
Number of output dimensions must match number... | gjsun/MPack | MPack_Core/simstack/utils.py | Python | mit | 7,384 | [
"Gaussian"
] | aab60116c81fc752cd32a2469dea717b4fc6bdf6581da1222eae0f74f2fb901b |
#!/usr/bin/env python
import os
import sys
import numpy as np
import json
import argparse
import bayesflare as bf
"""
Create a data file potentially with flare, sinusoid, change point and impulse signals
added. The data is generated based on information provided by a JSON configuration
file. Such a file should look ... | BayesFlare/Flake | python/create_data.py | Python | mit | 3,395 | [
"Gaussian"
] | 4a1e9932c6a330d8241730a6885c588de5e97d8ebdf919a291f0a2cf98766ada |
from lettuce import step, world
from lettuce.django import django_url
from splinter.exceptions import ElementDoesNotExist
from django.contrib.auth.models import Group, User
@step(u'Given an admin assigns "([^"]*)" user to the "([^"]*)" group$')
def assign_user_to_group(step, username, group_name):
user = User.obje... | denverfoundation/storybase | apps/storybase_user/features/admin_role-steps.py | Python | mit | 1,883 | [
"VisIt"
] | d02cce5f2ff0bf89d4fc9b1ad65fe875ec9aa73453ccb9ee5f530495fad75140 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/chronos/src/bigdl/chronos/model/VanillaLSTM_pytorch.py | Python | apache-2.0 | 3,910 | [
"ORCA"
] | 6e0bfecd94213087ec66929843d44f62f6709e0a19968156bf6bb993a916ce98 |
"""Bayesian Gaussian Mixture Models and
Dirichlet Process Gaussian Mixture Models"""
from __future__ import print_function
# Author: Alexandre Passos (alexandre.tp@gmail.com)
# Bertrand Thirion <bertrand.thirion@inria.fr>
#
# Based on mixture.py by:
# Ron Weiss <ronweiss@gmail.com>
# Fabian Ped... | abhishekkrthakur/scikit-learn | sklearn/mixture/dpgmm.py | Python | bsd-3-clause | 31,369 | [
"Gaussian"
] | 5ef9a201b6c6575229f5d85ea2a06c1ea4ceeb48f1c6c1969c6c5bdf1d25d2e4 |
"""
plotting_tools.py
Utilities and scripts for procuding plots of Faraday spectra.
******************************************************************************
Copyright 2012 Michael Bell
This file is part of fsclean.
fsclean is free software: you can redistribute it and/or modify
it under the terms of the GNU ... | mrbell/fsclean | plotting_tools.py | Python | gpl-3.0 | 8,277 | [
"Gaussian"
] | 419557fdd911b1e0bac1dd99a8474b14591864bbd30a28ccda90f9dad7134da3 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
from monty.json import MSONable
from monty.io import zopen
from pymatgen.core import Molecule
from .utils import read_table_pattern, read_pattern, lower_and_check_unique
# Classes for reading/m... | dongsenfo/pymatgen | pymatgen/io/qchem/inputs.py | Python | mit | 15,864 | [
"pymatgen"
] | 2a021d10c9ce797a9d61b4c56d77c5a3ab97a39ed824f55f8f6b6b2c468decbd |
# coding: utf-8
# # Bayesian Neural Networks in PyMC3
# http://pymc-devs.github.io/pymc3/notebooks/bayesian_neural_network_advi.html
#
#
# ## Generating data
#
# First, lets generate some toy data – a simple binary classification problem that’s not linearly separable.
# In[2]:
get_ipython().magic('matplotlib in... | balarsen/pymc_learning | BayesianNetwork/Neural Networks in PyMC3.py | Python | bsd-3-clause | 10,717 | [
"exciting"
] | b6b80f32347c97f2640a3654bfb3d579beca1691ebccafa35bb0110271410dfd |
"""
TEST ORGANIZATION
Each function/class-based-view has its own test class.
Within each test class, each use-case of the view has its own test method
The quick tests at the beginning can probably be removed once the full test suit is created,
or they could be moved into a `test_urls.py` module.
"""
from django.co... | timberline-secondary/hackerspace | src/quest_manager/tests/test_views.py | Python | gpl-3.0 | 85,242 | [
"VisIt"
] | a74eb3b07dfbbe648fc636ba4a87c8fecfd8b371375450778a1591999922d4f6 |
#!/usr/bin/env python
from distutils.core import setup
setup(name='pyeurofx',
version='0.6.4',
description='Python module to get and parse daily and historical FX rates from ECB',
long_description='Please visit https://github.com/supercoderz/pyeurofx for more details',
author='Narahari Allamraju',
auth... | supercoderz/pyeurofx | setup.py | Python | mit | 627 | [
"VisIt"
] | 399d329d93a303d17d36ff34dcab9f2d091804732eebdd47dddbc4fb6f04bdc1 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Json libs
from pprint import pprint
import json
import urllib,urllib2
# General libs
import datetime
import numpy as np
import sys
import time
# SQLite libs
import sqlite3 as lite
# KML libs
from pykml import parser
from pykml.factory import KML_ElementMaker as KML
from l... | LinuxChristian/pdr-script | PDR_sqlite.py | Python | gpl-2.0 | 19,033 | [
"VisIt"
] | a79eab6e1880ea46cb9f124f9bfb4b02b62fc883d4a07baee1870f3c95d18363 |
"""
Automator code
Functions to convert from a supercell dictionary (output from a Diffuser) into a tarball
that contains all of the input files in an organized directory structure to run the
atomic-scale transition state calculations. This includes:
1. All positions in POSCAR format (POSCAR files for states to relax... | DallasTrinkle/Onsager | onsager/automator.py | Python | mit | 11,559 | [
"CRYSTAL",
"VASP"
] | 837fa4da0c1acfbfa07bc440ec630c7652e4bb6cd3f14582c3f368a94bf32881 |
#!/usr/bin/env python3
from glob import glob
from urllib.parse import urljoin
import os
import re
import requests
import sys
# Used to generate URLs for API endpoints and links; exposed as argument
from typing import List
from typing import Tuple
from typing import Dict
DEFAULT_BASE_URL = "https://weblate.secured... | conorsch/securedrop | securedrop/upload-screenshots.py | Python | agpl-3.0 | 7,422 | [
"VisIt"
] | 27068320ba45622478341ba98b1b0efe2f97bc8b029d503969ef23b8c8008d95 |
from dateutil.relativedelta import relativedelta
from datetime import date
from django.utils import timezone
from edc_meta_data.models import CrfMetaData
from edc_appointment.models import Appointment
from edc_constants.constants import (
YES, NO, POS, NEG, NOT_APPLICABLE, SCHEDULED,
COMPLETED_PROTOCOL_VISIT,... | botswana-harvard/microbiome | microbiome/apps/mb_maternal/tests/test_offstudy.py | Python | gpl-2.0 | 9,034 | [
"VisIt"
] | a40ec7b01d5eeabf2cc94d3f42778676e07eadebae137e45018cc3ae93125411 |
# ICE Revision: $Id$
""" Simple filters
Builds and displays simple filters. Grants easy access to the actual filter
and the representation objects"""
from paraview import servermanager
from PyFoam.Paraview import proxyManager as pm
from PyFoam.Paraview import renderView as rv
from PyFoam.Paraview import characteri... | Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam | PyFoam/Paraview/SimpleFilters.py | Python | gpl-2.0 | 1,167 | [
"ParaView"
] | 967118ea90d65e2852629b34558b6d5cc896c666fbdbdd8a4c5f969192c837dc |
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | petemounce/ansible | lib/ansible/module_utils/basic.py | Python | gpl-3.0 | 100,928 | [
"VisIt"
] | 6b5f81567cebd083c93699c58467fa23eb63044f13503ee9bb4827dbe0c2e1b4 |
"""
General helper functions that don't fit neatly under any given category.
They provide some useful string and conversion methods that might
be of use when designing your own game.
"""
from __future__ import division, print_function
from builtins import object, range
from future.utils import viewkeys, raise_
impor... | shollen/evennia | evennia/utils/utils.py | Python | bsd-3-clause | 51,293 | [
"VisIt"
] | 9d66cac69f9e84c1f4d10d63be5bebb26e427f857b1b2ddf2d45103990043b51 |
#! /usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.cm import viridis as cmap
import galore
import galore.plot
vasprun = 'test/MgO/vasprun.xml.gz'
xmin, xmax = (-6, 15)
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
widths = np.arange(0, 2.01, 0.4)
widths[0] = 0.05 # Use a ... | SMTG-UCL/galore | docs/source/api_demo_dos_broadening.py | Python | gpl-3.0 | 927 | [
"Gaussian"
] | 0d74856f526b00e9fa0bff425ead590d0bc275764ae4879fa2856422c46918f1 |
"""
This module contains all logic necessary to decipher the signature.
YouTube's strategy to restrict downloading videos is to send a ciphered version
of the signature to the client, along with the decryption algorithm obfuscated
in JavaScript. For the clients to play the videos, JavaScript must take the
ciphered ver... | pytube/pytube | pytube/cipher.py | Python | unlicense | 22,520 | [
"ADF"
] | d2510cb0eedf14ad0f7d0a254add266a3a1e55cf73ab97ccf7dfbf3e8bc5bd01 |
import numpy as np
import regreg.api as rr
def selection(X, y, random_Z, randomization_scale=1, sigma=None, method="theoretical"):
n, p = X.shape
loss = rr.glm.gaussian(X,y)
epsilon = 1. / np.sqrt(n)
lam_frac = 1.2
if sigma is None:
sigma = 1.
if method == "theoretical":
lam = 1... | selective-inference/selective-inference | selectinf/sandbox/bayesian/initial_soln.py | Python | bsd-3-clause | 4,499 | [
"Gaussian"
] | 55381afea703978929ef086c45817c8465c5774f8751b507b839a5f1669a169a |
# -*- coding: utf-8 -*-
# test_function.py ---
# Filename: test_function.py
# Description:
# Author: subha
# Maintainer: Dilawar Singh <diawars@ncbs.res.in>
# Created: Sat Mar 28 19:34:20 2015 (-0400)
# Version:
from __future__ import print_function
import numpy as np
import moose
print( "[INFO ] Using moose %s form %... | BhallaLab/moose-core | tests/core/test_function.py | Python | gpl-3.0 | 3,956 | [
"MOOSE"
] | 748ad4f95c7af21dbd8b9c362cd8c79acbc6262761b4c43b921995db97a4579c |
#!/usr/bin/env python3
import numpy as np
from pysisyphus.init_logging import init_logging
from pysisyphus.calculators.PySCF import PySCF
from pysisyphus.calculators.Turbomole import Turbomole
from pysisyphus.optimizers.RFOptimizer import RFOptimizer
from pysisyphus.helpers import geom_from_library, geom_from_xyz_fil... | eljost/pysisyphus | tests_staging/test_pyscf/test_pyscf.py | Python | gpl-3.0 | 3,157 | [
"PySCF",
"TURBOMOLE"
] | 197ed8d19f59eeaf808a57fd4472d9380eed0a4d187f49e5e0325d87fd6f0420 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from MapGround import MapGroundException, LayerNotFound, LayerAlreadyExists, LayerImportError
from django.utils import timezone
from datetime import datetime
from fileupload.models import Archivo
from .models import ... | pcecconi/mapground | layerimport/import_utils.py | Python | mit | 18,342 | [
"NetCDF"
] | 19355690f948e35ac79515574c759c43e46d37adbadaab23459b9b3bc81871f4 |
""" This is a test of the chain
TransformationClient -> TransformationManagerHandler -> TransformationDB
It supposes that the DB is present, and that the service is running
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# pylint: disable=invali... | ic-hep/DIRAC | tests/Integration/TransformationSystem/Test_Client_Transformation.py | Python | gpl-3.0 | 14,455 | [
"DIRAC"
] | 66d1b4547d3157059f9b482ae9d128165de72d3c4ac98f704fd32cc75cbb9910 |
#!/usr/bin/env python
"""Tests for reduction methods of CRN class.
References
==========
[1] Cornish-Bowden, Athel. "Fundamentals of enzyme kinetics". Elsevier, 2014.
[2] Ingalls, Brian. "Mathematical Modelling in Systems Biology: An Introduction.", 2013.
[3] SBMLsqueezer documentation, http://www.cogsys.cs.uni-tuebin... | etonello/crnpy | tests/test_reduction.py | Python | bsd-3-clause | 12,886 | [
"Brian"
] | 744fd7a6f921638a441d98ec95c1631d0f2beafe462016ca82a5a6dd804e9e8a |
#system libs:
import numpy
import scipy.optimize as opt
import math
import matplotlib.pyplot as pyplot
#own libs:
import geotherm
import prem
from tools import *
from eos_from_ian import birch_murnaghan
import seismic
# TODO: add up weight percent and check <100 and tell them how much
molar_mass = {'Fe':55.845, 'Mg'... | tjhei/burnman_old | main.py | Python | gpl-2.0 | 11,849 | [
"Avogadro"
] | 73943e306f9b3b1a26c134e8221cd60f5d6b195ab5a35fbed304d614f500cf02 |
#!/usr/bin/env python
# Tsung-Yi Lin <tl483@cornell.edu>
# Ramakrishna Vedantam <vrama91@vt.edu>
# Original file: cider_scorer.py from https://github.com/tylin/coco-caption
# JMao: Add a function "compute_cider_sen_pair" in class CiderScorer
# It is used to calculate the distance between sentences
import copy
from c... | wenhuchen/ETHZ-Bootstrapped-Captioning | coco-caption/pycocoevalcap/cider/cider_scorer_compute_sentence.py | Python | bsd-3-clause | 11,491 | [
"Gaussian"
] | bcca0e36c9c90bc3c776015a7692c2e61897b7efafcf2e0c2b0939c799890c44 |
# Bob build tool
# Copyright (C) 2016 TechniSat Digital GmbH
#
# SPDX-License-Identifier: GPL-3.0-or-later
from .. import BOB_VERSION
from ..archive import getArchiver
from ..errors import ParseError, BuildError
from ..input import RecipeSet
from ..languages import StepSpec
from ..state import BobState
from ..stringp... | BobBuildTool/bob | pym/bob/cmds/jenkins.py | Python | gpl-3.0 | 98,515 | [
"VisIt"
] | 6aaa171b2efa998588cd366c54c319fbd295dcab4c7417dc9ea060fd1e39be34 |
#! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name: WrapperSystem.py
# Purpose:
# Author: Fabien Marteau <fabien.marteau@armadeus.com>
# Created: 25/04/2008
#-----------------------------------------------------------------------------... | magyarm/periphondemand-code | src/bin/utils/wrappersystem.py | Python | lgpl-2.1 | 8,653 | [
"VisIt"
] | d50b70f1ed2bc552a932c5c382c8b97961358287f22e46a482ef6712af6e7e08 |
#! /usr/bin/env python
import sys
import pybindgen
from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink
from pybindgen import CppMethod, CppConstructor, CppClass, Enum
from pybindgen.typehandlers.base import ForwardWrapperBase
class VisitorParam(Parameter):
DIRECTIONS = [Parameter.DIREC... | JBonsink/GSOC-2013 | tools/ns-allinone-3.14.1/pybindgen-0.15.0.809/examples/callback/modulegen.py | Python | gpl-3.0 | 1,775 | [
"VisIt"
] | 8a31460ac805bd2156ae6456d8d688783e0b72b9cc9b18dabcdac29f3d7d1fc3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.