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 |
|---|---|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
#
# This file is part of Invenio Demosite.
# Copyright (C) 2010, 2011, 2013 CERN.
#
# Invenio Demosite is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License,... | mvesper/invenio-demosite | invenio_demosite/testsuite/regression/test_refextract.py | Python | gpl-2.0 | 109,545 | [
"DIRAC"
] | a5fb1d69a0b90de120c324cd1f7f024780f3d98bc5f8549c87800f044a703c03 |
from vtk import *
import os.path
data_dir = "../../../../VTKData/Data/Infovis/SQLite/"
if not os.path.exists(data_dir):
data_dir = "../../../../../VTKData/Data/Infovis/SQLite/"
sqlite_file = data_dir + "temperatures.db"
# Pull the table from the database
databaseToTable = vtkSQLDatabaseTableSource()
databaseToTable... | jeffbaumes/jeffbaumes-vtk | Examples/Infovis/Python/statistics_temperatures.py | Python | bsd-3-clause | 1,849 | [
"VTK"
] | 2d4e51af6f9477a6357027976736b5de6f39a1aa8409d68f03ccde4a3395c953 |
"""Collection of functions to train the hierarchical model."""
from __future__ import print_function
import numpy as np
import models_cmc as models
import batch_utils
import data_transforms
import McNeuron
from keras.optimizers import RMSprop, Adagrad, Adam
import matplotlib.pyplot as plt
def clip_weights(model,... | RoozbehFarhoodi/McNeuron | train_cmc.py | Python | mit | 14,450 | [
"NEURON"
] | 2392828862a8da37dea5727abc561b9ef7ac282378c3e07a75fa00ae53fd5c74 |
import sys
from django.apps import apps as django_apps
from django.core.management.color import color_style
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
style = color_style()
class MetadataWrapperError(Exception):
pass
class DeletedInvalidMetadata(Exception):
pass
class M... | botswana-harvard/edc-entry | edc_metadata/metadata_wrappers/metadata_wrapper.py | Python | gpl-2.0 | 2,733 | [
"VisIt"
] | e6fc93dae544d30167f13128605124f3c64e193fe8becca18b04ac2bdfb6b6d2 |
"""Provide classes related to widgets."""
import os.path
from json import dumps, JSONEncoder
from ...const import API_PATH
from ..base import PRAWBase
from ..list.base import BaseList
class Button(PRAWBase):
"""Class to represent a single button inside a :class:`.ButtonWidget`.
**Typical Attributes**
... | 13steinj/praw | praw/models/reddit/widgets.py | Python | bsd-2-clause | 67,259 | [
"exciting"
] | 32cd4d162a3881a7613225672c8ba63e970082434dd1e3a6281bc9af05b1c04c |
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize, rand
from ..base import BaseEstimator, RegressorMixin
from ..m... | Tong-Chen/scikit-learn | sklearn/gaussian_process/gaussian_process.py | Python | bsd-3-clause | 34,402 | [
"Gaussian"
] | 20af4ff5d485b4022b8e8bed7a6d87237365cbc4f8bd0b7305316a409269a834 |
import numpy as np
import catmap
import re
from copy import copy
from catmap import string2symbols
import warnings
def get_composition(species_string):
"""
Convert string of species into a dictionary of species and the number of each species.
:param species_string: A string of the reaction species. Should... | SUNCAT-Center/catmap | catmap/functions.py | Python | gpl-3.0 | 21,401 | [
"VisIt"
] | 9e45211ac4e90f5790151ddcf2ffb67d281f98eae2833ca256158c5262b0e9eb |
import numpy as np
from ._implementations.basis_features import BasisFeatures
from ._implementations.functional_features import FunctionalFeatures
from ._implementations.tiles_features import TilesFeatures
from ._implementations.torch_features import TorchFeatures
def Features(basis_list=None, tilings=None, tensor_l... | carloderamo/mushroom | mushroom_rl/features/features.py | Python | mit | 3,996 | [
"Gaussian"
] | 1387ce941e1590acb8d96b4c4d5098a000da483a69ea339f6036692254323436 |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | fweik/espresso | src/python/espressomd/shapes.py | Python | gpl-3.0 | 9,130 | [
"ESPResSo"
] | cbaf029ae38c20d7a6f4d9836a055fe89a2baf211f1f617b76c02843b837dc5d |
# Copyright 1999 by Cayte Lindner. 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.
#
# NOTE - This file has been split in two as a work arround for Jython JVM limits.
import os
... | updownlife/multipleK | dependencies/biopython-1.65/Tests/test_prosite2.py | Python | gpl-2.0 | 54,444 | [
"Biopython"
] | 938e19ad9272728c556aa14ef2554b258bbdb6bc9d321887253a4d627c144255 |
import os
from modeller import *
import IMP
import IMP.test
import IMP.core
import IMP.atom
import IMP.modeller
def assertSimilarModellerIMPScores(tst, sf, modeller_model, imp_atoms):
"""Assert that Modeller and IMP give the same score and derivatives"""
modeller_energy = selection(modeller_model).energy()[0]... | shanot/imp | modules/modeller/test/test_rsr_file_read.py | Python | gpl-3.0 | 12,044 | [
"Gaussian"
] | c58506c561f787020a4693d1da3a90e51439d0661b344896b068c0f324d712ab |
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COP... | JWDebelius/scikit-bio | skbio/diversity/alpha/tests/test_lladser.py | Python | bsd-3-clause | 7,637 | [
"scikit-bio"
] | 2c9b9a8408f0960f3cdd61fe80c4ca53f2ece1523144f7c55c5ed986b8879bdc |
#! /usr/bin/env python2
# A set of tools, functions, aliases and more used in RecBlast.
import os
import tarfile
import zipfile
from time import strftime, sleep
import re
import subprocess
from Bio import Entrez
import shutil
Entrez.email = "recblast@gmail.com"
Entrez.tool = "RecBlast"
TEMP_FILES_PATH = os.getcwd()
... | neuhofmo/RecBlast | RecBlastUtils.py | Python | mit | 10,025 | [
"BLAST"
] | 3f3e6060aa922716e7c98aadb0d79cf719a48053d99dc0b138e1b5c6380f87af |
#Processins of Harshil's millenium data to run on this setup.
import sys
import cPickle as pickle
import pandas as pd
import numpy as np
from sklearn import cross_validation
import gzip
if __name__ == '__main__':
df = pd.read_csv('/home/mclaughlin6464/GitRepos/ml4cosmosims/data/data.csv')
#Harshil says I sho... | mclaughlin6464/pdnn | myStuff/data_prep.py | Python | apache-2.0 | 2,572 | [
"Galaxy"
] | a26fd6518c7d1ddbe9009fc8b2124116555dc9ac1ef2661aa954c8b5b847cb88 |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
int_or_none,
parse_resolution,
str_or_none,
try_get,
unified_timestamp,
url_or_none,
urljoin,
)
class PeerTubeIE(InfoExtractor):
_... | rbrito/pkg-youtube-dl | youtube_dl/extractor/peertube.py | Python | unlicense | 28,378 | [
"MOE"
] | 4042d9bc090d605b26bc140859fc4563e355ee2374f0dd3cda65e64a64ccaab3 |
from gpaw.xc.gllb.contribution import Contribution
from gpaw.xc import XC
from gpaw.xc.pawcorrection import rnablaY_nLv
from gpaw.xc.gllb import safe_sqr
from math import sqrt, pi
from gpaw.io.tar import TarFileReference
from gpaw.sphere.lebedev import weight_n
import numpy as np
K_G = 0.382106112167171
class C_GLLBS... | qsnake/gpaw | gpaw/xc/gllb/c_gllbscr.py | Python | gpl-3.0 | 8,802 | [
"GPAW"
] | 10d1e40106886c8d764d2597b8c2cc7080cca4a51ad39f61d163f4227e8fba1c |
"""
fitmaker.py written by David Sanchez : david.sanchez@lapp.in2p3.fr
Collection of functions to run the fit (gtlike)
the class FitMaker will call the function of the observation class (gtfunction.py) and prepare the fit
by computing the fits file.
it can distinguish between the binned and unbinnned analysis
begun Sep... | gammapy/enrico | enrico/fitmaker.py | Python | bsd-3-clause | 26,368 | [
"Gaussian"
] | a027c0ebdb2766e62e803b13e709e5610e76f92f57f9012112025e912a774730 |
#!/usr/bin/env python
import sys
import argparse
import netCDF4 as nc
import numpy as np
import scipy as sc
import scipy.interpolate
import datetime
import matplotlib
matplotlib.use('Agg')
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
"""
What this script does:
Plot Antarctic and Arctic ic... | CWSL/access-cm-tools | analyse/cice_plot_ice.py | Python | apache-2.0 | 6,998 | [
"NetCDF"
] | 23e9790bde9320cd6119944e2c28c11c13b768e094b018678fe5f5ab365509ec |
import yavalath_engine
import random
import logging
from enum import Enum
import pprint
import numpy
import itertools
import functools
import collections
import pickle
import time
import multiprocessing
import queue
import os
import pathlib
from players.blue.classifiers import SpaceProperies, NextMoveClassifier # Need... | adamsd5/yavalath | players/blue_player.py | Python | mit | 1,784 | [
"MOE"
] | 642e08d46e4a1b5e75ee665a1c7009efec745732dbe150031e002bfa47cd0d2b |
import logging
__all__ = [
"AFIR",
"AtomAtomTransTorque",
"Composite",
"ConicalIntersection",
"DFTBp",
"Dimer",
"EnergyMin",
"ExternalPotential",
"FakeASE",
"Gaussian09",
"Gaussian16",
"HardSphere",
"IPIServer",
"LennardJones",
"MOPAC",
"MultiCalc",
"... | eljost/pysisyphus | pysisyphus/calculators/__init__.py | Python | gpl-3.0 | 2,246 | [
"MOPAC",
"ORCA",
"OpenMolcas",
"Psi4",
"TURBOMOLE",
"xTB"
] | aa1bd4080172e840ab5c6c208867ae84b75d6aa193631fd888639fcfe6837206 |
#!/usr/bin/env python
"""
This file demonstrates the creation of a tree using the
Python interface to VTK.
"""
from __future__ import print_function
from vtk import *
#------------------------------------------------------------------------------
# Script Entry Point
#-------------------------------------------------... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Examples/Infovis/Python/tree1.py | Python | gpl-3.0 | 1,591 | [
"VTK"
] | 848f4d490f0b63a384c99f1257b5737fda380315f4d443bc04b04062393fdd56 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import math
import numpy as np
import pytest
from astropy.convolution.convolve import convolve, convolve_fft, convolve_models
from astropy.modeling import models, fitting
from astropy.utils.misc import NumpyRNGContext
from astropy.utils.compat.optional_d... | aleksandr-bakanov/astropy | astropy/convolution/tests/test_convolve_models.py | Python | bsd-3-clause | 3,912 | [
"Gaussian"
] | 4df972ce4ed671b10263cb6967f8aa06d367870a09250657e8d6aa2c50aee4b9 |
# Copyright 2018-2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | kubeflow/kfp-tekton-backend | sdk/python/kfp/compiler/compiler.py | Python | apache-2.0 | 43,057 | [
"VisIt"
] | e8ca921448dbeb27e575ca702c4813cc3c60ccb4fb22d63a05aa9cc788e67d40 |
########################################################################
# $HeadURL$
# File : CSGlobals.py
# Author : Ricardo Graciani
########################################################################
"""
Some Helper functions to retrieve common location from the CS
"""
__RCSID__ = "$Id$"
import imp
from DI... | avedaee/DIRAC | ConfigurationSystem/Client/Helpers/CSGlobals.py | Python | gpl-3.0 | 2,511 | [
"DIRAC"
] | 7f0c2d54c8cc3337a7b27c9208b3cee4a94ad44a3654cab1f26e397bf48a7c2d |
"""
Bok choy acceptance and a11y tests for problem types in the LMS
See also lettuce tests in lms/djangoapps/courseware/features/problems.feature
"""
import random
import textwrap
from abc import ABCMeta, abstractmethod
import ddt
from nose import SkipTest
from nose.plugins.attrib import attr
from selenium.webdriver ... | Stanford-Online/edx-platform | common/test/acceptance/tests/lms/test_problem_types.py | Python | agpl-3.0 | 44,444 | [
"VisIt"
] | 0162c11f00f8ebe36b332c12021317665148734ba73f6d0fe55892cb06e6a0fa |
# Micromagnetics standard proplem no. 5
# As proposed by M. Najafi et al., JAP 105, 113914 (2009).
# @author Mykola Dvornik
from mumax2 import *
from mumax2_geom import *
Nx = 32
Ny = 32
Nz = 1
setgridsize(Nx, Ny, Nz)
# physical size in meters
sizeX = 100e-9
sizeY = 100e-9
sizeZ = 10e-9
csX = (sizeX/Nx)
csY = (size... | mumax/2 | examples/stdproblem5-am01.py | Python | gpl-3.0 | 1,828 | [
"VTK"
] | a36a7bfbfa9ad11e766dec66387fd1d1183dd4923b9692e9a45050cf1b13df91 |
"""Takes an unrolled StencilModel and converts it to a C++ AST.
The third stage in processing. Input must be processed with
StencilUnrollNeighborIter first to remove neighbor loops and
InputElementZeroOffset nodes. Done once per call.
"""
import ast
import asp.codegen.cpp_ast as cpp_ast
import asp.codegen.ast_tools a... | shoaibkamil/asp | tools/debugger/stencil/stencil_convert.py | Python | bsd-3-clause | 9,147 | [
"VisIt"
] | 4d964ce4a7b1b6084edf0840bd570bfab553478e2ee5e92b3ebbbedc4e22098b |
# Copyright (C) 2015, Anuj Sharma (anuj.sharma80@gmail.com)
# 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.
"""
QCPSuperimposer finds the best rotation and translation to put
two point sets on top of ... | zjuchenyuan/BioWeb | Lib/Bio/PDB/QCPSuperimposer/__init__.py | Python | mit | 6,336 | [
"Biopython",
"CRYSTAL"
] | 14a93891ef77fa00b83a3c4c5cd735287ea4b82176cdfd9a4dbba37564ca7769 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | shakamunyi/beam | sdks/python/apache_beam/runners/runner.py | Python | apache-2.0 | 12,908 | [
"VisIt"
] | 24ad31037d616377d7ad25c66713e6ed013fa009b626dd61cac0b193f34a1f69 |
"""
Test courseware search
"""
from __future__ import absolute_import
import json
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.common.logout import LogoutPage
from common.test.acceptance.pa... | jolyonb/edx-platform | common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py | Python | agpl-3.0 | 4,631 | [
"VisIt"
] | cafc1945f117c47240ec7716ed1456624561e66930db7bf73ad574a3c2fc490e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Created on Apr 28, 2012
"""
__author__ = "Shyue Ping Ong, Qi Wang"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.... | gVallverdu/pymatgen | pymatgen/io/tests/test_babel.py | Python | mit | 5,105 | [
"Pybel",
"pymatgen"
] | 91b007e3e58225868744f4baf07d00ef8522b1e1101d045f6fd7ec9c5a1c5433 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2008 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 Lesser General Public License as published by
## the Free Software F... | andrebellafronte/stoq | plugins/ecf/paulistainvoicedialog.py | Python | gpl-2.0 | 4,184 | [
"VisIt"
] | e1b0bf035b200adba087992c0c38d713c969e5d2575ff32fa060a4346269501f |
"""
API operations on FormDefinition objects.
"""
import logging
from galaxy.web.base.controller import BaseAPIController, url_for
from galaxy import web
from galaxy.forms.forms import form_factory
from elementtree.ElementTree import XML
log = logging.getLogger( __name__ )
class FormDefinitionAPIController( BaseAPICo... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/webapps/galaxy/api/forms.py | Python | gpl-3.0 | 3,222 | [
"Galaxy"
] | 0d27b244b2c6f36f2edf414ca260710bb57bf1f05cf0c32948e81c266bf002be |
# -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 ... | kaplun/inspire-next | inspirehep/modules/authors/views.py | Python | gpl-3.0 | 13,517 | [
"VisIt"
] | 0fe8a87ad6acfc8f1c4d6d095dd0b09d1e8202227f5c256da4cc33bd5bc81658 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS.
"""
from datetime import datetime, timedelta
from flaky import flaky
from textwrap import dedent
from unittest import skip
from nose.plugins.attrib import attr
import pytz
import urllib
from bok_choy.promise import EmptyPromise
from ..helpers import (
Uniqu... | 10clouds/edx-platform | common/test/acceptance/tests/lms/test_lms.py | Python | agpl-3.0 | 52,137 | [
"VisIt"
] | 39bb0fdc0bfcbf16ae97c092e12b08db59da947518a47cd061acea58c9de7ff6 |
import sys
import os
import pybedtools
import HTSeq
from scipy.stats import poisson
import pysam
import re
import subprocess
import gtf_data
class gene:
def __init__(self, name='Unkown_gene', gene_iv=['I', 1, 20, "+"],
gtf_info=False):
self.name = name
self.iv = gene_iv
... | dfporter/peakCaller | call_peaks/gene.py | Python | mit | 7,166 | [
"HTSeq",
"pysam"
] | ae41d27c0d2cc1615c4f6e652310264107bcd235c37ff069520da4b077795fb2 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | tmerrick1/spack | var/spack/repos/builtin/packages/libcint/package.py | Python | lgpl-2.1 | 3,183 | [
"Gaussian"
] | d693ce6908b78b898f5ad1dc55b456c5919c122581efdf6863863e1c3d13cb18 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-16 19:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bcpp_subject', '0015_auto_20170216_2137'),
]
operations = [
migrations.Alte... | botswana-harvard/bcpp-subject | bcpp_subject/migrations/0016_auto_20170216_2152.py | Python | gpl-3.0 | 757 | [
"VisIt"
] | 6e41f04b428f9b47c3dec2f3693559d06b55837387cc786c4135f4d2c57195b6 |
from __future__ import division
import numpy as np
import pyfits
WMIN = 5710
WMAX = 9265
MASKATMOS = [(1, WMIN),
(5870, 5910),
(6275, 6325),
(6350, 6385),
(7550, 7700),
(WMAX, 1e9)]
def read_adp(filename):
""" Read object ids from a VIMOS mask pre... | nhmc/findz_VIMOS | VIMOS_util.py | Python | bsd-3-clause | 13,234 | [
"Galaxy"
] | 8eda902708230d7cd9d9d974d6fe087ce4bc02f73c712a3a4352923b3bbfa393 |
# -*- coding: utf-8 -*-
from __future__ import with_statement
import py
import pytest
import os, sys
from py.path import local
import common
failsonjython = py.test.mark.xfail("sys.platform.startswith('java')")
failsonjywin32 = py.test.mark.xfail("sys.platform.startswith('java') "
"and getattr(os, '_name', No... | pexip/os-codespeak-lib | testing/path/test_local.py | Python | mit | 27,353 | [
"VisIt"
] | 77cdae9a2e1e962db9c1b53d64a5b61c7930fa2be7e4d480a43a496dc9d693a2 |
'''
Created on 2013-10-21
Script to produce climatology files from monthly mean time-series' for all or a subset of available WRF experiments.
@author: Andre R. Erler, GPL v3
'''
# external
import numpy as np
import os, gc
from datetime import datetime
# internal
from geodata.base import Variable
from ... | aerler/GeoPy | src/processing/wrfavg.py | Python | gpl-3.0 | 15,554 | [
"NetCDF"
] | 6e926fe54cde7133cdb796bfe6568f708c9533b233542beb53a91668cf612f24 |
import os
import numpy as np
import json
import ParameterContainer
from copy import deepcopy as dc
import pprint
class global_parameters(ParameterContainer.ParameterContainer):
#class global_parameters(object):
"""
The parameter class storing the simulation parameters
is derived from the ParameterContaine... | pierreberthet/bg_dopa_nest | DELAY_simulation_parameters.py | Python | gpl-2.0 | 36,783 | [
"NEURON"
] | 8c89bd2a0823e92ba7d6b498b6f0ee9e98f9c60d2fea7cf376d1ae3627c479fa |
# Copyright 2013 anthony cantor
# This file is part of pyc.
#
# pyc 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.
#
# pyc is distr... | cantora/pyc | pyc_declassify.py | Python | gpl-3.0 | 4,385 | [
"VisIt"
] | 09cb398ee6db66c55fcb84cfec9e219b006b903c683691f8c954a9608efa1997 |
#
# Copyright 2018 Red Hat | Ansible
#
# This file is part of Ansible
#
# Ansible 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.
#
# ... | valentin-krasontovitsch/ansible | lib/ansible/plugins/lookup/k8s.py | Python | gpl-3.0 | 11,262 | [
"Galaxy",
"VisIt"
] | a5f4f0b3cc4afd13eaadc367ac1899871bb275f3e5898b4b82325fc9bbe08464 |
import os
import sys
# setting the absolute path of the previous directory
# getting the this py module path by __file__ variable
# pass that __file__ to the os.path.dirname, returns the path of this module
__curDir__ = os.path.dirname(__file__)
diagDir = os.path.abspath(os.path.join(__curDir__, '../..'))
# adding the ... | arulalant/mmDiagnosis | diagnosis1/miso/harmonic/make_model_anomaly.py | Python | gpl-3.0 | 2,835 | [
"NetCDF"
] | 40e18b93dbdd4b88af02c635cc6aea6fad649e9db59ba9c73a6ffbeeeb54a89d |
"""
Definitions of scaling models.
A scaling model is a collection of scaling model components with appropriate
methods to define how these are composed into one model.
"""
from __future__ import annotations
import logging
from libtbx import Auto, phil
from dials.algorithms.scaling.error_model.error_model import B... | dials/dials | algorithms/scaling/model/model.py | Python | bsd-3-clause | 59,946 | [
"CRYSTAL",
"Gaussian"
] | 1b7fe8c1684a13858c8eaf0cbf1af9718f2b195f423a28f6a7115e1154e35303 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | mfherbst/spack | var/spack/repos/builtin/packages/r-rtracklayer/package.py | Python | lgpl-2.1 | 2,533 | [
"Bioconductor"
] | d7e3f9bcc1471aa208800fba77a4cce5d230e809ce29dfb1314ecce4b2028834 |
import calendar
import logging
from decimal import Decimal
from config import STRIPE_KEYS, CIRCLE_FAILURE_RECIPIENT
from npsp import User, Task
from util import send_slack_message
import stripe
stripe.api_key = STRIPE_KEYS["secret_key"]
TWOPLACES = Decimal(10) ** -2 # same as Decimal('0.01')
class ChargeException... | texastribune/salesforce-stripe | charges.py | Python | mit | 6,407 | [
"BLAST"
] | 72f6656f825ae1c5a3a37307758ac103bede2ce89222a36365a5a8c6c3a44c61 |
from dlint import linters
from .base import PythonTool, Issue, AccessIssue, ParseIssue
from ..util import parse_python_file
class DlintIssue(Issue):
tool = 'dlint'
pylint_type = 'W'
# pylint: disable=protected-access
def get_linter_msg(linter, msg=None):
msg = msg or linter._error_tmpl
if msg.st... | jayclassless/tidypy | src/tidypy/tools/dlint.py | Python | mit | 1,856 | [
"VisIt"
] | 42a0fd8b8a20c257c055acc9983f841f853274a7e4f9f229aa619dfb274c97d7 |
from collections import OrderedDict
from . import base
from functools import partial
from buildercore import utils
from unittest.mock import patch, MagicMock
import logging
LOG = logging.getLogger(__name__)
class Simple(base.BaseCase):
def setUp(self):
pass
def tearDown(self):
pass
def t... | elifesciences/builder | src/tests/test_buildercore_utils.py | Python | mit | 8,003 | [
"VisIt"
] | a78429f5e634df618080a76aca1569134c775486a00ce6a4474a61070448f873 |
import numpy as np
import pytest
from pysisyphus.calculators import Gaussian16, Turbomole, ORCA
from pysisyphus.calculators.PySCF import PySCF
from pysisyphus.helpers import geom_loader
from pysisyphus.testing import using
@pytest.mark.parametrize(
"calc_cls, calc_kwargs, ref_energy, ref_force_norm",
[
... | eljost/pysisyphus | tests/test_point_charges/test_point_charges.py | Python | gpl-3.0 | 3,140 | [
"ORCA",
"PySCF",
"TURBOMOLE"
] | b2fdc9cbabe40c980777debc9a250e3c254070b0564764e5a398e62775ff8e83 |
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# 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.
__doc__="Output of PDB files."
_ATOM_FORMAT_STRING="%s%5i %-4s%c%3s %c%4i%c %8.3f%8.3f... | NirBenTalLab/proorigami-cde-package | cde-root/usr/lib64/python2.4/site-packages/Bio/PDB/PDBIO.py | Python | mit | 6,005 | [
"Biopython"
] | fe6bc5076683b11bab3e0330a4d6924660c39173a4d5b7523d08585ded4a85a5 |
"""
Utility to produce CDL-style output for an :class:`ncobj.Element`.
Output is designed to be similar to "ncdump -h". Variables data is completely
omitted.
Also includes a function to 'canonicalise' results for comparison with actual
ncdump output.
Extra notes:
* Only ncobj supported features are managed (so cu... | pp-mo/ncobj | lib/ncobj/cdl.py | Python | gpl-3.0 | 8,580 | [
"NetCDF"
] | 653a1fa67ce014ec62b7dab4feedb0978e4c2344714d13cbcbc6d399cadf19d9 |
# from pyanimu import Mal,UserStatus, connectors,error
from pyanimu import connectors,error,Anilist,UserStatus_Anilist
from discord.ext import commands
from .utils import utils
import asyncio
import aiohttp
import discord
import base64
import time
import html
def synopis(term):
if not(bool(term)): return ""
te... | Maverun/Nurevam | Bot/cogs/anime.py | Python | mit | 28,364 | [
"MOE",
"VisIt"
] | 030fea23d4a70794943d7d852d28d99e3d57b1d6359821224b97d167318fb5be |
###
### This script can be run with pvpython rather than pvbatch, as it does not
### need mpi.
###
import sys, os
from paraview.simple import *
from paraview import data_exploration as wx
#import matplotlib.pyplot as plt
# -----------------------------------------------------------------------------
# Path to inp... | Kitware/cinema | scripts/data_generation/cam5/generateVolumeTent.py | Python | bsd-3-clause | 7,170 | [
"ParaView",
"VTK"
] | 4e97c905591d5096dfba7e7fb97c8b5456475c4de565618053c524b232b6eeb2 |
#!/usr/bin/env python
# L. Brodeau, 2016
import sys
import numpy as nmp
from netCDF4 import Dataset
import barakuda_tool as bt
import barakuda_plot as bp
ldebug = False
rmult = 1.E3
zmax_rnf_atl = 0.1 ; dz_rnf = 0.005
venv_needed = {'ORCA','EXP','DIAG_D','NN_RNF','MM_FILE'}
vdic = bt.check_env_var(sys.argv[0], ... | brodeau/barakuda | python/exec/runoffs.py | Python | gpl-2.0 | 2,499 | [
"ORCA"
] | 4b269b8df9835fd5aea27b16562feb167d4baa50376520dedf882dcd436afed6 |
import numpy as np
from scipy.ndimage import distance_transform_edt as distance
def _cv_curvature(phi):
"""Returns the 'curvature' of a level set 'phi'.
"""
P = np.pad(phi, 1, mode='edge')
fy = (P[2:, 1:-1] - P[:-2, 1:-1]) / 2.0
fx = (P[1:-1, 2:] - P[1:-1, :-2]) / 2.0
fyy = P[2:, 1:-1] + P[:-2... | kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/skimage/segmentation/_chan_vese.py | Python | gpl-3.0 | 12,459 | [
"DIRAC"
] | 8864d8208528f7f6e89a4dc572831059753cfd916c431aea57f5e1b6f87a0d35 |
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html
# Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
#
# Copyright (2005) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
# certain rights in this software. This software is... | sn-amber/mylpp | src/patch.py | Python | gpl-2.0 | 49,062 | [
"LAMMPS"
] | 83a187c3d1c8e572d148abcafd52259f95662070554d42ee16f684c57b4984e5 |
import gaussfitter
input_parameters = [0, 1, 25, 25, 3, 6, 30]
print("Input parameters are: {0}".format(input_parameters))
example_gaussian = gaussfitter.twodgaussian(input_parameters, shape=[50,50],)
moments = gaussfitter.moments(example_gaussian, circle=False, rotate=True, vheight=True)
print("These are the input ... | keflavich/gaussfitter | examples/example_moment.py | Python | bsd-3-clause | 473 | [
"Gaussian"
] | 489665d598511c7b33fd322f87b75986ed2cbedbc0c24c7427b1bf30b4506c19 |
"""
Created on Nov 30, 2021
@author: CyberiaResurrection
"""
import unittest
import re
import sys
sys.path.append('../PyRoute')
from Galaxy import Galaxy
from Galaxy import Sector
class testGalaxy(unittest.TestCase):
"""
A very simple, barebones test to check that Verge and Reft end up in their correct r... | makhidkarun/traveller_pyroute | Tests/testGalaxy.py | Python | mit | 4,713 | [
"Galaxy"
] | c680321313500ce6bb434ab9f44af8cb8461f43cfa16bd0425cf709d93ab9bdf |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2002 Gary Shao
# Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2009 Gary Burton
#
# This pr... | beernarrd/gramps | gramps/gen/plug/docgen/graphdoc.py | Python | gpl-2.0 | 38,969 | [
"Brian"
] | 968bbe042b19c75736f3cc290bb8348425d3334cdcb9e4571117fb7e599b3f08 |
#!/usr/bin/env python
"""Run a tumor-only BubbleTree analysis using VarDict and Seq2c inputs.
"""
import collections
import csv
import glob
import gzip
import imp
import math
import os
import subprocess
import sys
import pandas as pd
import pysam
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ba... | hbc/tumor-only-prioritization | heterogeneity/tumoronly_bubbletree.py | Python | mit | 13,676 | [
"pysam"
] | 3ef335ce4a9f2a319bb8e54a40548007ac3bf2b64678664a4fa104e662e5835e |
#!/bin/env python
# -*- coding: utf-8 -*-
import os,re, sys, shutil
from Sire.IO import *
from Sire.Mol import *
from Sire.CAS import *
from Sire.System import *
from Sire.Move import *
from Sire.MM import *
from Sire.FF import *
from Sire.Units import *
from Sire.Vol import *
from Sire.Maths import *
from Sire.Base ... | michellab/Sire | wrapper/Tools/deprecated/FDTISingleFree.py | Python | gpl-2.0 | 59,061 | [
"Amber"
] | 0f480e487de10941921ad3e8ec1b43547ba14a02591f87b40a5b2a82699c5597 |
from __future__ import division, print_function, absolute_import
__all__ = ['Sphere', 'HemiSphere', 'faces_from_sphere_vertices', 'unique_edges']
import numpy as np
import warnings
from ..utils.six.moves import xrange
from dipy.core.geometry import cart2sphere, sphere2cart, vector_norm
from dipy.core.onetime import... | maurozucchelli/dipy | dipy/core/sphere.py | Python | bsd-3-clause | 18,317 | [
"Gaussian"
] | 809f8cc8944aa971620481da7a09f160f1762146f3db40351b77040aac638b15 |
# -*- coding: utf-8 -*-
# @Author: YangZhou
# @Date: 2015-10-14 20:43:32
# @Last Modified by: YangZhou
# @Last Modified time: 2017-06-22 23:26:15
from aces.tools import *
import numpy as np
from ase import io
from aces.graph import pl, fig
from numpy.linalg import norm
import itertools
def parseVasprun(vasprun, t... | vanceeasleaf/aces | aces/script/__init__.py | Python | gpl-2.0 | 9,749 | [
"ASE",
"VASP",
"phonopy"
] | f9f44266d21355552668a7b9d971ec9355a5fd172c531c022e4d33e69b4e3e18 |
import os
import netCDF4 as nc
import numpy as np
import load_grid
#import plot_utils
import utils
__version__ = '0.1.5'
def extract_from_file(file='',varname='zeta',extraction_type='full',**kwargs):
# Check the netCDF file for existence and if the variable is in it
if not os.path.exists(file):
raise IOError('F... | dcherian/tools | ROMS/pmacc/tools/post_tools/rompy/tags/rompy-0.1.5/rompy/extract_from_file.py | Python | mit | 7,299 | [
"NetCDF"
] | 250f3f3e3660496ab8b52bb6acc6d5655780f5cb0abda7100bf33a5ef2ae7faa |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor(... | hlzz/dotfiles | graphics/VTK-7.0.0/IO/Geometry/Testing/Python/TestPolygonWriters.py | Python | bsd-3-clause | 4,384 | [
"VTK"
] | 142faf56195ddcd5e52a44223d7579023bbc565e8efe475862ad27bd2d890010 |
# 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
import os
import unittest
import numpy as np
from pymatgen.io.lammps.output import LammpsRun, LammpsLog, LammpsDump
_... | johnson1228/pymatgen | pymatgen/io/lammps/tests/test_output.py | Python | mit | 4,709 | [
"LAMMPS",
"pymatgen"
] | c5ef0d0a80d79a3bcb2a87c7b0d7e1d9399d336688b06bdfcbd38be24a415774 |
from __future__ import absolute_import
input_name = '../examples/linear_elasticity/linear_elastic.py'
output_name = 'test_linear_elastic.vtk'
from tests_basic import TestInput
class Test( TestInput ):
pass
| rc/sfepy | tests/test_input_linear_elastic.py | Python | bsd-3-clause | 211 | [
"VTK"
] | 0e7740d43d19ca97d5915ea135d6cad402ea8cd15cc26f75ece782ab1dc083ad |
from flask import Flask, render_template, session, request, redirect
import random
app = Flask(__name__)
app.secret_key = 'my_secret_key'
@app.route('/')
def index():
if not 'gold' in session:
session['gold'] = 0
if not 'activities' in session:
session['activities'] = []
return render_temp... | authman/Python201609 | Sparks_Steven/Assignments/Flask Olympics/olympics7/server.py | Python | mit | 849 | [
"CASINO"
] | 1e4810e4ca04ee843bf05545b87bd8addde0263c745bdf885a16a1eee739d1d2 |
import numpy as np
import skimage.draw
def line(img, pt1, pt2, color, width):
# Draw a line on an image
# Make sure dimension of color matches number of channels in img
# First get coordinates for corners of the line
diff = np.array([pt1[1] - pt2[1], pt1[0] - pt2[0]], np.float)
mag = np.linalg.nor... | anewell/pose-hg-train | src/pypose/draw.py | Python | bsd-3-clause | 2,484 | [
"Gaussian"
] | e0ad314a5ee18def886a81f5f8628bef2615eb388e6b9b343cd818d5499c362c |
#!/usr/bin/env python
#pylint: disable=missing-docstring
####################################################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simu... | yipenggao/moose | python/MooseDocs/tests/common/slugify/test_slugify.py | Python | lgpl-2.1 | 2,220 | [
"MOOSE"
] | 08eddf97db844fecf0eee253c09d211feba2052ee065a6a87d2942ca49937f54 |
#----------------------------------------------------------------------
# eliza.py
#
# a cheezy little Eliza knock-off by Joe Strout <joe@strout.net>
# with some updates by Jeff Epler <jepler@inetnebr.com>
# hacked into a module and updated by Jez Higgins <jez@jezuk.co.uk>
# last revised: 28 February 2005
#-------... | ganga-devs/ganga | ganga/GangaCore/Runtime/eliza.py | Python | gpl-3.0 | 12,697 | [
"DIRAC"
] | c125d02656bc42113a35f7032bb0ee715d490e82f3a585e74ad4c4b913d81c7b |
from twirps.classes import Tweet
from twirps.data_collection import authorize_twitter
import datetime
import unittest
import json
import os
class TestTweetModel(unittest.TestCase):
def setUp(self):
self.api = authorize_twitter()
def tearDown(self):
pass
def test_parse_mention(self):
... | condnsdmatters/twirps | tests/test_models.py | Python | mit | 8,708 | [
"VisIt"
] | 4e63e5c971e85baebf59cd4be30da5b5929862e2b93928e819b44ade0ec276f1 |
"""
Author: Remi Lafage <remi.lafage@onera.fr>
This package is distributed under New BSD license.
"""
import matplotlib
matplotlib.use("Agg")
import unittest
import numpy as np
from sys import argv
from smt.applications import MOE
from smt.utils.sm_test_case import SMTestCase
from smt.problems import Branin, LpNor... | bouhlelma/smt | smt/applications/tests/test_moe.py | Python | bsd-3-clause | 8,758 | [
"MOE"
] | df9629b136a972121a969d15d8128a3c2149f55b8fe268476381cd535184ae2f |
""" Tornado-based HTTPs JobMonitoring service.
"""
from DIRAC import gLogger
from DIRAC.Core.Tornado.Server.TornadoService import TornadoService
from DIRAC.WorkloadManagementSystem.Service.JobMonitoringHandler import JobMonitoringHandlerMixin
sLog = gLogger.getSubLogger(__name__)
class TornadoJobMonitoringHandler(J... | DIRACGrid/DIRAC | src/DIRAC/WorkloadManagementSystem/Service/TornadoJobMonitoringHandler.py | Python | gpl-3.0 | 378 | [
"DIRAC"
] | f5092e8cbb31e4cb1462480eeb1f626df68ed9cc7262de9097c268f025ba569d |
# Copyright 2017 by Teem, and other contributors,
# as noted in the individual source code files.
#
# 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/LICENS... | enderlabs/gavl | gavl/parser/parser.py | Python | apache-2.0 | 5,190 | [
"VisIt"
] | 023f3b687377c954efa7a74146e64660f15fc3d11b2661d015454cedfb291718 |
# $Id$
#
# Copyright (C) 2001-2008 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.
#
""" Exposes functionali... | jandom/rdkit | rdkit/Chem/MolSurf.py | Python | bsd-3-clause | 14,867 | [
"MOE",
"RDKit"
] | fa8d748d2bbf244206b97666f0aaa08dc424fac80c3a174e1adf3c0f9bf9caae |
''' Filter a volume
This pySPIDER batch file (`spi-filtervol`) filters a volume to a specific resolution.
Tips
====
#. Boolean flags such as `disable-enhance` cannot take a value on the command-line. They only require a value in a configuration
file. Their existence or absence sets the appropriate value. For e... | ezralanglois/arachnid | arachnid/pyspider/filter_volume.py | Python | gpl-2.0 | 13,421 | [
"Gaussian"
] | cf4af518144792e90924e7c4551f86ebcc533a8427162af8f316b5af4a728ef5 |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | liesbethvanherpe/NeuroM | neurom/view/_dendrogram.py | Python | bsd-3-clause | 10,989 | [
"NEURON"
] | a50c92f8ca0831e119eafbc91641b56f370fbfce7826a000c9f59c3457d118e6 |
# -*- coding: UTF-8 -*-
"""
Parametrizes the noise of the spectrum fit using a Gaussian process.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import celerite
import warnings
__all__=['WDmodel_CovModel']
class WDmodel_CovMo... | gnarayan/WDmodel | WDmodel/covariance.py | Python | gpl-3.0 | 10,523 | [
"Gaussian"
] | b09b0f57fe32e8d465bc4de3f076132f43fceba791b9b76afbd5c178fbf54aec |
"""The :mod:`variation` module defines classes for variation operators.
Variation operators (aka genetic operators) are used in evolutionary/genetic
algorithms to create "child" genomes from "parent" genomes.
"""
from abc import ABC, abstractmethod
from typing import Sequence, Union
import math
from numpy.random imp... | erp12/pyshgp | pyshgp/gp/variation.py | Python | mit | 14,436 | [
"Gaussian"
] | 27b517bdb57723d92d57d0bd273697f1e6f16c38e1eacdc887cf3a0c292139b5 |
"""
Django settings for columbus project on production server.
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
import mimetypes
mimetypes.add_type("image/svg+xml", ".svg", True)
mimetypes.add_type("image/svg+xml", ".svgz", True)
# Webservice for Galileo. Needed only... | jkachika/columbus | columbus/test_settings.py | Python | mit | 7,510 | [
"COLUMBUS"
] | a012a60608b4307d7e511e594d4cf5eab399257dc4fd2bae1e5e1f4fe706e484 |
import genson
def test_unary():
g = genson.loads('{ "p" : sin(-1) } ')
assert(g['p'].args[0] == -1)
g = genson.loads('{ "p" : sin(+1) } ')
assert(g['p'].args[0] == 1)
def test_binary():
g = genson.loads('{ "p" : gaussian(1+1,1) } ')
assert(g['p'].mean == 2)
assert(g['p'].stdev == 1)
| davidcox/genson | test/test_expressions.py | Python | mit | 319 | [
"Gaussian"
] | 6ab02b1b0d9aaac7860113d77988613141c15c3a4add289e9392dc7d7ed9569f |
"""Support integration with Illumina sequencer machines.
"""
from __future__ import print_function
import glob
import json
import os
import operator
import subprocess
from xml.etree.ElementTree import ElementTree
import requests
import yaml
from bcbio import utils
from bcbio.log import setup_local_logging
from bcbio.... | a113n/bcbio-nextgen | bcbio/illumina/machine.py | Python | mit | 7,237 | [
"Galaxy"
] | 9ae9783a2f1100155033f1e7f4b832b567ccadd8695b5716ebe9df3a1e009038 |
# 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 RA4reporting(RPackage):
"""Automated Affymetrix Array Analysis Reporting Package."""
... | rspavel/spack | var/spack/repos/builtin/packages/r-a4reporting/package.py | Python | lgpl-2.1 | 918 | [
"Bioconductor"
] | 0440e4a4f4ee2138f3464bdf7f6a8f3a30c295e2244fb7f9b5a8745fe53c9f29 |
# -*- coding: utf-8 -*-
"""
A Cell
A cell is a single input/output block. Worksheets are built out of
a list of cells.
"""
###########################################################################
# Copyright (C) 2006 William Stein <wstein@gmail.com>
#
# Distributed under the terms of the GNU General Public ... | topisani/sagenb | sagenb/notebook/cell.py | Python | gpl-3.0 | 82,973 | [
"Jmol"
] | 2ecc15eb4044028e01f82b9d82f04eefba4e606780d09e075a360986db6ccd50 |
import locale
import logging
import os
import subprocess
import sys
from collections.abc import Sequence
from shutil import rmtree
from tempfile import mkdtemp
from pelican import Pelican
from pelican.generators import StaticGenerator
from pelican.settings import read_settings
from pelican.tests.support import (Logged... | avaris/pelican | pelican/tests/test_pelican.py | Python | agpl-3.0 | 10,906 | [
"exciting"
] | 33cfbda57495e3f49efa5fd7fded4737a903059b34c1e9c94881cfeef5722097 |
# -*- coding: utf-8 -*-
#
# YANK documentation build configuration file, created by templating the MDTraj config file from
# sphinx-quickstart on Tue Jun 11 21:23:28 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present i... | andrrizzi/yank | docs/conf.py | Python | mit | 9,071 | [
"MDTraj"
] | 45dd9727300590eb617f1fd771aef2c70183cb28878c51f3dff77b5459b2ef67 |
"""
==================
Two-class AdaBoost
==================
This example fits an AdaBoosted decision stump on a non-linearly separable
classification dataset composed of two "Gaussian quantiles" clusters
(see :func:`sklearn.datasets.make_gaussian_quantiles`) and plots the decision
boundary and decision scores. The di... | chenyyx/scikit-learn-doc-zh | examples/zh/ensemble/plot_adaboost_twoclass.py | Python | gpl-3.0 | 3,333 | [
"Gaussian"
] | 395ea8cbb1817a25abc61386ced82956329f02f2aa8e415125d5b81d6adaceeb |
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Implements commands for running and interacting with Fuchsia on devices."""
import boot_data
import logging
import os
import pkg_repo
import re
import su... | nwjs/chromium.src | build/fuchsia/device_target.py | Python | bsd-3-clause | 14,347 | [
"Amber"
] | 9fd6fb3f8836bf4904a916b8b80aebadd4cccd7b1ccdbb2dd04bb207a618e652 |
#!/usr/bin/env python3
"""
Reports best match
* : best matching allele is not precise match
-nLV : best matching ST is n-locus variant
If an annotation column is provided (such as clonal complex) in the final column of the profiles
file, this annotation will be reported in column 2 of the output table.
Copyright... | katholt/Kleborate | kleborate/mlstBLAST.py | Python | gpl-3.0 | 11,439 | [
"BLAST"
] | 3e0d1e4058db41199256c74ebfa0846c3d5a0afed360f3fa90eabb4f74b0b9ff |
from tools.load import LoadMatrix
from sg import sg
lm=LoadMatrix()
traindat=lm.load_numbers('../data/fm_train_real.dat')
testdat=lm.load_numbers('../data/fm_test_real.dat')
trainlabel=lm.load_labels('../data/label_train_twoclass.dat')
parameter_list=[[traindat,testdat,trainlabel,10,2.1,1.2,1e-5,1e-2],
[traindat,tes... | AzamYahya/shogun | examples/undocumented/python_static/regression_svrlight.py | Python | gpl-3.0 | 959 | [
"Gaussian"
] | 8c0a529dbd67fde8967a53d0875d85fe420f8b2f644067d1d665a1de9f1e8c34 |
""" codecs -- Python Codec Registry, API and helpers.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import builtins, sys
### Registry and builtin stateless codec functions
try:
from _codecs import *
except ImportError as why:
... | Orav/kbengine | kbe/src/lib/python/Lib/codecs.py | Python | lgpl-3.0 | 37,066 | [
"FEFF"
] | 7e2749280a90abdc3067553b9d4914276181db2f5eafb2f8907433ff27d40d13 |
import os
import numpy as np
import ctypes as ct
# TO-DO: - add more kernels
# - add FFT tricks
# - automatic bandwidth estimation
class KDE(object):
"""
KDE in multi-dimensions.
"""
def __init__(self,samples=None,bandwidths=None,
KDEtypes=None, dll_path='./_khedive.so')... | rossfadely/khedive | khedive.py | Python | mit | 5,385 | [
"Gaussian"
] | f4ab94170fa1bbf7ee2970416d1f2f98296ac4bb5f5ad5d4bd867b4288930382 |
#!/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/ao2mo/test/bz_nr.py | Python | apache-2.0 | 2,470 | [
"PySCF"
] | 18caa60d8754a733035795a6430cfb87992c2a310fc2d45ed714cbc9755f607d |
# CREATED:2015-02-17 14:41:28 by Brian McFee <brian.mcfee@nyu.edu>
# this function is lifted wholesale from matploblib v1.4.2,
# and modified so that images are stored explicitly under the tests path
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import si... | r9y9/librosa | tests/mpl_ic.py | Python | isc | 12,171 | [
"Brian"
] | 0ba6339f331f6ad5d93445d1044c2bf3ac35dad639f11bd22c0c9677a9552712 |
# Copyright (c) 2015 OpenStack Foundation
#
# 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 ... | swiftstack/swift | swift/container/sharder.py | Python | apache-2.0 | 81,108 | [
"VisIt"
] | 849312d80fcbc8c07b2f0775f8341b11b376e51c58dc7fbe62454900162f5673 |
# CS669 - Assignment 2 (Group-2)
# Last edit: 28/10/17
# About:
# This program is for training text data of the color histogram feature vectors extracted from images.
import numpy as np
import math
import os
import random
dimension=64 # Dimension of data vectors.
K=3 # Value of K for making clu... | aayushm107/Bayes-Classifier-GMM- | src/py/train_images_non_overlapping_BoVW.py | Python | gpl-3.0 | 9,668 | [
"Gaussian"
] | 9aec279c8619bd60c2774e0ad6770d1011efe858606cac84c72680304043824f |
##################################################################################
#File: generate_graph.py
#Author: Onur Ozuduru
# e-mail: onur.ozuduru { at } gmail.com
# github: github.com/onurozuduru
# twitter: twitter.com/OnurOzuduru
#
#License: The MIT License (MIT)
#
# Copyright (c) 2016 Onur Ozuduru
# ... | onurozuduru/graph-of-likes | generate_graph.py | Python | mit | 7,131 | [
"VisIt"
] | f994672cd4c0a614edf8c85b1f9e201014b896bdc509af544fa62d9b2a7e794b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.