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
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf import gto, scf, mcscf
'''
Density fitting for orbital optimzation.
Note mcscf.density_fit function follows the same convention of decoration
ordering which is applied in the SCF decoration. See pyscf/mcscf/df.py for
more details and p... | gkc1000/pyscf | examples/mcscf/16-density_fitting.py | Python | apache-2.0 | 1,552 | [
"PySCF"
] | 349a454f566f61dbd0135d3a77adeeb97c4409d489ed62d4099165ba65711a7e |
"""
===========================
Random projection benchmark
===========================
Benchmarks for random projections.
"""
from __future__ import division
from __future__ import print_function
import collections
import gc
import optparse
import sys
from datetime import datetime
import numpy as np
import scipy.s... | DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/benchmarks/bench_random_projections.py | Python | mit | 8,959 | [
"Gaussian"
] | 6bdc3cfe9d5e077125046307efb4545260d980f07a945e3ab0da2b15d655a556 |
#!/usr/bin/python
# Filename: example_sphere.py
#
# Code by Martin Jucker, distributed under an MIT License
# Any publication benefitting from this piece of code should cite
# Jucker, M 2014. Scientific Visualisation of Atmospheric Data with ParaView.
# Journal of Open Research Software 2(1):e4, DOI: http://dx.doi.org/... | mjucker/pv_atmos | examples/example_sphere.py | Python | mit | 3,365 | [
"ParaView"
] | 1c33430bd399f16eb3f6827daf3b0eca186de4e24062396eb6f24e59132eba96 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy
import unittest
import sys
sys.path.append('.')
from chempy.states import *
################################################################################
class StatesTest(unittest.TestCase):
"""
Contains unit tests for the chempy.states module, u... | jwallen/ChemPy | unittest/statesTest.py | Python | mit | 9,435 | [
"ChemPy"
] | c678f7d269a7d22980023758cafb55cd6d03e850e586b15451fa32549a9ec54d |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import logging as log
import uuid
from synergetics.config import config as cfg
from synergetics.learning.default import Default as Default_update
from synergetics.networks.default import Default as Default_discovery
class Neuron(object):
def __init... | synergetics/neuron | src/neurons/neurons.py | Python | mit | 1,852 | [
"NEURON"
] | a0a857b7997f2fe497a72c94e77f2f21382021fc889c16aae0b28d30e98a90dd |
#!/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/df/fft_jk.py | Python | apache-2.0 | 12,216 | [
"PySCF"
] | dc519b9f8cca46e0f71031daefbb2da54ef5edb1e10dfc80e4be4d22c9070b2f |
########################################################################
# $HeadURL$
########################################################################
""" This is the StorageElement class.
"""
from types import ListType
__RCSID__ = "$Id$"
# # custom duty
import re
# # from DIRAC
from DIRAC import gLogger, gCon... | Sbalbp/DIRAC | Resources/Storage/StorageElement.py | Python | gpl-3.0 | 32,247 | [
"DIRAC"
] | 015f676362285e43c2d9020ef015b92e0baf0aa9a0961aff8620564d0aa8a8b9 |
from Bio.Seq import reverse_complement
def findPrimer(primer, seq):
"""
Look for a primer sequence.
@param primer: A C{str} primer sequence.
@param seq: A BioPython C{Bio.Seq} sequence.
@return: A C{list} of zero-based offsets into the sequence at which the
primer can be found. If no ins... | terrycojones/dark-matter | dark/sequence.py | Python | mit | 2,939 | [
"Biopython"
] | f713ddbb0fcc423f3c69333b4e6ed59a8c80e41ed13b57a157d7b552f4398f5a |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | mol_dqn/experimental/multi_obj.py | Python | apache-2.0 | 4,847 | [
"RDKit"
] | 2299b9ca7ca4a4fd73ac168862d9cf799c09bfb6b02525151da3131a11998ffc |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Zsolt Foldvari
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2009 Brian Matherly
# Copyright (C) 2010 Peter Landgren
# Copyright (C) 2010 Jakim Friant
# Copyright ... | jralls/gramps | gramps/plugins/lib/libcairodoc.py | Python | gpl-2.0 | 62,883 | [
"Brian"
] | c0341212adb722ecbc1ccfc148cdb8f543c718c3a20490086c77bfb1ec1b3888 |
import argparse
import pdb
import numpy as np
import pylab as pl
import pyfits as pf
import sys
import NPK.Fit as FF
import NPK.Bar as Bar
from astropy.table import Table
from scipy.spatial import KDTree
import scipy.signal as SG
from scipy.interpolate import interp1d
import SEDMr.Extraction as Extraction
impo... | nickkonidaris/kpy | SEDMr/Flexure.py | Python | gpl-2.0 | 6,673 | [
"Gaussian"
] | 8fbdddb314f9cd117a12997627748ddde12464872e853ed657a6ac3ae84d2312 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__doc__ = """Code by Benjamin S. Murphy
bscott.murphy@gmail.com
Dependencies:
numpy
scipy
matplotlib
Classes:
UniversalKriging: Provides g... | basaks/PyKrige | pykrige/uk.py | Python | bsd-3-clause | 53,407 | [
"Gaussian"
] | 155f47de1392166717f72ca50030b892de4f6c3ff5db8452c056abf614cb13ce |
"""
Loads synthetic reaction datasets from USPTO.
This file contains loaders for synthetic reaction datasets from the US Patenent Office. http://nextmovesoftware.com/blog/2014/02/27/unleashing-over-a-million-reactions-into-the-wild/.
"""
import os
import csv
import logging
import deepchem
import numpy as np
from deepc... | miaecle/deepchem | deepchem/molnet/load_function/uspto_datasets.py | Python | mit | 3,744 | [
"RDKit"
] | ce42bbbafc1f8450aee7909358a94c0624f2a84d6e0031345821e581cdf79ac9 |
# $Id$
#
# Copyright (C) 2007-2008 Greg Landrum
# All Rights Reserved
#
""" Implementation of the clustering algorithm published in:
Butina JCICS 39 747-750 (1999)
"""
import numpy
from rdkit import RDLogger
logger = RDLogger.logger()
def EuclideanDist(pi, pj):
dv = numpy.array(pi) - numpy.array(pj)
return n... | bp-kelley/rdkit | rdkit/ML/Cluster/Butina.py | Python | bsd-3-clause | 3,503 | [
"RDKit"
] | 23a2ae7186caf479bd2df7013eb83e6c78b93a087a99c36269664d5972b94201 |
import math
from ..core import (Add, Eq, Integer, Rational, Symbol, factor_terms,
integer_nthroot, oo, symbols, sympify)
from ..core.assumptions import check_assumptions
from ..core.compatibility import as_int, is_sequence
from ..core.function import _mexpand
from ..core.numbers import igcdex
from ... | diofant/diofant | diofant/solvers/diophantine.py | Python | bsd-3-clause | 86,309 | [
"Gaussian"
] | bb66bc6c8ad5c9dcf8b6e276a96023b05446cf9b784a47afe087a15e2ca0ee66 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ePuck.py
#
# Copyright 2010 Manuel Martín Ortiz <mmartinortiz@gmail.com>
#
# 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; eit... | gctronic/epuck_driver | src/epuck/ePuck.py | Python | gpl-2.0 | 31,911 | [
"VisIt"
] | 58ff76744e3984a186c4cca2960f53bbd71d2974406488d8138aeeb619ceb779 |
"""
Contains administrative functions
"""
import logging
from galaxy import util
from galaxy.exceptions import ActionInputError
log = logging.getLogger( __name__ )
class AdminActions( object ):
"""
Mixin for controllers that provide administrative functionality.
"""
def _create_quota( self, params ):... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/actions/admin.py | Python | gpl-3.0 | 9,799 | [
"Galaxy"
] | 248284ebaae8054d778eda32e9735f74bbcf947c33fe0bb120f7ac93d7e37909 |
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.Alphabet import generic_dna
from mutation_stability import mutation_stability
import os
class virus_stability(object):
def __init__(self, hash, strain, trunk, tip, date, seq, foldx_directory, outgroup_directory):
self.hash_code = hash
self.... | blab/stability | augur/mutator/mutate_everything_2YP7/foldx_essentials/virus_stability.py | Python | agpl-3.0 | 9,304 | [
"FoldX"
] | 20e72303b5d1b15bfad9d8b2c0c17e4d012510049b18c753af6e8006d6203890 |
import numpy as np
import subprocess as sp
import tempfile
import copy
import os
import logging
import shutil
import QCkit.physical_constants as const
from QCkit.atom import Atom
log = logging.getLogger()
class Molecule(object):
"""
A class for holding the information and operations
related to... | EhudTsivion/QCkit | molecule.py | Python | lgpl-3.0 | 22,589 | [
"Jmol"
] | 1b04e0fd61e4d12747d56856f300055cc562897db24a7bda86da0d7583c0626a |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2012-2016 GEM Foundation
#
# OpenQuake 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 Licen... | vup1120/oq-hazardlib | openquake/hazardlib/gsim/chiou_youngs_2014.py | Python | agpl-3.0 | 21,363 | [
"Brian"
] | b95ed23d1f481db083e1107731734ebe85646a8af65b5d83fbc6c3f91e5583c6 |
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 21 14:16:08 2015
get dat and put it in pandas data set
@author: brian
"""
import pandas as pd
train = pd.read_excel('../input/journal.pcbi.1003266.s001-2.XLS')
resp_cols = ['MHC']
pd.crosstab(train['MHC'],train['Immunogenicity'])
from sklearn import preprocessing
l... | andretadeu/jhu-immuno | code/logRegr1.py | Python | mit | 2,240 | [
"Brian"
] | fff653aab685ca94a0193626dc2484b7be5d12125ef204959976efd6604b478e |
my_job = Job(application=DaVinci(version='v36r6'))
my_job.backend = Dirac()
my_job.name = 'Starterkit-Job 1'
my_job.inputdata = my_job.application.readInputData('MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.py')
my_job.application... | bixel/python-introduction | first_analysis_steps/submit_ganga_job.py | Python | mit | 518 | [
"DIRAC"
] | 817e559abd86e86a7b06970cef36becb699f7771390fcdc4bb17943f2b743d8f |
"""
Vector Autoregression (VAR) processes
References
----------
Lutkepohl (2005) New Introduction to Multiple Time Series Analysis
"""
from __future__ import division, print_function
from statsmodels.compat.python import (range, lrange, string_types, StringIO, iteritems,
cStringIO)
fr... | yl565/statsmodels | statsmodels/tsa/vector_ar/var_model.py | Python | bsd-3-clause | 50,547 | [
"Gaussian"
] | 2fa61ff058949fc3a310eabd906e44fb25f305f44a1f12e758de95a930343545 |
#!python
r"""
This module is a VTK Web server application.
The following command line illustrate how to use it::
$ vtkpython .../vtk_web_tree.py
Any VTK Web executable script come with a set of standard arguments that
can be overriden if need be::
--port 8080
Port number... | mathstuf/tangelo | tangelo/tangelo/pkgdata/plugin/vtkweb/include/vtkweb-launcher.py | Python | apache-2.0 | 4,144 | [
"VTK"
] | 335ff6e68bc0a68e95604480746f8abe484f60de51feb0a1d932185a46e595c4 |
# $Id$
#
# Copyright (C) 2005-2006 greg landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from __future__ import... | jandom/rdkit | rdkit/DataStructs/VectCollection.py | Python | bsd-3-clause | 6,326 | [
"RDKit"
] | 2e31b5e73d0063203933583336be5b3dbaeccf2bf1521676f136cf4efc9b94cb |
import numpy
from nbodykit.utils.meshtools import SlabIterator
def make_gaussian_fields(pm, linear_power, compute_displacement=False):
r"""
Make a Gaussian realization of a overdensity field, :math:`\delta(x)`
If specified, also compute the corresponding linear Zel'dovich
displacement fie... | rainwoodman/nbodykit | nbodykit/mockmaker.py | Python | gpl-3.0 | 8,121 | [
"Gaussian"
] | de33bc94e9df5e66414701d6559ee6fd9f78187184006a3bb0f044e0e926322d |
#!/bin/env python
"""
Module openmm.unit.basedimension
BaseDimension class for use by units and quantities.
BaseDimensions are things like "length" and "mass".
This is part of the OpenMM molecular simulation toolkit originating from
Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structure... | mdtraj/mdtraj | mdtraj/utils/unit/basedimension.py | Python | lgpl-2.1 | 3,953 | [
"OpenMM"
] | 27c83f8ca169e6348f56cc789e0c1a1f5721d2689a3fc40afcfa54810966eeb9 |
# traub_naf.py ---
#
# Filename: traub_naf.py
# Description:
# Author: Subhasis Ray
# Maintainer:
# Created: Mon Apr 29 21:07:30 2013 (+0530)
# Version:
# Last-Updated: Mon May 6 18:50:14 2013 (+0530)
# By: subha
# Update #: 436
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Change log... | BhallaLab/moose-examples | snippets/traub_naf.py | Python | gpl-2.0 | 11,815 | [
"MOOSE"
] | cfa279e684f45fbd71320d109229acb9a24a1cb7ef830e806e8e5c4723386ed3 |
import re
import os
from markdown.util import etree
import logging
log = logging.getLogger(__name__)
import MooseDocs
from markdown.inlinepatterns import Pattern
from MooseCommonExtension import MooseCommonExtension
import utils
class MooseImageFile(MooseCommonExtension, Pattern):
"""
Markdown extension for handl... | vityurkiv/Ox | python/MooseDocs/extensions/MooseImageFile.py | Python | lgpl-2.1 | 2,040 | [
"MOOSE"
] | b8bc3df2824ebc30f7f81fea051d8fc82cf2b426f1f6f35fde28fd884118d4b8 |
# Standard library
from os import path, unlink
# Third-party
import astropy.units as u
from astropy.utils.data import get_pkg_data_filename
import yaml
# Project
from ...config import TWOFACE_CACHE_PATH
from ..connect import db_connect
from ..model import AllStar, AllVisit, StarResult, Status, JokerRun
from ..init im... | adrn/TwoFace | twoface/db/tests/test_database.py | Python | mit | 2,674 | [
"VisIt"
] | 6b5bbad476a6197da0f98263ffe61e80a47f56b7ac26a2f2b29691eb63dd1d0f |
""" CSAPI exposes update functionalities to the Configuration.
Most of these functions can only be done by administrators
"""
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.Core.DISET.RPCClient import RPCClient
from DIRAC.Core.Utilities import List, Time
from DIRAC.Core.Security.X509Chain import X50... | petricm/DIRAC | ConfigurationSystem/Client/CSAPI.py | Python | gpl-3.0 | 27,483 | [
"DIRAC"
] | 83db30de17ef919a015ebf37e947e68b36b8b26d5226c907f78b77ed20ef47b9 |
#!/usr/bin/env python
#=========================================================================
# This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
# License (GPL) version 3, as described at www.opensource.org.
# Author: William H. Majoros (bmajoros@alumni.duke.edu)
#=====================================... | bmajoros/BioMaLL | neural/build-network.py | Python | gpl-2.0 | 3,031 | [
"NEURON"
] | eec0e6cdf70f73835944deef66201dcd8bf88abb328c6edc5a29b1dbb04a1cbd |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## 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 t... | valkyriesavage/invenio | modules/bibedit/lib/refextract.py | Python | gpl-2.0 | 310,726 | [
"DIRAC"
] | 2ac1b248b47a0afa162bc2a855deb4a9a03bd71c2ccd7129dcacd70659a9682f |
import ast
import codecs
import os
from setuptools import setup, find_packages
class VersionFinder(ast.NodeVisitor):
def __init__(self):
self.version = None
def visit_Assign(self, node):
if node.targets[0].id == '__version__':
self.version = node.value.s
def read(*parts):
"... | mlavin/aiodjango | setup.py | Python | bsd-2-clause | 1,758 | [
"VisIt"
] | d4bae4219c7f578cd892730dcbbdccb82e4d2c834475960eb02f140c4ac39bd3 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 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
#... | ashutoshvt/psi4 | psi4/driver/p4util/exceptions.py | Python | lgpl-3.0 | 9,523 | [
"Psi4"
] | 473483ee7ba391f8de737b6551ea2057f616fa95ceaf9694d3faac7988fe6fee |
#!/usr/bin/env python3
# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
#########################################################################
# Copyright 2012-2013 Marcus Popp marcus@popp.mx
# Copyright 2016- Christian Strassburg c.strassburg@gmx.de
##... | smaiLee/smarthome | plugins/knx/__init__.py | Python | gpl-3.0 | 15,030 | [
"VisIt"
] | 7de8783a8ff3a0f7ea9a5391da63523d0821b9cbbe772e489947ea21e544b542 |
# -*- coding: utf-8 -*-
"""
@namespace Area
Tools and events manipulation
Copyright 2007, NATE-LSI-EPUSP
Oficina is developed in Brazil at Escola Politécnica of
Universidade de São Paulo. NATE is part of LSI (Integrable
Systems Laboratory) and stands for Learning, Work and Entertainment
Research Group. Visit o... | godiard/paint-activity | Area.py | Python | gpl-2.0 | 72,513 | [
"FLEUR",
"VisIt"
] | 9159b7c7dc29011b59bd44e834214443a3463658776264efe130967f462e0a2f |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | leeping/mdtraj | tests/test_binpos.py | Python | lgpl-2.1 | 5,182 | [
"MDTraj",
"VMD"
] | bcb40c13948716c6b56558ec1bf9bd4f14bc84dda129c3ecdd8ae73d182a5763 |
import numpy as np
import sys
#from phonopy.structure.cells import get_supercell
from ase import Atoms
from ase.io import write
import numpy as np
import copy
import pyDFTutils.perovskite.perovskite_mode as perovskite_mode
from pyDFTutils.perovskite.perovskite_mode import Gamma_modes
import spglib.spglib
#from phonop... | mailhexu/pyDFTutils | pyDFTutils/perovskite/frozen_mode.py | Python | lgpl-3.0 | 23,623 | [
"ASE",
"VASP",
"phonopy"
] | 4ec9fee60627537d3a8745f9e6dd05d42a9949247af39596689bd2fa4d777cb6 |
"""
This is only meant to add docs to objects defined in C-extension modules.
The purpose is to allow easier editing of the docstrings without
requiring a re-compile.
NOTE: Many of the methods of ndarray have corresponding functions.
If you update these docstrings, please keep also the ones in
core/fromnum... | Microvellum/Fluid-Designer | win64-vc/2.78/python/lib/site-packages/numpy/add_newdocs.py | Python | gpl-3.0 | 218,813 | [
"Brian"
] | 3be5f8ea33558e7ae4647d9d2bd1abeb39a434fadc1d4448844dc7e742f092e1 |
#!/usr/bin/env python3
import numpy as np
import vtk
def mandelbrot_set(X, Y, maxiter, horizon=2.0):
C = X + Y[:, None]*1j
N = np.zeros(C.shape, dtype=int)
Z = np.zeros(C.shape, np.complex64)
for n in range(maxiter):
if n % (maxiter / 10) == 0:
print('progress: %d/%d' % (n, maxiter))
I = np.less... | dubrayn/dubrayn.github.io | examples/vtk/vtk_save_polydata.py | Python | mit | 1,468 | [
"VTK"
] | 9464aab3ec513dba177a66cede9f934c98f7abd7f68370639cc52458fe05b107 |
#
# Copyright 2015 The AMP HTML 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 applic... | mlb7687/amphtml | validator/validator_gen_js.py | Python | apache-2.0 | 23,188 | [
"VisIt"
] | 634eee55e6f03da55488a90ea0011da3e4a16e9639d73cf241050d81d5fd10a9 |
import os
import numpy as np
import matplotlib.pyplot as plt
from Jacapo import *
from ase.dft.dos import *
class BandStructure:
'''outline of class to facilitate band structure calculations
'''
def __init__(self,
atoms,
BZpath=[],
npoints=10,
... | freephys/python_ase | ase/calculators/jacapo/utils/bandstructure.py | Python | gpl-3.0 | 6,978 | [
"ASE"
] | 909a0ef74ea56af45628fe3aa0602431927191f1ba9aaad2127f01c7b573cda4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Written by Lucas Sinclair.
MIT Licensed.
Contact at www.sinclair.bio
"""
# Built-in modules #
import os
# First party modules #
# Internal modules #
from Bio import SearchIO
from autopaths.file_path import FilePath
from seqsearch.search.core import CoreSearch
# Mo... | xapple/seqsearch | seqsearch/search/vsearch.py | Python | mit | 5,400 | [
"BLAST",
"Biopython"
] | 40fda004024a7790f6d5b6e0bd8015a27fb16a7df38b1627fb475ce3d00357db |
"""
Do all the work for reporting
"""
import abc
from utils.utils import *
class Report:
"""Base class for reports"""
__metaclass__ = abc.ABCMeta
def __init__(self, sqlQuery):
self.sqlQuery = sqlQuery
@abc.abstractmethod
def getTitleAndHtml(self, db, bottle_session):
pass
@a... | jlutz777/FreeStore | reporting/reports.py | Python | mit | 29,008 | [
"VisIt"
] | 9295fdecee43d2c896b705a8c46e781a1413dd4bd5fbb7fc937f3aaed3c0c4d6 |
#!/usr/bin/env python
"""
Create a DIRAC RemoveReplica|RemoveFile request to be executed by the RMS
Usage:
dirac-dms-create-removal-request [options] ... SE LFN ...
Arguments:
SE: StorageElement|All
LFN: LFN or file containing a List of LFNs
"""
from __future__ import print_function
from __future__ i... | yujikato/DIRAC | src/DIRAC/DataManagementSystem/scripts/dirac_dms_create_removal_request.py | Python | gpl-3.0 | 3,406 | [
"DIRAC"
] | eb519913904161a536104c32fac829318bd40180e4669111ca0176a7a340d393 |
# GromacsWrapper -- cbook.py
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
"""
:mod:`gromacs.cbook` -- Gromacs Cook Book
=========================================
The :mod:`~gromacs.cbook` (cook book) module contains short recipes for tas... | jandom/GromacsWrapper | gromacs/cbook.py | Python | gpl-3.0 | 89,844 | [
"CHARMM",
"CRYSTAL",
"Gromacs",
"MDAnalysis",
"VMD"
] | 7d192ec7bcab5f5485288087699025e0109a84413d7818b7a0c214522d31af58 |
# (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 your option) any l... | Jozhogg/iris | lib/iris/tests/__init__.py | Python | lgpl-3.0 | 29,712 | [
"NetCDF"
] | d6159b812c0785c40e4771b7ca8b63c3c94e60cb2f9e4fc0f743a28f52e6a452 |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import functools
import glob
import itertools
import jinja2
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import sys
import time
import urllib2
import zlib
from xml.etree import ElementTree
from cStringIO ... | barachka/odoo | addons/web/controllers/main.py | Python | agpl-3.0 | 66,236 | [
"VisIt"
] | 28cc1935c23759e479e20797d6827c4454f2427361ba0dc8252f95b5ce07cb02 |
#
# @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 program is free software; you can redistribute it and/or modify
# it under the terms of ... | mhlechner/psi4 | psi4/driver/procrouting/wrappers_cfour.py | Python | gpl-2.0 | 36,682 | [
"CFOUR",
"Psi4"
] | 035958bf19495fbf7a0794d93270785c93129bc449721ee052ea6e7e88e16539 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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 Foundati... | andrebellafronte/stoq | stoq/gui/test/test_admin.py | Python | gpl-2.0 | 7,282 | [
"VisIt"
] | c37dcd04eaaa05d65ab6620fc8c1e32841c4bfe0bee8a681cd2f94e90db66074 |
'''
Created on Jul 15, 2011
@author: sean
'''
from __future__ import print_function
import _ast
from . import Visitor
from string import Formatter
import sys
from ...utils import py3op, py2op
if sys.version_info.major < 3:
from StringIO import StringIO
else:
from io import StringIO
class ASTFormatter(Format... | diana-hep/femtocode | lang/femtocode/thirdparty/meta/asttools/visitors/pysourcegen.py | Python | apache-2.0 | 23,959 | [
"VisIt"
] | 461eb9b6f4be12aa340d67d60778a8556c7f877b7dfe6f902125c54d4224205f |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import matplotlib.colors as colors
def get_grid2D(theta, phi):
nphi = len(phi)
ntheta = len(theta)
p2D = np.zeros([nphi, ntheta])
th2D = np.zeros([nphi, ntheta])
for i i... | AnkitBarik/inermodz | plotlib.py | Python | gpl-3.0 | 4,154 | [
"Mayavi"
] | ccf47372da1a3f123a2c9f311a684b9427d516fb023028f272e62e1a669cbbf7 |
# This file is part of Checkbox.
#
# Copyright 2012 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox 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 versio... | zyga/debian.plainbox | plainbox/impl/resource.py | Python | gpl-3.0 | 17,544 | [
"VisIt"
] | f151348c596f140ee6a61ab4c73a8adeb2ca5f783548804594804d8dd3fb1ab5 |
# Copyright (c) 2006 John Gilman
#
# This software is distributed under the MIT Open Source License.
# <http://www.opensource.org/licenses/mit-license.html>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# ... | NarlikarLab/DIVERSITY | weblogoMod/corebio/ssearch_io/blastxml.py | Python | gpl-3.0 | 9,421 | [
"BLAST",
"BioJava"
] | d0fcef050cae0fb6a936d58a93147f3f478526bef90004ddd8b3040f28793dd5 |
"""Leetcode 226. Invert Binary Tree
Easy
URL: https://leetcode.com/problems/invert-binary-tree/
Invert a binary tree.
Example:
Input:
4
/ \
2 7
/ \ / \
1 3 6 9
Output:
4
/ \
7 2
/ \ / \
9 6 3 1
"""
# Definition for a binary tree node.
class TreeNode(object):
def ... | bowen0701/algorithms_data_structures | lc0226_invert_binary_tree.py | Python | bsd-2-clause | 2,597 | [
"VisIt"
] | 0292e2b46410203beba89ef094f8483e168df26542fa5ad46cfb0e6375255378 |
#!/usr/bin/env python
# NetView P v.0.7 - Windows
# Dependencies: PLINK
# Eike Steinig
# Zenger Lab, JCU
# https://github.com/esteinig/netview
# Multiprocessing module for Windows
import os
import time
import shutil
import argparse
import subprocess
import numpy as np
import multiprocessing as mp
import scipy.sparse.... | esteinig/netviewP | program/win/0.7/netview.py | Python | gpl-2.0 | 28,787 | [
"Biopython"
] | ae033637fb77086765b508d12145ab0e324b776b1c1d94a5441f2846e61162e4 |
# -*- coding: utf-8 -*-
#
# intrinsic_currents_spiking.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 ... | HBPNeurorobotics/nest-simulator | pynest/examples/intrinsic_currents_spiking.py | Python | gpl-2.0 | 5,954 | [
"NEURON"
] | 65bfc3a356ed7437bf5666cdfd9855dd6e5788e1d0c774dd385e056415b9ea27 |
from __future__ import division, with_statement
from scipy.constants import pi
import scipy.constants as cons
import numpy as np
import scipy.optimize as optimize
try:
import matplotlib.pyplot as plt
have_plt = True
except:
have_plt = False
import scipy.linalg
__author__ = 'sbt'
# -*- coding: utf-8 -*-
""... | d-meiser/ion-trapping-notes | cooling/scripts/mode_analysis_code.py | Python | gpl-3.0 | 34,579 | [
"CRYSTAL"
] | cdf781d533ac47fab2073a1da111a741659e109b11e099ffcbfde75a81316c62 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# 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
#
# ... | coufon/neon-distributed | examples/dist/cifar10_allcnn.py | Python | apache-2.0 | 5,886 | [
"Gaussian"
] | 2cdd116b99bb8e7595f97a546170e34818b0e7326f0c92b90fd0bf4871df6fc0 |
# .. coding: utf-8
# $Id: __init__.py 7745 2014-02-28 14:15:59Z milde $
# Author: Engelbert Gruber, Günter Milde
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""LaTeX2e document tree Writer."""
__docformat__ = 'reStructuredText'
# code contributi... | arnavd96/Cinemiezer | myvenv/lib/python3.4/site-packages/docutils/writers/latex2e/__init__.py | Python | mit | 124,411 | [
"VisIt"
] | 0e9afeb622abdf699bf1b9fc1f63f2b64490cf936cda1d3ebee37415b8f264d2 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RGlimma(RPackage):
"""Interactive HTML graphics.
This package generates interactiv... | iulian787/spack | var/spack/repos/builtin/packages/r-glimma/package.py | Python | lgpl-2.1 | 1,505 | [
"Bioconductor"
] | 0b7c49fe15456f5a522c70386e9863ef8dc372a3a35e776ec54930d2ffb2bb10 |
'''Python module to generate artificial xtc data for unit testing of mean_square_displacement_by_species() diffusion analysis code.'''
import MDAnalysis
import numpy
import scipy
import MDAnalysis.coordinates.XTC
import MDAnalysis.coordinates.GRO
def main():
#load a dummy coordinate file that contains only three ... | greatlse/diffusion_analysis_MD_simulations | test_data/generate_artificial_xtc_diffusion_testing.py | Python | mit | 1,984 | [
"MDAnalysis"
] | 3d89a1a3d8fa2edbbc627a6fdf42ff3e2a0b9b9e2925ba85268fa06077967732 |
# THIS FILE IS PART OF PyPad, AND IS GOVERENED BY A PERMISSIBILITY LICENSE
# GOVERNING ITS USE AND DISTRIBUTION. YOU SHOULD HAVE RECIEVED A COPY OF THIS
# LICENSE WITH THE SOFTWARE; IF NOT PROVIDED, WRITE TO <tjlane@stanford.edu>.
#
# AUTHORS:
# TJ Lane <tjlane@stanford.edu>
# Jonas Sellberg <sellberg@slac.stanford.e... | tjlane/pypad | pypad/utils.py | Python | gpl-2.0 | 12,517 | [
"Gaussian"
] | be12ea1a2519f217c6d12676800034bfc86843b778ecbdedd4306eb0bb1f77db |
import tensorflow as tf
import numpy as np
def xavier_glorot_initialization(in_dim, out_dim, distribution='normal'):
"""
Xavier Glorot and Yoshua Bengio (2010)
Understanding the difficulty of training deep feedforward neural networks.
International Conference on Artificial Intelligence and Statistics.... | arahuja/generative-tf | generative-tf/models/initialization.py | Python | apache-2.0 | 1,506 | [
"Gaussian"
] | 7c6f171f8905fe551c0d9d78c25db56dc5b0f819f1e6d880313ff0e5f795cbf8 |
# coding: utf-8
from __future__ import unicode_literals, division
import subprocess
import os
import shutil
import math
import logging
import numpy as np
from pymatgen import Structure
from pymatgen.io.vasp import VaspInput, Incar, Poscar, Outcar, Kpoints, Vasprun
from monty.os.path import which
from monty.shutil im... | specter119/custodian | custodian/vasp/jobs.py | Python | mit | 37,633 | [
"VASP",
"pymatgen"
] | 82930886ad85eb43797faf101665c6ca6b890d7a56f8d98fb33ba54731fa6337 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''Pychemqt, Chemical Engineering Process simulator
Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@gmail.com>
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 Softwar... | jjgomera/pychemqt | lib/compuestos.py | Python | gpl-3.0 | 175,391 | [
"Avogadro",
"Pybel"
] | 1b15402fb0ae2e9bb70bb016e37f8e9ce95cfeb640e751e2d98c1df3157d09ef |
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | opinkerfi/check_mk | web/htdocs/dashboard.py | Python | gpl-2.0 | 27,319 | [
"VisIt"
] | 49a8363a7597166e09e05cda0064c29cf17eded350bd712efeaecab6f0010b95 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Various functions and decorators for PKC
"""
from __future__ import absolute_import, division, unicode_literals
from logging import getLogger
from sqlite3 import OperationalError
from datetime import datetime
from unicodedata import normalize
from threading import Lock
... | croneter/PlexKodiConnect | resources/lib/utils.py | Python | gpl-2.0 | 33,702 | [
"VisIt"
] | 974e332749b720ea6fbc0edf6f4d70a0b8e4b5096931df6aff246c215c209282 |
# POVME Pocket ID 1.0 is released under the GNU General Public License
# (see http://www.gnu.org/licenses/gpl.html).
# If you have any questions, comments, or suggestions, please don't hesitate to contact me,
# Jacob Durrant, at jdurrant [at] ucsd [dot] edu.
import sys
import numpy
from scipy import spatial
from sci... | j-wags/POVME | POVME/POVME_pocket_id.py | Python | gpl-3.0 | 51,400 | [
"VMD"
] | 9713641ccf1f6980768deb5f128458b344d40bee25ef78d1c44eb7a71b46e737 |
#!/usr/bin/env python
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | GoogleCloudPlatform/pci-gke-blueprint | test/verify_boilerplate.py | Python | apache-2.0 | 9,773 | [
"VisIt"
] | d5465e69d2617011505b92f4ef5348495b4e90ece09f10c1ac51c7e05ef8e42b |
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print i
1
2
>>> g = f()
>>> g.next()
1
>>> g.next()
2
"Falling off the end" stops the generator:
>>> g.next()
Traceback (most recent call la... | sauloal/pycluster | pypy-1.9_64/lib-python/2.7/test/test_generators.py | Python | mit | 50,921 | [
"VisIt"
] | c35b0e295ca91b5144c66aec35f4dfab26c008c3573adf2d8a824b0f01b22c8c |
#!/usr/bin/env python3
# ---------------------------------------------------------------------------- #
# FHNW Technik, glaL4, Experiment O12: Laser Anemometry #
# Flow Profile in turbulent case #
# Conversion of measured frequencies into flow speeds... | alpenwasser/glaL4 | versuche/o12/python/turbulent.py | Python | mit | 2,381 | [
"Gaussian"
] | 795279976e960d68c84fcb0156b2c01ec78028bfae0bcabb90377a69def5a6ab |
"""Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
pick random sample
generate random permutation
distributions on the real line:
------------------------------
uniform
... | 171121130/SWI | venv/Lib/random.py | Python | mit | 25,890 | [
"Gaussian"
] | 711c4823a74588679b8979461fd23b5c119d31659bbacd699b003de1fda24a25 |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | cold_posterior_bnn/core/prior.py | Python | apache-2.0 | 20,245 | [
"Gaussian"
] | 114c800835b639e9179cd6a7e3d7ae4cc6a82ead5bf7e6bd892df88e93dc9f82 |
import ast
import vbench
import os
import sys
import astor
import glob
def vbench_to_asv_source(bench, kinds=None):
tab = ' ' * 4
if kinds is None:
kinds = ['time']
output = 'class {}(object):\n'.format(bench.name)
output += tab + 'goal_time = 0.2\n\n'
if bench.setup:
indented_se... | Ziqi-Li/bknqgis | pandas/asv_bench/vbench_to_asv.py | Python | gpl-2.0 | 4,846 | [
"VisIt"
] | d03bd0c450f5bfb834c7b826656926bcc1dea729368f21dad68a2a217d988988 |
#!/galaxy/home/mgehrin/hiclib/bin/python
import sys
import bx.align.maf
import bx.bitset
from bx.bitset_builders import *
from itertools import *
from optparse import OptionParser
from rpy import *
def main():
# Parse the command line
parser = OptionParser(usage = "usage: %prog [options] maf_file snp_file neutral... | bxlab/HiFive_Paper | Scripts/HiCLib/bx-python-0.7.1/build/scripts-2.7/mMK_bitset.py | Python | bsd-3-clause | 4,802 | [
"Galaxy"
] | 242361cfe1681ff4c5eb463d06419da07f06c9b70b2742135ccff06639a1bbc5 |
#
# Copyright (C) 2000 greg Landrum
#
""" unit tests for the ID3 implementation """
from __future__ import print_function
import io
import unittest
from rdkit import RDConfig
from rdkit.ML.Data import MLData
from rdkit.ML.DecTree import ID3
from rdkit.six.moves import cPickle
class ID3TestCase(unittest.TestCase):... | rvianello/rdkit | rdkit/ML/DecTree/UnitTestID3.py | Python | bsd-3-clause | 6,026 | [
"RDKit"
] | 5ab17a475e8c85e8e9ff52b30d15ecddaf01cc2fa1dd75813867122f268b9060 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import pytest
import os
from collections import defaultdict
from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.entries.computed_entries import ComputedEntry, \
ComputedStructureEnt... | mbkumar/pymatgen | pymatgen/entries/tests/test_computed_entries.py | Python | mit | 13,587 | [
"VASP",
"pymatgen"
] | 97c4a5abc91ba15173cf29e0cd4b7627af3b09b46d3120cec044a66ac9295320 |
"""Main pipeline file"""
import argparse, sys, gzip, tempfile, shutil, os,os.path, pysam
import settings, tophat, postprocess, statistics
import preprocess
tophat.verbose = False
verbose = True
check_output = True
def main():
#parse command line
my_args = get_arguments()
run(my_args.settings, my_args.reads, m... | haydnKing/waistcoat | waistcoat/waistcoat.py | Python | gpl-2.0 | 4,771 | [
"pysam"
] | 752b4fc5b99f5696f43f2ab7c1c48a33272dd0cbfb4478f4c9bb18d3cb27884b |
"""
KeepNote
Editor widget in main window
"""
#
# KeepNote
# Copyright (c) 2008-2009 Matt Rasmussen
# Author: Matt Rasmussen <rasmus@mit.edu>
#
# 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... | reshadh/Keepnote-LaTeX | keepnote/gui/editor.py | Python | gpl-2.0 | 3,196 | [
"VisIt"
] | 5c014b42308c8e2bb3e7ed70e40fe3f08526e69138c67c861fe03c0d21d1946e |
#!/usr/bin/python
from MDAnalysis import *
import numpy.linalg
u = Universe("sampled.pos.pdb")
calphas = u.selectAtoms('name CA')
bg = calphas.selectAtoms('segid A and resid 3:77 or segid B and resid 1:90')
g = open('rgyr_bg','w')
for ts in u.trajectory:
rgyr_bg = bg.radiusOfGyration()
g.write('%f\n' % (rgyr_bg... | demharters/git_scripts | gyr_bg_ca_4gbx.py | Python | apache-2.0 | 335 | [
"MDAnalysis"
] | 1b6cc3393158c31613ba8c20bdbc219c786c9001376bf541e5d945f6214cac14 |
#!/usr/bin/env python3
# written by sqall
# twitter: https://twitter.com/sqall01
# blog: https://h4des.org
# github: https://github.com/sqall01
#
# Licensed under the GNU Affero General Public License, version 3.
import logging
import requests
import threading
import os
import time
import json
import hashlib
import t... | sqall01/alertR | server/lib/update.py | Python | agpl-3.0 | 33,833 | [
"VisIt"
] | 74e3dede76a98b81fe029af8c1fc19a889a814e46c6cb3e65723e50570be5dd3 |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
import iris.tests as tests
import iris
import numpy as np
import PIL.Image
@tests.skip_gdal
@tests.skip_data
class TestGeoT... | pp-mo/iris | lib/iris/tests/experimental/test_raster.py | Python | lgpl-3.0 | 5,596 | [
"NetCDF"
] | c34d15a9c28bb8888d141e5e9120ddb0c3f16fb0db9815872df5e5bd81285bad |
#!/usr/bin/python
'''
pysam
*****
'''
import os, sys, glob, shutil, hashlib, re, fnmatch
import platform
name = "pysam"
# collect pysam version
sys.path.insert( 0, "pysam")
import version
version = version.__version__
samtools_exclude = ( "bamtk.c", "razip.c", "bgzip.c",
"main.c", "calDepth... | pkaleta/pysam | setup.py | Python | mit | 6,941 | [
"pysam"
] | ae5fd54c17a5a80f9ab3399e9eba28df161ecdfde9d10153b7ffe7035cd534ef |
# -*- coding: utf-8 -*-
"""
Common data structures to hold information extracted from PDB coordinates and
headers
SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... | madscatt/zazzie | src_2.7/sassie/build/pdbscan/pdbscan/data_struct.py | Python | gpl-3.0 | 39,665 | [
"CHARMM"
] | 53f5e9bc0536f61af4dc348b476cfadb5c46bb9d98b1a280027e55e9460c794e |
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from website.views import *
urlpatterns = patterns('',
url(r'^', include('website.contrib.communication.urls')),
url(r'^$', HomeView.as_view(),name="website-home"),
url(r'^login/$','website.views.login_form',name='websit... | Krozark/Harpe-Website | Harpe-website/website/urls.py | Python | bsd-2-clause | 1,669 | [
"BLAST"
] | 7f20512d4262a45945d26fbe4c361d524f43820b5656a95e9d1d9c5fe726af13 |
"""
Provide a generic structure to support window functions,
similar to how we have a Groupby object.
"""
from datetime import timedelta
from functools import partial
import inspect
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
List,
Optional,
Set,
... | jreback/pandas | pandas/core/window/rolling.py | Python | bsd-3-clause | 67,143 | [
"Gaussian"
] | f1112e48451feded565f7887019273f310ab5eff66eb135970f332ed51623844 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
UKR test with a subset of the MNIST digits data.
Author: Christoph Hermes
Created on Februar 07, 2015 18:50:36
The MIT License (MIT)
Copyright (c) 2015 Christoph Hermes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software ... | chermes/python-ukr | examples/digits/digits.py | Python | mit | 3,626 | [
"Gaussian"
] | 6e74d9f9011657c5fd1f22f812f191f2e58f67b0895ca99f20f5885c885ca642 |
"""
I/O SU2 mesh format
<https://su2code.github.io/docs_v7/Mesh-File/>
"""
from itertools import chain, islice
import numpy as np
from .._common import _pick_first_int_data, warn
from .._exceptions import ReadError
from .._files import open_file
from .._helpers import register_format
from .._mesh import CellBlock, Me... | nschloe/meshio | src/meshio/su2/_su2.py | Python | mit | 11,830 | [
"VTK"
] | 573bf364439f1c7f521d47efa88be1b2d5a59340ad1467af13ad10a330a1da10 |
# -*- coding: UTF-8 -*-
# Vehicle Type Definitions for Armoured Commander
##########################################################################################
#
# Copyright 2015 Gregory Adam Scott (sudasana@gmail.com)
#
# This file is part of Armoured Commander.
#
# Armoured Commander is free software:... | sudasana/armcom | armcom_vehicle_defs.py | Python | gpl-3.0 | 25,053 | [
"Firefly"
] | ff7aaf006a397ea8dcbf06631762f0beff44566178d7085e510cd76cb898a4bb |
# -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Class for reading and writing uvfits files."""
import os
import copy
import warnings
import numpy as np
from astropy import constants as const
from astropy.time import Time
from astro... | HERA-Team/pyuvdata | pyuvdata/uvdata/uvfits.py | Python | bsd-2-clause | 69,235 | [
"exciting"
] | 30bf91a5ace7483a603f7ca1d0aafe4c9a034063a6f3dee5de019366abfd2175 |
import math
import sys
import numpy as np
from scipy.io import netcdf_file as _netcdf_file
if 'matplotlib' not in sys.modules:
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
from pychemia.code.abinit import AbinitInput, AbiFiles
fr... | MaterialsDiscovery/PyChemia | scripts/abi_plot_hist.py | Python | mit | 7,681 | [
"ABINIT"
] | 80c9736811356c5ccca91eeb32a8e00d5e7470627397121bdb4b8346706ed218 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Emacs: treat this as -*- python -*-
from optparse import OptionParser
parser = OptionParser(usage='%prog [options] output_prefix.\nExample of call:\n'+
'python %prog --dir=. --pattern="b256H2O_120_04x04m64.grid_*_" b256H2O\n',
... | robwarm/gpaw-symm | doc/devel/256H2O/scaling.py | Python | gpl-3.0 | 8,579 | [
"GPAW"
] | b1ed90645246837916bb053b1b1fe907bc29d56a3c728f47ed5ec1d523e1ec4e |
########################################################################
# $HeadURL$
# File : OcciImage.py
# Author : Victor Mendez ( vmendez.tic@gmail.com )
########################################################################
# DIRAC
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
# VMDIRAC
from VMDIRAC.Work... | vmendez/VMDIRAC | WorkloadManagementSystem/Client/OcciImage.py | Python | gpl-3.0 | 8,157 | [
"DIRAC"
] | 340de358d3dc8b42baf8fac8d82ab19b56c730693b4638b7b5cc4d901d624bb7 |
import networkx as nx
from heapq import heappop, heappush
from itertools import count
import numpy as np
class GG:
def __init__(self, solver):
self.em = solver.env_model
self.costfx = solver.cost_function.cached["costs"]["energy"]
def n(self, node):
n = np.array((node)) + self.em.searc... | kezilu/pextant | pextant/solvers/nxastar.py | Python | mit | 3,014 | [
"VisIt"
] | bd00d4b65eba8fbf46bda0c8832121c497af8f0c455f26416dba1ff49ef0aaff |
"""
Copyright (C) 2013 Travis DeWolf
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope t... | studywolf/pydmps | pydmps/dmp_discrete.py | Python | gpl-3.0 | 5,689 | [
"Gaussian"
] | 3dd460dd643bdb02049397ad2ca50a6c811cc94c237a57aa9a6adbe7a0fa4aea |
# Copyright(C) 2011-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 ve... | KaiSzuttor/espresso | testsuite/python/ek_charged_plate.py | Python | gpl-3.0 | 6,001 | [
"ESPResSo"
] | a853e1cf75b94a6b5693b4be7dc47d797a12046e29d2415b4a5766d2179d01e4 |
from HappyTools.gui.tooltip import create_tooltip
import tkinter as tk
class SettingsWindow(object):
def __init__(self, master):
self.settings = master.settings
self.create_window()
def create_window(self):
root = tk.Toplevel()
root.protocol('WM_DELETE_WINDOW', self.close_sett... | Tarskin/HappyTools | HappyTools/gui/settings_window.py | Python | apache-2.0 | 11,342 | [
"Gaussian"
] | 45625dabece356df4ac348812c3417e17bd9896cdb47c389165649aeb8cdb1c8 |
#!/usr/bin/python
##
# Use : To get selected sequence part
# Require : preinstalled BioPython
# Usage : python script.py <InputSeqFile> <selected_pfam> > <OutputFile>
##
import sys,csv,re
from Bio import SeqIO
###
# Argumants
###
if len(sys.argv) != 3:
print "USAGE: \n \t python",sys.argv[0]," <SeqFile> <PFamFile>... | minesh1291/Sequence-Utilities | FetchDomainPartSeq.py | Python | apache-2.0 | 1,561 | [
"Biopython"
] | 3687faa218dc7bb6734bb0aca7fa1f88546ce0e3e96adf19e1389b529f271527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.