text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
"""Python CSP full adder.
Based on code from PyCSP - Communicating Sequential Processes for
Python. John Markus Bjorndalen, Brian Vinter, Otto Anshus. CPA 2007,
Surrey, UK, July 8-11, 2007. IOS Press 2007, ISBN 978-1-58603-767-3,
Concurrent Systems Engineering Series (ISSN 1383-7575).
Copyri... | futurecore/python-csp | examples/circuits/fulladder.py | Python | gpl-2.0 | 2,881 | [
"Brian"
] | 4695a2780e57189e24290c06fc1f565d36c41007ba89b1d80396144d72b4c21e |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import json
import frappe.utils
from frappe.utils import cstr, flt, getdate, comma_and, cint
from frappe import _
from frappe.model.mapper... | aruizramon/alec_erpnext | erpnext/selling/doctype/sales_order/sales_order.py | Python | agpl-3.0 | 21,957 | [
"VisIt"
] | ed72c44006f6003be41b5b3289ae87a8eb43b2ef2ced5d7c8af388bf1fa37691 |
"""
Plotting routines for tracking.
Functions include:
* background
* hist
* tracks
"""
import matplotlib as mpl
mpl.use("Agg") # set matplotlib to use the backend that does not require a windowing system
import numpy as np
from mpl_toolkits.basemap import Basemap
from matplotlib.mlab import *
from matplotlib.pyplot ... | dcherian/tracpy | tracpy/plotting.py | Python | mit | 17,388 | [
"NetCDF"
] | 0a3e6526ab0719f142f60ebe1ef11b3fde2dae622e838eba1cc90453a0e18b74 |
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
"""Helpers for managing the run/training loop."""
import datetime
import json
import os
impo... | google/lecam-gan | third_party/dnnlib/submission/run_context.py | Python | apache-2.0 | 4,245 | [
"VisIt"
] | 05b80d4c9da156d093378cec51af4350fc43807dda2eaae088c161ab26870d11 |
"""Unit tests for the Gaussian probability densities
"""
from .gauss import *
from .student_t_test import fake_rng
import numpy as np
import unittest
rng_seed = 128501257 % 4294967296
rng_steps = 50000
singular_sigma = np.array([[0.0, 0.0 , 0.0]
,[0.0, 0.0025, 0.0]
... | fredRos/pypmc | pypmc/density/gauss_test.py | Python | gpl-2.0 | 6,743 | [
"Gaussian"
] | 674112eeefb4811f31edcbf122214df7d61001ee6f61bc2e5cd72363055b8b52 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views import defaults as default_views
urlpatterns = [
# Django Admin, use {% url 'admi... | ETinLV/gpstrack | config/urls.py | Python | mit | 1,470 | [
"VisIt"
] | 51a619ac33db05d729549f2e373bf3dd0c346de102b3ac3947b54f0ff950c0f3 |
from module_base import ModuleBase
from module_mixins import IntrospectModuleMixin
import module_utils
import vtk
import vtkdevide
import wx
class histogramSegment(IntrospectModuleMixin, ModuleBase):
"""Mooooo! I'm a cow.
$Revision: 1.9 $
"""
_gridCols = [('Type', 0), ('Number of Handles',0)]
_g... | nagyistoce/devide | modules/viewers/histogramSegment.py | Python | bsd-3-clause | 22,760 | [
"VTK"
] | 254804d0d5398e9060352ed103cd36b9fd5002d25f224f72dd6cf4479b77eaf0 |
# -*- coding: utf-8 -*-
"""
Generate centreline and write it out as .vtk legacy format.
"""
import os
import sys
# Run in current directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Import path for the CentrelineGenerator script.
importPath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../... | BlueFern/DBiharMesher | meshes/c2000/Generate2000Centreline.py | Python | gpl-2.0 | 978 | [
"VTK"
] | 2570fa5da3dbf329879522792ae1251e3deb3397155e2025f9fdf5285e614798 |
# -*- coding: utf-8 -*-
# Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
from __future__ import unicode_literals
import copy
import io
import os
import re
import shutil
import tempfile
import threading
import time
import unittest
import warnings
from django.conf import... | frishberg/django | tests/cache/tests.py | Python | bsd-3-clause | 92,446 | [
"Brian"
] | d06ef0f612b397a0bd86096142fe075f2586aadbde7bb149ef93bd5b565a2131 |
# -*- coding: utf-8 -*-
import numpy as np
from scipy.special import gamma, gammaln, polygamma, gammainc
from collections import OrderedDict
import astropy.cosmology.core
from scipy.misc import derivative
from delight.utils import approx_DL
class Model:
def __init__(self):
self.children = []
self... | ixkael/Delight | delight/priors.py | Python | mit | 9,943 | [
"Gaussian"
] | 90e526316b6dbec0aaf029fdb2af1e0b5c26cb95af9b1a88d6cfbeb471c7760b |
# GromacsWrapper: collections.py
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under GPL3+
"""
:mod:`analysis.collections` -- Handling of groups of simulation instances
=========================================================================
This module contains classes and functions that com... | Becksteinlab/GromacsWrapper | gromacs/collections.py | Python | gpl-3.0 | 4,197 | [
"Gromacs"
] | 900557cc28aaf19cbc3fa4bbd6489bbf3acfaf63bb13061bb9e3979c28569229 |
from src.constant.Number import Number
from src.modifier.Modifier import Modifier
from src.operator.Addition import Addition
from src.operator.Divide import Divide
from src.operator.Multiply import Multiply
from src.operator.Operator import Operator
from src.operator.Subtraction import Subtraction
from src.result.Resul... | charleshamel73/diceroller | src/visitor/LogResultVisitor.py | Python | mit | 2,725 | [
"VisIt"
] | e029e0d7017f0972a4821e7fbddadddb7d7e0202eccf73c08c162771ee454c77 |
#!/usr/bin/env python
import sys
for i in range(0, len(sys.argv)):
if sys.argv[i] == '-A' and i < len(sys.argv)-1:
sys.path = sys.path + [sys.argv[i+1]]
import vtk
from vtk.util.misc import vtkRegressionTestImage, vtkGetDataRoot
# create planes
# Create the RenderWindow, Renderer
#
ren = vtk.vtkRenderer... | sgh/vtk | Graphics/Testing/Python/streamComb.py | Python | bsd-3-clause | 1,965 | [
"VTK"
] | ef5ed7073b5a0cc31ac82aebd1e3d1315174811cca26f6dc0994e08dc3f1e63e |
"""
The :class:`Structure` object is a collection of atoms in a periodic box.
The mandatory inputs are the cell vectors of the box and the chemical species
and *Cartesian coordinates* of the atoms.
The atoms are automatically folded back into the primary cell, so the
input coordinates don't need to lie inside the box.
... | mir-group/flare | flare/struc.py | Python | mit | 23,731 | [
"ASE",
"OVITO",
"VASP",
"pymatgen"
] | 64b8939265a35c4076795ece59285ad71777e32a4bbf757c4589d40fdc05e9a1 |
#-------------------------------------------------------------------------------
# Name: opan_const
# Purpose: Test objects for opan.const
#
# Author: Brian Skinn
# bskinn@alum.mit.edu
#
# Created: 10 Mar 2016
# Copyright: (c) Brian Skinn 2016
# License: The MIT License; see "li... | bskinn/opan | opan/test/opan_const.py | Python | mit | 1,488 | [
"Brian"
] | 83951890a996d2ea8361308f3fd432f419813a185273377dc22b7c9d6a770412 |
# -*- coding: utf-8 -*-
# This file is part of wger Workout Manager.
#
# wger Workout Manager 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 your option) any ... | wger-project/wger | wger/settings_global.py | Python | agpl-3.0 | 11,145 | [
"VisIt"
] | 6b9edc6ef066eb40614b5f5da3d6d98f15b687ddc7db93878a4dc3ad884b2195 |
# -*- coding: utf-8 -*-
import sys
from weixin.client import WeixinAPI
from weixin.oauth2 import OAuth2AuthExchangeError
if len(sys.argv) > 1 and sys.argv[1] == 'local':
try:
from test_settings import *
WeixinAPI.host = test_host
WeixinAPI.base_path = test_base_path
WeixinAPI.acc... | liulixiang1988/python-weixin | get_access_token.py | Python | bsd-3-clause | 1,480 | [
"VisIt"
] | cba7f4d4b019f26f13b5695533527bec314c812eeb7af4637ee51b1a0cc30bfc |
import matplotlib.pyplot as plt
import matplotlib
import pickle
import math
import numpy as np
import os
from astropy.io import fits
import pickle
from astropy.table import Table
import AnniesLasso_2 as tc
import sincinterpol
def log(x):
if x > 0:
return math.log10(x)
else:
return -np.inf
lo... | peraktong/Cannon-Experiment | Sinc_interpolation/0706_interpolation_adjust_pixel_distance.py | Python | mit | 8,905 | [
"VisIt"
] | 88e988ad68b315a9710386afd4620616aae1d61d0b3c31ea9573c73bb44415ea |
"""
Script for building the example.
Usage:
python setup.py build --build-lib=./
"""
from distutils.core import setup, Extension
#from Pyrex.Distutils import build_ext
import numpy
extensions = [
Extension("molGL", ["src/molGL.c"], #["src/molGL.pyx"],
libraries = [],
include_dirs =... | MDAnalysis/pyQuteMol | setup.py | Python | gpl-2.0 | 747 | [
"MDAnalysis"
] | 4ba8910d2c1abc2818ea2c1557f1ed66da25f4fb13fc450fb18286e938a6c896 |
#
# Copyright (C) 2010-2019 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | psci2195/espresso-ffans | doc/tutorials/02-charged_system/scripts/nacl_units_confined_vis.py | Python | gpl-3.0 | 5,732 | [
"ESPResSo"
] | 292ae7371acee56c7327b849276b1bd0c37bd584c57a0cb313837d69e9f086ef |
"""
Read region netCDF files with cell data.
This part of code is a reworked version of former orchestration2, that
depended heavily on yaml & dictionaries as a general approach. (Deprecated)
Current state is that it's not dependent on yaml anymore, configs goes into constructor etc.,
but there are still some more im... | felixmatt/shyft | shyft/repository/netcdf/region_model_repository.py | Python | lgpl-3.0 | 15,962 | [
"NetCDF"
] | f6e5ba03ea46e91d319f8ae7a4ee1ade7d4c45af0c5a32cbe144c30068f8c893 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import appdirs
import os
import os.path
import sys
import json
import glob
import subprocess
import shutil
import socket
import re
odoo_server = None
def pexec(cmd):
""" executes shell command cmd with the output
printed in the parent shell. Returns when th... | fvdsn/odoo-ook | ook/ook.py | Python | mit | 44,317 | [
"VisIt"
] | 5614878eca7c066935a96b77ad4e19ac8b808b3e1910ec3d25021e05038f3187 |
"""Read genome build configurations from Galaxy *.loc and bcbio-nextgen resource files.
"""
from six.moves import configparser
import glob
import os
import sys
from xml.etree import ElementTree
import six
import toolz as tz
import yaml
from bcbio import utils
from bcbio.cwl import cwlutils
from bcbio.distributed impo... | lbeltrame/bcbio-nextgen | bcbio/pipeline/genome.py | Python | mit | 13,607 | [
"Galaxy"
] | 326896f2d1644293e7a5e3cce43549dd063ad4d574a779a0ef45c6a6d38fdbb9 |
""" DIRAC.DataManagementSystem.private.FTS3Plugins package """
__RCSID__ = "$Id$"
| yujikato/DIRAC | src/DIRAC/DataManagementSystem/private/FTS3Plugins/__init__.py | Python | gpl-3.0 | 83 | [
"DIRAC"
] | 0f91643c78f9f2af62145c63f8423e34d50bc555eac984f781f65b9554bb70af |
# -*- coding: utf-8 -*-
#
# multimeter_file.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 License... | alberto-antonietti/nest-simulator | pynest/examples/multimeter_file.py | Python | gpl-2.0 | 6,030 | [
"NEURON"
] | 98f08d91cf7e9cc76f140ccc9217ac0f2a85841f386b9dff2d05597e18c81bba |
from __future__ import absolute_import
input_name = '../examples/diffusion/poisson.py'
output_name = 'test_poisson.vtk'
from tests_basic import TestInput
class Test( TestInput ):
pass
| rc/sfepy | tests/test_input_poisson.py | Python | bsd-3-clause | 189 | [
"VTK"
] | 14a1440ee275632a54d8912360048d11d1f4831f0d264813a6fe1917b5afd738 |
#! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
distribution = Dirac(0.7)
size = 10000
sample = distribution.getSample(size)
factory = DiracFactory()
covariance = CovarianceMatrix()
# Distribution estimatedDistribution(factory.build(sample, covari... | sofianehaddad/ot-svn | python/test/t_DiracFactory_std.py | Python | mit | 1,235 | [
"DIRAC"
] | 410790c257c69e2b879043cb7c399577456322ae98352777b6ffae8e8f5b7e30 |
# Copyright 2020 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 agreed to in writing, ... | google-research/graph-attribution | graph_attribution/mol_tasks.py | Python | apache-2.0 | 7,281 | [
"RDKit"
] | 57a277f22c7f87dfa79074d51bfac867229f41153872128ece79a11ded9c2b5f |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
import warnings
from pymatgen.analysis.transition_state import NEBAnalysis, combine_neb_plots
from pymatgen.util.testing import PymatgenTest
"""
TODO: Modify unittest do... | gmatteo/pymatgen | pymatgen/analysis/tests/test_transition_state.py | Python | mit | 3,079 | [
"pymatgen"
] | e4c9e03e24e82f9515b750e8a59cc29a6a24ff95c179e186b3430410a841dd16 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# submitfields - Submit job as fields
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | heromod/migrid | mig/cgi-bin/submitfields.py | Python | gpl-2.0 | 1,077 | [
"Brian"
] | 6034b33fc7fabcf29880f09a94dc4a392bfa014072d391a560f23ca63bdf0bb3 |
"""
The :mod:`sklearn.gp_search` includes utilities to fine-tune the parameters
of an estimator through a Gaussian Process model.
"""
from __future__ import print_function
# Author: Sebastien Dubois <http://bit.ly/SebastienDubois>,
# License: BSD 3 clause
import numpy as np
from scipy.stats import norm
from .gaussia... | Djabbz/scikit-learn | sklearn/gp_search.py | Python | bsd-3-clause | 15,295 | [
"Gaussian"
] | 29cc7a7c50ee1f57911a47a5ce53c36141978d2d3ddd153f9bb0ed46bdbf66da |
# pointsToSpheres.py copyright (c) 2005 by Charl P. Botha <cpbotha@ieee.org>
# $Id$
# see module documentation
import gen_utils
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import wx
import vtk
class pointsToSpheres(ScriptedConfigModuleMixin, ModuleBase):
... | nagyistoce/devide | modules/misc/pointsToSpheres.py | Python | bsd-3-clause | 8,922 | [
"VTK"
] | 46871528ed949d97d6ef2f5c7e8d2f539929e4cd562f5a255ca9894072bcedf6 |
"""
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Pu... | mapclient-plugins/fieldworklowerlimb2sidegenerationstep | mapclientplugins/fieldworklowerlimb2sidegenerationstep/lowerlimbgenerationdialog.py | Python | apache-2.0 | 27,250 | [
"VTK"
] | 23710ec1ce46a03c1290906b7b3e27364cce5add14ea3a58d7b66172ccbf0ede |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import warnings
from pymatgen.util.testing import PymatgenTest
from pymatgen.alchemy.filters import ContainsSpecieFilter
from pymatgen.alchemy.transmuters import CifTransmuter, PoscarTransmuter
from pymatgen.transf... | vorwerkc/pymatgen | pymatgen/alchemy/tests/test_transmuters.py | Python | mit | 3,757 | [
"pymatgen"
] | 78a6f797ce2459a5bc4bc10c129e06a8ab041f6984241bcf32e5b17960f347ce |
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2020, 2021 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on 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 Fo... | IfcOpenShell/IfcOpenShell | src/blenderbim/blenderbim/bim/ui.py | Python | lgpl-3.0 | 11,198 | [
"VisIt"
] | 205cf5d351f6ceb7d61f860e8626b2dd0e79c55a6d10b530cbd980a984b7afa0 |
#
# Copyright (C) 2020 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | KaiSzuttor/espresso | testsuite/python/p3m_tuning_exceptions.py | Python | gpl-3.0 | 7,437 | [
"ESPResSo"
] | 49f11603c45353f03c1e706a0c599eeae4608b8ac36a7adfdb3d9347159d78bb |
from abc import ABCMeta, abstractmethod
from pyalgs.algorithms.commons.union_find import UnionFind
from pyalgs.algorithms.commons.util import less
from pyalgs.data_structures.commons.bag import Bag
from pyalgs.data_structures.commons.priority_queue import MinPQ, IndexMinPQ
from pyalgs.data_structures.graphs.graph impo... | chen0040/pyalgs | pyalgs/algorithms/graphs/minimum_spanning_trees.py | Python | bsd-3-clause | 3,358 | [
"VisIt"
] | c4cb17ebbd9c38fe1bb1deb32ad13119c971f1e0b508d84bb3d73c551ac69d58 |
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.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... | dagwieers/ansible | lib/ansible/executor/module_common.py | Python | gpl-3.0 | 48,404 | [
"VisIt"
] | ae5129dbddcc41c9782b8de24b00c1cb9393de6dd1393995cd972a8a39e7dc28 |
import unittest
from pyAmore.baseline.interface import *
from pyAmore.baseline.neuron_fit_strategies import *
class TestNeuronFitStrategy(unittest.TestCase):
def test_init(self):
neural_network = mlp_network([3, 2, 1], 'tanh', 'tanh')
neuron = neural_network.layers[1][0]
self.assertEqual... | mcasl/AMORE | pyAmore/tests/baseline_tests/test_neuron_fit_strategy.py | Python | gpl-3.0 | 2,614 | [
"NEURON"
] | 2d534571649ab3a9155d0633a11ccd3c1362e9c4276ee4c4af910a2553b1e7e9 |
## Code outside the data string, and the setup and action blocks is ignored
## If manually editing, you must reload the code. Delete the resource timestamp so kaithem knows it's new
__data__="""
continual: false
enable: true
once: true
priority: interactive
rate-limit: 0.0
resource-timestamp: 1622980209179690
resource-... | EternityForest/KaithemAutomation | kaithem/data/modules/Examples/Misc/Native CherryPy Page.py | Python | gpl-3.0 | 1,488 | [
"VisIt"
] | 99bf1c66c15d10b4f09f355081ecd5dac5ccdcc0f66ef62ce489cb0c6df3fb9f |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals, \
absolute_import
import os
import unittest
from pymatgen.io.lammps.force_field import ForceField
from pymatgen.io.lammps.topology import... | xhqu1981/pymatgen | pymatgen/io/lammps/tests/test_topology_forcefield.py | Python | mit | 5,123 | [
"LAMMPS",
"pymatgen"
] | 442792f237fa3c8d85fd64ad6c267ee17f9d0c7a0f5838a86e8caaf5f5cdb1c1 |
import datetime
from django.core.management.base import NoArgsCommand
from django.contrib.sites.models import Site
from pombola.feedback.models import Feedback
class Command(NoArgsCommand):
help = 'Report all the feedbac that needs attention'
args = ''
def handle_noargs(self, **options):
pendin... | patricmutwiri/pombola | pombola/feedback/management/commands/feedback_report_pending.py | Python | agpl-3.0 | 873 | [
"VisIt"
] | 3e7a8bf68e980483429c71a6c4099961d71bc1ea17b38425ced936b22d4132ee |
"""
NetCDF reader/writer module.
This module is used to read and create NetCDF files. NetCDF files are
accessed through the `netcdf_file` object. Data written to and from NetCDF
files are contained in `netcdf_variable` objects. Attributes are given
as member variables of the `netcdf_file` and `netcdf_variable` objects... | person142/scipy | scipy/io/netcdf.py | Python | bsd-3-clause | 39,240 | [
"NetCDF"
] | 36710b472bba96abc1381f437a57d275b66a981c54f482e2c358aff109995522 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2005-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2010 Nick Hall
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Gary Burton
#
# This program ... | arunkgupta/gramps | gramps/gui/viewmanager.py | Python | gpl-2.0 | 75,267 | [
"Brian"
] | eaafdb1a885d0acdf6a2f3b8bd61698a09cfd7ae1203ea2d9c890f6769947a15 |
"""Guess the MIME type of a file.
This module defines two useful functions:
guess_type(url, strict=1) -- guess the MIME type and encoding of a URL.
guess_extension(type, strict=1) -- guess the extension for a given MIME type.
It also contains the following, for tuning the behavior:
Data:
knownfiles -- list of fil... | MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.7/Lib/mimetypes.py | Python | mit | 20,597 | [
"NetCDF"
] | 795de5dc4e38618950806f60dff0f4e96d7202d20ad872318a0d6ba19f2d834f |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkSQLTableReader(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk... | nagyistoce/devide | modules/vtk_basic/vtkSQLTableReader.py | Python | bsd-3-clause | 484 | [
"VTK"
] | fa9ff8e2ae39e432b375c6b231b5abfe7d8d05b7a7b9589ab0a5dae946258af1 |
#! /usr/bin/env python
#
# pylcd
# (c) 2002, 2003 Tobias Klausmann
# You're welcome to redistribute this software under the
# terms of the GNU General Public Licence version 2.0
# or, at your option, any higher version.
#
# You can read the complete GNU GPL in the file COPYING
# which should come along with this softwa... | agrover/pylcd | setup.py | Python | gpl-2.0 | 780 | [
"VisIt"
] | 9f26aaee98bca1030da3ad2040fc6199a6260963a205380bee4e210130ffda51 |
""" Multi-task networks. """
import numpy as np
import tensorflow as tf
from neural_networks import nn
from neural_networks import scalers
class MTN(nn.NN):
def __init__(self, x_dim, y_dim,
arch=[128, 128], ntype='plain', **kwargs):
""" A multi-task network.
The output is a concaten... | kjchalup/neural_networks | neural_networks/mtn.py | Python | gpl-3.0 | 7,773 | [
"Gaussian"
] | 0483309b4bccb765c75210086c82c55ad569fd48a08db9fe422bb29f37d5fcd5 |
'''
Usage:
degen.py <fasta> (--gb-id <accession_id> | --gb-file <gbfile> | --tab-file <tabfile>)
Options:
--gb-id=<accession_id> Accession id for reference
--gb-file=<gbfile> Genbank file for reference
--tab-file=<tabfile> TSV/CSV file for reference with fields name,start,end
'''
from __fu... | VDBWRAIR/bio_pieces | bio_bits/degen.py | Python | gpl-2.0 | 6,659 | [
"Biopython"
] | be2146bb6cec1d1b749f6d98b424bd39ba89d526d4025ac02dfcc4f9cb6ab32e |
# Copyright 2010-2020 Kurt McKee <contactme@kurtmckee.org>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
# This file is a part of feedparser.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistrib... | Vagab0nd/SiCKRAGE | lib3/feedparser/http.py | Python | gpl-3.0 | 9,674 | [
"NetCDF"
] | d6d7ba53635723b4c89aa10b416bd98d5e6d9e58629d0eff284f2f3cc2df80fb |
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import sys
import os
from functools import partial
from collections import namedtuple
from powerline.segments import shell, tmux, common
from powerline.lib.vcs import get_fallback_create_watcher
from po... | wfscheper/powerline | tests/test_segments.py | Python | mit | 66,005 | [
"FEFF"
] | 567ced04c6218e9c0cfb83a364f32e72f76c702d382547f7817ae274a0575a09 |
"""
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permission to us... | bgoli/pysces | pysces/PyscesJWSParse.py | Python | bsd-3-clause | 32,049 | [
"PySCeS"
] | c7795cab02a9616812a6bdfda8ab72586bf81fb357e692507f84d492d29cc372 |
from setuptools import setup
long_description = '''
**spm1d** is a Python package for <b>one-dimensional Statistical Parametric Mapping<b>.
spm1d uses <b>Random Field Theory</b> expectations regarding the behavior of smooth,
one-dimensional Gaussian fields to make statistical inferences regarding a set of
one-dimen... | 0todd0000/spm1d | setup.py | Python | gpl-3.0 | 995 | [
"Gaussian"
] | e330261ce17210b299dac059abf31ac96bc4d3ff44f8a6d15fcb184cde606cbd |
#!/usr/bin/env python
import sys
import numpy as np
import pandas as pd
import pysam
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
import seaborn as sns
from functools import partial
tumor = pysam.AlignmentFile(snakemake.input[0], "rb")
normal = pysam.AlignmentFile(snakemake.input[1], "rb")
... | PROSIC/prosic-evaluation | scripts/bam-stats.py | Python | mit | 1,359 | [
"pysam"
] | 42029c42863c4517a56ac5b2ddac06685dc9e323ab598d2bf9c216ca01a24cf4 |
##############################################################################
# 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... | lgarren/spack | var/spack/repos/builtin/packages/r-affyilm/package.py | Python | lgpl-2.1 | 2,062 | [
"Bioconductor"
] | 1a9d6b7c352acf5cc1236e1cbfdc4a3dab56d617e85aef4d4412d40eddb6322d |
########################################################################
# $HeadURL$
########################################################################
from DIRAC.Core.Utilities.List import intListToString, stringListToString
""" DIRAC FileCatalog component representing a directory tree with
a closure table
... | vmendez/DIRAC | DataManagementSystem/DB/FileCatalogComponents/WithFkAndPs/DirectoryClosure.py | Python | gpl-3.0 | 21,031 | [
"DIRAC"
] | 730b735f7a7016045ca671304f53e5c7c42839f19924a77d410fc4ac4fb56194 |
#
# Copyright (C) 2004-2006 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.
#
import os
import unittest
f... | rvianello/rdkit | rdkit/Chem/Pharm3D/UnitTestPharmacophore.py | Python | bsd-3-clause | 5,806 | [
"RDKit"
] | 2842d7296e27fa6b7a9d8d76853c4a98ec54476d9464d93ddc3d374dd5fb6e4e |
import argparse
import errno
import os
import platform
from pylru import lrudecorator
import re
import subprocess
import sys
import threading
import time
class FullPaths(argparse.Action):
"""Expand user- and relative-paths"""
def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace... | ricardog/raster-project | projections/utils.py | Python | apache-2.0 | 6,502 | [
"NetCDF"
] | e70e26564851823e734ae8fad09fda9865e1a5a6a067a9ef31ee7e4934ccf976 |
# Utility methods for dealing with Dataset objects
import logging
import warnings
from typing import Any, List
import numpy as np
import pandas as pd
from scipy import stats
logger = logging.getLogger(__name__)
try:
import sqlalchemy
from sqlalchemy.engine.default import DefaultDialect
from sqlalchemy.s... | great-expectations/great_expectations | great_expectations/dataset/util.py | Python | apache-2.0 | 22,199 | [
"Gaussian"
] | d73e3baebb4716e7dfdb053394258cc1a5213c0d038a8f5fb9324a28349f2e09 |
from .. import Availability, Class, Constant, Define, Method, Parameter, Type
gx_class = Class('FFT',
doc="""
This class allows for the application of predefined
filters to data in an OASIS database. The system uses
the Winograd algorithm to transform... | GeosoftInc/gxapi | spec/desk/FFT.py | Python | bsd-2-clause | 19,496 | [
"Gaussian"
] | bd7afc8ee00f102d4b9192674f90520d9955ba6ee0a59e3bbd29855e86fb9a58 |
# -*- coding: utf-8 -*-
import os
import config
import vcrparser
# Conditional library load according to 'config.mode'
if config.mode == "LSF":
import sys_LSF as manager
elif config.mode == "LOCAL":
import sys_single as manager
else:
import sys_OTHER as manager
sample_checker = " && (echo '#SAMPLE' >> #FOL... | HudsonAlpha/aRNAPipe | lib/programs.py | Python | mit | 27,486 | [
"HTSeq"
] | be76ea9338ff25f5a3463ceae59ae39e95ae6801bc1f8e57ff108ef0f604324a |
# lif.py ---
#
# Filename: lif.py
# Description:
# Author:
# Maintainer:
# Created: Sun Jul 8 14:00:31 2012 (+0530)
# Version:
# Last-Updated: Tue Jul 17 16:45:44 2012 (+0530)
# By: subha
# Update #: 187
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
# Demonstrates use of Leaky Int... | dilawar/moose-full | moose-examples/snippets/lif.py | Python | gpl-2.0 | 4,305 | [
"MOOSE",
"NEURON"
] | 2bed626deb6cb1b5221c0a686598a6164111ee82cc766671425f9620def18106 |
# coding: utf-8
from __future__ import division, print_function, unicode_literals, \
absolute_import
import unittest
import os
import json
import numpy as np
import pandas as pd
from pymatgen import Structure
from veidt.abstract import Describer
from veidt.describer.structural_describer import DistinctSitePrope... | czhengsci/veidt | veidt/model/tests/test_models.py | Python | bsd-3-clause | 5,371 | [
"pymatgen"
] | 77b97cf6032106fcca9ad614be1b99de6801555a671f1a2090d92223e579d3f4 |
# -*- coding: utf-8 -*-
#
# qcdb documentation build configuration file, created by
# sphinx-quickstart on Sun Sep 14 00:04:33 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | loriab/qcdb | docs/source/conf.py | Python | lgpl-3.0 | 9,450 | [
"Psi4"
] | a6124e4c05640e0e3367240ed6bc960c320eacf374304c855928e8865d78da85 |
import unittest
from botocore.exceptions import ParamValidationError
from botocore.stub import Stubber
from envs import env
from mock import patch
from warrant import Cognito, UserObj, GroupObj, TokenVerificationException
from warrant.aws_srp import AWSSRP
def _mock_authenticate_user(_, client=None):
return {
... | capless/cognito | warrant/tests/tests.py | Python | gpl-3.0 | 14,467 | [
"Brian"
] | 0ea9fff30e53337e5d5d79e78296770e5a941a05929643f0ae4fb86186559df4 |
import astropy.io.fits as pyfits
import astropy.wcs as pywcs
import os, sys, time
import numpy as np
from pdb import set_trace
import montage_wrapper as montage
import shutil
import gal_data
import config
import glob
from scipy.ndimage.interpolation import zoom
#_TOP_DIR = '/data/tycho/0/leroy.42/allsky/'
#_INDEX_DIR... | arlewis/galaxy_cutouts | tests/single_cutout_test_newmethod.py | Python | mit | 18,328 | [
"Galaxy"
] | 02ff56b495f6947adfd6be540d126889ef8ef97de7578044941ea6ae4ca59f72 |
import numpy as np
from scipy import optimize
from scipy import stats
def moments(data,circle,rotate,vheight):
"""Returns (height, amplitude, x, y, width_x, width_y, rotation angle)
the gaussian parameters of a 2D distribution by calculating its
moments. Depending on the input parameters, will only output... | pyrrho314/recipesystem | trunk/nici/gemfit.py | Python | mpl-2.0 | 7,571 | [
"Gaussian"
] | 797a38716f0d6c1d9915a367b7e2e9b644e61055b134ca0db974dfc53da9371f |
""" This is a test of the chain
ResourceStatus -> ResourceStatusHandler -> ResourceStatusDB
It supposes that the DB is present, and that the service is running
"""
# pylint: disable=invalid-name,wrong-import-position
from __future__ import print_function
from __future__ import absolute_import
from __future__ ... | yujikato/DIRAC | tests/Integration/ResourceStatusSystem/Test_ResourceStatus.py | Python | gpl-3.0 | 19,315 | [
"DIRAC"
] | a91b02f5e22a8567e2ed33e446afc0b9f37f8e5b803c3c1b00074bfcd324e637 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
__author__ = 'kmunve'
__created__ = '2015-09-23'
__version__ = "0.1"
__status__ = "Development"
import os
import netCDF4
import datetime
'''
Wrapper for the fimex command.
Requires fimex to be installed.
'''
def extract_nc_subset(n... | kmunve/TSanalysis | Test/make_extract_sh.py | Python | mit | 2,191 | [
"NetCDF"
] | 6193c730f6770b0d9b243e9178e19a62c2764efb20e700bbcade21a4fb86e356 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# sendrequestaction - handle user requests e.g. for vgrid or resource access
# Copyright (C) 2003-2011 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the t... | heromod/migrid | mig/cgi-bin/sendrequestaction.py | Python | gpl-2.0 | 1,121 | [
"Brian"
] | 0fe1234156d5fb8483a16bca9762e48c39aad4e864f6bdf4aff731cc45b02f72 |
#!/usr/bin/env python3
#
# A PyMol extension script for batch converting objects (originally intended
# to convert into .obj models).
#
def main():
"""main"""
raise RuntimeError('This module should not be executed as a script')
if __name__ =='__main__':
main()
in_pymol = False
try:
... | joy13975/elfin | pymol_scripts/extensions/batch_convert.py | Python | mit | 2,221 | [
"PyMOL"
] | 0cf5b348089d9ed34646f3abb040f309567106bc61f2833c7dd276630ea5cc94 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Extract sequences from a fasta file if their name is in a 'wanted' file.
Wanted file contains one sequence name per line.
Usage:
%program <input_file> <wanted_file> <output_file>"""
import sys
import re
try:
from Bio import SeqIO
except:
print "This prog... | wkh124/wkh124 | fasta_extract_name.py | Python | gpl-3.0 | 924 | [
"Biopython"
] | c11a15cf4d3275b74f37f93e0ecc7d5084eccb9abc5a5a04e3d800ab46bbd59f |
from __future__ import print_function
import os
import sys
from time import ctime
import numpy as np
from ase.units import Hartree
from ase.utils import devnull
from scipy.special.orthogonal import p_roots
from gpaw import GPAW
import gpaw.mpi as mpi
from gpaw.response.chi0 import Chi0
from gpaw.wavefunctions.pw imp... | robwarm/gpaw-symm | gpaw/xc/rpa.py | Python | gpl-3.0 | 15,513 | [
"ASE",
"GPAW"
] | 36f87678a916c0ca40d8b25b7424d3949cc7b36cf945524f8f0442f153802184 |
# 332. Reconstruct Itinerary Add to List
# DescriptionHintsSubmissionsSolutions
# Total Accepted: 32385
# Total Submissions: 112814
# Difficulty: Medium
# Contributor: LeetCode
# Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of... | shawncaojob/LC | PY/332_reconstruct_itinerary.py | Python | gpl-3.0 | 4,858 | [
"VisIt"
] | 632b383c9e0044b2182f8ab3ea61a725f696ff474d997a27cea8d86d369d324b |
#!/usr/bin/env python
##Import Modules
from sys import exit
from sys import argv
import argparse
Description = """
Script to merge reciprocal orthologs from multiple species
and a single database. The sequence IDs from the database should be
in the first column of each file that is merged. The ortholog seq ID
from th... | grovesdixon/metaTranscriptomes | scripts/mergeReciprocalOrthos.py | Python | mit | 3,810 | [
"BLAST",
"Biopython"
] | 7c972736789a1971951fd0d6577981d13aff014d4d75cb92671a28ad1d144dea |
# -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | to266/hyperspy | hyperspy/io_plugins/netcdf.py | Python | gpl-3.0 | 6,637 | [
"NetCDF"
] | 099a7c12ffc6171b4a34c8da1de99f7f8763c90abe55b11b7f885e78d7fd004d |
r"""
Median and Mean for Cauchy distribution
---------------------------------------
Figure 3.12.
The bottom panel shows a sample of N points drawn from a Cauchy distribution
with :math:`\mu = 0` and :math:`\gamma=2`. The top panel shows the sample
median, sample mean, and two robust estimates of the location paramete... | kcavagnolo/astroML | book_figures/chapter3/fig_cauchy_median_mean.py | Python | bsd-2-clause | 4,370 | [
"Gaussian"
] | 22acb16b2df54769fbea227c86c2f62faf50f23f315e61b9ad1d5f1c6922a376 |
from pypers.core.step import CmdLineStep
class AlignMapping(CmdLineStep):
spec = {
"version": "0.6.1",
"descr": [
"Runs bwa mapping using the aln algorithm and generates an sai file"
],
"args":
{
"inputs": [
{
"name... | frankosan/pypers | pypers/steps/bwa/alignmapping.py | Python | gpl-3.0 | 1,336 | [
"BWA"
] | 390d054bf4f3bc8621aa7da41f897ef6a0db8fd4d08b8140aff1c3a7bf9e1365 |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 9 15:52:38 2016
@author: nebula
"""
import os
from swc2vtk.vtkgenerator import VtkGenerator
filelist_small = [
'0004_regist',
'0005_regist',
'0008_regist',
'0009_regist',
'0012_regist',
'0017_regist',
'0986_regist',
]
filelist_small2 = [
... | DaisukeMiyamoto/swc2vtk | examples/gen_volume.py | Python | apache-2.0 | 1,260 | [
"VTK"
] | b93045035e4a639bb93efa7198d205f25f0c1de514d622b3e283402b52dcebc3 |
"""
End-to-end test for cohorted courseware. This uses both Studio and LMS.
"""
import json
from nose.plugins.attrib import attr
from studio.base_studio_test import ContainerBase
from common.test.acceptance.pages.studio.settings_group_configurations import GroupConfigurationsPage
from common.test.acceptance.pages.st... | romain-li/edx-platform | common/test/acceptance/tests/test_cohorted_courseware.py | Python | agpl-3.0 | 9,676 | [
"VisIt"
] | 7b7934bb6d6f3b46e1f9070b6e85da25b98db28a6e9f45e3c7ccfad6acf1699f |
'''
SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D., Hirsh Nanda, Ph.D.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your optio... | madscatt/zazzie | src_2.7/sassie/calculate/sld_mol/sld_mol.py | Python | gpl-3.0 | 45,256 | [
"Gaussian"
] | 8dedbcfb00b94326d4e5dcaad3e855b31b0d7f3ba0126025ce4286227b62d749 |
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | tensorflow/compression | models/ms2020.py | Python | apache-2.0 | 28,489 | [
"Gaussian"
] | d1a9c94074b5cd3451fdec35fedb5f82005fb19646bd8f681ebeb56abe20d8b5 |
from __future__ import print_function
from __future__ import absolute_import
import os
import numpy as nm
from sfepy.base.base import get_default, Struct, output
from sfepy.base.ioutils import get_print_info
from sfepy.base.timing import Timer
from sfepy.discrete.fem import extend_cell_data, Mesh
from sfepy.homogeniz... | rc/sfepy | sfepy/homogenization/recovery.py | Python | bsd-3-clause | 25,120 | [
"VTK"
] | 283afc111edc7dd82a38a52c458f59cbfe8e2d0b4d76d6caa5c149823854e769 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-19 11:28
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ui', '0001_initial'),
]
operations = [
migra... | vyourtaev/ally | ui/migrations/0002_auto_20170519_1128.py | Python | gpl-3.0 | 1,464 | [
"Elk"
] | f4e4757445835a0661a6f06de9e7b15f35ce3d4f0188821dc765e21e33f1a5f3 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | rajalokan/keystone | keystone/tests/hacking/checks.py | Python | apache-2.0 | 14,985 | [
"VisIt"
] | 453cc2d2c042cad1cb4507c2259fd4f1512ba6e852a94744b90b6711e7677ea9 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | andreaso/ansible | lib/ansible/modules/network/avi/avi_sslprofile.py | Python | gpl-3.0 | 7,849 | [
"VisIt"
] | d62c6bad5a5cab3a25c77b90dad812c94852c0d7273dab727817a8ab1d08a89e |
""" Contains Shots device base class."""
# shot.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
# Documentation and more info at http://missionpinball.com/mpf
import uuid
from collections import OrderedDict
from mpf.s... | qcapen/mpf | mpf/devices/shot.py | Python | mit | 29,922 | [
"Brian"
] | 18911e5bfe28afb780ac49060733735b64c7bbc9601879b0451ec82777780304 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetR... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Rendering/Core/Testing/Python/CamBlur.py | Python | gpl-3.0 | 1,969 | [
"VTK"
] | d7ec9b05fbb888e4b09b7fcba764f03a4c1369df841414ff8ac6e5053b5425ab |
#!/usr/bin/env python
#writes dot files for use with gnu dot graph drawing
import tm3
import string
import sys
import statistics
import operator
import munkreskuhn
import unionfind2
import geometry
import collections # for defaultdict
colorDict = {
0: 'white',
1: 'blue', 11: 'darkyellow', 21... | ryancoleman/traveldistance | src/dot.py | Python | gpl-2.0 | 37,038 | [
"PyMOL"
] | a6d387b34893727df3ffea067ed35a4fcd3fb9fb4b502dce2e1c735ae9685613 |
# Orca
#
# Copyright 2004-2009 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/script.py | Python | gpl-3.0 | 23,592 | [
"ORCA"
] | 9cba021a7bc7227f8abdc8171be0e42a92aa06d1973c7077d3b9f0a26930284f |
"""
Common DBM Layer classes
"""
from __future__ import print_function
__authors__ = ["Ian Goodfellow", "Vincent Dumoulin"]
__copyright__ = "Copyright 2012-2013, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
import functools
import logging
import num... | w1kke/pylearn2 | pylearn2/models/dbm/layer.py | Python | bsd-3-clause | 127,346 | [
"Gaussian"
] | 852b7ad8d461a7b89bc4e3e04403a6db26adda62f89a07d04ca463fd324a88a1 |
def prince(the_network, **kwargs):
"""
Based on Vanunu, O., Magger, O., Ruppin, E., Shlomi, T., & Sharan, R. (2010).
Associating genes and protein complexes with disease via network propagation.
PLoS computational biology, 6(1), e1000641. doi:10.1371/journal.pcbi.1000641
Credits for the nampy tran... | hostviralnetworks/nampy | nampy/monopartiteanalysis/prince.py | Python | gpl-3.0 | 8,582 | [
"Brian"
] | e98e825053fc2cb7bbdfdebb328396420ba4b0de59e98ba687288687f48e36f6 |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | psci2195/espresso-ffans | samples/visualization_lbboundaries.py | Python | gpl-3.0 | 1,759 | [
"ESPResSo"
] | e3a41136ad3958f089ef886ea61feec5c17318eabeaf338b27e6c5050c4a3c1f |
"""
Functional GUI tests: run_basic() and run_detailed().
"""
import copy
from numpy import array
from numpy.testing import assert_array_equal
import topo
import topo.tests.functionaltest as ft
from topo.tests.utils import assert_array_not_equal
from nose.tools import nottest
def run_basic():
"""Check that t... | Tasignotas/topographica_mirror | topo/tests/gui_tests.py | Python | bsd-3-clause | 6,348 | [
"Gaussian"
] | 70d63b3b155cb678cd0a13bdfafb493add452934bb171f92fe210625cf10217d |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import decimal
import os
import time
import pytest
from django.cor... | suutari/shoop | shuup_tests/browser/admin/test_refunds.py | Python | agpl-3.0 | 4,879 | [
"VisIt"
] | e8d5c5457c45e7f0034c61c20f12379b99460dff3a82ce966775d869e9b71f90 |
import meshio
import logging
import pandas as pd
import numpy as np
logger = logging.getLogger(name=__name__)
def save_triangular_mesh(filename, eptm):
coords = eptm.coords
eptm.reset_index(order=True)
if (filename[-3:] == 'ply') or (filename[-3:] == 'obj'):
points, faces = eptm.triangular_mesh... | CellModels/tyssue | tyssue/io/meshes.py | Python | gpl-2.0 | 3,511 | [
"VTK"
] | 8abedf7b010723ea9ba39e45bfc4e0b8152e38b14e0608b1c362d32de8eb9726 |
from lettuce import world, step
from lettuce.django import mail
from lettuce.django import django_url
from nose.tools import assert_equals
@step(u'I visit "([^"]*)"')
def visit(step, url):
world.browser.visit(django_url(url))
@step(u'I see "([^"]*)"')
def see(step, text):
assert world.browser.is_text_prese... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/lettuce/django/tests/functional/steps.py | Python | agpl-3.0 | 566 | [
"VisIt"
] | 46c9461dd2d1b1e1ee5f0ca603cc855298bc0adea758aa5c23464d15447c04bb |
""" IdProvider base class for various identity providers
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from DIRAC import gLogger
__RCSID__ = "$Id$"
class IdProvider(object):
def __init__(self, parameters=None):
self.log = gLogger.getSubLogger... | yujikato/DIRAC | src/DIRAC/Resources/IdProvider/IdProvider.py | Python | gpl-3.0 | 452 | [
"DIRAC"
] | 33547eda889544659b4a1c28f0afdc5b78138598671d0647ded1e2fe16f078e4 |
#! /usr/bin/env python
#
# The purpose of this script is to create a moltemplate lt file for the oplsaa.
# forcefield. This will assist researchers in building complex simulations using
# this OPLS-UA and the OPLS-AA forcefields.
__author__="Jason Lambert"
# (some additional corrections by Miguel Gonzalez and Andrew ... | crtrott/lammps | tools/moltemplate/src/oplsaa_moltemplate.py | Python | gpl-2.0 | 17,099 | [
"LAMMPS",
"TINKER"
] | 9674e45cd412ba6ab19a7ce7d0d83f404ae0db92949d8465ce7d884520aa99b7 |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import re
from collections import defaultdict
def get_program_parameters():
import argparse
description = 'Produce a list of VTK examples that have missing test images.'
epilogue = '''
Typical usage:
For ea... | lorensen/VTKExamples | src/Admin/FindMissingTestImages.py | Python | apache-2.0 | 15,939 | [
"VTK"
] | 42a2aa5a05e5546e812e25f79c6df4e4b7f19c97e50c7a033b6e641b05d41614 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.