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/python3
"""
Copyright SuperDARN Canada 2020
Keith Kotyk
Borealis Start up script
The Simpsons, Season 1 Episode 3 - Steamed Hams
"""
import argparse
import sys
import subprocess as sp
import datetime
import os
import time
import json
def usage_msg():
"""
Return the usage message for this process... | SuperDARNCanada/borealis | steamed_hams.py | Python | gpl-3.0 | 7,911 | [
"Brian"
] | 66bf84721370293174d32ab00845b1a0d466cf4d97f5a5e574998986d74339b1 |
# ancestor.py - generic DAG ancestor algorithm for mercurial
#
# Copyright 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
import heapq
def ancestor(a, b, pfunc):
"""
return the leas... | pombredanne/SmartNotes | mercurial/ancestor.py | Python | gpl-3.0 | 2,264 | [
"VisIt"
] | 4c7630a4b34d3cf91fbc9f296034d5932e48d0836d5a02aed798af45d1747ff0 |
#!/usr/bin/env python -i
# preceding line should have path for Python on your machine
# simple.py
# Purpose: mimic operation of examples/COUPLE/simple/simple.cpp via Python
# Serial syntax: simple.py in.lammps
# in.lammps = LAMMPS input script
# Parallel syntax: mpirun -np 4 simple.py in.lammps
# ... | jeremiahyan/lammps | python/examples/simple.py | Python | gpl-2.0 | 3,330 | [
"LAMMPS"
] | 26751ff8f62a5666036f87e3f707ec72491b99b067216bd20ce60e99b6913bd4 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2014 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | andrebellafronte/stoq | stoqlib/gui/dialogs/tilldailymovement.py | Python | gpl-2.0 | 19,893 | [
"VisIt"
] | 906308bf535f781cbab16a89065572d2ddb4ebf15c437155cb4585916deec213 |
'''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on April, 20, 2012
@author: Sourabh Bajaj
@contact: sourabh@sourabhbajaj.com
@summary: Visualizer Main Code
... | QuantSoftware/QuantSoftwareToolkit | Legacy/Visualizer/Visualizer.py | Python | bsd-3-clause | 62,630 | [
"VisIt"
] | eb2ec0adbaaf20b184010485535b23a24da80a80855838e37b0c99c1b1253948 |
"""SCons.Util
Various utility functions go here.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the So... | cournape/numscons | numscons/scons-local/scons-local-1.2.0/SCons/Util.py | Python | bsd-3-clause | 53,895 | [
"VisIt"
] | 34ea2a6885df91f54ec133006f4ee7819b8d6fbca83f78779d8f422dfd1ee896 |
# -*- coding: utf-8 -*-
from django.contrib import admin
from models import Visit, Subscription, Plan, Payment
from forms import EmptyPermittedFormSet
class PlanAdmin(admin.ModelAdmin):
list_display = ('name', 'price')
class AdministrantedModelAdmin(admin.ModelAdmin):
def save_model(self, request, obj, f... | clincher/phuketstash | visits/admin.py | Python | bsd-3-clause | 1,917 | [
"VisIt"
] | 6c7e0a70d882bb8ce5acd57438448fabe1b1bc018895fd0464fe43cd2cd36f57 |
from __future__ import division
import numpy as np
import scipy.signal as sig
import scipy.stats
from itertools import product
import math
import amitgroup as ag
import amitgroup.util
# TODO: Under development
def hog(data, cell_size, block_size, num_bins=9):
assert len(cell_size) == 2, "cell_size must be length ... | amitgroup/amitgroup | amitgroup/features/hog.py | Python | bsd-3-clause | 4,194 | [
"Gaussian"
] | 0bcbea815b8cf1aae782a6c3f996675a53e18462879c56a5bdc15299b6d5f89f |
##############################################################################
# adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD)
# Simulations on HPC Resources
# Copyright 2017 FU Berlin and the Authors
#
# Authors: Jan-Hendrik Prinz
# John Ossyra
# Contributors:
#
# `adaptiv... | markovmodel/adaptivemd | adaptivemd/condition.py | Python | lgpl-2.1 | 3,925 | [
"MDTraj"
] | 626709ec070efd4d36c4383ba922670cd98f13af0e42766e5908bebc80aa86e6 |
#!/usr/bin/env python
import unittest
import numpy
import os
from pyscf import lib
from pyscf.pbc import gto, dft, scf, df
from pyscf.pbc.gw import krgw_ac
from pyscf.pbc.gw import krgw_cd
cell = gto.Cell()
cell.build(
a = '''
0.000000 1.783500 1.783500
1.783500 0.000000 1.783500
... | sunqm/pyscf | pyscf/pbc/gw/test/test_krgw.py | Python | apache-2.0 | 3,395 | [
"PySCF"
] | fd6ea48aec6299944dc8cc15c6d8ac07c72798644c86c35edb79471a35091cf1 |
# -*- coding: utf-8 -*-
# Copyright 2019 The GraphicsFuzz Project 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | google/graphicsfuzz | gfauto/gfauto/tool.py | Python | apache-2.0 | 15,070 | [
"Amber"
] | 9de49da1023e637ebd8991bcf731972980142fda714e00ed25751c5aafe95238 |
# 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... | MSeifert04/astropy | astropy/stats/bayesian_blocks.py | Python | bsd-3-clause | 17,972 | [
"Gaussian"
] | 6dcdbc8efc4831e11ff1707776c3e53b3cdd6411fb361006d6e4ebf06805c15f |
#coding=utf-8
from flask import Flask, redirect, render_template, request, Response
from codepy import menulog
import anydbm as dbm
import shelve
import os, sys
import urllib
from datetime import datetime
import time
import urllib2
import hashlib
app = Flask(__name__)
visit = 0
visitHome = 0
startTime = time.time()
t... | arcsun/neteaseMenu | start.py | Python | apache-2.0 | 11,671 | [
"VisIt"
] | b22c8e3bc8a9bce1adca5e2a649c05f67bfe154b3f3eafbffd5ce0099180442e |
# coding=utf-8
import bz2
import glob
import os
import sys
import warnings
import Sire.Stream
import argparse
from Sire.Analysis import *
from Sire.Units import *
# Import the asciiplot (ap) plotting library - this needs numpy
try:
numpy = Sire.try_import("numpy")
from Sire.Tools import ap
except:
pass
d... | chryswoods/Sire | wrapper/python/scripts/analyse_freenrg.py | Python | gpl-2.0 | 28,922 | [
"VisIt"
] | 385f496d1763ee3871d99b70f3e7708671b4330f7f5962aa001b07da899ea915 |
import numpy as np
from netcdf import netcdf as nc
import logging
from models.core import cuda, SourceModule, pmap
from cpu import CPUStrategy
import itertools
with open('models/kernel.cu') as f:
mod_sourcecode = SourceModule(f.read())
def gpu_exec(func_name, results, *matrixs):
func = mod_sourcecode.get_fun... | scottlittle/solar_radiation_model | models/gpu.py | Python | mit | 4,692 | [
"NetCDF"
] | 7368172dbc3b484604be2a94f64db5c19d44fb6b859f202dd4d6e0b196ece826 |
"""
OpenCL nodes supported by ctree.
"""
from ctree.nodes import *
import hashlib
class OclNode(CtreeNode):
"""Base class for all OpenCL nodes supported by ctree."""
def codegen(self, indent=0):
"""generate ocl code for this node"""
from ctree.ocl.codegen import OclCodeGen
return Oc... | ucb-sejits/ctree | ctree/ocl/nodes.py | Python | bsd-2-clause | 1,863 | [
"VisIt"
] | 95e1ce34bc70f7a337bd00a5bb5dc887b74956effc30a4cf27498de8377f5e05 |
import ast
from flake8_import_order.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from flake8_import_order.stdlib_list import STDLIB_NAMES
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__author__",
"__email__"... | alex/flake8-import-order | flake8_import_order/__init__.py | Python | lgpl-3.0 | 5,773 | [
"VisIt"
] | aa98490bda37dc938e42c51533103c17f357b22cded347b31bdf71012433882b |
# Copyright (c) 2015-2017 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | retr0h/maquina | test/unit/dependency/test_ansible_galaxy.py | Python | mit | 6,951 | [
"Galaxy"
] | fdac1e229f47547fc23a9b07d2fcf683a5b803022c12ffc9b2cbe0cff993bda2 |
""" Tools for compiling C/C++ code to extension modules
The main function, build_extension(), takes the C/C++ file
along with some other options and builds a Python extension.
It uses distutils for most of the heavy lifting.
choose_compiler() is also useful (mainly on windows anyway)
for tr... | beiko-lab/gengis | bin/Lib/site-packages/scipy/weave/build_tools.py | Python | gpl-3.0 | 27,035 | [
"Jaguar"
] | 26323dff7b99f4668fb6e06f8bf9613a581cbf419d696f677984682269870890 |
#-*-coding:utf-8-*-
__all__ = [
'visit',
'orz',
'wikipedia',
'qiubai',
'earthquake',
'airpollution',
'weather',
'arithmetic',
'calc24',
'simsimi',
]
# 一行放一个,避免merge冲突
| BigRocky/xiaohuangji | plugins/__init__.py | Python | mit | 227 | [
"VisIt"
] | bc520c1f22d40e1b03498227bab4afaa9aff8ceb7482aec1d827caeadb0c4589 |
"""
This module contains functionality for the QUANTUM ESPRESSO calculator
in order to:
- read the results in text and xml format
- read a .in file and return all the data
- build an Atoms objects starting from an .in file
routines:
def read_quantumespresso_textoutput(filename):
def read_quantumespresso_x... | mhoffman/ase-espresso | io.py | Python | gpl-3.0 | 56,319 | [
"ASE",
"CRYSTAL",
"DIRAC",
"ESPResSo",
"Gaussian",
"Quantum ESPRESSO"
] | 5a90bf53c392c7a0e5a43df7a44b332f9348f79b46693990bbed163d5df4620b |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/dft/test/test_grids.py | Python | apache-2.0 | 5,085 | [
"PySCF"
] | daee35e3732dd29718ec6394d20a9a28318b5a8a0f3547508ea7c7d3330d515c |
'''
GenderGenreMod3
Copyright 2016 Brian N. Larson and licensors
GENDER/GENRE PROJECT CODE: Module 3
This code is the third segment used to generate and analyze the data for the article
Gender/Genre: The Lack of Gendered Register in Texts Requiring Genre Knowledge.
_Written Communication_, 33(4), 360–384. https://doi.... | rhetoricked/WrittenCommunication2016 | Module3Biber.py | Python | gpl-3.0 | 30,828 | [
"Brian"
] | 6b4762754ee24e755a5ebd68cf32cffa4e9a187c5bf2648ec3961fde4ec0b8cb |
# Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014-2015 Brett Cannon <brett@python.org>
# Copyright (c) 2015 Simu Toni <simutoni@gmail.com>
# Copyright (c) 2015 Pavel Roskin <proski@gnu.org>
# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro>
# Copyright (c) 2015 Cosmin Poie... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/pylint/pylint/checkers/python3.py | Python | mit | 53,376 | [
"VisIt"
] | e3073b5f351138fa3332f38774ce2dc47bee4bb5f575ae1a5020e53d1810a89b |
""" Wrapper functions for TensorFlow layers.
Author: Charles R. Qi
Date: November 2016
"""
import numpy as np
import tensorflow as tf
def _variable_with_weight_decay(name, shape, stddev, wd, use_xavier=True):
"""Helper to create an initialized Variable with weight decay.
Note that the Variable is initializ... | Leminen/project_template_deeplearning | src/models/ops_util.py | Python | mit | 16,872 | [
"Gaussian"
] | ba4bd2c157a86a86bd0ab59cc59d62c880d1039c3da817bb8dd8af59c2488703 |
import numpy as np
from multiprocessing import Pool, cpu_count
from scipy import stats, linalg
import pandas as pd
import neuroseries as nts
from scipy.fftpack import *
from numba import jit
from umap import UMAP
def jPCA(data, times):
#PCA
from sklearn.decomposition import PCA
n = 6
pca = PCA(n_components = n)... | gviejo/ThalamusPhysio | python/functions.py | Python | gpl-3.0 | 49,158 | [
"Gaussian",
"NEURON"
] | 43c961f23ff0dc5a0631bde11f2a34d72fe635b7024a557d78398d902e825fc7 |
import unittest
from src.underscore import _
import math
import time
class TestUtility(unittest.TestCase):
class Namespace():
pass
def setUp(self):
_.templateSettings = {}
def test_identity(self):
moe = {"name": 'moe'}
self.assertEqual(moe, _.identity(moe),
... | serkanyersen/underscore.py | tests/test_utility.py | Python | mit | 10,671 | [
"MOE"
] | 1c2dda1f6eaa6eca1399945955bfdd94f5d1fa74aee2df918f9a117dddf8ef02 |
# -*- coding: utf-8 -*-
"""
"""
import requests
import json
from . import HEADERS, SUID_LIST
from .style import Style
class StyleClient(object):
"""
This class has the method to manage cytoscape style.
By using this, you can create, delete, apply and get style class.
"""
def __init__(self, url):... | idekerlab/cyrest-examples | py2cytoscape_doc/py2cytoscape/data/style_client.py | Python | mit | 4,578 | [
"Cytoscape"
] | 5b44bc487f5f680bcf23ac712933fd38b1d73897dcff0c1878e0363c2c426d56 |
from aces.materials import Material
from aces.modify import get_unique_atoms
from ase import Atoms,Atom
from math import pi,sqrt
from ase.dft.kpoints import ibz_points
from aces import config
from ase.lattice import bulk
import numpy as np
from aces.tools import *
class structure(Material):
def set_parameters(self):
... | vanceeasleaf/aces | aces/materials/GaSe.py | Python | gpl-2.0 | 1,105 | [
"ASE"
] | 4eaa8eda0333654ab421a31f2cc1f8d0b8811a7abccac2c665f3e166cf498427 |
#!/usr/bin/env python
"""Writing for HTML pages."""
import distutils.dir_util
import json
import os
import os.path
import shutil
import sys
import xml.sax.saxutils
import jinja2
import proc_doc
import raw_doc
def escapeForXml(s):
"""Return escaped XML of s."""
return xml.sax.saxutils.escape(s)
def escapeN... | weese/seqan | util/py_lib/seqan/dox/write_html.py | Python | bsd-3-clause | 20,718 | [
"VisIt"
] | 3d7ab7a0a53565c79f691f786ceddd7266c5005a76828e4a1fc5834711623b94 |
""" Test class for SGEResourceUsage utility
"""
import pytest
from DIRAC import S_OK
# sut
from DIRAC.Resources.Computing.BatchSystems.TimeLeft.SGEResourceUsage import SGEResourceUsage
RESULT_FROM_SGE = """
job_number: 7448711
exec_file: job_scripts/7448711
submission_time: ... | DIRACGrid/DIRAC | src/DIRAC/Resources/Computing/BatchSystems/TimeLeft/test/Test_SGEResourceUsage.py | Python | gpl-3.0 | 2,008 | [
"DIRAC"
] | 24e346b286be06b4c1dc06144a6c5fce8bacfd768918f7b67aadf3245e783e15 |
"""Bayesian Gaussian Mixture Model."""
# Author: Wei Xue <xuewei4d@gmail.com>
# Thierry Guillemot <thierry.guillemot.work@gmail.com>
# License: BSD 3 clause
import math
import numpy as np
from scipy.special import betaln, digamma, gammaln
from ._base import BaseMixture, _check_shape
from ._gaussian_mixture im... | bnaul/scikit-learn | sklearn/mixture/_bayesian_mixture.py | Python | bsd-3-clause | 33,397 | [
"Gaussian"
] | a54f957a1132970b07db1c19fdf07ba303568b04d40ba29a0d899adc1a2d4e92 |
import sys
import pycbc
from pycbc.filter import matched_filter_core
from pycbc.types import Array, TimeSeries, FrequencySeries, float32, complex64, zeros
from pycbc.types import complex_same_precision_as,real_same_precision_as
import pycbc.waveform
from pycbc.waveform import *
from pycbc.vetoes import *
import numpy ... | bema-ligo/pycbc | test/autochisq_test.py | Python | gpl-3.0 | 6,105 | [
"Gaussian"
] | f3e6312d5e68724311969507638bc58d1265eb810b7563af66e88ce8a9b5d069 |
# -*- coding: utf-8 -*-
__author__ = "isparks"
import unittest
from rwslib.extras.audit_event import parser
import datetime
class TestUtils(unittest.TestCase):
"""Tests of utilities in the parser unit"""
def test_make_int(self):
self.assertEqual(-1, parser.make_int(None))
self.assertEqual(-1... | mdsol/rwslib | rwslib/tests/test_parser.py | Python | mit | 23,825 | [
"VisIt"
] | 3b5cbd0e5784a291bf5216bd9a47a7c65e283a6c002a014cb1dddfb290709bb0 |
""" Bokeh is a Python interactive visualization library that targets modern
web browsers for presentation.
Its goal is to provide elegant, concise construction of novel graphics in the
style of d3.js, but also deliver this capability with high-performance
interactivity over very large or streaming datasets. Bokeh can ... | azjps/bokeh | bokeh/__init__.py | Python | bsd-3-clause | 2,021 | [
"VisIt"
] | b4c60b2f438567a4a637a3b5e871ab000b44f69c1cda9d44e5136c4be04e07a5 |
# -*- 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-pubsub | tests/unit/gapic/pubsub_v1/test_schema_service.py | Python | apache-2.0 | 115,706 | [
"Octopus"
] | dd03babea458a0e7c1d5c28f2ef54d941002ef9f7078cfa3bc90b23a609550af |
# coding=utf-8
from _commandbase import RadianceCommand
from ..datatype import RadiancePath
import os
class Epw2wea(RadianceCommand):
"""epw2wea transforms an EnergyPlus weather data (.epw) file into
the DAYSIM weather file format, for use with the RADIANCE gendaymtx
program.
Attributes:
epw... | antonszilasi/honeybeex | honeybeex/honeybee/radiance/command/epw2wea.py | Python | gpl-3.0 | 2,211 | [
"EPW"
] | 17a17e4879a60e7444be1dcbff2b08e0025f6761b9507a17a2533a4a119d0fe0 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2006-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 Fou... | andrebellafronte/stoq | stoqlib/domain/test/test_person.py | Python | gpl-2.0 | 67,891 | [
"VisIt"
] | 8b44a26eb1efca6e41a46f1e0f7d54876ed43290b9a30df89895071bbfc0017e |
# -*- coding: utf-8 -*-
# ***********************************************************************
# Copyright (C) 2014 - 2019 Oscar Gerardo Lazo Arjona *
# <oscar.lazoarjona@physics.ox.ac.uk> *
# *
... | oscarlazoarjona/fast | fast/misc.py | Python | gpl-3.0 | 54,324 | [
"Gaussian"
] | 1d0c46541c014804a685e816bdca2cc6cafedcfbaa1a9afa24dbfcb18e6d843c |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
NBody in N^2 complexity
Note that we are using only Newtonian forces and do not consider relativity
Neither do we consider collisions between stars
Thus some of our stars will accelerate to speeds beyond c
This is done to keep the simulation simple enough for teaching purp... | bh107/benchpress | benchpress/benchmarks/nbody_nice/python_numpy/nbody_nice.py | Python | apache-2.0 | 6,407 | [
"Galaxy"
] | b6fc2316aaf655bf5c2f2e13d0aaad2efcbff6990748e7232927cb144a79ff5e |
""" This script submits a test prodJobuction with filter
"""
# pylint: disable=wrong-import-position, protected-access
import time
import os
import json
from DIRAC.Core.Base import Script
Script.setUsageMessage('\n'.join([__doc__.split('\n')[1],
'Usage:',
... | andresailer/DIRAC | tests/System/dirac-test-production.py | Python | gpl-3.0 | 4,502 | [
"DIRAC"
] | de74a341d45210d02b3548dde6dc73bdcc6e23243fce33f45651f8d895fe3e77 |
#!/usr/bin/env python
# Example of how to use Parallel Coordinates View to plot and compare
# data set attributes, and then to use selections in the parallel coordinates
# view to extract and view data points associated with those selections
# Use the "u" character to toggle between "inspect modes" on the parallel
# c... | lorensen/VTKExamples | src/Python/InfoVis/ParallelCoordinatesExtraction.py | Python | apache-2.0 | 5,570 | [
"VTK"
] | 154b745e8162ab1752ba592f5fe270e16fcf8c00f5242a00a1dfa2eff7eb1db4 |
from FactorySystem import InputParameters
import os, sys, shutil
# Get the real path of cluster_launcher
if(os.path.islink(sys.argv[0])):
pathname = os.path.dirname(os.path.realpath(sys.argv[0]))
else:
pathname = os.path.dirname(sys.argv[0])
pathname = os.path.abspath(pathname)
# Add the utilities/python_getpot... | mellis13/moose | python/ClusterLauncher/Job.py | Python | lgpl-2.1 | 1,886 | [
"MOOSE"
] | 0e1f87db485471d6d238b58108ba4c7e3ce2a4542b5ef43326a7091b1962a67d |
#Simplified likelihood for LISA example based on python interface. The simplified likelihood covers only
#extrinsic parameters based on low-f limit, and short-duration observation
#as occurs for merger of ~1e6 Msun binaries.
#include <valarray>
#include <vector>
#include <iostream>
#include <iomanip>
#include <fst... | JohnGBaker/ptmcmc | cython/exampleGaussian.py | Python | apache-2.0 | 8,025 | [
"Gaussian"
] | e3b48ac3b9a6f7d87f6d8d88aa1d7e71a0189041a65fa6946ee80a1857c9bda5 |
"""
Histogram-related functions
"""
from __future__ import division, absolute_import, print_function
import functools
import operator
import warnings
import numpy as np
from numpy.compat.py3k import basestring
from numpy.core import overrides
__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']
array_funct... | shoyer/numpy | numpy/lib/histograms.py | Python | bsd-3-clause | 39,420 | [
"Gaussian"
] | 002eda0ca364b810b3592590d50764dbaf98dfe4b0039e4dea988d4781a73fd2 |
import uuid
from django import forms
from django.core.mail import send_mail
from django.contrib.auth import authenticate
from captcha.fields import CaptchaField
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from .models import OUser, OUserEmailVerification, OUserPasswordReset
cla... | acgx/ooi-hack | oh_users/forms.py | Python | gpl-2.0 | 9,759 | [
"MOE"
] | d981bdce0e3c90902ead017b2291b0c5e780dea3041fe014cd79d9650e0f2f13 |
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import os
import gyp
import gyp.common
import gyp.msvs_emulation
import json
import sys
generator_supports_multiple_toolsets = True
generator_... | JasonGross/mozjs | media/webrtc/trunk/tools/gyp/pylib/gyp/generator/dump_dependency_json.py | Python | mpl-2.0 | 3,383 | [
"VisIt"
] | d5f18ae8a5e31e2061fca1efa6810744752a1e318090fa85294b1432e6b1b564 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016-2017 Red Hat, 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
#
# Unles... | redhat-cip/dci-agent | dci_agent/plugins/plugin_tripleocollectlogs.py | Python | apache-2.0 | 2,680 | [
"Galaxy"
] | 5461132a12b9fafa9cc02230c160b0e7ada61df6659cb1a062ca941d933bd58c |
#! /usr/bin/env python3
import os
import sys
import stat
import math
class default_params:
# mode_res = 32
mode_res = 16
output_timestep_size = 0.0001
f_sphere = 1
timestepping_method = 'l_erk'
timestepping_order = 1
timestep_size = 0.001
max_timesteps = 1
normal_mode_analysis = 1
rexi_m = 256
rexi_h... | schreiberx/sweet | benchmarks_sphere/paper_jrn_nla_rexi_linear/sph_rexi_paper_normal_mode_exp_analysis_earth_scale/jobs_create.py | Python | mit | 8,113 | [
"Gaussian"
] | 15e79541e15bf815b46bc223b3ac7bd621755680c77d733c02cf2fe3d6bccecd |
from random import randint
from lettuce import *
from django.contrib.auth.models import User, Group
from survey.features.page_objects.accounts import LoginPage, LogoutPage
from survey.features.page_objects.users import NewUserPage, UsersListPage, EditUserDetailsPage, UserDetailsPage
from survey.models.users import Us... | unicefuganda/uSurvey | survey/features/users-steps.py | Python | bsd-3-clause | 9,618 | [
"VisIt"
] | c42827cdc7afc2b5d6f1dee75fe49331b20297782496cec6f417ee6c0633696e |
# -*- coding: utf-8 -*-
"""
Examples from the "Image Processing with Python" presentation.
@author Stephen Granade <stephen@granades.com>
"""
from __future__ import division
from __future__ import print_function
#####
# IMAGE PROCESSING WITH SCIPY
# I'm often going to show images side-by-side, so here's a helper
# ... | sgranade/python-image-processing-intro | overview/image_processing_sample_code.py | Python | unlicense | 20,069 | [
"Gaussian"
] | 97c4624a54e74dad93aefc7ab6a1c61389d97b111f5114c0cf2e9dfd934e7ff2 |
#!/usr/bin/env python3
# xdftool
# swiss army knife for adf and hdf amiga disk images
import sys
import argparse
import os.path
from amitools.fs.ADFSVolume import ADFSVolume
from amitools.fs.blkdev.BlkDevFactory import BlkDevFactory
from amitools.fs.FSError import *
from amitools.fs.Imager import Imager
from amito... | FrodeSolheim/fs-uae-launcher | amitools/tools/xdftool.py | Python | gpl-2.0 | 23,234 | [
"ADF"
] | f0464b9209445fa8826757351e97c9f87e0ea8a1493a5b9a01e2ee8b3f6c2811 |
IMAGENET_LABELS = {
0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6... | pkdn/pytorch-smoothgrad | lib/labels.py | Python | mit | 33,667 | [
"Bowtie",
"ESPResSo",
"Jaguar",
"ORCA"
] | d86e6c142971787ebfa3a0c9f351c8907e3fc17e61897bdb4dd50616f8117b1d |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
import sys
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from lunarcalendar import __version__
from lunarcalendar.color import red, blue
from lunarcalendar._compact import unicode_type
from lunarcalendar.festiv... | wolfhong/LunarCalendar | lunarcalendar/command.py | Python | mit | 4,920 | [
"VisIt"
] | 4f4873c343398b21b8d29d5541706421945bf9ef492c798d90a681d3a1abcfde |
from mayavi.core.registry import registry
from mayavi.core.pipeline_info import PipelineInfo
from mayavi.core.metadata import SourceMetadata
from simphony_mayavi.plugins.engine_manager_mayavi2 import (
EngineManagerMayavi2Plugin)
cuds_reader_info = SourceMetadata(
id="CUDSReader",
class_name="simphony_maya... | simphony/simphony-mayavi | simphony_mayavi/user_mayavi.py | Python | bsd-2-clause | 848 | [
"Mayavi"
] | 4c38570dfce65d2e40e70ce4943e128733a45aa626bbb52ed666f65538376d71 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 24 19:16:51 2019
@author: mostafamousavi
last update: 06/06/2020
"""
from __future__ import division, print_function
import numpy as np
import h5py
import matplotlib
matplotlib.use('agg')
from tqdm import tqdm
import os
os.environ['KERAS_BACKEND']='... | smousavi05/EQTransformer | EQTransformer/core/EqT_utils.py | Python | mit | 115,494 | [
"Gaussian"
] | 393cf66164f705da4ca974b627abc27ad09a5d92e2b18f8ed2d6228c3140a3e0 |
__author__ = 'stephen'
import numpy as np
import scipy.io
import scipy.sparse
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import matplotlib.pylab as pylab
from .utils import get_subindices
import matplotlib.ticker as mtick
from collections import Counter
from s... | stephenliu1989/HK_DataMiner | hkdataminer/utils/plot_.py | Python | apache-2.0 | 23,288 | [
"Gaussian"
] | ffab5914088b4b63afec3a736996e4a5ccedf8d680c9063e8e86818f26a0d8c3 |
import Pyro5
import threading
import time as timeT
import sys
sys.path.extend(['.', '..', '../..'])
from mupif import *
import mupif as mp
import logging
log = logging.getLogger()
class Example07(workflow.Workflow):
def __init__(self, metadata={}):
"""
Initializes the workflow. As the workflow... | mupif/mupif | examples/Example07-stacTM-JobMan-distrib/Example07.py | Python | lgpl-3.0 | 6,392 | [
"VTK"
] | db2f2bff7169bd3191dd57386765cfe1d8379f7deba7f6f3ae815339fcce2325 |
# Generate UV-Vis spectra from electronic structure TDHF/TDDFT log files.
# Copyright (C) 2014 Li Research Group (University of Washington)
#
# 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, e... | liresearchgroup/uvspecgen | uvspec/spectrum.py | Python | gpl-3.0 | 20,702 | [
"Gaussian"
] | 561b6e13417377d923066d38e66acba89b5742e7eeed653e130f7686f1cbd977 |
"""
####################################################################################
Test: "python ...\Tools\visitor.py dir testmask [string]". Uses classes and
subclasses to wrap some of the details of os.walk call usage to walk and search;
testmask is an integer bitmask with 1 bit per available self-test; see al... | dreadrel/UWF_2014_spring_COP3990C-2507 | notebooks/scripts/book_code/__admin__/visitor.py | Python | apache-2.0 | 4,516 | [
"VisIt"
] | 0dcfc9cb3be608add56a4fd04af3d027941822c211887d241d1a10672d8f38cf |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# Imports
# =======
# <codecell>
#disable autosave functionality;
#This script is taxing enough, and autosaving tends to push it over the edge
# plus, autosaving seems to zero out the file before restoring it from the backup
# this means an autosav... | vansky/meg_playground | notebooks/exported/SingleMEGchannelV2.py | Python | gpl-2.0 | 19,945 | [
"Brian"
] | 3c9c2a2b2f471fbbb7c5f4e1ee6c8ef03595e5d4983616b32d24ddbee5572787 |
from vwpy.isnobal import (isnobal, IPW, generate_standard_nc,
nc_to_standard_ipw, reaggregate_ipws)
from vwpy.netcdf import ncgen_from_template, ncgen, utm2latlon
from vwpy.watershed import (make_fgdc_metadata,
make_watershed_metadata, VWClient, default_vw_client, metadata_from_file,
QueryResult, _get_confi... | VirtualWatershed/vw-py | __init__.py | Python | bsd-2-clause | 399 | [
"NetCDF"
] | 8c0525fb4655a53ea89477056464d267873a23c727a259db2355bc2319387874 |
import argparse
import matplotlib
import matplotlib.pyplot as plt
import skimage.io
import skimage.measure
matplotlib.use('Agg')
# TODO make importable by python script
parser = argparse.ArgumentParser()
parser.add_argument('input_file', type=argparse.FileType('r'), help='input file')
parser.add_argument... | BMCV/galaxy-image-analysis | tools/overlay_segmentation_mask/overlay_segmentation_mask.py | Python | mit | 1,584 | [
"Galaxy"
] | e93b8bf081317b726bfc185470543ad6a77a320966643ce945c14f2d8dbff970 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
This module provides conversion between the Atomic Simulation Environment
Atoms object and pymatgen Structure objects.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "1.0"
__maintainer__ = ... | Dioptas/pymatgen | pymatgen/io/aseio.py | Python | mit | 1,743 | [
"ASE",
"pymatgen"
] | b9ed98ccb529233c220688184217f369846ae7823697b94bd16c6c3d7d7105aa |
# coding: utf-8
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN 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 o... | fccoelho/pypln.backend | tests/test_worker_statistics.py | Python | gpl-3.0 | 2,280 | [
"NAMD"
] | b887bc9aab67960e276a3c4b7b9e6d08f0a4bb1416c479d0429a8e1e8317a045 |
import json
import netCDF4
from numpy import where
from ..models import VegetationMapByHRU, ProjectionInformation
LEHMAN_CREEK_CELLSIZE = 100 # in meters; should be in netCDF, but it's not
def propagate_single_vegetation_change(original_prms_params, veg_value, hrus):
"""
Given a PRMS netCDF file, a PRMS v... | ruiwu1990/fire_simulation_education | app/api/util.py | Python | bsd-3-clause | 3,264 | [
"NetCDF"
] | dd70617159b2a630a719e0c2bf56f9005592dec2b24c0f9d6475d0362db2c736 |
"""
YANK is a testbed for experimenting with algorithms for the efficient computation of small molecule binding free energies to biomolecular targets using alchemical methods.
YANK is built on OpenMM, the API for molecular simulation, and uses its GPU-accelerated library implementation for hardware acceleration.
"""
fr... | sonyahanson/yank | setup.py | Python | lgpl-3.0 | 4,873 | [
"OpenMM"
] | 9657d65180a6a657795969719285e41e0e39d423e2f85dd55b9bced830b2af9d |
# Copyright (C) 2020 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/phonon3/real_self_energy.py | Python | bsd-3-clause | 22,727 | [
"phonopy"
] | 1beefcfe78863d3199d5ae4748492fabb45e453db3443f657799f03ab81a660d |
'''
SYNBIOCHEM-DB (c) University of Manchester 2018
SYNBIOCHEM-DB is licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
import sys
from neo4j.v1 import GraphDatabase
class Writer(object):
'''Class to write to SYNBIOCHEM-DB.'... | synbiochem/SYNBIOCHEM-DB | synbiochem_db/writer.py | Python | mit | 3,942 | [
"VisIt"
] | c15429e122c81e55a4ccad46c6f74c02a7e6669ec371509866b77c0397cb0ed2 |
#!/usr/bin/env python
#######################################################################################
### ###
### PlasFlow 1.1 ###
### Copyright (C) 2017 Pawel... | smaegol/PlasFlow | PlasFlow.py | Python | gpl-3.0 | 19,113 | [
"Biopython"
] | 31bb330d5324caf7b6cadd959adc4ed02e16fe4d05ab79a58aefd77099746eab |
# 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... | npuichigo/ttsflow | third_party/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/filtering_postprocessor.py | Python | apache-2.0 | 12,497 | [
"Gaussian"
] | d416ed967adade53d28ad46dbd45a31684735ced3c0081befc581542c03b28b5 |
import sys
from SQL_Parser.SQLLexer import SQLLexer
from antlr4 import *
from antlr4.Parser import DefaultErrorStrategy
from SQL_Parser.SQLParser import *
from SQL_Parser.SQLListener import SQLListener
# from SQLLexer import SQLLexer
# from antlr4 import *
# from SQLParser import *
# from SQLListener import SQLLi... | GuiGaiardo/TrabalhoIBD | SQL_Parser/SQLMain.py | Python | mit | 4,140 | [
"VisIt"
] | 9a30acbb9a2a7e18107e57451c8bc63fc7c52fd50947f4507be6276f24e6734c |
from PyQt4 import QtCore, QtGui
from PyQt4.Qt import QObject, pyqtSignal, QFileDialog
from MainSkel import Ui_mainSkel
import multiprocessing
from PyQt4.Qt import QMainWindow, QTableWidgetItem, QMessageBox, \
QAbstractItemView, QWidget, Qt, pyqtSlot, pyqtSignal, \
QStandardItem, QStandardItemModel, QSt... | Erotemic/hotspotter | _graveyard/_broken/MainWindow.py | Python | apache-2.0 | 17,501 | [
"EPW"
] | c73e430fba40735ca3c32c531ca6962a221630d8602c7a91dd27f4d48e4b5b41 |
from .. import Contiguity as c
from .. import util
from ...common import pandas
from ...io.FileIO import FileIO as ps_open
from ...io import geotable as pdio
from ... import examples as pysal_examples
import unittest as ut
from warnings import warn as Warn
PANDAS_EXTINCT = pandas is None
class Contiguity_Mixin(objec... | ljwolf/pysal_core | libpysal/weights/tests/test_Contiguity.py | Python | bsd-3-clause | 4,176 | [
"COLUMBUS"
] | e09fc7ac421f3550dead58224433a6760a2c4217671be0ecdea3517a0429e276 |
# This file provides the Amber force field, using Amber parameter files.
#
# Written by Konrad Hinsen
# last revision: 2000-9-25
#
_undocumented = 1
from MMTK.ForceFields import MMForceField
import AmberData
import os
#
# Read parameter files
#
Amber94 = None
Amber91 = None
OPLS = None
this_directory = os.path.spli... | fxia22/ASM_xf | PythonD/site_python/MMTK/ForceFields/Amber/AmberForceField.py | Python | gpl-2.0 | 9,221 | [
"Amber"
] | 19cc8bf2f873f3766e9b882a4c13084d11f636ca5aadfeb7dc8ffbdd38268bfc |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module is used to estimate the Herfindahl-Hirschman Index, or HHI, of
chemical compounds. The HHI is a measure of how geographically confined or
dispersed the elements comprising a compound are. A low ... | gmatteo/pymatgen | pymatgen/analysis/hhi.py | Python | mit | 3,920 | [
"pymatgen"
] | f9c7220c83c631d81551e08072ff94d67e620e75697697b7f95725d0a6e9a14a |
"""Export the files needed by the KIM api."""
import os
import glob
import shutil
import string
from copy import copy
import subprocess
if not hasattr(subprocess, 'check_output'):
# Pre-2.7 hack
print "WARNING: Fixing pre Python 2.7 compatibility"
from subprocess_py27 import check_output
subprocess.che... | auag92/n2dm | Asap-3.8.4/OpenKIMexport/export_to_kim.py | Python | mit | 7,119 | [
"OpenKIM"
] | ba2b020ca107a090eb72b4f31d53639bd57181325108560171212d8ed240de8a |
"""
Alpha diversity measures (:mod:`skbio.diversity.alpha`)
=======================================================
.. currentmodule:: skbio.diversity.alpha
This package provides implementations of various alpha diversity measures,
including measures of richness, dominance, and evenness. Some functions
generate confi... | demis001/scikit-bio | skbio/diversity/alpha/__init__.py | Python | bsd-3-clause | 5,461 | [
"scikit-bio"
] | 2dde3341acdafd58de2370ab44a228bf1ce9dbb8a5ac3a4b0f541ebed776ff5a |
##########################################################################
#
# QGIS-meshing plugins.
#
# Copyright (C) 2012-2013 Imperial College London and others.
#
# Please see the AUTHORS file in the main source directory for a
# full list of copyright holders.
#
# Dr Adam S. Candy, adam.candy@imperia... | adamcandy/QGIS-Meshing | plugins/mesh_surface/scripts/PreMeshingFunctions.py | Python | lgpl-2.1 | 7,022 | [
"NetCDF"
] | 1a1f8f8782f1867833f1b4e521be7784ec7e41b91591a8de9354dcae1d94044e |
# Author: Travis Oliphant, 2002
#
# Further updates and enhancements by many SciPy developers.
#
from __future__ import division, print_function, absolute_import
import math
import warnings
from collections import namedtuple
import numpy as np
from numpy import (isscalar, r_, log, around, unique, asarray,
... | andim/scipy | scipy/stats/morestats.py | Python | bsd-3-clause | 92,737 | [
"Gaussian"
] | a963d67c6586c39d31bf5d25fa82f3659a9aa0a097c57b4a0deff1d6e5401d49 |
# -*- coding: utf-8 -*-
import sys
sys.path.append('../')
from browser_interface.queue.QueueFactory import QueueFactory
from browser_interface.field.FieldFactory import FieldFactory
from browser_interface.browser.BrowserFactory import BrowserFactory
from browser_interface.log.Logging import Logging
from common import ... | xtuyaowu/jtyd_python_spider | feng_huang_net/fh_consumer.py | Python | mit | 5,787 | [
"VisIt"
] | bc27e5a077a59f527d977f358a6729be25b47a1c93759c946608868465d1b384 |
# Copyright 2012 Google Inc. 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 applicable law or ... | wavemind/gcb17ml | common/schema_fields.py | Python | apache-2.0 | 24,014 | [
"VisIt"
] | 7ec7012b3a98201fedd157a0b749188e848f0cfff5fa772be27cba308e1e6f23 |
"""
Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1.
AUTHORS
The original version of this software, called LMFIT, was written in FORTRAN
as part of the MINPACK-1 package by XXX.
Craig Markwardt converted the FORTRAN code to IDL. The information for the
IDL version is:
... | comptech/atrex | Software/mpfit.py | Python | lgpl-3.0 | 78,446 | [
"Gaussian"
] | d1f5ab8ee360f44f351f78aed9e6ce4146147a25462544bd1ce2c7a77001e260 |
# coding=utf-8
"""Graphical User Interface to the MDI algorithm.
Provides a user interface for loading multivariate time-series from CSV files,
setting the MDI parameters, running the algorithm and inspecting the detected intervals.
Only non-spatial data is supported at the moment.
"""
try:
# Python 3
impor... | cvjena/libmaxdiv | maxdiv/gui.py | Python | lgpl-3.0 | 58,706 | [
"Gaussian"
] | be825bff05c71469a39a90fc88494c55382d151d44266b6a7baaa4be35081dfa |
"""Run Broad's RNA-SeqQC tool and handle reporting of useful summary metrics.
"""
import csv
import os
from random import shuffle
from itertools import ifilter
import shutil
import uuid
import tempfile
import pandas as pd
# Provide transition period to install via upgrade with conda
try:
import statsmodels.formul... | guillermo-carrasco/bcbio-nextgen | bcbio/rnaseq/qc.py | Python | mit | 6,501 | [
"BWA"
] | bcdd4e97239c0760760aa44c9a335d0135fe4a6617085d71efec4948ca8035b7 |
#!/usr/bin/env python
#
# $File: hybrid.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute it ... | BoPeng/simuPOP | docs/hybrid.py | Python | gpl-2.0 | 1,626 | [
"VisIt"
] | b8340efd0f546f83313c6926caf47e39add110a6e4a8e287eb5711e5d2954ccd |
"""
DIRAC.DataManagementSystem.Agent package
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
| yujikato/DIRAC | src/DIRAC/DataManagementSystem/Agent/__init__.py | Python | gpl-3.0 | 161 | [
"DIRAC"
] | 89508b33f3c77351e2dc61307202820ad028af5a7d33fb6107039fe4a0e4d912 |
# -*- coding: latin-1 -*-
# Copyright (C) 2009-2014 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ... | FedoraScientific/salome-hexablock | src/TEST_PY/test_unit/test_cross.py | Python | lgpl-2.1 | 2,489 | [
"VTK"
] | 052df3178a6350746e84c1f6010fb0ada24892ef18ce1e242e1ca0f61810f8bf |
import sys
import uuid
import contextlib
from tvtk.api import tvtk
from simphony.cuds.abc_particles import ABCParticles
from simphony.cuds.particles import Particle, Bond
from simphony.core.cuba import CUBA
from simphony.core.data_container import DataContainer
from simphony_mayavi.core.api import (
CubaData, Cel... | simphony/simphony-mayavi | simphony_mayavi/cuds/vtk_particles.py | Python | bsd-2-clause | 16,331 | [
"VTK"
] | 66ae646e38590cc809bcf1e43e4d86eaf5832620f48cc652e42433a78a646166 |
#!/usr/bin/env python
import os, pygtk, gtk, webbrowser
import playlist
EDIT_WIDTH, EDIT_HEIGHT = 300, 200
MPLAYERCONFFILE = os.path.expanduser("~/.pymp/mplayer")
#
# Provides a standard menu for open, save, help, etc..
# Main widget: menubar
#
class Menu:
pymp, popup, path, sorts, sort = None, None, None, None... | jdolan/pymp | menu.py | Python | gpl-2.0 | 8,954 | [
"Brian",
"VisIt"
] | d5019bee4c98bdc4d4b1d228ae1afc950b5461c641bb7b598a6d0ffc6073e4f8 |
# -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. 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 require... | Chilledheart/chromium | tools/telemetry/third_party/gsutilz/gslib/addlhelp/creds.py | Python | bsd-3-clause | 8,101 | [
"VisIt"
] | 29af8736a82a2e1ac69543c14139dd1fe1f530cd33187269b2ddba9077628eae |
import numpy as np
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import pyroms
def remap2(src_array, remap_file, src_grad1=None, src_grad2=None, \
src_grad3=None, spval=1e37, verbose=False):
'''
remap based on addresses and weights computed in a setup phase
'''
#... | kshedstrom/pyroms | pyroms/pyroms/remapping/remap2.py | Python | bsd-3-clause | 5,918 | [
"NetCDF"
] | 37640ea064100f6db34854a65346d62c9a53d1149aa2f275bbd2071480d424a3 |
# -*- coding: utf-8 -*-
"""
jinja
~~~~~
Jinja is a `sandboxed`_ template engine written in pure Python. It
provides a `Django`_ like non-XML syntax and compiles templates into
executable python code. It's basically a combination of Django templates
and python code.
Nutshell
--------
... | pam-bot/SMSBeds | lib/jinja/__init__.py | Python | gpl-2.0 | 2,417 | [
"VisIt"
] | 3f136950b58f77caab538885265a4069d0c289f2a680f6d73ff2bbb56e2739ae |
from ase.atoms import Atoms
from ase.quaternions import Quaternions
from ase.calculators.singlepoint import SinglePointCalculator
from ase.parallel import paropen
def read_lammps_dump(fileobj, index=-1, order=True, atomsobj=Atoms):
"""Method which reads a LAMMPS dump file.
order: Order the particles accordin... | askhl/ase | ase/io/lammpsrun.py | Python | gpl-2.0 | 5,744 | [
"ASE",
"LAMMPS"
] | dc18761e27a15a1e815889974db33a355c922fb96e328ed61b86c1bec9e51565 |
"""
Support and standalone functions for Robust Linear Models
References
----------
PJ Huber. 'Robust Statistics' John Wiley and Sons, Inc., New York, 1981.
R Venables, B Ripley. 'Modern Applied Statistics in S'
Springer, New York, 2002.
"""
import numpy as np
from scipy.stats import norm as Gaussian
import nor... | wesm/statsmodels | scikits/statsmodels/robust/scale.py | Python | bsd-3-clause | 8,328 | [
"Gaussian"
] | 45119193f6984d7f750984e4b82efece9fcf3bb5eb2a6b8cf2a3bf7f7f5c56f4 |
"""
Testing for other refiner/refinement small utilities that can be tested
alone.
"""
from __future__ import annotations
from unittest.mock import Mock, patch
from dials.algorithms.refinement.refiner import _copy_experiments_for_refining
def test_that_the_experiment_reduced_copier_works_as_intended():
sample... | dials/dials | tests/algorithms/refinement/test_refiner_units.py | Python | bsd-3-clause | 837 | [
"CRYSTAL"
] | 08fdb5db8c4a00e6777912e07f3a10491181a5172f9eec66936521c44459c455 |
# -*- coding: utf-8 -*-
# Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., University of Heidelberg, and University of
# of Connecticut School of Medicine.
# All rights reserved.
# Copyright (C) 2010 - 2016 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., Universit... | jonasfoe/COPASI | copasi/bindings/python/unittests/Test_CFunctionParameter.py | Python | artistic-2.0 | 2,533 | [
"COPASI"
] | d2cd47883e0f48ef1d61afaeb0ff4b25c10f1d7bf8ad30850673fcf4c26276f6 |
#!/usr/bin/env python
##############################################################################
#
# diffpy.pyfullprof by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 Trustees of the Columbia University
# in the City of New York. All rights reserve... | xpclove/autofp | diffpy/pyfullprof/atom.py | Python | gpl-3.0 | 20,277 | [
"CRYSTAL"
] | 288265623f0575b6e4dd1fdf2d0506b6cd1c24ddf68b9b79c6adc553bb872e4d |
from django.core.checks.translation import E001, check_setting_language_code
from django.test import SimpleTestCase, override_settings
class TranslationCheckTests(SimpleTestCase):
def test_valid_language_code(self):
tags = (
'en', # language
'mas', # langu... | nesdis/djongo | tests/django_tests/tests/v22/tests/check_framework/test_translation.py | Python | agpl-3.0 | 1,927 | [
"ASE"
] | 6c866cdfc9aa75432c78732ed65f14600a69f520410266838fe0c15cd520ae3d |
#!/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/peacock/tests/utils/test_RecentlyUsedMenu.py | Python | lgpl-2.1 | 1,990 | [
"MOOSE"
] | 9944278a4ee6ddb05d1c6d414cb714641cdb30914a1b298ee8d64800b4cb4c4b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.