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 |
|---|---|---|---|---|---|---|---|
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import warnings
from shutil import which
import numpy as np
from monty.serialization import loadfn
from pymatgen.analysis.magnetism import (
CollinearMagneticStructureAnalyzer,
MagneticStruc... | materialsproject/pymatgen | pymatgen/analysis/magnetism/tests/test_analyzer.py | Python | mit | 13,067 | [
"pymatgen"
] | 01e724333154f94367cc17913c1c9d247fb70f0b1a09f620cdd2b182598c64c2 |
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | tensorflow/transform | tensorflow_transform/analyzers.py | Python | apache-2.0 | 109,671 | [
"Gaussian"
] | b945fb17be09920bd5170f54e9040f1ff4947d8f9084cd379ffd5693c0be2006 |
# Orca
#
# Copyright 2013 The Orca Team.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is ... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/scripts/apps/gnome-documents/speech_generator.py | Python | gpl-3.0 | 1,530 | [
"ORCA"
] | b8120e91f9de3450988c10b01a69a412cf64fe2f64d0bab8e5ed3070efcd5086 |
import pandas as pd
import numpy as np
mets = ['A','B','C','D','E','F','A_ext', 'D_ext', 'E_ext','F_ext']
internal_mets = [m for m in mets if 'ext' not in m]
rxns = ['R_{}'.format(i) for i in range(1,10)]
data = {'R_1': pd.Series({'A':1, 'A_ext': -1}),
'R_2': pd.Series({'A':-1,'B':1}),
'R_3': pd.Series(... | djinnome/mentos | mentos/abc_model.py | Python | gpl-3.0 | 2,191 | [
"Avogadro"
] | 6d6c7ead70b9a416d565b9b8cb0b4b6f6bb196ec43a6609a6d447f5d049bbb95 |
# Orca
#
# Copyright 2010 Joanmarie Diggs.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is... | GNOME/orca | src/orca/scripts/apps/gnome-panel/speech_generator.py | Python | lgpl-2.1 | 2,321 | [
"ORCA"
] | d308935b73fd2289f753bfaddcfeb14cc43de8735d1e577dc7a0c590cd0113c8 |
import pyNN.nest as sim
#import pyNN.neuron as sim
import pyNN.utility
import numpy as np
import sys
from parameters import *
from matplotlib import pyplot as plt
def save_spikes(pop_list, base_name, filename):
for idx, pop in enumerate(pop_list):
print idx, pop
spikes = pop.getSpikes()
pr... | pierreberthet/demo2.2-bg | pynn/simplified_bg_pynn.py | Python | gpl-2.0 | 9,657 | [
"NEURON"
] | f4c91ac4f0c85dd4d10f8bc59c3b60a6fe6a0be287d65302b3dc0d3f23e7fdc1 |
##############################################################################
# adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD)
# Simulations on HPC Resources
# Copyright 2017 FU Berlin and the Authors
#
# Authors: Jan-Hendrik Prinz
# Contributors:
#
# `adaptiveMD` is free software: ... | markovmodel/adaptivemd | adaptivemd/scheduler.py | Python | lgpl-2.1 | 10,021 | [
"MDTraj"
] | 4485cde8b8f00dc312476f68a3b108daef90d3efbe93c44699be58ac35c00b28 |
# class to get get data from OpenBooks
import httplib2
import json
import sqlalchemy
from copy import deepcopy
from oauth2client import file, client, tools
from octopus.core import app, initialise
from service.database import db, FA_API_TABLES
from service.lib import util
class Sync(object):
SCOPES = 'CottageLab... | CottageLabs/finance | service/lib/sync.py | Python | apache-2.0 | 8,570 | [
"Octopus"
] | 323f1065973e3d418dec499c93dedb26315062cd12896d11c28982c65fbb54e3 |
# coding=utf-8
"""
Protein-Ligand Interaction Profiler - Analyze and visualize protein-ligand interactions in PDB files.
test_metal_coordination.py - Unit Tests for Metal Coordination.
"""
import unittest
from plip.structure.preparation import PDBComplex
class MetalCoordinationTest(unittest.TestCase):
"""Check... | ssalentin/plip | plip/test/test_metal_coordination.py | Python | gpl-2.0 | 6,129 | [
"CRYSTAL"
] | 289b96132e652c98dc8b93ba4e7eec5ea74a8ed9ed8982f3cb82b1a5259674ca |
# This file is part of Bioy
#
# Bioy 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.
#
# Bioy is distributed in the hope... | nhoffman/bioy | bioy_pkg/subcommands/csvdeduplicate.py | Python | gpl-3.0 | 2,842 | [
"BLAST"
] | fb8d3d289069c6b559ab86822d6e8097818b55642051be11dc51ea7456ea2d25 |
#!/usr/bin/python2
from distutils.core import setup
import os
import sys
# config file
data_files = [("/etc/lorax", ["etc/lorax.conf"])]
# shared files
for root, dnames, fnames in os.walk("share"):
for fname in fnames:
data_files.append((root.replace("share", "/usr/share/lorax", 1),
... | dashea/lorax | setup.py | Python | gpl-2.0 | 1,203 | [
"Brian"
] | 5ff4c3d850cc2842f90c273c952ad4d620aa6b1d18ce62feb8667cf996312d44 |
import numpy as np
import pandas as pd
import mdtraj as md
trj0 = md.load("./system.subset.pdb")
top, bonds = trj0.top.to_dataframe()
i0 = np.where((top.name == "CB") & (top.resSeq == 310))[0][0]
i1 = np.where((top.name == "CB") & (top.resSeq == 409))[0][0]
indices = np.array([[i0, i1]])
n_traj = 131
all_distances ... | hainm/MSMs | attic/src/code/hmsm/compute_distances.py | Python | gpl-2.0 | 559 | [
"MDTraj"
] | 498bc73a1c5693aedfd9f63c3127f785fd194621b3aacaf2495debd258bfbf96 |
# Copyright (C) 2010 CAMd
# Please see the accompanying LICENSE file for further information.
"""This module provides all the classes and functions associated with the
evaluation of exact exchange with k-point sampling."""
from time import time
from math import pi, sqrt
import numpy as np
from ase.utils import prnt... | robwarm/gpaw-symm | gpaw/xc/hybridg.py | Python | gpl-3.0 | 28,354 | [
"ASE",
"GPAW",
"Gaussian"
] | 87a8469e02bd09a69d7eacf024b809f44eced666e0b22511aa45966285eb8f0b |
"""Tests for Trees and Leaves.
"""
import pytest
import os
import py
import datreant as dtr
from datreant import Veg, Leaf, Tree, Treant
class TestVeg(object):
"""Common element tests of Trees and Leaves"""
cls = Veg
name = 'veggie'
@pytest.fixture
def veg(self, tmpdir):
with tmpdir.as... | dotsdl/datreant | src/datreant/tests/test_trees.py | Python | bsd-3-clause | 12,837 | [
"MOE"
] | 93aa7812a68a6e618cf686329d6261706635b631fd095f7f43408fa3f34c7c7a |
# -*- coding: utf-8 -*-
#
# Collection of functions related to BAM and SAM files
#
# pysam uses 0-based coordinates
from past.builtins import xrange
from collections import namedtuple
import os
import re
import sys
import pysam
from . import compat
from . import exceptions
from . import g2g
from . import g2g_utils... | churchill-lab/g2gtools | g2gtools/bsam.py | Python | mit | 41,302 | [
"pysam"
] | 9c536a45c8b838834723db0447896a24be9eb945d60073ab580d85fc407d06c8 |
"""
Sequence classes
"""
import data
import logging
import re
import string
from cgi import escape
from galaxy.datatypes.metadata import MetadataElement
from galaxy.datatypes import metadata
import galaxy.model
from galaxy import util
from sniff import *
log = logging.getLogger(__name__)
class Sequence( data.Text ):... | volpino/Yeps-EURAC | lib/galaxy/datatypes/sequence.py | Python | mit | 21,504 | [
"BLAST",
"BioPerl",
"Galaxy"
] | f9d07a3b9fe9386efb4bb9b56b1f2f1f90cdbd0551221bae3cc4479ed68d55a2 |
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_female = (
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{... | danhuss/faker | faker/providers/person/en/__init__.py | Python | mit | 86,729 | [
"Amber",
"Brian",
"COLUMBUS",
"CRYSTAL",
"Dalton",
"Desmond",
"MOE"
] | e079965bbc80bb3e25cc4efc17e35660d25522f769a6c95a6398ced8b9450bcb |
"""Calculator for General Energy-based Fragmentation"""
from sys import stdout
from ase.units import Ha
from ase.calculators.nwchem import NWChem
from numpy import zeros, append, array, transpose, savetxt, abs
#maybe later we can make let it inherit from the Calculator base class
class GEBF(object):
"""Initialize... | PHOTOX/fuase | ase/ase/calculators/gebf-separate-calc.py | Python | gpl-2.0 | 8,324 | [
"ASE",
"NWChem"
] | a6516ffa73acf8dc3658b4983380563196cfdead1fe15cd3e4c3e6f9e0ffd98d |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import easy_thumbnails.fields
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('main', '0035_auto_20141204_1708'),
]
operations = [
migratio... | MaximeBiset/care4care | main/migrations/0036_auto_20141204_1818.py | Python | agpl-3.0 | 1,581 | [
"VisIt"
] | c809e115024d018ab4664f37837b2cffe98284e10544a8dd513b081dea2ab4c5 |
# Copyright 2019 The Magenta 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 in ... | jesseengel/magenta | magenta/models/sketch_rnn/rnn.py | Python | apache-2.0 | 16,509 | [
"Gaussian"
] | 175a0b305042af5e77e52fa7047caf0f23a21a4014b43e63b0faafe7caf09f4a |
# Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | mkuron/espresso | testsuite/python/stress.py | Python | gpl-3.0 | 14,010 | [
"ESPResSo"
] | 427cc4afe60320ed508ccd75dccb3e97810a05b17fee98c4328627664189ff41 |
"""
A simple BioPython converter to move from phylip to clustal formats for the alignments
"""
import os
import sys
import argparse
from Bio import SeqIO
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Convert an alignment file from phylip format to clustal format")
parser.add_argume... | linsalrob/EdwardsLab | crAssphage/phylip2clustal.py | Python | mit | 713 | [
"Biopython"
] | eccf35c49793f139455d1b2403344c3a8fd81bf143c1af59265f1f1cd1ce501a |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | kkreis/espressopp | src/interaction/HarmonicUnique.py | Python | gpl-3.0 | 3,865 | [
"ESPResSo"
] | c01d34318bda13bd8dba864478129d475451acb394c1e4486f62fdc7efca51d4 |
#!/usr/bin/env python
import re,urllib2
class Get_public_ip:
def getip(self):
try:
myip = self.visit("http://ipv4.icanhazip.com/")
except:
try:
myip = self.visit("http://www.whereismyip.com/")
except:
myip = "So sorry!!!"
re... | youprofit/lnmp | include/get_public_ipaddr.py | Python | apache-2.0 | 604 | [
"VisIt"
] | 7a7b1e2d513014662a497b2b1bbb36c2b9d4a2b350b7613b297db190536cf2a4 |
# Authors: Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD (3-clause)
# Many of the computations in this code were derived from Matti Hämäläinen's
# C code.
from copy import deepcopy
from functools import partial
from gzip import GzipFile
import ... | kambysese/mne-python | mne/source_space.py | Python | bsd-3-clause | 127,142 | [
"Mayavi"
] | 991f435452f13b17d0e0ceb882991c10d6988fe25ed5f00b4e8b4dfe3842fbfd |
''' Test_RSS_Command_VOBOXAvailabilityCommand
'''
import unittest
import mock
import DIRAC.ResourceStatusSystem.Command.VOBOXAvailabilityCommand as moduleTested
__RCSID__ = '$Id: $'
################################################################################
class VOBOXAvailabilityCommand_TestCase( unittest.... | andresailer/DIRAC | ResourceStatusSystem/Command/test/Test_RSS_Command_VOBOXAvailabilityCommand.py | Python | gpl-3.0 | 3,435 | [
"DIRAC"
] | 9a5c18cd237d7f44d2b8e414a71682a11fa1aa2ac9a3131d80d64391863ccbe6 |
"""Introduction
^^^^^^^^^^^^
The likelihood is :math:`p(y|f,X)` which is how well we will predict
target values given inputs :math:`X` and our latent function :math:`f`
(:math:`y` without noise). Marginal likelihood :math:`p(y|X)`, is the
same as likelihood except we marginalize out the model :math:`f`. The
importance... | SheffieldML/GPy | GPy/likelihoods/__init__.py | Python | bsd-3-clause | 1,494 | [
"Gaussian"
] | 2a59407a79f4cb18e43a46117a95359732d6587bc96d21a815346fed0aeb6f3b |
""" This is a test of the chain
PilotsLoggingClient -> PilotsLoggingHandler -> PilotsLoggingDB
It supposes that the DB is present, and that the service is running
"""
import unittest
from DIRAC.WorkloadManagementSystem.Client.PilotsLoggingClient import PilotsLoggingClient
from DIRAC.Core.Base.Script import p... | arrabito/DIRAC | tests/Integration/WorkloadManagementSystem/Test_PilotsLoggingClient.py | Python | gpl-3.0 | 5,238 | [
"DIRAC"
] | f5917dd3485b1cdd550e054b32fcf282b8d9892ae9ba3945826387e216b2e0e9 |
#!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import codecs
import contextlib
import cookielib
import copy
import getpass
import hashlib
import httplib
import inspect
import json
import locale
import logging
import ntpath... | michaelhidalgo/7WCSQ | Tools/SQLMap/sqlmap/lib/core/common.py | Python | apache-2.0 | 145,010 | [
"VisIt"
] | f6f85e20e97537725c8ee28b6fc84cf7a98c7bd7e6d2a78fed6b4589f5e9ef7d |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# mrslview - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of ... | heromod/migrid | mig/cgi-bin/mrslview.py | Python | gpl-2.0 | 1,104 | [
"Brian"
] | 16dbf75596e9fa446047c6e2287b7efd4142f3daa096d0698a8dfc4e56db9620 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RVariantannotation(RPackage):
"""Annotation of Genetic Variants
Annotate variants,... | LLNL/spack | var/spack/repos/builtin/packages/r-variantannotation/package.py | Python | lgpl-2.1 | 3,666 | [
"Bioconductor"
] | cc5509f7ed557e2764e68ce2fc59e2cf392b976eb906dca9782eedc3931e240d |
import os
import sys
import csv
import datetime
import configparser
from cappy import API
from nacc.uds3.filters import *
# Creating a folder which contains Intermediate files
def recent_run_folder(out_dir):
# Check if directory exists. If not, create it.
if not os.path.exists(out_dir):
try:
... | ctsit/nacculator | nacc/run_filters.py | Python | bsd-2-clause | 5,622 | [
"VisIt"
] | 70fa58f58db217a31ae8edf5c7dd68922135e0a162fd090545572f14fd507880 |
#!/usr/bin/env python
# Copyright (C) 2014 Open Data ("Open Data" refers to
# one or more of the following companies: Open Data Partners LLC,
# Open Data Research LLC, or Open Data Capital LLC.)
#
# This file is part of Hadrian.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this... | opendatagroup/hadrian | titus/titus/pmml/version_independent.py | Python | apache-2.0 | 70,112 | [
"NEURON"
] | 32ea078585f6eedfedfdf332f5880bb047ef92d198afbdbdeaeee957100b2fab |
from __future__ import print_function
import os.path
import re
import sys
import tarfile
import time
from datetime import datetime
# pylint: disable=unused-import,g-bad-import-order
import tensorflow.python.platform
from six.moves import urllib
import numpy as np
import tensorflow as tf
# pylint: enable=unused-import,... | IsThatYourBag/IsThatYourBag | scripts/convert_inception_v3.py | Python | mit | 19,027 | [
"Gaussian"
] | f5555f3fb33391d68624ea63b48bb3b1a94b5b7c90c13a13d9e6dad153980fca |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
An EM algorithm for GMMs
"""
import numpy as np
import scipy as sc
import scipy.misc
import scipy.spatial
import scipy.linalg
from numpy import array, eye, ones, log
from scipy.linalg import norm
cdist = scipy.spatial.distance.cdist
logsumexp = scipy.logaddexp.reduce... | arunchaganty/presidential-debates | django/twit/GaussianMixtureClustering.py | Python | mit | 2,611 | [
"Gaussian"
] | 64779dab973f38bf9e854835b636bed6966c14d1cd4b17a5e7cde509d2b1f7de |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2015 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | eustislab/horton | horton/io/cp2k.py | Python | gpl-3.0 | 8,458 | [
"CP2K",
"Gaussian"
] | e6513b66306820767c6f7028997ede1a5ee00eabdd9d0b99c3aa11faf2a04702 |
from ase import Atoms
from gpaw import GPAW, PW
h = Atoms('H', cell=(5, 5, 5))
h.center()
h.calc = GPAW(setups='ae', txt='H.ae.txt')
for ecut in range(200, 1001, 100):
h.calc.set(mode=PW(ecut))
e = h.get_potential_energy()
| robwarm/gpaw-symm | doc/tutorials/hydrogen/h.py | Python | gpl-3.0 | 231 | [
"ASE",
"GPAW"
] | d2f026c85cff2254b5c501fd6be0dff707da3252851dfea987a967a90936bea1 |
__DESCRIPTION__="""2d Gauss Fit of a single gaussian
The model function would be
R=[
[ cos(psi_ell),sin(psi_ell)]
[-sin(psi_ell),cos(psi_ell)]
]
C=diag(lambda0,lambda1)
R0 = (x0;y0)
is
log(y)=-0.5*(A*x**2+2*B*x*y+C*y**2+K+E*x+F*y)
the fwhm of two axis comes from eigenvectors of matrix
AA=[[A,B],[B,C]]
the center ... | MicheleMaris/GaussFit | __init__.py | Python | gpl-2.0 | 36,001 | [
"Gaussian"
] | b572855b86362e633cf94451a2d71663ee052d31fb1b355bc93c020a1b5b14ed |
import io
import time
import click
import pysam
import logging
logger = logging.getLogger(__name__)
@click.command()
@click.argument('inbam', type=click.Path(exists=True))
@click.argument('fastq', type=click.Path())
@click.option('--mq-threshold', type=click.IntRange(min=0, max=255), help='Skip reads below this thr... | latticelabs/Mitty | mitty/benchmarking/convert_bam_to_truth_fastq.py | Python | gpl-2.0 | 3,742 | [
"pysam"
] | aa3bea74a84a0901344a83c653b1316d213284b00827cfd3bd64d01815156899 |
from api.models import Photo, Face, AlbumDate, Person
from django.db.models import Prefetch
from api.serializers_serpy import AlbumDateListWithPhotoHashSerializer as AlbumDateListWithPhotoHashSerializerSerpy
from api.serializers import AlbumDateListWithPhotoHashSerializer as AlbumDateListWithPhotoHashSerializer
import... | hooram/ownphotos-backend | api/bench.py | Python | mit | 10,303 | [
"Gaussian"
] | d6c000aebf47dd6032abc3cf93267dc3d68d7bdb4e8452c5ee14073f118b14b3 |
import os
import sys
import time
import glob
import shutil
import argparse
from mpi4py import MPI
class ParallelMDruns(object):
##TICA
def write_script(self, script, directory, rank, mdpfile, grofile, topfile, output_grofile, start_coord, num_coord, tprfile='topol.tpr', trrfile='traj.trr', edrfile='ener.edr',... | jp43/lsdmap | dmdmd/tools/p_mdrun.py | Python | bsd-3-clause | 10,815 | [
"Gromacs"
] | 91c656dd10cb37db37ff02e3aca59b43a92fcde58259347fb27d478bfb90ad5f |
########################################################################
# File: FileCatalogHandler.py
########################################################################
"""
:mod: FileCatalogHandler
.. module: FileCatalogHandler
:synopsis: FileCatalogHandler is a simple Replica and Metadata Catalog service
"""... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/Service/TornadoFileCatalogHandler.py | Python | gpl-3.0 | 1,737 | [
"DIRAC"
] | ba7a5da65407bf9eabf6b36932b6d0d4a4e3d8283c6ed5402b28f0cbae5e35d9 |
import pytest
from time import time
import capybara
from capybara.exceptions import ElementNotFound
from capybara.tests.helpers import extract_results
class CheckTestCase:
@pytest.fixture(autouse=True)
def setup_session(self, session):
session.visit("/form")
class TestCheck(CheckTestCase):
def ... | elliterate/capybara.py | capybara/tests/session/test_check.py | Python | mit | 6,858 | [
"Jaguar",
"VisIt"
] | 59fd8a240f9585da12641ff2effbc70dcc07b1cedaf7093f112a649ab78e6f63 |
"""
Differential evolution
"""
import numpy
def de(output_basename, parameter_names, transform, loglikelihood, prior, nsteps=40000, vizfunc=None, printfunc=None, **problem):
"""
**Differential evolution**
via `inspyred <http://inspyred.github.io/>`_
specially tuned. steady state replacement, n-point crosso... | JohannesBuchner/jbopt | jbopt/de.py | Python | bsd-2-clause | 4,824 | [
"Gaussian"
] | 16760569d23cefbd65f35d6cb5f02f4f7c336b3aa6793ee021c3ab1347de6b08 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import gzip
import json
import os
import unittest
import warnings
import xml.etree.cElementTree as ET
from pathlib import Path
from shutil import copyfile, copyfileobj
import numpy as np
import pytest
from mo... | richardtran415/pymatgen | pymatgen/io/vasp/tests/test_outputs.py | Python | mit | 87,130 | [
"VASP",
"Wannier90",
"pymatgen"
] | ac23ee560be84b7b750fb5083ff7312ec22f4399dc447433efb4e8792aef3de1 |
# Copyright 1999 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Patched by Brad Chapman.
# Chris Wroe added modifications for work in myGrid
"""
This modul... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/Blast/NCBIWWW.py | Python | apache-2.0 | 33,660 | [
"BLAST",
"Biopython"
] | a9ca876fbbef7a938d72b20a25d7ddd2c56dda4124e4252243e987df51827e92 |
# coding: utf-8
import nipype.pipeline.engine as pe
import nipype.interfaces.utility as niu
import nipype.interfaces.fsl as fsl
import os
def create_dmri_preprocessing(name='dMRI_preprocessing', use_fieldmap=True, fieldmap_registration=False):
"""Creates a workflow that chains the necessary pipelines to
corre... | dmordom/nipype | nipype/workflows/dmri/fsl/epi.py | Python | bsd-3-clause | 34,579 | [
"Gaussian"
] | d913b471ce26bc4463fb7ec3d820fbd411dd0276a07388c74e2606fdc9ecf0aa |
# coding=utf-8
""" Python AST visitor that converts an expression to a RACO equivalent """
import sys
import ast
from raco.expression import NamedAttributeRef, UnnamedAttributeRef, \
StringLiteral, NumericLiteral, BooleanLiteral, \
EQ, NEQ, LT, LTEQ, GT, GTEQ, AND, OR, NOT, \
PLUS, MINUS, DIVIDE, IDIVIDE,... | uwescience/raco | raco/python/util/visitor.py | Python | bsd-3-clause | 11,005 | [
"VisIt"
] | e43fae8ad2bea1113969cde6f78074ad09a1dc05a0bde7f6b4a19875c75bae6b |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Okinawa Institute of Science and Technology, Japan.
#
# This script runs on STEPS 2.x http://steps.sourceforge.net
#
# H Anwar, I Hepburn, H Nedelescu, W Chen and E De Schutter
# Stochastic calcium mechanisms cause dendritic calcium spike... | CNS-OIST/STEPS_Example | publication_models/API_2/Anwar_J_Neurosci_2013/HybridCaburst_stochCaT.py | Python | gpl-2.0 | 19,678 | [
"Avogadro"
] | d6f679d314265fe9aaba8a6f675ce800dc977dcac79855da6759380a22b349c0 |
#-------------------------------------------------------------------------------
# Copyright (c) 2012 Gael Honorez.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# htt... | IDragonfire/modular-client | src/trueSkill/TrueSkill/TruncatedGaussianCorrectionFunctions.py | Python | gpl-3.0 | 5,615 | [
"Gaussian"
] | 6b0376ffdb2bcf51e5dc3ad46caf0c7004a5056f134c6c986dc2a21c0a3319ba |
# -*- coding: utf-8 -*-
"""
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guid... | Ernestyj/PyStudy | alexa-smarthome/sample_lambda/lambda_function_guess_number.py | Python | apache-2.0 | 23,635 | [
"VisIt"
] | cfc81585b34a87b50ad785ddf48909f44b7f5b227251926f3b7f2b38f2404419 |
config = {
# environment this app is running on: localhost, testing, production
'environment': "production",
# webapp2 sessions
'webapp2_extras.sessions' : {'secret_key': '_PUT_KEY_HERE_YOUR_SECRET_KEY_'},
# webapp2 authentication
'webapp2_extras.auth' : {'user_model': 'boilerplate.models.User',
... | rittersport3/CityWatchers | config/production.py | Python | lgpl-3.0 | 4,100 | [
"VisIt"
] | bf131474c6114efd29da608be4e4d55d1d86f0fcfae63e4f585d42e9269c43c8 |
# proxy module
from __future__ import absolute_import
from mayavi.components.custom_grid_plane import *
| enthought/etsproxy | enthought/mayavi/components/custom_grid_plane.py | Python | bsd-3-clause | 104 | [
"Mayavi"
] | 73dc44ceb7913ee85d2bd76a6e763d9ecb63da3cd6ca4af9775b8a372e065980 |
# coding: utf-8
from __future__ import unicode_literals
import base64
import binascii
import collections
import ctypes
import email
import getpass
import io
import itertools
import optparse
import os
import platform
import re
import shlex
import shutil
import socket
import struct
import subprocess
import sys
import xm... | vinegret/youtube-dl | youtube_dl/compat.py | Python | unlicense | 93,865 | [
"Bowtie"
] | b92f55bca4dee05d2a3cfc051d2e41513d28dabc7d231be615ef5462b0a15994 |
r"""
Tools for seismic inversion: migration
**Auxiliary functions**
* :func:`~fatiando.seismic.zft_rtm`: apply 2D reverse time depth migration in a Zero-oFfseT section
* :func:`~fatiando.seismic.shot_rtm`: apply 2D reverse time depth migration in a shot gather
Those implementations use explicit finite differences t... | eusoubrasileiro/fatiando_seismic | fatiando/seismic/migration.py | Python | bsd-3-clause | 13,102 | [
"Gaussian"
] | d7ab2a2ad53b3baec88e2e0f902238987f571ead6ec1713987426c87226fb550 |
# dialog.py --- A Python interface to the ncurses-based "dialog" utility
# -*- coding: utf-8 -*-
#
# Copyright (C) 2002, 2003, 2004, 2009, 2010, 2013, 2014, 2015 Florent Rougon
# Copyright (C) 2004 Peter Åstrand
# Copyright (C) 2000 Robb Shecter, Sultanbek Tezadov
#
# This library is free software; you can redistrib... | skalkoto/pythondialog | dialog.py | Python | lgpl-2.1 | 150,922 | [
"VisIt"
] | 3391ea81d69fc5e6b5af8d773f7b8f8b345af83ebcfb49798e96f0931a237d35 |
import argparse
import os
import subprocess
from pocket_api import Pocket, PocketException
from pocket import refresh_list
from workflow import Workflow
import config
WF = Workflow()
POCKET_URL = 'http://getpocket.com/a/read/%s'
def execute():
args = parse_args(WF.args)
if args.query is None:
print... | danielma/dotfiles | Alfred/Alfred.alfredpreferences/workflows/user.workflow.8EEBA440-B5C0-4FCB-B302-C69767A65CB6/pocket_launcher.py | Python | mit | 3,561 | [
"VisIt"
] | 75f99eb4fa367d35d5dfaa866896bd2db8f1d94c7385fd9ed0209cbacac5f3cd |
'''Transform operation on globally scoped symbols to
operations on symbol_cell mapping.
'''
from __future__ import absolute_import
from __future__ import with_statement
from ..runtime.symbol import get_symbol_cells_map, gensym
from ..compiler import ir as I
from ..compiler import bind
from ..compiler.walk import I... | matthagy/Jamenson | jamenson/transform/globals.py | Python | apache-2.0 | 4,950 | [
"VisIt"
] | 3c661e5ebfc4a00ba36f20f3671a81b0c8a2f475eb1f9d3ae6b7d13a0c21e823 |
'''
Simple catalog
'''
import numpy as np
from hvs import HVSsample, Contigiani2018
'''
Create ejection catalog
'''
# Initialize an ejection model, in this case the default Contigiani2018 with a minor namne customization
ejectionmodel = Contigiani2018(name_modifier='TEST') # The name will appear in the final... | contigiani/hvs | examples/myfirstcatalog.py | Python | gpl-3.0 | 1,114 | [
"Galaxy"
] | d2f6c6a394625d254d309967106b2474a0d64b33efbd2e972aea6b9b623421d7 |
import numpy as np
### Defining the single-peak Gaussian function
def Single_Gaussian(params, x):
x0 = params[0]
intensity = params[1]
FWHM = params[2]
bkgnd = params[3]
return float(intensity)*np.exp(- 0.5*((x0-x)/(FWHM/2.355))**2) + bkgnd
def Single_Gaussian_integrand(x,... | karamarielynch/dss-df | lineshape.py | Python | mit | 2,359 | [
"Gaussian"
] | 1d4cafc5787206bc96caf41380509d8c8998bd4aba9f2ce4c0625368d5bf6220 |
# 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)
import os
import sys
from spack import *
class Lbann(CMakePackage, CudaPackage):
"""LBANN: Livermore Big Artificial ... | rspavel/spack | var/spack/repos/builtin/packages/lbann/package.py | Python | lgpl-2.1 | 11,820 | [
"VTK"
] | ced4f315c9294ff08559504d86fa48c01281aa1358c709bd8d72fc984713c0ee |
""" GOCDBClient module is a client for the GOC DB, looking for Downtimes.
"""
__RCSID__ = "$Id$"
import urllib2
import time
import socket
from datetime import datetime, timedelta
from xml.dom import minidom
from DIRAC import S_OK, S_ERROR, gLogger
def _parseSingleElement( element, attributes = None ):
"""
Given... | sposs/DIRAC | Core/LCG/GOCDBClient.py | Python | gpl-3.0 | 11,129 | [
"DIRAC"
] | 320420c1d2c1905d1e5479eba454f29eb00177ae59fd08689e99ddfce6c5fa7e |
# Orca
#
# Copyright 2010 Joanmarie Diggs.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/scripts/apps/gnome-panel/speech_generator.py | Python | gpl-3.0 | 2,264 | [
"ORCA"
] | 07d5c2879ff7c55fb900325005067fe4449352301680384da031f145776b9822 |
# Copyright 2018 Open Source Robotics Foundation, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | ros2/launch | launch/test/launch/test_execute_process.py | Python | apache-2.0 | 8,098 | [
"VisIt"
] | 66ecd44b1fbef167b6dd26ad661bb264a62dca283cc67ebffceb2a95e9d01319 |
import json
import operator
import pytest
from flask import Blueprint, Flask, g, jsonify, request
from flask.views import MethodView
from flask_allows import (
Additional,
Allows,
And,
C,
Not,
Or,
Override,
Permission,
Requirement,
exempt_from_requirements,
guard_entire,
... | justanr/flask-allows | test/test_integration.py | Python | mit | 13,379 | [
"Brian"
] | b992f6de17fa511ae827783250e55454d35aabe0cbd28244f84e5e9b53ddb8d1 |
"""Demonstrates molecular dynamics with constant energy."""
from ase.lattice.cubic import FaceCenteredCubic
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
from ase.md.verlet import VelocityVerlet
from ase import units
# Use Asap for a huge performance increase if it is installed
use_asap = True
... | misdoro/python-ase | doc/tutorials/md/moldyn2.py | Python | gpl-2.0 | 1,464 | [
"ASE",
"CRYSTAL"
] | 15502fe9798de9c8e6013a853e0f8544d0c81aebcfcd8be982b1021d6881c690 |
import ast
import networkx as nx
import os
import pandas as pd
import numpy as np
MASK_TOKEN='_mask_'
class OGB_ASTWalker(ast.NodeVisitor):
def __init__(self):
self.node_id = 0
self.stack = []
self.graph = nx.Graph()
self.nodes = {}
def generic_visit(self, node):
node_... | snap-stanford/ogb | examples/graphproppred/code2/py2graph.py | Python | mit | 5,537 | [
"VisIt"
] | 635d5484608e415bfa5b95cecacd80c23ff1e45ca6868410013463135ed34ecf |
# -*- coding: utf-8 -*-
# Copyright 2014 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from __future__ import with_statement
import os.path
import re
import time
import sys
import lxml.html
from lxml.cssselect import CSSSe... | harish0507/GMapsScrapper | lib/splinter-0.7.2/splinter/driver/flaskclient.py | Python | mit | 13,708 | [
"VisIt"
] | 0f782b7327fcba28296527fe947b7dc4cbe2d2479540ba53d22fa3762748a556 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# 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)
#
# Released under th... | alejob/mdanalysis | package/MDAnalysis/coordinates/MMTF.py | Python | gpl-2.0 | 2,868 | [
"MDAnalysis"
] | 034e7ed33f51556e7e95c16221a25a503953bc5d2b0c17f03b1b803c94925bf6 |
'''
PathwayGenie (c) University of Manchester 2017
PathwayGenie is licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
# pylint: disable=signature-differs
# pylint: disable=too-few-public-methods
# pylint: disable=too-many-arguments... | neilswainston/development-py | synbiochemdev/assembly/optimise.py | Python | mit | 4,724 | [
"VisIt"
] | 068a93d25e0352efeb7a3dbd5b9578a62ef99603ae79f86b6d99797de531a214 |
from __future__ import print_function, division
from sympy import factorial, sqrt, exp, S, assoc_laguerre, Float
def R_nl(n, l, r, Z=1):
"""
Returns the Hydrogen radial wavefunction R_{nl}.
n, l
quantum numbers 'n' and 'l'
r
radial coordinate
Z
atomic number (1 for Hydrog... | wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/physics/hydrogen.py | Python | mit | 4,497 | [
"DIRAC"
] | eb001789f4908a3b3bdb9b00c5ded02f0b5ffa2e947998beff1c1f143538cee8 |
#!/usr/bin/env python
# encoding: utf-8
#--------- non-linear em --------------------------
import numpy as np
import pylab as plt
# -------- GLOBAL SCALAR DEFINITIONS -----------------------------
# ======== all definitions are in m,s,g unit system.
save_folder = '_test_ato_1'
n_frames = 10
x_lower = 0.
x_upper = 10... | nthakkar/emclaw | maxwell_1d_source/maxwell_ato.py | Python | gpl-2.0 | 12,127 | [
"Gaussian"
] | af5d7e9af5c8042c6c06c0aaf5e935351f213deb779405c6e2c0d06ead194733 |
"""
This is the XROOTD StorageClass
"""
__RCSID__ = "$Id$"
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Resources.Utilities.Utils import checkArgumentFormat
from DIRAC.Resources.Storage.StorageBase import StorageBase
from DIRAC.Core.Utilities.Pfn ... | sposs/DIRAC | Resources/Storage/XROOTStorage.py | Python | gpl-3.0 | 60,297 | [
"DIRAC"
] | a5d03f08f544e5dda23c9334429854231f2b9abb0f80b9e1b854f59cfbc2a964 |
import sys
import numpy as np
import datetime
from collections import defaultdict
import os
# from sklearn.metrics import confusion_matrix
import glob
import keras
from Bio import pairwise2
import _pickle as cPickle
import copy
from ..features.helpers import scale_clean, scale_clean_two
from .helper import lrd
import k... | jeammimi/deepnano5bases | src/models/generate_training_data.py | Python | mit | 24,803 | [
"BWA"
] | 2b656d9031275a2301af1824fb4eb31d7af008bdf9917228ae741f3df58a5d70 |
# 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/optimize_qed_max_steps.py | Python | apache-2.0 | 2,813 | [
"RDKit"
] | 7b5658d48776d79226462b4a00c2b06792e65ae2e9e2f8151085da1d6c5a5a78 |
import os
import pickle
import random
import re
import sys
import time
import warnings
import webbrowser
import twitter # pip install python-twitter
import gender_guesser.detector as gender # pip install gender-guesser
from requests_oauthlib import OAuth1Session
from unidecode import unidecode # pip install unideco... | ajdavis/twitter-gender-distribution | analyze.py | Python | apache-2.0 | 17,566 | [
"VisIt"
] | 5319ba6b5cdd1702054cd89295803cc252d7ae00f91cc217c81a74f8b31cf655 |
from functools import partial
from typing import Callable, List, Union
import tensorflow as tf
from tensorflow import Tensor
from tensorflow_probability.python.distributions import (NOT_REPARAMETERIZED,
Distribution)
from odin.backend.interpolation import linea... | imito/odin | odin/bay/vi/autoencoder/info_vae.py | Python | mit | 10,029 | [
"Gaussian"
] | 1905ff5cdcdbf15c75a54cc15b330f1fa33a6f9bcaf5109fdbe419b8d0ff194e |
# Copyright (C) 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 versio... | KaiSzuttor/espresso | testsuite/scripts/samples/test_lj_liquid_distribution.py | Python | gpl-3.0 | 995 | [
"ESPResSo"
] | 68c1431c6f1bbd65dc61cee1283e059dbcc55d14db653bc07915371f701781fa |
from pynet.datasets.mnist import Mnist, Mnist_Blocks
import pynet.layer as layer
from pynet.model import *
import pynet.datasets.spec as spec
import pynet.datasets.mnist as mnist
import pynet.datasets.i2r as i2r
import pynet.datasets.recsys as recsys
import pynet.datasets.preprocessor as preproc
import pynet.learning_... | hycis/Pynet | hps/models/model.py | Python | apache-2.0 | 23,549 | [
"Gaussian"
] | 706a8a350d694048dacc4f93088baef9c03d78fbd5bcc2a7fd64d09d646a0c52 |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2011 Carlos Abalde <carlos.abalde@gmail.com>
#
# This file is part of duplicity.
#
# Duplicity 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 Foundat... | nils-tekampe/duplicity | duplicity/backends/gdocsbackend.py | Python | gpl-2.0 | 8,939 | [
"VisIt"
] | 98bb027746d4acffffcfe2df9fa0f5fa7f644c7cd66350d37876f05665fe7ec5 |
"""
.. _sfm-track:
==================================================
Tracking with the Sparse Fascicle Model
==================================================
Tracking requires a per-voxel model. Here, the model is the Sparse Fascicle
Model, described in [Rokem2015]_. This model reconstructs the diffusion signal
as... | villalonreina/dipy | doc/examples/sfm_tracking.py | Python | bsd-3-clause | 4,942 | [
"Brian"
] | 383984a1991fd4ef53b513251e3dcfc9ce468c235d16d38bc7625557415b55d2 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Overlap computation
######################
Utilities for computing the overlap between gaussian type functions.
"""
import numpy as np
from numba import jit, prange
from .numeri... | exa-analytics/exatomic | exatomic/algorithms/overlap.py | Python | apache-2.0 | 9,560 | [
"Gaussian"
] | 20833bdcb10e82740b3e42e705ede911185d6c528db752a683f129b2a15084ce |
# coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import range
import os
import re
import sys
import glob
import shutil
import argparse
import itertools
import numpy as np
import mdtraj as md
from AdaptivePELE.atomset import atomset
from AdaptivePELE.freeEn... | AdaptivePELE/AdaptivePELE | AdaptivePELE/freeEnergies/extractCoords.py | Python | mit | 30,818 | [
"MDTraj"
] | d759a09aad8618fa0c9f450af8b1fa3a56071d3ceb29d1d84df2bcb3bd437f3f |
import scipy as sp
import scipy.linalg as LA
import scipy.spatial.distance as spdist
import warnings
def v2min_image_v(dr, cell, pbc=None, shifts_out=False):
"""
------
Authors: matscipy authors - https://github.com/libAtoms/matscipy
------
Apply minimum image convention to an array of distance v... | marcocaccin/LearningMetaDynamics | ignorance_field.py | Python | gpl-2.0 | 10,109 | [
"Matscipy"
] | 865ab099576c3a3681553ac09651baa52c0f6d86d5f88e00e247ce300a76b63b |
#!/opt/local/bin/python2.5
#=============================================================================================
# Render a replica trajectory in PyMOL
#=============================================================================================
#=============================================================... | jchodera/yank | examples/human-serum-albumin-explicit/render_trajectory.py | Python | lgpl-3.0 | 12,339 | [
"Amber",
"NetCDF",
"PyMOL"
] | 3562b84586d4f432aeef43735f87901202d787df85542ca384039fea80658575 |
from __future__ import (absolute_import, division, print_function)
import unittest
from mantid import logger
# noinspection PyUnresolvedReferences
from mantid.simpleapi import mtd, Abins, Scale, CompareWorkspaces, Load, DeleteWorkspace
from AbinsModules import AbinsConstants, AbinsTestHelpers
import numpy as np
def o... | wdzhou/mantid | Framework/PythonInterface/test/python/plugins/algorithms/AbinsBasicTest.py | Python | gpl-3.0 | 10,223 | [
"CASTEP",
"CRYSTAL"
] | 83b6f597df0d2d12a893add26f013610691ec949b1b295932c8373f14819ffab |
# $Id$
#
# Copyright (C) 2009 Greg Landrum
# All Rights Reserved
#
import pickle
from rdkit import DataStructs, Chem
from rdkit import Chem
similarityMethods = {
'RDK': DataStructs.ExplicitBitVect,
'AtomPairs': DataStructs.IntSparseIntVect,
'TopologicalTorsions': DataStructs.LongSparseIntVect,
'Pharm2D': Dat... | greglandrum/rdkit | rdkit/Chem/MolDb/FingerprintUtils.py | Python | bsd-3-clause | 3,728 | [
"RDKit"
] | 95f40d8d6423021a06330feef038fe6baac8fc5f24eabd2e38e58e09088bef2a |
"""
This module contains all the Data Access Objects for models which are persisted to Elasticsearch
at some point in their lifecycle.
Each DAO is an extension of the octopus ESDAO utility class which provides all of the ES-level heavy lifting,
so these DAOs mostly just provide information on where to persist the data... | JiscPER/jper | service/dao.py | Python | apache-2.0 | 3,957 | [
"Octopus"
] | 01842fdec6354bd617a419f103d4fb33220ba04b78a9a2239b891aefee98b31b |
from datetime import datetime, timezone
from unittest import TestCase
from opaque_keys.edx.keys import CourseKey
import attr
from ...data import (
CourseOutlineData, CourseSectionData, CourseLearningSequenceData, VisibilityData, CourseVisibility
)
class TestCourseOutlineData(TestCase):
"""
Simple set of... | msegado/edx-platform | openedx/core/djangoapps/content/learning_sequences/api/tests/test_data.py | Python | agpl-3.0 | 5,825 | [
"exciting"
] | 82112223bd5afc8a9d1d109350098a801fc382bd0faecebd26f8c5464d65dc81 |
# -*- test-case-name: twisted.trial.test.test_tests -*-
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Things likely to be used by writers of unit tests.
Maintainer: Jonathan Lange
"""
import doctest, inspect
import os, warnings, sys, tempfile, gc, types
from pprint import pfo... | hortonworks/hortonworks-sandbox | desktop/core/ext-py/Twisted/twisted/trial/unittest.py | Python | apache-2.0 | 62,088 | [
"VisIt"
] | 03f9a53f2de53c32487e3c7d32b2cac72631a1d3290f0c73d00c554390a82ec3 |
#
# Copyright 2017 Russell Smiley
#
# This file is part of timetools.
#
# timetools 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.
#
#... | blueskyjunkie/timeTools | timetools/synchronization/compliance/tests/testItuTG8263.py | Python | gpl-3.0 | 7,483 | [
"Gaussian"
] | 41249eb06fcf458905c0810c5eaaee80141959a05f44e63b850927f3b8bffbdc |
# -*- coding: utf-8 -*-
## perform apodization of echoes using external python script
## new writing in a module like fashion in order to be able to call it from another python script
def apodize_echoes(gb=None, cycle=None, echo_position=None, dead_pts=None, noDialog=False, dataset=None):
"""
This function appl... | jtrebosc/JTutils | TSpy/qcpmgapod.py | Python | bsd-3-clause | 5,184 | [
"Gaussian"
] | 799e6b4cc7f4671c6c08ea997ad3cd0c22d0442d3151235fe6fd6837373a99fe |
>>> from ftplib import FTP
>>> ftp = FTP('ftp.ncbi.nih.gov')
>>> ftp.login()
'230-Anonymous access granted, restrictions apply.\n Please read the file README.ftp\n230 it was last modified on Wed Apr 7 10:18:00 2010 - 193 days ago'
>>> ftp.retrlines('LIST')
dr-xr-xr-x 3 ftp anonymous 4096 Sep 7 21:03 100... | abhishektiwari/ToyProjects | Python/BioRelated/ncbi_ftp.py | Python | mit | 2,682 | [
"BLAST"
] | 38dc8c82507c094e601017ee0db15f340cc12eda5a3009e600a0bae465e8345d |
#!/usr/bin/env python
"""
clim.py
ROMS climatology utilities
Written by Brian Powell on 08/15/15
Copyright (c)2017 University of Hawaii under the MIT-License.
"""
import seapy
import numpy as np
import netCDF4
def gen_bry_clim(clim_file, grid, bry, clobber=False, cdl=None):
"""
Taking the results ... | ocefpaf/seapy | seapy/roms/clim.py | Python | mit | 2,643 | [
"Brian",
"NetCDF"
] | cf6592ccdda5c4af643e3dd572736e2a2ae41729bdd9ab1e98ccca95857aafd7 |
# Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import math
import warnings
from math import pi
import torch
from torch.distributions import VonMises
from torch.distributions.utils import broadcast_all, lazy_property
from pyro.distributions import constraints
from pyro.distributio... | uber/pyro | pyro/distributions/sine_bivariate_von_mises.py | Python | apache-2.0 | 11,333 | [
"Gaussian"
] | 68c7c4a3c4cd8c6bb5d33f5b58417b3cea1b04cbb88d74207083281426a7f56d |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals, \
absolute_import
from collections import OrderedDict
from io import StringIO
import itertools
import re
import warnings
import numpy as ... | johnson1228/pymatgen | pymatgen/io/lammps/data.py | Python | mit | 45,831 | [
"LAMMPS",
"pymatgen"
] | 7092db4e675761e7580ba99e34265d2bbd1d094c609d18e865008e876f5e3624 |
import logging
handler = logging.StreamHandler()
handler.setLevel(logging.INFO)
handler.setFormatter(logging.Formatter('{levelname}:{name}:{msg}', style='{'))
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO)
root_logger.addHandler(handler)
from fluggo.media import process, libav, x264, matroska, f... | fluggo/Canvas | scripts/encode_x264_mkv.py | Python | gpl-3.0 | 3,696 | [
"Brian"
] | 1db5df1eb7882f4ec480610ea7b9105cd2b3596de9f46d8c17f59afdd1a9f832 |
#-------------------------------------------------------------------------------
# . File : TeraChemOutputFile.py
# . Program : MolarisTools
# . Copyright : USC, Mikolaj Feliks (2015-2018)
# . License : GNU GPL v3.0 (http://www.gnu.org/licenses/gpl-3.0.en.html)
#------------------------------------------... | mfx9/molaris-tools | MolarisTools/Parser/TeraChemOutputFile.py | Python | gpl-3.0 | 7,929 | [
"TeraChem"
] | 37698b43e87ac6c9da3110b3f0d64ab173f3698ca9ed5409b5e44c565b6c8ca8 |
version_name = "OzFluxQC"
version_number = "V2.9.6f"
# V2.9.6f - re-write of qcio.xl_read_series() to trap different
# number of rows on different worksheets
# V2.9.6e - bug fix in qcts.MassmanStandard()
# - fixed calculation of effective time constant
# V2.9.6d - bug fix in gfSOLO_main
# ... | OzFlux/OzFluxQC | scripts/cfg.py | Python | gpl-3.0 | 6,755 | [
"NetCDF"
] | dbd932db11b1b300a33ade7632ffff1edf0e2086dc408e4da4afc527bf443a82 |
# Copyright (C) 2016 Collin Capano, Christopher M. Biwer, Alex Nitz
# 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.
#
#... | stevereyes01/pycbc | pycbc/distributions/__init__.py | Python | gpl-3.0 | 8,568 | [
"Gaussian"
] | 17008eddbe4a0162e4a3e487016d3caa8eff2b65ada8276cdd0ab2b2b942e95e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.