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__ = "Copyright © 2018-2022 Lucas Frérot"
__license__ = "SPDX-License-Identifier: MIT"
import io
import numpy as np
from numpy import all, min, max
from vtk import (
vtkXMLRectilinearGridReader,
vtkXMLImageDataReader,
vtkXMLStructuredGridReader,
vtkXMLUnstructuredGridReader,
)
from vtk.util... | prs513rosewood/uvw | tests/test_vtk_files.py | Python | mit | 5,812 | [
"ParaView",
"VTK"
] | 4dc6f5f8c1c5a3359dcdb91e8986b5cff524d26781702dc7019b555ab7cff66a |
import logging
import os
from sqlalchemy.sql.expression import func
from galaxy import util
from galaxy import web
from galaxy.model.orm import and_
from galaxy.util.odict import odict
from galaxy.web.base.controller import BaseUIController
from galaxy.web.form_builder import CheckboxField
from galaxy.web.form_build... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/webapps/tool_shed/controllers/repository_review.py | Python | gpl-3.0 | 39,888 | [
"Galaxy"
] | cc617bd8a45bc583b9f7aa6b66899e7099cf05eaad37e539482befe7ad2ee8ba |
# -*- coding: utf-8 -*-
#
# Calls tracer after every successful transaction.
# Also supplies the 'tracer' command.
#
# Copyright (C) 2015 Jakub Kadlčík
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Pu... | rholy/dnf-plugins-extras | plugins/tracer.py | Python | gpl-2.0 | 3,636 | [
"VisIt"
] | 8e03d05f24cb7f8e1fb60be622bdd66f7667eb8519defdce28deaac1915eca93 |
"""
==============
Marching Cubes
==============
Marching cubes is an algorithm to extract a 2D surface mesh from a 3D volume.
This can be conceptualized as a 3D generalization of isolines on topographical
or weather maps. It works by iterating across the volume, looking for regions
which cross the level of interest. ... | paalge/scikit-image | doc/examples/edges/plot_marching_cubes.py | Python | bsd-3-clause | 2,088 | [
"Mayavi"
] | e1ddbad100a2f3c889c1a65fdc748eb88305514dbe47b50c5e1a9305234f5815 |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','description','copyright','... | benbahrenburg/Ti.iSpeech | iOS/build.py | Python | mit | 6,785 | [
"VisIt"
] | e9f6b75d0b662a2035fca33d6bc7ed33eb0a9ad79b89d8c2a40f0822e712a51f |
import os.path
import pytest
import mdpow.config
import mdpow.forcefields
# currently supported
WATERMODELS = ('tip4p', 'tip3p', 'tip5p', 'spc', 'spce', 'm24', 'tip4pd')
SOLVENTMODELS = ('water', 'cyclohexane', 'octanol')
class TestIncludedForcefiels(object):
@staticmethod
def test_default_forcefield():
... | Becksteinlab/MDPOW | mdpow/tests/test_forcefields.py | Python | gpl-3.0 | 5,688 | [
"Amber",
"CHARMM"
] | 5052206464cbea3c6565347f691bf1cd1df5d637720b43544f1946d26dad486a |
from geopy.distance import great_circle
from pyorbital import tlefile
from astral import Astral
from dateutil import tz
import numpy as np
import math
import ephem
import datetime
import pprint
import pytz
import re
delay = datetime.timedelta(minutes=5) # 5 min downlink delay
padding = datetime.timedelta(minutes=2) # ... | mfrager/space-selfie | rec_multi_city.py | Python | mit | 3,283 | [
"COLUMBUS"
] | b780456bc2850b78e04695bebb3d675215945d39bea075cb7e662e55953d74e7 |
#!/bin/env python3
import sys
import re
from VASP import readVasp
from VASP import writeVasp
if len(sys.argv) != 3 and len(sys.argv) != 4:
print("")
print("Usage: %s line1,line2,.... T/F vaspfile" % sys.argv[0].split('/')[-1])
print("the format of line1,line2,... can be either x or x-x")
print("try a... | Mabinogiysk/VASP-script | chgflag.py | Python | gpl-2.0 | 1,810 | [
"VASP"
] | 7cb48b1dd0956221c07a133bdd312d3f49233623966121923a70d81feda73c90 |
# -*- coding: utf-8 -*-
"""
@namespace Desenho
Pixmap manipulation
Copyright 2007, NATE-LSI-EPUSP
Oficina is developed in Brazil at Escola Politécnica of
Universidade de São Paulo. NATE is part of LSI (Integrable
Systems Laboratory) and stands for Learning, Work and Entertainment
Research Group. Visit our web p... | native93/Sugar-paint-activity | Desenho.py | Python | gpl-2.0 | 30,731 | [
"VisIt"
] | 1a54b8158e12a457a7aed2fa290ffb962ffa330dda78a57aee89a0ae973f8a8c |
# Based on this example: http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt2
def __import_qt_modules():
"""
Trys to import and then returns the necessary Qt related modules with a preference given to
Qt5 over Qt4 and PySide over PyQt. If no python Qt libraries are found, raises an
ImportE... | colonelzentor/occmodel | examples/viewer/vtkviewer.py | Python | gpl-2.0 | 4,399 | [
"VTK"
] | bf09a21239df4df303f3aa0a170bdeaac9be5889e831d2a7afd9de339b4a697d |
#!/usr/env/python
"""Short description.
flow_accum_to_n.py: Implementation a route-to-multiple drainage stack alorithm.
Algorithm for route to multiple (N) flow accumulation. Inspiration for data
structures and attempting O(n) efficiency taken from Braun and Willet(2013).
Algorithm constructs drainage area and (op... | cmshobe/landlab | landlab/components/flow_accum/flow_accum_to_n.py | Python | mit | 27,133 | [
"VisIt"
] | 7c7ba0808293fae62a1f650ec9cbbddb2dfb8858d7e76febf0b87497bf98c98b |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module contains the definition of some objects used in the chemenv package.
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__credits__ = "Geoffroy Hautier"
__version__ = ... | vorwerkc/pymatgen | pymatgen/analysis/chemenv/utils/defs_utils.py | Python | mit | 4,105 | [
"pymatgen"
] | a5b1637e9e672d18f99c79978f78c710d05ebbb79b21a2946cef81abadaea0d8 |
import pdb
def gauss_kern(fwhm, side, pixsize):
''' Create a 2D Gaussian (size= side x side)'''
from scipy.ndimage.filters import gaussian_filter
from shift import shift_twod
import numpy as np
from numpy import zeros
from numpy import shape
sig = fwhm / 2.355 / pixsize
delt = zeros([side,side])
delt[0,0]=1... | deutschmarco/simstack | gauss_kern.py | Python | mit | 587 | [
"Gaussian"
] | 6bfc0d277cfcdafd37bfa4d36f0af54a1efab64082d7808e02f505db16a86f47 |
#
# QAPI visitor generator
#
# Copyright IBM, Corp. 2011
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Michael Roth <mdroth@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
from ordereddict import OrderedDict
from qapi ... | duythanhphan/qemu | scripts/qapi-visit.py | Python | gpl-2.0 | 10,055 | [
"VisIt"
] | e5ab1c6736ec053d1d4281d320eb5c09da7d49b5afe4d54bb87dd432e5e6e965 |
# -*- coding: utf-8 -*-
"""
Copyright 2016 Walter José and Alex de Sá
This file is part of the RECIPE Algorithm.
The RECIPE 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 (a... | RecipeML/Recipe | recipe/preprocessors/gaussianR.py | Python | gpl-3.0 | 1,211 | [
"Gaussian"
] | f3adef70e5aba5b46298738763c8e822cd2d046f26fa5686bc1dc2d6fa9a1763 |
"""
Multilayer Perceptron
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2012-2013, Universite de Montreal"
__credits__ = ["Ian Goodfellow", "David Warde-Farley"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
import logging
import math
import operator
import sys
import warnings
import numpy ... | caidongyun/pylearn2 | pylearn2/models/mlp.py | Python | bsd-3-clause | 165,807 | [
"Gaussian"
] | 1ccb7c4c9c6c836757e50ba29396287068e1fee7d83ae4b03cd7d49a3c1c51c9 |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache/incubator-airflow | airflow/utils/log/logging_mixin.py | Python | apache-2.0 | 5,582 | [
"Elk"
] | ec9a89e5c8d940aa7adb3cdcd946ffed71b4b12bf4d16caf2f09addda797db9d |
#################################################################
# Code written by Edward Choi (mp2893@gatech.edu)
# For bug report, please contact author using the email address
#################################################################
import sys, random
import numpy as np
import cPickle as pickle
from colle... | mp2893/med2vec | med2vec.py | Python | bsd-3-clause | 15,495 | [
"VisIt"
] | 7ceada77433f8f6213667f2a803d19c6cb9afe2cc040e8bc8854f7a0d88e3095 |
from numpy import *
from datetime import *
from matplotlib.dates import * # only for date2num?
from ncdfextract import ncgettypecode
# # should be the same as ncgettypecode
# def ncgetformat(fmt):
# if fmt == float64: #double
# return 'd'
# elif fmt == float32:
# return 'f'
# elif fmt =... | hendrikwout/pynacolada | old/pynacolada/ncdfconv.py | Python | gpl-3.0 | 6,624 | [
"NetCDF"
] | c30460ca3d9a40406a474b190d38b315c93c33d0bb6b88c7b2698c4d2ff7dfa6 |
#!/usr/bin/env python
"""
obsgen.py
State Estimation and Analysis for PYthon
Module to process observations:
obsgen : class to convert from raw to ROMS observations using
specific subclasses
Written by Brian Powell on 08/15/15
Copyright (c)2010--2021 University of Hawaii under the MIT-Lice... | powellb/seapy | seapy/roms/obsgen.py | Python | mit | 49,751 | [
"Brian",
"NetCDF"
] | dc41e6eb2b4be575076ac4205588dae5df6ab391a30fd91fdbe5b3fc14de1a4c |
from .parser import parse
from .utils import infer_qualified_name
def _get_node_type(node):
if isinstance(node, dict):
keys = node.keys()
if len(keys) == 1:
return keys[0]
class AST(object):
"""
Stolen from the Python AST module :)
https://hg.python.org/cpython/file/2.7/L... | liuhenry/psqlflow | psqlflow/ast.py | Python | mit | 6,543 | [
"VisIt"
] | eb1d5371e075bb8c80a55966b1d8aa336d5438dcd71186d91a1ce9a2cb97a0c1 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RAneufinderdata(RPackage):
"""WGSCS Data for Demonstration Purposes.
Whole-genome ... | rspavel/spack | var/spack/repos/builtin/packages/r-aneufinderdata/package.py | Python | lgpl-2.1 | 965 | [
"Bioconductor"
] | 05081e66a4243e9f945039f8f5dd28206dd37d3b3141d9402edd6248962028a1 |
import numpy as np
import chaospy as cp
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from scipy.io import loadmat, savemat
import sys, os
sys.path.append("./")
from Utils.RK4 import RK4
from Utils.submatrix import submatrix
from EntryGuidance.EntryEquations import Entry, EDL
from EntryG... | CDNoyes/EDL-Py | EntryGuidance/VMC.py | Python | gpl-3.0 | 15,736 | [
"Gaussian"
] | 5bcc22e0c28a1641e3ddb2d6d946c45ed1d401a4ea449d4eec40903e28a5cff8 |
"""
ComponentMonitoring type used to monitor DIRAC components.
"""
from DIRAC.MonitoringSystem.Client.Types.BaseType import BaseType
__RCSID__ = "$Id $"
########################################################################
class ComponentMonitoring( BaseType ):
"""
.. class:: ComponentMonitoring
"""
###... | Andrew-McNab-UK/DIRAC | MonitoringSystem/Client/Types/ComponentMonitoring.py | Python | gpl-3.0 | 1,342 | [
"DIRAC"
] | 97b48576c5a4086c8c28bdf5d94f63fd97d5eb5f0c6fb2745a57f8fd2b99bf5a |
from __future__ import unicode_literals
import django
import jinja2
from django.conf import settings
from django.test import TestCase
from django.utils import translation, encoding, six
if six.PY3:
from unittest import mock
else:
import mock
from nose.tools import eq_
from caching import base, invalidation,... | janusnic/django-cache-machine | tests/test_cache.py | Python | bsd-3-clause | 18,555 | [
"ADF"
] | 8f04ba557ab60f4a8ff3c536a9b679ebd2ab3ca7bab4e266c55bfe1496ff3eb8 |
"""
NetCDF reader/writer module.
This module is used to read and create NetCDF files. NetCDF files are
accessed through the `netcdf_file` object. Data written to and from NetCDF
files are contained in `netcdf_variable` objects. Attributes are given
as member variables of the `netcdf_file` and `netcdf_variable` objects... | felipebetancur/scipy | scipy/io/netcdf.py | Python | bsd-3-clause | 33,430 | [
"NetCDF"
] | 6454464482014ba398595f83ebea783746722e56c2a96abce6474051318bc32b |
#!/usr/bin/env python
# Copyright (c) 2012 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation... | yb-kim/gemV | util/streamline/m5stats2streamline.py | Python | bsd-3-clause | 41,662 | [
"VisIt"
] | 91c53c42eb0dde58c4fde6ea27cc1991e90ebec4faea32ed53dc9c1bb2cda926 |
"""CHARMM interface routines.
At present this is limited to support for reading in .crd format files.
"""
import os,sys
if __name__ == "__main__":
# Need to add the gui directory to the python path so
# that all the modules can be imported
gui_path = os.path.split(os.path.dirname( os.path.realpath( __file_... | alexei-matveev/ccp1gui | interfaces/charmm.py | Python | gpl-2.0 | 12,497 | [
"CHARMM"
] | 3fe7697761477ea746298ca15f7f658a02bfe23121e91f7024ac5b1dd6c07bfd |
"""Basic vtk support.
The vis module provides support for generic vtk file writing, basic mesh
writing (unstructured triangular and tetrahedral meshes), visualization of
aggregate groupings in 2d and in 3d, and C/F splittings.
"""
from . import vtk_writer
from . import vis_coarse
from .vtk_writer import write_vtu, w... | pyamg/pyamg | pyamg/vis/__init__.py | Python | mit | 489 | [
"VTK"
] | 7f8ad8e993ac7f644281bdd48c7416100de0578cf1823620578825fd33d7fbbd |
# -*- 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-eventarc-publishing | tests/unit/gapic/eventarc_publishing_v1/test_publisher.py | Python | apache-2.0 | 51,256 | [
"Octopus"
] | 4178526dccc0e1ba0e002545a56acb38f8db0d93d5bce5d8d4d722c527afaf08 |
########################################################################
# $HeadURL$
# File : ThreadedMightyOptimizer.py
# Author : Adria Casajus
########################################################################
"""
SuperOptimizer
One optimizer to rule them all, one optimizer to find them,
one optimizer ... | Sbalbp/DIRAC | WorkloadManagementSystem/Agent/ThreadedMightyOptimizer.py | Python | gpl-3.0 | 10,737 | [
"DIRAC"
] | bb17004309f947d11994b8afaafba1a06a029ab0bb20b9e25ff98a50ec6c4c29 |
import ocl
import camvtk
import time
import datetime
import vtk
def drawTree(myscreen,t,color=camvtk.red,opacity=0.2, offset=(0,0,0)):
nodes = t.get_nodes()
nmax=len(nodes)
i=0
for n in nodes:
cen = n.point()
#print "cen=",cen.str()
scale = n.get_scale()
#print "col=", n... | aewallin/opencamlib | src/attic/ocode/ocode_cylcutter_volume_3.py | Python | lgpl-2.1 | 10,072 | [
"VTK"
] | c9b274fdd515c1503624d3b7f38a8f1a7e93369ae683b713eb3b20856f008949 |
import subprocess as sp
if __name__=="__main__":
relaxfmt = """
log cylinder_relax_{0}.log
units metal
atom_style atomic
boundary p p p
lattice fcc 3.61
region mybox block -50 50 -50 50 -50 50
create_box 1 mybox
region mycylinder cylinder z 0 0 {0} EDGE EDGE
create_atoms 1 region mycylinder
mass 1 63.55
... | simo-tuomisto/portfolio | Computational Nanoscience 2013 - Final project/Code/run_relax.py | Python | mit | 1,283 | [
"LAMMPS"
] | e6a9a91037e770e80a39c061d5cbdc99aff9d77e70e3fb5470c47f6276487eed |
# global variables and
# common functions used for training of ML models
import numpy, cPickle
from rdkit import Chem, DataStructs
from rdkit.Chem import rdMolDescriptors as rdmd
# global variables
num_act = 1528
num_dcy = 293606
num_rep = 50
num_percent = 0.1
# fingerprint dictionary
fp_dict = {}
fp_dict['morgan2'... | sriniker/TDT-tutorial-2014 | common_functions.py | Python | bsd-3-clause | 2,962 | [
"RDKit"
] | 955553725271da3b3f859847c5f8e4d4c219300a87bb4f1eb72fc400e2f58bd8 |
import numpy as np
import poppy.grid
def _fill0(a):
return np.ma.filled(a,0.)
def get_vertical_stream_function(ds, region='Global', t=0, lat0=None, custom_mask=None):
"""Get vertical stream function for a given region
Parameters
----------
ds : netCDF4.Dataset
open netCDF dataset
... | j08lue/poppy | poppy/stream_functions.py | Python | gpl-2.0 | 5,241 | [
"NetCDF"
] | 7fce44758e5c5861a3d1912df0d645f07bd0a6f4ed56f7a83a3bdb7a0f07506e |
# IM - Infrastructure Manager
# Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
#
# 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 3 of the License, or
# (at your... | grycap/im | IM/CtxtAgentBase.py | Python | gpl-3.0 | 21,728 | [
"Galaxy"
] | 9f9edc4579ccc70d9bdc3a37c3037e3334cf06438889da302796a988b2c0a1ff |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | wscullin/spack | var/spack/repos/builtin/packages/libxc/package.py | Python | lgpl-2.1 | 3,468 | [
"CP2K",
"Octopus"
] | 87d04df4d6334868508a83558bc368ff52550adb7a03fe9ea5a7a36b7f2bc450 |
# coding: utf-8
"""
Write the eIoT report in an Xlsx file.\n
The xls file has 4 sheets.
1. The first sheet describes all the objects.\n
2. The second sheet decribes the objects that are currently in Evaluation.\n
3. The third sheet decribes the objects that are currently in Qualification.\n
4. The fourth she... | Shosta/Report-Creation-on-Python | writexlsxreport.py | Python | mpl-2.0 | 17,557 | [
"Amber"
] | 50a261791381e88a03e09b32b927dc95528325ee474bf29e0eb66c78443d8394 |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from sys i... | Azure/azure-storage-python | azure-storage-common/azure/storage/common/_error.py | Python | mit | 9,025 | [
"VisIt"
] | fca95f2e3c0e1d71f0ec910710450eef06b73fcd9f670e477e6ac3eafca11d6d |
"""
ColoredBaseFormatter
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import sys
from DIRAC.FrameworkSystem.private.standardLogging.Formatter.BaseFormatter import BaseFormatter
class ColoredBaseFormatter(BaseFormatter):
"""
... | ic-hep/DIRAC | src/DIRAC/FrameworkSystem/private/standardLogging/Formatter/ColoredBaseFormatter.py | Python | gpl-3.0 | 2,669 | [
"DIRAC"
] | 0dd34720cc0a0abfa7bb95c6485dad51449d1b98fb052c4df1d615a9e2947241 |
##########################################################################################
#
# run_parallel_pysam
#
#
# Copyright (c) 06/08/2013 Davit Bzhalava
#
##########################################################################################
"""
/media/StorageOne/HTS/VirusMeta/SAM_BAM/run_parallel_... | NIASC/VirusMeta | SAM_BAM/run_parallel_pysam.py | Python | gpl-3.0 | 11,296 | [
"BLAST",
"pysam"
] | 8319e31a45d1023bfaf1392432656eea21d8db5eeef9bcde36f9d5a90023cf00 |
"""
The Job Agent class instantiates a CE that acts as a client to a
compute resource and also to the WMS.
The Job Agent constructs a classAd based on the local resource description in the CS
and the current resource status that is used for matching.
"""
import os
import sys
import re
import time
from DIRAC i... | arrabito/DIRAC | WorkloadManagementSystem/Agent/JobAgent.py | Python | gpl-3.0 | 26,629 | [
"DIRAC"
] | f9feb2428825a58351c7c07b938c129e52d1d4ef65c2dfb8fe296930cc0e6bda |
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
2D Map Extractor
This script is used to calculate the main 2D maps from a data-cube. All
the maps are saved inside a single FITS file. Each maps is saved in a
different extension.
[0] Main extension - Contains the main header
"""
from __future__ im... | b1quint/samfp | samfp/maps.py | Python | bsd-3-clause | 17,361 | [
"Gaussian"
] | 7f0f4646c9fc26dd8beec032a0c76ca23fce328a8d54703aff5a0c44b0a2c374 |
# eliteBonusGunshipKineticMissileDamage1
#
# Used by:
# Ship: Jaguar
type = "passive"
def handler(fit, src, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), "kineticDamage",
src.getModifiedItemAttr("eliteBonusGunship1... | bsmr-eve/Pyfa | eos/effects/elitebonusgunshipkineticmissiledamage1.py | Python | gpl-3.0 | 350 | [
"Jaguar"
] | d914b13e363cdbe88d58ea3c5df9ffc6392074488903b75166ad65cc2b51fe02 |
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
import json
import random
import re
from ..compat import (
compat_parse_qs,
compat_str,
)
from ..utils import (
js_to_json,
strip_jsonp,
urlencode_postdata,
)
class WeiboIE(InfoExtractor):
_VALID_URL =... | epitron/youtube-dl | youtube_dl/extractor/weibo.py | Python | unlicense | 4,483 | [
"VisIt"
] | 30708ac4d8c568764b126b7bfd3a9e2089890626f3813cd726057377de62e598 |
__all__ = ['threshold_adaptive', 'threshold_otsu', 'threshold_yen']
import numpy as np
import scipy.ndimage
from skimage.exposure import histogram
def threshold_adaptive(image, block_size, method='gaussian', offset=0,
mode='reflect', param=None):
"""Applies an adaptive threshold to an arra... | almarklein/scikit-image | skimage/filter/thresholding.py | Python | bsd-3-clause | 7,022 | [
"Gaussian"
] | bf563f941158b30aee741f8dfede0d5a2bc3365d574696167717c2922837c919 |
"""
Written by Git user 'num3ric'
https://gist.github.com/1357315
Slightly modified to ensure float types by R. Clewley
"""
from __future__ import division
import numpy as np
def GENP(A, b):
'''
Gaussian elimination with no pivoting.
% input: A is an n x n nonsingular matrix
% b is an n x 1 vector
% output: x is ... | robclewley/compneuro | gauss_elim.py | Python | bsd-3-clause | 2,802 | [
"Gaussian"
] | 6eeac5e00cecb687ff92c978b23d43300dae6ed74b6354ef0ff91e463902891c |
import numpy as np
class Neuron(object):
"""
Hold the neuron data
Value represents the z value of a neuron
"""
def __init__(self, value=0):
self.value = value
def __repr__(self):
return str(self.value)
class Layer(object):
"""
Holds the layer data as follows you n... | kirnap/Neural-Networks-Playground | nn.py | Python | mit | 15,480 | [
"NEURON"
] | ae010c3fbd1d86cef7649eb1b11c72f93c907fa9a9fd69c7593938db51d72477 |
# -*- coding: utf-8 -*-
####
#### This is a newer version of kasey_fitgaussians.py, so use this.
#### This adds ability to fit Lorentzians as well as better parameter handling (dictionaries rather than lists).
#### FROM: Kasey Russell, Harvard: http://people.seas.harvard.edu/~krussell
#### GIT repository on GITHU... | jllanfranchi/pygeneric | kasey_fitspectra.py | Python | mit | 11,492 | [
"Gaussian"
] | 72a1dc669768d969ea2ac6db0e0a8a80aba501a150d0ee2304bfddb8187906f2 |
# 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 RMlinterfaces(RPackage):
"""Uniform interfaces to R machine learning procedures for data i... | LLNL/spack | var/spack/repos/builtin/packages/r-mlinterfaces/package.py | Python | lgpl-2.1 | 2,224 | [
"Bioconductor"
] | 5174fb2bd66c972a1455d681e74e978e431cfbc0574af96fa6b74f8127b916de |
import os
import logging
import re
import parmed.unit as units
import numpy as np
from intermol.forces import *
import intermol.forces.forcefunctions as ff
from intermol.exceptions import (UnimplementedFunctional, UnsupportedFunctional,
UnimplementedSetting, UnsupportedSetting,
... | shirtsgroup/InterMol | intermol/lammps/lammps_parser.py | Python | mit | 54,159 | [
"CHARMM",
"Desmond",
"Gromacs",
"LAMMPS"
] | de484f716f440830a2b1ad90a339baba41295184e566700fbb185b4d7f290278 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
This file defines all the classes that are plotable.
It does so by patching them accordingly
"""
import sisl
import... | zerothi/sisl | sisl/viz/_plotables_register.py | Python | mpl-2.0 | 2,516 | [
"SIESTA"
] | 0bf2fcc8e22e11b6e3ec3f8c203b6d36ac1392639052861291bf704273abfbbf |
#!/usr/bin/python
import h5py as h5
import numpy as np
import vtk
from defines import *
def uniqify(seq):
seen = {}
result = []
for i in range(0,len(seq)):
marker = int(seq[i])
# in old Python versions:
# if seen.has_key(marker)
# but in new ones:
if marker in seen: contin... | ngcurrier/ProteusCFD | GUI/h5reader.py | Python | gpl-3.0 | 7,259 | [
"VTK"
] | 8d0d162af9df55f2da14fcb68e0647c13ad1b372f5cd97a3852cbd76447088fc |
from setuptools import setup
import pyneuroml
version = pyneuroml.__version__
jnml_version = pyneuroml.JNEUROML_VERSION
setup(
name="pyNeuroML",
version=version,
author="Padraig Gleeson",
author_email="p.gleeson@gmail.com",
packages=[
"pyneuroml",
"pyneuroml.analysis",
"py... | NeuroML/pyNeuroML | setup.py | Python | lgpl-3.0 | 3,195 | [
"Brian",
"NEURON"
] | 4901b3c9349d9acecbf333b3c4b5b97ed2bacc66eabd8035ed5bfe8221d92f8f |
from test import support
import unittest
import codecs
import sys, _testcapi, io
class Queue(object):
"""
queue: write bytes at one end, read bytes from the other end
"""
def __init__(self, buffer):
self._buffer = buffer
def write(self, chars):
self._buffer += chars
def read(s... | MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.0/Lib/test/test_codecs.py | Python | mit | 53,842 | [
"FEFF"
] | a2b97ce818175af947e23aae5f70f950a609d85e3ee6d8cebcde9b389edf27b4 |
r"""
==================================
Constants (:mod:`scipy.constants`)
==================================
.. currentmodule:: scipy.constants
Physical and mathematical constants and units.
Mathematical constants
======================
================ ===========================================================... | scipy/scipy | scipy/constants/__init__.py | Python | bsd-3-clause | 12,297 | [
"Avogadro"
] | b112c3d21692804b570384e9846915bf6a76a90c53c9ec95966a73652ab46208 |
"""
Check for updates in a background process. If we can start a program immediately, but some of our information
is rather old (longer that the L{config.Config.freshness} threshold) then we run it anyway, and check for updates using a new
process that runs quietly in the background.
This avoids the need to annoy peop... | AlexanderRyzhko/0install-TUF | zeroinstall/injector/background.py | Python | lgpl-2.1 | 10,281 | [
"VisIt"
] | 1f1649e3d24e305734eaf5991e80e8e282740e874d330673a655b50108acf1fc |
#!/usr/bin/env python
from distutils.core import setup
setup( name='WIRAC',
version='v0r0p1',
description='Web framework for DIRAC',
author='Adria Casajus',
author_email='adria@ecm.ub.es',
packages=[ 'tornado=2.4.0' ],
) | zmathe/WebAppDIRAC | setup.py | Python | gpl-3.0 | 257 | [
"DIRAC"
] | e8e6108bc75e7ec72533676d9729478bd91bd4ee683a9e2a7c501cd0e493ea17 |
from subprocess import call
import os
import numpy as np
#modify the redshift, prefix, and NHI, Z, nH, nproc values below.
REDSHIFT = 2.465
aUVvals = np.arange(-2, 1.01, 0.5)
template = """\
# Path to the CUBA file giving the UV background.
#cuba_name = /Users/ncrighton/Code/Repo/QSOClustering-svn/misc/CUBA/Q1G01/b... | nhmc/LAE | cloudy/grid/create_aUV_dirs_g2.py | Python | mit | 2,610 | [
"Galaxy"
] | 52c741703c21fa54d2cbcf4e49f46630a9cc3ce9c4a28d645786f114bd92f4c0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright notice
# ----------------
#
# Copyright (C) 2013 Daniel Jung
# Contact: d.jung@jacobs-university.de
#
# 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
# Softw... | proggy/h5obj | tools.py | Python | gpl-2.0 | 16,172 | [
"VisIt"
] | 90145d0102c0897a0d4321165d96adc098ea9634d443bbaaf9facb9a3979bac3 |
#!/usr/bin/env python
'''
uframe endpoints
'''
# base
from flask import jsonify, request, current_app, make_response, Response, send_file
from ooiservices.app import cache, db
from ooiservices.app.uframe import uframe as api
from ooiservices.app.models import DisabledStreams
from ooiservices.app.uframe.vocab import get... | Bobfrat/ooi-ui-services | ooiservices/app/uframe/controller.py | Python | apache-2.0 | 108,230 | [
"NetCDF"
] | 0402811b26a84e7b3edf41db9216b1ffeb36eaf6f0024b80fbdf4609b65ab9f0 |
#coding=utf8
##----------------------------------------------------------------------------##
## █ █ ##
## ████████ ##
## ██ ██ ... | AmazingCow-Libs/cowtermcolor_py | cowtermcolor.py | Python | gpl-3.0 | 20,021 | [
"VisIt"
] | 8a1fd21c2f254de2e3eab18bb46d176c619355730e138425a2666201998a889d |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes for non-standard space-group settings
"""
import re
from fractions import Fraction
from typing import List, Tuple, Union
import numpy as np
from pymatgen.core import Lattice
from pymatgen.co... | vorwerkc/pymatgen | pymatgen/symmetry/settings.py | Python | mit | 7,556 | [
"pymatgen"
] | f77f7b35b25f7779ab264e1b8f84fddc9bc29e7eaa9609dee129c9a638f07a39 |
"""Functions to plot M/EEG data on topo (one axes per channel)."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: Simplified BSD
from c... | rkmaddox/mne-python | mne/viz/topo.py | Python | bsd-3-clause | 39,781 | [
"Gaussian"
] | 3471c47c5926c23b3ee5134708d0187e4719ac2fabb4cb81e995062159e7c335 |
"""
The Julia set, but with a decimated mesh: unecessary triangles due to the
initial grid and not matching the geometry of the Julia set
are removed.
We first build the mesh, applying a warp_scalar filter to a
array2d_source, to warp the Julia set along the z direction.
Then when have to convert the rectangles in th... | dmsurti/mayavi | examples/mayavi/mlab/julia_set_decimation.py | Python | bsd-3-clause | 2,352 | [
"Mayavi"
] | f522279d853e3089b272221bba1f3d829185f3f95d2fb5ed551cbf2960b24c46 |
###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | Nikea/VisTrails | vistrails/core/system/__init__.py | Python | bsd-3-clause | 14,245 | [
"VTK"
] | 76b542911a71461e80436fa9959a9e5386be777df90fbb1e8fba317334d31302 |
from docutils import nodes
from sphinx.roles import XRefRole
import figtable
import subfig
from backports import OrderedDict, OrderedSet
# Element classes
class page_ref(nodes.reference):
pass
class num_ref(nodes.reference):
pass
# Visit/depart functions
def skip_page_ref(self, node):
raise nodes.Skip... | jurandysoares/relatif | extensions/numfig.py | Python | gpl-2.0 | 6,184 | [
"VisIt"
] | 22cbf758889b50b393e3ab8d9a4c5a86cd5968a9a8c89f0be105f925457c4e82 |
"""
image_graph part of pycroscopy
Author: Gerd Duscher
The atomic positions are viewed as a graph; more specifically a ring graph.
The projections of the unit_cell and defect structural units are the rings.
The center of the ring is the interstitial location.
The vertices are the atom positions and the edges are th... | pycroscopy/pycroscopy | pycroscopy/image/image_graph.py | Python | mit | 19,448 | [
"ASE"
] | 7a2c00a4ad968c51804cab995b1dc28a7e1a56d3c73b2e379ee617a8e13abff0 |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | Karaage-Cluster/karaage | karaage/institutes/lookups.py | Python | gpl-3.0 | 2,484 | [
"Brian"
] | 2002dcec0c6882757af7ffe3815b8bc41aa268d5eb421f8b1daec4201354fb14 |
import unittest
from test import support
from itertools import *
from weakref import proxy
from decimal import Decimal
from fractions import Fraction
import sys
import operator
import random
import copy
import pickle
from functools import reduce
import sys
import struct
maxsize = support.MAX_Py_ssize_t
minsize = -maxsi... | mancoast/CPythonPyc_test | fail/340_test_itertools.py | Python | gpl-3.0 | 84,753 | [
"GULP"
] | d6bb8662a8262cfb4d2b8d5ef97c6ce33c04f67dbffe6f98009545bfffd30922 |
import psi4
from psi4.driver.constants.physconst import hartree2ev
psi4.set_output_file("output.dat", False)
benz = psi4.geometry("""
pubchem:benzene
""")
psi4.set_options({"REFERENCE" : "RHF",
"MAX_ENERGY_G_CONVERGENCE" : 8,
"BASIS" : "STO-3G... | rmcgibbo/psi4public | tests/python/pubchem/input.py | Python | lgpl-3.0 | 1,439 | [
"Psi4"
] | ba486ee9c391a9e693b289ed5a44e11215cbead5025c4e84a26202694cefc6df |
"""
:mod:`operalib.ridge` implements Operator-Valued Kernel ridge
regression.
"""
# Author: Romain Brault <romain.brault@telecom-paristech.fr> with help from
# the scikit-learn community.
# Maxime Sangnier <maxime.sangnier@gmail.com>
# License: MIT
from scipy.optimize import minimize
from scipy.sparse.... | operalib/operalib | operalib/ridge.py | Python | bsd-3-clause | 23,728 | [
"Gaussian"
] | 4ece91d076b13cd98489d6e57392a4ae742d06028159bb2cadad4de00b79ccd0 |
# Copyright 2013 Cloudbase Solutions SRL
# Copyright 2013 Pedro Navarro Perez
# 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... | cloudbase/networking-hyperv | hyperv/neutron/hyperv_neutron_agent.py | Python | apache-2.0 | 19,711 | [
"VisIt"
] | 860b94a42b7683c7087ac73816d1a3d406b332b3bdebc38f0cbb33ff45a5dcb3 |
import numpy as np
from . import _algorithm
from spotpy.parameter import ParameterSet
class DDSGenerator:
"""
This class is used by the DDS algorithm to generate a new sample of parameters based on the current one.
Current parameter are exchanged in `ParameterSet` objects.
"""
def __init_... | thouska/spotpy | spotpy/algorithms/dds.py | Python | mit | 19,904 | [
"Gaussian"
] | 5f010fe36f54a2a3e8cadda833ac0942931d8dcb4865e4499dfc4b913358b142 |
# coding: utf-8
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Generic interfaces to manipulate registration parameters files, including
transform files (to configure warpings)
"""
import os.path as op
import re
from nipype.interfaces.base impor... | grlee77/nipype | nipype/interfaces/elastix/utils.py | Python | bsd-3-clause | 5,734 | [
"VTK"
] | 2fc1655315c07e6eb483b83934f431bd845b2ce9a0b69040ccce7eadf8eb095c |
from pysimm import system, lmps, cassandra
from collections import OrderedDict
import os
import re
import random
import types
def mc_md(gas_sst, fixed_sst=None, mcmd_niter=None, sim_folder=None, mc_props=None, md_props=None, **kwargs):
"""pysimm.apps.mc_md
Performs the iterative hybrid Monte-Carlo/Molecular ... | plin1112/pysimm | pysimm/apps/mc_md.py | Python | mit | 7,099 | [
"LAMMPS"
] | 5e03b9a59e34c3670372f2aab09df604b9db0968554d3e4853981a139fd5ad33 |
from __future__ import annotations
import math
import pathlib
import warnings
import meshio
import npx
import numpy as np
from numpy.typing import ArrayLike, NDArray
from ._exceptions import MeshplexError
from ._helpers import _dot, _multiply, grp_start_len
__all__ = ["Mesh"]
class Mesh:
def __init__(self, po... | nschloe/voropy | src/meshplex/_mesh.py | Python | mit | 53,579 | [
"VTK"
] | 096a48906ba8ef23b21d9a3d1ed4646d22d8db12f7b25a09c0d8e7364ecfaadb |
#!/usr/bin/env python
"""
Generate a single CRLs file
"""
import sys
from DIRAC import gLogger
from DIRAC.Core.Base.Script import Script
from DIRAC.Core.Security import Utilities
@Script()
def main():
Script.parseCommandLine(ignoreErrors=True)
result = Utilities.generateRevokedCertsFile()
if not result[... | DIRACGrid/DIRAC | src/DIRAC/Core/scripts/dirac_generate_crls.py | Python | gpl-3.0 | 428 | [
"DIRAC"
] | fdf9d6cfeef9a421d60eeecaf024f5deaca4f7899934403420f9c80468208d60 |
from __future__ import print_function
#
# Author: Henrique Pereira Coutada Miranda
# Tests for yambopy
# Run all the functions of the tutorial
#
import unittest
import sys
import os
import argparse
import subprocess
import filecmp
from yambopy import *
from qepy import *
import imp
###################################... | alexmoratalla/yambopy | yambopy/integration_tests/itest_tutorial.py | Python | bsd-3-clause | 4,615 | [
"Yambo"
] | e90f6ca9c2de1282c8935eeb5716e36c6f2acf9b38a073effac118a97736f5ae |
def my_write_vasp(filename, atoms, label='', direct=False, sort=True, symbol_count = None, long_format=True, vasp5=True):
"""
Hexu: alter the sort method from 'quicksort' to 'mergesort' so that the order of same symbol is kept; sort default -> True, vasp default ->True.
Method to write VASP position (POSC... | mailhexu/pyDFTutils | pyDFTutils/ase_utils/ioput.py | Python | lgpl-3.0 | 3,705 | [
"ASE",
"VASP"
] | 0137c1e0ca657681d9625be9a87203608425917a548ef896c39ddd158e135f5e |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/removelocation.py | Python | gpl-2.0 | 5,259 | [
"VisIt"
] | 2f95254b892f25063420eac2e978015693e09a017ae160ebf55a64cb55db38d6 |
import numpy as np
from scipy.signal import boxcar, convolve
def clean_dataset(dataset):
# Get rid of NaNs
dataset = dataset[~np.isnan(dataset[:, 1:]).any(axis=1), :]
return dataset
def boxcar_smooth_dataset(dataset, window_size):
window = boxcar(window_size)
return convolve(dataset, window, 's... | USF-COT/glider_utils | glider_utils/__init__.py | Python | mit | 1,415 | [
"NetCDF"
] | 8f5ee884d1ed08e56b4db1ac3e043277ae28477c5737f685668f8d3a6c8472be |
#!/usr/bin/env python
import numpy as np
import rospy
import tf
from geometry_msgs.msg import PoseStamped, Quaternion
from navigation.srv import GoToGoalPosition
from scripts.laser_data import LaserData
class GoalManagerNode(object):
'''Node for controlling the motion of a robot following a set of
consecutive... | aleksandar-mitrevski/robot_simulation | robot/goal_manager.py | Python | mit | 2,260 | [
"VisIt"
] | 85a3846c6df8c02338417da1e848b7d880a5401c58525e644303e35aaa1a8850 |
# File: install.py
# Author: Brian A. Vanderburg II
# Purpose: An install builder to install subdirectories and files
# Copyright: This file is placed in the public domain.
##############################################################################
# Requirements
#############################... | TUD-OS/M3 | src/tools/install.py | Python | gpl-2.0 | 6,632 | [
"Brian"
] | 60b3765d685202edfe7b2d8694dd5675e2bc50ee80a64485eff5685bae319854 |
# Module wordnet.py
#
# Author: Oliver Steele <steele@cs.brandeis.edu>
# Project Page: http://sourceforge.net/projects/pywordnet
#
# Copyright (c) 1998-2001 by Oliver Steele. Use is permitted under
# the Artistic License
# <http://www.opensource.org/licenses/artistic-license.html>
"""Utility functions to use with the... | ronaldahmed/robot-navigation | neural-navigation-with-lstm/MARCO/nltk_contrib/pywordnet/tools.py | Python | mit | 12,009 | [
"Amber"
] | 6157e4894f66f947174e73b460efbd479c7a3ceac97192e32076d8793dd539c4 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
# !! This is the configuration of Nikola. !! #
# !! You should edit it to your liking. !! #
# ! Some settings can be different in different languages.
# ! A comment stating (translatable) is used to denote those.
# ! There are two ways to... | peakrisk/peakrisk | conf.py | Python | gpl-3.0 | 37,112 | [
"VisIt"
] | a9cd7f5167020e329c97c9b57e2075d8ef31719529a788ab64dc0731642d2f02 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2020, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Gaussian Editor
#######################
Base class on top of exatomic.Editor for Gaussian Editors
"""
#import pandas as pd
from exatomic import Editor
class Editor(Editor):
... | exa-analytics/atomic | exatomic/gaussian/editor.py | Python | apache-2.0 | 645 | [
"Gaussian"
] | 90a9275b33fe9768b142f6080d2c4a1349271ce1a40da67387fed2fa755f7347 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 16.3.8
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | adityacs/ansible | lib/ansible/modules/network/avi/avi_analyticsprofile.py | Python | gpl-3.0 | 25,915 | [
"VisIt"
] | ec04f3fa48d84e0035982879714b1d6869413d55b2774ae1e70021f4dffc0b7e |
from ase.parallel import paropen
from ase.units import Hartree
from gpaw.xc.rpa import RPACorrelation
from gpaw.xc.fxc import FXCCorrelation
from gpaw.mpi import world
fxc0 = FXCCorrelation('CO.gpw', xc='rAPBE', txt='rapbe_CO.txt', wcomm=world.size)
fxc1 = FXCCorrelation('C.gpw', xc='rAPBE', txt='rapbe_C.txt', wco... | robwarm/gpaw-symm | doc/tutorials/fxc_correlation/rapbe_CO.py | Python | gpl-3.0 | 1,126 | [
"ASE",
"GPAW"
] | 351923809b0732baa02408eb5c01685818d4a5d490ebd21a42ffb91d908211d2 |
"""
DIRAC.Interfaces package
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
| yujikato/DIRAC | src/DIRAC/Interfaces/__init__.py | Python | gpl-3.0 | 163 | [
"DIRAC"
] | fa5373bedbebc50ba8043d524a2ff6f19ba5896fd375f1616716e069b32e2c97 |
from collections import OrderedDict
from functools import partial, wraps
from sympy.tensor.indexed import IndexException
from devito.ir.iet import Call, FindNodes, MetaCall, Transformer
from devito.tools import DAG, as_tuple, filter_ordered, timed_pass
__all__ = ['Graph', 'iet_pass']
class Graph(object):
"""
... | opesci/devito | devito/passes/iet/engine.py | Python | mit | 5,796 | [
"VisIt"
] | 9148a2d0d8c9b48f856a174b5948cf7ab90acd98079412fb420452dd1199e2e9 |
#!/usr/bin/env python3
import sys
import time
import unittest
from io import StringIO
import pynmrstar
import requests
from bmrbapi.utils import querymod
from bmrbapi.utils.connections import RedisConnection
url = 'http://localhost'
# We will use this for our tests
class TestAPI(unittest.TestCase):
def setUp... | uwbmrb/BMRB-API | server/wsgi/bmrbapi/utils/test.py | Python | gpl-3.0 | 6,295 | [
"Octopus"
] | 31398d4c16e9259f04f4ad297346aa0e68a03e59e7c033c43ee0af875cb2b293 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... | salv-orlando/MyRepo | nova/tests/api/openstack/test_xmlutil.py | Python | apache-2.0 | 27,800 | [
"VisIt"
] | e74de55004ec87b7bc47a878d1040720eacc9ec8906568ae657d07fbbf8927c0 |
#
# Copyright (C) 2013-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | mkuron/espresso | samples/lj_liquid_distribution.py | Python | gpl-3.0 | 7,660 | [
"ESPResSo"
] | ceca27fa9a7c1966eae175e7b8a7b2afdc596d5ecf847122ad9c18216f84cded |
import numpy as np
import netCDF4 as netCDF
from datetime import datetime
import pyroms
import pyroms_toolbox
#You need to edit and run compute_daitren_remap_weights.py first
#then edit and run make_ARCTIC2_runoff.py to generate the runoff file.
#In make_ARCTIC2_runoff.py you can tune the number of cell defining the
... | kshedstrom/pyroms | examples/Arctic_runoff/make_runoff_file.py | Python | bsd-3-clause | 5,516 | [
"NetCDF"
] | 239be9089f79eedd1f9cc4b27c1c2d8dda11325f6d829ea693dae79f212ffcea |
import os
from functools import partial
from itertools import product
import seaborn as sns
from matplotlib import pyplot as plt
from odin import visual as vs
sns.set()
import numpy as np
import tensorflow as tf
from odin.bay import distributions as D
from odin.bay import vi
from odin.training import get_current_tra... | imito/odin | examples/vae/vae_posterior_prior.py | Python | mit | 6,559 | [
"Gaussian"
] | 08f338d0c98b801ff145c8ee01392039734de99e00fab2c4455bde794dc6939a |
#!/usr/bin/env python
# Annotates Fasta file with best BLAST results (tab-delimitted)
# USAGE: parse_blast.py blast_results query_fasta_file annotated_fasta_file_name
import sys
# Read the best hits from the BLAST output into a python dictionary
with open(sys.argv[1], 'r') as blast_file:
result_dict = {}
unique... | mjenior/Blog_scripts | parse_blast.py | Python | mit | 1,769 | [
"BLAST"
] | 96025d7829c6dace280d69861dbbe980fd5c5f175a7c759cd68d26ab44f4b932 |
import math
import unittest2 as unittest
import numpy as np
import register as r
class TestRegister(unittest.TestCase):
def test_basic_construction(self):
"""Constructing a valid register with no superposition, works"""
state = np.array([1, 0], dtype=np.complex_)
register = r.Register(1,... | cjwfuller/quantum-circuits | quantum-circuits/tests/test_register.py | Python | mit | 5,301 | [
"DIRAC"
] | 19eff4173d047c6812dab182b404a170ed05b064af0a56ec36f02ed5bb2fb1ee |
# Copyright 2018 Brian May
#
# This file is part of python-tldap.
#
# python-tldap 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 version.
#
# ... | brianmay/python-tldap | tldap/django/helpers.py | Python | gpl-3.0 | 2,452 | [
"Brian"
] | cf0ed830033e7ae9a9d1e2c8288ef32342d1d728297e0fdcb472c653f2218d68 |
#!/usr/bin/env python
# Copyright (C) 2008 Brian Quinlan
#
# 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 version.
#
#... | hfiguiere/libopenraw | python/demo/thumb.py | Python | lgpl-3.0 | 3,837 | [
"Brian"
] | 17ae28c096dc3e59961e2c1a4935939d99a0a0475c7fc4043d80290912a53664 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.