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 |
|---|---|---|---|---|---|---|---|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
from mock import MagicMock
import sys
mocked_gfal2 = MagicMock()
sys.modules["gfal2"] = mocked_gfal2
from DIRAC.Resources.Storage.GFAL2_XROOTStorage import GFAL2_XROOTStorage
class XROOTStora... | ic-hep/DIRAC | src/DIRAC/Resources/Storage/test/Test_GFAL2_XROOTStorage.py | Python | gpl-3.0 | 1,634 | [
"DIRAC"
] | 02e9d0c871a4e7fdff46f32df0d2379a39a5351a83c690b97496d369c6d5235c |
# Copyright 2013-2017, Brian May
#
# This file is part of python-alogger.
#
# python-alogger 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 ver... | Karaage-Cluster/python-alogger | alogger/parsers/sge.py | Python | gpl-3.0 | 4,571 | [
"Brian"
] | f9e89a28eb20b7644e4dde2625851ec9b6606ac5664c8c8859ce8c76c8f7c045 |
#!/usr/bin/env python3
# -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*-
# vim: set fileencoding=utf-8 filetype=python syntax=python.doxygen fileformat=unix tabstop=4 expandtab :
# kate: encoding utf-8; bom off; syntax python; indent-mode python; eol unix; replace-tabs off; indent-width 4; tab-... | DevynCJohnson/Pybooster | pylib/libchar.py | Python | lgpl-3.0 | 147,538 | [
"Bowtie"
] | 140f631a95b9e7e82c8d993ae2b0b603fc93a860bf68b113567f9b753844625e |
# -*- coding: utf-8 -*-
"""
Running MCMax and managing output from MCMax.
Author: R. Lombaert
"""
import os
import subprocess
from glob import glob
import cc.path
from cc.tools.io import DataIO, Database
from cc.modeling.codes.ModelingSession import ModelingSession
def readModelSpectrum(dpath,rt_spec=1,fn_spec=... | robinlombaert/ComboCode | cc/modeling/codes/MCMax.py | Python | gpl-3.0 | 30,175 | [
"MOPAC"
] | f58b430868712447a675a56b61e3ac094938e77c97a9489a4a9695d74155496b |
import pytest
import numpy as np
import xarray as xr
from glotaran.parameter import ParameterGroup
from glotaran.builtin.models.kinetic_image import KineticImageModel
def _create_gaussian_clp(labels, amplitudes, centers, widths, axis):
return xr.DataArray(
[amplitudes[i] * np.exp(-np.log(2) * np.square(2... | glotaran/glotaran | glotaran/builtin/models/kinetic_image/test/test_kinetic_image_model.py | Python | gpl-3.0 | 8,758 | [
"Gaussian"
] | 5c340ab27925a1af58d4b38c733f86dbdb885bf88bdb19545a1e652bc876f745 |
"""
Unit tests for masquerade.
"""
import json
import pickle
from datetime import datetime
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils.timezone import UTC
from mock import patch
from nose.plugins.attrib import attr
from xblock.runtime... | pepeportela/edx-platform | lms/djangoapps/courseware/tests/test_masquerade.py | Python | agpl-3.0 | 21,956 | [
"VisIt"
] | d730271636d954d49062c6d25dfce8e660c59ae067a8ddee38fbf7066aec5b19 |
'''
canny_write_image.py
Experiment with OpenCV for FITS files.
http://docs.opencv.org/trunk/doc/py_tutorials/py_tutorials.html
Author: S.T. Castle
Created: 20150226
'''
import numpy as np
import cv2
import os.path
#import fits-proc
from astropy.io import fits
def canny(name, orig_img, blockSize, c, t1, t2):
'... | castlest/shell-detection | fits-algs/canny-write-image-fits.py | Python | bsd-3-clause | 2,302 | [
"Gaussian"
] | 31fdb2fd69f4961d18be600ef1b83f1932fc47c1498cc825fea079038e1a7a12 |
import numpy as np
from astropy.modeling import models, fitting
__all__ = ["sinc_square_model", "sinc_square_deriv", "fit_sinc",
"fit_gaussian", "SincSquareModel"]
def sinc(x):
"""
Calculate a sinc function.
sinc(x)=sin(x)/x
Parameters
----------
x : array-like
Returns
... | pabell/stingray | stingray/pulse/modeling.py | Python | mit | 4,982 | [
"Gaussian"
] | 5b87f3bdebeaf40b9218f2c41671799c9dc86909a7d0487dff8472b0461c2dbd |
# -*- coding: utf-8 -*-
# Copyright (c) 2007, 2008, Benoît Chesneau
# Copyright (c) 2007 Simon Willison, original work on django-openid
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | samhoo/askbot-realworld | askbot/deps/django_authopenid/views.py | Python | gpl-3.0 | 49,359 | [
"VisIt"
] | f557c6dd3b5edd9387520b4cf97d44540e9177701e641fdebf808f63e4bc5056 |
# $Id$
#
# Copyright (C) 2003-2006 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.
#
""" Various storage (molecular and othe... | soerendip42/rdkit | rdkit/Dbase/StorageUtils.py | Python | bsd-3-clause | 6,994 | [
"RDKit"
] | 468c145372a59971a046b9f1a6d7b55925efd952dd8bcc44a856548a2de05d17 |
# (c) 2015, Brian Coca <bcoca@ansible.com>
# (c) 2012-17 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: url
author: Brian Coca (@bcoca)
versi... | rosmo/ansible | lib/ansible/plugins/lookup/url.py | Python | gpl-3.0 | 3,469 | [
"Brian"
] | 62405b20ff9de6182a9123bbe24db7f3d8a42eea4dd7a90e3a8131c1ddbb57f0 |
"""Helper methods of phonopy loader."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#
# This file is part of phonopy.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code m... | atztogo/phonopy | phonopy/cui/load_helper.py | Python | bsd-3-clause | 9,427 | [
"CRYSTAL",
"phonopy"
] | bcf58bd13bb9964b37c30fdc1fff4b5075df63612001af2da79d7d7477a2c96c |
#
# Copyright 2016 The BigDL 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 ... | intel-analytics/BigDL | python/orca/example/automl/autoxgboost/AutoXGBoostRegressor_spark_df.py | Python | apache-2.0 | 8,495 | [
"ORCA"
] | 4a238fb84df0f0ab594da72ce65e870e89f3388541d41d11f7de6283731678ba |
#-------------------------------------------------------------------------------
# Name: Py-Binger
# Purpose: Main application to be run to collect Bing Rewards points
#
# Author: TBrink
#
# Created: 25/09/2014
# Copyright: (c) TBrink 2014
# Licence: GPL2
#-------------------------------------... | TJbrunk/Py-BingeR | Py-BingeR.py | Python | gpl-2.0 | 7,830 | [
"VisIt"
] | c2679d4ac76ec799bddde63a028824f927940fde20ca3fc98ae0bf4c6ad57041 |
import os, sys
import vtktools
import numpy as np
import matplotlib as mpl
mpl.use('ps')
import matplotlib.pyplot as plt
import matplotlib.tri as tri
from paraview.simple import *
## READ archive (too many points... somehow)
label = sys.argv[1]
dayi = int(sys.argv[2])
dayf = int(sys.argv[3])
days = int(sys.argv[... | jungla/ICOM-fluidity-toolbox | 2D/P/plot_P_t.py | Python | gpl-2.0 | 3,602 | [
"ParaView"
] | 6d41cb93e4b52913c7df581acbae2cd03c733fcc5c4d784c8534edcbbf14eebc |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
########################################################################
# Solves problem 44 from projectEuler.net.
# Finds the tuple of triangular numbers whose addition and difference
# is a triangular number.
# Copyright (C) 2010 Santiago Alessandri
#
# This... | salessandri/programming-contests | project-euler/problem044.py | Python | gpl-3.0 | 1,672 | [
"VisIt"
] | 4826c45eee456b433e692d8126030d18acb790f7be42dfc79639beb28e8aae59 |
import bioparse
import time
# import json
from pprint import pprint
parser = bioparse.BioPython()
start_time = time.time()
# d = parser.genbank_to_dictionary(genbank_file="test_files/biopython/ls_orchid.gbk")
d = parser.genbank_to_dictionary(genbank_file="test_files/biopython/ls_orchid.gbk")
end_time = time.time()
#... | jmategk0/bioparse | bioparseTests.py | Python | mit | 1,316 | [
"Biopython"
] | 060649ece61c600490b7020bbf43bee64580931e196818e37bbbee4c807327c9 |
"""
General tools for dealing with ATAC-Seq data using Python.
@author: Alicia Schep, Greenleaf Lab, Stanford University
"""
import string
import numpy as np
import pysam
def get_sequence(chunk, fastafile):
"""obtain sequence for an interval
chunk: chunk object for which sequenceuence is to be fetched
... | GreenleafLab/NucleoATAC | pyatac/seq.py | Python | mit | 2,269 | [
"pysam"
] | 12a71738f6ae121b808e0af71098ee0ea7d22608b45374b954b96393b704f492 |
import ipaddr
from django.core.exceptions import ValidationError
from django.db import IntegrityError
from django.test import TestCase
from cyder.cydns.address_record.models import AddressRecord
from cyder.cydns.domain.models import Domain
from cyder.cydns.ip.models import ipv6_to_longs
from cyder.cydns.nameserver.na... | ngokevin/cyder | cyder/cydns/address_record/tests.py | Python | bsd-3-clause | 23,528 | [
"VisIt"
] | d07476f690d4317e21b6b8f09aa8af2f103f5165924b020106042e7b38379cbf |
#!/usr/bin/env python
"""
This program contains some predefined variables which hold the relative path for
data storage and experiment runs for each organisms in a workflow. The idea behind
this is to have a speed query to the organisms detailed informations, specifically
genome annotation file etc.
The program in... | vipints/genomeutils | signal_labels/experiment_details_db.py | Python | bsd-3-clause | 19,278 | [
"Biopython"
] | a5cc4d55fb182e5e3f7a9a090c32e239ab0c3efb4826988af48e8fdf30d06956 |
##############################################################################
# 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... | krafczyk/spack | var/spack/repos/builtin/packages/r-annotationdbi/package.py | Python | lgpl-2.1 | 1,935 | [
"Bioconductor"
] | 786b3f0c475810a8720183499f0d18f33a99daa15b29f98b51a948914be83e53 |
#
#@BEGIN LICENSE
#
# PSI4: an ab initio quantum chemistry software package
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later ver... | spring01/libPSI | lib/python/proc.py | Python | gpl-2.0 | 84,674 | [
"Psi4"
] | d3a51f43aa0dd2489f92a3a85effbd784d9c12760be9c36f85dc003e8c9ba85c |
import collections
import copy
import warnings
import numpy
import six
from chainer import cuda
from chainer import link as link_module
from chainer import serializer as serializer_module
from chainer import variable
def _sum_sqnorm(arr):
sq_sum = collections.defaultdict(float)
for x in arr:
with cu... | kiyukuta/chainer | chainer/optimizer.py | Python | mit | 26,387 | [
"Gaussian"
] | b6557cb59f7a9051e8def6717f7d5455d84009107093d8c2ad5d20e8be58c6c4 |
""" Contains a class used for evaluating policies for accessing jobs/WMS/pilots accounting
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Security import Properties
from DIRAC.Accountin... | ic-hep/DIRAC | src/DIRAC/AccountingSystem/private/Policies/JobPolicy.py | Python | gpl-3.0 | 3,638 | [
"DIRAC"
] | 7d92cb96184d84c2f12237d3d66e5f04d834906b36976413f6414a3ad8e73d06 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Downloads selected poems from theromantic.com and saves them to a text file.
This is just a quick hack, but it's licensed under the GNU GPL, either version
3 or, at your option, any later version; see the file LICENSE.md for details.
This code is copyright 2017 by Pat... | patrick-brian-mooney/LibidoMechanica | scrapers/theromantic.com.py | Python | gpl-3.0 | 3,526 | [
"Brian"
] | baecdc138cd9ead03ccfdcc1618537eda96427b04dd84da4c0e0000d2083d482 |
import __builtin__
from ast import *
class InstrumentTransformer(NodeTransformer):
def __init__(self):
self.expr_count = 0
super(InstrumentTransformer, self).__init__()
def visit_TryExcept(self, node):
"""Adds an uncatchable handler for RobotDeathExceptions"""
handler = self.ro... | trun/redux | redux/internal/instrumenter.py | Python | mit | 3,241 | [
"VisIt"
] | e81b577d841c5be23dfd05cc5f519cee670041216596a46632bc540537274d3b |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS Instructor Dashboard.
"""
import time
from flaky import flaky
from nose.plugins.attrib import attr
from bok_choy.promise import EmptyPromise
from ..helpers import UniqueCourseTest, get_modal_alert, EventsTestMixin
from ...pages.common.logout import LogoutPage
... | cognitiveclass/edx-platform | common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py | Python | agpl-3.0 | 41,242 | [
"VisIt"
] | 9acadf8f35bfaf5aa439ba36bbf709208381238a0520a8d66dd96ebc83965ef8 |
from contextlib import contextmanager
from datetime import datetime
from functools import wraps
import os
import random
import capybara
from capybara.compat import Hashable, ParseResult, urlparse
from capybara.driver.node import Node
from capybara.exceptions import ScopeError, WindowError
from capybara.node.base impor... | elliterate/capybara.py | capybara/session.py | Python | mit | 26,979 | [
"VisIt"
] | 13e4e2aee58dc5fbcd6fab53865f68a6e62a22d3a734581c22f1f05c7ab9b2d3 |
from __future__ import print_function
#!/usr/bin/python
# Copyright 2019 Google LLC
#
# This source file 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)... | hoglet67/ElectronFpga | pcb/max10_electron_ula.py | Python | gpl-3.0 | 67,788 | [
"Elk"
] | bc282ae3bb77522872adca89a17887c194ab652d3eb8180927ffd68e1c390c66 |
#!/usr/bin/python
import rospy
import node
class Friend(node.Robot):
'''
Class for Relative robot.
Inherits from Human class.
This and all other robot/human classes are similar as they all work
through inheritance
Friend is a friend of the resident. This is shown by the fact that the
Friend robot always turn... | swanndri/ROS-Healthcare-Simulator | se306/src/package1/scripts/friend.py | Python | mit | 649 | [
"VisIt"
] | c908d7b96f242e68f6b0416801d31e11c4cd5fd9147f3c21d097f44208fd4f66 |
"""
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://setuptools.readthedocs.io/en/latest/easy_install.html
"""
from glob import gl... | constKutsy/GeoWiki | .compit/lib/python3.6/site-packages/setuptools/command/easy_install.py | Python | unlicense | 85,951 | [
"VisIt"
] | d0b081386dd043d323761559d2eb3330c97934278da404b390b382976efbc01c |
#!/usr/bin/env python
'''
Created on Aug 10, 2009
@author: bud
'''
import logging
import logging.handlers
import optparse
import os
import sys
import atexit
import signal
import resource
import subprocess
from octopus.worker import make_worker, settings
from octopus.worker import config
def daemonize(username=""):... | mikrosimage/OpenRenderManagement | src/octopus/workerd.py | Python | bsd-3-clause | 5,783 | [
"Octopus"
] | 4611478bd154c0851a1ea8517c0bae8df2f72a2a89d3472f4d48855daef3aab3 |
#! /usr/bin/python
from Readwrite import Read_Write
import os,sys
from pyspglib import spglib
if len(sys.argv) < 2:
print
print "USAGE: reana.py poscars-n_file accurcy"
print " e.g.: reana.py poscars-4 0.2"
print
exit(0)
elif len(sys.argv) == 2 and os.path.isfile(sys.argv[1]):
acc = 0.2
... | zhongliliu/muse | tools/reana.py | Python | gpl-2.0 | 1,926 | [
"VASP"
] | c25c3a59cedd63b80edca3f2ae2b80a6be33161dae5df770371fc6449eb6a89b |
"""
Parser function parse() to parse the .bvec output file of Wannier90 (bvec matrices).
"""
from __future__ import print_function, unicode_literals
import inspect
import re
from collections import defaultdict
from . import show_output
def parse(fname):
"""
Open the file, parses it and return the values
... | paulatz/wannier90 | test-suite/tools/parsers/parse_bvec.py | Python | gpl-2.0 | 966 | [
"Wannier90"
] | cd79b411f4f12ae663a7b42f1eb3f2a0fd9916c4684df64c4e94f576eea1eba3 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Identities extractor for Ocean Items to Sorting Hat
#
# Copyright (C) 2015 Bitergia
#
# 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 versio... | sanacl/GrimoireELK | utils/o2s.py | Python | gpl-3.0 | 3,265 | [
"Elk"
] | 3980c25f2360b9f5166ae8811c31b4645842d1ab07edfec2c9912c3e5e7e7ab3 |
import time
import unittest
from selenium.webdriver.firefox.webdriver import WebDriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.action_chains import ActionChains
#
# User can modify these
#
LIVE_SERVER_URL = 'http://localhost:8009'
ADMIN_USERNAME = 'admin'
ADMIN_P... | macarthur-lab/xbrowse | functional_tests_using_selenium.py | Python | agpl-3.0 | 17,211 | [
"VisIt"
] | 64674fc3171259c53c9848ebae16bddf5affb6f48a81d75ab9519791b472284d |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import itertools
import numpy as np
from numpy.testing import assert_allclose
from ...tests.helper import pytest
from ..utils import discretize... | joergdietrich/astropy | astropy/convolution/tests/test_discretize.py | Python | bsd-3-clause | 6,212 | [
"Gaussian"
] | f920b9390c023d5e969a0c9ba8480dafb68f151a754fac59354474858375707d |
"""Support for control of ElkM1 outputs (relays)."""
from homeassistant.components.switch import SwitchEntity
from . import ElkAttachedEntity, create_elk_entities
from .const import DOMAIN
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Create the Elk-M1 switch platform."""
elk_data =... | jawilson/home-assistant | homeassistant/components/elkm1/switch.py | Python | apache-2.0 | 963 | [
"Elk"
] | 3a43f61fbd35edce22a4c0536822ffad50e8be724f7fcd2a4fc5711fb579d483 |
from ase import *
from ase.dft.kpoints import monkhorst_pack
from ase.lattice import bulk
from gpaw import *
from gpaw.test import equal
import numpy as np
from gpaw.mpi import serial_comm, size, rank, world
atoms = bulk('Al', 'fcc')
kpts = monkhorst_pack((4,4,4))
kpts += np.array([1/8., 1/8., 1/8.])
calc = GPAW(h=0.... | robwarm/gpaw-symm | gpaw/test/exx_acdf.py | Python | gpl-3.0 | 906 | [
"ASE",
"GPAW"
] | cc441bcd30a16279ca2285e6608fa32cf8e1194c5ec9bc6c56af626eafdefb98 |
# Autodetecting setup.py script for building the Python extensions
#
__version__ = "$Revision$"
import sys, os, imp, re, optparse
from glob import glob
from platform import machine as platform_machine
import sysconfig
from distutils import log
from distutils import text_file
from distutils.errors import *
from distu... | mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/setup.py | Python | mit | 97,661 | [
"VisIt"
] | 8dffb7d49e35edd051f285f9f1bd7b85b7799189a809d7d05eb6707d67874877 |
from __future__ import print_function
import os
import unittest
from rdkit.six.moves import cStringIO as StringIO
from rdkit import RDConfig
from rdkit.Chem import PandasTools
import numpy
import tempfile, shutil
import gzip
methane = """\
Methane
RDKit
1 0 0 0 0 0 0 0 0 0999 V2000
0.0... | soerendip42/rdkit | rdkit/Chem/UnitTestPandasTools.py | Python | bsd-3-clause | 6,052 | [
"RDKit"
] | b8b7b2228395920332599515df1b8d394bd723852e6d57b1a418cc0414f62be1 |
# 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/tutorials/test_11-ferrofluid_1.py | Python | gpl-3.0 | 1,338 | [
"ESPResSo"
] | 7169c58deb1bb1510c0e3eae88cba9d085e38a1832b0f2c55cfb7284fd64b904 |
import pandas as pd
from numpy import *
import matplotlib.pyplot as plt
import statsmodels.tsa.stattools as ts
from functions import *
""" This is an implementation of the examples 2.1 to 2.5 from Ernest chan's
book ALGORITHMIC TRADING - Winning Strategies and Their Rationale
"""
if __name__ == "__ma... | JavierGarciaD/AlgoRepo | EChanBook2/example_2_1.py | Python | apache-2.0 | 2,837 | [
"ADF"
] | 8199a14caa1d41c2805ce59e2a518ea959286656bcd979f20cddda5176b666aa |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Intensity-based image registration
"""
import numpy as np
import scipy.ndimage as nd
from ...core.image.image_spaces import (make_xyz_image,
as_xyz_image,
... | bthirion/nipy | nipy/algorithms/registration/histogram_registration.py | Python | bsd-3-clause | 20,687 | [
"Gaussian"
] | 5c0eda05caea9cef060c384b6e144d1f6ad0e7d8e96963aedd5430b1e77f4d1a |
import bob.ip.base
import numpy
import math
# create test image
image = numpy.zeros((21,21))
for i in range(21):
image[i,i] = 255
image[-i,i] = 255
# perform Gaussian filtering
gaussian = bob.ip.base.Gaussian(sigma = (3., 3.), radius = (5, 5))
smoothed = gaussian(image)
# plot results
from matplotlib import pypl... | tiagofrepereira2012/bob.ip.base | doc/plot/gaussian.py | Python | bsd-3-clause | 536 | [
"Gaussian"
] | 0f39cc43d4d432e7ca338e144877d5ed5320c2ddd8cf0f98d84e76c685f7f996 |
# Copyright (C) 2011 by Brandon Invergo (b.invergo@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.
import os
import subprocess
try:
from os.path import relpath as _relpath
except Impor... | bryback/quickseq | genescript/Bio/Phylo/PAML/_paml.py | Python | mit | 6,342 | [
"Biopython"
] | 382f361528740acd2a3eeb8fae76260c23b3b9c4cc82c12b1bc43a5363be03e4 |
import logging
from datetime import datetime
from google.appengine.ext import db
from gearshift import config
from gearshift.util import load_class
from gearshift.visit.api import BaseVisitManager, Visit
log = logging.getLogger("gearshift.visit.aevisit")
visit_class = None
class AppEngineVisitManager(object):
... | dbrattli/python-gearshift | gearshift/visit/aevisit.py | Python | mit | 2,036 | [
"VisIt"
] | 4714b8e68697c91fed89cd7189ff7c1acf9ee8928afd9575241ecfb12c2b0aad |
# Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
#
# 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... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/scripts/toolkits/Gecko/bookmarks.py | Python | gpl-3.0 | 10,756 | [
"ORCA"
] | 6f1d72d91c614d8b97ca33343d239bdddfcbb1a4118785e96530530f8f09207a |
__all__ = ["api"]
import time
import json
import functools
from nxtools import logging, log_traceback
from firefly.core.common import config, NebulaResponse
from firefly.common import CLIENT_ID
from firefly.objects import asset_cache
from firefly.version import FIREFLY_VERSION
from firefly.qt import (
QApplicati... | immstudios/firefly | firefly/api.py | Python | gpl-3.0 | 2,964 | [
"Firefly"
] | 5cb840c7706d75bb79ac17c0b8f054112839b7a120e33fc551a643532099f10c |
# -*- coding: utf-8 -*-
"""
.. note::
Functions for working with vtk
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import langmuir as lm
import numpy as np
import vtk
import os
def create_image_data(nx, ny, nz, dx=1.0, dy=1.0, dz=1.0, ox=0, oy=0, oz=0):
"""
Construct an empty vtkImageData. ... | LangmuirSim/langmuir | LangmuirPython/langmuir/vtkutils.py | Python | gpl-2.0 | 7,358 | [
"Gaussian",
"VTK"
] | ce68e70d1d5cb8922749d8f574d2ab0540dc2bc20bbdddbb0c29e06400d926a0 |
# encoding: utf-8
# 2009 © Václav Šmilauer <eudoxos@arcig.cz>
"""
Module for 2d postprocessing, containing classes to project points from 3d to 2d in various ways,
providing basic but flexible framework for extracting arbitrary scalar values from bodies/interactions
and plotting the results. There are 2 basic component... | ThomasSweijen/TPF | py/post2d.py | Python | gpl-2.0 | 13,914 | [
"Gaussian"
] | 0d82fc31c10bb6c251ec82c5184ec1ee2de99cf60cf1c4363299ef57043975cd |
#!/usr/bin/env python
# Generative Adversarial Networks (GAN) example in PyTorch.
# See related blog post at https://medium.com/@devnag/generative-adversarial-networks-gans-in-50-lines-of-code-pytorch-e81b79659e3f#.sch4xgsa9
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import t... | trhongbinwang/data_science_journey | deep_learning/pytorch/gan_pytorch.py | Python | apache-2.0 | 6,142 | [
"Gaussian"
] | a7daf3bd7b0dfcfc1deceffa5c297e46bbddea0ea5733d5cf6abf17943c8ec66 |
#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2014-2017 The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this s... | jasperges/blenderseed | properties/nodes/microfacet_brdf.py | Python | mit | 5,734 | [
"VisIt"
] | 3cbdccaac9366b888fe0d3bc322c3299ba264eb95ea6e3dbc70fa333566765e9 |
#!/usr/bin/env python
#JSON {"lot": "RKS/6-31G(d)",
#JSON "scf": "CDIISSCFSolver",
#JSON "er": "cholesky",
#JSON "difficulty": 4,
#JSON "description": "Basic RKS DFT example with GGA exhange-correlation functional (PBE)"}
import numpy as np
from horton import * # pylint: disable=wildcard-import,unused-wildcard-im... | QuantumElephant/horton | data/examples/hf_dft/rks_water_gga.py | Python | gpl-3.0 | 3,574 | [
"Gaussian"
] | 41006970972fd57d165920a57b34116dd77b144430ea2e616f8b1ea016d81d0d |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | hryamzik/ansible | lib/ansible/modules/network/avi/avi_cloudproperties.py | Python | gpl-3.0 | 3,784 | [
"VisIt"
] | aa76275a6fb3865bd3d1a021db2e90dfac2ba049fed4b8a9f1f1abe2abdd047d |
import time
from tornado import gen
# We change the import name otherwise sphinx tries
# to compile the tornado doc and fails
from tornado.ioloop import IOLoop as _IOLoop
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
from DIRAC.ConfigurationSystem.private.RefresherBase import Refr... | DIRACGrid/DIRAC | src/DIRAC/ConfigurationSystem/private/TornadoRefresher.py | Python | gpl-3.0 | 3,799 | [
"DIRAC"
] | dfb328fc81987c0c06d3d29f468350ab8be3f0f84bb5306e7f14f360bc63549a |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/e2openplugin-OpenWebif | plugin/controllers/views/web/servicelistplayable.py | Python | gpl-2.0 | 5,623 | [
"VisIt"
] | b1f5838dd8113897bbe7fd76bb13a92abf779283aa401eb643d2f819801c13b0 |
""" Python test discovery, setup and run of test functions. """
import fnmatch
import py
import inspect
import sys
import pytest
from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr
import _pytest
import pluggy
cutdir2 = py.path.local(_pytest.__file__).dirpath()
cutdir1 = py.path... | Carreau/pytest | _pytest/python.py | Python | mit | 80,858 | [
"VisIt"
] | 6ef31af0cc43c823368da009e89da2ee6a2f7056dd37dc5766cec81ce7ccc4f4 |
# This file is part of Invenio.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at ... | mvesper/invenio | modules/websearch/lib/websearch_webcoll.py | Python | gpl-2.0 | 56,895 | [
"VisIt"
] | a90deeefe6b5e5bfa19719fc005c6ad4fa3da9b879358b85e4699fa9343e69f1 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | Havate/havate-openstack | proto-build/gui/horizon/Horizon_GUI/horizon/base.py | Python | apache-2.0 | 29,556 | [
"VisIt"
] | 11d62ede93ab995e9eb386ac15f1e7288e77a216bdd124a096ed201b5e0cbeae |
"""
Test functions for stats module
"""
import warnings
import re
import sys
import pickle
import os
import json
import platform
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_array_almost_equal,
assert_allclose, assert_, a... | anntzer/scipy | scipy/stats/tests/test_distributions.py | Python | bsd-3-clause | 242,988 | [
"Gaussian"
] | 1f08304062a94c35704275ae9713cdf5acd156c5f1b2469f8f2af25d94c94feb |
#---------------------------------------------------------------#
# Project: Linear and Quadratic Discriminant Analysis with confidence ellipsoid
# Author: Kelly Chan
# Date: Apr 25 2014
#---------------------------------------------------------------#
print(__doc__)
import numpy as np
import pylab as pl
from scipy i... | kwailamchan/programming-languages | python/sklearn/examples/general/linear_and_quadratic_discriminant_analysis_with_confidence_ellipsoid.py | Python | mit | 5,057 | [
"Gaussian"
] | 789a6123bf1c48cbfec1ecbd38f0339492f1949535e5351b875c1c734eddbadc |
#
# QAPI command marshaller generator
#
# Copyright IBM, Corp. 2011
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Michael Roth <mdroth@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
from ordereddict import OrderedDict... | piyushroshan/xen-4.3.2 | tools/qemu-xen/scripts/qapi-commands.py | Python | gpl-2.0 | 12,058 | [
"VisIt"
] | 0f9eb14e788230187a9ed2956ad85439d8875b8b81278fd66dc929f61c40e20a |
#!/usr/bin/env python
#---------------- EDIT JOB NAME -------------------
#$ -N hopanalysis
#--------------------------------------------------
#$ -S /usr/bin/python
#$ -v PYTHONPATH=/home/oliver/Library/python-lib
#$ -v LD_LIBRARY_PATH=/opt/intel/cmkl/8.0/lib/32:/opt/intel/itc60/slib:/opt/intel/ipp41/ia32_itanium/shar... | iwelland/hop | doc/examples/hopanalysis.py | Python | lgpl-3.0 | 8,524 | [
"LAMMPS"
] | 59d7236c907ff1d0c715d2c635d87ce4df9573b1e8afdee7adcc44299a1104b1 |
"""Download data relevant to train the KittiSeg model."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import sys
import os
import subprocess
import zipfile
from six.moves import urllib
from shutil import copy2
import argparse
logging.... | MarvinTeichmann/KittiBox | download_data.py | Python | mit | 5,110 | [
"VisIt"
] | cab4f78076ee075c7ec4d23813e92913202f022539777ca7c4b31a146206e157 |
""" QualityGraph represents a Quality Map of entities as a special color schema
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phedex Project by ... <to be added>
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function... | yujikato/DIRAC | src/DIRAC/Core/Utilities/Graphs/QualityMapGraph.py | Python | gpl-3.0 | 7,260 | [
"DIRAC"
] | 08dd970207d90563d860088ab10ee52dc753b80d623eb7e2160bd5f82a940290 |
# -----------------------------------------------------------------------------
# Milky Way - Turn based strategy game from Milky Way galaxy
#
# URL: https://github.com/FedericoRessi/milkyway/
# License: GPL3
#
# pylint: disable=protected-access,redefined-outer-name,invalid-name
# ----------------------------... | FedericoRessi/milkyway | milkyway/ui/tests/test_new_game.py | Python | gpl-3.0 | 1,243 | [
"Galaxy"
] | e40f125b102ef45754b706e7ffaf1873366fbab3b050c2f7330ee493ed7e96c6 |
""" Threaded implementation of services
"""
__RCSID__ = "$Id$"
import os
import time
import re
import threading
import zipfile
import zlib
import DIRAC
from DIRAC.Core.Utilities.File import mkDir
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData, ConfigurationData
from DIRAC.Configura... | andresailer/DIRAC | ConfigurationSystem/private/ServiceInterface.py | Python | gpl-3.0 | 11,409 | [
"DIRAC"
] | 59a900eecff5c3448f778e0021f3b770bb55c2d4dd3db85cf03cc85d370cd8dc |
# -*- coding: utf-8 -*-
import pokerHandsClass
import pokerDoubleUp
def handName(hand_id):
if( hand_id == 11 ):
return u'役なし'
elif( hand_id == 10 ):
return u'ワンペア'
elif( hand_id == 9 ):
return u'ツーペア'
elif( hand_id == 8 ):
return u'スリーカード'
elif( hand_id ... | taiki3/grablu_casino | pokerReadGameData.py | Python | mit | 10,887 | [
"CASINO"
] | cc0cca15ef4391a2c0d81814027a3e4603fdf58519b6a13cbc4fd1d440d68c33 |
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
#
# trouble_codes.py
#
# Copyright (C) Ben Van Mechelen 2008-2009 <me@benvm.be>
#
# This file is part of Garmon
#
# Garmon 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... | bwhitelock/garmon-ng | garmon/trouble_codes.py | Python | gpl-3.0 | 113,580 | [
"Jaguar"
] | 0cac400eea69340e1957ae4507786eace07e0dc4e74afc01b523e6a604e0ad5e |
maneuver_descriptions = {
'Adamantine Bones' : {'level' : 8,
'school' : 'Stone',
'prereq' : 3,
'description' : """Initiation Action: 1 standard action
Range: Personal
Target: You
Duration: 1 round
You are an impenetrable tower of defiance on the battlefield. Attacking you is as
fruitless as striking a mou... | bagelbits/dnd-3.5-tools | class-specific/Crusader/assets/crusader_maneuvers.py | Python | gpl-2.0 | 57,873 | [
"BLAST"
] | 4a633705b4e48f82fb8a3614ef208a4bf813478e0d93970960ca5e992e9e1dc2 |
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2013 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License version 2... | dilawar/moose-full | moose-examples/snippets/gssaRDspiny.py | Python | gpl-2.0 | 10,865 | [
"MOOSE",
"NEURON"
] | 118405acaf2a0f83e4f65271cf28eb9c42487e521f6b0a5242afed1f512dc3c0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module contains classes to wrap Python VTK to make nice molecular plots.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "0.1"
__maintainer__ ... | dongsenfo/pymatgen | pymatgen/vis/structure_vtk.py | Python | mit | 46,835 | [
"Jmol",
"VTK",
"pymatgen"
] | 98a75d25d5fbcd9ccc81d822a6b6f26d789752a6c94984387d1599a3af84faaa |
import math
import numpy as np
import sys
import nnet
class NeuralNetworkLayer(object):
"""
A generic layer class meant to be derived, not instantiated.
"""
def __init__(self, output_size, pass_type="train"):
"""
This is where output_size and pass_type will be handled
:para... | RedFT/nnet | nnet/layer.py | Python | gpl-3.0 | 16,213 | [
"Gaussian"
] | 39c4273c4336e451f8cf737508c92c64f4d0a31f5e7cf006676a98eb3d20a883 |
import unittest
import pysam
from ..scripts import classify_mutations
from ..scripts.classify_mutations import classify_read
class ClassifyReadTestCase(unittest.TestCase):
def setUp(self):
self.mutation = classify_mutations.MutationLocation(reference='MB2059_pol', name='K65R', codon_start1=953, wt='K', m... | fhcrc/prepdrm | python/prep_drm/test/test_scripts_classify_mutations.py | Python | gpl-3.0 | 4,774 | [
"pysam"
] | 1135a83007a1e637b062cda3b2d0b76a9f0dbe1620136404c4469be82aba6dab |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Script to visualize the model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "2.0"
__maintainer__ = "David Waroquiers"
_... | gmatteo/pymatgen | dev_scripts/chemenv/strategies/multi_weights_strategy_parameters.py | Python | mit | 14,942 | [
"pymatgen"
] | 229e5ed6180ebce7c8655c62d7008cf9595e80730da83cff5bf9681f9dbf03ca |
#! /usr/bin/env python
'''
hmmerformat.py
takes input hmmscan output files and converts them to readable HTML
contact: jonathan.tietz@gmail.com
'''
# import modules
import csv, re, os, math, argparse, operator
from Bio import Entrez, Seq, SeqIO # BioPython
# input options
parser = argparse.Argum... | jtietz1/bioinf | hmmerformat.py | Python | gpl-3.0 | 7,227 | [
"Biopython"
] | e16c93ea6839c7ff776df817f157a4cdc81e28ba6b1febede566e5fd52553b34 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Löwdin population analysis."""
import random
import numpy
from cclib.method.population import Populatio... | berquist/cclib | cclib/method/lpa.py | Python | bsd-3-clause | 4,392 | [
"cclib"
] | 1605231defb6872443545c3c04d92a1f3deac8d20c660d3e9141a8fbd49eb6cf |
from sympy.core.basic import S, C, sympify
from sympy.core.function import Function
from sympy.ntheory import sieve
from math import sqrt
###############################################################################
######################## FACTORIAL and MULTI-FACTORIAL ########################
#####################... | mattpap/sympy-polys | sympy/functions/combinatorial/factorials.py | Python | bsd-3-clause | 12,073 | [
"VisIt"
] | 3eac7966293aeed4a57710bc7e17ed97756fc37403c9d4324971f8bc9b715133 |
#!/usr/bin/env python
# Copyright 2010 CAMd
# (see accompanying license files for details).
from optparse import OptionParser
import numpy as np
from ase.lattice.surface import fcc111, hcp0001, bcc110, bcc100, diamond111, \
add_adsorbate
from ase.structure import estimate_lattice_constant
from ase.data import ... | alexei-matveev/ase-local | ase/utils/adsorb.py | Python | gpl-2.0 | 6,528 | [
"ASE",
"CRYSTAL"
] | 5bdc04e9fc1fd68629ee873208d5af7b8880b7bb5a31834c49256064d8c94fd9 |
# Copyright 2015 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... | google/yapf | yapf/pytree/pytree_visitor.py | Python | apache-2.0 | 4,528 | [
"VisIt"
] | 2ed04fefbe77604017c45f2f6725e19b4003e6d4e61d144825f510f3400186f3 |
import os.path
from pyneuroml.lems.LEMSSimulation import LEMSSimulation
import shutil
import os
import logging
from pyneuroml.pynml import read_neuroml2_file, get_next_hex_color
import random
import neuroml
logger = logging.getLogger(__name__)
def generate_lems_file_for_neuroml(
sim_id,
neuroml_file,
t... | NeuroML/pyNeuroML | pyneuroml/lems/__init__.py | Python | lgpl-3.0 | 15,161 | [
"NEURON"
] | 3bb0848d1093859d4961830e8790416dc8f5627678145055c39f5bed3657d81d |
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.postgres.fields.ranges import FloatRangeField
from geomat.stein.fields import ChoiceArrayField
from stdimage.models import StdImageField
from mptt.models import ... | GeoMatDigital/django-geomat | geomat/stein/models.py | Python | bsd-3-clause | 10,931 | [
"CRYSTAL"
] | 9956a4e8064e17648513fd4b39bd9bfbd3b16076510625b1f39981e617b61342 |
#!/usr/bin/env python
# -*- coding: ASCII -*-
"""
Merge/Adapter trim reads stored in BAM
:Author: Martin Kircher
:Contact: mkircher@uw.edu
"""
import sys
import os
import math
import pysam
from optparse import OptionParser,OptionGroup
import string
table = string.maketrans('TGCAMRWSYKVHDBtgcamrwsykvhdb','ACGTKYWSR... | shendurelab/cfDNA | FilterUniqueBAM.py | Python | mit | 24,806 | [
"pysam"
] | b336c26c5edd3e5f6fdfab09bd16f7f1f552053157f4ee33e56f18575c1f4a3b |
import numpy as np
from matplotlib import pyplot
from spm1d import rft1d
def here_hotellingsT2_2samp(yA, yB):
NA,NB = float(yA.shape[0]), float(yB.shape[0])
N = NA + NB
mA,mB = np.matrix(yA.mean(axis=0)), np.matrix(yB.mean(axis=0))
T2 = []
for ii,(mmA,mmB) in enumerate(zip(mA,mB)):
yyA,yyB = np.... | 0todd0000/spm1d | spm1d/rft1d/examples/val_max_6_twosample_T2_1d.py | Python | gpl-3.0 | 2,060 | [
"Gaussian"
] | 7a653bf20a75bdaa8c5d179e10b1e4aea1d6ec501470fca07817a3118dba1125 |
'''
Convenience module for setting up visualization pipelines for Paraview through python scripts.
'''
import woo
import woo.dem
import logging
def findPV():
'Find Paraview executable in the system. Under Windows (64bit only), this entails searching the registry (see `this post <http://www.paraview.org/pipermail/... | sjl767/woo | py/paraviewscript.py | Python | gpl-2.0 | 19,419 | [
"ParaView",
"VTK"
] | 5d5a4c7d5eece171ff6da9aa70e48072237272e8642c1229a3589c91be773931 |
"""
Unit tests for masquerade.
"""
import json
import pickle
from mock import patch
from nose.plugins.attrib import attr
from datetime import datetime
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils.timezone import UTC
from capa.tests.response_xml_factory import OptionR... | fintech-circle/edx-platform | lms/djangoapps/courseware/tests/test_masquerade.py | Python | agpl-3.0 | 19,822 | [
"VisIt"
] | 30236f17a1e7140b2dbe40142520592896a735936135ef987f62aa3a508c1b56 |
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 14 10:10:41 2017
@author: Mike
"""
#General
import numpy as np
import pandas as pd
import random
from itertools import islice, chain
from random import randint
from time import strftime
import time
import pickle
from os import makedirs,path
import warnings
#PGMs
import ... | MikeDT/CNN_2_BBN | ML_Comparison.py | Python | apache-2.0 | 21,528 | [
"Amber"
] | 2110acc9c71166eed5afb53ae5c92e601b97a6ed5a2ec7a47e2577a0fe55ff27 |
#!/usr/bin/python
# 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.
#
# Ansible is distributed... | 47lining/ansible-modules-core | cloud/amazon/ec2_elb_lb.py | Python | gpl-3.0 | 26,584 | [
"Dalton"
] | 282c51ebf5581711e2ba2dcc3c049b05fc70ab19fe13327b11e7138976b4b8fe |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Scaled_Features/best_kNN_PCA/2_categories/test11_cross_validate_categories_mov_fixed_1200ms_scaled_method_iv.py | Python | mit | 5,011 | [
"Mayavi"
] | 2ad73157542a8f4479b78d8a45a27f04364b586cf7bec8dd834d385600cf9857 |
##---------------------------------------------------------------------------
# P1_conv_ncdf.py
# G.Urbancic
#
# Takes NetCDF files produced by R1_conv_ncdf:
# (1) Determines- "great days", (largest % NaN/ min) < 1%
# - "good days" , 1% < (largest % NaN/ min) < 5%
# - "prob days"... | GUrbancic/ABOA_gust | P1_conv_ncdf.py | Python | mit | 2,466 | [
"NetCDF"
] | 716b69f83b267a7bc6dd7bce65b5d77328af12b2440602c25682bdc87f801d10 |
def writePDB(V, atom_names, atom_coords, filename):
# #####################################################
#
# Function to write ESP and error in ESP to a pdb file,
# that can be visualized in VMD.
#
# V is the points where to the ESP have been calculated.
# V is saved in the pdb as the ato... | peter-reinholdt/propertyfit | writePDB.py | Python | gpl-3.0 | 4,395 | [
"VMD"
] | 1f541106f7f43932f553c0304b02a02f394e323a24da47415ea9b5805e2082fe |
#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove ... | gratefulfrog/lib | python/chempy/water_amber.py | Python | gpl-2.0 | 1,100 | [
"PyMOL"
] | 3632399b5a27da66c53ce06dd4abda5797d2affb1f6138f6bdef95d0bb7d30e0 |
"""
OpenCL nodes supported by ctree.
"""
from ..nodes import CtreeNode
from ..nodes import File
import hashlib
class OclNode(CtreeNode):
"""Base class for all OpenCL nodes supported by ctree."""
def codegen(self, indent=0):
"""generate ocl code for this node"""
from ctree.ocl.codegen import ... | alphaFred/Sejits4Fpgas | sejits4fpgas/src/vhdl_ctree/ocl/nodes.py | Python | gpl-3.0 | 1,892 | [
"VisIt"
] | c9177c983d5c0548926b6503c3e6ed130c3788976cb57f8bff1af1dd9dc475ff |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | intel-analytics/analytics-zoo | pyzoo/zoo/examples/orca/learn/horovod/pytorch_estimator.py | Python | apache-2.0 | 6,101 | [
"ORCA"
] | 233c26f6280f565c2c6d32dd3aa7138db5ef40375fffb607e030a27f5b305f4a |
# Copyright 2017-2020 The GPflow Contributors. 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 appli... | GPflow/GPflow | gpflow/likelihoods/scalar_continuous.py | Python | apache-2.0 | 7,123 | [
"Gaussian"
] | 511cad0b447f74e9a426ce94268aaf0e683cc8b321e1828e36c856a3dd01b993 |
""" RHEAS module for retrieving the CMORPH rainfall data (daily mean morphed) stored
at the IRI Data Library.
.. module:: cmorph
:synopsis: Retrieve CMORPH rainfall data
.. moduleauthor:: Kostas Andreadis <kandread@jpl.nasa.gov>
"""
from datasets.decorators import netcdf
from datetime import timedelta
import... | nasa/RHEAS | src/datasets/cmorph.py | Python | mit | 1,170 | [
"NetCDF"
] | a137e9fef90222de7bab6ee7fb8a3915dfbd7bfb3e97e910df0bd5781210c3c5 |
#!/usr/bin/env python
# The script estimates a gaussian convolution kernel
# to degrade an image from its original to a worse
# target seeing. The width of the kernel is determined
# with the assumption that stellar objects can be
# described by Gaussian profiles. This turned out
# to be valid if the two seeings are n... | deapplegate/wtgpipeline | create_gausssmoothing_kernel.py | Python | mit | 5,046 | [
"Gaussian"
] | 3a68e1d15a3ff8963ff08fca7b1c2f56184205fe55db22b2d0c74169de416d3a |
#
# example of using xraylib to get crystal data
#
# see:
# http://dx.doi.org/10.1016/j.sab.2011.09.011 (paper)
# https://github.com/tschoonj/xraylib/ (code)
# http://lvserver.ugent.be/xraylib-web (web interface, but crystals not included!)
#
#
# import block
#
import xrayl... | srio/spl-pgk | xpowder.py | Python | mit | 50,261 | [
"CRYSTAL",
"Gaussian"
] | a76e35c4bbf6cb5eeecf3a3807f466409da42cf6fc3ffa4591497ef90e9f4c2b |
"""
Stockholm format (:mod:`skbio.io.format.stockholm`)
===================================================
.. currentmodule:: skbio.io.format.stockholm
The Stockholm format is a multiple sequence alignment format (MSA) that
optionally supports storing arbitrary alignment features (metadata). Features
can be placed i... | gregcaporaso/scikit-bio | skbio/io/format/stockholm.py | Python | bsd-3-clause | 29,559 | [
"scikit-bio"
] | 8df0147113592273d75a13a0820a2dffbf58bc165d49b9ded0fb653d254c81da |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.