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 (C) 2006 Greg Landrum
# This file is part of RDKit and covered by $RDBASE/license.txt
#
import argparse
import sys
from rdkit import Chem
from rdkit import Geometry
from rdkit.Chem import rdDepictor
def AlignDepict(mol, core, corePattern=None, acceptFailure=False):
"""
Arguments:
- mol: ... | greglandrum/rdkit | rdkit/Chem/ChemUtils/AlignDepict.py | Python | bsd-3-clause | 2,957 | [
"RDKit"
] | 3724dd9489d63c181d00fdd704aa11231e2fdb11f584a4bdbec0e6ba123897cd |
#!/usr/bin/env python
#from galaxy import eggs
#import pkg_resources
#pkg_resources.require("Cheetah")
import sys, string, os.path, tempfile, subprocess
#from galaxy import eggs
import pkg_resources
pkg_resources.require( "Cheetah" )
from Cheetah.Template import Template
from subprocess import Popen, PIPE
assert sy... | volpino/Yeps-EURAC | static/june_2007_style/make_style.py | Python | mit | 3,931 | [
"Galaxy"
] | 52016c61b381d425d826f03a2adcbca6d5cb0585857f316fe7580e23fe7c18d5 |
#
# Copyright 2019 James Brixey (Warwick U.)
# 2016 James Kermode (Warwick U.)
#
# matscipy - Materials science with Python at the atomic-scale
# https://github.com/libAtoms/matscipy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | libAtoms/matscipy | examples/socketcalc/castep_socket_calc.py | Python | lgpl-2.1 | 2,234 | [
"ASE",
"CASTEP",
"Matscipy"
] | e0c6b8664d206d451b485a49d1898f87f11706d116171b3e701daf0ca1ad8bdb |
"""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hilbert curve animation based on Gray code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Based on code at
"https://possiblywrong.wordpress.com/2014/04/18/allrgb-hilbert-curves-and-random-spanning-trees/"
:copyright (c) 2018 by Zhao Liang
"""
from colorsys import hls_to_rgb... | neozhaoliang/pywonderland | src/gifmaze/example_hilbert_curve.py | Python | mit | 5,025 | [
"VisIt"
] | bf183fc843775130d272358134b655a7842b691b6556c4c164b9c6993563af31 |
"""
@name: PyHouse/src/Modules/families/UPB/_test/test_UPB_device.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2017 by D. Brian Kimmel
@license: MIT License
@note: Created on Apr 8, 2013
@summary: This module is for testing UPB devices.
Passed all 1 tests - DBK ... | DBrianKimmel/PyHouse | Project/src/Modules/House/Family/Upb/_test/test_UPB_device.py | Python | mit | 2,468 | [
"Brian"
] | 881ad017d0214fe833ae40a8ecd0b829647b34e2bdcf62f10c57051dcc0d8106 |
# Orca
#
# Copyright 2016 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# 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 o... | GNOME/orca | src/orca/sound_generator.py | Python | lgpl-2.1 | 12,280 | [
"ORCA"
] | c75717b6c3ef0a06bf98540acfdab6ec872d6c61fc35d0abacfd11789b41d558 |
#!/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 | modules/porous_flow/doc/content/modules/porous_flow/tests/poro_elasticity/terzaghi.py | Python | lgpl-2.1 | 4,996 | [
"MOOSE"
] | df559acec33536674dfe68632b0f31510664fd46cd752610391f3699b0feefc4 |
'''
original version by Sven Warris
@author: Arne Poortinga
'''
from pyPaSWAS.Core.Exceptions import CudaException
from Bio.Seq import Seq
from pyPaSWAS.Core.SWSeqRecord import SWSeqRecord
class Hit(object):
'''This class models an alignment between a sequence and a target.
It contains information about ... | swarris/pyPaSWAS | pyPaSWAS/Core/Hit.py | Python | mit | 19,173 | [
"BLAST"
] | d8d68d6082e4af21f45cb42c372e3d8a9802bda5331094f1d239516ac59502d6 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Logging Facility
"""
import logging
class Logger(object):
"""
Logger Class.
"""
def __init__(self,
name=__name__,
logfile="/tmp/trailtracker.log"):
"""
Initialize logger:
:type name: String... | bdastur/utils | trailtracker/main/trail_logging.py | Python | apache-2.0 | 2,498 | [
"Brian"
] | 1a3040d0596d2543e21044d45fb86f36c4c4cfe885dd241b4307468b2f6a7711 |
import logging
import os
import time
import traceback
from typing import Any, Dict, Tuple, Type, Union
import numpy as np
from ..conventions import cf_encoder
from ..core import indexing
from ..core.pycompat import is_duck_dask_array
from ..core.utils import FrozenDict, NdimSizeLenMixin, is_remote_uri
# Create a log... | pydata/xarray | xarray/backends/common.py | Python | apache-2.0 | 12,344 | [
"NetCDF"
] | 6193509da35c5ef55780dc214053ba1f71c0c4b9aeed160e2bcde3910417d056 |
#!/usr/bin/env python
# draw_dist.py:
# Draw particle distribution data in the following formats.
# 1. slices in 2D using matplotlib
# 2. isosurfaces in 3D using VTK
#
# Copyright (C) 2014 Jian-Ming Tang <jmtang@mailaps.org>
#
# This program is free software: you can redistribute it and/or modif... | jianmingtang/PIC-tools | Python/draw_dist.py | Python | gpl-3.0 | 15,533 | [
"VTK"
] | fecdb3b4be78dd0e71a1475e66be96859c4b461fdfd42113e97a811cea53e02e |
import os
import glob
import math
import zipfile
from shapely.geometry import MultiPoint, LineString
# NetCDF
import netCDF4
# Trackline
from shapely.geometry import mapping
import json
from fiona import collection
from collections import OrderedDict
import cPickle as pickle
from paegan.logger import logger
cla... | asascience-open/paegan-transport | paegan/transport/export.py | Python | gpl-3.0 | 17,645 | [
"NetCDF"
] | dc1d4cdebfea4a18dfb393e29af27081d320169363567cceb031a4d467d5b6da |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'GenericFeedback'
db.create_table(u'clinics_genericfeedbac... | myvoice-nigeria/myvoice | myvoice/clinics/migrations/0021_auto__add_genericfeedback.py | Python | bsd-2-clause | 14,283 | [
"VisIt"
] | 618afbf4ffb84b2236e23cdb289b2add70bf19efc9d29f50c8d859ba3ddfca5f |
from os import path, environ
import logging
import subprocess
from emmail.objects.command import Command, FileNotInPathException
from emmail.objects.resultRow import ResultRow
logging.basicConfig(level=environ.get("LOGLEVEL", "INFO"))
logger = logging.getLogger(__name__)
class BLAST(Command):
"""
... | Andre-Tan/EmMAIL | emmail/objects/blast.py | Python | gpl-3.0 | 5,660 | [
"BLAST"
] | 8a221481895e4131ea5ade06f4c4c831d48dba92c8dd4dd44daa43b3959819bd |
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from common import course_location
from problems_setup import PROBLEM_DICT
from nose.tools import assert_in
@step(u'I am viewing a course with multiple sections')
def view_course_multiple_sections(step):
cr... | olexiim/edx-platform | lms/djangoapps/courseware/features/navigation.py | Python | agpl-3.0 | 5,608 | [
"VisIt"
] | 6bf71effb36eb3b96b13972264e4ac6054da02903f0a9440b96e598a46fd6288 |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | intel-analytics/analytics-zoo | pyzoo/test/zoo/orca/automl/xgboost/test_xgbregressor.py | Python | apache-2.0 | 4,731 | [
"ORCA"
] | 1bac157b948eb014372ae3830f177ec74fd3505fa3a2ef8cc2d1613fcc31f316 |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | nicememory/pie | pyglet/contrib/aseprite_codec/aseprite.py | Python | apache-2.0 | 14,459 | [
"ASE"
] | b643225b23261058001aabb859e220e8f46fb7111ab13d9c1fc710288cd72a64 |
import torch
import numpy as np
from rdkit import Chem
def Variable(tensor):
"""Wrapper for torch.autograd.Variable that also accepts
numpy arrays directly and automatically assigns it to
the GPU. Be aware in case some operations are better
left to the CPU."""
if isinstance(tensor, np.ndar... | MarcusOlivecrona/REINVENT | utils.py | Python | mit | 1,554 | [
"RDKit"
] | 8b39370d1a16222c17e563b093bc872540ce8fa01198aceba54a1ac7fd890445 |
#! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
try :
# this analitycal example is taken from "Bayesian Modeling Using WinBUGS" - Ioannis Ntzoufras
# 1.5.3: Inference for the mean or normal data with known variance
# Variable of interest: Y=N(mu, sigma)
# Prior for mu: Normal(mu0, sig... | dbarbier/privot | python/test/t_RandomWalkMetropolisHastings_std.py | Python | lgpl-3.0 | 3,028 | [
"DIRAC"
] | 61265d48efed3b9a93c862a9498fe8ce6b8839d5f2c9486fec838549568556c2 |
D = 126.0
downstreamPosition = [-1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0];
planeDir = '../planeData'
time = 1050.0
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
controlDic... | gzt200361/SOWFA | tutorials/turbine/NREL5MWRef.uniformFlow/system/samplePlane.py | Python | gpl-3.0 | 4,208 | [
"ParaView"
] | 5b34ce92661f130a4089af71e7e7031668346c457920b133ccb28b3a617f045a |
import os
import binascii
import tempfile
from zipfile import ZipFile, ZIP_DEFLATED
from cStringIO import StringIO
import numpy as np
import Image
def save_vrml(fig, output_filename):
"""
Saves a Mayavi figure as shapeways-formatted VRML in a zip file.
Parameters
----------
fig : a Mayavi/mlab fi... | joferkington/scipy2015-3d_printing | shapeways_io.py | Python | mit | 3,662 | [
"Mayavi"
] | 0f32c8a8770408808d9a0f637ccdc1b18589250c3911dc49fe87171fc78c55ef |
"""\
Code for reading/writing Gaussian Cube files
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distribut... | berquist/PyQuante | PyQuante/IO/Cube.py | Python | bsd-3-clause | 2,400 | [
"Gaussian"
] | 13b6df7a826567796e5cf9b6b06d09453b1c9966d54a9f2d0801201fc6a6d00e |
#
# Brian C. Lane <bcl@redhat.com>
#
# Copyright 2014 Red Hat, Inc.
#
# 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 Public License v.2. This program is distributed in the hope that it
# will be useful,... | bcl/pykickstart | tests/commands/sshkey.py | Python | gpl-2.0 | 3,722 | [
"Brian"
] | fcc16983791767b5b81eb85b39595b985ca812c58fc3bee9bc698e8000c49c34 |
"""
Node classes (`Apply`, `Variable`) and expression graph algorithms.
"""
from __future__ import absolute_import, print_function, division
from collections import deque
from copy import copy
from itertools import count
import theano
from theano import config
from theano.gof import utils
from six import string_types... | Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/gof/graph.py | Python | agpl-3.0 | 44,512 | [
"VisIt"
] | aa00445eb76ee088a7c9a86b63f583b0a8a132f642b2f921b62c21782afbc4be |
'''
Created on Jul 25, 2012
@author: andris
'''
import warnings
import numpy as np
import scipy.optimize
from scipy.linalg import svd
from .easylsq import nlsq_fit
from .errorvalue import ErrorValue
__all__ = ['findpeak', 'findpeak_single', 'findpeak_multi']
def findpeak(x, y, dy=None, position=None, hwhm=None, b... | awacha/sastool | sastool/misc/basicfit.py | Python | bsd-3-clause | 12,276 | [
"Gaussian"
] | bb060b7291e7c3b07dccc61596b9af591be35262913a895c72d3b4135f4c0ac6 |
import os
import string
import random
from behave import when, given, then
from selenium.webdriver.support.ui import Select
ADMIN_USER = os.environ.get('ADMIN_USER') or 'admin'
ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD') or 'admin'
@when(u'I visit the admin login page')
def step_impl(context):
context.bro... | libretees/libreshop | libreshop/tests/steps/admin.py | Python | gpl-3.0 | 3,716 | [
"VisIt"
] | 8c40c81280b42cc0d9b14005d4647171e515fb16ae0bbfcc63ddcc2329bfb78e |
"""
Tests for dataset_utils.
"""
import gzip
import shutil
import tempfile
import unittest
from rdkit import Chem
from vs_utils.utils.dataset_utils import MoleculeDatabase
class TestMoleculeDatabase(unittest.TestCase):
"""
Tests for MoleculeDatabase.
"""
def setUp(self):
"""
Set up t... | rbharath/vs-utils | vs_utils/utils/tests/test_dataset_utils.py | Python | gpl-3.0 | 4,132 | [
"RDKit"
] | 4c76a273f40a34c519eb7d048341a7c65ee88fc71dfe9c0984c5964d08b581ad |
# Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... | deepmind/alphafold | setup.py | Python | apache-2.0 | 1,999 | [
"Biopython"
] | 2e12545856636bb5e887b98ccabaf370ef4360926e073eee1788898a061c3e5f |
# -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | stitchfix/pybossa | test/test_view/test_project_passwords.py | Python | agpl-3.0 | 12,235 | [
"VisIt"
] | 0e0dc4792ab79d6c9f89be01c611878a1a72aecc51411f0035641c9af784976d |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Module implementing an XYZ file object class.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "Apr 17, 2012"... | Dioptas/pymatgen | pymatgen/io/xyzio.py | Python | mit | 2,657 | [
"pymatgen"
] | 6c0d336b30b4583e1ab059664369d20d8696549561eea7841f8c4914d34a0a82 |
########################################################################
# $HeadURL $
# File: RegisterOperation.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/19 13:55:14
########################################################################
""" :mod: RegisterFile
==================
.. module: R... | avedaee/DIRAC | DataManagementSystem/Agent/RequestOperations/RegisterFile.py | Python | gpl-3.0 | 3,529 | [
"DIRAC"
] | 4e83541ab0d691cd7b8c3a56a5ec245d85a78c1f96151694d375029b71c87bfe |
# Copyright 2014 Roberto Brian Sarrionandia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | sarrionandia/tournatrack | add_judge_record.py | Python | apache-2.0 | 2,870 | [
"Brian"
] | 560d2c51fc86d2b46f5054940ccd01048f1cc341d8e9c88715b90c06230fc398 |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | yipenggao/moose | python/chigger/tests/line/empty.py | Python | lgpl-2.1 | 1,335 | [
"MOOSE"
] | 399f2d70b5a0955f55ef769bfd2a72da440eed6c8713882a5bb29348a501d4fc |
def save_3D_stack(filenameout,var,varname,lat,lon,miss_val,time_it):
import numpy as np
from scipy.io.netcdf import netcdf_file as NetCDFFile
"""
savenetcdf_3D(filenameout,var,varname,lat,lon,miss_val,time_it)
save a 3D (time,lat,lon) numpy array into netcdf
arguments:
filenameout: string
... | nicolasfauchereau/ICU | lib/netcdf/save_3D_stack.py | Python | bsd-3-clause | 1,452 | [
"NetCDF"
] | 4453f134e457a1908c2dae76d03b624d99255011acc9f69b8e60ddde7a8db733 |
"""Scraper for the Rhode Island Supreme Court
CourtID: ri
Court Short Name: R.I.
Author: Brian W. Carver
Date created: 2013-08-10
"""
from datetime import datetime
from juriscraper.AbstractSite import InsanityException
from juriscraper.OpinionSite import OpinionSite
import re
class Site(OpinionSite):
def __init_... | Andr3iC/juriscraper | opinions/united_states/state/ri_p.py | Python | bsd-2-clause | 6,739 | [
"Brian"
] | abda522a627dbf159d26ae3883f1120792cee67c425a41a9c2daefe5f87bedf7 |
import numpy as np
from .basic import Powerlaw
__all__ = ['Fsphere', 'Guinier', 'Guinier_thickness', 'Guinier_crosssection',
'GuinierPorod', 'PorodGuinier', 'PorodGuinierPorod', 'GuinierPorodMulti', 'PorodGuinierMulti',
'DampedPowerlaw', 'LogNormSpheres', 'GaussSpheres', 'PowerlawPlusConstant', ... | awacha/sastool | sastool/fitting/fitfunctions/sasbasic.py | Python | bsd-3-clause | 16,070 | [
"Gaussian"
] | 92f3998f37a868ac8c7d8d26483d925a58901516061a71057a57b7cbed0e940f |
#!/usr/bin/python2.7
import numpy as np
from abstractclassifier import AbstractClassifier
class ToyGaussianNB(AbstractClassifier):
"""
Toy Gaussian Naive Bayes (GaussianNB)
Algorithm
---------
- Training
- Compute priors based on prevalence of classes in train_data
- Compute mean a... | scholz/toyclassifiers | toygaussiannb.py | Python | mit | 5,702 | [
"Gaussian"
] | 30827503adfa9b46527c11eb1c2fd994e23154ded5089c76c8bdc64c8cbe5455 |
from ase.test import NotAvailable
from ase.calculators.mopac import Mopac
if Mopac().get_command() is None:
raise NotAvailable('MOPAC required')
from ase.tasks.main import run
atoms, task = run("mopac molecule O2 O")
atoms, task = run('mopac molecule O2 O -s')
ae = 2 * task.data['O']['energy'] - task.data['O2']... | suttond/MODOI | ase/test/mopac/mopac_cmdline.py | Python | lgpl-3.0 | 372 | [
"ASE",
"MOPAC"
] | 6dbf1360725695d0908deda1733433fb1182429e098911d8ed3d22f9f0a84bdc |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#from xml.dom import minidom
# -> elementTree ?
import pprint as pp
#from utils import sanitize
class XmlPise():
"""
Class for xml objects
There is two possibilities :
. you want to parse a pise xml wrapper
. you want to create a xml tool for galaxy ... | remyd1/XMLparser-wrapper | gaclass/pise_parser_class.py | Python | apache-2.0 | 14,601 | [
"Galaxy"
] | 73a1731958b51edd56c8300b0f5a81a1c93ade2a38171c024a6db9f42d8c541e |
from util import utils
import sys,os
import tables
import numpy as np
import matplotlib.pyplot as plt
from util.ObsFile import ObsFile
from util import MKIDStd
from headers import pipelineFlags
from util.utils import gaussianConvolution
import matplotlib
from mpltools import style
from scipy import interpolate
from sci... | bmazin/ARCONS-pipeline | examples/Pal2012_landoltPhot/gaussConvolutionTest.py | Python | gpl-2.0 | 7,965 | [
"Gaussian"
] | 85a3c516517f07938c9b54d4b2b0a6c7dc4d515826612c46f48cbb358669e701 |
#!/usr/bin/env python
# Copyright 2014-2019 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/geomopt/berny_solver.py | Python | apache-2.0 | 9,010 | [
"PySCF"
] | 198994f24ac558ee347e09d12652a6007568fb0dd9b16670b2fb016023eb8ec0 |
# -*- coding: utf-8 -*-
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2014 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General ... | upibhalla/moose-core | tests/python/test_Xenz1.py | Python | gpl-3.0 | 3,972 | [
"MOOSE"
] | 830164c5569aa64d97fd7e3ec4eeb5d90d0cd412243255f9c0e80391571a683a |
import tensorflow as tf
import LSPGlobals
from LSPGlobals import FLAGS
import re
def _activation_summary(x):
"""Helper to create summaries for activations.
Creates a summary that provides a histogram of activations.
Creates a summary that measure the sparsity of activations.
Args:
x: T... | samitok/deeppose | Codes/MiniVersion/LSPModels.py | Python | gpl-3.0 | 10,583 | [
"Gaussian"
] | a3cab67c8e654ed04d8f8566d693eb39c64b2bb316737d55bc7354b75f9c348a |
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "f 10 0.033, s, f 20 0.033, s, f 30 0.033, s, f 30 0.033, s, q"
tags = "particles, Flower"
import pyglet
import summa
from summa.director import ... | shackra/thomas-aquinas | tests/test_particle_flower.py | Python | bsd-3-clause | 911 | [
"Galaxy"
] | ffd28df600efab2ec70df4a5e37aaa6e47ba083c343f1b12145fbcb75af0116e |
#!/usr/bin/env python3
## INFO ########################################################################
## ##
## formbuilder ##
## =========== ... | petervaro/formbuilder | build.py | Python | gpl-3.0 | 3,552 | [
"VisIt"
] | c36e2d3d91f42b255a87c6c8818ea7026a126f415189d91d6c280767383e2813 |
"""
aRMSD plot functions
(c) 2017 by Arne Wagner
"""
# Authors: Arne Wagner
# License: MIT
from __future__ import absolute_import, division, print_function
from builtins import range
import sys
try:
import numpy as np
except ImportError:
pass
try:
from vtk import (vtk... | armsd/aRMSD | armsd/aplot.py | Python | mit | 56,945 | [
"VTK"
] | 00df20ce71a3325c5d51a52cbd2fb03b5f93f418877e99eae0df1efd528ab4cb |
# This file is part of PyEMMA.
#
# Copyright (c) 2014-2017 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# PyEMMA 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 versi... | fabian-paul/PyEMMA | pyemma/_base/serialization/pickle_extensions.py | Python | lgpl-3.0 | 5,822 | [
"MDTraj"
] | 2d051f1d1e07c54b2ccec011b761b257e2b6526048c7f9af363ceb4d0ff79ae4 |
import os
import platform
import sys
import unittest
from glob import glob
import numpy as np
class NotAvailable(Exception):
pass
# Custom test case/suite for embedding unittests in the test scripts
if sys.version_info < (2, 4, 0, 'final', 0):
class CustomTestCase(unittest.TestCase):
assertTrue =... | conwayje/ase-python | ase/test/__init__.py | Python | gpl-2.0 | 5,850 | [
"ASE"
] | 538572d6f3c1a54e95c75c1426fcdb6511838538094d079d7d778659a9aae5bf |
# https://en.wikipedia.org/wiki/Hill_climbing
import math
class SearchProblem:
"""
An interface to define search problems.
The interface will be illustrated using the example of mathematical function.
"""
def __init__(self, x: int, y: int, step_size: int, function_to_optimize):
"""
... | TheAlgorithms/Python | searches/hill_climbing.py | Python | mit | 6,778 | [
"VisIt"
] | 582861be673b82346830417d37a42768526be4fd5bb908cdc9576b86a388ef39 |
#
# GMSK modulation and demodulation.
#
#
# Copyright 2005,2006,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 v... | tyc85/nwsdr-3.6.3-dsc | dsc-gmsk-rs/gmsk_cats.py | Python | gpl-3.0 | 11,364 | [
"Gaussian"
] | 4ba7c683737196af92b79f77f687860211f4803dd46f9d674e8dc2c5fc5f1878 |
"""
merged implementation of the cache provider
the name cache was not chosen to ensure pluggy automatically
ignores the external pytest-cache
"""
from __future__ import absolute_import, division, print_function
from collections import OrderedDict
import py
import six
import pytest
import json
import os
from os.pat... | UK992/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/src/_pytest/cacheprovider.py | Python | mpl-2.0 | 12,002 | [
"VisIt"
] | 0ed664baa5c009c803d8551708453e29158e291877e67b076a3b61bd60cb29c8 |
""" DataIntegrityDB class is a front-end to the Data Integrity Database.
"""
from DIRAC import gConfig, gLogger, S_OK
from DIRAC.Core.Base.DB import DB
__RCSID__ = "$Id$"
#############################################################################
class DataIntegrityDB( DB ):
""" Only 1 table, that can be created... | chaen/DIRAC | DataManagementSystem/DB/DataIntegrityDB.py | Python | gpl-3.0 | 7,264 | [
"DIRAC"
] | 64f5eba2ed180df3274adc492c81e4e9d86c7cdc2daf2cf3072a5083b4cacdb8 |
#!/usr/bin/python
# -*- coding: utf-8
# Copyright (C) 2010 - 2012, A. Murat Eren
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any lat... | jooolia/oligotyping | Oligotyping/lib/oligotyping.py | Python | gpl-2.0 | 70,980 | [
"BLAST"
] | 826885380960857d6b1c4d900144c2c4557c9a38fe514476cf2f7306b5e7da81 |
# Standard library
import cPickle
import gzip
import os
import numpy as np
if os.path.exists("/home/ggdhines"):
base_directory = "/home/ggdhines"
else:
base_directory = "/home/greg"
# Third-party libraries
def load_data():
"""Return the MNIST data as a tuple containing the training data,
the validat... | zooniverse/aggregation | experimental/algorithms/old_weather/neural_network.py | Python | apache-2.0 | 9,944 | [
"Gaussian",
"NEURON"
] | 4b006eea66135d5031f4e1474c690dea5ae0c9b0484462d56f02e4dd25cfa15d |
from __future__ import print_function
from __future__ import unicode_literals
from rtmbot.core import Plugin
import json
import re
import requests
import time
import pyrebase
import os
import uuid
from secrets import secrets
firebaseConfig = secrets["firebase"]
fire = pyrebase.initialize_app(firebaseConfig)
class Bl... | garr741/mr_meeseeks | rtmbot/plugins/blast.py | Python | mit | 2,303 | [
"BLAST"
] | e8141fa0c1951d310aa1f1ffc017a07ca56ea1ec4f7932702ed3c8a54adda2e8 |
# Copyright 2011 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 a... | dbarobin/google-mysql-tools | parser_lib/validator.py | Python | apache-2.0 | 24,904 | [
"VisIt"
] | fb913464c20eda5f68cc4636e276c845b3e0890e1c459192622495d1e51613a6 |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
# Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk>
# Copyright (C) 2007-2009 Stephane Charet... | sam-m888/gramps | gramps/plugins/webreport/addressbooklist.py | Python | gpl-2.0 | 6,430 | [
"Brian"
] | 42c57a3ca86f51dbcb28e86ab7b18fb8f4dedb5ce8fac49eb4860086e4594d8f |
# $Id$
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import vtk
class plyRDR(FilenameViewModuleMixin, ModuleBase):
def __init__(self, module_manager):
# call parent constructor
ModuleBase.__init__(self, module_manager)
self._re... | nagyistoce/devide | modules/readers/plyRDR.py | Python | bsd-3-clause | 1,907 | [
"VTK"
] | 9a3f1bb82fbf8333febc01b592d5bdf2d8146bda0bf8aea5d485f8a1bae32ac1 |
class Solution:
# @param node, a undirected graph node
# @return a undirected graph node
# @ edge, vertex = set(), dict
# @ DFS queue,edge, handle= queue.append(node),empty
# @ while not len(queue) :
# @ cur = queue.pop(0)
# vertext.setDefault(cur, UndirectedGraphNode(cur.val))... | yelu/leetcode | CloneGraph.py | Python | gpl-2.0 | 1,529 | [
"VisIt"
] | 05ef961bc742ded5518357caf7769cabe7b25a404896efa5a63d886f1273c855 |
# Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.SearchIO parser for BLAT output formats.
This module adds support for parsing BLAT... | zjuchenyuan/BioWeb | Lib/Bio/SearchIO/BlatIO.py | Python | mit | 30,350 | [
"BLAST",
"Biopython"
] | 06b32f7f9e4c8897f4fe447b8a96ce82c38d7e9c461e0fbe8e59027325267604 |
"""
DIRAC - Distributed Infrastructure with Remote Agent Control
The distributed data production and analysis system of LHCb and other VOs.
DIRAC is a software framework for distributed computing which
allows to integrate various computing resources in a single
system. At the same time it integrates al... | hgiemza/DIRAC | __init__.py | Python | gpl-3.0 | 5,924 | [
"DIRAC"
] | 53ddc3dfbd709531d03435492209199dedcf737afd23e4eab07678847a7a67fe |
# Copyright 2017 Bateared Collie
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
... | batearedcollie/seisTK | stk/tracePanelDataUtility.py | Python | bsd-3-clause | 4,664 | [
"VTK"
] | e7e9a9dec135b5969930b9ae28bc9501d67a6e755941d721c4f54bffb30c76ef |
#!/usr/bin/env python
""" load VisitAttribute into OSDF using info from data file """
import os
import re
from cutlass.VisitAttribute import VisitAttribute
import settings
from cutlass_utils import \
load_data, get_parent_node_id, list_tags, format_query, \
write_csv_headers, values_to_node_dict, write_out_csv, ... | JAX-GM/osdf_submit | nodes/visitattribute.py | Python | gpl-3.0 | 4,088 | [
"VisIt"
] | 6b2e3010d068569abf8079bb60610cde22e60a0bc19c5047baef5d91ad30ac96 |
from time import time
import sys
import numpy as np
from gpaw import parsize_domain, parsize_bands
from gpaw.band_descriptor import BandDescriptor
from gpaw.grid_descriptor import GridDescriptor
from gpaw.kohnsham_layouts import BandLayouts
from gpaw.mpi import world, distribute_cpus
from gpaw.utilities import gcd
from... | robwarm/gpaw-symm | gpaw/test/parallel/overlap.py | Python | gpl-3.0 | 3,545 | [
"GPAW"
] | 35a618670bba0c616f951423fed56541128275d25e7a140eb881e0a2602e87b5 |
import types
import os
import shutil
import datetime
from tornado import web, gen
from RESTDIRAC.RESTSystem.Base.RESTHandler import WErr, WOK, TmpDir, RESTHandler
from DIRAC.AccountingSystem.Client.ReportsClient import ReportsClient
class JobHistoryHandler( RESTHandler ):
ROUTE = "/jobs/history"
@web.asynchron... | DIRACGrid/RESTDIRAC | RESTSystem/API/Job/JobHistoryHandler.py | Python | gpl-3.0 | 1,094 | [
"DIRAC"
] | ec4ff117f0149f2f216b534e4eaf49746ae6796cd583abc15cfe3dc999a0277e |
##
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | boegel/easybuild-easyblocks | easybuild/easyblocks/c/charmm.py | Python | gpl-2.0 | 6,357 | [
"CHARMM",
"GAMESS",
"Gaussian",
"Q-Chem"
] | 10842cb9b1405f376bdf6f5bcb9aa0a0f21971cf0b17c38f7038246a63d6e06b |
""" This is a test of the chain
FileCatalogClient -> FileCatalogHandler -> FileCatalogDB
It supposes that the DB is present, and that the service is running
"""
# pylint: disable=invalid-name,wrong-import-position
import csv
import filecmp
import os
import unittest
import tempfile
import sys
import DIRAC
DI... | DIRACGrid/DIRAC | tests/Integration/DataManagementSystem/Test_Client_DFC.py | Python | gpl-3.0 | 39,932 | [
"DIRAC"
] | b5520c5ad7b81cd8814e5191d6c512fd32d8701fa53fc1a351a052ac38acdae0 |
from __future__ import annotations
from math import exp
import pytest
from dials.algorithms.scaling.model.components.smooth_scale_components import (
GaussianSmoother2D,
GaussianSmoother3D,
)
from dials.array_family import flex
def test_2DGaussianSmoother():
"""Test the behaviour of the 2D Gaussian Smo... | dials/dials | tests/algorithms/scaling/test_gaussian_smoother.py | Python | bsd-3-clause | 3,710 | [
"Gaussian"
] | b497e5b2e366e2020ec63f7ce18c66da531f65385b97018a255d955424f7ca7f |
#!/usr/bin/env python
#python 2.7.5 requires biopython
#crossClustCount.py
#Version 1. Adam Taranto, April 2015
#Contact, Adam Taranto, adam.taranto@anu.edu.au
#Take two transcriptomes and a Corset cluster map.
#Determine number of member transcripts in each cluster that belong to each of the input transcriptomes.
im... | Adamtaranto/Corset-tools | crossClustCount.py | Python | gpl-2.0 | 6,705 | [
"Biopython"
] | 1f0c705879f90a114832a7bf4c38aa157e8de4007442c315d1fdff5194ba963a |
__all__ = ['threshold_adaptive',
'threshold_otsu',
'threshold_yen',
'threshold_isodata',
'threshold_li', ]
import numpy as np
from scipy import ndimage as ndi
from ..exposure import histogram
from .._shared.utils import assert_nD
def threshold_adaptive(image, block_size, m... | Britefury/scikit-image | skimage/filters/thresholding.py | Python | bsd-3-clause | 13,777 | [
"Gaussian"
] | 8030c374bcb09f085974376ead6b2c6623ee034d747799d3f19a60d9ee482824 |
from libraries.mailer import send_email
from itsdangerous import URLSafeSerializer, URLSafeTimedSerializer
from configuration import config
secret_key = config['app']['SECRET_KEY']
email_verify_salt = config['app']['EMAIL_VERIFY_SALT']
reset_password_salt = config['app']['RESET_PASSWORD_SALT']
change_email_salt = confi... | evrom/genitag | libraries/messages.py | Python | gpl-2.0 | 1,849 | [
"VisIt"
] | e33d54183248a625ff72cef75dce20a45deae383d1ce8bb1572a9c1bb888df80 |
from __future__ import division, absolute_import, print_function
import warnings
import numpy as np
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
from numpy import ra... | ryfeus/lambda-packs | Opencv_pil/source36/numpy/random/tests/test_random.py | Python | mit | 65,997 | [
"Gaussian"
] | ab4e211ed1db0e74aa319b65e43c5acdf68a0fa4248dfe17a3aa48c4696e238f |
import pytest
import sys
__PYTEST_MARK__ = 'internal' # mark all tests in this module with this label (see ./conftest.py)
@pytest.mark.tryfirst
def test_lazy_imports():
import moldesign
for mod in 'simtk simtk.openmm pyscf pdbfixer scipy':
assert mod not in sys.modules
def test_package_install_c... | Autodesk/molecular-design-toolkit | moldesign/_tests/test_imports.py | Python | apache-2.0 | 646 | [
"OpenMM",
"PySCF"
] | 547f5907eb34c0c45512d68350c244558e087b9f41b2b6b66a5c2fed561efe3a |
# Copyright (C)
# All rights reserved.
# See LICENSE.txt for details.
# Author: nwright, Brian Maranville
# edited: Christopher Metting
#Starting Date:7/14/2009
from numpy import array, arange, indices, zeros, reshape, float, sqrt, int
from numpy import float64, fromfile, product, ma, isinf, isnan,inf,nan
DEBUG = Tr... | reflectometry/osrefl | osrefl/model/omf_loader.py | Python | bsd-3-clause | 15,526 | [
"Brian"
] | 9ed523581da91698cd0b5b6fd545cc7656c9ff29d16afee15844a2c94a7be56a |
###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to
# make it easier to submit large numbers of jobs on supercomputers. It
# provides a python interface to physical input, ... | pylada/pylada-light | tests/process/test_iterator.py | Python | gpl-3.0 | 3,879 | [
"CRYSTAL",
"VASP"
] | 0fa508c70c90d3cd16a3225a9afb7852aff13d456177f69ad864a015098a8f7a |
"""
Sample input files for predicting thermal conductivity of porous crystals using Lammps
"""
import os
from thermof.parameters import k_parameters
sample_dir = os.path.abspath(os.path.dirname(__file__))
# Lammps input file with thermal flux measured in single direction
single_inp_path = os.path.join(sample_dir, 'in... | kbsezginel/tee_mof | thermof/sample/__init__.py | Python | mit | 3,685 | [
"LAMMPS"
] | 90fd195dd4f562f7cf20ffaf80f189205b19e7174ffe41115f9cea99c9cad745 |
import os
import numpy as np
import glob
import yaml
import errno
from netCDF4 import Dataset
def load_netcdf_definition(json):
'''
load json file and return a dictionary of the netCDF file definition
'''
with open(json, 'r') as stream:
return yaml.load(stream)
def define_inst_mod_ver(filepath):
'''
e... | eWUDAPT/eWUDAPT-analysis | eWUDAPT_analysis/utils.py | Python | apache-2.0 | 3,130 | [
"NetCDF"
] | 85438f42f364a38f17ad3fc0f181eacbea12bb2f0efc35129b0471d332b3ac15 |
"""
Courseware views functions
"""
import logging
import urllib
import json
import cgi
from datetime import datetime
from collections import defaultdict
from django.utils import translation
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
from django.conf import setti... | sameetb-cuelogic/edx-platform-test | lms/djangoapps/courseware/views.py | Python | agpl-3.0 | 54,260 | [
"VisIt"
] | 294a3fc55130a508347cbbfa32b2ebace90324f9c39dcbd4db71895f75c604a8 |
import numpy as np
import util
from datetime import datetime
from scipy.stats import norm
import better_exceptions
from scipy.stats import multivariate_normal as mvn
class NaiveBayers(object):
def __init__(self):
# Gaussian deviation
self.gaussians = dict()
# Class priors
self.pri... | adexin/Python-Machine-Learning-Samples | Naive_bayes_mnist/nb.py | Python | mit | 2,416 | [
"Gaussian"
] | 97cc643de074afd58730d3febdedac4cf4d5cc3c7c75122e1cb4d984db7816ea |
from __future__ import absolute_import
import copy
import datetime
import functools
import logging
import random
import tempfile
from collections import namedtuple
from typing import (Any, Callable, Dict, Generator, Iterable, List,
Mapping, MutableMapping, MutableSequence,
Optio... | dleehr/cwltool | cwltool/workflow.py | Python | apache-2.0 | 43,519 | [
"VisIt"
] | dfde59312f748d577b7f16f6fc3a5c3c6bcd8fedc7b382136bd897795749a210 |
##############################################################################
# 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... | TheTimmy/spack | var/spack/repos/builtin/packages/abinit/package.py | Python | lgpl-2.1 | 7,165 | [
"ABINIT",
"NetCDF"
] | 69218761c6f12aeede4ff6c2610253b0a1ba24206ccecc0a4c2fe7fd46adf9e1 |
#!/usr/bin/env python3
# [1] https://aip.scitation.org/doi/pdf/10.1063/1.1515483
import itertools as it
import numpy as np
from pysisyphus.helpers import geom_from_library
from pysisyphus.calculators.XTB import XTB
from pysisyphus.intcoords.derivatives import dq_b, d2q_b, dq_a, d2q_a, dq_d, d2q_d
def test_wilson(... | eljost/pysisyphus | tests_staging/test_intcoords/test_intcoords.py | Python | gpl-3.0 | 3,050 | [
"xTB"
] | 2cccb7f2e5c5ae2530bd70f12842886dcd548de0390e599cf7375c83c89dd909 |
#!/usr/bin/env python2
# encoding: utf-8
import sys, re, collections
from pymol import cmd
from pymol.wizard import Wizard
from pprint import pprint
amino_acids = {
'ALA': 'A',
'CYS': 'C',
'ASP': 'D',
'GLU': 'E',
'GLY': 'G',
'HIS': 'H',
'ILE': 'I',
'LYS'... | kylebarlow/wt_vs_mut | wt_vs_mut.py | Python | gpl-2.0 | 31,890 | [
"PyMOL"
] | 16f73b0521a69af44b43899b971fccb3fea95e0e8c4462b6c3bd34be8662e78d |
import unittest
import numpy as np
from gpflow import settings as _settings
from gpflow import session_manager as _session_manager
custom_config = _settings.get_settings()
custom_config.numerics.jitter_level = 1e-18
with _settings.temp_settings(custom_config),\
_session_manager.get_session().as_default():
... | ICL-SML/Doubly-Stochastic-DGP | tests/test_dgp.py | Python | apache-2.0 | 7,587 | [
"Gaussian"
] | 2267ee769a3ed008557920d4401366b42c861d4112ca7aec95846412597d44ff |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Scour
#
# Copyright 2010 Jeff Schiller
# Copyright 2010 Louis Simard
#
# This file is part of Scour, http://www.codedread.com/scour/
#
# This library is free software; you can redistribute it and/or modify
# it either under the terms of the Apache License, Versio... | yaii/yai | share/extensions/scour.py | Python | gpl-2.0 | 110,803 | [
"VisIt"
] | 7b2007954e5752541043ba1d7dbe66bc7f533a2323575223e056a6aacc9594c6 |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
# Copyright 2010-2013 The Orca Team.
#
# 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 you... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/scripts/apps/soffice/script.py | Python | gpl-3.0 | 37,696 | [
"ORCA"
] | 758f53a1974758797ae8389bdd1f5cc34138b3829e03ee40df7e73e45329fd84 |
# -*- coding: utf-8 -*-
# Author: Braden Czapla (2019)
# Last modified: 2019-04-29
# Original data: Kaiser et al. 1962, https://doi.org/10.1103/PhysRev.127.1950
from __future__ import absolute_import, division, print_function
import numpy as np
import matplotlib.pyplot as plt
#########################################... | polyanskiy/refractiveindex.info-scripts | scripts/Kaiser 1962 - CaF2.py | Python | gpl-3.0 | 3,300 | [
"CRYSTAL"
] | 37d1c11ae479e27381d10b53a413c82133a4309225642807ced812198f1e6780 |
from __future__ import division, print_function
import numpy as np
from dipy.denoise.nlmeans_block import nlmeans_block
def non_local_means(arr, sigma, mask=None, patch_radius=1, block_radius=5,
rician=True):
r""" Non-local means for denoising 3D and 4D images, using
blockwise averagi... | nilgoyyou/dipy | dipy/denoise/non_local_means.py | Python | bsd-3-clause | 2,572 | [
"Gaussian"
] | f093b6e9b9cc598f36df83d705c6ef0a0149478186410eceafd3fa0e13816f92 |
#!/usr/bin/env python
from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4 import uic
from vtk import *
import sys
# Create a PyQt window using a .ui file generated with Qt Designer ...
application = QtGui.QApplication(sys.argv)
window = uic.loadUi("gui.ui")
vertex_slider = window.findChild(QtGui.QS... | hlzz/dotfiles | graphics/VTK-7.0.0/Examples/Infovis/Python/gui.py | Python | bsd-3-clause | 1,655 | [
"VTK"
] | 42b3cb29807805d9103b6a455934bcd316c52b41f8160d52b02f3a184adf77c4 |
"""
.. class:: EmergeStellarMass
.. moduleauthor:: Johan Comparat <johan.comparat__at__gmail.com>
The class StellarMass implements the Moster et al. 2017 EMERGE model.
Imports
-------
import numpy as n
"""
#from scipy.stats import lognorm
#from scipy.stats import norm
import numpy as n
class StellarMass() :
""... | JohanComparat/pyEmerge | python/EmergeStellarMass.py | Python | unlicense | 4,433 | [
"Galaxy"
] | c128b086e13fa00ff90c03d77c8652ab0f6dd4877fc70b9909cc5b9eac6f4c7c |
""" Query PubMed for results from several journals, and save to file.
The resulting directory can then be passed to the Database instance for
extraction, as in the create_db_and_add_articles example.
NOTE: selenium must be installed and working properly for this to work.
Code has only been tested with the Chrome driv... | neuroelectro/ACE | run_scripts/get_articles_from_pubmed.py | Python | mit | 2,488 | [
"NEURON"
] | 199dc509e3243c32aba5d393ab10171117852c004e1e3a9b185e7df9357ea7ec |
#!/usr/bin/env python
"""
docstring goes here
.. module:: connection_generator.py
:platform: Unix, Windows
:synopsis:
.. moduleauthor:: Mikael Djurfeldt <mikael.djurfeldt@incf.org>
.. moduleauthor:: Dragan Nikolic <dnikolic@incf.org>
:copyright: Copyright 2010-2017 by the NineML Python team, see AUTHORS.
:lice... | INCF/lib9ML | nineml/abstraction/connectionrule/base.py | Python | bsd-3-clause | 6,420 | [
"VisIt"
] | e765ad1e6f600d5863e6fcf58a4d5c7eebb0ffeacc710e83e439c844e598dbeb |
# Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | googleinterns/local_global_ts_representation | gl_rep/data_loaders.py | Python | apache-2.0 | 30,923 | [
"Gaussian"
] | 7c34f8c3b04f2225396916573ccc2105d23e255144735937ed63f01842c2b74f |
import numpy as np
import scipy.ndimage as ndi
from . import _marching_cubes_cy
def marching_cubes(volume, level, spacing=(1., 1., 1.),
gradient_direction='descent'):
"""
Marching cubes algorithm to find iso-valued surfaces in 3d volumetric data
Parameters
----------
volume : (... | jwiggins/scikit-image | skimage/measure/_marching_cubes.py | Python | bsd-3-clause | 14,781 | [
"Mayavi"
] | e9ac2bcc27dc7d7529d5e475231844cb6aa5a081219925ca2487157301aef281 |
"""Tests for tvtk_base.py. These only test the basic functionality of
the code in tvtk_base. More tests for TVTK objects should be in
test_tvtk.py.
"""
# Author: Prabhu Ramachandran
# Copyright (c) 2004, Enthought, Inc.
# License: BSD Style.
import unittest
import cPickle
import weakref
import vtk
import gc
from t... | liulion/mayavi | tvtk/tests/test_tvtk_base.py | Python | bsd-3-clause | 10,231 | [
"VTK"
] | e9c46a3351272e11be4ee20fd8d867d8cbe23302860ea16c48bfd1468d9b38a2 |
"""
Copyright 2014-2016 University of Illinois
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | opena11y/fae2 | fae2/populate/pop_institutional_profiles.py | Python | apache-2.0 | 6,329 | [
"Brian"
] | 0a98c059400d2da207d0a2a84c6bffb2c6b206a00852eac3080962a1d9c576b1 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines utility classes and functions.
"""
import os
import tempfile
from shutil import which
from subprocess import PIPE, Popen
import numpy as np
from monty.tempfile import ScratchDir
from pymatgen.core.op... | materialsproject/pymatgen | pymatgen/io/lammps/utils.py | Python | mit | 18,550 | [
"LAMMPS",
"Pybel",
"pymatgen"
] | 336e0a5417276fb5c6e1ec2a48b897e1a765f6dcce37400115d8663e2bc69e17 |
from octopus.plugins.plugin import OctopusPlugin
class InstructionLinker(OctopusPlugin):
def __init__(self, executor):
super().__init__(executor)
self._pluginname = "instructionlinker.jar"
self._classname = "bjoern.plugins.instructionlinker.InstructionLinkerPlugin"
def __setattr__(sel... | octopus-platform/bjoern | python/bjoern-tools/bjoern/plugins/instruction_linker.py | Python | gpl-3.0 | 470 | [
"Octopus"
] | a0ff487892129000951e4fd3db6d8338f0918f584de18d09aa9b3ed4855ab006 |
import logging
import os
import zlib
from collections import OrderedDict
from urllib.error import HTTPError
from urllib.request import urlopen
from django.conf import settings
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage
from django.utils.translation import nge... | reviewboard/reviewboard | reviewboard/admin/security_checks.py | Python | mit | 16,158 | [
"VisIt"
] | 1a949455a079480892e869dead365e883fd63b0fc7ae9a24c1a689768f3a2a9b |
#!/usr/bin/env python
#
"""testing_grids_with_dask script.
Test the performance of modelgrids.nemo_grid objects.
"""
# from http://stackoverflow.com/questions/5478351/python-time-measure-function
#- Modules
#
import time
import test_modelgrids as mgd
from contextlib import contextmanager
from netCDF4 import Dataset
i... | lesommer/oocgcm | _test/testing_grids_with_dask.py | Python | apache-2.0 | 4,337 | [
"NetCDF"
] | 0e3ecb20579f61dae8f9d8b75b8825d105e56827e1e7215fd760dd839bdcf315 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.