text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
#
# Copyright (C) STMicroelectronics Ltd. 2012
#
# This file is part of ATOS.
#
# ATOS 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 optio... | knochelh/atos-utils | atoslib/atos_graph.py | Python | gpl-2.0 | 20,364 | [
"Gaussian"
] | ef61905776d7e1d3b2527e9c650821c63eef7b13de2f085d5fb73b1bce308282 |
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~##
## ##
## This file forms part of the Badlands surface processes modelling companion. ##
## ... | badlands-model/pyBadlands-Companion | badlands_companion/stratalMesh.py | Python | gpl-3.0 | 4,103 | [
"VTK"
] | a2f210254c3caa295b2c52f6c1ca93b78a9125790dd356014eba61dc6f07fa9a |
import json
import os
from io import StringIO
from Bio import Entrez
Entrez.tool = "GalaxyEutils_1_0"
BATCH_SIZE = 200
class Client(object):
def __init__(self, history_file=None, user_email=None, admin_email=None):
self.using_history = False
self.using_parsedids = False
if user_email i... | martenson/tools-iuc | tools/ncbi_entrez_eutils/eutils.py | Python | mit | 13,566 | [
"Biopython"
] | 144354a9b2f68ad96d07a1f41735344ad891edd2d2aa4f67d86af24379120226 |
import sys
import numpy as np
import optparse
def mkgaussian(size, center=None,sig=None,theta=None):
x = np.arange(size*1.0)
y = x[:,np.newaxis]
if sig==None:
sig=(size/10,size/10)
elif isinstance( sig, ( int, long ) ) or isinstance( sig, ( float ) ):
sig=(sig,sig)
else:
a... | fedhere/fedsastroutils | mkgauss.py | Python | mit | 3,666 | [
"Gaussian"
] | 6ddf43b246e71514fa95af7df9539cf6fd294c21543a6a512e6b041d3dbcf90b |
#!/usr/bin/env python
import os
from optparse import OptionParser
from ase.io.trajectory import print_trajectory_info
from ase.io.bundletrajectory import print_bundletrajectory_info
description = 'Print summary of information from trajectory files.'
def main():
p = OptionParser(usage='%prog file.traj [file2.traj... | askhl/ase | ase/cli/info.py | Python | gpl-2.0 | 720 | [
"ASE"
] | 02a2e31bbe32135be090b632c206016ce7a125dc7718885ff1d273957812dd84 |
from __future__ import division, absolute_import, print_function
import collections
import re
import sys
import warnings
import operator
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d, transpose
from numpy.core.numeric import (
ones, zeros, arange, conc... | ryfeus/lambda-packs | Spacy/source2.7/numpy/lib/function_base.py | Python | mit | 170,032 | [
"Gaussian"
] | 4be3d8477e6b795391f7a52fe57f9e88b598abeb5d5f76f66bc4127b6d2323f0 |
#
# Copyright 2001 - 2016 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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
# (... | ospaceteam/outerspace | server/lib/ige/ospace/GameMngr.py | Python | gpl-2.0 | 26,932 | [
"Galaxy"
] | 4a226376cb1ada5d3eb63f7c74aa2235909b9a616e04b84d1873bf5841a78fda |
#!/usr/bin/env python -i
# preceding line should have path for Python on your machine
# mc.py
# Purpose: mimic operation of example/MC/in.mc via Python
# Syntax: mc.py in.mc
# in.mc = LAMMPS input script
from __future__ import print_function
import sys,random,math
# set these parameters
# make sure neigh s... | akohlmey/lammps | python/examples/mc.py | Python | gpl-2.0 | 2,730 | [
"LAMMPS"
] | 3610600e62a28fe77b85f2a76ad78100d94c682fdf6f7b0d31bc0511e551ed48 |
#!/usr/bin/python
#
# Copyright (c) 2009-2019 Emanuel Borsboom. See COPYING.txt for license.
#
# Produce formatted HTML for the tables for the year specified on the
# command-line.
#
# Usage example:
#
# ./year_html 2009 >2009.html
#
import sys
import time
import posix
year = int(sys.argv[1])
print '<html><head>... | borsboom/current-atlas-tables | year_html.py | Python | mit | 5,296 | [
"VisIt"
] | 8e8dc1eada35528b1b845b07bda0adeb7bcf749b00e3f65d41f91323c731e0b9 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | JWDebelius/scikit-bio | skbio/stats/_subsample/__init__.py | Python | bsd-3-clause | 466 | [
"scikit-bio"
] | 96e38c56c68d3e7beaa9051b49b122f4a1e5df1673b127d1401cf076576d3715 |
# Copyright (c) 2013-2015 University Corporation for Atmospheric Research/Unidata.
# Distributed under the terms of the MIT License.
# SPDX-License-Identifier: MIT
"""Support making data requests to the NetCDF subset service (NCSS) on a TDS.
This includes forming proper queries as well as parsing the returned data.
""... | dopplershift/siphon | siphon/ncss.py | Python | mit | 13,533 | [
"NetCDF"
] | 8d63f125cccead61896cc01ca8ec8e21144ae31568a60f6442a46756ee30ff59 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | googleapis/python-securitycenter | scripts/fixup_securitycenter_v1beta1_keywords.py | Python | apache-2.0 | 7,209 | [
"VisIt"
] | 4dc7e79d7c3a8f4ac19782d8c658f2c860e3bec9c34682b6fda7bd7556d0bbe7 |
"""Hyperion config flow."""
from __future__ import annotations
import asyncio
from contextlib import suppress
import logging
from typing import Any
from urllib.parse import urlparse
from hyperion import client, const
import voluptuous as vol
from homeassistant.components.ssdp import ATTR_SSDP_LOCATION, ATTR_UPNP_SER... | aronsky/home-assistant | homeassistant/components/hyperion/config_flow.py | Python | apache-2.0 | 20,049 | [
"VisIt"
] | 3eb26c3e9ce8971e82020759053e1b8b5729cd2cade87d98548e50f8173e9769 |
"""
Define the resolution functions for the data.
This defines classes for 1D and 2D resolution calculations.
"""
from __future__ import division
import unittest
from scipy.special import erf # type: ignore
from numpy import sqrt, log, log10, exp, pi # type: ignore
import numpy as np # type: ignore
__all__ = ["R... | SasView/sasmodels | sasmodels/resolution.py | Python | bsd-3-clause | 42,963 | [
"Gaussian"
] | c02890f0ed8c300b6a9b6b73ece407e7ec6e474f2c52a51dd3f72ab6cd0373f0 |
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Andrew I Baznikin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... | arunkgupta/gramps | gramps/plugins/rel/rel_hu.py | Python | gpl-2.0 | 10,835 | [
"Brian"
] | 3f5912c685d1b6fdcda57e6c8c0ed7ce3304ab2a657ce687c31b276fcd012c2e |
# This file is part of Merlin.
# Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen.
# Individual portions may be copyright by individual contributors, and
# are included in this collective work with permission of the copyright
# owners.
# This program is free software; ... | d7415/merlin | Hooks/target/editattack.py | Python | gpl-2.0 | 5,062 | [
"Galaxy"
] | d1a9f25ee51f0b87163daa38b4d398e12b1bab32dd8cfebd08b25c63a12a5109 |
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | kilon/pylivecoding | setup.py | Python | mit | 7,680 | [
"VisIt"
] | afac291e323818f6008bbc2cfc315ef03864d9289fbc6bd10d15b6e37d797361 |
#!/usr/bin/env python
# encoding: utf-8
"""
bed_from_genbank.py
grab the gene records from a genbank file (edit for other record types).
- requires: biopython
"""
from __future__ import division
import os
from sys import argv
def parse_fasta(filename):
s = open(filename)
header = ""
record = ""
inr... | KoenHoogendoorn1994/rosalind | 5.py | Python | gpl-3.0 | 1,593 | [
"Biopython"
] | 13427c6d9fac503fd61a6be66570470e3cfeecc096b5596f382205b04482c368 |
##########################################################################
# Ganga Project. https://github.com/ganga-devs/ganga
#
##########################################################################
from GangaCore.GPIDev.Schema import Schema, Version, SimpleItem
from GangaCore.GPIDev.Adapters.IVirtualization impo... | ganga-devs/ganga | ganga/GangaCore/Lib/Virtualization/Singularity.py | Python | gpl-3.0 | 6,647 | [
"DIRAC"
] | 3afe727c1fcaa8834d97c6d17914e94f1a15966ae4160eadc0141cc4fbe1105e |
# Copyright (c) 2016 Embedit Electronics
# Author: Brian Bradley
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | EmbeditElectronics/Python_for_PSoC | API_Python/pisoc/digital.py | Python | mit | 80,987 | [
"Brian"
] | 0f81358564429fbff7e9f9050b32c2eddc43a2f0e975faecb4c34fa6668908a2 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest
import json
import os
from monty.json import MontyDecoder
from pymatgen.analysis.defects.dilute_solution_model import *
import random
test_dir = os.pat... | gpetretto/pymatgen | pymatgen/analysis/defects/tests/test_dilute_solution_model.py | Python | mit | 4,730 | [
"pymatgen"
] | a44125b8646b809ff804824fb07defdc36779e35eec6c7c7e3d30d894c6da722 |
#!/usr/bin/env python
# /*******************************************************************
# * File: test_bulbchan.py
# * Description: Unittest for bulbchan
# * Author: Subhasis Ray
# * E-mail: ray dot subhasis at gmail dot com
# * Created: 2008-10-23 11:01:41
# ******... | BhallaLab/moose-thalamocortical | DEMOS/pymoose/channels/test_bulbchan.py | Python | lgpl-2.1 | 6,028 | [
"MOOSE"
] | 4ae95628aa8d062b5cbfc236c94d5b6c76dd9e2c283e37c7219b63097423c119 |
# Audio Tools, a module and set of tools for manipulating audio data
# Copyright (C) 2007-2016 Brian Langenberger
# 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 Licens... | tuffy/python-audio-tools | audiotools/cue/tokrules.py | Python | gpl-2.0 | 2,695 | [
"Brian"
] | 5b0febb6e0e7a6eaabecd3b05c3ece236ba436f83e50408f141a808bc73947ee |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@name: PyHouse/src/setup.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2019 by D. Brian Kimmel
@note: Created on Aug 3, 2013
@license: MIT License
@summary: This module is for Insteon
Permission is hereby grant... | DBrianKimmel/PyHouse | Project/setup.py | Python | mit | 6,279 | [
"Brian"
] | 92dd94b917ba731a1fcb5bf3ad2934fe0b867eb3b1561e803686a84824fcf93c |
import logging
import itertools
from typing import Tuple, List
import numpy as np
import scipy.stats.kde
from PyQt5 import QtWidgets, QtCore
from matplotlib.axes import Axes
from matplotlib.lines import Line2D
import matplotlib.cm
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT
f... | awacha/cct | cct/qtgui2/processingmain/outliertest.py | Python | bsd-3-clause | 11,189 | [
"Gaussian"
] | 038bf82509dca3e75303c8f4ed2c3fd247322b5c5546f25cdb621c84745ffe31 |
""" Module contains test fixtures meant to aide in the testing of jobs and
tool evaluation. Such extensive "fixtures" are something of an anti-pattern
so use of this should be limitted to tests of very 'extensive' classes.
"""
from collections import defaultdict
import os.path
import tempfile
import shutil
from galax... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/test/unit/tools_support.py | Python | gpl-3.0 | 5,926 | [
"Galaxy"
] | 158a13dc0d2fa57ded13498016e4afa6fce9a9aa5a9d1a25244814dfe80655be |
#!/usr/bin/env python
# coding=utf-8
"""490. Jumping frog
https://projecteuler.net/problem=490
There are n stones in a pond, numbered 1 to n. Consecutive stones are spaced
one unit apart.
A frog sits on stone 1. He wishes to visit each stone exactly once, stopping
on stone n. However, he can only jump from one stone... | openqt/algorithms | projecteuler/pe490-jumping-frog.py | Python | gpl-3.0 | 1,306 | [
"VisIt"
] | 36d4e846aa24ad6556a1a052c1e4275882a3f26a057683a33bc2921ab6afa764 |
"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | rvs/gpdb | src/test/tinc/tincrepo/mpp/models/test/sql_related/test_sql_test_case.py | Python | apache-2.0 | 21,626 | [
"ORCA"
] | 283a2dff17fd042cff76c996e7d7bab58761e3113ae494e3a792360c1057ce37 |
import os
import pip
import tempfile
import subprocess
import mdtraj.version
BUCKET_NAME = 'assaytools'
if not mdtraj.version.release:
PREFIX = 'latest'
else:
PREFIX = mdtraj.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()):
raise ImportError('The s3c... | MehtapIsik/assaytools | devtools/travis-ci/push-docs-to-s3.py | Python | lgpl-2.1 | 925 | [
"MDTraj"
] | e0d40d33dceee4943e6bb8a436805727dbd67a0e99c4158aa4478e5ed6d35182 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | SKIRT/PTS | modeling/reporting/component.py | Python | agpl-3.0 | 3,349 | [
"Galaxy"
] | fe356a3d4524d4342db593a39ab1362be7c197fc889cbb012d9af0e503dcdf8e |
from __future__ import division
from scipy.constants import *
import ase.units
mole = N_A
def convert(value, quantity, fromUnits, toUnits):
return unitSets[fromUnits][quantity]/unitSets[toUnits][quantity] * value
unitSets = {}
unitSets['ASE'] = dict(
mass = gram/mole,
distance = angstrom,
time = 1/ase.units.se... | csmm/multiase | multiasecalc/lammps/unitconversion.py | Python | gpl-2.0 | 1,495 | [
"ASE"
] | 03a753edecc4092b47ed9203bcbcfe73d31b87b66accaa99c57a559c7b9e3253 |
# -*- coding: utf-8 -*-
"""
Biological Boolean Networks
=================================
A series of biological Boolean networks that can be directly loaded for experimentation.
"""
# Copyright (C) 2021 by
# Alex Gates <ajgates42@gmail.com>
# Rion Brattig Correia <rionbr@gmail.com>
# Xuan Wang <xw47@indiana... | rionbr/CANA | cana/datasets/bio.py | Python | mit | 7,652 | [
"CDK"
] | 61ee43fbdfa5b0ca1fe327aa1f9a20e8edf423e27a26934a9bd5cd38812d88d8 |
import numpy as np
from geometry.point import Point
class DataGenerator(object):
@staticmethod
def generate_random_set(n=10, d=2, seed_value=431):
np.random.seed(seed_value)
points = np.random.rand(n, d)
return np.array([Point(i[0], i[1]) for i in points])
@staticmethod
def generate_normal_set(n=1... | nhonaitran/aries | utils/datagenerator.py | Python | gpl-2.0 | 596 | [
"Gaussian"
] | f67ed4e9eebe2b5b7ef6012a1ce527db420f13032a2a2118d12758a4f68f4bc1 |
"""
Support for the Amazon Polly text to speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts.amazon_polly/
"""
import logging
import voluptuous as vol
from homeassistant.components.tts import Provider, PLATFORM_SCHEMA
import homeassistan... | eagleamon/home-assistant | homeassistant/components/tts/amazon_polly.py | Python | apache-2.0 | 6,077 | [
"Brian"
] | 0d4508dfbc8f5ca64617c6c0ad221d7cacc7cbfc93ae96a6d8d87ac983cb899e |
"""
Do the initial configuration of a DIRAC component
"""
#
from DIRAC.ConfigurationSystem.Client.Helpers import getCSExtensions
from DIRAC.FrameworkSystem.Client.ComponentInstaller import gComponentInstaller
#
from DIRAC import gConfig
from DIRAC import exit as DIRACexit
__RCSID__ = "$Id$"
gComponentInstaller.exitOn... | Andrew-McNab-UK/DIRAC | tests/Jenkins/dirac-cfg-add-option.py | Python | gpl-3.0 | 1,559 | [
"DIRAC"
] | 98f959c337f5895feedae1e84a083bd156976b3e69a3461b9e2786641c52ea46 |
from instagram.client import InstagramAPI
import sys
if len(sys.argv) > 1 and sys.argv[1] == 'local':
try:
from test_settings import *
InstagramAPI.host = test_host
InstagramAPI.base_path = test_base_path
InstagramAPI.access_token_field = "access_token"
InstagramAPI.authori... | wcyz666/python-instagram | get_access_token.py | Python | bsd-3-clause | 1,281 | [
"VisIt"
] | 8a3e02e77c4781fc2382f2b0d97625088fec78ca18a90a564ef0d3def4ba24eb |
# BDB: A databank of PDB entries with full isotropic B-factors.
# Copyright (C) 2014 Wouter G. Touw (<wouter.touw@radboudumc.nl>)
#
# 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 Foundatio... | cmbi/bdb | pdbb/check_beq.py | Python | gpl-3.0 | 18,848 | [
"Biopython"
] | 234fc82aa34687815b27449d940c392a320adec2af290c855e485858aadc2afb |
#
#-*- coding:utf-8 -*-
"""
Gentoo-keys - cli.py
Command line interface module
@copyright: 2012-2015 by Brian Dolbec <dol-sen@gentoo.org>
@license: GNU GPL2, see COPYING for details.
"""
from __future__ import print_function
import os
import sys
from gkeys import __version__
from gkeys.base impor... | gentoo/gentoo-keys | gkeys/gkeys/cli.py | Python | gpl-2.0 | 1,763 | [
"Brian"
] | 3320a528ecb4fcf32693e1d48a272ec891063c85afb71c90152755286aa5bad3 |
#!/usr/bin/env python
"Update local HMDB database"
import os
import zlib
import sqlite3
import sys
import argparse
import urllib2
import zipfile
import StringIO
import base64
from rdkit import Chem, Geometry
from rdkit.Chem import AllChem, Descriptors
def version():
return '1.0'
def process_hmdb(args):
con... | NLeSC/MAGMa | pubchem/process_hmdb.py | Python | apache-2.0 | 8,464 | [
"RDKit"
] | 268c0f81edc2ebac93acfb376233c73b9d726c147a79a9143e2318cce2eddcc5 |
"""
:copyright: Copyright 2006-2016 by the PyNN team, see AUTHORS.
:license: CeCILL, see LICENSE for details.
"""
import logging
import numpy
import quantities as pq
import brian
from pyNN import recording
from . import simulator
mV = brian.mV
ms = brian.ms
uS = brian.uS
pq.uS = pq.UnitQuantity('microsiemens', 1e-6 ... | anupkdas-nus/global_synapses | pyNN-dispackgaes/brian/recording.py | Python | gpl-3.0 | 4,558 | [
"Brian"
] | a7cbc10a5f216b4007524473f15e0428e450c7e7bab93ee105b13ec838a782d0 |
import pymc
import TorsionScanSet
from chemistry.topologyobjects import DihedralType
import numpy as np
from simtk.unit import kilojoules_per_mole
class TorsionFitModel(object):
"""pymc model
Attributes:
----------
pymc_parameters: dict() of pymc parameters
parameters_to_optimize: list of tuples ... | hainm/Torsions | torsions/TorsionFitModel.py | Python | gpl-2.0 | 7,203 | [
"CHARMM",
"OpenMM"
] | 8824da080f395b193886aecebf305bbf747e0bd550c0c565270b11b9c28705b7 |
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | Multiscale-Genomics/mg-process-fastq | tool/aligner_utils.py | Python | apache-2.0 | 16,998 | [
"BWA"
] | 69fba9e118a3b4e168beaa9459f1d7ed70ffe1cb6677af7fa6829ef377a67d6f |
# Copyright 2002 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
from Bio.config.DBRegistry import CGIDB, DBGroup
from _support import *
prosite_expasy_cgi = ... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/dbdefs/prosite.py | Python | apache-2.0 | 723 | [
"Biopython"
] | 07cde6b8ef599a5884c5d4998d0f89079c882ad85e88f0f0a0c4bb5fc798b6c8 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | andrebellafronte/stoq | stoqlib/gui/test/test_calculator.py | Python | gpl-2.0 | 7,402 | [
"VisIt"
] | ace3f2b7bab528f47293d9691b57b0a37dcb3b0efd2532c59afc2108cb8f54c8 |
# Copyright (C) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek, James Forcier and Reed Koser
#
# 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 Licen... | sckasturi/saltlake | commands/choose.py | Python | gpl-2.0 | 1,491 | [
"MOE"
] | 9db2f2b4c959a5c8f9e97a27ec3567b89bca82ca1751b35f2b96bc3ec9950a4b |
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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... | platformio/platformio | scripts/docspregen.py | Python | apache-2.0 | 30,402 | [
"VisIt"
] | 5c6db0aa38a722afddc56faaa970ba354b1849f635b983cc94a16463a674a16d |
import sys
import DataProvidersAndConsumers
import Utilities
from Quartz import *
import Quartz
from LaunchServices import * # kUTType* constants
def drawJPEGImage(context, url):
# Create a Quartz data provider for the supplied URL.
jpgProvider = CGDataProviderCreateWithURL(url)
if jpgProvider is None:... | albertz/music-player | mac/pyobjc-framework-Quartz/Examples/Programming with Quartz/BasicDrawing/Images.py | Python | bsd-2-clause | 31,567 | [
"Jaguar"
] | dffb195246e5dbc4ca233b44643121f9642d026c05210c421304c9a7b7e3c82a |
# (C) British Crown Copyright 2010 - 2013, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | kwilliams-mo/iris | lib/iris/tests/__init__.py | Python | gpl-3.0 | 18,638 | [
"NetCDF"
] | 99bdbef8e1616f891debffa083b037c0538a0994f57a68e54e1fd399f524842a |
from math import *
from numpy import *
from moose import *
from kstest import *
_min = 0.0
_max = 1.0
def uniform_distrfn(x): # we cannot pass min and max as params because the ks test takes a single valued fn.
assert((_min <= x) and (_max > x))
return x/(_max - _min)
# This test does not pass - the KS-tes... | BhallaLab/moose-thalamocortical | pymoose/tests/randnum/uniformrng.py | Python | lgpl-2.1 | 4,050 | [
"MOOSE"
] | f803fa398122103a784c6e712bace0e5f5f79075dd6cd6e49434e2cb8078b0a1 |
#!/usr/bin/env python
"""Unit tests for the skbio.util.trie module"""
from __future__ import division
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is ... | Jorge-C/bipy | skbio/util/tests/test_trie.py | Python | bsd-3-clause | 7,395 | [
"scikit-bio"
] | aaa0cd88a73a0d18df9a4a25c398f89a86fe7969b0a56b105ed81aec7208b269 |
#!/usr/bin/env python
# coding: utf-8
# # Advanced: Distribution Propagation
#
# **NOTE**: support for distribution propagation was improved in the 2.3.25 release. Please make sure you have at least 2.3.25 installed.
# ## Setup
#
# Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment... | phoebe-project/phoebe2-docs | development/tutorials/distribution_propagation.py | Python | gpl-3.0 | 4,121 | [
"Gaussian"
] | 6d3fba341015def949b01bd031394095b0294ae2e4505964f9650983900dda1b |
import numpy
import scipy.ndimage as ndimage
from skimage import transform
def pyr_down(image, downscale=2, nyquist_attenuation=0.05):
"""Return an image downsampled by the requested factor.
Parameters:
image: numpy array
downscale: factor by which to shrink the image. 2 is customary.
... | zplab/zplib | zplib/image/pyramid.py | Python | mit | 2,028 | [
"Gaussian"
] | 8fa138a26291e58e7a60895eaa5f38bdefe57e4658821ca9da2c5c5911fe8879 |
"""Merge the NARR precip files to netcdf"""
import datetime
import os
import sys
import numpy as np
import pygrib
from pyiem import iemre
from pyiem.util import ncopen
def to_netcdf(valid):
"""Persist this 1 hour precip information to the netcdf storage
Recall that this timestep has data for the previous ho... | akrherz/iem | scripts/iemre/merge_narr.py | Python | mit | 1,278 | [
"NetCDF"
] | 18b0c5e2830e31689c02002fc50ae5eefaf4c28421b5b65e8acfa2bdaad9f95d |
# Authors: Jan Cholasta <jcholast@redhat.com>
#
# Copyright (C) 2014 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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 versi... | apophys/freeipa | ipaserver/install/ipa_cacert_manage.py | Python | gpl-3.0 | 16,686 | [
"VisIt"
] | 2428c0e7e479ea356d86e5e2e397e7381b74adcf7c59a7bd554b075c376e20ec |
# Copyright 2016 Uri Laserson
#
# 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 writing,... | lasersonlab/pepsyn | pepsyn/tests/test_codons.py | Python | apache-2.0 | 1,634 | [
"Biopython"
] | 74963138f43d17d4360702913ac44ef003b94bc31d67d0cf2593bb52df38aad7 |
##############################################################################
# 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... | EmreAtes/spack | var/spack/repos/builtin/packages/nccmp/package.py | Python | lgpl-2.1 | 1,949 | [
"NetCDF"
] | 9a4e5f93983e790d4b9ea9a6fce9300e434c612fc5cd6b9df13a1864acfc770c |
#!/usr/bin/env python
"""
fetch all data files for htsint
At least 20GB of free space is recommended
"""
import os,sys,subprocess,re,time,csv
from sys import platform as _platform
from htsint import __basedir__
from htsint import Configure
class DatabaseFetch(... | ajrichards/htsint | htsint/database/DatabaseFetch.py | Python | bsd-3-clause | 5,365 | [
"BLAST"
] | aa3c79af90ed0d74c239553ccb28971b143b3996939872e43ccecd7acfc2a04c |
"""
Quadratic Discriminant Analysis
"""
# Author: Matthieu Perrot <matthieu.perrot@gmail.com>
#
# License: BSD Style.
import warnings
import numpy as np
import scipy.ndimage as ndimage
from .base import BaseEstimator, ClassifierMixin
# FIXME :
# - in fit(X, y) method, many checks are common with other models
# ... | joshbohde/scikit-learn | sklearn/qda.py | Python | bsd-3-clause | 7,074 | [
"Gaussian"
] | 25a9822b9c7f1d54689ae3e002c89db8f9ec9d945d64ce80dd13e719a4d8b18c |
"""
Test case for the problem reported, tested and fixed on this post:
http://public.kitware.com/pipermail/vtk-developers/2008-August/005418.html
Without the fix as applied in the patch there, this code should crash on
exit.
"""
import vtk
class TestCase2 :
def __init__(self) :
self.Filter = vtk.vtkProgrammabl... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Common/Core/Testing/Python/TestExecuteMethodFinalizeCrash.py | Python | gpl-3.0 | 460 | [
"VTK"
] | cf30dbdf7e49b0f7eedd4687a41a2a4ecb229404672031d5e3c2f242a0288906 |
#!/usr/bin/env python
"""
This file contains Python code illustrating the creation and manipulation of
vtkTable objects.
"""
from vtk import *
#------------------------------------------------------------------------------
# Script Entry Point (i.e., main() )
#---------------------------------------------------------... | msmolens/VTK | Examples/Infovis/Python/tables2.py | Python | bsd-3-clause | 1,215 | [
"VTK"
] | 46e2476d540ac0cbaaefc23a94387498e382af9392b4c6f4108c3dcb2a396698 |
#!/usr/bin/env python
import os
import re
import sys
import glob
import numpy
import pickle
import configparser
from pyproj import Proj
from mayavi import mlab
SCALING = -3.
def plt_catalogue(filename):
"""
:parameter str filename:
"""
# Set projection
p1 = Proj(proj='aeqd')
# Load catalogu... | GEMScienceTools/oq-subduction | openquake/sub/plotting/plot_2pt5_model_mayavi.py | Python | agpl-3.0 | 1,890 | [
"Mayavi"
] | f350bb598e238eaf89932a6940aa11900a41b04d0b47ab3420f0178b6cce4502 |
########################################################################
# Author: Stuart Paterson
# eMail : Stuart.Paterson@cern.ch
########################################################################
""" The Watchdog class is used by the Job Wrapper to resolve and monitor
the system CPU and memory consumed... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/JobWrapper/WatchdogMac.py | Python | gpl-3.0 | 4,002 | [
"DIRAC"
] | b664799ee7a37f074591745668d900d41dc216a3ffd74e9b1b5aea04b7d0e0ed |
#!/usr/bin/python
import argparse
""" ChemPyType.py
A python module used to import the numerous and varying molecule file types.
Use within a python script:
import ChemPyType
fileName = "path/to/file.ext"
fileType = "supportedFileType"
molecule = ChemPyType.importMolecule(fileName,fileType)
Use wit... | josephtallison/ChemPyType | ChemPyType.py | Python | mit | 3,004 | [
"Gaussian"
] | 0af0fd9d989894170f8135c9e876ec0ea2bf58c1e8ae44bf16da6dd2bbca4634 |
# -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | chaluemwut/fbserver | venv/lib/python2.7/site-packages/sklearn/naive_bayes.py | Python | apache-2.0 | 19,853 | [
"Gaussian"
] | 0d298eee5a70662040947af49287e70140b3cd961ae300c70d9052b10044cb9a |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# 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 versi... | SNoiraud/gramps | gramps/gui/plug/report/_webreportdialog.py | Python | gpl-2.0 | 1,978 | [
"Brian"
] | 354ce99c0e31f13828ffe4d60925dacff399f2d511165d44d3ff7edbb7428e19 |
"""
The header specification for the message protocol
Copyright (c) 2009 John Markus Bjoerndalen <jmb@cs.uit.no>,
Brian Vinter <vinter@nbi.dk>, Rune M. Friborg <rune.m.friborg@gmail.com>.
See LICENSE.txt for licensing details (MIT License).
"""
import ctypes
from pycsp.parallel.const import *
# Bit patters fo... | runefriborg/pycsp | pycsp/parallel/header.py | Python | mit | 4,662 | [
"Brian"
] | 68fafaa687d831173e689018f688828c933ca8865b92cf1905f1c57342d52126 |
import rdflib
from rdflib import URIRef, Literal
from pyontutils import combinators as cmb
from pyontutils.core import OntId, OntTerm, qname
from pyontutils.core import simpleOnt, displayGraph
from pyontutils.namespaces import OntCuries, makeNamespaces
from pyontutils.namespaces import partOf, hasRole, locatedIn
from p... | tgbugs/pyontutils | nifstd/nifstd_tools/methods/__init__.py | Python | mit | 148,084 | [
"CRYSTAL",
"NEURON"
] | 3f6674e6d93d8fa586a592a3db54307b8a58331253b41366c3fd57bbba57a23f |
"""
Gaussian Smoothing
~~~~~~~~~~~~~~~~~~
Perform a Gaussian convolution on a uniformly gridded data set.
:class:`pyvista.UniformGrid` data sets (a.k.a. images) a can be smoothed by
convolving the image data set with a Gaussian for one- to three-dimensional
inputs. This is commonly referred to as Gaussian blurring a... | akaszynski/vtkInterface | examples/01-filter/gaussian-smoothing.py | Python | mit | 2,262 | [
"Gaussian"
] | d746205488cee39937d97aa1e04466a1acda2aeb6603965c952e6f7edfa49ce0 |
# -*- coding: utf-8 -*-
#
# test_inflow.py
# RAPIDpy
#
# Created by Alan D. Snow.
# Copyright © 2016 Alan D Snow. All rights reserved.
#
from datetime import datetime
from glob import glob
import multiprocessing
from netCDF4 import Dataset
from numpy.testing import assert_almost_equal
import numpy as np
import os
... | erdc-cm/RAPIDpy | tests/test_inflow.py | Python | bsd-3-clause | 39,496 | [
"NetCDF"
] | 806f07e2d74149c320a3c71f006665d8cc832571b2d129de654ec13713940ef7 |
""" NormalizeReturn adds return statement where relevant. """
from pythran.analyses import CFG, YieldPoints
from pythran.passmanager import Transformation
import gast as ast
class NormalizeReturn(Transformation):
'''
Adds Return statement when they are implicit,
and adds the None return value when not s... | pombredanne/pythran | pythran/transformations/normalize_return.py | Python | bsd-3-clause | 1,912 | [
"VisIt"
] | f7fed92cc7835e316aa6a8b9bde4752b188b084eaa0f1b301b33ffb31cea7f2e |
from collections import defaultdict
import os
import mod_utils
import gzip
import numpy as np
import math
from statsmodels.nonparametric.smoothers_lowess import lowess
import scipy.stats.mstats as mstats
class ModLib:
def __init__(self, experiment, experiment_settings, lib_settings):
"""
Construct... | borisz264/mod_seq | mod_lib.py | Python | mit | 48,864 | [
"Gaussian"
] | 3230e85979d3b3736e434b769c2b4dd323bcd80904316ac83d4e738f341efc70 |
import numpy as np
import random as rand
import sys, os
import copy
import pickle
from mpi4py import MPI
from pymatgen import Lattice, Structure, Element
from pymatgen.io.vasp import Poscar, VaspInput
from pymatgen.analysis.structure_matcher import StructureMatcher, FrameworkComparator
from pymatgen.apps.borg.hive imp... | skasamatsu/py_mc | examples/zro2_spch/zro2_spch.py | Python | gpl-3.0 | 3,992 | [
"VASP",
"pymatgen"
] | 5c0f06233de47aaaeffe39f9957c58c5ccc68234510c7fee6bf978dded8594bb |
#
# Copyright (C) 2013 UNIVERSIDAD DE CHILE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is dist... | chunicaa/uch-ultrasonic-anemometer | software/utilities.py | Python | gpl-3.0 | 1,157 | [
"NetCDF"
] | 4c02c21614679e33223fc5e3b097fa348142e37e9b901c614ff8f70868d011bc |
'''
Created on Aug 17, 2010
@author: Peter Harrington
peter.b.harrington@gmail.com
'''
from numpy import *
def cadf(inMatX, inMatY, p, nlags):
if (p < -1):
print "Error: p cannot be less than -1"
numObs = inMatX.shape[0]
if ((numObs - 2*nlags + 1) < 1):
print "Error nlags is too large in c... | burakbayramli/dersblog | tser/tser_030_coint/pyconometrics.py | Python | gpl-3.0 | 12,994 | [
"ADF"
] | 447f9f64efe6b37a8b33c562c05a3c19a68aab89c14b36f0e904bfef0245ef99 |
import linear_env
import sim_env
from actor import Actor
from critic import Critic
from replay_buffer import ReplayBuffer
import numpy as np
import tensorflow as tf
import keras.backend as kbck
import json
import time
import argparse
import matplotlib.pylab as plt
import os.path
def ou(x, mu, theta, sigma):
return ... | deot95/Tesis | Proyecto de Grado Ingeniería Electrónica/Workspace/RL/DDPG/ddpg.py | Python | mit | 16,268 | [
"Gaussian"
] | d6c22d1c80ee2367a1e3a9bf6bc7c8da9a525f69a3ff6de935c273b4339b7b75 |
# -*- coding: utf-8 -*-
"""
Unit tests for instructor.api methods.
"""
import datetime
import ddt
import random
import pytz
import io
import json
import os
import random
import requests
import shutil
import tempfile
from urllib import quote
from django.conf import settings
from django.contrib.auth.models import User
f... | olexiim/edx-platform | lms/djangoapps/instructor/tests/test_api.py | Python | agpl-3.0 | 162,006 | [
"VisIt"
] | 2599470907850615b7a61d1a67ff946cf593da226c07bba01863d83e72ae8d2e |
#!/usr/bin/env python
import os
import sys
import subprocess as sp
import argparse
if sys.version_info.major == 3:
PY3 = True
from urllib.request import urlretrieve
else:
PY3 = True
from urllib import urlretrieve
usage = """
The easy way to test recipes is by using `circleci build`. However this doe... | zachcp/bioconda-recipes | bootstrap.py | Python | mit | 4,380 | [
"Bioconda"
] | 70503e2c043753c448b35a76aa8b5f161d943c2d2a97d17ded9f6f95da166ca9 |
# Functionality exposed as an API
# Author: Evgeny Blokhin
__version__ = "0.8.0"
import os, sys
import re
from fractions import gcd
import inspect
import traceback
import datetime
import importlib
from functools import reduce
from numpy import dot, array
from tilde.core.common import u, is_binary_string, generate_... | ansobolev/tilde | tilde/core/api.py | Python | mit | 41,103 | [
"ASE",
"CRYSTAL"
] | 5157969fe4f9b8d300d6d36a2a19ce652a914c9d2d07d217890c0d87f040c54b |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
AIRPORTS = {
'MLC': { 'latitude':'34.883333', 'longitude': '-95.783333', 'name':'Mc Alester' },
'HEM': { 'latitude':'60.258333', 'longitude': '25.05', 'name':'Helsinki-malmi' },
'HEN': { 'latitude':'51.583... | sudhakargmail/botkitwebhooks | tools/airports.py | Python | mit | 920,906 | [
"ADF",
"ASE",
"BWA",
"CDK",
"COLUMBUS",
"CRYSTAL",
"Elk",
"MOE",
"MOOSE",
"TINKER"
] | 15c542b20e6fd47131dc137c270aa4813246bea91c80ca6d3336e29b5d7e56af |
import ocl
import camvtk
import time
import vtk
import datetime
import math
if __name__ == "__main__":
print ocl.version()
myscreen = camvtk.VTKScreen()
a = ocl.Point(0,1,0.3)
myscreen.addActor(camvtk.Point(center=(a.x,a.y,a.z), color=(1,0,1)))
b = ocl.Point(1,0.5,0.3)
myscreen.addActor(c... | JohnyEngine/CNC | opencamlib/scripts/waterline/waterline_0_onetriangle.py | Python | apache-2.0 | 3,500 | [
"VTK"
] | 782acb3774d12fb2d974d21cba06fce770f993434b471f9e50016528d9790a70 |
#!/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... | pli3/e2-openwbif | plugin/controllers/views/web/bouquets.py | Python | gpl-2.0 | 5,385 | [
"VisIt"
] | 4eabd12190831a683170e02666c6b694fa4b0bc9458c1e8e39f52a35ff26f07c |
import param
import numpy as np
import pandas as pd
from ..core import Operation, Element
from ..core.data import PandasInterface
from ..core.util import pandas_version
from ..element import Scatter
class RollingBase(param.Parameterized):
"""
Parameters shared between `rolling` and `rolling_outlier_std`.
... | basnijholt/holoviews | holoviews/operation/timeseries.py | Python | bsd-3-clause | 4,715 | [
"Gaussian"
] | 8f9eb738a600ab4628cf095576b41b3eef396aac05425c1b9fcab5b0c0df855d |
#!/usr/bin/python
"""
The MIT License (MIT)
Copyright (c) 2011 Poznan Supercomputing and Networking Center (PSNC)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including w... | damomeen/cli-from-datamodel | defaultCmd.py | Python | mit | 31,233 | [
"VisIt"
] | 547b3dc279e2daf6a6fcb08b84da9c163f756d5be95321517dcf2f1d05d218ad |
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# This work is licensed under the Creative Commons Attribution-NonCommercial
# 4.0 International License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
# Creative Commons, PO Box 1866, Mountain... | microsoft/DiscoFaceGAN | dnnlib/submission/__init__.py | Python | mit | 392 | [
"VisIt"
] | 110815c02054f96c6e55ac84f12ca62088fdff60610a52100ec43997d9b482fe |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
This module implements a EnergyModel abstract class and some basic
implementations. Basically, an EnergyModel is any model that returns an
"energy" for any... | migueldiascosta/pymatgen | pymatgen/analysis/energy_models.py | Python | mit | 5,623 | [
"GULP",
"pymatgen"
] | 9161883fd69a403853fb77d90c202ace4d68d17980a81b92be59ca4add134f43 |
import vtk
###############################################################################
# read obj file
#
obj_filename = '/mnt/data1/StandardBrain/SB/SB256.obj'
object = vtk.vtkOBJReader()
object.SetFileName(obj_filename)
objectSmoother = vtk.vtkSmoothPolyDataFilter()
objectSmoother.SetInputConnection(object.GetO... | neuroinformatics/bah2015_registration | vtk_test/draw_mothbrain.py | Python | mit | 4,285 | [
"VTK"
] | 08e00dc5e8d88f85cc2327b07cd5d16a96cc734b95db3bf1d049d95f43aa1b38 |
#
# Author: Adam Pridgen <adam@praetoriangrp.com>
# (C) 2010 praetorian group
# droid_gps.py - gps bridge for the android phone and GPSd or Kismet
from optparse import OptionParser
from socket import *
import android, sys, threading, traceback, time
from subprocess import *
from time import sleep
from ... | deeso/python_scrirpts | droid_gps.py | Python | apache-2.0 | 8,327 | [
"ASE"
] | a12e2aad5bb539f2c519fb4106ff14e887a2be9bdff7c1f0bb48bcbbf6d9e389 |
# 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.
#
"""Extract information from alignment objects.
In order to try and avoid huge alignment objects with tons of functions,
functions which return summa... | updownlife/multipleK | dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/Align/AlignInfo.py | Python | gpl-2.0 | 30,746 | [
"Biopython"
] | f7de6a1e64c44fd8d3fdfe10337274dbb3b3e49d2b538425976ed3da154252a2 |
'''
Multi-layer arc-cosine: Vectorized version
Note: The dot product of matrices in the kernel computation will eat up so much RAM
reducing the precision of float data is a nice option. A decomposed version
of the same is coming soon.
Author: Akhil P M
'''
from sklearn import svm, datasets
from sklearn.met... | akhilpm/Masters-Project | autoencoderDLKM/cifar10/arc_cosine.py | Python | mit | 4,293 | [
"Gaussian"
] | cc128b7a0cd7e22ef8eaf742dea99dcfcab10fbd2b377c78ad78a8fc1962dc56 |
import tensorflow as tf
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import random
import math
import scipy.stats as stats
np.random.seed(1234)
random.seed(1234)
def init_network(inputs, layers):
network = []
current_in = inputs
for l in layers:
layer = tf.Variable(-0.... | garibaldu/boundary-seekers | Boundary Hunter Ideas/TensorFlow/PerceptronNetwork.py | Python | mit | 3,754 | [
"MOE"
] | 60d4273676b1ca62676a44256dfb8b41b5186ecb53d4f6652be8dd0ae91a6901 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | wscullin/spack | var/spack/repos/builtin/packages/espressopp/package.py | Python | lgpl-2.1 | 3,323 | [
"ESPResSo"
] | 6a1cc0be2bf12335f25ac04f8bd2dc538d2b3ffb18ece903e60535c902a6f566 |
"""
Container page in Studio
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import Promise, EmptyPromise
from . import BASE_URL
from utils import click_css, confirm_prompt
class ContainerPage(PageObject):
"""
Container page in Studio
"""
NAME_SELECTOR = '.page-header-title'
... | UQ-UQx/edx-platform_lti | common/test/acceptance/pages/studio/container.py | Python | agpl-3.0 | 14,504 | [
"VisIt"
] | 78df7722c01b23282cfaea2cac76c21f3c0710309ba8869f98e894dfb5c8a795 |
'''
#
# This file is a part of Siesta Help Scripts GUI
#
# (c) Andrey Sobolev, 2013
#
Created on 03.04.2013
@author: andrey
'''
import os, paramiko
def getMount(path):
path = os.path.realpath(os.path.abspath(path))
while path != os.path.sep:
if os.path.ismount(path):
return path
... | ansobolev/shs | shs/gui/sshutils.py | Python | mit | 2,520 | [
"SIESTA"
] | ab91ec297b0ee60ea7b8b6a250473fca3419572a690d8a47a644131583390115 |
# -*- coding: utf-8 -*-
"""
Classes
-------
:class:`SGrid`
Simple grid class
:class:`Section`
Class for vertical sections
"""
# -----------------------------------
# Bjørn Ådlandsvik, <bjorn@imr.no>
# Institute of Marine Research
# Bergen, Norway
# 2010-09-30
# -----------------------------------
import numpy... | chiluf/roppy | roppy/sgrid.py | Python | mit | 6,540 | [
"NetCDF"
] | 1549524101ddb012889d57fd3f4add1911794bbfd4d79352c7197a9a9a379b7d |
#!/usr/bin/env python
################################################################################
# DATE: 2016/May/06, rev: 2016/July/11
#
# SCRIPT: magnitude_difference_flags.py
#
# VERSION: 2.0
#
# AUTHOR: Miguel A Ibarra (miguelib@ufl.edu)
#
# DESCRIPTION: This script takes a a wide format file and counts digit... | secimTools/SECIMTools | src/scripts/magnitude_difference_flags.py | Python | mit | 11,801 | [
"Galaxy"
] | 2abc656d4216ebb38f2a38239cab81d3b9899f76e612eab623f0adb5fc9efa3d |
"""
Author: Keith Schwarz (htiek@cs.stanford.edu)
Ported to Python by Dan Stromberg (strombrg@gmail.com)
An implementation of a priority queue backed by a Fibonacci heap, as described
by Fredman and Tarjan. Fibonacci heaps are interesting theoretically because
they have asymptotically good runtime guarantees for many... | dokren/SSSP | fheap.py | Python | mit | 23,278 | [
"VisIt"
] | d6fe4e0f2755943ab88422475d609a6790e41ce11e5fb112ac691341038e248a |
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google/weather-tools | weather_mv/loader_pipeline/sinks.py | Python | apache-2.0 | 4,026 | [
"NetCDF"
] | a7ee66384ab95f655e4a579c668aab488c466bd5c83da82cdf18d6cc97775b77 |
"""The suite of window functions."""
import operator
import warnings
import numpy as np
from scipy import linalg, special, fft as sp_fft
__all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall',
'blackmanharris', 'flattop', 'bartlett', 'hanning', 'barthann',
'hamming', 'kaiser',... | mdhaber/scipy | scipy/signal/windows/_windows.py | Python | bsd-3-clause | 79,078 | [
"Gaussian"
] | a32a795c7cde0cb13304145bdb01bffa5d3e8cd6d64d3d4e84ed2b060986c61e |
# $HeadURL$
__RCSID__ = "$Id$"
""" This backend just print the log messages through the standar output
"""
from DIRAC.FrameworkSystem.private.logging.backends.BaseBackend import BaseBackend
from DIRAC.Core.Utilities import LogColoring
class PrintBackend( BaseBackend ):
def doMessage( self, messageObject ):
msg ... | Sbalbp/DIRAC | FrameworkSystem/private/logging/backends/PrintBackend.py | Python | gpl-3.0 | 507 | [
"DIRAC"
] | b0801934a65f53a33ccb99c7ae2885bf49aa217a52b12cf1bd6eb591d06fe257 |
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013
# Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
SIZE_RANGES = ... | direvus/ansible | lib/ansible/module_utils/basic.py | Python | gpl-3.0 | 117,473 | [
"VisIt"
] | ccf0c6e5fc920ca900985a2595ea5bf43da9ecf1142767b53171b89c2bd73ff2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.