text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
# Copyright 2017 Google 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 to in wri... | google/tangent | tangent/forward_ad.py | Python | apache-2.0 | 20,508 | [
"VisIt"
] | 27fdd426d139f7b9c5a631732cdc9a6e59d392e9ed0e4f52a031ec56860846d8 |
#!/usr/bin/env python
'''
Worker.
'''
import logging
from tornado import gen
from tornado.options import options
from tornado import httpclient
from .scraper import HTTPClient, Page
from .urlnorm import norm, join_parts
from . import tasks
async def add_task(redis, url):
task = join_parts(norm(url))
logging.... | skrushinsky/torspider | torspider/worker.py | Python | mit | 3,793 | [
"VisIt"
] | 86e817d406209f0a64530e24026d4b0a9a478637e1153061bc561692e4704317 |
#!/usr/bin/env python
from pyDFTutils.vasp.vasp_dos import write_all_sum_dos
from argparse import ArgumentParser
if __name__=='__main__':
parser=ArgumentParser(description='sum the DOSCAR valence dos')
parser.add_argument('-o','--output',help='output file name',default='sum_dos.txt')
args=parser.parse_args(... | mailhexu/pyDFTutils | pyDFTutils/vasp/sumdos.py | Python | lgpl-3.0 | 364 | [
"VASP"
] | 8b5b43e5f1a31ba8b5147ce1a2f19c362c9c3975bbef385371df07f985caa857 |
from abapy import materials
from abapy.misc import load
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
import pickle, copy, platform, compmod
# GENERAL SETTINGS
settings = {}
settings['export_fields'] = True
settings['compart'] = True
settings['is_3D'] = False
settings['lx'] = 10.... | lcharleux/compmod | doc/example_code/models/cuboidTest.py | Python | gpl-2.0 | 3,497 | [
"VTK"
] | 9f8e319281feddb4c89fec506b053ba3dadb364948b354c447477cff6fecab0d |
import datetime
import os
from unittest import mock
from django.conf import settings
from django.contrib.auth.models import Group, Permission
from django.core import mail
from django.core.files.base import ContentFile
from django.http import HttpRequest, HttpResponse
from django.test import TestCase, modify_settings, ... | wagtail/wagtail | wagtail/admin/tests/pages/test_edit_page.py | Python | bsd-3-clause | 118,639 | [
"VisIt"
] | f519235db20bbe330951d2c8c1908c21fcfcec7c59479c38c5f523d068e91b36 |
import unittest2 as unittest
import fluidinfo
import uuid
import time # used to sleep(1) to allow UI to update
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
import time
# The driver for the tests that follow
driver = webdr... | ntoll/bookreader | tests/run.py | Python | mit | 83,895 | [
"VisIt"
] | 69684e0a919aae447ca8ed63b9bb93c06a5119eccd663bb70a8ca57e18bf9c66 |
# -*- coding: utf-8 -*-
""" A context manager for managing things injected into __builtin__.
Qudi 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 ver... | drogenlied/qudi | logic/jupyterkernel/builtin_trap.py | Python | gpl-3.0 | 4,344 | [
"Brian"
] | c96e4eafad7464338cc79c1d7233315f553593bc678edc33112b1365f87ef090 |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (C) 1998-2010 by authors (see AUTHORS.txt ) #
# #
# This file is part of LuxRays. ... | rbrtribeiro/smalllux3 | samples/smallluxgpu/blender/render_smallluxgpu.py | Python | gpl-3.0 | 92,037 | [
"Gaussian"
] | 9a2a6beb3ae9871ba236824d88133e379120589a0890de01fb5b0c7e045d794d |
""" Class that contains client access to the StorageManagerDB handler.
"""
__RCSID__ = "$Id$"
import random
import errno
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getVOForGroup
from DIRAC.Core.Base.Client import Client, createClient
from DIRAC.Core.Utilitie... | fstagni/DIRAC | StorageManagementSystem/Client/StorageManagerClient.py | Python | gpl-3.0 | 9,133 | [
"DIRAC"
] | 9baea20803b490f35822602c51956ecfdd6bd513404e8d069bd465b50641ea41 |
"""Base class for creating HTML processing modules
This class is designed to take HTML as input and spit out equivalent
HTML as output. By itself it's not very interesting; you use it by
subclassing it and providing the methods you need to create your HTML
transformation.
This program is part of "Dive Into Python", ... | tapomayukh/projects_in_python | sandbox_tapo/src/refs/diveintopython-pdf-5.4/diveintopython-5.4/py/BaseHTMLProcessor.py | Python | mit | 3,750 | [
"VisIt"
] | e48ab223a4339635039ffed50b3411aa52cfad7f6bf77c05a805b2dc88da585a |
# Author: Brian M. Clapper, G. Varoquaux, Lars Buitinck
# License: BSD
from numpy.testing import assert_array_equal
from pytest import raises as assert_raises
import pytest
import numpy as np
from scipy.optimize import linear_sum_assignment
from scipy.sparse import random
from scipy.sparse.sputils import matrix
from... | e-q/scipy | scipy/optimize/tests/test_linear_assignment.py | Python | bsd-3-clause | 4,127 | [
"Brian"
] | 65e74b26cbc17063246b50d6a0f310ceaead66a8a3216c6b0189cc333e056728 |
#!/usr/bin/python3
import threading
from datetime import datetime
import urllib.request
BASE_PATH = '/Users/sukumargv/bc_ferries/'
def get_page(page_url, local_fname):
d = datetime.now()
fname = d.strftime("{}/{}".format(BASE_PATH, local_fname))
urllib.request.urlretrieve(page_url, fname)
"""
http://or... | sukumargv/hurricane | data_collection/get_data_alpha.py | Python | mit | 2,678 | [
"ORCA"
] | f11c8fb1e51de4141c16188db7970c6ef34184be9f450362e8bb8b47a3120050 |
#!/usr/bin/env python
import sys
import pysam
import Utils
import Script
def usage():
sys.stderr.write("""regionsCount.py - Compute coverage in specified regions.
Usage: regionsCount.py [-z] [-q qual] [-o outfile] bamfile bedfile
This program examines a BAM file `bamfile' and computes coverage in all intervals... | albertoriva/bioscripts | regionsCount.py | Python | gpl-3.0 | 5,561 | [
"pysam"
] | dad4e6cf936170ea423fe17015b8501318f99b47e4467bb932ec6985eed921a5 |
########################################################################
# $HeadURL$
# File : InstallTools.py
# Author : Ricardo Graciani
########################################################################
"""
Collection of Tools for installation of DIRAC components:
MySQL, DB's, Services's, Agents
It only ... | fibbo/DIRAC | Core/Utilities/InstallTools.py | Python | gpl-3.0 | 88,133 | [
"DIRAC"
] | 9d426adf7214fe0c8dcbd9910da38532cfbb37c9091d87eda06c9eff0a17b54e |
"""
Created on Sun Sep 10 22:06:46 2017
Converting from GSFLOW_print_controlfile4_gcng_melt30yr.m
Creates inputs files to run GSFLOW, based on the "Sagehen" example but
modified for Chimborazo's Gavilan Machay watershed. Crystal's AGU2016
poster.
GSFLOW Input files:
- control file (generate with GSFLOW_print_... | UMN-Hydro/GSFLOW_pre-processor | python_scripts/GSFLOW_print_controlfile_current.py | Python | gpl-3.0 | 21,848 | [
"CRYSTAL"
] | ddeb9a9b843ec10d9e34d13ecaa3cef2433d9eb70dfa39c75ea6053bf9164fe8 |
#########################################################
# YAM(BO)PY(THON) Library
#
# Generation of Yambo input files using python
#
# Authors: A Molina-Sanchez, HPC Miranda
#
# January 2016
#########################################################
# Calculation of COHSEX corrections for different times
# Author... | henriquemiranda/yambopy | tutorial/si/rt-optics.py | Python | bsd-3-clause | 6,164 | [
"Yambo"
] | dbf4013d0a1c9f4cfe3e0b4c8b2824a403997027a3b5a2f1a315d735a45f7758 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2014 Edgewall Software
# Copyright (C) 2004 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2004-2006 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2006 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2008 Matt Good <matt@matt-good.net>
# All rights reserved.
#... | pkdevbox/trac | trac/web/session.py | Python | bsd-3-clause | 22,324 | [
"VisIt"
] | 16fce848bd585896c2e87cea0c2695c64bd74e5eb4d559adf23e69b22f31915b |
#!/usr/bin/env python
__author__ = 'waroquiers'
import networkx as nx
from pymatgen.analysis.chemenv.connectivity.connected_components import ConnectedComponent
from pymatgen.analysis.chemenv.connectivity.connectivity_finder import ConnectivityFinder
from pymatgen.analysis.chemenv.connectivity.environment_nodes impo... | gVallverdu/pymatgen | pymatgen/analysis/chemenv/connectivity/tests/test_connected_components.py | Python | mit | 30,056 | [
"pymatgen"
] | 86315c3eb2039ca786173a23ad25161caf563c83e82ae241a3e2b54c519626b5 |
""" Principal Component Analysis
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis A. Engemann <denis-alexander.engemann@inria.fr>
# Michael Eickenberg <michael.eickenberg@inria.fr>... | zorroblue/scikit-learn | sklearn/decomposition/pca.py | Python | bsd-3-clause | 30,157 | [
"Gaussian"
] | 8c99f6a0c02d9d3d6016ddbd4d2fe7dd48762d21880729c4f1fefbeebe49f682 |
"""This demo solves the Stokes equations using an iterative linear solver.
Note that the sign for the pressure has been flipped for symmetry."""
# Copyright (C) 2010 Garth N. Wells
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser... | wathen/PhD | MHD/FEniCS/Stokes/demo_stokes-iterative.py | Python | mit | 3,112 | [
"VTK"
] | 01a632052a48bcb1e79cc532f24610a0c06c8a298c6d0092c70823c61d7acbd2 |
"""
Command Line Parameters for creating the Replication transformations Script
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Security.ProxyInfo import getProxyInfo
from DIRAC.ConfigurationSystem... | yujikato/DIRAC | src/DIRAC/TransformationSystem/Utilities/ReplicationCLIParameters.py | Python | gpl-3.0 | 5,672 | [
"DIRAC"
] | 781599ba5bca0fa487416e8fea9f4694812ff7cb2f2a9901e2e71733c06f36b3 |
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
import srwl_bl
import srwlib
import srwlpy
import srwl_uti_smp
def set_optics(v=None):
el = []
pp = []
names = ['S0', 'S0_HDM', 'HDM', 'HDM_S1', 'S1', 'S1_S2', 'S2', 'S2_CRL1', 'CRL1', 'CRL2', 'CRL2... | radiasoft/sirepo | tests/importer_data/srw_7.py | Python | apache-2.0 | 30,664 | [
"Gaussian"
] | c820af0e8d6189419e8b87776d20b244a59aa89a8c3648f6d2fa555f19ed142d |
from django.core.urlresolvers import reverse
from django.test import TestCase
from dash.categories.models import Category
from ureport.news.models import NewsItem, Video
from ureport.tests import DashTest
class NewsTest(DashTest):
def setUp(self):
super(NewsTest, self).setUp()
self.uganda = self... | eHealthAfrica/ureport | ureport/news/tests.py | Python | agpl-3.0 | 19,367 | [
"VisIt"
] | 66ebe70fc3d44457bf25764db4bb0aef1c080c2bcd47c250bf090d04915378db |
#!/usr/bin/env python
'''
Fly ArduPlane in SITL
AP_FLAKE8_CLEAN
'''
from __future__ import print_function
import math
import os
import signal
import sys
import time
from pymavlink import quaternion
from pymavlink import mavextra
from pymavlink import mavutil
from common import AutoTest
from common import AutoTestT... | collmot/ardupilot | Tools/autotest/arduplane.py | Python | gpl-3.0 | 141,353 | [
"Firefly"
] | e3754188ff211012cfc8dce28b562a7d1e30d60c9baf78fd498b03a6d4f173cf |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Bayesian Blocks for Time Series Analysis
========================================
Dynamic programming algorithm for solving a piecewise-constant model for
various datasets. This is based on the algorithm presented in Scargle
et al 2012 [1]_. This cod... | funbaker/astropy | astropy/stats/bayesian_blocks.py | Python | bsd-3-clause | 18,544 | [
"Gaussian"
] | e3e6eb66476d9d5040c0a4a432615db8e3acb985ad92129119ac911007683332 |
"""@package sir_trials
loads data, passes through SIR (sampling importance resampling filter)
"""
import numpy as np
import math
import matplotlib.pyplot as plt
import sys
import time
import scipy.stats as stats
import scipy.linalg # for sqrtm() function
import scipy.integrate as sp
sys.path.append('../')
import cp_d... | fatadama/estimation | challenge_problem/trials_clustering/sir_clustering.py | Python | gpl-2.0 | 12,895 | [
"Gaussian"
] | 883d3632362b13160d12cdc3948c5af506f71c46eef7f395534856a31bfb0a2f |
"""
Module with biopython-like classes to keep & process results from blast analysis.
"""
import uuid
from django.core.cache import cache
class Hsp(object):
"""Store and process HSP object from blast local search. """
def __init__(self, **kwargs):
self.limit_length = 80
self.align_length =... | michal-stuglik/django-blastplus | blastplus/features/record.py | Python | mit | 4,601 | [
"BLAST",
"Biopython"
] | 1ea69925eace7add5ef89243ede14dde543f382b0209527e66c6229736b0daf0 |
def generate_mesh(request, project_id=None, stack_id=None):
skeleton_id = int(request.POST.get('skeleton_id',-1))
# retrieve all components for a given skeleton id
components = Component.objects.filter(
project = project_id,
stack = stack_id,
skeleton_id = skeleton_id
).all()
... | dwitvliet/CATMAID | scripts/segmentation/generate_mesh.py | Python | gpl-3.0 | 2,644 | [
"VTK"
] | c4c79e47388e0284e0a930a2485edd1ac3fffe06fe564dc5119b5290a260e009 |
""" JobManagerHandler is the implementation of the JobManager service
in the DISET framework
The following methods are available in the Service interface
submitJob()
rescheduleJob()
deleteJob()
killJob()
"""
__RCSID__ = "$Id$"
from types import StringType, IntType, ListType
from DIRAC.Core.... | vmendez/DIRAC | WorkloadManagementSystem/Service/JobManagerHandler.py | Python | gpl-3.0 | 16,231 | [
"DIRAC"
] | 7c7fa06deda186d6b8543fd1f3fdf1949eccf90c74a86cefeccff5397b84ee89 |
# -*- coding:utf-8 -*-
# Copyright (c) 2015, Galaxy Authors. All Rights Reserved
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
from ftrace import sdk
from galaxy import log_pb2
from galaxy import master_pb2
from galaxy import galaxy_pb2
from galaxy... | bluebore/galaxy | platform/src/trace/dao.py | Python | bsd-3-clause | 7,701 | [
"Galaxy"
] | 62884830130220ed241f0de8979d964d3cebef3c14a70e18d355f8f2b1981650 |
import importlib
import json
import traceback
import time
import modular
def trackTimeStart(mud, _):
if 'honing' in mud.state:
skill, counter = mud.state['honing']
mud.send(skill)
mud.state['honing'] = (skill, counter + 1)
return
mud.state['task_start_time'] = time.time()
d... | cizra/pycat | coffee.py | Python | unlicense | 31,643 | [
"CRYSTAL"
] | 1238aac74237024a44feb2208a9747ae40b9922143cd0aaec374fdfd26f11f6f |
#!/usr/bin/python
# Copyright (C) 2012 Sibi <sibi@psibi.in>
#
# This file is part of Neuron.
#
# Neuron 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) an... | psibi/Neuron | rprop.py | Python | gpl-3.0 | 2,917 | [
"NEURON"
] | 4ce39a4b978dff0a13c7a7e480c2161c88e0fdd6bd08272092255b9e12518688 |
"""
Module to solve sqrt-LASSO convex program using regreg.
"""
import numpy as np
from scipy import sparse
from scipy.stats import norm as ndist, chi as chidist
from scipy.interpolate import interp1d
# regreg http://github.com/regreg
import regreg.api as rr
import regreg.affine as ra
from regreg.smooth.glm import ... | selective-inference/selective-inference | selectinf/algorithms/sqrt_lasso.py | Python | bsd-3-clause | 21,257 | [
"Gaussian"
] | ee9481ea3430f12337710a7e692df4f572e6757331ce9650c1661217c176d563 |
import vtk
def get_program_parameters():
import argparse
description = 'Generate triangle points, then write a .vtp file.'
epilogue = '''
'''
parser = argparse.ArgumentParser(description=description, epilog=epilogue)
parser.add_argument('filename', help='A required vtp filename.', nargs='?',
... | lorensen/VTKExamples | src/Python/PolyData/TriangleCorners.py | Python | apache-2.0 | 966 | [
"VTK"
] | e7888e841a97c3dcd182e9f3d21ed093d3c67606131c021ce37fcad8daea685b |
#!/usr/env/python
'''
Preprocessing NEST output for VIOLA
-----------------------------------
This script preprocesses spiking data from a NEST simulation using the
topology module for spatial structure so that it can be loaded to VIOLA as
"binned" data type. Concretely, it creates spatially and temporally binned
spik... | espenhgn/VIOLA | test_data/nest_preprocessing.py | Python | gpl-2.0 | 31,619 | [
"NEURON"
] | 442e163021fb69328d5df3a3a231cfe4d8933ac3a4484bada39f7985924f8700 |
from setuptools import setup, find_packages
import sys
import subprocess
import re
def check_java():
p = subprocess.Popen(['java', '-version'], stderr=subprocess.PIPE)
for line in p.stderr:
if line.startswith('java version'):
return True
return False
def check_bwa():
p = subproce... | MischaLundberg/bamsurgeon | setup.py | Python | mit | 4,018 | [
"BWA",
"pysam"
] | a10e0e0de725c083f3cc44912c54c25cdc8f782dab2286ed20a737a3170f3d60 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | openstack/rally | tests/unit/test_ddt.py | Python | apache-2.0 | 4,367 | [
"VisIt"
] | 1303f1dfe292b0d0059c4a69295aeea8b99daa97efca4c21771bf84e0b908fa1 |
import urllib
import galaxy.model
from galaxy.model.orm import *
from galaxy.model.mapping import context as sa_session
from base.twilltestcase import *
class TestHistory( TwillTestCase ):
def test_000_history_behavior_between_logout_login( self ):
"""Testing history behavior between logout and login"""
... | volpino/Yeps-EURAC | test/functional/test_history_functions.py | Python | mit | 53,008 | [
"Galaxy"
] | cf9ae2bbf155cab66e00095d9741329f42688fcf60a4843f2bba3548dd801e73 |
#!/usr/bin/env python
# File created on 09 Feb 2010
from __future__ import division
__author__ = "Greg Caporaso, Jens Reeder"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Greg Caporaso", "Daniel McDonald", "Jens Reeder",
"Jose Antonio Navas Molina"]
__credits__ = [
"Greg Capor... | wasade/qiime | scripts/identify_chimeric_seqs.py | Python | gpl-2.0 | 22,016 | [
"BLAST"
] | 2df22bf39398c7892a9894a005762bdc0848c418df3de5be7372da9f81c8170f |
from dominate import tags
from dominate.util import raw
from flask import current_app
from markupsafe import Markup
from visitor import Visitor
def render_form(form, **kwargs):
r = WTFormsRenderer(**kwargs)
return Markup(r.visit(form))
class WTFormsRenderer(Visitor):
def __init__(self,
... | Widiot/simpleblog | venv/lib/python3.5/site-packages/flask_bootstrap/forms.py | Python | mit | 4,628 | [
"VisIt"
] | 984b86c2e9b8b88d9b24a3703ca7910c314cc941afe4ca28aae436f4f65f0fb0 |
# UNICODE CHARACTER DATABASE
# This file was generated with the command:
# ./generate_unicodedb.py --unidata_version=3.2.0 --output=unicodedb_3_2_0 --base=unicodedb_5_2_0
from rpython.rlib.rarithmetic import r_longlong
import unicodedb_5_2_0 as base_mod
version = '3.2.0'
_names = {
}
_names_corrected = {
9190: ... | oblique-labs/pyVM | rpython/rlib/unicodedata/unicodedb_3_2_0.py | Python | mit | 559,211 | [
"BWA",
"FLEUR"
] | abf116653a8d4501e704c199713ad64574753b9d5303407afaf0e8bae749f405 |
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008-2012 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012-2014 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | beernarrd/gramps | gramps/plugins/drawreport/calendarreport.py | Python | gpl-2.0 | 30,556 | [
"Brian"
] | 8b8c2135896d716d168bb78211b9fc179898110e5a1f6f43e151f25d5bb32657 |
from address import Address
class Grid:
def __init__(self, width, height):
self.width = width
self.height = height
self.addresses = []
def calculate_route(self):
"""
Calculates the route to visit all of the addresses on the grid,
assuming starting position coo... | gummoe/pizzabot | grid.py | Python | mit | 2,042 | [
"VisIt"
] | 6f1334bab875ef5bf056f1224953c3c7d42b1c2a1008724ae2f724404a11c645 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/plugins/songs/forms/topicsdialog.py | Python | gpl-2.0 | 3,444 | [
"Brian"
] | d1401443cb2dd46cbe6f3fd26cc20b54d840a397dbb58416201d4375ddf98671 |
"""
This module is for hemodynamic reponse function (hrf) specification.
Here we provide for SPM, Glover hrfs and finite timpulse response (FIR) models.
This module closely follows SPM implementation
Author: Bertrand Thirion, 2011--2018
"""
import warnings
import numpy as np
from scipy.stats import gamma
def _gamma... | bthirion/nistats | nistats/hemodynamic_models.py | Python | bsd-3-clause | 16,630 | [
"DIRAC"
] | d0b9ff14fddac1c987808ef948333eb7cd9999252d85812a8ece50565e466903 |
"""
CBMPy: CBNetDB module
=====================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | SystemsBioinformatics/cbmpy | cbmpy/CBNetDB.py | Python | gpl-3.0 | 21,569 | [
"PySCeS"
] | 17f10052788ff6e6deb47fd5743286347f8179b83bb927ba479a42bf0c904ed8 |
from _collections import OrderedDict
import theano
from theano import tensor as TT
#from theano.tensor.shared_randomstreams import RandomStreams
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import numpy as np
from . import cache
from . import neuron
from . import lif
from . import lif_rate
fr... | ctn-waterloo/nengo_theano | nengo_theano/ensemble_origin.py | Python | mit | 10,116 | [
"NEURON"
] | 102cebb63482eff76292d05e9da553b4e11b9b00b61ada8e4d1a2606f1bc9a4a |
import numpy
import pickle
from chainer.functions.connection import bilinear
from chainer import link
class Bilinear(link.Link):
"""Bilinear layer that performs tensor multiplication.
Bilinear is a primitive link that wraps the
:func:`~chainer.functions.bilinear` functions. It holds parameters ``W``,
... | truongdq/chainer | chainer/links/connection/bilinear.py | Python | mit | 4,805 | [
"Gaussian"
] | bedaeef278e1aba24548a41d1d45397f9b0c0c8a6b5fd03985e2abdb429c6e2c |
# pylint: disable=bad-continuation
"""
Certificate HTML webview.
"""
import logging
import urllib
from datetime import datetime
from uuid import uuid4
import pytz
from django.conf import settings
from django.contrib.auth.models import User
from django.http import Http404, HttpResponse
from django.template import Reque... | Edraak/edraak-platform | lms/djangoapps/certificates/views/webview.py | Python | agpl-3.0 | 32,508 | [
"VisIt"
] | 935d22797ed3497e039d7c6b7cc34d57a310e222b40a38739079663eba945eb8 |
import argparse
import time
import torch
import pickle
import numpy as np
import itertools
from viz import *
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
# Training settings
parser = argparse.ArgumentParser(description='PyTorch semi-supervised MN... | fducau/AAE_pytorch | script/aae_semisupervised.py | Python | gpl-3.0 | 14,002 | [
"Gaussian"
] | 7f85724607a86f7f25c102243a6d5dd4dd1c9668f43494cddb6ec0c00e312717 |
"""
"""
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... | hgiemza/DIRAC | WorkloadManagementSystem/Client/JobState/JobManifest.py | Python | gpl-3.0 | 8,499 | [
"DIRAC"
] | cee99ccfc09695703cdc43403c539e95c050876727d40aeb25869117d5a0dd4e |
# -*- coding: utf-8 -*-
#
# Bio-Formats documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 29 15:42:49 2012.
#
# 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.
#
#... | dominikl/bioformats | docs/sphinx/conf.py | Python | gpl-2.0 | 14,277 | [
"CRYSTAL"
] | fe28bddeccad72e8b43c7f51a0c6273259f8ad4705e87f5447456ce651d11b15 |
# -*- coding: utf-8 -*-
# Relational database models for Montage
import json
import time
import random
import string
import datetime
import itertools
from collections import Counter, defaultdict
from math import ceil
from pyvotecore.schulze_npr import SchulzeNPR
from sqlalchemy import (Text,
C... | hatnote/montage | montage/rdb.py | Python | bsd-3-clause | 120,527 | [
"VisIt"
] | ef84cd8052e1eafbbce73cbc86f4a2de82ce5467b7ae22e1a25b44672e8633c5 |
import os
from ase import Atoms, Atom
from ase.calculators.jacapo import Jacapo
atoms = Atoms([Atom('H',[0,0,0])],
cell=(2,2,2))
calc = Jacapo('Jacapo-test.nc',
pw=200,
nbands=2,
kpts=(1,1,1),
spinpol=False,
dipole=False,
... | conwayje/ase-python | ase/test/jacapo/jacapo.py | Python | gpl-2.0 | 474 | [
"ASE"
] | 3c2ed0d12e2d0fa8048d52cd60f03f3db57835940c97eb45bf74f482d0b8f4e8 |
# aux.py
# Misc. utility functions for hybrid_lda.py
#
# Author: Brian D. Bue (bbue@rice.edu)
# Last Modified: 5/14/12
#
# Notes: All matrices/vectors are assumed to be numpy arrays
#
# Copyright: 2010-2012 Rice University
from numpy import asarray, unique, where, sum, min, max
def loadmtx(infile):
'''
Reads ... | dsmbgu8/hybrid_LDA | aux.py | Python | bsd-3-clause | 4,590 | [
"Brian"
] | 3d0297b621c8a1fc4c73031ac19584cbd1eef9fc4dd69ae3527f3b11503d2a6e |
import numpy as np
import netCDF4 as nc
float_type = "f8"
# Get number of vertical levels and size from .ini file
with open('arm.ini') as f:
for line in f:
if line.split('=')[0] == 'ktot':
kmax = int(line.split('=')[1])
if line.split('=')[0]=='zsize':
zsize = float(line.spl... | microhh/microhh2 | cases/arm/arm_input.py | Python | gpl-3.0 | 4,610 | [
"NetCDF"
] | e94afe2b7f5c1c1c47d32d6a01ab4efed7f2079435ac40f1b3391c96e4cdb868 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import os
import unittest
import random
import matplotlib
matplotlib.use("pdf")
from pymatgen.util.testing import PymatgenTest
from pymatgen.analysis.local_env import Val... | nisse3000/pymatgen | pymatgen/analysis/defects/tests/test_point_defects.py | Python | mit | 31,184 | [
"GULP",
"VASP",
"pymatgen"
] | 798c1c15afecd52e22c27f4bdcb2262fb639b377afa3e8ad3fae819bf14deb50 |
#!python3
# -*- coding: utf-8 -*-
'''
Created on Jan 15, 2016
Modified on Oct 06, 2016
Version 0.03.ga
@author: rainier.madruga@gmail.com
A simple Python Program to scrape the ESPN FC website for content.
'''
# Import Libraries needed for Scraping the various web pages
import bs4
import re
import datetime
import time
... | rainier-m/python-soccer | parseInjuries.py | Python | gpl-2.0 | 10,066 | [
"CRYSTAL"
] | 2c74267f2e2198eb62bf3686c6a894d6609d4ac7b4d285bd75a13434f99e303f |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | jairideout/q2cli | q2cli/__main__.py | Python | bsd-3-clause | 1,233 | [
"VisIt"
] | ba6dff7b844fc305b4e6ec81d75b1d539f586016c886b54c9af85f6b72a2daec |
# 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 RDecipher(RPackage):
"""Tools for curating, analyzing, and manipulating biological sequenc... | LLNL/spack | var/spack/repos/builtin/packages/r-decipher/package.py | Python | lgpl-2.1 | 1,396 | [
"Bioconductor"
] | ad8ec2b62e0831c83214451b9cab74bb4db3942f97c976644dc13452ea8be474 |
# Copyright (C) 2012,2013
# 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 t... | kkreis/espressopp | src/interaction/OPLS.py | Python | gpl-3.0 | 3,363 | [
"ESPResSo"
] | 5dfee85dd9b7548f667bdbaf37a6633a09a5e51901db2cd1271452eb47312c12 |
# This software is Copyright 2014 The Regents of the University of
# California. All Rights Reserved.
#
# Permission to copy, modify, and distribute this software and its
# documentation for educational, research and non-profit purposes, without fee,
# and without a written agreement is hereby granted, provided that th... | namphuon/ViFi | scripts/hg19util.py | Python | gpl-3.0 | 29,030 | [
"pysam"
] | d1148008a5d6439ab0661d7067aeb35fe94854147e211875d057f04463e09312 |
from setuptools import setup, find_packages
long_description=\
"""============================================================
pySMT: A library for SMT formulae manipulation and solving
============================================================
pySMT makes working with Satisfiability Modulo Theory simple.
Among o... | chubbymaggie/pysmt | setup.py | Python | apache-2.0 | 2,280 | [
"VisIt"
] | 3ded2d53d2148ebf63b73239953da3f5a9d4abe115619eaf2753ce2cd71f8d73 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | rmcgibbo/psi4public | psi4/share/psi4/databases/JSCH.py | Python | lgpl-3.0 | 287,170 | [
"Psi4"
] | 3efc97914474dab72b9c39a14baccbfe57d9f5187d4a66dc66fbdbf2b7af5de6 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | andysim/psi4 | psi4/src/psi4/libfunctional/matlab/mfiles/purify.py | Python | gpl-2.0 | 3,533 | [
"Psi4"
] | 380102be64d05a185c2d364be4b55cbd5d105d3ea11e926ccf2a7aa37ca03304 |
#!/usr/bin/python
"""
function:
parse the block of thermo data in a lammps logfile and perform auto- and
cross correlation of the specified column data. The total sum of the
correlation is also computed which can be converted to an integral by
multiplying by the timestep.
output:
standard ... | nchong/ic_liggghts | doc/Scripts/correlate.py | Python | gpl-2.0 | 2,533 | [
"LAMMPS"
] | 35b57241ffb6ff4474a90082d98deabcaaff6b70fad126a5505f1a758a0e0b39 |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Miscellaneous utility functions.
"""
from collections.abc import Hashable
from abc import ABCMeta, abstractmethod
from co... | pp-mo/iris | lib/iris/util.py | Python | lgpl-3.0 | 62,477 | [
"NetCDF"
] | 8c0e25fd0c36e5736508666019d4b784dab91d653a478b5e0776a13e4bf240b8 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-trace | tests/unit/gapic/trace_v2/test_trace_service.py | Python | apache-2.0 | 60,778 | [
"Octopus"
] | 9570a6f80a4e5bc9e72bde6a728ac79b8035a19a1627b7f2495ecf376bf04d62 |
# Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
from . import sigtools
from scipy._lib.six import callable
from scipy._lib._version import NumpyVersion
from scipy import linalg
from scipy.fftpack import (fft, ifft, ifftshift, ... | mortonjt/scipy | scipy/signal/signaltools.py | Python | bsd-3-clause | 81,793 | [
"Gaussian"
] | 00b4e5f86078519b4121449c013cfaec136ffd24fb96762d594b3454a003cb8b |
import ast
import _ast
from _ast import Dict, Constant, Name, Attribute
import astor
from nimoy.specification import Specification
from nimoy.ast_tools.expression_transformer import ComparisonExpressionTransformer, ThrownExpressionTransformer, \
MockBehaviorExpressionTransformer, PowerAssertionTransformer
class... | browncoat-ninjas/nimoy | specs/nimoy/ast_tools/expression_transformer_spec.py | Python | apache-2.0 | 33,634 | [
"VisIt"
] | 1a119ab6389ee650240141281348dc1af207e9a160c83106334bbe83c30bc100 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements input and output processing from PWSCF.
"""
import re
from monty.io import zopen
from monty.re import regrep
from collections import defaultdict
from pymatgen.core.periodic_tabl... | gVallverdu/pymatgen | pymatgen/io/pwscf.py | Python | mit | 19,106 | [
"CRYSTAL",
"pymatgen"
] | add3673cf0baaf64a420950834e07f14903352b2deff499ada8c96f10ae6f858 |
import os
from os.path import join
import numpy as n
def writeScript(rootName, plate):
f=open(rootName+".sh",'w')
f.write("#!/bin/bash \n")
f.write("#PBS -l walltime=48:00:00 \n")
f.write("#PBS -o "+plate+".o.$PBS_JOBID \n")
f.write("#PBS -e "+plate+".e$PBS_JOBID \n")
f.write("#PBS -M johan.comparat@gmail.com \n"... | JohanComparat/pySU | galaxy/bin_SDSS/write_run_scripts.py | Python | cc0-1.0 | 1,205 | [
"Galaxy"
] | 40a51a104636dc1add87443b2dd1ed660927a72076e75123f55556b3fae60647 |
#!/usr/bin/env python
"""
Returns the LFN matching given GUIDs
"""
from DIRAC.Core.Base.Script import Script
@Script()
def main():
# Registering arguments will automatically add their description to the help menu
Script.registerArgument("GUIDs: GUIDs separated by a comma")
Script.parseCommandLine()
i... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/scripts/dirac_dms_resolve_guid.py | Python | gpl-3.0 | 1,242 | [
"DIRAC"
] | 587f39779ee33226c9580930b17a2973c79d1af45859fd3c77ec858d6116cf53 |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | kubeflow/kfp-tekton-backend | components/ibm-components/ffdl/train/src/train.py | Python | apache-2.0 | 5,316 | [
"VisIt"
] | 9c70562dc95fe514abc1a7fc6b8e5ef40ff607fd868f99341bf0bd7c110896e9 |
import os
import pathlib
from .. import ansys, flac3d, gmsh, mdpa, ply, stl, vtk, vtu, xdmf
from .._common import error
from .._helpers import _filetypes_from_path, read, reader_map
def add_args(parser):
parser.add_argument("infile", type=str, help="mesh file to convert")
parser.add_argument(
"--inp... | nschloe/meshio | src/meshio/_cli/_ascii.py | Python | mit | 1,869 | [
"VTK"
] | 97011cbf9aee121d82789e32d56c26929eb7e8c122965b54c3b10f65978079b1 |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | qiime2/q2-types | q2_types/feature_data/_transformer.py | Python | bsd-3-clause | 20,617 | [
"BLAST"
] | 63e8898bb3af9b8ac8455fde0b9e8caf2fec3274ee87d2d58d45fa4dcc6e88b4 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | tiagocardosos/stoq | stoqlib/gui/test/test_discounteditor.py | Python | gpl-2.0 | 4,144 | [
"VisIt"
] | 9b96e9dfd1422fab9223d0b185640de0153c6b79529e48c16ae288382ceb1813 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
#
# 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 ... | pmghalvorsen/gramps_branch | gramps/gen/plug/_import.py | Python | gpl-2.0 | 2,659 | [
"Brian"
] | ea38160612c04ae51ac33d6a9dd1e180a7df844fb1ccd0def3fdeb36dc9096df |
#!/usr/bin/env python
__author__ = 'Mike McCann,Duane Edgington,Reiko Michisaki'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'duane at mbari.org'
__doc__ = '''
cron loader for CANON wave gliders slocum, OA and TEX in September 2013
Mike McCann; Modified by Duane Edgington and Reiko Michisaki... | josephmfaulkner/stoqs | stoqs/loaders/CANON/wg_loadsep2013.py | Python | gpl-3.0 | 5,148 | [
"NetCDF"
] | 806f5edddde806ebaaf485e2935cdb7feffdc4f061dae685c520f801092060fc |
"""=================
ChIP-Seq pipeline
=================
:Author: Andreas Heger
:Release: $Id: pipeline_chipseq.py 2900 2010-04-13 14:38:00Z andreas $
:Date: |today|
:Tags: Python
The ChIP-Seq pipeline imports reads from one or more ChIP-Seq experiments and
performs the following tasks:
* align reads to the genom... | CGATOxford/CGATPipelines | obsolete/pipeline_chipseq.py | Python | mit | 82,329 | [
"BWA",
"Bowtie",
"pysam"
] | 9aa1f9e9626dd75f30d8f5c5505917cfb5c62adc7644cc57754276b67f8885c9 |
import csv
import datetime
import glob
import logging
import os
import pathlib
import qt
import slicer
import slicer.util
import slicer.cli
from slicer.ScriptedLoadableModule import *
import vtk
#
# RigidAlignmentModule
#
class RigidAlignmentModule(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base clas... | NIRALUser/GROUPS | Modules/Scripted/RigidAlignmentModule/RigidAlignmentModule.py | Python | apache-2.0 | 8,139 | [
"VTK"
] | 80dda1496bd74e6d4fd5f8f95ed02425b14b70a5f7b99067b65541d1db8e50c0 |
from __future__ import division
import abc
import numpy as np
from numpy.fft import fft2, ifft2, fftshift
from menpofast.feature import gradient as fast_gradient
from menpofast.utils import build_parts_image
from menpofast.image import Image
from menpofit.base import build_sampling_grid
from alabortcvpr2015.aam.alg... | jalabort/alabortcvpr2015 | alabortcvpr2015/clm/algorithm.py | Python | bsd-2-clause | 5,402 | [
"Gaussian"
] | a2f16b17259f267a441813dffe315d51eb99ceef2ef9eaac4e20c1328ee7b122 |
"""
Acceptance tests for Studio's Settings Details pages
"""
from datetime import datetime, timedelta
from flaky import flaky
from nose.plugins.attrib import attr
from unittest import skip
from ...fixtures.config import ConfigModelFixture
from ...fixtures.course import CourseFixture
from ...pages.studio.settings impor... | ampax/edx-platform | common/test/acceptance/tests/studio/test_studio_settings_details.py | Python | agpl-3.0 | 9,899 | [
"VisIt"
] | 7472d5555fbe906de111ee6e9ae4751c96f0d57a7bab8a576c7cc7a99ab03957 |
"""
Functions to create initializers for parameter variables.
Examples
--------
>>> from lasagne.layers import DenseLayer
>>> from lasagne.init import Constant, GlorotUniform
>>> l1 = DenseLayer((100,20), num_units=50, W=GlorotUniform(), b=Constant(0.0))
"""
import numpy as np
from .utils import floatX
from .random ... | rlkelly/Lasagne | lasagne/init.py | Python | mit | 10,865 | [
"Gaussian"
] | bfad374f834b29500a1fa753c19733085236a3ae1b37740c6b6ed6a800bf2f35 |
# -*- coding: utf-8 -*-
"""This module contains IO functions for BEL scripts."""
import gzip
import logging
from typing import TextIO, Union
from bel_resources.utils import download
from networkx.utils import open_file
from .line_utils import parse_lines
from ..struct import BELGraph
__all__ = [
"from_bel_scri... | pybel/pybel | src/pybel/io/lines.py | Python | mit | 1,647 | [
"Pybel"
] | 5a2dd15de91e024dce7fbd9149c85fa5fec93a124349a82d22e517e918f910a1 |
# 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... | AndreasMadsen/tensorflow | tensorflow/contrib/learn/python/learn/estimators/__init__.py | Python | apache-2.0 | 11,622 | [
"Gaussian"
] | 9031066a5dc30b857e20c4826bd9a8273a4dd2da7364f3353c023d7ab682e6c9 |
#!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/dft/test/test_numint.py | Python | apache-2.0 | 19,682 | [
"PySCF"
] | 70b8f5829a0eae4ee1fc343687f85e20df0a571c62f890841d880fb0eb4f315a |
#!/usr/bin/env python
"""
As wave2D_func1.py, but the code is divided more into functions
and classes.
"""
from __future__ import division # disable integer division
from scitools.numpyutils import *
from scitools.StringFunction import StringFunction
import Gnuplot, time, commands, sys
try:
import weave # SciPy ... | sniemi/SamPy | sandbox/src1/TCSE3-3rd-examples/src/py/examples/pde/wave2D_func2.py | Python | bsd-2-clause | 26,541 | [
"Gaussian"
] | f526e88f0ad53c22b77544d5e758f4eb2d96f0e2c5771d6959db8221068d6831 |
import click
from netCDF4 import Dataset
from pyproj import Proj
from trefoil.netcdf import crs
from trefoil.cli import cli
@cli.command(short_help='Set spatial reference information for variables in an existing dataset')
@click.argument('filename', type=click.Path(exists=True))
@click.argument('proj4')
@click.optio... | consbio/clover | trefoil/cli/crs.py | Python | bsd-3-clause | 1,167 | [
"NetCDF"
] | 22401aa40c2b9f0b47a4aeaf758328d7f5ef3abdcfde59a79534134d20331c67 |
import io
import json
import logging
import re
import struct
import dateutil.parser
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.db.models import Q
from django.http import (Http404,
... | reviewboard/reviewboard | reviewboard/reviews/views.py | Python | mit | 90,153 | [
"VisIt"
] | afd36247c6a05c8cad6e9f0abc6d2d8d14b289aaec5505e6409d9b491b6cb136 |
# Copyright (c) 2010-2015 Bo Lin
# Copyright (c) 2010-2015 Yanhong Annie Liu
# Copyright (c) 2010-2015 Stony Brook University
# Copyright (c) 2010-2015 The Research Foundation of SUNY
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
#... | sghosh1991/distalgo | da/compiler/ui.py | Python | mit | 15,030 | [
"VisIt"
] | 2c6030e4e1f434bcb2ff12a71f22fc8b5ae9dd4043bf44864a8a73a0c06a4b38 |
# Copyright (C) 2012-2018
# Max Planck Institute for Polymer Research
# Copyright (C) 2008-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 the GNU General... | espressopp/espressopp | src/interaction/LennardJones.py | Python | gpl-3.0 | 58,260 | [
"ESPResSo"
] | d5b3fc3949db18fa95b07cb86a7d2a786ea406be82f56e844a9ee1aea40a476d |
from itertools import product
import numpy as np
import nose.tools as nt
from ..convenience import lasso, step, threshold
from ..query import optimization_sampler
from ...tests.instance import (gaussian_instance,
logistic_instance,
poisson_instance)
from ..... | selective-inference/selective-inference | selectinf/randomized/tests/sandbox/test_opt_weighted_intervals.py | Python | bsd-3-clause | 2,290 | [
"Gaussian"
] | 22f49fe8a2d557c76e08a35c0a05b5b0e04f333cd9774ebc18de24cd11e09134 |
import pytest
import numpy.testing as npt
from nose.tools import (assert_equal, assert_not_equal, assert_almost_equal,
raises, assert_true)
from nose.plugins.skip import Skip, SkipTest
import numpy.testing as npt
import tempfile
from .test_helpers import data_filename, assert_items_equal
impor... | choderalab/openpathsampling | openpathsampling/tests/test_gromacs_engine.py | Python | lgpl-2.1 | 15,429 | [
"Gromacs",
"MDTraj"
] | 0af063f8435363d403831cd6194ba7bb9781cf02a46a486b94de2ae60c716526 |
#!/usr/bin/env python3
#
# Copyright (C) 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... | mkuron/espresso | maintainer/CI/dox_warnings.py | Python | gpl-3.0 | 4,149 | [
"ESPResSo"
] | b52bc999c4dc61d152fe8cd8d63385595e59f74041b572efb52e6c8c6014ae2d |
# 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... | dyoung418/tensorflow | tensorflow/contrib/distributions/python/ops/mvn_linear_operator.py | Python | apache-2.0 | 12,700 | [
"Gaussian"
] | ea73f0f26bfb177567503735ace055251dacb29d75c24b91aa38e469b152d4e8 |
#!/usr/bin/env python2
"""
This Python script reads the result.txt file written by the
solve executable and visualizes the data for review.
Dependencies: NumPy, matplotlib
Some good alternatives to matplotlib for visualization
are Mayavi, PyGame, and OpenCV.
"""
from __future__ import division
import time
import num... | jnez71/demos | physics/heat/analyze.py | Python | mit | 2,087 | [
"Mayavi"
] | 61605d2a883f5389c21062b5d5d8aa18122f30bc0d7e1416327e00854ffb6e5e |
import lmfit
import numpy as np
#: valid values for keyword argument `fit_offset` in :func:`estimate`
VALID_FIT_OFFSETS = ["fit", "gauss", "mean", "mode"]
#: valid values for keyword argument `fit_profile` in :func:`estimate`
VALID_FIT_PROFILES = ["offset", "poly2o", "tilt"]
def estimate(data, fit_offset="mean", fi... | RI-imaging/qpimage | qpimage/bg_estimate.py | Python | mit | 6,516 | [
"Gaussian"
] | 4bf1aef8a71e17c2f5042571064b241424199b0952657e069f57116065887621 |
'''
The 'forecast' module contains class definitions for
retreiving forecasted data from UNIDATA Thredd servers.
'''
from netCDF4 import num2date
import numpy as np
import pandas as pd
from requests.exceptions import HTTPError
from xml.etree.ElementTree import ParseError
from pvlib.location import Location
from pvlib.... | mikofski/pvlib-python | pvlib/forecast.py | Python | bsd-3-clause | 39,056 | [
"NetCDF"
] | 4fefb7cf66a15cb2bfe0bb4ad61d66fc6fa97cca0a7b6e16fe9028350e25ac5c |
#!/usr/bin/env python
#
# This code was copied from the data generation program of Tencent Alchemy
# project (https://github.com/tencent-alchemy).
#
#
# #
# # Copyright 2019 Tencent America LLC. All Rights Reserved.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file e... | gkc1000/pyscf | pyscf/df/hessian/rhf.py | Python | apache-2.0 | 22,178 | [
"PySCF"
] | 356761285c52226e8b316c095da8448aedcd7a742a69979ba761429c8db2bdc3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.