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 |
|---|---|---|---|---|---|---|---|
"""
1
/ \
/ \
/ \
2 3
/ \ /
4 5 6
/ / \
7 8 9
The correct output should look like this:
preorder: 1 2 4 7 5 3 6 8 9
inorder: 7 4 2 5 1 8 6 9 3
postorder: 7 4 5 2 8 9 6 3 1
level-order: 1 2 3 4 5 6 7 8 9
"""
# pre-order, in-order, a... | armsky/Algorithms | Data Structure/tree.py | Python | apache-2.0 | 2,141 | [
"VisIt"
] | 5b416c2ecad46d7d40d43f33cd855724490b1df7827972506c0bcddb3de42ebb |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | framework/scripts/syntaxHTML/generate_input_syntax.py | Python | lgpl-2.1 | 1,221 | [
"MOOSE"
] | f3962144f42ccf68a3f913c39f7fbef61fab438a33b19adbd946d31f5f28c30d |
from copy import deepcopy
import logging
from math import floor
import os
from os.path import join as pjoin
import warnings
from warnings import warn
import numpy as np
import nibabel as nib
from mayavi import mlab
from mayavi.tools.mlab_scene_model import MlabSceneModel
from mayavi.core import lut_manager
from maya... | nipy/PySurfer | surfer/viz.py | Python | bsd-3-clause | 148,235 | [
"Mayavi",
"VTK"
] | d287111796b41862d38009754d7a37b81dd305130a5d75b0f7dabcaeb0c426db |
# This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.constants` namespace for importing the functions
# included below.
import warnings
from . import _constants
__all__ = [ # noqa: F822
'Avogadro', 'Boltzmann', 'Btu', 'Btu_IT', 'Btu_th', 'G',
'Julian_year', 'N_A', 'P... | grlee77/scipy | scipy/constants/constants.py | Python | bsd-3-clause | 2,477 | [
"Avogadro"
] | 93c20e0ed1a4927678e1c9431448a15696abbe3245c040c6e39e15da87f80694 |
"""
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes, __version__ as sphinx_ver
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.writers.html import SmartyPantsHTMLTranslato... | paour/weblate | docs/_ext/djangodocs.py | Python | gpl-3.0 | 12,011 | [
"VisIt"
] | 0c54d21e646f33114228a12a968ea4736fe7124a6ab3084348a395dba2cd3150 |
from ase.structure import molecule
from gpaw import GPAW
from gpaw.wavefunctions.pw import PW
from gpaw.mpi import world
a = molecule('H', pbc=1)
a.center(vacuum=2)
comm = world.new_communicator([world.rank])
e0 = 0.0
a.calc = GPAW(mode=PW(250),
communicator=comm,
txt=None)
e0 = a.get_pote... | robwarm/gpaw-symm | gpaw/test/pw/h.py | Python | gpl-3.0 | 637 | [
"ASE",
"GPAW"
] | 39c2f665efa9b457c23dc53288011aa88ba963543636b1056e9a075cd0f4602e |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import subprocess
class Turbomole(Package):
"""TURBOMOLE: Program Package for ab initi... | iulian787/spack | var/spack/repos/builtin/packages/turbomole/package.py | Python | lgpl-2.1 | 6,080 | [
"TURBOMOLE"
] | e364da8a896de31d9a6d867e27cf7c1c0270330d61fa18c432b599143e83096f |
##############################################################################
# Copyright (c) 2013-2018, 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... | EmreAtes/spack | var/spack/repos/builtin/packages/atom-dft/package.py | Python | lgpl-2.1 | 2,074 | [
"SIESTA"
] | fd5048cc050d1675790c2c71e51f401367667b971bc6710284dab31dee980935 |
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------... | Kleptobismol/scikit-bio | skbio/parse/sequences/tests/test_clustal.py | Python | bsd-3-clause | 6,048 | [
"scikit-bio"
] | 8ac7a37172599b3513d74708069a0015bc8f9471ba77ed46db056744a8e06d7f |
from typing import Any, DefaultDict, Dict, List, Set, Tuple, TypeVar, \
Union, Optional, Sequence, AbstractSet, Callable, Iterable
from typing.re import Match
from django.db import models
from django.db.models.query import QuerySet
from django.db.models import Manager, Sum, CASCADE
from django.conf import settings... | tommyip/zulip | zerver/models.py | Python | apache-2.0 | 120,452 | [
"VisIt"
] | 01b6d345b931b053b48da958de9d1e91eb33306347bd8eb560bf5271e8371249 |
"""
=======================================
Signal processing (:mod:`scipy.signal`)
=======================================
Convolution
===========
.. autosummary::
:toctree: generated/
convolve -- N-dimensional convolution.
correlate -- N-dimensional correlation.
fftconvolve -- N-dimensional convol... | dch312/scipy | scipy/signal/__init__.py | Python | bsd-3-clause | 10,615 | [
"Gaussian"
] | 1ddb1af1120c67efa832c96842c7bd0cecb2ec0d1fe79fd2b6540d2c0e379788 |
import random
def generate_haiku_name():
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing"... | amonapp/amon | amon/utils/haiku.py | Python | agpl-3.0 | 1,790 | [
"Firefly"
] | 3f0c5d46473e732357a453a37c8deb79fd8f71fdcc7d1901fca1424ddbf97602 |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2016 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | crisely09/horton | horton/gbasis/test/test_gobasis.py | Python | gpl-3.0 | 24,212 | [
"Gaussian"
] | 89b47249cd1909b11758de80d5818675b8cbc8131478d11d164aec3670c1a282 |
#!/usr/bin/env python3
from .sht import sht, isht
from . import utils
from . import grids
# Try importing the plot module. This will fail if mayavi isn't installed.
# But requiring mayavi is too much overhead for the other sht modules. The plot
# module will work automatically if mayavi is installed.
# FIXME This cr... | praveenv253/sht | sht/__init__.py | Python | mit | 698 | [
"Mayavi"
] | 622579b5426595dbd47a9797492521bbc96b378f9115379973edb165b4ee6fbf |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright (C) 2013 Canaima GNU/Linux
<desarrolladores@canaima.softwarelibre.gob.ve>
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 ... | willicab/instalador | instalador/mod_accesible.py | Python | gpl-2.0 | 1,754 | [
"ORCA"
] | 44c6a281eba9c15912cd7c94c0dc63fd1135a51469cd3ff1ffa92d4aafbb1ff0 |
"""Various tests for the Crystal class and its methods.
"""
import numpy as np
import pytest
from operator import mod
from itertools import product
from pydft.crystal import *
from pydft.bases.planewave import *
from numpy.fft import fftn, ifftn
def test_I_matrix():
"""Verify the I matrix acting on the N matrix i... | jerjorg/dft | tests/planewave_tests.py | Python | gpl-3.0 | 6,585 | [
"CRYSTAL"
] | 0bdc4d723eb341853b53182a6cb6a7979f4c9edee84c8cc5fc1be33457fd8768 |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# pylint: disable=too-many-branches,too-many-... | mganeva/mantid | Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsTwoAxes.py | Python | gpl-3.0 | 15,116 | [
"NetCDF"
] | eebf0a3cdc5486d22fdd710f74154de99cdca5b5ad2ef3be632ed9b6d7d2fd56 |
import scipy.io
import numpy as np
from scipy.spatial.distance import pdist, squareform, cdist
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from numpy.linalg import inv, norm
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
#Assignment 1 (a): Plottin... | RationalAsh/pattern_recognition_assignments | assignment-1/python_sol-1a.py | Python | mit | 878 | [
"Gaussian"
] | a7452461f4442ea2c0aa90f26f22abcc341fe6b343655688526883830c615d9d |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | mikehulluk/morphforge | src/morphforge/simulation/neuron/core/__init__.py | Python | bsd-2-clause | 1,777 | [
"NEURON"
] | 6320c9dedda7759e3d90295f39d2e75af50c153b1339819859a8ed610e2e2a51 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | alexlo03/ansible | lib/ansible/modules/network/avi/avi_networksecuritypolicy.py | Python | gpl-3.0 | 4,303 | [
"VisIt"
] | efafd5b7bed4819b604d18805fe377259c4678f08d432c650a561e61c6b5e470 |
#!/usr/bin/env python
'''
GOAL:
- read catalog of spirals that is generated by LCSmergespiralscats.py
- make plots for paper
- run correlation/KS tests
- print latex tables with resulting KS statistics. these are written to SamplePlots directory
USAGE:
- in ipython
%run LCSanalysespirals.py
- all spirals are ... | rfinn/LCS | paper1code/LCSanalyzespirals.py | Python | gpl-3.0 | 337,778 | [
"Galaxy"
] | 235bd8bca8cedcb26f56f0bea675f4498329fbbc4940315039e287e7ebf1ec5d |
#!/usr/bin/env python
"""Example of generating a substitution matrix from an alignment.
"""
# standard library
from __future__ import print_function
import sys
# Biopython
from Bio import SubsMat
from Bio import AlignIO
from Bio.Alphabet import IUPAC, Gapped
from Bio.Align import AlignInfo
# get an alignment object ... | updownlife/multipleK | dependencies/biopython-1.65/Doc/examples/make_subsmat.py | Python | gpl-2.0 | 1,018 | [
"Biopython"
] | 1a5fb3707f06dfbda8e30f97a8f6a71b884787c0f830249fa56f686c8d49093a |
# encoding: utf-8
"""A dict subclass that supports attribute style access.
Authors:
* Fernando Perez (original)
* Brian Granger (refactoring to a dict subclass)
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed... | mattvonrocketstein/smash | smashlib/ipy3x/utils/ipstruct.py | Python | mit | 11,894 | [
"Brian"
] | 1155dc780b53d5ecd2949e9385dadb625c05bf9500aff93cb0636916b04e5e3e |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import copy
import warnings
from Bio.Seq import Seq
from bioutils.accessions import primary_assembly_accessions
from bioutils.sequences import reverse_complement
import recordtype
import hgvs.exceptions
import ... | jmuhlich/hgvs | hgvs/variantmapper.py | Python | apache-2.0 | 19,777 | [
"Biopython"
] | 09dde400fa844fa2f908c3d011f86812367f4fda4a3cb2d3aadc2671c9a46df4 |
import numpy as np
from ase.asec.command import Command
class ResultsCommand(Command):
@classmethod
def add_parser(cls, subparser):
parser = subparser.add_parser('results', help='results ...')
def __init__(self, logfile, args):
Command.__init__(self, logfile, args)
self.data = se... | alexei-matveev/ase-local | ase/asec/results.py | Python | gpl-2.0 | 565 | [
"ASE"
] | 853b962c1ce4d8989d27d3295cf289052d596d5acbdc24bd395b34f90a4a16c1 |
# -*- coding: utf-8 -*-
import codecs
import warnings
import re
from contextlib import contextmanager
from parso.normalizer import Normalizer, NormalizerConfig, Issue, Rule
from parso.python.tree import search_ancestor
_BLOCK_STMTS = ('if_stmt', 'while_stmt', 'for_stmt', 'try_stmt', 'with_stmt')
_STAR_EXPR_PARENTS = ... | srusskih/SublimeJEDI | dependencies/parso/python/errors.py | Python | mit | 41,625 | [
"VisIt"
] | 46d934cbc00867f48fc3fccdc1d5f4011d47747915766a4362537cbcccd8d4e8 |
"""
Some simple modules for doing runtime visualization
.. todo::
Added support for image cache and some global data structure that provides a map into the image cache
Clean up Viewers.py
.. inheritance-diagram:: proteus.Viewers
:parts: 1
"""
from __future__ import print_function
from __future__ import abso... | erdc/proteus | proteus/Viewers.py | Python | mit | 156,763 | [
"VTK"
] | 3209667b1c8c9bd8b2a9281c6f9c248b786df36805ee90650b7ab7323e5387d1 |
# -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein
#
# Visvis is distributed under the terms of the (new) BSD License.
# The full license can be found in 'license.txt'.
import visvis as vv
import numpy as np
def kde(data, bins=None, kernel=None, **kwargs):
""" kde(a, bins=None, range=None, **kwargs)
... | pbfy0/visvis | functions/kde.py | Python | bsd-3-clause | 1,526 | [
"Gaussian"
] | 3df7cafaece06c0a8d37ce4f4eef2b3c85c0ea8581a45c0265b2db008c7632ce |
########################################################################
# $HeadURL$
# File : CPUNormalization.py
# Author : Ricardo Graciani
########################################################################
""" DIRAC Workload Management System Client module that encapsulates all the
methods necessary t... | sposs/DIRAC | WorkloadManagementSystem/Client/CPUNormalization.py | Python | gpl-3.0 | 5,975 | [
"DIRAC"
] | 7cdfcdc2c5b95964c8447c276ba5d6dd0949ab97f1b9bb41697a16aa3b2169e2 |
#!/usr/bin/env python
from collections import namedtuple
from ase.data import covalent_radii, atomic_numbers, vdw_radii
from ase.structure import molecule; molecule
from ase.io import read; read
import numpy
numpy.seterr(all='raise')
class VSEPR:
def __init__(self, atoms, bonds, angles=[], nonbonded=[]):
... | SamChill/ligandizer | VSEPR.py | Python | bsd-2-clause | 13,136 | [
"ASE"
] | 3df7e4ccc51b86ef3baeb30fc08a71ee8d80e4690074f43beffbf1baf9e3f2ed |
# -*- coding: utf-8 -*-
"""
Created on 28 Nov 2013
@author: Kimon Tsitsikas
Copyright © 2012-2013 Kimon Tsitsikas, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2 as published by the Free
Software Fou... | ktsitsikas/odemis | src/odemis/acq/align/coordinates.py | Python | gpl-2.0 | 25,638 | [
"Gaussian"
] | a96582a40f5b095429ce8bb27554e696e16fa57f2474325e11593c768f71dce3 |
#!/usr/bin/env python
from .._externals.srm import SRM
from .procrustes import procrustes
import numpy as np
from .format_data import format_data as formatter
from .._shared.helpers import memoize
import warnings
@memoize
def align(data, align='hyper', normalize=None, ndims=None, method=None,
format_data=Tr... | ContextLab/hypertools | hypertools/tools/align.py | Python | mit | 5,589 | [
"NEURON"
] | 045cdddbdff266abd61a8551fef066bee5f66f1401f291148f56885e797fa209 |
# -*- coding: utf-8 -*-
#
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2009-2014, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Pub... | ben-albrecht/cclib | cclib/parser/ccio.py | Python | lgpl-2.1 | 6,323 | [
"ADF",
"Dalton",
"GAMESS",
"Gaussian",
"Jaguar",
"MOPAC",
"Molpro",
"NWChem",
"ORCA",
"cclib"
] | f99cd123bbe8bd9332eb63a5cbb8604464f912d3ee787740673fa217edb5c99a |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/plugins/bibles/forms/booknameform.py | Python | gpl-2.0 | 5,820 | [
"Brian"
] | 5e74595dffc00abece3ca174ac69c19996c879ee44af952d36eb454ad91ce1e0 |
"""Small utility for bootstrapping a Conda environment for Pulsar.
This should probably be moved into galaxy-tool-util.
"""
import os.path
import sys
from argparse import ArgumentParser
from galaxy.tool_util.deps.conda_util import CondaContext, install_conda
from galaxy.util import safe_makedirs
def main(argv=None... | galaxyproject/pulsar | pulsar/scripts/_conda_init.py | Python | apache-2.0 | 766 | [
"Galaxy"
] | 1a26679552871ae2165e37dfc8d9072e3cdabc74802741745322e7c1da0fb45b |
#!/usr/bin/env python3
"""
If you have a large FASTA file with a great number of entries, this script is used to
split the file into multiple new files with an even number of records (or as close
as possible.)
Use case example: I have a reference genome collection with 2000 genomes and want to
search this using bowt... | zctea/biocode | fasta/split_fasta_into_even_files.py | Python | gpl-3.0 | 2,920 | [
"Bowtie"
] | eb7c96fbd8b86cfb9768a9d18bd7560fb13a7ae1fabe7c341bbda6b8d9b66cb6 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | SKIRT/PTS | magic/core/pointsource.py | Python | agpl-3.0 | 27,632 | [
"Galaxy"
] | 39a13021389f49b128eface77c80075eb9d7de6e47ee0b529ca6aa4591f8bf79 |
# -*- coding: utf-8 -*-
from django import forms
from Product_manage.models import Product, Chemical
from django.forms import modelform_factory
from rdkit import Chem
from django.forms import Widget
from django.utils.safestring import mark_safe
def get_or_none(model, *args, **kwargs):
try:
return model.obj... | Pandaaaa906/ChemErpSystem | ERP/forms.py | Python | apache-2.0 | 3,092 | [
"RDKit"
] | 72b9018520f51acb48caf4ceeec38ede59000f70b8fdba9e9561cd76c3a2eefc |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Show the constant kernel. Smooth an impulse function.
s1 = vtk.vtkImageCanvasSource2D()
s1.SetScalarTypeToFloat()
s1.SetExtent(0,255,0,255,0,0)
s1.SetDrawColor(0)
s1.FillBox(0,255,... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Imaging/Core/Testing/Python/TestConvolve.py | Python | gpl-3.0 | 702 | [
"VTK"
] | 4996a11428072fc196a8b57a7ee71f3ada31f4479d92cffc22c09d29167a46d8 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import tempfile
import unittest
import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.io.abinit.inputs import (
BasicAbinitInput,
BasicMultiDataset,
ShiftMode,
calc_shiftk,
... | vorwerkc/pymatgen | pymatgen/io/abinit/tests/test_inputs.py | Python | mit | 10,871 | [
"ABINIT",
"pymatgen"
] | 3e61fd6076ab46df3f1168fbef02fbd13c9627b2179dcb8e52a862391c50d2b0 |
import numpy as np
import h5py
from dedalus import public as de
from dedalus.extras import flow_tools
import time
import argparse
import dedalus_plots as dp
import matplotlib.pyplot as plt
from subprocess import call
parser = argparse.ArgumentParser(description='simulate a Boussinesq pulse')
parser.add_argument('k', m... | jedman/dedalus-leakylid | dedalus_pulse.py | Python | gpl-2.0 | 10,925 | [
"Gaussian"
] | 27bb67377f03e15b7b402167fd855ab29785108efb99f87a85557106f7e47354 |
from unittest import TestCase
from omicexperiment.taxonomy import GreenGenesProcessedTaxonomy
class GreenGenesProcessedTaxonomyTestCase(TestCase):
def setUp(self):
pass
def test_highest_res_rank_tax_string_full(self):
test_str = "k__Fungi;p__Ascomycota;c__Eurotiomycetes;o__Eurotiale... | bassio/omicexperiment | omicexperiment/tests/test_taxonomy.py | Python | bsd-3-clause | 2,654 | [
"BLAST"
] | 8f399f8eef7394809842489c51fea786437c6a49a160557bcc1f156026e25621 |
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | Multiscale-Genomics/mg-process-fastq | tests/test_code_bam_utils.py | Python | apache-2.0 | 2,736 | [
"pysam"
] | 5374a1b7cd5934f0294ef3c6f46d29a1087262416d85c4c0ed894d3cce36c8ed |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | capoe/espressopp.soap | src/interaction/SoftCosine.py | Python | gpl-3.0 | 6,469 | [
"ESPResSo"
] | 70b48633ba41aadd32913714ead80bf25b0fd094fdabc772246fe87733fce206 |
from setuptools import setup
setup(
name = 'linearsolve',
packages = ['linearsolve'],
version = '3.4.10',
description = 'A module for approximating, solving, and simulating dynamic stochastic general equilibrium (DSGE) models',
author = 'Brian C. Jenkins',
author_email = 'bcjenkin@uci.edu',
url = 'https:... | letsgoexploring/linearsolve-package | setup.py | Python | mit | 619 | [
"Brian"
] | 951f90bbf689017d8b8eef1aeae4059066cd9372b6d155ec3efd9d566dc045eb |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
create_barcode_proj.py
'''
#import pdb; pdb.set_trace()
#import the necessary libraries
import sys, string, argparse, textwrap, os, time, shutil, re
from dnabarcodes import dbcodeConfig
from dnabarcodes.dnabarcodes_class import DNABarcodes
from test_regex import vali... | andersgs/DNABarcodes | bin/create_barcode_proj.py | Python | gpl-3.0 | 28,119 | [
"BLAST"
] | dcc9ba040cd04fee44bd597a0667506a7c8031be4f9836589b5ee41c4abefc33 |
#! /usr/bin/env python
import sys
sys.path.insert(0, '../')
sys.path.insert(0, '../rnn')
from config import config as cc
cc.loadConfig('../local/config.yml')
cc.exp['params'] = {}
cc.exp['params']['data']={}
cc.exp['params']['rnn']={}
import db.db as db
import pandas as pd
import numpy as np
from rdkit import Che... | PMitura/smiles-neural-network | computing/non_seq_formatting.py | Python | bsd-3-clause | 3,911 | [
"RDKit"
] | 3d1168da38eb04aad7153ffb7588fef8bdf08ddbc2a318826d28cef19db5da5d |
# Copyright (C) 2012-2018
# Max Planck Institute for Polymer Research
# Copyright (C) 2008-2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# 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... | kkreis/espressopp | src/analysis/__init__.py | Python | gpl-3.0 | 3,120 | [
"ESPResSo"
] | 42627e2aec48cbce938377b0496610f6ad13cdb7691a97c8593568c6c5ca7b8d |
# 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... | KaiSzuttor/espresso | src/python/espressomd/constraints.py | Python | gpl-3.0 | 16,737 | [
"ESPResSo"
] | 2b8b0229d1b84636c28f782f53b68ce8a302f9b53a71e53520c38632211288ec |
# Copyright 2007-2010 by Peter Cock. All rights reserved.
# Revisions copyright 2010 by Uri Laserson. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# This code is NOT intend... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/GenBank/Scanner.py | Python | gpl-2.0 | 79,599 | [
"Biopython"
] | e447daa77575529463ac6f18fa33acb1b0a0fa9d2e4196ad2a2ababb7b3dd73e |
#! test QC_JSON Schema for energy
import numpy as np
import psi4
import json
# Generate JSON data
json_data = {
"schema_name": "qcschema_input",
"schema_version": 1,
"molecule": {
"geometry": [
0.0,
0.0,
-0.1294769411935893,
0.0,
-1.494187339479985,
1.0274465079245698,
... | CDSherrill/psi4 | samples/json/schema-1-energy/input.py | Python | lgpl-3.0 | 2,453 | [
"Psi4"
] | 084f9cdb0c57fe94e6693eaf6c5c9ed78fef21c638821f8f62d3741c01801942 |
# Audio Tools, a module and set of tools for manipulating audio data
# Copyright (C) 2007-2016 Brian Langenberger
# 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 Licens... | tuffy/python-audio-tools | audiotools/text.py | Python | gpl-2.0 | 33,671 | [
"Brian"
] | 17f1846f6bdb46a3bdbbb769a4945bd2fe797c856d0e177c13c8cdc3eef6ae3e |
#! /usr/bin/env python
"""Print names of all methods defined in module
This script demonstrates use of the visitor interface of the compiler
package.
"""
import compiler
class MethodFinder:
"""Print the names of all the methods
Each visit method takes two arguments, the node and its current
scope. The... | kidmaple/CoolWall | user/python/Tools/compiler/demo.py | Python | gpl-2.0 | 905 | [
"VisIt"
] | 2bcded20bf1037866cebbf1bb06d3e1ea09a4b30d10a10395fa954cf15072f4a |
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'gui.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
######################... | SanPen/GridCal | src/GridCal/Gui/AboutDialogue/gui.py | Python | lgpl-3.0 | 7,302 | [
"VisIt"
] | f3792da821040782121ac854efcf1eed21569bf78b1dafcc54df968c6c4fe919 |
# ======================================================================================
# File : refresh_files.py
# Author : Wu Jie
# Last Change : 01/08/2010 | 18:20:03 PM | Friday,January
# Description :
# ======================================================================================
#////... | exdev/exutility | all/bin/renew.py | Python | lgpl-3.0 | 1,968 | [
"VisIt"
] | afe4532751fd90a12c0f0d951fb90778059f1432d3eb22c5a8eff6a45a59d9de |
"""
Copyright (c) 2014, Al Sweigart
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following d... | roglew/pappy-proxy | pappyproxy/clip.py | Python | mit | 13,104 | [
"VisIt"
] | b70e80da0a7020aa58e2bbecf43f778cd35459ddb61637daddb6414668d27755 |
import operator
from jmespath import functions
from jmespath.compat import string_type
from numbers import Number
def _equals(x, y):
if _is_special_integer_case(x, y):
return False
else:
return x == y
def _is_special_integer_case(x, y):
# We need to special case comparing 0 or 1 to
... | ctrlaltdel/neutrinator | vendor/jmespath/visitor.py | Python | gpl-3.0 | 10,769 | [
"VisIt"
] | 2e3e1ae59d41e60d9d48310964e0da9f8674fe2bdc444e21a8dc1c2874dccf6c |
# -*- encoding:utf-8 -*-
import sys, textwrap
from numpydoc.docscrape import NumpyDocString, FunctionDoc, ClassDoc
from numpydoc.docscrape_sphinx import SphinxDocString, SphinxClassDoc
from nose.tools import *
if sys.version_info[0] >= 3:
sixu = lambda s: s
else:
sixu = lambda s: str(s, 'unicode_escape')
... | loli/medpy | doc/numpydoc/numpydoc/tests/test_docscrape.py | Python | gpl-3.0 | 19,724 | [
"Gaussian"
] | 90c994fa6782c2055a6b21e691405a71ec865989d5119436c9c3f2028c3d9952 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from builtins import zip
from builtins import range
from builtins import object
import numpy as np
from . import crystal
def bijk_to_coord(prim,bijk,sd=(True,True,True)):
"""Convert the bijk index into an... | goirijo/thermoplotting | thermoplotting/xtals/clusters.py | Python | mit | 2,033 | [
"CRYSTAL"
] | 09458884fcf3e04df9482561cc405de3371a198f93a03d460f5b0d4fc4fd5790 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The freesurfer module provides basic functions for interfacing with
freesurfer tools.
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os... | FCP-INDI/nipype | nipype/interfaces/freesurfer/model.py | Python | bsd-3-clause | 65,410 | [
"Gaussian"
] | 921ddce9d271106103a302bd8ca3b0a299243465377a6a28b4c879c098314d89 |
"""
.. _pyvista_demo_ref:
3D Visualization with PyVista
=============================
The example demonstrates the how to use the VTK interface via the
`pyvista library <http://docs.pyvista.org>`__ .
To run this example, you will need to `install pyvista <http://docs.pyvista.org/getting-started/installation.html>`__ ... | simpeg/discretize | examples/plot_pyvista_laguna.py | Python | mit | 4,800 | [
"VTK"
] | ee3023976fae14a728f8a393f77a77e35ad90e5aa0be799c87ffaeb785386eab |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the object filter functions."""
import unittest
from plaso.lib import objectfilter
class DummyObject(object):
def __init__(self, key, value):
setattr(self, key, value)
class HashObject(object):
def __init__(self, hash_value=None):
self.value = has... | jorik041/plaso | tests/lib/objectfilter.py | Python | apache-2.0 | 17,640 | [
"Desmond"
] | 28ed359efe23b032d10f228a4ecb090bbdd2d748e90bfd6a65a24455eb3f2521 |
"""
Viewing Stanford 3D Scanning Repository bunny model
"""
# Copyright (c) 2014-2015, Enthought, Inc.
# Standard library imports
import os
from os.path import join
# Enthought library imports
from mayavi import mlab
### Download the bunny data, if not already on disk ############################
if not os.path.exist... | dmsurti/mayavi | examples/mayavi/mlab/bunny.py | Python | bsd-3-clause | 1,125 | [
"Mayavi"
] | 0157b2dca2658ba4974aca83ce441484956032117a806a59ccbfec71affc6d8f |
from setuptools import setup, find_packages
__version__ = eval(open('mitty/version.py').read().split('=')[1])
setup(
name='mitty',
version=__version__,
description='Simulator for genomic data',
author='Seven Bridges Genomics',
author_email='kaushik.ghose@sbgenomics.com',
packages=find_packages(... | latticelabs/Mitty | setup.py | Python | gpl-2.0 | 2,920 | [
"pysam"
] | 72cc7e2fec7f17fbe68aefe1f1c1cc87d252f172269188a456e6155ea07bf7b1 |
'''
Created on 23/11/2009
@author: brian
'''
from scipysim.actors import MakeChans, CompositeActor
from scipysim.actors.signal import Ramp, Delay, RandomSource
from scipysim.actors.math import Summer
from scipysim.actors.display import Plotter
import logging
logging.basicConfig(level=logging.DEBUG)
logging.info("Log... | hardbyte/scipy-sim | scipysim/models/multiple_delayed_sum_ramp_plot.py | Python | gpl-3.0 | 1,333 | [
"Brian"
] | d13de7ee74b54f6514c5566bd17bce82395be74173aeacebeb8c8e2f7dbe4c32 |
import cgi
import os
import datetime
import HTMLParser
import json
import logging
import re
import ushlex as shlex
import urllib
from urlparse import urlparse
from bson.objectid import ObjectId
from django.conf import settings
from django.contrib.auth.signals import user_logged_in
#from django.contrib.auth import log... | Magicked/crits | crits/core/handlers.py | Python | mit | 180,063 | [
"Amber"
] | 0a656c4f5dbce58e8e170a1467fa94868a6236bde7093329f39daa0b64b2becb |
import io
import os
import re
from distutils.core import setup
def read(path, encoding='utf-8'):
path = os.path.join(os.path.dirname(__file__), path)
with io.open(path, encoding=encoding) as fp:
return fp.read()
def version(path):
"""Obtain the packge version from a python file e.g. pkg/__init_... | jakevdp/wpca | setup.py | Python | bsd-3-clause | 1,960 | [
"VisIt"
] | bc0a1368027bde535bbc9507d17f8971e66f31f4ad50111b35de1c8a76ac5f3f |
#!/usr/bin/python
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
""" Module: itim
============
"""
from __future__ import print_function
from multiprocessing import Process, Queue
import numpy as np
try:
from __builtin__ import zi... | balazsfabian/pytim | pytim/itim.py | Python | gpl-3.0 | 16,238 | [
"GROMOS",
"MDAnalysis",
"MDTraj",
"OpenMM"
] | 87808a733c8a08c7308de714f8a5d6f6c4fd97e6b56766f98b507bf95f1f6b6d |
from __future__ import absolute_import, division, print_function
import numpy as np
from six.moves import xrange
from .common import Benchmark
class LaplaceInplace(Benchmark):
params = ['inplace', 'normal']
param_names = ['update']
def setup(self, update):
N = 150
Niter = 1000
d... | DailyActie/Surrogate-Model | 01-codes/numpy-master/benchmarks/benchmarks/bench_app.py | Python | mit | 2,745 | [
"NEURON"
] | 864ab91367f191f407f94e64ed14f3f3667ba10e0ea391696260a61514faa49d |
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | foursquare/commons-old | src/python/twitter/common/decorators/__init__.py | Python | apache-2.0 | 2,486 | [
"Brian"
] | 971a4f966aabb1b004d4b1c3dad3890d2b756bcf91e5c72e3e63858f87443aaa |
import functools
from typing import List, Any
import numpy as np
import scipy.sparse as sp
import pytest
from sklearn.metrics import euclidean_distances
from sklearn.random_projection import johnson_lindenstrauss_min_dim
from sklearn.random_projection import _gaussian_random_matrix
from sklearn.random_projection im... | lesteve/scikit-learn | sklearn/tests/test_random_projection.py | Python | bsd-3-clause | 13,850 | [
"Gaussian"
] | 595c590633a33e5df64e4723be27494f44c8183afc22a0e9b92012e02972ca60 |
import distutils
import os
from distutils.core import setup
import _version
import pip
pip.main(['install', 'appdirs'])
# from setuptools.command import build_py
__basedir__ = _version.__basedir__
__version__ = _version.__version__
appname = 'pracmln'
appauthor = 'danielnyga'
def iamroot():
'''Checks if this... | danielnyga/pracmln | setup.py | Python | bsd-2-clause | 3,823 | [
"VisIt"
] | 16ee576888ee729a5e29f5d4a9f64f6e6192dfe7a556a38fd7bb39ff2b178819 |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import sys
if sys.version > '3':
long = int
import numpy as np
import copy
import cPickle
from scipy.stats import chi2
#-----------------------------------------------------------------------
def airtov... | JohanComparat/pySU | spm/python/firefly_library.py | Python | cc0-1.0 | 17,307 | [
"Firefly"
] | 095eb4acede1b7d4a3f25bbafd2905e786a1f01eb17b9de0750498ccf32db115 |
from mdtraj import load
from mdtraj.testing import eq
def test_load_single(get_fn):
# Just check for any raised errors coming from loading a single file.
load(get_fn('frame0.pdb'))
def test_load_single_list(get_fn):
# See if a single-element list of files is successfully loaded.
load([get_fn('frame0.... | dwhswenson/mdtraj | tests/test_load.py | Python | lgpl-2.1 | 796 | [
"MDTraj"
] | 5bb5987f44dd667e49f27949dfb6eaf9d844662a9e320ec9c9aed68ba33d412c |
import numpy as np
import neo
def theta_mod_idx(sptr, binsize, time_limit):
'''Theta modulation index as defined in [3]_
Parameters
----------
sptr : array
binsize : float
Temporal binsize of autocorrelogram
time_limit : flaot
Limit of autocorrelogram
References
-----... | CINPLA/exana | exana/statistics/tools.py | Python | gpl-3.0 | 25,725 | [
"Gaussian",
"NEURON"
] | fc7ef522b6e0ff4a799932d3d144e79773abff7b69a591ddbb152f8e31be67e6 |
'''
This script runs simulations by loading the connection matrices from the network that reproduced the results
shown in the paper and randomly pruning some percentage of one connection type. E.g. A random subset of 50% of the
MLI-MLI connections will be pruned (removed) and the simulation run. The output is firing ra... | blennon/MLI_PKJ_net | MLI_PKJ_net/experiments/MLI_PKJ_net_connections_prune.py | Python | mit | 3,519 | [
"Brian",
"NEURON"
] | 7099cb2930065ae672f0fd559c824a10e9a33e3dccf942b69f2a285c4810163e |
# Copyright (c) 2012 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.
"""Top-level presubmit script for Chromium.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presu... | SaschaMester/delicium | PRESUBMIT.py | Python | bsd-3-clause | 69,588 | [
"VisIt"
] | 1ff4c03f5fb3e7efb1d706ac78c16e7cc6edd83cee940992a0abcfdc8a685f64 |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | kdart/pycopia | QA/pycopia/QA/testinspector.py | Python | apache-2.0 | 3,624 | [
"VisIt"
] | 84824f72b5ac2eec9fe87366bfe0265d40305a9f201d9a253bd4fd7c13c98153 |
"""
FileCatalogClientBase is a base class for the clients of file catalog-like
services built within the DIRAC framework.
"""
__RCSID__ = "$Id$"
from DIRAC.Core.Base.Client import Client
class FileCatalogClientBase( Client ):
""" Client code to the DIRAC File Catalogue
"""
def __init__( self, url = Non... | vmendez/DIRAC | Resources/Catalog/FileCatalogClientBase.py | Python | gpl-3.0 | 1,668 | [
"DIRAC"
] | f9249b38874a6d83464157315a9901bcac8e00f677edcfb59c086225c65e5101 |
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.polynomial.hermite_e import HermiteE
from scipy.misc import factorial
from scipy.stats import rv_continuous
import scipy.special as special
# TODO:
# * actually solve (31) of Blinnikov & Moessner
# * numeri... | phobson/statsmodels | statsmodels/distributions/edgeworth.py | Python | bsd-3-clause | 6,840 | [
"Gaussian"
] | 448a15703a11732e822bbc98e80f3c99a9bc2d80b71a4e44f3b53e966e9c656a |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visit', '0020_auto_20150505_0334'),
]
operations = [
migrations.CreateModel(
name='ContactAttempt',
... | koebbe/homeworks | visit/migrations/0021_auto_20150515_0131.py | Python | mit | 962 | [
"VisIt"
] | 0c4de05b3a3530e9cac2151d908275a1a9d574d6fbf24d9b6b76b0512b505a22 |
# -*- coding: utf-8 -*-
# vispy: testskip
# -----------------------------------------------------------------------------
# A Galaxy Simulator based on the density wave theory
# (c) 2012 Ingo Berg
#
# Simulating a Galaxy with the density wave theory
# http://beltoforion.de/galaxy/galaxy_en.html
#
# Python version... | sh4wn/vispy | examples/demo/gloo/galaxy/galaxy_simulation.py | Python | bsd-3-clause | 7,753 | [
"Galaxy"
] | 84279caf919b99b745340895c257a1a09aad694218e5e7210725abef2e1a63ad |
""" Principal Component Analysis
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis A. Engemann <denis-alexander.engemann@inria.fr>
# Michael Eickenberg <michael.eickenberg@inria.fr>... | chrsrds/scikit-learn | sklearn/decomposition/pca.py | Python | bsd-3-clause | 22,371 | [
"Gaussian"
] | 152ff6fb41a48efdece58059a615907562c01ea87be8b821822f2295580400ab |
"""
This module contains information about files present on common Workbench
disks. The data is used when creating a Workbench environment on demand.
Some files are removed because they differ between Cloanto WB floppies and
original WB floppies.
"""
import hashlib
import os
import sys
import traceback
from fsgamesys.... | FrodeSolheim/fs-uae-launcher | fsgamesys/amiga/workbenchdata.py | Python | gpl-2.0 | 37,574 | [
"ADF"
] | e4e60247e78d8955855c68fb97adc9a0f5e63be04651957c886a7f18e9e08319 |
from __future__ import with_statement
from setuptools import setup, find_packages
def version():
with open('VERSION') as f:
return f.read().strip()
def readme():
with open('README.md') as f:
return f.read()
reqs = [line.strip() for line in open('requirements.txt') if not line.startswith('... | axiom-data-science/pyaxiom | setup.py | Python | mit | 1,330 | [
"NetCDF"
] | 1c9889bb104c86f14fb09155673bae137cf2f078e8e7e82c1134e0e15099d0fc |
# Natural Language Toolkit: Logic
#
# Author: Dan Garrette <dhgarrette@gmail.com>
#
# Copyright (C) 2001-2016 NLTK Project
# URL: <http://nltk.org>
# For license information, see LICENSE.TXT
"""
A version of first order predicate logic, built on
top of the typed lambda calculus.
"""
from __future__ import ... | adazey/Muzez | libs/nltk/sem/logic.py | Python | gpl-3.0 | 69,910 | [
"VisIt"
] | a22b807a1096666b2eec325df46d5a7568f1f0e586b21fd7eddfd4a5908a9e6b |
""" :mod: GFAL2_SRM2Storage
=================
.. module: python
:synopsis: SRM2 module based on the GFAL2_StorageBase class.
"""
# pylint: disable=invalid-name
import six
import errno
import json
import gfal2 # pylint: disable=import-error
# from DIRAC
from DIRAC import gLogger, gConfig, S_OK, S_ERRO... | DIRACGrid/DIRAC | src/DIRAC/Resources/Storage/GFAL2_SRM2Storage.py | Python | gpl-3.0 | 9,181 | [
"DIRAC"
] | be2c10f70a4c1c3516918e6034991540160a232800fe6eaa38e223783cdb5a19 |
import itertools
import numpy as np
import tensor
class Scalar:
def __init__ (self, frequencies, derivatives, closed_time_interval, dtype=float, tau=2.0*np.pi, cos=np.cos, sin=np.sin, double_nonzero_frequency_basis_functions=True):
# NOTE: This is designed to be able to work with any type, including e.g. s... | vdods/heisenberg | attic/library/fourier_parameterization/scalar.py | Python | mit | 20,439 | [
"Gaussian"
] | 17f113d809507a74bb1027f92fd9336c06359618e59b8797e4c4d399469e48d9 |
import subprocess as sp
import os
import numpy as np
if __name__=="__main__":
stretchfmt = """
log cylinder-stretch-r_{0}-f_{2}-t_{3}.log
units metal
atom_style atomic
read_restart cylinder_{0}.restart
change_box all boundary p p s
region TOPREG block -99999 99999 -99999 99999 {1} 99999
region ... | simo-tuomisto/portfolio | Computational Nanoscience 2013 - Final project/Code/run_stretch.py | Python | mit | 2,129 | [
"LAMMPS"
] | ad53b85a7018b3762b5171050cf44fdeeccced49371a37baa3c92c0d3368972e |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import warnings
from pymatgen.core.bonds import (
CovalentBond,
get_bond_length,
get_bond_order,
obtain_all_bond_lengths,
)
from pymatgen.core.periodic_table import Element
from pymatgen.core.... | vorwerkc/pymatgen | pymatgen/core/tests/test_bonds.py | Python | mit | 3,942 | [
"pymatgen"
] | 53d35220b61cc9ade813c5699bbd3cebd14189d59f7da7262805b27a49a02230 |
from . import qndispatch as dispatch
try:
basestring
except NameError:
basestring = str
class CodeGenException(Exception):
pass
class CodeGenIndentException(CodeGenException):
pass
class NotImplementedException(Exception):
pass
class Module(object):
"""Outermost Code block representin... | myint/pyfuzz | pygen/cgen.py | Python | bsd-3-clause | 9,736 | [
"VisIt"
] | 21b0ee7f0810e71257c47464ae7d5f28dfee6485b4681cba0f7c3f2e168e7ef7 |
from stringhelpers import *
import unittest
class Test(unittest.TestCase):
def setUp(self):
self.random_string = random_string()
self.random_string_password_safe =\
random_string(password_safe=True, length=12)
def test_upcase(self):
self.assertEqual(upcase("down here"), "D... | thomskaf/stringhelpers | test_stringhelpers.py | Python | mit | 11,602 | [
"VisIt"
] | 44206ed71ff5dbe55497cca9a641a3ae3a5721ecfc68e5c9cb6cf2c6c7eb65fc |
# -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein, Ant1, Marius van Voorden
#
# This code is subject to the (new) BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of s... | adobe-research/video-lecture-summaries | Scripts/images2gif.py | Python | bsd-2-clause | 37,282 | [
"NEURON"
] | 18e9aacc117950e2457f0651cd3861bef9abb4a928bd19dde975f6841e197441 |
# -*- coding: utf-8 -*-
"""
pysteps.io.interface
====================
Interface for the io module.
.. currentmodule:: pysteps.io.interface
.. autosummary::
:toctree: ../generated/
get_method
"""
import importlib
from pkg_resources import iter_entry_points
from pysteps import io
from pysteps.decorators imp... | pySTEPS/pysteps | pysteps/io/interface.py | Python | bsd-3-clause | 10,166 | [
"NetCDF"
] | ebf6c0cd6273c0e5f6089379b040f026d633f6f386d5f119fe5312eee89360d9 |
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit https://code.google.com/p/feedparser/ for the latest version
Visit http://packages.python.org/feedparser/ for the latest documentation
Required: Python 2.4 or later
Recommended: iconv_codec <http://cjkpython.i18n.org... | rinze/rank-es | feedparser.py | Python | gpl-3.0 | 167,978 | [
"NetCDF",
"VisIt"
] | a986164c8038f1a68d8bac59b94551e67cd4b485ea30a980de7999ae1490f05b |
#!/usr/bin/env python
# Copyright (c) 2012 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.
# Copyright (C) 2008 Evan Martin <martine@danga.com>
"""A git-command for integrating reviews on Rietveld."""
from distutils.vers... | kevinkindom/chrome_depto_tools | git_cl.py | Python | bsd-3-clause | 130,087 | [
"VisIt"
] | 68c99b1fded3ec8160ff37417be4d1e090d34b72739371868173032d6cf11747 |
# coding: utf-8
# Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/>
#
# 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 yo... | interlegis/rows | tests/tests_utils.py | Python | gpl-3.0 | 1,618 | [
"MOE"
] | c73a367f07f3d17678ad76187b8f29aec99308243e3ce5815e2833f099d0b97d |
"""Names for groups of animals.
---
layout: post
source: Oxford Dictionaries
source_url: http://www.oxforddictionaries.com/words/what-do-you-call-a-group-of
title: Names for groups of animals
date: 2014-06-10 12:31:19
categories: writing
---
Names for groups of animals.
"""
from proselint.tools im... | amperser/proselint | proselint/checks/terms/venery.py | Python | bsd-3-clause | 2,591 | [
"MOOSE"
] | 2daf1b6e37e74a0989fcb058a3b844360b7fbf491f56888f9fab45142f3f3d0e |
#!/usr/bin/env python
#
# GalMap.py
#
# Elisa Antolini
# Jeremy Heyl
# UBC Southern Observatory
#
# This script generates a healpix map from a galaxy catalogue
#
# usage: GalMap.py [-h] [--zcolumn ZCOLUMN] [--num-bootstrap NUM_BOOTSTRAP]
# [--smooth SMOOTH] [--savefigures] [--no-savefigures]
# ... | UBC-Astrophysics/ObsPlan | GalMap.py | Python | gpl-3.0 | 7,788 | [
"Galaxy"
] | 4116df6fd7e55abd73e4130e47599faa758d66dd0bfd38ad9fc93eb5691262d8 |
import pyspeckit
# Read in J000002.09+155254.1 spectrum, a nice emission-line galaxy
sp = pyspeckit.Spectrum('../tests/SIIdoublet.fits')
# Read in rest wavelengths of SII lines. If you didn't know the names already,
# you could do sp.speclines.optical.lines.keys() to see what is available.
SIIa = sp.speclines.optic... | keflavich/pyspeckit-obsolete | examples/doublet_example.py | Python | mit | 1,645 | [
"Galaxy"
] | ef7f6b64fce1a9b3d1dfdd11b4d715fc2f9b22cd72954baa1d88be1e0798a24e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.