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
import boto
import imp
import json
import os
import subprocess
import sys
import webbrowser
from distutils.spawn import find_executable
from fabric.api import local, prompt, require, settings, task
from fabric.state import env
from glob import glob
from oauth import get_document, get_credential... | abcnews/dailygraphics | fabfile/__init__.py | Python | mit | 12,803 | [
"VisIt"
] | ddef8c768230164e8aa3fb82280b1c9c61fe7406284c84018dda58262c4f6b79 |
"""
Portable Executable (PE) 32 bit, little endian
Used on MSWindows systems (including DOS) for EXEs and DLLs
1999 paper:
http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/pecoff.doc
2006 with updates relevant for .NET:
http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9... | PythEch/pymobiledevice | libs/python/construct/formats/executable/pe32.py | Python | lgpl-3.0 | 11,720 | [
"MOE"
] | c83c0698149992b989b128cbc03c927ebd06a376c63cfe2da7e5b238101913a2 |
#!/usr/bin/python
# (c) 2005-2009 Divmod, Inc. See LICENSE file for details
from distutils.core import setup
setup(
name="pyflakes",
license="MIT",
version="0.4.3",
description="passive checker of Python programs testcomment",
author="Phil Frost",
maintainer="Moe Aboulkheir",
maintainer_e... | sanzinger/pyflakes | setup.py | Python | mit | 1,039 | [
"MOE"
] | 50983d6024544d2e2611103dc2c90199787fd6c1b6d940e64db107523f0756b7 |
#!/usr/bin/env python
import numpy as np
from .utils import get_maker
from . import utils
from . import medsmakers
import fitsio
import os,sys
import time
from .shearmakers import get_shear_maker
class SimpSimMaker(dict):
def __init__(self,conf,num_seeds=1,seed_index=0):
self.global_start_time = time.time(... | esheldon/egret | egret/simpsimmakers.py | Python | bsd-3-clause | 7,414 | [
"Galaxy"
] | cec20898b9d5f5578151edf2716eaa63869e7a157203906b7a5e569f865083fe |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPyscf(PythonPackage):
"""PySCF is a collection of electronic structure programs powered... | LLNL/spack | var/spack/repos/builtin/packages/py-pyscf/package.py | Python | lgpl-2.1 | 1,510 | [
"PySCF"
] | 8ce894307ba17e99b4a84597e15a6379a9e7d94a2393468c86ca07d210b911ef |
#!/usr/bin/env python
# encoding: utf-8
"""
fp.py
Created by Brian Whitman on 2010-06-16.
Copyright (c) 2010 The Echo Nest Corporation. All rights reserved.
"""
from __future__ import with_statement
import logging
import solr
import pickle
from collections import defaultdict
import zlib, base64, re, time, random, stri... | alexonea/3rdyrp | server/solr/API/fp.py | Python | mit | 24,456 | [
"Brian"
] | b151b5b9efa18412760c930f879194fd6ca635cfd7abd4debafbaa471d7b6e6e |
from __future__ import absolute_import
from __future__ import print_function
import getpass
import logging
import os
import pprint
import time
import uuid
from typing import Dict
from pwd import getpwuid
from tabulate import tabulate
import pandas as pd
from .object_helpers import (
set_docstring, Workspace, for... | biorack/metatlas | metatlas/datastructures/metatlas_objects.py | Python | bsd-3-clause | 26,604 | [
"RDKit"
] | 8a0212186e9019b1574ee380552ba73b577b56901f8b95c0247f7c5fd953844e |
#! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from argparse import ArgumentParser
import warnings
warnings.filterwarnings("ignore")
def loadfiletoarray(file):
data=np.loadtxt(file, usecols=[0,1])
return data
def assignbins(dim, args):
minimum=float(dim[0])
maximum=float(d... | navjeet0211/phd | misc/2DFreeEnergyPlot.py | Python | gpl-2.0 | 2,821 | [
"Gaussian"
] | 5e40663707eb53a1ab6bce16c8d7b905543d3455ad02046eff461a58e5273fa3 |
"""Basic setuptools script for DIRACDocs."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import glob
# Actual setuptools
from setuptools import setup, find_packages
# Find the base dir where the setup.py lies
BASE_DIR = os.path.abspath(os.path... | ic-hep/DIRAC | docs/setup.py | Python | gpl-3.0 | 1,139 | [
"DIRAC"
] | 1e90ca7bd3e36315acf2553f1705010261df6c639932cdb974e81e6bcac6f635 |
# -*- coding: utf-8 -*-
#! \file ./doit/support/visitnode.py
#! \author Jiří Kučera, <sanczes@gmail.com>
#! \stamp 2016-01-08 17:50:32 (UTC+01:00, DST+00:00)
#! \project DoIt!: Tools and Libraries for Building DSLs
#! \license MIT
#! \version 0.0.0
#! \fdesc... | i386x/doit | doit/support/visitnode.py | Python | mit | 6,883 | [
"VisIt"
] | d46685475b72f08e9899905c54154bcd0d7d1f217411aae0ec7e2fae3b7b2afa |
from PIL import Image, ImageDraw, ImageFont
import datetime
import os
from twilio.rest import TwilioRestClient
from flask import Flask, request
from . import app
account = app.config['TWILIO_ACCOUNT']
token = app.config['TWILIO_TOKEN']
site_url = app.config['SITE_URL']
static_path = app.config['STATIC_PATH']
client ... | patrickbeeson/text-me | app/views.py | Python | mit | 2,842 | [
"VisIt"
] | dc3e8a3f2233a30d116f7b4f2e9337b7d5f76a962059ebf0dd58c80421ce739d |
import os
import os.path
def visit(arg, dirname, names):
print dirname, arg
for name in names:
subname = os.path.join(dirname, name)
if os.path.isdir(subname):
print ' %s/' % name
else:
print ' %s' % name
print
os.mkdir('example')
os.mkdir('example/one')
f... | razzius/PyClassLessons | instructors/lessons/practical_utils/examples/os-path-walk.py | Python | mit | 497 | [
"VisIt"
] | caeb460af8704dc383d1becb1a39d1937190ea85d92807fe96a8649c249b6514 |
"""
A model ensemble built by sampling from the posterior of a model using, presumably,
MCMC.
Author:
Ilias Bilionis
Date:
5/1/2015
"""
__all__ = ['ModelEnsemble']
import numpy as np
from GPy import Model
from GPy.inference.mcmc import HMC
from . import expected_improvement
class ModelEnsemble(object):... | PredictiveScienceLab/inverse-bgo | pydes/_model_ensemble.py | Python | mit | 6,184 | [
"Gaussian"
] | 6546077b22b309313a64ae66dfb879ef610ce94a75a217bdec00ef4609f5462b |
import rmgpy.quantity as quantity
import logging
from rmgpy.species import Species
from rmgpy.data.solvation import SolventData, SoluteData, SoluteGroups, SolvationDatabase
from rmgpy.reaction import Reaction
class DiffusionLimited():
def __init__(self):
# default is false, enabled if there is a solvent
... | comocheng/RMG-Py | rmgpy/kinetics/diffusionLimited.py | Python | mit | 3,807 | [
"Avogadro"
] | 2efe345f481806827a55c36a5b42470ea0760ff043adf6f0c7f0849ea986c0d9 |
#
# Based on standard python library functions but avoid
# repeated stat calls. Its assumed the files will not change from under us
# so we can cache stat calls.
#
import os
import errno
import stat as statmod
class CachedPath(object):
def __init__(self):
self.statcache = {}
self.lstatcache = {}
... | PhiInnovations/mdp28-linux-bsp | openembedded-core/meta/lib/oe/cachedpath.py | Python | mit | 8,107 | [
"VisIt"
] | 02bc2ed6e635299561d4bc94c1f2d03880f1f7cfbd4f1c4cbed800efd1df2990 |
from scipy.ndimage import filters
from PIL import Image
#from numpy import *
from pylab import *
def Gausian_response(img,sigma=1):
""" Compute Gaussian response function
for each pixel in a graylevel image. """
# Gausian response
img_sigma = zeros(img.shape)
filters.gaussian_filter(img, (... | wasit7/cs634 | 2016/lab3_varying_sigma.py | Python | bsd-2-clause | 960 | [
"Gaussian"
] | 90839919b4ebd24784dfcb9cfbcc7bc26dd3d730ab7ba64127d9b26ff8240eba |
"""Fit single Sersic 1-D profile"""
import numpy as np
from numpy.random import multivariate_normal
import matplotlib.pyplot as plt
from matplotlib import rcParams
from matplotlib.gridspec import GridSpec
from scipy.optimize import curve_fit
import corner
import emcee
from kungpao.model.component import Sersic
fro... | dr-guangtou/KungPao | kungpao/model/sersic_1d.py | Python | gpl-3.0 | 30,330 | [
"Gaussian"
] | c6ff230ef53a3f1d5f0133cdcf502872d59103f8ccb864e6c963730c4f084f4c |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/mediaplayerwrite.py | Python | gpl-2.0 | 5,275 | [
"VisIt"
] | aab057f6004d3461fb3d8672a75a47de478be78acfa1ed9ab5c3f8d11370e283 |
"""Implements the hashids algorithm in python. For more information, visit http://hashids.org/"""
import warnings
from functools import wraps
from math import ceil
__version__ = '1.3.1'
RATIO_SEPARATORS = 3.5
RATIO_GUARDS = 12
try:
StrType = basestring
except NameError:
StrType = str
def _is_str(candidate... | davidaurelio/hashids-python | hashids.py | Python | mit | 8,790 | [
"VisIt"
] | 6cf0fe3b35b5cc10f8fa708a05c6453789ea7ecaef15676e3538aff133a9d74f |
from uuid import uuid4
from collections.abc import Sequence
from enum import IntEnum
from random import randint, randrange
from math import atan2, sqrt, pi
import sys
class Game_States(IntEnum):
MAIN_MENU = 0
NEW_GAME = 1
IN_GAME = 2
OPTIONS = 3
HISTORY = 4
class LOS_Shape(IntEnum):
EUCLID =... | NoahTheDuke/roguelike | Thing.py | Python | mit | 22,320 | [
"Amber"
] | 22dfcc60993566518ec73128c929d80354f302fda8f7f61b8084199cea875c88 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# <sure - utility belt for automated testing in python>
# Copyright (C) <2010-2013> Gabriel Falcão <gabriel@nacaolivre.org>
#
# 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... | timofurrer/sure | setup.py | Python | gpl-3.0 | 4,358 | [
"VisIt"
] | 5d5055c918437fcbc9525cea8c6bae93fc0ce2b88d60370d0870f492de60f08e |
"""Install next gen sequencing analysis tools not currently packaged.
"""
from __future__ import print_function
import os
import re
from fabric.api import *
from fabric.contrib.files import *
import yaml
from shared import (_if_not_installed, _make_tmp_dir,
_get_install, _get_install_local, _make_... | chapmanb/cloudbiolinux | cloudbio/custom/bio_nextgen.py | Python | mit | 32,360 | [
"Bowtie"
] | edde522c0e674c924a71984dce866bae8be3a0e5fd8e992bd51ba7fd288591e4 |
from past.builtins import basestring
from copy import copy
import sympy
from sympy import sympify
from sympy.logic.boolalg import BooleanTrue, BooleanFalse
from sympy.functions.elementary.piecewise import ExprCondPair
from ...expressions import reserved_identifiers
from nineml.visitors import BaseVisitor, BaseVisitorWi... | INCF/lib9ML | nineml/abstraction/componentclass/visitors/queriers.py | Python | bsd-3-clause | 9,896 | [
"VisIt"
] | ec407198e053fc4af19812003c567516a2183972ccf35bb24a2a81b97b9a21e7 |
""" DIRAC JobDB class is a front-end to the main WMS database containing
job definitions and status information. It is used in most of the WMS
components
The following methods are provided for public usage:
getJobAttribute()
getJobAttributes()
getAllJobAttributes()
getDistinctJobAttributes... | andresailer/DIRAC | WorkloadManagementSystem/DB/JobDB.py | Python | gpl-3.0 | 70,901 | [
"DIRAC"
] | a9f6e5eda9778c4553decc0b49d6a084e09a54d277056789b130e9b4b29f6975 |
#!/usr/bin/env python
# CREATED:2013-08-22 12:20:01 by Brian McFee <brm2132@columbia.edu>
'''Music segmentation using timbre, pitch, repetition and time.
If run as a program, usage is:
./segmenter.py AUDIO.mp3 OUTPUT.lab
'''
import sys
import os
import argparse
import cPickle as pickle
import numpy as np
imp... | guiquanz/msaf | msaf/algorithms/olda/feature_segmenter.py | Python | mit | 3,086 | [
"Brian"
] | 0fae70b044ff2d5a8305637a3a33cdcb4782144969fdaf58d5834af48010e422 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors: Kyle A. Beauchamp, TJ Lane, Jo... | msultan/mdtraj | mdtraj/core/trajectory.py | Python | lgpl-2.1 | 77,918 | [
"Amber",
"CHARMM",
"Desmond",
"Gromacs",
"LAMMPS",
"MDTraj",
"NAMD",
"NetCDF",
"OpenMM"
] | 734ee42327bd9bbfbb6da7ee9a831d8cae1bca73f66866df7fd1a4c5df09facd |
# -*- coding: utf-8 -*-
#
# PyRabbit documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 20 22:48:33 2011.
#
# 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.
#
# Al... | chaos95/pyrabbit | docs/conf.py | Python | bsd-3-clause | 7,098 | [
"Brian"
] | 182c2337c8ff4da852d11570ca75eb17873a7f013707e7069b95fe48a8b2ec47 |
# Copyright 2009 by Cymon J. Cox. 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.
"""Command line wrapper for the multiple alignment program Clustal W.
"""
from __future__ impor... | zjuchenyuan/BioWeb | Lib/Bio/Align/Applications/_Clustalw.py | Python | mit | 19,629 | [
"Biopython"
] | 991f61c5071fb12d0029bc76c051fb1cc2a336f458b8708a05e04f601f64f1bd |
# Copyright (c) 2008-2010, Michael Gorven, Stefano Rivera, Russell Cloran,
# Adrian Moisey
# Released under terms of the MIT/X/Expat Licence. See COPYING for details.
from crypt import crypt
import base64
import re
from ibid.compat import hashlib
from ibid.plugins import Processor, match, aut... | caktus/ibid | ibid/plugins/strings.py | Python | gpl-3.0 | 5,882 | [
"ASE"
] | 3adcbab8fb8b58d1913644825d5f73473f4177f25ba73bc76950bc6822330962 |
from pulsar.managers.unqueued import Manager
from os.path import join
from .test_utils import BaseManagerTestCase
class ManagerTest(BaseManagerTestCase):
def setUp(self):
super().setUp()
self._set_manager()
def _set_manager(self, **kwds):
self.manager = Manager('_default_', self.ap... | galaxyproject/pulsar | test/manager_test.py | Python | apache-2.0 | 2,243 | [
"Galaxy"
] | 024f840ff3691a08608802b7a0cf91e8cd15091f8df60b21cced1191b7f03c90 |
# -*- coding: utf-8 -*-
#
# evaluate_quantal_stp_synapse.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 o... | weidel-p/nest-simulator | pynest/examples/evaluate_quantal_stp_synapse.py | Python | gpl-2.0 | 7,431 | [
"NEURON"
] | 8b31ab9117e8085fc06774388680c5b50ca9e8101cd6ac14efc3831ea026c291 |
"""
Notes:
- Brugia protein sequences: https://www.ncbi.nlm.nih.gov/bioproject/PRJNA10729
- wBm protein sequences: https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=292805
- BLASTP against Reference proteins (refseq protein) from Human, using BLOSUM45 matrix.
- BLASTP against nr proteins from O. volvulus and ... | dave-the-scientist/brugia_project | get_knockout_info.py | Python | gpl-3.0 | 20,007 | [
"BLAST"
] | 1cc5069db8cd3fe7cd82c712f0b1724c8025501d2ccaae6d2c989283dba7431a |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
# !! This is the configuration of Nikola. !! #
# !! You should edit it to your liking. !! #
# ! Some settings can be different in different languages.
# ! A comment stating (translatable) is used to denote those.
# ! There are two ways to... | isaaclacoba/tinman | src/conf.py | Python | gpl-3.0 | 32,031 | [
"VisIt"
] | 702a16c377de75ba1580e29e74519d846b6203a2d61b87af66b434ecbe0ee200 |
from __future__ import division
from pymer4.models import Lmer, Lm, Lm2
from pymer4.utils import get_resource_path
import pandas as pd
import numpy as np
from scipy.special import logit
from scipy.stats import ttest_ind
import os
import pytest
import seaborn as sns
from rpy2.rinterface_lib.embedded import RRuntimeError... | ejolly/pymer4 | pymer4/tests/test_models.py | Python | mit | 16,723 | [
"Gaussian"
] | 9124eca1729c97ab49400ec841ff29e35105b0df0856ab1bca65810d50019cb9 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Hans Ulrich Frink
#
# This program is free software; you can redistribute it and/or modify
# it unde... | sam-m888/addons-source | SourcesCitationsReport/SourcesCitationsReport.py | Python | gpl-2.0 | 23,556 | [
"Brian"
] | dfa9c46cc8aa26d160743443cca88340ed9410458de3e30827325d859490d0bc |
"""A convenience which constructs expression trees from an easy-to-read syntax
Use this unless you have a compelling reason not to; it performs some
optimizations that would be tedious to do when constructing an expression tree
by hand.
"""
from collections import Mapping
from inspect import isfunction, ismethod
fro... | fjalex/parsimonious | parsimonious/grammar.py | Python | mit | 19,197 | [
"VisIt"
] | e4c63a924db8a80cf190c09827a00e5ab54c1cb16ffb31e12b7bbc31f9c6284b |
"""
========================================
Example with the plotly graphing library
========================================
sphinx-gallery supports examples made with the
`plotly library <https://plotly.com/python/>`_. sphinx-gallery is able to
capture the ``_repr_html_`` of plotly figure objects (see :ref:`capture... | Titan-C/sphinx-gallery | examples/plot_9_plotly.py | Python | bsd-3-clause | 2,741 | [
"ORCA"
] | 8d97e75f94cb86bfb7b2cfdc976e0ea29e964f0fe8fb951c2ca156fe457f45d1 |
import search
import array
import random
from math import(cos, pi)
franklin_map = search.UndirectedGraph(dict(
Hilliard=dict(UpperArlington=18, Valleyview=11, Dublin=15),
GroveCity=dict(CanalWinchester=33, Valleyview=21, Obetz=18),
UpperArlington=dict(Columbus=14, Worthington=17),
Columbus=dict(Valleyv... | WmHHooper/aima-python | submissions/Deas/mySearches.py | Python | mit | 6,127 | [
"COLUMBUS"
] | 232483b89d1e3242e241df0c3ded4901db4013cacc06c67731ab167f50c0a665 |
tests = [
("python", "UnitTestBuildComposite.py", {}),
("python", "UnitTestScreenComposite.py", {}),
("python", "UnitTestAnalyzeComposite.py", {}),
]
for d in [
'Cluster', 'Composite', 'Data', 'DecTree', 'Descriptors', 'InfoTheory', 'KNN', 'ModelPackage',
'NaiveBayes', 'Neural', 'SLT', 'Scoring'
]:
tes... | greglandrum/rdkit | rdkit/ML/test_list.py | Python | bsd-3-clause | 543 | [
"RDKit"
] | 8c1fdae6b42ffb41177bbaec27598d824044dc3287e78f97882fe0599f4c3e5c |
# -*- coding: utf-8 -*-
"""
End-to-end tests for Student's Profile Page.
"""
from datetime import datetime
from bok_choy.web_app_test import WebAppTest
from ...pages.common.logout import LogoutPage
from ...pages.lms.account_settings import AccountSettingsPage
from ...pages.lms.auto_auth import AutoAuthPage
from ...pag... | cselis86/edx-platform | common/test/acceptance/tests/lms/test_learner_profile.py | Python | agpl-3.0 | 30,810 | [
"VisIt"
] | b5544554d7664554493520015cf45ffaf91d0a1ea6741738b26f2bcc1dc07847 |
from __future__ import absolute_import, division, unicode_literals
import string
EOF = None
E = {
"null-character":
"Null character in input stream, replaced with U+FFFD.",
"invalid-codepoint":
"Invalid codepoint in stream.",
"incorrectly-placed-solidus":
"Solidus (/) incorrectly ... | zwChan/VATEC | ~/eb-virt/Lib/site-packages/pip/_vendor/html5lib/constants.py | Python | apache-2.0 | 86,873 | [
"Bowtie"
] | 0792cdd8330ffba944a7dc2938de1e717dcac74d67fdc6cc8ee19de80b5e8b11 |
#!/usr/bin/env python
"""
Generate a moltemplate (.lt) file containing a definition of a polymer
molecule whose monomers are located at the positions specified in
"coords.raw" (a 3-column text file). Monomers will be rotated so
that they point in the direction connecting neighbors (r[i+1]-r[i])
The use... | ramisetti/lammps | tools/moltemplate/moltemplate/genpoly_lt.py | Python | gpl-2.0 | 34,035 | [
"LAMMPS"
] | 6679d3c6daed7906664504260bf33c48284a90d161716917c7ed6d562f3e2768 |
# Parallel IO
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2002-3-22
#
"""This module provides parallel acces to netCDF files. One netCDF dimension
is defined for splitting the data among processors such that each processor
is responsible for one slice of the file along that dimension.
Since... | OS2World/DEV-PYTHON-UTIL-ScientificPython | src/Lib/site-packages/Scientific/BSP/IO.py | Python | isc | 10,176 | [
"NetCDF"
] | 70205a4b4a2c848792c2043825927a159bbede5249668ee6dcda8dfe60202236 |
#!/usr/bin/python
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited
# Copyright (c) 2014-2018 Francois Beaune, The appleseedhq Organ... | est77/appleseed | scripts/appleseed.benchmark.py | Python | mit | 6,209 | [
"VisIt"
] | 445e6208731d46e924f5a1802fbcb31fe40734e329995136bcf9a8d7cca857c1 |
"""Generate example cube plots for dissertation
Author
------
Shankar Kulumani GWU skulumani@gwu.edu
"""
import os
import numpy as np
from point_cloud import wavefront
from visualization import graphics
view = {'azimuth': 16.944197132093564, 'elevation': 66.34177792039738,
'distance': 2.9356815748114435, ... | skulumani/asteroid_dumbbell | dissertation/mesh_update.py | Python | gpl-3.0 | 7,250 | [
"Mayavi"
] | bd323f21e9070711a88cc00c722be1a85a99eea02a9f4912fc22a309775b9e5d |
import numpy as np
import h5py, warnings, sys
from .util import ProgressBar, Progress
from .config import *
try:
import cv2
except:
cv2 = None
from skimage import transform as sktf
from skimage.feature import match_template
def motion_correct(mov, max_iters=5, shift_threshold=1., reslice=slice(None,Non... | bensondaled/pyfluo | pyfluo/motion.py | Python | bsd-2-clause | 9,112 | [
"Gaussian"
] | fbf157ee2aafac3840ec42bf3f29e224e9ab3514cf280f3c820d5b84d19f88ab |
from __future__ import division
import numpy as np, numpy.random as nr, numpy.linalg as nlg
class GaussianRandomFeatures:
"""
Class to store Gaussian Random Features.
"""
def __init__(self, dim, rn, gammak=1.0, sine=False):
"""
Initialize with dim of input space, dim of random feature space
and bandwidth of ... | AutonlabCMU/ActiveSearch | python/gaussianRandomFeatures.py | Python | mit | 2,600 | [
"Gaussian"
] | b2ec99e94abe461078eed1eeafa39b477c25c9d6d77c4844b730242f4cbf2daa |
#!/usr/bin/env python
import io
import netCDF4
import numpy
import m6plot
import m6toolbox
import matplotlib.pyplot as plt
import os
import sys
import warnings
def run():
try: import argparse
except: raise Exception('This version of python is not new enough. python 2.7 or newer is required.')
parser = argparse... | nicjhan/MOM6-examples | tools/analysis/poleward_heat_transport.py | Python | gpl-3.0 | 9,681 | [
"NetCDF"
] | 45c92f691c07d47e4849706c02966d53b0e3c4d098a9f34aff9c99971b5e988b |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'DataTable'
db.create_table('neuroelectro_datatable', (
('id', self... | lessc0de/neuroelectro_org | neuroelectro/south_migrations/0011_auto__add_datatable.py | Python | gpl-2.0 | 8,732 | [
"NEURON"
] | 7d477cbe6dcbf5a803a3665960969607a7243ef3354b3e11d83f5f68711d413c |
#
# This file is part of the CCP1 Graphical User Interface (ccp1gui)
#
# (C) 2002-2005 CCLRC Daresbury Laboratory
#
# 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 ... | alexei-matveev/ccp1gui | basis/__init__.py | Python | gpl-2.0 | 9,197 | [
"Gaussian"
] | 2ba115ebb63a3808d362bc1021617e37123021d34f018f85656e35782ed0d0af |
from __future__ import absolute_import
import os.path as op
from sfepy.base.testing import TestCommon
def get_volume(el, nd):
from sfepy.mesh.mesh_tools import elems_q2t
from sfepy.base.compat import factorial
import numpy as nm
from sfepy.linalg.utils import dets_fast
dim = nd.shape[1]
nnd =... | rc/sfepy | tests/test_mesh_smoothing.py | Python | bsd-3-clause | 1,592 | [
"VTK"
] | a8829128326859187d35014cda82920969b0e3ebe69beadbcd6ff9939fdaa234 |
import difflib
from test.support import run_unittest, findfile
import unittest
import doctest
import sys
class TestWithAscii(unittest.TestCase):
def test_one_insert(self):
sm = difflib.SequenceMatcher(None, 'b' * 100, 'a' + 'b' * 100)
self.assertAlmostEqual(sm.ratio(), 0.995, places=3)
sel... | IronLanguages/ironpython3 | Src/StdLib/Lib/test/test_difflib.py | Python | apache-2.0 | 12,307 | [
"MOOSE"
] | e1aaef3746027b1accc15dae5fb92d389bc306c967c0fb2a82c1aac72746cdaa |
# Copyright (C) 2019-2021 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
from datetime import datetime, timedelta, timezone
import jso... | SoftwareHeritage/swh-web-ui | swh/web/tests/misc/test_origin_save.py | Python | agpl-3.0 | 6,658 | [
"VisIt"
] | ab523a67aafe02df2af84d3ca7c7a0500456af0ec0af52843e221efc7152b936 |
# coding: utf-8
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN 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 o... | fccoelho/pypln.backend | tests/test_worker_bigrams.py | Python | gpl-3.0 | 1,685 | [
"NAMD"
] | e3d04baad67cb93c16d511c53b0afafdef82a8152a5f56ec7146b063f511d094 |
"""An example of the colorbar display on the scatter plot."""
import ternary
import matplotlib.pyplot as plt
def _en_to_enth(energy, concs, A, B, C):
"""Converts an energy to an enthalpy.
Converts energy to enthalpy using the following formula:
Enthalpy = energy - (energy contribution from A) - (energy c... | marcharper/python-ternary | examples/scatter_colorbar.py | Python | mit | 4,211 | [
"VASP"
] | d3fb4e17b114ebb5c18accee4f979407c421eb72b97ea798a1fefdc9770b8d0f |
import argparse
import sys
from ya_courier_helpers.util import orders_batch_upload
DELIMITER = '\t'
LINE_FORMAT = '<order_number>{}<service_duration_in_seconds>'.format(DELIMITER)
def parse_args():
parser = argparse.ArgumentParser(usage=usage())
parser.add_argument('--company-id', required=True, type=int, ... | roschupkin/ya.courier.helpers | ya_courier_helpers/order_service_duration_uploader.py | Python | apache-2.0 | 2,118 | [
"VisIt"
] | 05092fa8268c45e9953a7902527f4e341da4a1174dc7d140250f981376585d65 |
#!/usr/bin/env python3
from distutils.core import setup
setup(
name='ProteinFeatureAnalyzer',
version='0.0.0',
author='Xingjie Pan',
author_email='xingjiepan@gmail.com',
url='https://github.com/Kortemme-Lab/protein_feature_analysis',
packages=[
'ProteinFeatureAnalyzer',
],
inst... | Kortemme-Lab/protein_feature_analysis | setup.py | Python | mit | 909 | [
"Biopython"
] | f48f68050bba7df3b039d22891453165a8e1abead0948d66e4b2f68ff6e11912 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rdkit
from rdkit.Chem import AllChem
from rdkit import DataStructs
__license__ = "X11"
METADATA = {
"id": "method_rdkit_ecfp2_1024_tanimoto",
"representation": "ecfp2_1024",
"similarity": "tanimoto"
}
def _compute_fingerprint(molecule):
return Al... | skodapetr/lbvs-environment | methods/ecfp/ecfp2_1024_tanimoto.py | Python | mit | 1,396 | [
"RDKit"
] | ea89cc73d1299af3fd5f3c960ab3ef5de1e7c029257e2bac65075c6ccdd0707c |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# PMDA
# Copyright (c) 2019 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under the GNU Public Licence, v2 or any higher ve... | MDAnalysis/pmda | pmda/rms/__init__.py | Python | gpl-2.0 | 613 | [
"MDAnalysis"
] | f79bf5e673fa03ca599a1a3e92e74dd71da360e94100aa3a4b2c9ec9ae9b5193 |
# -*- coding: UTF-8 -*-
from gettext import bindtextdomain, install, textdomain, translation
from locale import Error as LocaleError, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME, setlocale, getlocale
from os import environ, listdir
from os.path import isdir
from six import PY2
from subp... | openatv/enigma2 | lib/python/Components/International.py | Python | gpl-2.0 | 51,168 | [
"BWA"
] | ece7fc3014c452649ef90a5dc5d00874737b746c500dc356556ca644b90e0967 |
# -*- coding: utf-8 -*-
#
# GSL documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 27 15:17:27 2017.
#
# 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 c... | mancoast/gsl | doc/conf.py | Python | gpl-3.0 | 6,359 | [
"Brian"
] | ce570249130ad59eae476a7ed8d1355e5e9f8938bd023c6caf37b98c542fd7f6 |
#!/usr/bin/env python
"""
Given a binary search tree, change it to sorted double linked list by only one pass.
"""
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
"""
Inorder traverse.
"""
def convert(s... | weixsong/algorithm | interview/convert_binary_search_tree_2_sorted_linked_list.py | Python | mit | 2,780 | [
"VisIt"
] | 882272005d2eea4f08364d13951dd158ef5879bc2cbf02609b6c174ba68a2654 |
#!/usr/bin/python
# Copyright (C) 2014 The Android Open Source Project
#
# 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 require... | s20121035/rk3288_android5.1_repo | cts/apps/CtsVerifier/assets/scripts/execute_power_tests.py | Python | gpl-3.0 | 43,223 | [
"Gaussian"
] | 091dea942b9798b421b7c4ad7543520be5ced1b38d0c49be1c691fd764e13b79 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/plugins/songs/forms/songmaintenancedialog.py | Python | gpl-2.0 | 9,854 | [
"Brian"
] | d308fc4efc8a18b6b8e407571beec8074858b35fcb167114e62b3439c75dc11e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a core class LammpsData for generating/parsing
LAMMPS data file, and other bridging classes to build LammpsData from
molecules. This module also implements a subclass CombinedData for... | davidwaroquiers/pymatgen | pymatgen/io/lammps/data.py | Python | mit | 58,156 | [
"LAMMPS",
"pymatgen"
] | 6e169d079626eacfa5d33704258f19fe283f01cafe2f956309126d89006ce374 |
#!/usr/bin/env python
import sys
import pysam
import argparse
import random
import subprocess
import os
import bamsurgeon.replacereads as rr
import bamsurgeon.aligners as aligners
import bamsurgeon.mutation as mutation
import bamsurgeon.makevcf as makevcf
from operator import itemgetter
from bamsurgeon.common import ... | adamewing/bamsurgeon | bin/addsnv.py | Python | mit | 20,604 | [
"BWA",
"pysam"
] | 2adc7cce8eaaa74f52b7b4f4d13c3ec15db7dcb107c51a75199045512d3b5d93 |
# changelog bisection for mercurial
#
# Copyright 2007 Matt Mackall
# Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
# Inspired by git bisect, extension skeleton taken from mq.py.
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporate... | carlgao/lenga | images/lenny64-peon/usr/share/python-support/mercurial-common/mercurial/hbisect.py | Python | mit | 3,419 | [
"VisIt"
] | e979ec80f06d8ff2384e14d7a98cfbd701a24e8df22144f2dd00bdceeac3f5a1 |
"""
Class for outlier detection.
This class provides a framework for outlier detection. It consists in
several methods that can be added to a covariance estimator in order to
assess the outlying-ness of the observations of a data set.
Such a "outlier detector" object is proposed constructed from a robust
covariance es... | soulmachine/scikit-learn | sklearn/covariance/outlier_detection.py | Python | bsd-3-clause | 6,624 | [
"Gaussian"
] | b29cf5f2104caebc04a1dacbf5e033c73dea1a40b15ebb7cc83a82f1d7c3ff4d |
from asap3 import *
from ase.md.verlet import VelocityVerlet
from ase.lattice.cubic import FaceCenteredCubic
from ase.io.trajectory import *
from numpy import *
from asap3.mpi import world
import sys, os, time
from asap3.testtools import ReportTest
#DebugOutput("output.%d")
print_version(1)
worldsize = world.size
ism... | auag92/n2dm | Asap-3.8.4/Test/parallel/parallelLennardJones.py | Python | mit | 2,976 | [
"ASE"
] | 26c01f6b74e539ccd94b1b8c9d0f3fa0c43b6dde722b6e0fb0b217d1617f0230 |
import numpy as np
import os
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import matplotlib.pyplot as plt
import time
from datetime import datetime
from matplotlib.dates import date2num, num2date
import pyroms
import pyroms_toolbox
import _remapping
class nctime(object):
pass
def remap_bdry... | kshedstrom/pyroms | examples/Arctic_GLORYS/remap_bdry_uv.py | Python | bsd-3-clause | 17,288 | [
"NetCDF"
] | bfd1610d04d8658dc805478679bdc6ce70b2c2b0d7d2a94c437fe80a6504da04 |
def agts(queue):
setups = queue.add('setups.py')
run = queue.add('run.py', ncpus=8, walltime=25, deps=[setups])
dks = queue.add('dks.py', ncpus=8, walltime=25, deps=[setups])
box = queue.add('h2o_xas_box1.py', ncpus=8, walltime=25, deps=[setups])
queue.add('submit.agts.py', deps=[run, dks, box],
... | qsnake/gpaw | doc/tutorials/xas/submit.agts.py | Python | gpl-3.0 | 660 | [
"GPAW"
] | d357aec5a8d5373b56aa8d01eb1d1976447351e545a84eed0549f9bd4c29eebf |
from common import Modules, load_yara_rules, PHPParseModule, ModuleMetadata
from re import compile as recompile, MULTILINE
from urllib import urlencode
class pbot(PHPParseModule):
def __init__(self):
md = ModuleMetadata(
module_name="pbot",
bot_name="pBot",
description=... | bwall/bamfdetect | BAMF_Detect/modules/pbot.py | Python | mit | 2,741 | [
"Brian"
] | 393c1bacd4c0d98b6fa8dbbb054461750866a644fc04de526b6ec9e8b5f92f40 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
from monty.json import MontyDecoder
from pymatgen.alchemy.filters import (
ContainsSpecieFilter,
RemoveDuplicatesFilter,
RemoveExistingFilter,
SpecieProximityFilter,
)
f... | vorwerkc/pymatgen | pymatgen/alchemy/tests/test_filters.py | Python | mit | 5,078 | [
"pymatgen"
] | 41ddd91533cf06db02f0da6bd3523744efd35e463c6fd2b1219632918bf1179e |
### Refer to Chulkov and Echenique, PRB 67, 245402 (2003) for comparison of results ###
import numpy as np
import sys
import time
from math import sqrt
from ase import Atoms, Atom
from ase.visualize import view
from ase.units import Bohr
from ase.lattice.surface import *
from ase.parallel import paropen
from gpaw impo... | qsnake/gpaw | gpaw/test/big/response/be_1ml_surf_response.py | Python | gpl-3.0 | 2,081 | [
"ASE",
"GPAW"
] | 105cbca4cb3dbbcf30cb5db0fc95e7d96cba4eb6ce7e437d7d122c8f233d4732 |
# Copyright (C) 2014 by Per Unneberg
# pylint: disable=R0904
import os
import unittest
import logging
from collections import OrderedDict, Counter
from nose.tools import raises
from snakemakelib.report.picard import PicardMetrics, PicardHistMetrics, AlignMetrics, InsertMetrics, HsMetrics, DuplicationMetrics, _read_pica... | percyfal/snakemakelib | snakemakelib/tests/test_metrics.py | Python | mit | 13,715 | [
"ADF"
] | e41c30ac9984f4058ca6c1dce33598126a7b14aaa06625bdb29170b1ef866425 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | wscullin/spack | var/spack/repos/builtin/packages/r-a4base/package.py | Python | lgpl-2.1 | 2,140 | [
"Bioconductor"
] | ec68c8336ea0246e007d8433edbb8415201485a929e1ec956b86610d19c194aa |
''' '''
import numpy as np
from numpy import random, average
from L500analysis.utils.averages.probability_distributions import create_pdf
from L500analysis.utils.utils import match_nearest
class WeightedAverages :
def __init__(self, probability_distribution='uniform random',
pdf_sample_size=1000, ... | cavestruz/L500analysis | utils/averaging/weighted_averages.py | Python | mit | 1,863 | [
"Gaussian"
] | d8b6aae2404d501029a79f7b966aeba65772d44a432719fedfe6d27149c4daba |
#!/usr/bin/env python
#
# This code was copied from the data generation program of Tencent Alchemy
# project (https://github.com/tencent-alchemy).
#
#
# Copyright 2019 Tencent America LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in com... | sunqm/pyscf | pyscf/df/grad/rhf.py | Python | apache-2.0 | 11,472 | [
"PySCF"
] | 6b460841167552fb6bff096e8520574df5e193dc370604695e0753f76c45a54a |
from gpaw.xc.gllb.contribution import Contribution
from gpaw.xc import XC
from gpaw.xc.pawcorrection import rnablaY_nLv
from gpaw.sphere.lebedev import weight_n
import numpy as np
from numpy import dot as dot3 # Avoid dotblas bug!
from math import pi, sqrt
class C_XC(Contribution):
def __init__(self, nlfunc, weig... | robwarm/gpaw-symm | gpaw/xc/gllb/c_xc.py | Python | gpl-3.0 | 2,938 | [
"GPAW"
] | 03fef6fa1cc18f3b3907bcea651f6a8720643997910efdfdff2ad029115a71d3 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# this test is designed to check the operation of the 8bit
# export of BMPs
# Image pipeline
reader = vtk.vtkBMPReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/masonry.bm... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/IO/Image/Testing/Python/TestBMPReader.py | Python | gpl-3.0 | 687 | [
"VTK"
] | 0ee3c7bfd1f500ac5de855175311efabd6cbd2cf3c62328b6ffe455cd05c31a8 |
import redistrib
from setuptools import setup
requirements = [
'click==6.7',
'hiredis==0.2.0',
'retrying==1.3.3',
'six==1.11.0',
'Werkzeug==0.14.1',
]
setup(
name='redis-trib',
version=redistrib.__version__,
author='Neuron Teckid',
author_email='lene13@gmail.com',
license='MIT'... | HunanTV/redis-trib.py | setup.py | Python | mit | 698 | [
"NEURON",
"VisIt"
] | aa2dcf4f95d92632886d7c6d0e4117c460bd0419e2fde8caf8d437e81faf3d9f |
import galaxy.tools
from galaxy.tools.parameters.basic import (
DataToolParameter,
DataCollectionToolParameter,
SelectToolParameter,
)
from galaxy.tools.parameters.grouping import (
Repeat,
Conditional,
)
PARAMS_UNWRAPPED = object()
class WrappedParameters( object ):
def __init__( self, tran... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/tools/parameters/wrapped.py | Python | gpl-3.0 | 4,251 | [
"Galaxy"
] | d4c93b01869f7b8ac28b523dbd232676f69c0691f82ad8bb33b0aef23afce220 |
# Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | schelleg/PYNQ | pynq/lib/pynqmicroblaze/rpc.py | Python | bsd-3-clause | 34,235 | [
"VisIt"
] | f1e275a1fa7e9ad849fe689b177de2b0768f18e00a7c31cee3d0888c97794c4a |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | jbedorf/tensorflow | tensorflow/python/autograph/pyct/cfg.py | Python | apache-2.0 | 27,285 | [
"VisIt"
] | f228227c148334aeb5b1614491ed74bb01a02c84da52ea601f81d3de0d68c235 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Run this test like so:
# vtkpython TestLinePlot.py -D $VTK_DATA_ROOT \
# -B $VTK_DATA_ROOT/Baseline/Charts/
import os
import vtk
import vtk.test.Testing
import math
class TestLinePlot(vtk.test.Testing.vtkTest):
def testLinePlot(self):
"Test if line plots c... | naucoin/VTKSlicerWidgets | Charts/Testing/Python/TestLinePlot.py | Python | bsd-3-clause | 2,194 | [
"VTK"
] | e04aac06dc53ae3023ffd06ce19306e0979d549d6702f3df14075dc9dd88424a |
from __future__ import annotations
import procrunner
def test(dials_data, tmp_path):
experiments = dials_data("centroid_test_data") / "experiments.json"
result = procrunner.run(
[
"dials.background",
"output.plot=background.png",
"image=1",
str(experim... | dials/dials | tests/command_line/test_background.py | Python | bsd-3-clause | 1,439 | [
"VisIt"
] | e3fc574f8f3d5651d3dd86f4351aea94937da22ed8fc7fbea5227446c54275e2 |
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import range
from past.builtins import basestring
import sys, os
import numpy as np
import operator
try: # works with python 2.7 not 3
from StringIO import StringIO
except: # works ... | spennihana/h2o-3 | h2o-py/tests/pyunit_utils/utilsPY.py | Python | apache-2.0 | 175,962 | [
"Gaussian"
] | b8b048f55d6dc79f6cec3b66f604c7c02d325aec1d59b4529495c509fb44dc37 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Auxiliary Functions and resources to COSMETICS00
Created on Wed Dec 06 18:04:00 2018
:author: Ruyman Azzollini
"""
# IMPORT STUFF
from pdb import set_trace as stop
import numpy as np
import os
from collections import OrderedDict
import string as st
import copy
fro... | ruymanengithub/vison | vison/other/COSaux.py | Python | gpl-3.0 | 1,709 | [
"Gaussian"
] | 0d4e1bd298acb4b606141710a30dfd90012885caf35627a71aef01edd81dabe8 |
#!/usr/bin/python
import numpy as np
BOLTZCONST = 8.617e-5 #eV/K
def read_doscar(input_):
"""
Reads in a doscar file to grab the density of states as a function of
energy. The argument input_ is assumed to be a file object.
"""
n_atoms = input_.readline().split()[0]
# Discard header informatio... | jeffwdoak/free_energies | free_energies/read_doscar.py | Python | mit | 4,141 | [
"DIRAC"
] | 574b00ffc2c2d7a0c6e591db015d5d515cf154c628e14d9f69a27abcde2e699e |
""" Storage Factory Class - creates instances of various Storage plugins from the Core DIRAC or extensions
This Class has three public methods:
getStorageName(): Resolves links in the CS to the target SE name.
getStorage(): This creates a single storage stub based on the parameters passed in a dict... | Sbalbp/DIRAC | Resources/Storage/StorageFactory.py | Python | gpl-3.0 | 11,003 | [
"DIRAC"
] | f9c657d875c1922a4d1ae8b858971f3fd029f62a8b79b11213a5bb357be7128a |
#pylint: disable=no-init,invalid-name
from __future__ import (absolute_import, division, print_function)
from mantid.api import *
from mantid.kernel import *
from mantid.simpleapi import *
import os
from time import strftime
from mantid.kernel import Direction
COMPRESS_TOL_TOF = .01
EXTENSIONS_NXS = ["_event.nxs", ".... | ScreamingUdder/mantid | Framework/PythonInterface/plugins/algorithms/CalibrateRectangularDetectors.py | Python | gpl-3.0 | 26,365 | [
"Gaussian"
] | dfd9d14221a888bcc68a4e9d62387c8f23e0cc9105dbe7684e9ee8e871b4a3de |
''' Test_RSS_Policy_AlwaysActivePolicy
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = '$Id: $'
import unittest
import DIRAC.ResourceStatusSystem.Policy.CEAvailabilityPolicy as moduleTested
################################################... | yujikato/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/test/Test_RSS_Policy_CEAvailabilityPolicy.py | Python | gpl-3.0 | 2,666 | [
"DIRAC"
] | c849a627ac6a858ed4cb05ed1e1bed58c93b91080fc0f6b95210628a8abd16bc |
# encoding: utf-8
# Written for Python 3.6
import os
import sys
import math
import cage
import numpy as np
import pymatgen as pmg
import pymatgen.io.nwchem as nwchem
"""
Script to set up the calculations for a chain of paths connecting the non
equivalent facets of a cage molecule.
"""
# TODO Make these parameters ... | mbercx/cage | cage/scripts/chainsetup.py | Python | mit | 8,112 | [
"NWChem",
"pymatgen"
] | 3bd7bf11066b38c47aa704b2990de4036e89059eda25fc9807d110f96e43f5f7 |
#!/usr/bin/env python
"""
Save polynomial basis on reference elements or on a mesh for visualization into
a given output directory.
"""
import sys
sys.path.append('.')
import os
from optparse import OptionParser
import numpy as nm
from sfepy.base.base import output, Struct
from sfepy.base.ioutils import get_print_info... | RexFuzzle/sfepy | script/save_basis.py | Python | bsd-3-clause | 9,961 | [
"VTK"
] | cd55e7d18665dfe59eda66b7f393f333d74f5c9768e1a4fcd02ff17ff6eac25e |
#! /usr/bin/env python
"""
Handy little script for generating RVO input. Requires a set of output files compatible with the Atomic Simulation Environment.
"""
import ase.io
import argparse
def main(paths):
for path in paths:
A = ase.io.read(path)
cell = A.get_cell()
print A.get_total_ene... | WMD-Bath/dvxc | ase_generate_input.py | Python | gpl-3.0 | 672 | [
"ASE"
] | fb90d0150b159ba5586db6fa1b1e0cfc5c4b5cab23bb32e2de6a1c962428e852 |
# iCraft is Copyright 2010 both
#
# The Archives team:
# <Adam Guy> adam@adam-guy.com AKA "Adam01"
# <Andrew Godwin> andrew@aeracode.org AKA "Aera"
# <Dylan Lukes> lukes.dylan@gmail.com AKA "revenant"
# <Gareth Coles> colesgareth2@hotmail.com... | TheArchives/Nexus | core/entities/creeper.py | Python | bsd-2-clause | 6,866 | [
"VisIt"
] | 250998752f389b32c74f0482bb53d8f9f42c40b774b1fc5186b2dba0654c06aa |
#!/usr/bin/env python
'''
TracPy class
'''
import tracpy
import numpy as np
from matplotlib.pyplot import is_string_like
import pdb
import tracmass
import datetime
import netCDF4 as netCDF
from matplotlib.mlab import find
class Tracpy(object):
'''
TracPy class.
'''
def __init__(self, currents_filena... | dcherian/tracpy | tracpy/tracpy_class.py | Python | mit | 25,805 | [
"NetCDF"
] | 3096bd2e44bb7dc44c51ae0a1d904e42b25e5e2245029f65e70c297907418455 |
# -*- coding: utf-8 -*-
"""
.. _tut-point-spread:
======================================
Corrupt known signal with point spread
======================================
The aim of this tutorial is to demonstrate how to put a known signal at a
desired location(s) in a :class:`mne.SourceEstimate` and then corrupt the
sig... | mne-tools/mne-python | tutorials/simulation/70_point_spread.py | Python | bsd-3-clause | 6,489 | [
"Gaussian"
] | b709d26b913de256dff6610103f18fb58176d8cf33bf9a19820fe84231edf263 |
# 2-electron VMC code for 2dim quantum dot with importance sampling
# No Coulomb interaction
# Using gaussian rng for new positions and Metropolis- Hastings
# Energy minimization using standard gradient descent
# Common imports
import os
# Where to save the figures and data files
PROJECT_ROOT_DIR = "Results"
FIGURE... | CompPhysics/ComputationalPhysics2 | doc/src/MCsummary/src/mpqdot.py | Python | cc0-1.0 | 5,905 | [
"Gaussian"
] | 1f5c69b722986778a87ce0b3bed0845918e2d4aad9ef228eb9c227ea47d9d819 |
from GangaTest.Framework.tests import GangaGPITestCase
#from GangaDirac.Lib.Files.DiracFile import DiracFile
#from GangaGaudi.Lib.RTHandlers.RunTimeHandlerUtils import get_share_path
#from GangaCore.GPIDev.Adapters.StandardJobConfig import StandardJobConfig
#from GangaCore.Core.exceptions ... | ganga-devs/ganga | ganga/GangaDirac/old_test/GPI/Files/TestDiracFile.py | Python | gpl-3.0 | 6,821 | [
"DIRAC"
] | 668e2e00005cbf7b14cfb6c56dc9f1a416ea0c3e1b5dc3258e586116cb63a8cc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.