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 |
|---|---|---|---|---|---|---|---|
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... | kain88-de/mdanalysis | testsuite/MDAnalysisTests/test_transformations.py | Python | gpl-2.0 | 29,282 | [
"MDAnalysis"
] | 12df592643f495306bb1a13e36e7a8a144e7050a6a53af84d6a72a24f1fbbc3b |
"""
Pyperclip
A cross-platform clipboard module for Python,
with copy & paste functions for plain text.
By Al Sweigart al@inventwithpython.com
BSD License
Usage:
import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
spam = pyperclip.paste()
if not pyperclip.is_available():
print("Cop... | TomAugspurger/pandas | pandas/io/clipboard/__init__.py | Python | bsd-3-clause | 21,554 | [
"VisIt"
] | e9125b5e8180640f9d9686967bfda57419984e24c079010ea4575208fbdc0558 |
#!/usr/bin/env python3
from __future__ import division
import sys
import csv
import random
# import required modules
import numpy as np
from scipy import signal
import pylab as plt
import math
# ------------------------------------------------------------
# Some elementary functions
# --------------------------------... | Ralf3/samt2 | stats/stat_bw3.py | Python | gpl-3.0 | 30,209 | [
"Gaussian"
] | c4d34f9799e2e4e838d0eb05f48e357771d04a3d41a370293fc1c02cbd6f1aa5 |
"""
Implement -f aka looponfailing for py.test.
NOTE that we try to avoid loading and depending on application modules
within the controlling process (the one that starts repeatedly test
processes) otherwise changes to source code can crash
the controlling process which should best never happen.
""... | mattias-lundell/pytest-xdist | xdist/looponfail.py | Python | mit | 7,925 | [
"VisIt"
] | b6fcd046344fad5952f2d15518fad086e12e901eeda090289079d34915d18221 |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import pytes... | Azure/azure-sdk-for-python | sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_queues.py | Python | mit | 45,547 | [
"VisIt"
] | be3f4bf3d4d1d08585944048b61951ef75891f70779f8bafd00e8a981533deae |
# PYTHON 3
#
# Author: Kate Willett
# Created: 4 March 2019
# Last update: 15 April 2019
# Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/
# GitHub: https://github.com/Kate-Willett/PYTHON
# -----------------------
# CODE PURPOSE AND OUTPUT
# -----------------------
# This code reads in monthly mean... | Kate-Willett/HadISDH_Build | MakeAreaAvgTS.py | Python | cc0-1.0 | 34,336 | [
"NetCDF"
] | d4069e84682da43719eee17e6dd88b466d79fa93c6f0622e5cd834d85202a3cb |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# A simple example of a three-dimensional noise pattern.
# first we load in the standard vtk packages into tcl
perlin = vtk.vtkPerlinNoise()
perlin.SetFrequency(2,1.25,1.5)
... | hlzz/dotfiles | graphics/VTK-7.0.0/Common/DataModel/Testing/Python/PerlinNoise.py | Python | bsd-3-clause | 1,332 | [
"VTK"
] | b03f738d9053b553567ff8b7b1ff44329deb78cf70b501f6932f6e1a79ea9ce2 |
"""
Browser set up for acceptance tests.
"""
# pylint: disable=no-member
# pylint: disable=unused-argument
from lettuce import before, after, world
from splinter.browser import Browser
from logging import getLogger
from django.core.management import call_command
from django.conf import settings
from selenium.common.e... | caesar2164/edx-platform | common/djangoapps/terrain/browser.py | Python | agpl-3.0 | 10,329 | [
"VisIt"
] | 6d3207f9cc47092b9de70591aa67dd8a524145ab6a3af2a6b93f6faa45d34236 |
##Copyright 2008-2013 Jelle Feringa (jelleferinga@gmail.com)
##
##This file is part of pythonOCC.
##
##pythonOCC is free software: you can redistribute it and/or modify
##it under the terms of the GNU Lesser General Public License as published by
##the Free Software Foundation, either version 3 of the License, or
##(at... | chenkianwee/envuo | py4design/py3dmodel/OCCUtils/face.py | Python | gpl-3.0 | 12,756 | [
"Gaussian"
] | 00b41ec0533aa39e5e65d9f552f1c2617acd552c35ba74b4269c0064c07e6cf0 |
""" A computing element class that uses sudo
"""
import os
import pwd
import stat
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import DErrno
from DIRAC.Core.Utilities.Subprocess import shellCall
from DIRAC.Core.Utilities.ThreadScheduler import gThreadScheduler
from DIRAC.Resources.Computing.ComputingElem... | fstagni/DIRAC | Resources/Computing/SudoComputingElement.py | Python | gpl-3.0 | 8,268 | [
"DIRAC"
] | e05c4ab6bbbc1691551b05cd971fc079126ee119a260437d100e967988eafd37 |
from __future__ import print_function
from astrometry.util.fits import *
import pylab as plt
import numpy as np
from glob import glob
from astrometry.util.plotutils import *
from astrometry.libkd.spherematch import *
from astrometry.util.resample import *
from astrometry.util.util import *
ps = PlotSequence('cosmos')
... | legacysurvey/pipeline | py/legacyanalysis/cosmos-6x.py | Python | gpl-2.0 | 7,883 | [
"Galaxy"
] | dd12a0bc88be022b54d670765b9fc4730daac3c36ea80d175113da19310a8309 |
#!/usr/bin/env python
# CREATED:2014-01-18 14:09:05 by Brian McFee <brm2132@columbia.edu>
# unit tests for util routines
# Disable cache
import os
try:
os.environ.pop("LIBROSA_CACHE_DIR")
except:
pass
import platform
import numpy as np
import scipy.sparse
import pytest
import warnings
import librosa
from te... | bmcfee/librosa | tests/test_util.py | Python | isc | 37,829 | [
"Brian"
] | 27699310eff7cb5936f5217a64b63557df397a916abd10dac7e28b031f3a8cef |
# -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2016-2020)
#
# This file is part of GWpy.
#
# GWpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | duncanmmacleod/gwpy | gwpy/signal/qtransform.py | Python | gpl-3.0 | 24,435 | [
"Gaussian"
] | b319ae99abf7a787e871dde9d4b310b2bb02ac9ef635975e4af08fb1b5a020a7 |
"""Active Tree Search
Author: Robert Lieck <science@robert-lieck.com>
"""
import os
import shutil
import random
import pydot
import sys
import logging
from logging import debug, info, warning, error
import numpy as np
from scipy.stats import multivariate_normal
from scipy.special import gamma, psi
from scipy.optimize... | roboloni/active-tree-search | python/old_implementation/active_tree_search.py | Python | gpl-2.0 | 72,934 | [
"VisIt"
] | b1b79238ca1578efedd1b2daec163c57b36f0496af5da56d79e1001bf74464aa |
import os
from collections import Counter
from pypif.obj.common import Value, Property, Scalar
def Value_if_true(func):
'''Returns:
Value if x is True, else None'''
return lambda x: Value() if func(x) == True else None
class InvalidIngesterException(ValueError):
pass
class DFTParser(object):
... | CitrineInformatics/pif-dft | dfttopif/parsers/base.py | Python | apache-2.0 | 10,541 | [
"ASE"
] | 31ce21826c42c2b4aabd82c8a7c8632304f1c0c97cda5e92ed200d351d4aedba |
#
# Copyright (C) 2013-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... | psci2195/espresso-ffans | samples/grand_canonical.py | Python | gpl-3.0 | 5,455 | [
"ESPResSo"
] | 2bdded75c6c36f6979c17cecafdd974dd60b287755b515e8c4016d446ae521f6 |
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 5 13:21:34 2016
@author: ibackus
"""
import numpy as np
import os
import pynbody
SimArray = pynbody.array.SimArray
import diskpy
import runTest
import config
def summarizeResults(result, testName):
"""
Summarize test results.
results should just be th... | ibackus/compare-changa-builds | compchanga/compare.py | Python | mit | 18,591 | [
"BLAST"
] | 1b2f89db6c5441e6be3817500b012c6c3c0785fc83bec49d7d7c5df9635ffa00 |
#!/usr/bin/env python
import os
import logging
import argparse
import time
import pychemia
from pychemia.runner import get_jobs
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('pychemia')
logger.addHandler(logging.NullHandler())
logger.setLevel(logging.D... | MaterialsDiscovery/PyChemia | scripts/EvaluatorNonCollinear.py | Python | mit | 5,652 | [
"VASP"
] | ccd4a4b9a5a4183e0d06e087ba1cfd49b7fb3dacdb3e093610de61ecc7fabcdf |
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #
# (c) 2010... | backmari/moose | python/chigger/utils/__init__.py | Python | lgpl-2.1 | 4,971 | [
"MOOSE",
"VTK"
] | 14a6f51e40b91f57cb53fc37f5d2a443794666a5df3641276f2046002441b4ee |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/pbc/cc/eom_kccsd_rhf.py | Python | apache-2.0 | 68,814 | [
"PySCF"
] | fcda5ecb555ca095266df76de522f00cccd6492ea5b02803f8983ad9292aa53c |
#########
# firstTry.py
# This program is part of the online PS-Drone-API-tutorial on www.playsheep.de/drone.
# It shows how to do basic movements with a Parrot AR.Drone 2.0 using the PS-Drone-API.
# Dependencies: a POSIX OS, PS-Drone-API 2.0 beta or higher.
# (w) J. Philipp de Graaff, www.playsheep.de, 2014
##########... | reixd/ps-drone | tutorials/firstTry.py | Python | artistic-2.0 | 1,714 | [
"VisIt"
] | 2dd21009f069d151dc5bc81cb8655a6ffca4eb3d6f16f1e59222a62497fb9b84 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 David Arroyo Menéndez
# Author: David Arroyo Menéndez <davidam@gnu.org>
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | davidam/python-examples | netcdf/netcdf-example4.py | Python | gpl-3.0 | 1,434 | [
"NetCDF"
] | f467ae2ffa7c91c3b9dfb684946162647e220e45bf8232b7e0cf20c588b3b811 |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | intel-analytics/analytics-zoo | pyzoo/zoo/orca/automl/xgboost/auto_xgb.py | Python | apache-2.0 | 3,793 | [
"ORCA"
] | 9b649ba6fb2cfc5ebfa1b55630bd4ed51fc928a82df4ebfbe6767e3f037b9cec |
import sys
sys.path.insert(0, '../../')
import numpy as np
from jax.experimental import optimizers
import matplotlib.pyplot as plt
import time
import pandas as pd
from sde_gp import SDEGP
import approximate_inference as approx_inf
import priors
import likelihoods
from utils import softplus_list, plot
import pickle
plo... | AaltoML/kalman-jax | kalmanjax/experiments/coal/coal.py | Python | apache-2.0 | 5,189 | [
"Gaussian"
] | 43e1c103a73e5275ab01f499c60ff6f4ee7470905ec3bec2810a323d0d80e940 |
from __future__ import unicode_literals
import base64
import datetime
import hashlib
import json
import netrc
import os
import re
import socket
import sys
import time
import math
from ..compat import (
compat_cookiejar,
compat_cookies,
compat_etree_fromstring,
compat_getpass,
compat_http_client,
... | fast90/youtube-dl | youtube_dl/extractor/common.py | Python | unlicense | 90,213 | [
"VisIt"
] | 9baaafe4cd3eddf468cfcfcf590e4550d5a591113c678ff10f78a1b47386aee5 |
# encoding: utf-8
"""
Enable pygtk to be used interacive by setting PyOS_InputHook.
Authors: Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The ful... | SlicerRt/SlicerDebuggingTools | PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/pydev_ipython/inputhookgtk.py | Python | bsd-3-clause | 1,143 | [
"Brian"
] | 0065bed22d64db8a4b524367bb7369ef37035868591d31951d33d226a5e23e6d |
######################################################################
#
# File: bdata.py
#
# Copyright 2013 Brian Beach, All Rights Reserved.
#
######################################################################
"""
This module deals with the data structures I like to use in Python for
holding data. I haven't ... | bwbeach/bstat | bstat/data.py | Python | mit | 30,169 | [
"Brian"
] | 75b755aa0369c34b854e6a8b3d46ba1e71ce2867ddfd1642677c6ccce81e1427 |
from asap3 import *
from cPickle import *
from numpy import *
from asap3.testtools import ReportTest
from OpenKIM_modelname import openkimmodel
timeunit = 1.018047e-14 # Seconds
femtosecond = 1e-15 / timeunit # Marginally different from units.fs
print_version(1)
if OpenKIMsupported:
data = load(... | auag92/n2dm | Asap-3.8.4/Test/Verlet_OpenKIM.py | Python | mit | 1,597 | [
"OpenKIM"
] | 53814563d3c36438a2afdd3fbfb5ba6036897c3c5faf5402a53080fd630d4489 |
r"""
Composition Statistics (:mod:`skbio.stats.composition`)
=======================================================
.. currentmodule:: skbio.stats.composition
This module provides functions for compositional data analysis.
Many 'omics datasets are inherently compositional - meaning that they
are best interpreted as... | corburn/scikit-bio | skbio/stats/composition.py | Python | bsd-3-clause | 17,500 | [
"scikit-bio"
] | cbdbd2b64c2fab3a433ec6b8860bb277db44ea01d3a607b931c19ca33b2f08ba |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements various transmuter classes.
Transmuters are essentially classes that generate TransformedStructures from
various data sources. They enable the high-throughput generation of new
struc... | tschaume/pymatgen | pymatgen/alchemy/transmuters.py | Python | mit | 15,628 | [
"VASP",
"pymatgen"
] | 250f71d9396ebcf92944deb9647c766e2cdeba486e20a0ab4fe246bd132219a7 |
# Copyright 2012 the rootpy developers
# distributed under the terms of the GNU General Public License
from nose.plugins.skip import SkipTest
from rootpy.utils.silence import silence_sout
try:
with silence_sout():
import ROOT
from ROOT import (RooFit, RooRealVar, RooGaussian, RooArgusBG,
... | qbuat/rootpy | rootpy/stats/tests/test_plottable.py | Python | gpl-3.0 | 2,365 | [
"Gaussian"
] | 19207484a4a815723c0c2602e9ac7251046652285b39ca44f8fccc4f4071f800 |
#!/usr/bin/env python
"""\
basis_converter.py Convert a Jaguar basis record to a native python format.
This program is part of the PyQuante quantum chemistry suite.
PyQuante is copyright (c) 2002 Richard P. Muller. All Rights Reserved.
You may contact the author at rpm@wag.caltech.edu.
This program is free softw... | berquist/PyQuante | Data/basis_converter_jaguar.py | Python | bsd-3-clause | 4,708 | [
"Jaguar"
] | 9d3805773f759943026750d131becf1f1c8c7e9893311f496a1111f62ab2ec85 |
##############################################################################
# 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... | skosukhin/spack | var/spack/repos/builtin/packages/foam-extend/package.py | Python | lgpl-2.1 | 15,255 | [
"ParaView"
] | 51c43e51594113ba732642dca61c8a5d85052963e6568f9be1d60741c37281a0 |
import cgen as c
from devito.arch import AMDGPUX, NVIDIAX
from devito.ir import Call, ParallelIteration, FindSymbols
from devito.passes.iet.definitions import DeviceAwareDataManager
from devito.passes.iet.orchestration import Orchestrator
from devito.passes.iet.parpragma import PragmaDeviceAwareTransformer, PragmaLang... | opesci/devito | devito/passes/iet/languages/openacc.py | Python | mit | 6,786 | [
"VisIt"
] | dcc44395ebdd6a7d4131df4870747a9dd98373f6dcb6a50cd1bc24206c784af3 |
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your opti... | pombredanne/invenio-old | modules/websubmit/lib/functions/Stamp_Uploaded_Files.py | Python | gpl-2.0 | 24,729 | [
"VisIt"
] | 364276e20a18308449ba2fb1beb2b3bf70b216ffc8278a2ab28585bb845bc934 |
#!/usr/bin/python
import os, sys, getopt, string
from Bio.Seq import Seq
from Bio.Blast import NCBIXML
from Bio.Alphabet import IUPAC
#==============================================================================
def show_help():
print """%s parses BLASTX XML output to STDOUT
Options:
-f:\tBLASTX output in ... | lotharwissler/bioinformatics | python/blast/parse-blastout-xml.py | Python | mit | 2,994 | [
"BLAST"
] | 4bed7acb3280da3773f7605ed27eca1285287be86e656961e2e81f3f5afda2d4 |
from numpy import linspace
from ase.calculators.fleur import FLEUR
from ase.lattice import bulk
from ase.io.trajectory import Trajectory
atoms = bulk('Ni', a=3.52)
calc = FLEUR(xc='PBE', kmax=3.6, kpts=(10, 10, 10), workdir='lat_const')
atoms.set_calculator(calc)
traj = Trajectory('Ni.traj','w', atoms)
cell0 = atoms.... | misdoro/python-ase | doc/ase/calculators/fcc_Ni_fleur.py | Python | gpl-2.0 | 470 | [
"ASE",
"FLEUR"
] | 30985c81318029b61cb99565247f07f35e956ff17efb638638b34dd0331fd44f |
##########################################################################
#
# Copyright 2008-2010 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software withou... | surround-io/apitrace | wrappers/trace.py | Python | mit | 38,536 | [
"VisIt"
] | 9b3acecef0c5060228db68865610bc0d1ad53d0ea29044c3824bb116dcd41bae |
# -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
# standard library imports
import logging
import jso... | mats116/ElasticBigQuery | boilerplate/handlers.py | Python | lgpl-3.0 | 65,902 | [
"VisIt"
] | f6c4b3477a8524b906cee2cd0e74cc3b37e32d603f9145394d2f252ab5d40ca9 |
# This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wger W... | wger-project/wger | wger/exercises/tests/test_exercise.py | Python | agpl-3.0 | 25,873 | [
"VisIt"
] | 20592ca8c4e0b1430d7d38d0ce1f103b29dab12823631b2fc24798759f1a6b06 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | fernandezcuesta/ansible | lib/ansible/modules/network/avi/avi_pool.py | Python | gpl-3.0 | 18,914 | [
"VisIt"
] | ed724c3a096fba5d3e865f561d6563e348327cf0e80d049433184ef3f15505b5 |
#!/usr/bin/env python3
#
# Copyright (C) 2013-2017(H)
# Max Planck Institute for Polymer Research
#
# 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, e... | espressopp/espressopp | testsuite/ljcos/testLJCos.py | Python | gpl-3.0 | 2,331 | [
"ESPResSo"
] | 50daca67ef5024b96cf416efcd96e029afa3711475d14ac5e0b4d759e4ff5a43 |
import pyparsing as pp
from nmodl.terminals import NEURON, LBRACE, RBRACE, FLOAT, ID
SUFFIX = pp.Keyword('SUFFIX')
USEION = pp.Keyword('USEION')
READ = pp.Keyword('READ')
WRITE = pp.Keyword('WRITE')
RANGE = pp.Keyword('RANGE')
GLOBAL = pp.Keyword('GLOBAL')
POINTER = pp.Keyword('POINTER')
NONSPECIFIC = pp.Keyword('NONS... | borismarin/nmodl-parse | nmodl/neuron.py | Python | gpl-3.0 | 1,140 | [
"NEURON"
] | 51c1ef62f861c7ec6cc00e4455c686c7ab6e2606c85acb71e83dc1941dd924ba |
#!/usr/bin/python
"""
Run VASP tests to ensure that relaxation with the VASP calculator works.
This is conditional on the existence of the VASP_COMMAND or VASP_SCRIPT
environment variables.
"""
from ase.test import NotAvailable
import os
vcmd = os.getenv('VASP_COMMAND')
vscr = os.getenv('VASP_SCRIPT')
if vcmd == No... | JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/test/vasp/vasp_Al_volrelax.py | Python | gpl-2.0 | 2,388 | [
"ASE",
"VASP"
] | ee65a800f58c251e353064a6c7ab12c8a5eb416b311c79b5f900fc3a4c3c1342 |
#! /usr/bin/env python
import sys
from math import sqrt, pi
import numpy as np
from ase import Atoms
from ase.units import Bohr, Hartree
from ase.parallel import rank
from gpaw import GPAW
from gpaw.external_potential import ConstantElectricField
###
field = 0.01
dx = 2.0
vac = 3.0
nsteps = 3
nbands ... | ajylee/gpaw-rtxs | gpaw/test/constant_electric_field.py | Python | gpl-3.0 | 1,861 | [
"ASE",
"GPAW"
] | db842aab8e51aa1a071321ddef4fd282ee857ee618dea13afb98259e0f57ccc4 |
from __future__ import annotations
import json
import procrunner
import pytest
import iotbx.cif
from cctbx import sgtbx, uctbx
from dxtbx.model.experiment_list import ExperimentListFactory
from dxtbx.serialize import load
from iotbx import mtz
from dials.array_family import flex
from dials.command_line.slice_sequen... | dials/dials | tests/command_line/test_export.py | Python | bsd-3-clause | 20,011 | [
"CRYSTAL"
] | 0a4c876874ac0f54fc26d2ade573a5bdd267498f0beb0563c67ffcc73bd630e8 |
# -*- coding: utf-8 -*-
#
# MNE documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 11 10:45:48 2010.
#
# 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... | olafhauk/mne-python | doc/conf.py | Python | bsd-3-clause | 28,784 | [
"Mayavi",
"VTK"
] | ac594740a4eaf0ad5892cefa7a3dce2b13d8a381e3083efc7a453d1ac733daa1 |
from PyQt4 import QtCore, QtGui
import re
from config import Settings
import util
import hashlib
from client import ClientState
class LoginWizard(QtGui.QWizard):
def __init__(self, client):
QtGui.QWizard.__init__(self)
self.client = client
self.login = client.login
self.password =... | Sheeo/client | src/client/loginwizards.py | Python | gpl-3.0 | 16,575 | [
"VisIt"
] | 6c10e46d1d90446722475c113a8192c83ce4a74ba6c256b36f22b1ed78a42f15 |
from __future__ import print_function
from bose_einstein import bose_einstein
from constant import htr_to_meV
import argparser
import mass_factor
import numpy as np
args = argparser.read_argument('Renormalize EPW calculation')
if args.vb: offset = -8.75333295715961e-03
else: offset = 8.53193322468371e-03
if args.vb: ... | mmdg-oxford/papers | Schlipf-PRL-2018/model/epw_mass.py | Python | gpl-3.0 | 1,237 | [
"EPW"
] | f5b89ca0419b533ed854f4ca47bca338ff558d74ce4f3e3697b18b3dd80ab096 |
import os
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
import tensorflow as tf
os.environ['KERAS_BACKEND'] = 'tensorflow'
import keras
from packaging import version
assert version.parse(keras.__version__) >= version.parse("2.2.0"), \
"Keras version too old for the autoencod... | Petr-By/qtpyvis | models/example_keras_vae_mnist.py | Python | mit | 8,641 | [
"Gaussian"
] | 88db618a4e6a744c125c180c092edd18d74a9776178958acb1ebe5ca9194405e |
#! /usr/bin/env python
#
# @BEGIN LICENSE
#
# versioner.py: defines look-ahead auto-versioning from metadata.py
#
# Copyright (c) 2017 The Psi4 Developers
#
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
#
# @END LICENSE
#
from __futur... | robertodr/pcmsolver | tools/versioner.py | Python | lgpl-3.0 | 14,918 | [
"Psi4"
] | 4e713dad43bad478ad93b8488240217144c766a72d7d1d91a016f7c8cf020fbc |
from datetime import datetime
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from rango.bing_search ... | leifos/tango_with_tests | tango_with_django_project/rango/views.py | Python | mit | 15,580 | [
"VisIt"
] | 17e2bc0de9866ff80576603de7d52fc578ce4d403d8f462dbff0312b4f719c34 |
#!/usr/bin/env python
import pysam
import argparse
from collections import defaultdict as dd
from bx.intervals.intersection import Intersecter, Interval # pip install bx-python
import logging
FORMAT = '%(asctime)s %(message)s'
logging.basicConfig(format=FORMAT)
logger = logging.getLogger(__name__)
logger.setLevel(l... | adamewing/tebreak | scripts/misc/decluster.py | Python | mit | 2,311 | [
"pysam"
] | d17ce394fdc90862d755c0e70f215d61099e4d61ea735f48e0d5bf73b6203f7d |
# Set up a basic scene for rendering.
from paraview.simple import *
import os
import sys
script = """
import paraview.numpy_support
# Utility to get next color
def getNextColor():
colors = 'bgrcmykw'
for c in colors:
yield c
# This function must be defined. It is where specific data arrays are requested.
def... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/Applications/ParaView/Testing/Python/TestPythonViewMatplotlibScript.py | Python | gpl-3.0 | 1,798 | [
"ParaView",
"VTK"
] | 895fb9b8631a1d1a2d9d1c2173c667ec80bd45e5873cefb5409350bf7c39ce9f |
""" Base Storage Class provides the base interface for all storage plug-ins
exists()
These are the methods for manipulating files:
isFile()
getFile()
putFile()
removeFile()
getFileMetadata()
getFileSize()
prestageFile()
getTransportURL()
These are the methods for... | yujikato/DIRAC | src/DIRAC/Resources/Storage/StorageBase.py | Python | gpl-3.0 | 15,318 | [
"DIRAC"
] | f062b48286a8b3ac106d9f001f615e443214521ce02318793477702a671ccbd3 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Chord model and helper utilities"""
import librosa
import sklearn
import sklearn.hmm
import numpy as np
def beats_to_chords(beat_times, chord_times, chord_labels):
r'''Propagate lab-style annotations to a list of beat timings.
:parameters:
- beat_times... | ebattenberg/librosa | librosa/chord.py | Python | isc | 5,446 | [
"Gaussian"
] | f5c83834476c83fdb5380b5047dfeb4ebde28e837c847a0b1ad170bd7f1570dd |
# stdlib imports
import math
# ROOT/rootpy imports
import ROOT
from rootpy.plotting import Legend, Hist, HistStack
from rootpy.plotting.shapes import Arrow
import rootpy.plotting.utils as rootpy_utils
# local imports
from .. import PLOTS_DIR, save_canvas
from .templates import RatioPlot, SimplePlot
from ..utils impor... | yukisakurai/hhana | mva/plotting/draw.py | Python | gpl-3.0 | 21,459 | [
"Gaussian"
] | 6962dd7d98e9450af38919e8dcd569a0e8151831db2bdae49a12077d72150f4f |
#!/usr/bin/env python
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/li... | rabimba/p2pScrapper | BitTorrent-5.2.2/bittorrent.py | Python | mit | 9,860 | [
"VisIt"
] | fd5c4ece0071037bc2c5a6723eeb763b17a2869b5d80f2396cab0c6fadb1b035 |
"""Sutils: simulation unilities, some of them are molecule-specific (implemented as methods in subclasses)
"""
from config import *
import random, mdtraj as md
from coordinates_data_files_list import *
from sklearn.cluster import KMeans
from helper_func import *
from functools import reduce
class Sutils(object):
... | weiHelloWorld/accelerated_sampling_with_autoencoder | MD_simulation_on_alanine_dipeptide/current_work/src/molecule_spec_sutils.py | Python | mit | 49,057 | [
"MDAnalysis",
"MDTraj"
] | 8a8c5b33e34f5a3498d7d9423f8ebfc7e2640362810f1f9fef284e631525f1e4 |
"""Provide dependency graph"""
import itertools
from collections import deque
from UserDict import IterableUserDict
try:
import z3
except ImportError:
pass
import miasm2.expression.expression as m2_expr
from miasm2.core.graph import DiGraph
from miasm2.core.asmbloc import asm_label, expr_is_label
from miasm2.... | fmonjalet/miasm | miasm2/analysis/depgraph.py | Python | gpl-2.0 | 35,628 | [
"VisIt"
] | 309f6c641d45f36a5ce7eb00975a3e9d93693cb6c543ba8e3d1e6a9b725a6e3d |
#!/opt/local/bin/python
__author__ = "Andrew G. Clark"
__date__ = "7 May 2014"
__maintainer__ = "Andrew G. Clark"
__email__ = "andrew.clark@curie.fr"
""" This script analyzes linescans and extracts cortex thickness and density from actin/membrane linescan pairs.
The script can be run in a 'pair' mode (to analyze a s... | PaluchLabUCL/CortexThicknessAnalysis | extract_cortex_thickness_v5.py | Python | mit | 31,575 | [
"Gaussian"
] | e1430aaef0efcce851545b21126c4c3efa83574bcd2172f103c56e1f33277266 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you ca... | claneys/shinken | shinken/stats.py | Python | agpl-3.0 | 6,954 | [
"CRYSTAL"
] | 25d7a5a0c3095dc662092db06bf573297d37002fe2f97b67e7dc9179aa477147 |
# -*- coding: utf-8 -*-
#
# gaussex.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (... | SepehrMN/nest-simulator | pynest/examples/spatial/gaussex.py | Python | gpl-2.0 | 2,621 | [
"Gaussian"
] | a9f7b552ec091bdb14d61b69ff6a0fd3d4eaf11e434451686dd4460e3fe5edd0 |
from os import getcwd
from os import chmod
from os.path import join
from os.path import abspath
CAPTURE_RETURN_CODE = "return_code=$?"
YIELD_CAPTURED_CODE = 'sh -c "exit $return_code"'
from logging import getLogger
log = getLogger( __name__ )
def build_command(
runner,
job_wrapper,
container=None,
i... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/jobs/command_factory.py | Python | gpl-3.0 | 7,582 | [
"Galaxy"
] | d9536dedfc05b347e2ab2ba982b406a7eb1db16a32f7213ef66ba10251e8a022 |
import _cmd
import threading
import pymol
P_GLUT_IDLE_EVENT = 0
P_GLUT_DISPLAY_EVENT = 1
P_GLUT_RESHAPE_EVENT = 2
P_GLUT_MOUSE_EVENT = 3
P_GLUT_MOTION_EVENT = 4
P_GLUT_CHAR_EVENT = 5
P_GLUT_SPECIAL_EVENT = 6
P_GLUT_PASSIVE_MOTION_EVENT= 7
P_GLUT_ACTIVE_ALT ... | gratefulfrog/lib | python/pymol/embed/__init__.py | Python | gpl-2.0 | 5,893 | [
"PyMOL"
] | aaa5b8145d2084c1aa3a577595d8fa20daac893142c27a8f784d1bdfb0b8f272 |
# Copyright 2019 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... | tensorflow/privacy | tensorflow_privacy/privacy/analysis/compute_dp_sgd_privacy_lib.py | Python | apache-2.0 | 2,858 | [
"Gaussian"
] | 7f15a610f9fcf09daf30ddf904ac16c0adc42a048bb8909932f6001871341be8 |
# coding: utf-8
from __future__ import unicode_literals
import unittest
import sys
from pymatgen.analysis.defects.point_defects import *
from pymatgen.core.structure import Structure
from pymatgen.core.periodic_table import Element
from pymatgen.analysis.bond_valence import BVAnalyzer
from monty.os.path import which... | yanikou19/pymatgen | pymatgen/analysis/defects/tests/test_point_defects.py | Python | mit | 23,697 | [
"GULP",
"pymatgen"
] | 19239d1ef9162bca49b61c6324fb56d069340e5e2890cdcfd73209ff78b0ffbc |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, 2015, 2016 Adam.Dybbroe
# Author(s):
# Adam.Dybbroe <adam.dybbroe@smhi.se>
# Panu Lahtinen <panu.lahtinen@fmi.fi>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | mraspaud/mpop | mpop/satin/nc_pps_l2.py | Python | gpl-3.0 | 41,179 | [
"Bowtie",
"NetCDF"
] | f4075d03c36598fe0762ca2082bd8edeb26fb92bf0fe71ab30e59a461a1f4d5f |
import json
import subprocess
import os
import logging
import numpy as np
import pandas as pd
import requests
import time
logger = logging.getLogger(__name__)
_host = None #: PlotHost
DEFAULT_SERVER = 'http://localhost:2908'
def plotar(data, col=None, size=None, *, xyz=None, type='p', lines=None, label=None,
... | thomann/plotVR | plotAR-py/plotar/client.py | Python | agpl-3.0 | 10,543 | [
"VisIt"
] | 0b2bb40b14ad5fdb69e7da042883254f2ba9cc288082ab6cb5d5ab23e72eb8b2 |
import pytest
import torch
from mmdet.core.post_processing import mask_matrix_nms
def _create_mask(N, h, w):
masks = torch.rand((N, h, w)) > 0.5
labels = torch.rand(N)
scores = torch.rand(N)
return masks, labels, scores
def test_nms_input_errors():
with pytest.raises(AssertionError):
ma... | open-mmlab/mmdetection | tests/test_utils/test_nms.py | Python | apache-2.0 | 2,528 | [
"Gaussian"
] | 5ac537f7b227034e9f9e8dbe42a562cc5bd99f936781998e9a4d732d8cd25a45 |
import numpy as np
from ase.units import Ha
from ase.dft.kpoints import monkhorst_pack
from ase.parallel import paropen
from ase.lattice import bulk
from gpaw import GPAW, FermiDirac
from gpaw.wavefunctions.pw import PW
from gpaw.mpi import size
kpts = monkhorst_pack((10,10,10))
kpts += np.array([1/20., 1/20., 1/20.])... | robwarm/gpaw-symm | gpaw/test/big/rpa/Na_bulk_gs.py | Python | gpl-3.0 | 972 | [
"ASE",
"GPAW"
] | 10a688f025265c4fa7f09500c02cee8aca348a1467280ac8492dfc21c2fe1300 |
"""HTTPS module based on the GFAL2_StorageBase class."""
# from DIRAC
from DIRAC.Resources.Storage.GFAL2_StorageBase import GFAL2_StorageBase
from DIRAC import gLogger
class GFAL2_HTTPSStorage(GFAL2_StorageBase):
""".. class:: GFAL2_HTTPSStorage
HTTP interface to StorageElement using gfal2
"""
# da... | DIRACGrid/DIRAC | src/DIRAC/Resources/Storage/GFAL2_HTTPSStorage.py | Python | gpl-3.0 | 909 | [
"DIRAC"
] | 94f0575bbda4cbcced87f01ee5dd9df4c2b13ffd20a7edde482bdf1afe31367e |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-compute | tests/unit/gapic/compute_v1/test_region_ssl_certificates.py | Python | apache-2.0 | 82,189 | [
"Octopus"
] | a37d8e7559f444225b4d41284ea7f13a07deab7d6c3838ee62513fd73a1a26a3 |
#!/usr/bin/env python
from gnuradio import gr
from gnuradio import gr, blocks, analog, filter
# import ofdm
import numpy
from transmitter_hier_bc import transmitter_hier_bc
from receiver_hier_cb import receiver_hier_cb
from channel_hier_cc import channel_hier_cc
from numpy import sqrt
import math
# from fbmc_swig
c... | rwth-ti/gr-ofdm | python/test_demapper_fbmc_multiuser.py | Python | gpl-3.0 | 6,163 | [
"Gaussian"
] | d4813ba219ea27c6908cfed010d79851e5e3629d3bb23ce70ff3de9a27ecacde |
import ast
import linecache
from .namespace import (VariableVisitor, ComplexAssignment,
NamespaceStep)
from .tools import (copy_lineno, _new_constant, pretty_dump,
ReplaceVariable, FindStrVisitor, get_literal,
RestrictToFunctionDefMixin, UNSET)
from .specialized import BuiltinGuard, SpecializedFunction
fro... | haypo/fatoptimizer | fatoptimizer/optimizer.py | Python | mit | 13,703 | [
"VisIt"
] | d3b81c8da5b57bea5facbc5e5dbafe72a183e321054d2fcdd1d8cc7b29d00a1d |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | jH0ward/psi4 | psi4/driver/qcdb/interface_gcp.py | Python | lgpl-3.0 | 11,855 | [
"Psi4"
] | c2692c7912f401fa1d86bb6280b8dab04c627a1789dc0516dbefe779b15d0e66 |
import os
try:
from hashlib import md5
except ImportError:
from md5 import md5
from docutils import nodes
from docutils.writers.html4css1 import HTMLTranslator
from sphinx.latexwriter import LaTeXTranslator
# Define LaTeX math node:
class latex_math(nodes.General, nodes.Element):
pass
def math_role(r... | qsnake/gpaw | doc/mathpng.py | Python | gpl-3.0 | 5,150 | [
"VisIt"
] | 0059f771d0e3829e0079a996008bd3b77e9c5f96c0180cfba64b74f50d0bb4e4 |
#
# 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) 2019 Jonathan Dent, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | dictoon/blenderseed | ui/camera.py | Python | mit | 6,748 | [
"VisIt"
] | 73a5e30a3bde0188b6f7ee461b594cbcae15795e6498c90e8a80fc9461ebbcdd |
"""
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Code is originally adapted from MILK: Machine Learning Toolkit
# Copyright (C) 2008-2011, Luis Pedro Coelho <luis@luispedro.org>
# License: MIT. See COPYING.MIT file... | mrshu/scikit-learn | sklearn/tree/tree.py | Python | bsd-3-clause | 29,584 | [
"Brian"
] | 76fe85ecaaafb7bfef3a7be69c0c9e7526e33781c8fbafc0b45629418ca3e08f |
#
# Handle the special case of the first scenario
#
self.notebook.switchScenario(0,scenarioType="Powder")
#
#
#
tab = self.notebook.mainTab
tab.settings['Program'] = 'vasp'
tab.settings['Output file name'] = 'OUTCAR'
tab.settings['Excel file name'] = ''
tab.settings['Script file name'] = 'atr_fitted_settings.py'
tab.se... | JohnKendrick/PDielec | Examples/ATR/Na2SO42_fit/script.py | Python | mit | 3,591 | [
"VASP"
] | c9af12dd6fcc4f1d388e9f934eb8c5e2c1ec1392769d86663618b9ba3456df2b |
#
# Parse tree nodes for expressions
#
import cython
cython.declare(error=object, warning=object, warn_once=object, InternalError=object,
CompileError=object, UtilityCode=object, TempitaUtilityCode=object,
StringEncoding=object, operator=object,
Naming=object, Nodes=objec... | Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/third_party/cython/src/Cython/Compiler/ExprNodes.py | Python | mit | 440,084 | [
"VisIt"
] | f97fe657f6e63c7397915ba20e2abe2003f33553efd99ccee67ccdfe9bd215a0 |
from DIRAC import gLogger
from dirac.lib.base import *
from dirac.lib.webconfig import gWebConfig
def getSelectedSetup():
if 'setup' in session:
selectedSetup = session[ 'setup' ]
if selectedSetup in gWebConfig.getSetups():
return selectedSetup
else:
return gWebConfig.getDefaultSetup()
els... | DIRACGrid/DIRACWeb | dirac/lib/sessionManager.py | Python | gpl-3.0 | 1,224 | [
"DIRAC"
] | c0b24aabb92585b8dd2ab91d525ec4e8ded294f7b974a1e7f9742fe25e402517 |
# -*- coding: utf-8 -*-
#
# brette-gerstner-fig-3d.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the ... | gewaltig/cython-neuron | pynest/examples/brette-gerstner-fig-3d.py | Python | gpl-2.0 | 1,700 | [
"NEURON"
] | 18ae848921ac07fcc9d810de081fd9e90f987719bd5f016646eb2913525cbb05 |
"""Base class for mixture models."""
# Author: Wei Xue <xuewei4d@gmail.com>
# Modified by Thierry Guillemot <thierry.guillemot.work@gmail.com>
# License: BSD 3 clause
from __future__ import print_function
import warnings
from abc import ABCMeta, abstractmethod
from time import time
import numpy as np
from .. impor... | raghavrv/scikit-learn | sklearn/mixture/base.py | Python | bsd-3-clause | 16,647 | [
"Gaussian"
] | 4c4a3bc20e4120fe2adf2030b30a43a6aa8c5840a5501fed64427ae89e4c9b20 |
# Copyright 2011-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
'''
Blocks and utilities for digital modulation and demodulation.
'''
# The presence of this file turns this directory into a Python package
import os
try:
from .digital_pyt... | trabucayre/gnuradio | gr-digital/python/digital/__init__.py | Python | gpl-3.0 | 1,169 | [
"Gaussian"
] | 81f9a86c2cf7d66855e67e9b8298de5ef82349d6cbc051a67bfd108c2cd23152 |
import os
import unittest
import numpy as np
from deepchem.utils.rdkit_utils import load_molecule
from deepchem.utils.rdkit_utils import compute_ring_center
from deepchem.utils.rdkit_utils import compute_ring_normal
from deepchem.utils.noncovalent_utils import is_pi_parallel
from deepchem.utils.noncovalent_utils import... | deepchem/deepchem | deepchem/utils/test/test_noncovalent_utils.py | Python | mit | 5,524 | [
"RDKit"
] | 4b53933915655d826d571022b6f5bd20d593655eb9ff3756e7b6a6890cda9854 |
# Creates the data dictionary used in the ps example
from lsst.daf.persistence import Butler
import pickle
n_max=0
stats={}
# output dir of the stack processing
output_dir = ""
butler = Butler(output_dir)
for dataref in butler.subset(datasetType='src'):
if dataref.datasetExists(): # processrCcd did not fail
... | lsst-sqre/bokeh-plots | backend/get_ps_data.py | Python | gpl-3.0 | 629 | [
"VisIt"
] | f579e62554b4a5eab1203477fd3361589a7f8f0b0b9dd9c6a3bad34065946e5b |
import math
"""
This script is written to convert the FIELD file generated using DL_FIELD (v-4.3) using different
forcefields to a lammps .data file, including both FF information and structural information, i.e.,
ready to run
dl_field.FIELD
modify dl_field.control file --> FIELD,CONFIG,CONTROL,DLF_notati... | riddlezyc/geolab | src/io/dlfield2lmp.py | Python | gpl-3.0 | 7,742 | [
"DL_POLY",
"LAMMPS"
] | a14de9f4788f45200bd723bf25542d7dd46a25ccd8e58620587ab7b0c10a0547 |
import numpy as np
from ase import Hartree
from gpaw.aseinterface import GPAW
from gpaw.lcao.overlap import NewTwoCenterIntegrals
from gpaw.utilities import unpack
from gpaw.utilities.tools import tri2full, lowdin
from gpaw.lcao.tools import basis_subset2, get_bfi2
from gpaw.coulomb import get_vxc as get_ks_xc
from gp... | qsnake/gpaw | gpaw/lcao/pwf2.py | Python | gpl-3.0 | 16,256 | [
"ASE",
"GPAW"
] | c11632775516c5bfeeff199524fcb69598ab8c6892456e3353cfc33931f272ea |
# coding=utf-8
from splinter import Browser
import unittest
from google.appengine.ext import testbed
browser = Browser()
class StaticPagesTest(unittest.TestCase):
def setUp(self):
global browser
self.tb = testbed.Testbed()
self.tb.activate()
self.tb.init_memcache_stub()
def t... | iandouglas/flask-gae-skeleton | tests/integration/static/test_social_linkedin.py | Python | mit | 715 | [
"VisIt"
] | a7af5f06a1c855669e4b0adb87716cdd22c93fdb6d2417dfa2e5482255a38380 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
PROG_VERSION = u"Time-stamp: <2022-01-07 17:10:27 vk>"
# TODO:
# * fix parts marked with «FIXXME»
# ===================================================================== ##
# You might not want to modify anything below this line if you do not ##
# know, what you are d... | novoid/appendfilename | appendfilename/__init__.py | Python | gpl-3.0 | 18,761 | [
"NAMD"
] | 6d2c1d94f0ecd0a0f45f962058e46d284127502d40537ac88201b5504439d038 |
'''
GOCDBSyncCommand module
This command updates the downtime dates from the DowntimeCache table in case they changed
after being fetched from GOCDB. In other words, it ensures that all the downtime dates in
the database are current.
'''
import errno
import xml.dom.minidom as minidom
from DIRAC ... | Andrew-McNab-UK/DIRAC | ResourceStatusSystem/Command/GOCDBSyncCommand.py | Python | gpl-3.0 | 4,416 | [
"DIRAC"
] | 3fc25304e5c8633266871e36125ac07699408abbf890d34f811e780724bb0916 |
import os
from octopus.server.DBInterface import DBInterface
from octopus.mlutils.pythonEmbedder.FeatureArray import FeatureArray
from octopus.mlutils.pythonEmbedder.FeatureArrayToMatrix import FeatureArrayToMatrix
"""
Contributed by @yangke:
For a given output directory, generate a TOC File,
create an APISymbol em... | octopus-platform/joern | python/joern-tools/joern/SimplifiedAPIEmbedder.py | Python | lgpl-3.0 | 4,266 | [
"Octopus"
] | 86dfd92acaf3e9e4b7de10a2b66e561e16486758cc233c928333f5ede0a9f277 |
##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2012-2019 Uni.Lu/LCSB, NTUA
# Authors:: Cedric Laczny <cedric.laczny@uni.lu>, Kenneth Hoste
# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis@cern.ch>
# License:: MIT/GPL
#... | pescobar/easybuild-easyblocks | easybuild/easyblocks/b/bwa.py | Python | gpl-2.0 | 2,741 | [
"BWA"
] | 1a411bd27e0e06a3180fa4ca3cd2d4c1e689eeb454f97907d3347abbd3d9f1fa |
#!/usr/bin/env python
# Copyright (c) 2015, Amit Zeisel, Gioele La Manno and Sten Linnarsson
# 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 a... | linnarsson-lab/BackSPIN | backspinpy/backSPIN.py | Python | bsd-2-clause | 37,358 | [
"VisIt"
] | 2a15555e3ce55c79944921f232e19d79e06cc1d947e90f99581bd846195dbb36 |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/pbc/gto/test/test_rcut.py | Python | apache-2.0 | 1,980 | [
"PySCF"
] | f232f42a6b21ef2558a36fa31b300f8ed63d5c0e8a70e15891ea4ec39d9747f0 |
# coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats = (
'{{first_name}} {{last_name}}',
'{{first_name}} {{last_name}}',
'{{first_name}} {{last_name}}',
'{{first_name}} {{last_name}}',
'{{fi... | deanishe/alfred-fakeum | src/libs/faker/providers/person/pt_PT/__init__.py | Python | mit | 4,138 | [
"Brian"
] | 287bb585bf74ba03e5c48e59d6161e2f08b40e423195a424f637e25f787f043b |
import os
import sys
import time
import numpy as np
import theano
import theano.tensor as T
from theano.sandbox.cuda.basic_ops import gpu_contiguous
# implementing Gaussian observation layer
# each output unit encodes P(o | s,a) ~ N(o | mu(s,a) , sigma(s,a) )
class GaussianObs(object):
""" Initialize from xml ... | mohsenmalmir/DeepLearningStack | DeepLearningStack/RL/GaussianObs.py | Python | mit | 2,677 | [
"Gaussian"
] | 449b055d2335934162a44b012a4931ce350002fb440e7154a694f31252dcf92e |
import numpy as np
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import pyroms
def remap(src_array, remap_file, src_grad1=None, src_grad2=None, \
src_grad3=None, spval=1e37, verbose=False):
'''
remap based on addresses and weights computed in a setup phase
'''
# ... | dcherian/pyroms | pyroms/pyroms/remapping/remap.py | Python | bsd-3-clause | 5,885 | [
"NetCDF"
] | f8699319188f276e692a132c31fe864500318174ebe892ce41de124acb494d0e |
"""This module contains the "Viz" objects
These objects represent the backend of all the visualizations that
Caravel can render.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import copy
import hashlib
import lo... | georgeke/caravel | caravel/viz.py | Python | apache-2.0 | 62,304 | [
"VisIt"
] | 140fe23acfd242848c0d2cde5a17773403bafe413894ccea84fe981c4e9d3b2d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.