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 |
|---|---|---|---|---|---|---|---|
import os
from cftime import DatetimeNoLeap
from aospy import Proj, Model, Run, Var, Region
from aospy.data_loader import NestedDictDataLoader
from aospy.internal_names import LAND_MASK_STR, LON_STR
ROOT_PATH = os.path.dirname(__file__)
def total_precipitation(convection_rain, condensation_rain):
return conve... | spencerkclark/aospy | aospy/test/data/objects/examples.py | Python | apache-2.0 | 3,242 | [
"NetCDF"
] | 4cb86773f32e7bc292540b45bed4a0c1dfd9e7aa21720085617fd6a2e1cb0dda |
# Orca
#
# Copyright (C) 2010 Joanmarie Diggs
# Copyright (C) 2011-2012 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; eith... | pvagner/orca | src/orca/scripts/toolkits/WebKitGtk/script_utilities.py | Python | lgpl-2.1 | 9,978 | [
"ORCA"
] | 559fcb277ab8aeab8d5141165568500a3e351d74ed9f4092388c9d259fee0067 |
#!/usr/bin/env python
from ._version import __version__
import os, argparse
import numpy as np
from . import saxstats as saxs
def store_parameters_as_string(sasrec):
param_str = ("Parameter Values:\n"
"Dmax = {dmax:.5e}\n"
"alpha = {alpha:.5e}\n"
"Rg = {rg:.5e} +- {rgerr:.5e}\n"
"I(0) = {I0:.... | tdgrant1/denss | saxstats/denssopts.py | Python | gpl-3.0 | 20,844 | [
"Gaussian"
] | 3c442870334fd9acde20dbb62fdc701255719932ebebe9f906fb85cbda229003 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FlatValue.published'
db.add_column(u'profiles_flatvalue', 'published', self.gf('django.db.... | ProvidencePlan/Profiles | communityprofiles/profiles/oldmigrations/0086_auto__add_field_flatvalue_published.py | Python | mit | 25,920 | [
"MOE"
] | 94a1d67e87eb9ba94f22e8f9a55f23490298f4dec318aee2f697a77e7e8701ad |
# Copyright 2018 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, ... | brain-research/nngp | run_experiments.py | Python | apache-2.0 | 7,809 | [
"Gaussian"
] | b7f4004a328eec0ab255946b0b4425dc5999c602d1209595cf450743875eefe7 |
import os
import sys
import pkgutil
def LoadFolder(inputFolderPath):
infilePathList=[]
try:
for root, dirs, files in os.walk(inputFolderPath):
for file in files:
infilePathList.append(inputFolderPath+file)
except:
print('Error Code: 0015')
return infilePathLi... | liutairan/eMolFrag | Old versions/eMolFrag_2016_12_28_01/loader.py | Python | gpl-3.0 | 3,639 | [
"RDKit"
] | 5660579bb8a82f9605952cbf197f6f775e9f234cb7f0eab33bb3d0a970732b03 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visit', '0048_auto_20150809_2319'),
]
operations = [
migrations.RenameField(
model_name='visit',
old... | koebbe/homeworks | visit/migrations/0049_auto_20150810_0019.py | Python | mit | 396 | [
"VisIt"
] | ba4cac64e547552979177a809f421ba3c8b597bd7d75916aca06470c1841a40a |
## Automatically adapted for scipy Oct 21, 2005 by
# Author: Travis Oliphant 2001
__all__ = ['quad', 'dblquad', 'tplquad', 'quad_explain', 'Inf','inf']
import _quadpack
import sys
import numpy
from numpy import inf, Inf
error = _quadpack.error
def quad_explain(output=sys.stdout):
output.write("""
Extra informat... | stefanv/scipy3 | scipy/integrate/quadpack.py | Python | bsd-3-clause | 20,697 | [
"Gaussian"
] | 6e59f5f9d25b7a4b23dcf7bb823f121102d12c72fcd0908418b25681032339ad |
"""Crystal Orbital Overlap Population calculation.
Index
-----
.. currentmodule:: nanoqm.workflows.workflow_coop
.. autosummary::
workflow_crystal_orbital_overlap_population
"""
__all__ = ['workflow_crystal_orbital_overlap_population']
import logging
from typing import List, Tuple
import numpy as np
from qmflo... | SCM-NV/qmworks-namd | nanoqm/workflows/workflow_coop.py | Python | mit | 6,021 | [
"CP2K",
"CRYSTAL"
] | 4c0b1a7917c4bcc5629316b9378aa66c0b3d9921b03c4edd7c20e5859bd442b1 |
# -*- coding: utf-8 -*-
import json
import uuid
from collections import OrderedDict
from gluon import *
from gluon.storage import Storage
from s3 import FS, ICON, IS_ONE_OF, IS_PHONE_NUMBER_MULTI, \
S3AnonymizeWidget, S3CustomController, S3Method, \
S3MultiSelectWidget, S3Profile, S3Req... | flavour/eden | modules/templates/CCC/controllers.py | Python | mit | 170,843 | [
"VisIt"
] | d1f8f3609ef43ffe6bbffb962ba8a23c8cd9bb2ee4d4a53a30bd44af20a33bd1 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | andreaso/ansible | lib/ansible/utils/color.py | Python | gpl-3.0 | 3,960 | [
"Brian"
] | ec2043c59b3148c926303e16df7385a4f52a946500a40045947880fe032175de |
# -*- coding: utf-8 -*-
#
# test_multiple_synapses.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the ... | wschenck/nest-simulator | pynest/nest/tests/test_multiple_synapses.py | Python | gpl-2.0 | 15,823 | [
"Gaussian"
] | f0eee997c820b67a655c94232f3b7a6572c9fc9911cee35e9ff4d5a1a47d37dd |
"""
The GA4GH data model. Defines all the methods required to translate
data in existing formats into GA4GH protocol types.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import base64
import collections
import glob
import json
import os
import ga4gh.... | david4096/ga4gh-server | ga4gh/server/datamodel/__init__.py | Python | apache-2.0 | 23,033 | [
"pysam"
] | 142e2544e0271b7ea5ba01afc06d955aa60701bc32f67c442db6da69188c9e45 |
#!/usr/bin/env python3
"""
Created on Tue Oct 22 02:37:52 2019.
@author: mtageld
"""
import numpy as np
from PIL import Image
from histomicstk.annotations_and_masks.annotation_and_mask_utils import \
get_image_from_htk_response
from histomicstk.annotations_and_masks.masks_to_annotations_handler import (
get_a... | DigitalSlideArchive/HistomicsTK | histomicstk/saliency/cellularity_detection_thresholding.py | Python | apache-2.0 | 26,843 | [
"Gaussian"
] | 090ada6466cb88b1d07d28d7bd095cdc53c0e55bb1b991619ef0b72188cc72fb |
from __future__ import (absolute_import, division, print_function)
import os
import numpy
from mantid import mtd
from mantid.kernel import StringListValidator, Direction, FloatBoundedValidator, \
FloatArrayMandatoryValidator, IntBoundedValidator
from mantid.api import PythonAlgorithm, MultipleFileProperty, FilePro... | wdzhou/mantid | Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENS.py | Python | gpl-3.0 | 25,043 | [
"CRYSTAL"
] | 10d1a78311b02a507f41a61d14343e28323c8ea99834614413ba936e924f53b3 |
import pytest
@pytest.mark.requires("frames")
class TestFrameURL:
@pytest.fixture(autouse=True)
def setup_session(self, session):
session.visit("/within_frames")
def test_returns_the_url_in_a_frame(self, session):
with session.frame("frameOne"):
assert session.driver.frame_url... | elliterate/capybara.py | capybara/tests/session/frame/test_frame_url.py | Python | mit | 641 | [
"VisIt"
] | dd7c7b819926ded18586475a1d45615c6f38751bb08b1b7b9b82c175f8a707a9 |
# This file is part of OpenDrift.
#
# OpenDrift 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, version 2
#
# OpenDrift is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without ev... | OpenDrift/opendrift | opendrift/models/chemicaldrift.py | Python | gpl-2.0 | 106,579 | [
"NetCDF"
] | a94cc82fdbc617fa91434052aee294495deacb2e573449602d19eb8f3f1edd64 |
"""
The pipeline is intended to find the normalization parameters
for each patient to perform a gaussian normalization
"""
import os
from joblib import Parallel, delayed
from protoclass.data_management import T2WModality
from protoclass.data_management import GTModality
from protoclass.preprocessing import Gaussian... | I2Cvb/mp-mri-prostate | pipeline/feature-normalization/pipeline_normalization_gaussian_t2w_patient.py | Python | mit | 2,480 | [
"Gaussian"
] | 76129a6457a93799fdfb121407f19ee25083543e9f293c3f897daffcebf1703c |
#!/usr/bin/python
# 3v3 .
# . .
# . GND
# . .
# . .
# PLLEN MUX
# XOTRI .
# . .
# . .
# DATA .
# . .
# CLK LE
# . .
import time as time
import ADF4360 as ADF4360
try:
import RPi.GPIO as GPIO
except ImportError:
print '*****'
print '*'
print '* Unable to import RPi.GPIO. Continuing as a simulation only.'
print ... | adsllc/lolol | software/pi/test.py | Python | gpl-3.0 | 1,368 | [
"ADF",
"CRYSTAL"
] | c628709c5d2b8fe4da665c30508c5c5ec33c0318181ab47b260bc8129b89f288 |
# -*- test-case-name: pyflakes -*-
# (c) 2005-2010 Divmod, Inc.
# See LICENSE file for details
import __builtin__
import os.path
import _ast
from rope_pyflakes import messages
# utility function to iterate over an AST node's children, adapted
# from Python 2.6's standard ast module
try:
import ast
iter_chil... | JulianEberius/SublimeRope | rope_pyflakes/checker.py | Python | gpl-2.0 | 21,976 | [
"VisIt"
] | 83dddc1683ba4ff497049c9c892928a27ba89f08bbe74fbf1b5dde0d4f7b4976 |
#
# Anna Dehof 2010-03-22
# get a system and add hydrogens
#
import sys
from BALL import *
#### for use in BALLView
#system = getSystems()[0]
#### for command line use
# issue a usage hint if called without parameters
if (len(sys.argv) != 3 ):
print sys.argv[0] , " <PDB infile> <PDB outfile>"
exit()
# open... | tkemmer/ball | doc/examples/PYTHON/howtos/add_hydrogens.py | Python | lgpl-2.1 | 3,040 | [
"Amber"
] | 95f9c0d4d03466531f3b7cda2f5f2ef957482db553312ae676a2441849fbc9c6 |
# -*- coding: UTF-8 -*-
"""
``Generic``
-----------------------
:Authors: Liron Levin
:Affiliation: Bioinformatics core facility
:Organization: National Institute of Biotechnology in the Negev, Ben Gurion University.
Short Description
~~~~~~~~~~~~~~~~~~~~~
A generic module that enables the user to design new module... | bioinfo-core-BGU/neatseq-flow_modules | neatseq_flow_modules/main_NSF_classes/Generic_module/Generic.py | Python | gpl-3.0 | 54,420 | [
"BLAST"
] | ffa9abb9af18931d256601fb3e3c6e42bf55d26f21187bd2e72da2207de1d76e |
# -*- coding: utf-8 -*-
"""
ast
~~~
The `ast` module helps Python applications to process trees of the Python
abstract syntax grammar. The abstract syntax itself might change with
each Python release; this module helps to find out programmatically what
the current grammar looks like and allows... | jjconti/taint-mode-py | wrapstrings/gen/ast.py | Python | gpl-3.0 | 13,373 | [
"VisIt"
] | af792c3d21671026113df8ca9f2519ad115a981c1c48ce3004dcf3f4c309bcb8 |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | PeterLauris/aifh | vol3/vol3-python-examples/examples/example_som_colors.py | Python | apache-2.0 | 1,195 | [
"VisIt"
] | 067d8d1dc701979fdec5b79a6b727d64154f6b27bc3e2128f174a14b74505175 |
from builtins import object
import numpy as np
from cs231n.layers import *
from cs231n.fast_layers import *
from cs231n.layer_utils import *
class ThreeLayerConvNet(object):
"""
A three-layer convolutional network with the following architecture:
conv - relu - 2x2 max pool - affine - relu - affine - sof... | miguelfrde/stanford-cs231n | assignment2/cs231n/classifiers/cnn.py | Python | mit | 7,812 | [
"Gaussian"
] | 333c92c8f7ae84616b9a0d934a5ea258639e53ecdc22f1597ae2088dd6d3cee5 |
#!/usr/bin/env python
# Copyright (C) Duncan Macleod (2013-2015)
#
# This file is part of GWpy.
#
# GWpy 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) ... | andrew-lundgren/gwpy | examples/frequencyseries/rayleigh.py | Python | gpl-3.0 | 2,614 | [
"Gaussian"
] | 1ffe71ff8bebc13668d7d026924c6a449cc150d1295d5cd320e9e0cf2b5eb557 |
from lxml.cssselect import CSSSelector
from zope.testbrowser.browser import Browser
from splinter.element_list import ElementList
from splinter.driver import DriverAPI, ElementAPI
from splinter.cookie_manager import CookieManagerAPI
import mimetypes
import lxml.html
import mechanize
class CookieManager(CookieManagerA... | softak/webfaction_demo | vendor-local/lib/python/splinter/driver/zopetestbrowser.py | Python | bsd-3-clause | 9,781 | [
"VisIt"
] | a774464e55212f8c8d43d023b7ed6f1549833eb79b1b8f5dea9c6ac295884bd9 |
#!/usr/bin/env python3
# -*-coding:Utf-8 -*
"""Use MCMC to find the stellar mass halo mass relation.
Based on the Behroozi et al 2010 paper.
Use a parametrization of the SHMR, plus a given HMF to find the expected SMF and compare it
to the observed SMF with its uncertainties using a likelihod maximisation.
Started o... | Gorbagzog/StageIAP | MCMC_SHMR_main.py | Python | gpl-3.0 | 70,048 | [
"Gaussian",
"TINKER"
] | 94c07545efd88eadf49e5ad874c3683fd3e954e53f11bf0029dd1ada19855ad7 |
import vtk
colors = vtk.vtkNamedColors()
NUMBER_OF_SPHERES = 10
class MouseInteractorHighLightActor(vtk.vtkInteractorStyleTrackballCamera):
def __init__(self, parent=None):
self.AddObserver("LeftButtonPressEvent", self.leftButtonPressEvent)
self.LastPickedActor = None
self.LastPickedPro... | lorensen/VTKExamples | src/Python/Picking/HighlightPickedActor.py | Python | apache-2.0 | 3,109 | [
"VTK"
] | 9b44319b335005b376b4c0fdb0bc8d7440566f8fc5b413546b4cb0f792a597ff |
# -*- 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-iap | tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py | Python | apache-2.0 | 103,591 | [
"Octopus"
] | 2cdc0150d18fd24b906ff0750b7a9b3f343a72b97b83ac8777b8778c6e340a62 |
#--------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU ... | fabio-otsuka/invesalius3 | invesalius/data/polydata_utils.py | Python | gpl-2.0 | 6,383 | [
"VTK"
] | c16062c329bffdff427fc8c3f22cfd9ac2e182ac5bc2ce6b2985303ac7d5f042 |
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2016 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Authors: Salim Fadhley <salimfadhley@gmail.com>
# Matteo Dell'Amico <matteodellamico@gmail.com>
"... | cogeorg/BlackRhino | networkx/algorithms/shortest_paths/astar.py | Python | gpl-3.0 | 5,295 | [
"VisIt"
] | a1ac007ec14004286401c1c6a9cc632e096a07d8c73f02573a8d4f4c0bc8d529 |
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 23 16:12:46 2013
@author: Reinhardt A.W. Maier <rema@zaehlwerk.net>
"""
import gtk
import apogee
import loadColormap
import imageAnalyse
import math
import gio
import os
import pandas as pd
import pickle
import matplotlib.pyplot as plt
import matplotlib.gr... | rema-git/panoptikum | panoptikum.py | Python | gpl-3.0 | 40,121 | [
"Gaussian"
] | d80f0029a78b546c56def87b02af07b6945fb8472cb77e34b1208f3cc62cd2f5 |
# -*- coding: utf-8 -*-
#
# Domain as presented in
#
# [1] Mathematical modeling of Czochralski-type growth processes for
# semicondictor bulk single crystals;
# W. Dreyer, P.-E. Druet, O. Klein, J. Sprekels.
#
import os
import numpy
import meshio
import pygmsh
def _add_coils(geom, mu0, omega, lcar_coil, z,... | nschloe/maelstrom | examples/problems/meshes/crucible_with_coils.py | Python | mit | 12,354 | [
"CRYSTAL"
] | aacdffbcd5b3b9437d593be494087b437b549c491665b42c95d70c53539ded42 |
# -*- coding: UTF-8 -*-
# Copyright 2016-2018 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
from django.db import models
from lino.api import dd, _
from lino.mixins import BabelDesignated
from .choicelists import Bars
class Foo(BabelDesignated):
class Meta(object):
app_label = 'dumps'
... | lino-framework/book | lino_book/projects/dumps/models.py | Python | bsd-2-clause | 546 | [
"VisIt"
] | d6fc5a817713e4d158575cc9d79c316390b0b5ee61efd1406306c5faa19764c6 |
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import os
# io.open is needed for projects that support Python 2.7
# It ensures open() defau... | dsg-bielefeld/deep_disfluency | setup.py | Python | mit | 9,434 | [
"VisIt"
] | 34f71036d91829f8745ce609eac95b235c3edad9f6cdcea7dbc968a5374bf44a |
# $Id$
#
# Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from rdkit import RDCon... | rdkit/rdkit-orig | rdkit/Chem/Pharm3D/EmbedLib.py | Python | bsd-3-clause | 38,529 | [
"RDKit"
] | aea81db6e8b2775b7d8bf69022d154962381726edacb6087eb584480d3a9057f |
"""
This is the GromacsMatcher class. It parses gromacs-format topology
files to a graph-based representation that can then be converted to
other formats.
Author: Robin Betz
Copyright (C) 2019 Robin Betz
"""
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser... | Eigenstate/dabble | dabble/param/gromacsmatcher.py | Python | gpl-2.0 | 13,432 | [
"Amber",
"Gromacs"
] | 6b3694b9e2d942ce178aed68ef14463b7560df7d6fe675e94a3f241337320f71 |
""" :mod: DErrno
==========================
.. module: DErrno
:synopsis: Error list and utilities for handling errors in DIRAC
This module contains list of errors that can be encountered in DIRAC.
It complements the errno module of python.
It also contains utilities to manipulate these err... | DIRACGrid/DIRAC | src/DIRAC/Core/Utilities/DErrno.py | Python | gpl-3.0 | 10,305 | [
"DIRAC"
] | d22c95bbc8747fb9fd087da175da62e3cc8e6ec1ba4f7d8a3315090c2d3bc991 |
"""
@created_at 2014-06-09
@author Exequiel Fuentes <efulet@gmail.com>
@author Brian Keith <briankeithn@gmail.com>
"""
# Se recomienda seguir los siguientes estandares:
# 1. Para codificacion: PEP 8 - Style Guide for Python Code (http://legacy.python.org/dev/peps/pep-0008/)
# 2. Para documentacion: PEP 257 - Docst... | efulet/laberinto | laberinto/lib/__init__.py | Python | mit | 647 | [
"Brian"
] | aebc688a975e45cd0ce8c848e120705db0dcb595647d387e1b908ed7c040525f |
#! /usr/bin/env python
"""
This standalone python script can be used to convert the force-fields
distributed with TINKER (".prm" files) into moltemplate (".lt") format.
This script has only been tested with the OPLSAA force field (oplsaa.prm).
The full list of force-field files distributed with TINKER is available a... | ibethune/lammps | tools/moltemplate/moltemplate/force_fields/convert_TINKER_files_to_LT_files/tinkerparm2lt.py | Python | gpl-2.0 | 38,452 | [
"LAMMPS",
"TINKER"
] | 124b67bd64ce2bf066dcc153d3833b27bf07653dafdef4a204ef5041192d10e4 |
from sframe import SFrame
import numpy as np
import random
def get_batches(features, targets, batch_size):
"""
Return new batches
** input : **
*features : numpy array of features
*targets : numpy vector of targets
*batch_size : size of one batch
**return... | thibo73800/dl_focus_epitech | focus_3/income_classifier.py | Python | apache-2.0 | 5,972 | [
"NEURON"
] | 8d0ff2e7da342be5ae6c30e81b1d4dc2451477ba8636e70192fb36b95466ea99 |
# User creation spoke
#
# Copyright (C) 2013-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, or (at your option) any later version.
# This program is distributed i... | akozumpl/anaconda | pyanaconda/ui/gui/spokes/user.py | Python | gpl-2.0 | 23,193 | [
"VisIt"
] | 0d168328fda30d507a9ea2bba8d1860491e0fe38b686f29ec9f58dbcc558803c |
# This example demonstrates insertion of endo-compartments into the
# dendrite. Here endo_compartments are used for the endoplasmic reticulum
# (ER) in a model of Calcium Induced Calcium Release through the
# IP3 receptor. It generates a series of propagating waves of calcium.
# Note that units of permeability in the C... | BhallaLab/moose-core | tests/rdesigneur/test_72_CICR.py | Python | gpl-3.0 | 3,935 | [
"MOOSE"
] | 9e8cebc65d9f39bd196292695de6d319076e6cba2ef364d4999918ca6465dfec |
#
#@BEGIN LICENSE
#
# PSI4: an ab initio quantum chemistry software package
#
# 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 later ver... | spring01/libPSI | lib/python/p4util/procutil.py | Python | gpl-2.0 | 9,131 | [
"Psi4"
] | 1d5090dc2b9dd2350ecce9c89c5f40f5361f3d56431515a1a049910cd82ac994 |
#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
#
# go-uniprot-to-topGO.py
#==============================================================================
import argparse
import sys
import os
from rpy2.robjects.packages import importr
from rpy2.robjects import r as R
#==========================================... | qfma/GOtea | topGO-enrichment.py | Python | gpl-2.0 | 4,044 | [
"Bioconductor"
] | ed63a6693ed739a2f572dbd053de82208f82eac761b69bba92ff203d1f53e3fc |
#!/usr/bin/python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
Alchemical factory for free energy calculations that operates directly on OpenMM System... | luirink/yank | Yank/alchemy.py | Python | lgpl-3.0 | 50,992 | [
"OpenMM"
] | 3f3f5c90124d671ebf0a4fa286ee89deac19fba1ccb3bfe60bb2d3f35d53159d |
"""
How to get a particular Neuron's gap junctions from the database.
"""
import PyOpenWorm as P
#Connect to existing database.
P.connect()
#Put the Worm's Network object in a variable.
net = P.Worm().get_neuron_network()
#Put a particular Neuron object in a variable ('AVAL' in this example).
aval = net.aneuron('AVA... | hnunner/PyOpenWorm | examples/gap_junctions.py | Python | mit | 701 | [
"NEURON"
] | 1a50129c7727ac79af32c5dcc4cbe934e661d9c2d2e24576e6cde324bbf7f283 |
# Custom GPAW setup for Intel MICs (KNL)
import os
# use Intel compiler and MPI
#compiler = 'mpiicc'
#mpicompiler = 'mpiicc'
#mpilinker = 'mpiicc'
compiler = 'cc'
mpicompiler = 'cc'
mpilinker = 'cc'
# use MKL
mklroot = os.environ['MKLROOT']
library_dirs += [mklroot + '/lib/intel64/']
libraries = ['mkl_intel_lp64', 'm... | mlouhivu/build-recipes | gpaw-bundle/examples/archer-knl-0.11.0/setup/customize-knl.py | Python | mit | 1,135 | [
"GPAW"
] | f29090db2478b83d86bbad06c507bb3332f2a3b8b16478c431b332d367730c37 |
from __future__ import absolute_import
from datetime import date, datetime, time
from django.test import TestCase
from django.utils import timezone
from delft3dworker.utils import (
apply_default_tz,
log_progress_parser,
merge_log_unique,
tz_midnight,
)
class LogTests(TestCase):
def test_progre... | openearth/delft3d-gt-server | delft3dworker/test_utils.py | Python | gpl-3.0 | 2,660 | [
"NetCDF"
] | afa9247d0733103eb2e213af83e45068f2b71451b4449ee812fd4b99cb58c2ec |
#!/usr/bin/env python
"""
http://adventofcode.com/day/9
Part 1
------
Every year, Santa manages to deliver all of his presents in
a single night.
This year, however, he has some new locations to visit; his
elves have provided him the distances between every pair of
locations. He can start and end at any two (differen... | rnelson/adventofcode | advent2015/day09.py | Python | mit | 4,282 | [
"VisIt"
] | 71da917d22f1d9e3de48ef0208a681040d56b69180db518712ef16f40b88ee2d |
# 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)
import os.path
from spack import *
class SentieonGenomics(Package):
"""Sentieon provides complete solutions for sec... | LLNL/spack | var/spack/repos/builtin/packages/sentieon-genomics/package.py | Python | lgpl-2.1 | 1,620 | [
"BWA"
] | faeb0c7cf1aaa4ccb012b9c4a2e686df01040b9fa695c32059073ac26506b5ed |
'''
Created on 2013-05-02
@author: brian
'''
import pygame
from pygame.locals import *
from src.util import Cardinal
class Look:
def __init__(self, player):
self.player = player
self.finished = False
self.player.log.append('Look... (Choose a direction)')
def nextStep(self):
... | Greymerk/python-rpg | src/actions/look.py | Python | gpl-3.0 | 1,042 | [
"Brian"
] | 59ffea9821de0216e83b35734375c87b25088d2e802dc10c82a8d5cb895731de |
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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 Licen... | hjoliver/cylc | cylc/flow/workflow_files.py | Python | gpl-3.0 | 70,188 | [
"VisIt"
] | 60bf68f57dd32648321ce4682ddcf351787a090f899426986e9be7f46231892f |
__author__ = "Vijay Lakhujani, Project Scientist, Xcelris Labs Ltd."
__maintainer__ = "Vijay Lakhujani, Project Scientist, Xcelris Labs Ltd."
__copyright__ = "Copyright 2016, Xcelris Labs Ltd."
__license__ = "GPL"
__version__ = "1.0"
__status__ = "Complete"
__email__="vijay.lakhujani@xcelrislabs.com"
'''
... | Xcelris-Labs-Ltd/Merge-Qiime-Images | prepare_taxa_charts.py | Python | gpl-3.0 | 8,115 | [
"VisIt"
] | 829de984593b3a8559824611fd4f6990561a00c9550d2ab7631c6b36473660ed |
# -*- coding: utf-8 -*-
#
# intrinsic_currents_subthreshold.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version ... | sanjayankur31/nest-simulator | pynest/examples/intrinsic_currents_subthreshold.py | Python | gpl-2.0 | 8,223 | [
"NEURON"
] | 37bd95fab08615a3d20b8b7fb24aa4a076e663cb7557f3847e91598605963562 |
import cgi
from itertools import chain, groupby
import re
import struct
import time
from jinja2 import Markup
from parsimonious import Grammar
from parsimonious.nodes import NodeVisitor
# TODO: Some kind of UI feedback for bad regexes
# TODO
# - Special argument files-only to just search for file names
# - If ... | erikrose/dxr | dxr/query.py | Python | mit | 58,798 | [
"VisIt"
] | 4adad9886385b334baff2d2328a9a7f384e61116ef4719a79304e58e2462a731 |
"""A PLOT3D file reader. This reader does not support a timeseries of
files.
"""
# Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
# Copyright (c) 2007-2015, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
from os.path import basename, isfile, exists, splitext
# Enthought library imports.
fr... | dmsurti/mayavi | mayavi/sources/plot3d_reader.py | Python | bsd-3-clause | 10,421 | [
"Mayavi",
"VTK"
] | 9329d1238a7f3c0681487ef4310f6903bf6adf1a534453d8553f3632575e763b |
#!/usr/bin/env python
# for python 2 / 3 compatibility
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
try :
range = xrange
except NameError :
pass
import numpy as np
import symmetry_operations
# calculate... | andyofmelbourne/crappy-crystals | utils/calculate_constraint_ratio.py | Python | gpl-3.0 | 2,727 | [
"CRYSTAL"
] | b8864d4e7ca5fca291d429615b1b20edcd79b220d647f947c7be87c9f4758daa |
#
# Copyright 2001 - 2016 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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
# (... | dahaic/outerspace | client/osci/MiniMap.py | Python | gpl-2.0 | 5,813 | [
"Galaxy"
] | d1a799a7ec08df2ec791e0b326519b781cab890682551afd5545cdd71b66b510 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# we need to use composite data pipeline with multiblock datasets
alg = vtk.vtkAlgorithm()
pip = vtk.vtkCompositeDataPipeline()
alg.SetDefaultExecutivePrototype(pip)
del pip... | hlzz/dotfiles | graphics/VTK-7.0.0/IO/EnSight/Testing/Python/nacaBinary.py | Python | bsd-3-clause | 1,249 | [
"VTK"
] | ee7a63dbabeb18f959be36100d5fafbaa2cbd6b12c3938eec99fddf4097d9b8f |
#!/usr/bin/python
"""Test of column header output."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
sequence.append(KeyComboAction("End"))
sequence.append(KeyComboAction("<Shift>Right"))
sequence.append(KeyComboAction("Down"))
sequence.append(KeyComboAction("Down"))
sequence.append(KeyComb... | chrys87/orca-beep | test/keystrokes/gtk3-demo/role_column_header.py | Python | lgpl-2.1 | 5,080 | [
"ORCA"
] | 8d1394e20d6eca23f38139f20146c0bba703c216bca3a71fe1619a16b7df2120 |
import litus
import numpy as np
import uuid
try:
from exceptions import NotImplementedError
except ImportError:
pass
from ..base import *
from .. import base
from ..filters import Conv1d, Conv2d, Conv3d, TIME_DIMENSION
from .. import variables
from .. import _get_default_resolution
from ..filters import Tempor... | jahuth/convis | convis/filters/retina.py | Python | gpl-3.0 | 40,803 | [
"Gaussian"
] | 53ba71fd6b1270f7889e817d62c3d161b43d4b0b7a5f2b38abcfe443021aa71a |
#!/usr/bin/env python
import ase, numpy, time, shutil, sys
sys.path.append('../pylib')
from ase_calculators import PlumedSettings, Plumed, set_maxwell_boltzmann_distribution
# Set up the plumed calculator (containing EMT)
emtjob = ase.calculators.emt.EMT()
plumedsettings = PlumedSettings( 'Data/plumed.in' )
forcejob ... | whitead/plumed-experiments | utilities/python_interface/test/ASEmd_plumed_emt_water.py | Python | gpl-3.0 | 2,092 | [
"ASE"
] | e2cd2348eabcb5438f7b2d22e31e94dc422691a45334f1b20158483c848b3289 |
"""as_seqdict function & overloads"""
import os
import re
import sys
from functools import singledispatch
from io import TextIOWrapper
from tempfile import NamedTemporaryFile
try:
import pybedtools
except ImportError:
pass
import numpy as np
import pyfaidx
from Bio.SeqIO.FastaIO import SimpleFastaParser # no... | simonvh/genomepy | genomepy/seq.py | Python | mit | 5,996 | [
"Biopython"
] | b72ed58ebf2539510d818b7ee573db8a304cc62836bab0b43df8884e8dc66fac |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | ktaneishi/deepchem | scripts/tf_upgrade.py | Python | mit | 27,257 | [
"VisIt"
] | 6352bc41eae3d5270c31903f84e84383e3c77396da9647dcbe71252b21021093 |
"""
Implement the steps to extract data from an Abinit output file.
Extract lines associated with their "meta character" (that makes sense in
fldiff), and valid YAML documents associated with their iteration context.
"""
from __future__ import print_function, division, unicode_literals
import re
from .yaml_tools impor... | abinit/abinit | tests/pymods/data_extractor.py | Python | gpl-3.0 | 5,550 | [
"ABINIT"
] | 965956f589f21e4d15e1d6ec0bbb54c3ca1d3610b766c28665c7d056da209f3b |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughCanvasCasesPage(page_module.Page):
def _... | guorendong/iridium-browser-ubuntu | tools/perf/page_sets/tough_canvas_cases.py | Python | bsd-3-clause | 3,952 | [
"Galaxy"
] | 1709a9ee33268788c189805150d23473054c49c9bcc0338c54b280bedc7acbde |
"""BSSE: Basis Set Superposition Error module.
Defines a Setup-like class which has no properties that change anything,
except for an atomic basis set."""
import numpy as np
from ase.data import atomic_numbers
from gpaw.setup import BaseSetup
from gpaw.setup_data import SetupData
from gpaw.basis_data import Basis
fr... | ajylee/gpaw-rtxs | gpaw/lcao/bsse.py | Python | gpl-3.0 | 3,004 | [
"ASE",
"GPAW"
] | 9e29d29abaea36645f803856889dde1dd3083e427970e5ca61f296a03df39da6 |
try:
import IPython
except (ImportError, ValueError):
# Old IPythons versions (0.12?) may fail to import with
# ValueError: fallback required, but not specified
# https://github.com/inducer/pudb/pull/135
HAVE_IPYTHON = False
else:
HAVE_IPYTHON = True
try:
import bpython # noqa
except Impor... | amigrave/pudb | pudb/shell.py | Python | mit | 5,011 | [
"VisIt"
] | 0918cde9f835f279b85018ab35b1b7336789cd28fba3cb699af5449d4fe5ed32 |
#! test QC_JSON Schema noncontiguous mol
import numpy as np
import psi4
import json
# Generate JSON data
json_data = {
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"geometry": [
0.0, 0.0, -0.1294769411935893,
0.0, -1.494187339479985, 1.02744650792456... | CDSherrill/psi4 | samples/json/schema-1-throws/input.py | Python | lgpl-3.0 | 1,103 | [
"Psi4"
] | 36cb88ebcfd67f34b6d8cd255551bcd82c43c9e637a121f972ca67e958828d2e |
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Contains linear models
"""
import GPy
import numpy as np
class GPyLinearMultiFidelityModel(GPy.core.GP):
"""
A thin wrapper around GPy.core.GP that does some input checking and provides a def... | EmuKit/emukit | emukit/multi_fidelity/models/linear_model.py | Python | apache-2.0 | 1,862 | [
"Gaussian"
] | 5873d13d73c5bd5852e674e8b97ddcb201fb129ae5fd6376a7dc15d2ee197fd7 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import platform
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import FormatStrFormatter
"""
This module provides classes for plot... | Bismarrck/pymatgen | pymatgen/analysis/pourbaix/plotter.py | Python | mit | 34,946 | [
"pymatgen"
] | df1bfd50668269cdc8da23a3d9432d4934e5653bb2c01c356021e29422be5ef5 |
from __future__ import unicode_literals
import base64
import datetime
import hashlib
import json
import netrc
import os
import re
import socket
import sys
import time
import xml.etree.ElementTree
from ..compat import (
compat_cookiejar,
compat_cookies,
compat_getpass,
compat_HTTPError,
compat_http... | sjfloat/youtube-dl | youtube_dl/extractor/common.py | Python | unlicense | 57,363 | [
"VisIt"
] | c3f0114d9886d0d159716a5b94047b0761d9bfa315ce1c89b7e535954a7b1dc4 |
# coding=utf-8
# Copyright 2022 The Uncertainty Baselines 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 ap... | google/uncertainty-baselines | uncertainty_baselines/models/resnet50_sngp_be.py | Python | apache-2.0 | 12,741 | [
"Gaussian"
] | 18a1aa2d1805248ea85b594d1ea95b16eb227efa029e41b54a65caa9889a2567 |
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mamase.settings.dev")
import django
django.setup()
from apps.utils.models import AggregateMonthlyFeed, AggregateDailyFeed
def fix():
amf = AggregateMonthlyFeed.objects.all()
adf = AggregateDailyFeed.objects.all()
print "Gotten all aggregated fee... | Upande/MaMaSe | fix_aggregated_feeds.py | Python | apache-2.0 | 944 | [
"ADF"
] | 979da2850df38bd45ffea11a019a0a3445ab97d85a444dfffcb145b0957d1789 |
"""
Tests the converters
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import tempfile
import unittest
import pysam
import ga4gh.backend as backend
import ga4gh.client as client
import ga4gh.converters as converters
import ga4gh.datarepo as datarepo... | macieksmuga/server | tests/unit/test_converters.py | Python | apache-2.0 | 4,414 | [
"pysam"
] | b142c6d74759e617531b20e5586b4e728653e40f7f0d60de75a823243b27e4b7 |
class Solution(object):
def findItinerary(self, tickets):
targets = collections.defaultdict(list)
for a, b in sorted(tickets)[::-1]:
targets[a] += b,
route = []
def visit(airport):
while targets[airport]:
visit(targets[airport].pop())
... | wenqiangwang/algorithms | leetcode/reconstruct_itinerary.py | Python | mit | 393 | [
"VisIt"
] | 9f611109bff2987122e5f0f083322f07395a6e0f69420ebbe1e30f5eb2be99be |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import re
import time
import sys
if sys.version > '3':
import urllib.request
else:
import urllib2
SHIP_DATA_CODE_URL = '''https://zh.kcwiki.moe/wiki/\
%E6%A8%A1%E5%9D%97:%E8%88%B0%E5%A8%98%E6%95%B0%E6%8D%AE'''
SHIP_D... | mczoden/kcwiki | download_and_convert.py | Python | gpl-3.0 | 2,670 | [
"MOE"
] | bdec8dd36aa92e5abd8efda75dd78710431a142b8f96d1b02f3af60f14d336a3 |
import os
import sys
import math
import argparse
import config
import shutil
from turkic.cli import handler, importparser, Command, LoadCommand
from turkic.database import session
import sqlalchemy
import random
from vision import Box
from vision import ffmpeg
import vision.visualize
import vision.track.interpolation
i... | weiliu89/vatic | cli.py | Python | mit | 45,578 | [
"VisIt"
] | 7ddda834c884ae7bd52002a205c5d13a147119c6cddab610697a9acacef8c083 |
from __future__ import print_function
import sys
import random
import os
import numpy as np
import scipy
import math
from scipy import stats
from builtins import range
import time
sys.path.insert(1, "../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
fr... | h2oai/h2o-3 | h2o-py/dynamic_tests/testdir_algos/glm/pyunit_glm_gaussian_large.py | Python | apache-2.0 | 64,811 | [
"Gaussian"
] | 0bb8ead9e251ae41cef3f67b23263774ea2c1a132bee4f8c0079ef870a0eb819 |
# --------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU... | paulojamorim/invesalius3 | invesalius/reader/dicom_reader.py | Python | gpl-2.0 | 12,679 | [
"VTK"
] | d5b1356d86c219575a526ae9091260c6d79a106fc9f5f71bde15f3c0e4c66515 |
# -*- coding: utf-8 -*-
"""Tests for the conversion procedure."""
import unittest
from typing import Tuple, Type
from pybel import BELGraph
from pybel.constants import (
ASSOCIATION,
DECREASES,
DIRECTLY_DECREASES,
DIRECTLY_INCREASES,
EQUIVALENT_TO,
INCREASES,
IS_A,
NEGATIVE_CORRELATIO... | pybel/pybel | tests/test_io/test_triples.py | Python | mit | 9,555 | [
"Pybel"
] | 5db5aacca9ea1aea4e65838c8d9e39f66117c008a8e09fa91dedca82dc0f2153 |
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 20 14:56:58 2015
@author: wolfensb
"""
from pycosmo.derived_vars import DERIVED_VARS, get_derived_var
import pycosmo.data as d
import PyNIO.Nio as Nio
import numpy as np
import os
import gc # garbage collector
import warnings
from fnmatch import fnmatch
_nio_builtins ... | wolfidan/pycosmo | pycosmo/io.py | Python | gpl-3.0 | 7,806 | [
"NetCDF"
] | 4a3c6826126e1a4d60bb44801ab7f73fe7ddb439fd6b0dfcfe8ebe4d8135ffc5 |
import os
import sys
import pickle
import matplotlib
#matplotlib.use('Agg')
import numpy as np
from ase.atoms import Atoms
from ase.utils import devnull
from ase.data import atomic_numbers, atomic_names, covalent_radii
from gpaw.atom.generator import Generator
from gpaw.atom.configurations import parameters
from gpa... | robwarm/gpaw-symm | doc/setups/make_setup_pages_data.py | Python | gpl-3.0 | 8,277 | [
"ASE",
"GPAW"
] | 9f67bd70777302d5acddce32c56f6d91dead3f3fb02f5d519d559c2c3dfa7f50 |
# -*- coding: utf-8 -*-
__version__ = '0.5.0'
__author__ = 'Tomasz Czyż <tomaszczyz@gmail.com>'
__license__ = "Apache 2"
import os
import re
import sys
import json
import copy
import uuid
import hashlib
import argparse
import functools
import posixpath
import pkg_resources
import sphinx
from sphinx.locale import _
f... | claus022015/USDA_community | sphinxcontrib-images-0.5.0/sphinxcontrib/images.py | Python | mit | 12,203 | [
"VisIt"
] | 932402feaa32110c4d4b3c7df970599a5008920a59c4648c09037c3c2e9cbb89 |
#!/usr/bin/env python
"""
The main DIRAC installer script
"""
import sys
import os
import getopt
import urllib2
import imp
import signal
import time
import stat
import shutil
import ssl
import hashlib
__RCSID__ = "$Id$"
executablePerms = stat.S_IWUSR | stat.S_IRUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | stat... | Andrew-McNab-UK/DIRAC | Core/scripts/dirac-install.py | Python | gpl-3.0 | 62,678 | [
"DIRAC"
] | 6ccf8637a86b013f260f503b5740a251b148043717bc1cb45a012974d4b5c6bb |
import pandas as pd
import argparse
import numpy as np
import operator
from collections import Counter, defaultdict, namedtuple
import sys
from rdkit import Chem
from rdkit.Chem import FilterCatalog
from rdkit.Chem import rdMolDescriptors
FilterMatch = namedtuple('FilterMatch', ('SubstructureMatches', 'Min_N_O_fi... | ptosco/rdkit | Contrib/NIBRSubstructureFilters/assignSubstructureFilters.py | Python | bsd-3-clause | 5,021 | [
"RDKit"
] | 3670612e13581156c136477afe657a4da0cee5ec15d596bdb31c14f520d4ac2f |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 10 08:54:02 2012
Author: Josef Perktold
"""
from __future__ import print_function
import numpy as np
from numpy.testing import assert_almost_equal
from statsmodels.stats.inter_rater import fleiss_kappa, cohens_kappa, KappaResults
table0 = np.asarray('''\
1 0 0 0 ... | hlin117/statsmodels | statsmodels/examples/ex_inter_rater.py | Python | bsd-3-clause | 3,244 | [
"ASE"
] | d64a636dc7d52cbd81b115e24308eaba38575f1b7c9dd9496ca0c515bc062f5e |
../../../../../../../share/pyshared/orca/scripts/toolkits/CALLY/script.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/toolkits/CALLY/script.py | Python | gpl-3.0 | 73 | [
"ORCA"
] | d83a11facf1965aa50244b4466bed3420bee125c56d0aa92b7318b8e24b45a95 |
####
# This sample is published as part of the blog article at www.toptal.com/blog
# Visit www.toptal.com/blog and subscribe to our newsletter to read great posts
####
import logging
import os
from functools import partial
from multiprocessing.pool import Pool
from time import time
from download import setup_download... | volker48/python-concurrency | multiprocessing_imgur.py | Python | mit | 995 | [
"VisIt"
] | 226aef224e4d210e4c68f5c413c252e0e2baea1845db06cfae63f2da1847fbec |
"""
Tests: src/python/exptdata.py
"""
from odin import models
from odin import exptdata
from odin.testing import skip, ref_file, expected_failure
import mdtraj
import numpy as np
from numpy.testing import (assert_almost_equal, assert_array_almost_equal,
assert_allclose, assert_array_equal... | tjlane/odin | test/test_model.py | Python | gpl-2.0 | 2,380 | [
"MDTraj"
] | 51ec0d222a933d24c75dc38c259ba783148eb6945da1eb707528aea3754ce3e5 |
# -*- coding: utf-8 -*-
#
# hl_api_connections.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the Lice... | tillschumann/nest-simulator | pynest/nest/lib/hl_api_connections.py | Python | gpl-2.0 | 21,928 | [
"NEURON"
] | bc4e5dc3d3ce85efe2ba869b664934df9de992a5dd0c2ffc9c5bc8b3c7238012 |
import copy
import registry as sr
from pysal.weights import W
try:
import patsy as p
except:
p = None
from numpy import array, ndarray, asarray
from six import iteritems as diter
#would like to just wrap this in the opt decorator...
def pandashandler(formula_like, data):
"""
process a pysal model signa... | schmidtc/pysal | pysal/contrib/handler/handler.py | Python | bsd-3-clause | 3,299 | [
"COLUMBUS"
] | a823498c5543a23dcbbb187aba689770dc0c1a1f4961169f3ad196d275357f76 |
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Scientific Package. This package holds all simulators, and
# analysers necessary to run brain-simulations. You can use it stand alone or
# in conjunction with TheVirtualBrain-Framework Package. See content of the
# documentation-folder for more details. See also http://ww... | rajul/tvb-library | tvb/simulator/demos/region_deterministic_stimulus_long_bold.py | Python | gpl-2.0 | 4,448 | [
"Gaussian"
] | d7a4c2c920bca86b80af75ec4f425a026a43efbee8d228e08206767d3a162f7e |
# TODO: IUPAC naming from Chemdoodle web or some Python module
from django.shortcuts import render, render_to_response
from django.template.loader import render_to_string
from moldb.models import *
from django.template import RequestContext
from .forms import AddMoleculeForm
from django.http import JsonResponse, HttpR... | gorgitko/bioinformatics-chemoinformatics | chemoinformatics/molecule_web_database/moldb/views.py | Python | mit | 27,547 | [
"RDKit"
] | fe99be1040b5269d3e57233986774c2b049671ce0f7031b94157918059bf634f |
import argparse
from util import data, fig, launch
# ----------------------------------------------------------------------------
def make_parser():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(title='Commands')
# train
train_parser = subparsers.add_parser('train', help='Train mode... | kuleshov/deep-learning-models | run.py | Python | mit | 8,355 | [
"Gaussian"
] | a7a9eea698d10fdf3266b6d2c4828b2d8e708af5b63790d907e37cb0f32aa06e |
#!/usr/bin/env python
import vtk
import random
import numpy
# Make a 32 x 32 grid
size = 32
# Define z values for the topography
topography = numpy.zeros([size, size])
for i in range(size):
for j in range(size):
topography[i][j] = random.randrange(0, 5)
# Define points, triangles and colors
colors... | saullocastro/pyNastran | pyNastran/gui/vtk_examples/line_on_mesh.py | Python | lgpl-3.0 | 4,601 | [
"VTK"
] | 15f5c27d82f9b57a53e0efb41e507bcc9425264976785885a6a078837730a623 |
"""
python-can requires the setuptools package to be installed.
"""
from setuptools import setup, find_packages
__version__ = 1.4
import logging
logging.basicConfig(level=logging.WARNING)
setup(
name="python-can",
url="https://bitbucket.org/hardbyte/python-can",
version=__version__,
packages=find_pa... | rberkow/python-can | setup.py | Python | lgpl-3.0 | 813 | [
"Brian"
] | 9cea40ba94af4c16f8f7b6fc68eae07131d2337ce552fc7342308e624c54c354 |
from aces.materials.POSCAR import structure as Material
class structure(Material):
def getPOSCAR(self):
return """ findsym-output
1.0
4.3336000443 0.0000000000 0.0000000000
-2.1668000221 3.7530077282 0.0000000000
0.0000000000 0.0000000000 25.3... | vanceeasleaf/aces | aces/materials/SnTe_zhang20161107.py | Python | gpl-2.0 | 835 | [
"ASE"
] | d4c675f331024fa80ab87645e42d5d3e49b0fdc3711d73a485fa6582ecdd96e9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.