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
########################################################################
# File : dirac-wms-job-logging-info
# Author : Stuart Paterson
########################################################################
"""
Retrieve history of transitions for a DIRAC job
Example:
$ dirac-wms-job-loggi... | ic-hep/DIRAC | src/DIRAC/Interfaces/scripts/dirac_wms_job_logging_info.py | Python | gpl-3.0 | 2,864 | [
"DIRAC"
] | a67685fc9e1d32781a3af28a1f7b6a42cdb3e3715e05d0afcd10a79915ecb12f |
# -*- coding: utf-8 -*-
# Copyright (C) Brian Moe (2013-2014), Duncan Macleod (2014-)
#
# This file is part of LIGO CIS Core.
#
# LIGO CIS Core 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 ... | lscsoft/cis.server | cisserver/management/functions.py | Python | gpl-3.0 | 7,459 | [
"Brian",
"MOE"
] | 30ee962cd22f9d985782595532fd003f658874a64d0c96e8aaca3919ca651054 |
# encoding = utf-8
''' This script aims to automatically remove baseline and fit spectroscopic
data. It uses the curve_fit function from scipy.optimize module, and
provides fits for Gaussian and Lorentzian spectra lineshapes.
This is a simplied version from the ambitious AutoSpectraFit.py which
attempts to auto recogn... | luyaozou/PySpec | sflib.py | Python | gpl-3.0 | 16,037 | [
"Gaussian"
] | 698599256793daebe89de6043277fa826f3800dee21cec60f57fa92c4af183dd |
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
import urllib
from lettuce import world
from django.contrib.auth.models import User
from student.models import CourseEnrollment
from xmodule.modulestore.django import modulestore, clear_existing_modulestores
from xmodule.contentstore.django imp... | beni55/edx-platform | common/djangoapps/terrain/course_helpers.py | Python | agpl-3.0 | 2,521 | [
"VisIt"
] | de06582987c3551ce161b00fb349881d35809120c49f271ad2f9bdf90362b64d |
from __future__ import (absolute_import, division, print_function)
from mantid.simpleapi import CreateWorkspace, GroupWorkspaces
from mantid.kernel import *
from mantid.api import *
import numpy as np
import scipy.constants as sc
import ast
import fnmatch
import re
import os
FUNC_NAME_REGEX = re.compile(r'#\s+variabl... | wdzhou/mantid | Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii1D.py | Python | gpl-3.0 | 9,287 | [
"Gaussian"
] | 0a0c42923b3c099c255e8976fd8d5f9f297b76cecd1eca8abbb12b6cfc4b190c |
# Copyright 2004-2008 by Sebastian Bassi.
# 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.
"""Calculate the thermodynamic melting temperatures of nucleotide sequences."""
impor... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/SeqUtils/MeltingTemp.py | Python | gpl-2.0 | 6,401 | [
"Biopython"
] | e4264cdbc43ca9e42603d5fbee1c6572ec3b270f0d89011d37ed126bcdbb6339 |
from functools import partial
import re
import logging
import lib.visit as v
import lib.const as C
from .. import util
from ..meta import methods, class_lookup
from ..meta.template import Template
from ..meta.clazz import Clazz
from ..meta.method import Method
from ..meta.field import Field
from ..meta.statement impo... | plum-umd/pasket | pasket/decode/adapter.py | Python | mit | 4,384 | [
"VisIt"
] | 225f15eb147b98ffe1fb95664021b0d8cf55c75b4e678a4834ece2c717c6b384 |
"""
Acceptance tests for Studio's Setting pages
"""
import re
import uuid
from .base_studio_test import StudioCourseTest
from ...pages.studio.settings_certificates import CertificatesPage
from ...pages.studio.settings_advanced import AdvancedSettingsPage
class CertificatesTest(StudioCourseTest):
"""
Tests for... | simbs/edx-platform | common/test/acceptance/tests/studio/test_studio_settings_certificates.py | Python | agpl-3.0 | 12,265 | [
"VisIt"
] | dc08179a8124a554adff4141689da83884103eb061fed720edd4eef2ac069a8a |
from math import ceil
from random import randint
from Crypto.Hash import SHA256
from zlib import crc32
from htsohm.db import Material
from htsohm.structure import Structure, LatticeConstants, AtomSite, AtomType
def get_n_digit_seed(n):
range_start = 10 ** (n - 1)
range_end = (10 ** n) - 1
return randint(... | akaija/HTSOHM-dev | htsohm/pseudomaterial_generator/random.py | Python | mit | 6,189 | [
"CRYSTAL"
] | 11c7e5accd4ff38076908ee4799d6d998958bd243c676abfebc749d362590156 |
"""
@name: /home/briank/workspace/PyHouse/Project/src/Modules/House/Family/Reolink/reolink_device.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2019 by D. Brian Kimmel
@license: MIT License
@note: Created on Jan 26, 2020
@summary:
"""
__updated__ = '2020-01-26'
__... | DBrianKimmel/PyHouse | Project/src/Modules/House/Family/Reolink/reolink_device.py | Python | mit | 1,201 | [
"Brian"
] | 22cd5322bff64bc3808c1409eae63c2565af3a77784441508a0d2bda78c77182 |
#!/usr/bin/env python
# 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.
"""Run a set of PyUnit-based regression tests.
This will find all modules whose name is "test_*.py" in the test
directory, and ru... | updownlife/multipleK | dependencies/biopython-1.65/Tests/run_tests.py | Python | gpl-2.0 | 17,455 | [
"BLAST",
"Biopython"
] | 0cf5829dc61da415a55d31a63f2bb7fe582776544c17ac86d39fb40537fad4f9 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/cc/test/test_rccsd.py | Python | apache-2.0 | 16,942 | [
"PySCF"
] | 3833d6f44fdc3242c1a302babc2e213b6a84141c14a2181fb0c72090479551d8 |
"""
This example shows how to use the post_process_hook and probe_hook options.
Use it as follows (assumes running from the sfepy directory; on Windows, you
may need to prefix all the commands with "python " and remove "./"):
1. solve the problem:
./simple.py examples/linear_elasticity/linear_elastic_probes.py
2... | olivierverdier/sfepy | examples/linear_elasticity/linear_elastic_probes.py | Python | bsd-3-clause | 6,292 | [
"VTK"
] | c909850641117d69c2484a1bcb29bb68cb3ea39969f560d28bcfd23d42cb7b11 |
# coding: utf-8
"""Test mdn.scrape."""
from __future__ import unicode_literals
from json import dumps
from mdn.models import FeaturePage
from mdn.scrape import (
narrow_parse_error, scrape_page, scrape_feature_page, PageExtractor,
PageVisitor, ScrapedViewFeature)
from mdn.kumascript import kumascript_grammar
f... | renoirb/browsercompat | mdn/tests/test_scrape.py | Python | mpl-2.0 | 36,404 | [
"VisIt"
] | d94cddd7e623bb9c49ba718b918c782c54defd913809f3e210a6e44319d272d3 |
import ast
from collections import ChainMap
from dataclasses import dataclass, field
from functools import singledispatch
from typing import ChainMap as CM
from typing import Iterator, List, Optional, Tuple, Type
from breakfast.position import Position
from breakfast.source import Source
from tests import make_source... | thisfred/breakfast | tests/test_attempt_6.py | Python | bsd-2-clause | 7,319 | [
"VisIt"
] | 859150bbecb3dab49d7e9cafd5275802e0cbf210760d908408d329ffe435af22 |
#!/galaxy/home/mgehrin/hiclib/bin/python
"""
Read a wiggle track and print out a series of lines containing
"chrom position score". Ignores track lines, handles bed, variableStep
and fixedStep wiggle lines.
"""
import psyco_full
import sys
import bx.wiggle
if len( sys.argv ) > 1: in_file = open( sys.argv[1] )
else:... | bxlab/HiFive_Paper | Scripts/HiCLib/bx-python-0.7.1/build/scripts-2.7/wiggle_to_simple.py | Python | bsd-3-clause | 549 | [
"Galaxy"
] | 96d9453a482ccffe8fa73534512ed549ec1fe2495c8e02006369a65c6733e659 |
"""
===============================
Denoise images using Local PCA
===============================
The local PCA based denoising algorithm [Manjon2013]_ is an effective denoising
method because it takes into account the directional information in diffusion
data.
The basic idea behind local PCA based diffusion denoisi... | nilgoyyou/dipy | doc/examples/denoise_localpca.py | Python | bsd-3-clause | 3,792 | [
"Gaussian"
] | 79e1226d9a2a62014e817344563cd4431699b991fc3fb402594773d76b106b62 |
# Running this code in linux, no errors with combination gdal and
# netCDF4
import os
from read_3di import to_dataset
from nc import Data
from netCDF4 import Dataset
from osgeo import gdal
import matplotlib as mpl
from PIL import Image
#from lizard_raster.raster import get_ahn_indices
from lizard_raster import mod... | lizardsystem/lizard-3ditask | lizard_3ditask/task_pp.py | Python | gpl-3.0 | 4,629 | [
"NetCDF"
] | 08577a97315b77bff56d3dfde1238d7f5385743cf483e142dfd72cddf1cfd2c9 |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | sasha-gitg/python-aiplatform | tests/unit/gapic/aiplatform_v1beta1/test_dataset_service.py | Python | apache-2.0 | 145,817 | [
"Octopus"
] | ca0e108cc282a423d4c872cbce6ed081a21c107c2bc505cb8f0bdc8956aead13 |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | yanchen036/tensorflow | tensorflow/contrib/distributions/python/ops/autoregressive.py | Python | apache-2.0 | 8,043 | [
"Gaussian"
] | d57fda84de64ed5d242771d14bd390d9bb96e284bf10deecbe999499f3a67c9c |
#!/usr/bin/env python
# This script is designed to take a genbank file and 'slice out'/'subset'
# regions (genes/operons etc.) and produce a separate file. This can be
# done explicitly by telling the script which base sites to use, or can
# 'decide' for itself by blasting a fasta of the sequence you're inter-
# ed in... | jrjhealey/bioinfo-tools | Genbank_slicer.py | Python | gpl-3.0 | 8,976 | [
"BLAST",
"Biopython"
] | 1e14509ade90214eec96294e034a0a2b75b0026ee0a41c793199204a5d755e9f |
########################################################################
# File : ComputingElement.py
# Author : Stuart Paterson, A.T.
########################################################################
""" The Computing Element class is a base class for all the various
types CEs. It serves several purpos... | arrabito/DIRAC | Resources/Computing/ComputingElement.py | Python | gpl-3.0 | 19,053 | [
"DIRAC"
] | c8a02c38ef2419e498227c78daa0ce353e6dba9452a58816c271e0d51f7a7c12 |
from __future__ import division
import numpy as np
from scipy.sparse import csr_matrix, coo_matrix
from scipy.linalg import blas
from pyscf.nao.m_sparsetools import csr_matvec, csc_matvec, csc_matvecs
import math
def chi0_mv(self, dvin, comega=1j*0.0, dnout=None):
"""
Apply the non-interacting response f... | gkc1000/pyscf | pyscf/nao/m_chi0_noxv.py | Python | apache-2.0 | 4,550 | [
"PySCF"
] | fb0cb017ef2e1febe42fdf2bf33abe053ca74662c678fdd47f2290bc66ace29f |
# 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... | sbc100/yapf | yapf/yapflib/split_penalty.py | Python | apache-2.0 | 23,201 | [
"VisIt"
] | 26ed5f5658dde6557c1bc23875e5d9c78abbb7be6c534cbeb877f7854e1c6275 |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | Chuban/moose | python/chigger/tests/utils/test_get_active_filenames.py | Python | lgpl-2.1 | 2,472 | [
"MOOSE"
] | 2d23388c1f770d7d224f3cea225cc532781ca0dc6bc6b3fbbd72df75ba66a01c |
"""
Apply sigma cutoff for merged intensity.
Usage:
PHENIX_TRUST_OTHER_ENV=1 phenix.python apply_sigma_cutoff_for_merged.py hoge.mtz cutoff=-2
"""
master_params_str = """\
hklin = None
.type=str
.short_caption = file name of mtz including I
hklref = None
.type=str
.short_caption = mtz file after phen... | keitaroyam/yamtbx | cctbx_progs/apply_sigma_cutoff_for_merged.py | Python | bsd-3-clause | 6,248 | [
"CRYSTAL"
] | ecc29d7af3e7a21ab7797bc21fc503c3b3a7aa808e90b517597386c03d9dae35 |
"""Galaxy (ansible-galaxy) plugin for integration tests."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import tempfile
from . import (
CloudProvider,
CloudEnvironment,
CloudEnvironmentConfig,
)
from ..util import (
find_executable,
display,
)... | BondAnthony/ansible | test/lib/ansible_test/_internal/cloud/galaxy.py | Python | gpl-3.0 | 9,011 | [
"Galaxy"
] | 6cc362a990afb7b1cef15c59a151764c1a9ad50cdc71619c4a7beccc1a1479eb |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 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/LICEN... | davidam/python-examples | nlp/customsearch/googleresults.py | Python | gpl-3.0 | 1,579 | [
"VisIt"
] | 742c5ead70bcddc1e449b6b1adb00143e3acb8d78e3ca100ce8bdc352ac548e4 |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any la... | GbalsaC/bitnamiP | pygeoip/pygeoip/const.py | Python | agpl-3.0 | 17,369 | [
"BWA",
"COLUMBUS"
] | 52c1a58f59ea9620902e15400c27a5b5b33b8eac276f03eba46779ad98605eca |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | jH0ward/psi4 | psi4/driver/p4util/optproc.py | Python | lgpl-3.0 | 4,671 | [
"Psi4"
] | 3ff05f6ceb2f80709554bb53e5ed2009e6f7e44cab64e252f186fad80a9abd32 |
import numpy as np
from scipy.special import expit
from constants import *
class NeuralNetMLP(object):
def __init__(self, layers, random_state=None):
""" Initialise the layers as list(input_layer, ...hidden_layers..., output_layer) """
np.random.seed(random_state)
self.num_layers = len(layers)
self.layers = l... | meet-vora/mlp-classifier | neuralnet.py | Python | mit | 3,815 | [
"Gaussian",
"NEURON"
] | 0712ed4a2c1da8e85ed4983c313ce579b2276f53ec7783c3a20efb6a71a9158c |
from pymongo import MongoClient
import arxiv_import as ai
import arxiv_preprocessor as ap
import re
db = MongoClient().sources.source
class Source(object):
def __init__(self, name = '', cat = '', link = ''):
self.name = name
self.link = link
self.cat = cat
def serialize(self):
return ... | Sh4kE/fun-with-wiki-science | sources.py | Python | mit | 6,662 | [
"Galaxy"
] | 3461035a60218d06a64fbd2a2f84189e7ed7afc2783a544fe2d424759aa67460 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
from spack import *
class Eccodes(CMakePackage):
"""ecCodes is a package developed by ECMWF for processing meteoro... | iulian787/spack | var/spack/repos/builtin/packages/eccodes/package.py | Python | lgpl-2.1 | 6,218 | [
"NetCDF"
] | c00195a06103f657a670f3a0061aaf1cf057705448268b554a5ee1628bf92d4f |
import re
import os
import stat
import sys
import shutil
import subprocess
import argparse
import yaml
import logging
import time
import atexit
from subprocess import Popen, PIPE
import shlex
import datetime
import glob
import sys
if sys.version_info[0] < 3:
reload(sys)
sys.setdefaultencoding('utf8')
class ... | andreasscherbaum/buildfarm-client | build.py | Python | bsd-3-clause | 101,143 | [
"ORCA"
] | 702d533465f3202dc356a4fc3c8ac77295ba1262d117a1ae371becaa9f09e3fe |
# 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.
#
# Bio.Wise contains modules for running and processing the output of
# some of the models in the Wise2 package by Ewan Birney available from:
# ftp:/... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/Wise/dnal.py | Python | apache-2.0 | 4,335 | [
"Biopython"
] | ffd6a5a3b872fabba87f5cd4c8a04cb2eea9403a77d7075abf0d513e4aec2141 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Vulnerability types.
"""
__license__ = """
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
This program is free software; you can redistribute it and/o... | golismero/golismero | golismero/api/data/vulnerability/__init__.py | Python | gpl-2.0 | 46,532 | [
"VisIt"
] | 7630dabcdd80f730f874dd16a1c130df803c2e2c2b2359925e2116618cba3e18 |
###############################################################################
# apogee.modelspec.turbospec: functions to run Turbospectrum with the APOGEE
# analysis
###############################################################################
import sys
import os, os.path
import shutil... | jobovy/apogee | apogee/modelspec/turbospec.py | Python | bsd-3-clause | 39,861 | [
"MOPAC"
] | c646e0e4328c7aa93ac6fc95a83e4fcfee18df47fa6751b284b23fefe867f0de |
from flask import Flask, render_template, redirect, request, url_for
import json
from datetime import datetime
import time
import os
import random
from collections import OrderedDict
import feedparser
import re
from operator import itemgetter
def getScienceFeed():
articles = []
state = json.load(open('data/sta... | schollz/choices | choices.py | Python | mit | 14,095 | [
"Galaxy"
] | e32eb989c993c094fb779c8006f6bd12e2609d227f208859b4de2a1125200068 |
# flake8: noqa: E201
from tests.core import mock
from trakt import Trakt
from httmock import HTTMock
def test_lookup_movie():
with HTTMock(mock.fixtures, mock.unknown):
movies = Trakt['search'].lookup('tt0848228', 'imdb', extended='full')
assert isinstance(movies, list)
movie = movies[0]
... | fuzeman/trakt.py | tests/test_search.py | Python | mit | 5,270 | [
"Brian"
] | 74c95509b7f9cc803fa8c388ef68b8faa20e83f191bdcb3521ee10216887ba67 |
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
from google.appengine.api import memcache
from google.appengine.api import users
from google.appengine.api import mail
from google.appengine.ext import db
from datetime import datetime, timedelta
import logging
import re
import hashlib
import datetime
fro... | tedpower/snptz | models.py | Python | bsd-3-clause | 13,277 | [
"VisIt"
] | c2d4731fc4dc4abbf9505e282a22e679901ef6b027573a059006495fdddd3bd7 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Authors and copyright:
# © 2012-2013, John Lehmann (first last at geemail dotcom or @jplehmann)
# © 2012-2015, Rogério Brito (r lastname at ime usp br)
# © 2013, Jonas De Taeye (first dt at fastmail fm)
#
# Contributions are welcome, but please add new unit t... | rihbyne/coursera-dl | coursera/coursera_dl.py | Python | lgpl-3.0 | 41,202 | [
"VisIt"
] | 0c1e0c2db90cb3c4f0a1ec2b27ce6c74df6f9fcb6166547ed5056ad75063a735 |
import os
from scipy.io import loadmat,savemat,mmread
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import mode
from matplotlib.colors import LinearSegmentedColormap,LogNorm
from voxnet.plotting import *
from voxnet.utilities import h5read
from skimage.measure import find_contours
###############... | kharris/allen-voxel-network | voxel_model_visualizations.py | Python | bsd-2-clause | 9,028 | [
"VTK"
] | 2acaadc37194c4fcfb126e59c902ee949947e234b5b869a29f3027c38c50b728 |
# Orca
#
# Copyright (C) 2013-2014 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# 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 (... | chrys87/orca-beep | src/orca/scripts/toolkits/gtk/script.py | Python | lgpl-2.1 | 8,563 | [
"ORCA"
] | f875ac58d39c3c59fc4575d9dbe1c1f3ca790f09428721206ae0ec97c1c05508 |
#!/usr/bin/env python
# Configure stdout logging
import os, sys, logging, glob, zipfile, shutil
log = logging.getLogger()
log.setLevel( 10 )
log.addHandler( logging.StreamHandler( sys.stdout ) )
# Fake pkg_resources
import re
macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.co... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/scripts/egg_packager_template.py | Python | gpl-3.0 | 8,061 | [
"Galaxy"
] | 63fc0eb89d1e2d04f86f08b6b27812d846d6c6dd8f74ef6febe8c6101e91ea3d |
# -*- coding: utf-8 -*-
u"""elegant command parser.
:copyright: Copyright (c) 2016 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern.pkcollections import PKDict
from pykern.pkdebug import pkdc,... | mrakitin/sirepo | sirepo/template/elegant_command_parser.py | Python | apache-2.0 | 4,455 | [
"Gaussian"
] | 10bf76b90706eb9077fbe6e24ef82a23994de5a6818571ce85fd47d750b514b3 |
__author__ = 'sibirrer'
import astrofunc.util as Util
import scipy.ndimage.interpolation as interp
import numpy as np
import pytest
import numpy.testing as npt
def test_map_coord2pix():
ra = 0
dec = 0
x_0 = 1
y_0 = -1
M = np.array([[1, 0], [0, 1]])
x, y = Util.map_coord2pix(ra, dec, x_0, y_0, ... | sibirrer/astrofunc | test/test_util.py | Python | mit | 16,551 | [
"Gaussian"
] | 86e693f6269e1dcda67925f6a4f93736b7bf84b86466edc8f6483447433fc5fc |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The fsl module provides classes for interfacing with the `FSL
<http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This
was written to work with FSL version 4.1.4.
... | mick-d/nipype | nipype/interfaces/fsl/preprocess.py | Python | bsd-3-clause | 76,947 | [
"Gaussian",
"VTK"
] | 9475dcc11c92f3561c7699d06f9a219358ca8314e05c437c2ba9fda3304671d4 |
from typing import Any
from django.db import ProgrammingError
from confirmation.models import generate_realm_creation_url
from zerver.lib.management import ZulipBaseCommand, CommandError
from zerver.models import Realm
class Command(ZulipBaseCommand):
help = """
Outputs a randomly generated, 1-time-use link... | rishig/zulip | zerver/management/commands/generate_realm_creation_link.py | Python | apache-2.0 | 1,423 | [
"VisIt"
] | 025a905170fa1ca6b0239009c030813e565119c304abf2a059c74a33796b86ff |
from edc_constants.choices import YES_NO_DWTA
from django.db import models
from edc_base.model.fields import OtherCharField
from td_list.models import Contraceptives
from ..maternal_choices import REASON_UNSEEN_AT_CLINIC, REASON_CONTRACEPTIVE_NOT_INITIATED
from .maternal_crf_model import MaternalCrfModel
class Mat... | botswana-harvard/tshilo-dikotla | td_maternal/models/maternal_srh.py | Python | gpl-2.0 | 2,347 | [
"VisIt"
] | e7c96932ec1d35aa88c9ef2e0e57d8fee1bc62d7018fe691230d3348cffe0df7 |
###############################################################################
#
# Copyright (c) 2011-2012 Ruslan Spivak
#
# 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... | virajkanwade/plugin.video.zeetv | resources/lib/slimit/tests/test_parser.py | Python | gpl-3.0 | 5,919 | [
"VisIt"
] | 93c8643f641dfe8a77aeae125d9df327209a3d0c48509f0c0be2fa3d1d298ba9 |
# -----------------------------------------------------------------------------
# User configuration
# -----------------------------------------------------------------------------
dataset_destination_path = '/Users/seb/Desktop/mpas_flat_earth_prober'
source_filename = '/Volumes/Kitware/Data/DataExploration/Data/MPAS/... | Kitware/arctic-viewer | scripts/examples/paraview/mpas/raw-probe-flat-earth.py | Python | bsd-3-clause | 2,055 | [
"ParaView"
] | 707433632801594cc33b5d09ce3f18832d85dfc884057f50098705b7e54f2a75 |
from __future__ import absolute_import
import numpy as np
from scipy import signal
from ._fnndeconv import deconvolve
from . import plotting
def make_fake_movie(nframes, mask_shape=(64, 64), mask_center=None,
bg_intensity=0.1, mask_sigma=10, dt=0.02, rate=1.0,
tau=1., sigma=0.0... | alimuldal/PyFNND | pyfnnd/demo.py | Python | gpl-3.0 | 3,378 | [
"Gaussian"
] | 3e3fbf44b2ee5b518f4b5c20cb53869bfd191c4e8e2516642a221119ce308b12 |
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
# vim: set foldmethod=marker commentstring=\ \ #\ %s :
#
# Author: Taishi Matsumura
# Created: 2016-07-26
#
# Copyright (C) 2016 Taishi Matsumura
#
from Neuron import Neuron
from Panel import Panel, IstepSlider
from matplotlib.pyplot import close, figure, sub... | matsu490/RealtimeSimulation | new/main.py | Python | mit | 1,521 | [
"NEURON"
] | dc1777702e80ea133f30bc799f3fe8a88c7a6b02fb11bd6ab10a082af7cb8eb7 |
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 20 17:40:07 2015
@author: casimp
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import h5py
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpol... | casimp/edi12 | pyxe/plotting.py | Python | mit | 16,130 | [
"Gaussian"
] | 0fe6c0bba1092e1b24ab151cc3794c793d4945754aaff5a420ade901e198c009 |
# coding=utf-8
import sys
import os
import shutil
import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'resources', 'lib'))
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'resources', 'lib', 'pyscraper'))
import xbmcaddon
from nfowriter import NfoWriter
from nfo_... | maloep/romcollectionbrowser | resources/tests/test_nfowriter.py | Python | gpl-2.0 | 13,447 | [
"ADF"
] | 56f945b84db2b09f5e215c4b1b020fff16d734191bcf982bbed033649b30196a |
r"""
Finite difference solution of the 2D wave equation for isotropic media.
Solutions are implemented as simulation classes taking advantage of Object
Orientation. They have Rich Display features of IPython Notebook and use
the HDF5 file format to store and persist the simulation objects.
**Sources**
* :class:`~fat... | eusoubrasileiro/fatiando | fatiando/seismic/wavefd.py | Python | bsd-3-clause | 68,739 | [
"BLAST",
"Gaussian"
] | 7ff15afa57b911712b405dad9130ca4e9cf976a83cab0840e15fb1ef7cdcf0e7 |
# http://inamidst.com/saxo/
# Created by Sean B. Palmer
import atexit
import collections
import configparser
import imp
import importlib
import os.path
import queue
import re
import signal
import socket
import subprocess
import sys
import threading
import time
# Save PEP 3122!
if "." in __name__:
from . import co... | sbp/saxo | irc.py | Python | apache-2.0 | 27,931 | [
"VisIt"
] | 67cf2caf8dd8f9ed79265ac3a80e705bb4c630a8dee444102dda912eaa7f8eda |
import argparse, os
import numpy as np
from builder.args import addLoggingParams, addEarlyStop, addSupDataParams
from builder.profiler import setupLogging
from nn.contiguousLayer import ContiguousLayer
from nn.convolutionalLayer import ConvolutionalLayer
from dataset.ingest.labeled import ingestImagery
from nn.trainU... | mbojrab/playbox | trunk/projects/distillery/distillery.py | Python | mit | 5,007 | [
"NEURON"
] | a51cc2840c812329dccabd03f0467412aed17d90a046de4d75bf9c144d07c4f8 |
import Tkinter
import ttk
import tkMessageBox
import tkFileDialog
from PIL import Image, ImageTk
import re
import sys
import os
import json
import hashlib
import reflowrestclient.utils as rest
VERSION = '0.1'
if hasattr(sys, '_MEIPASS'):
# for PyInstaller 2.0
# noinspection PyProtectedMember
RESOURCE_DIR... | whitews/ReFlowDownloadClient | ReFlowDownloadClient.py | Python | bsd-3-clause | 44,989 | [
"VisIt"
] | 655ce0781a316440e9689012f0963cea33ec78d3eefef5476b8a8649b09c0654 |
## Description: class ChannelML for loading ChannelML from file or xml element into MOOSE
## Version 1.0 by Aditya Gilra, NCBS, Bangalore, India, 2011 for serial MOOSE
## Version 1.5 by Niraj Dudani, NCBS, Bangalore, India, 2012, ported to parallel MOOSE
## Version 1.6 by Aditya Gilra, NCBS, Bangalore, India, 2012, min... | dilawar/moose-full | moose-core/python/moose/neuroml/ChannelML.py | Python | gpl-2.0 | 27,698 | [
"MOOSE"
] | b4d4ae776d09929a305569369b33b89a01ebe4b507f752b0af51eceb72a1382a |
"""
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe, J. Nothman
# License: BSD 3 clause
import numbers
import array
from collections.abc import Iterable
import numpy as np
from scipy import linalg
import scipy.sparse as sp
fro... | chrsrds/scikit-learn | sklearn/datasets/samples_generator.py | Python | bsd-3-clause | 58,675 | [
"Gaussian"
] | 69e8539307c90f933210eec140cbeaf7e673f8bddd2c444b465543084c0fdc1b |
"""
Created on Sunday April 19, 2015
@author: Andrew Horsfield, Marc Coury and Max Boleininger
This module carries out the needed initialisation tasks
"""
#
# Import modules
import os, sys, importlib
import commentjson
import numpy as np
from pylato.crystal import Crystal
from pylato.electronic import Electronic
fro... | mec07/PyLATO | pylato/init_job.py | Python | gpl-2.0 | 5,271 | [
"CRYSTAL"
] | 4f9cc2f864275270e399bebb5dfaf0c686cae22eab52edb59f95332581f9454f |
# coding: utf-8
from __future__ import unicode_literals
import unittest
from pymatgen import Composition
from pymatgen.analysis.reaction_calculator import Reaction, BalancedReaction, \
ReactionError, ComputedReaction
from pymatgen.entries.computed_entries import ComputedEntry
class ReactionTest(unittest.TestCa... | yanikou19/pymatgen | pymatgen/analysis/tests/test_reaction_calculator.py | Python | mit | 9,940 | [
"pymatgen"
] | f40900231a7a00adfd5cc8c44507acb47bb5ffdabce30f55fcb841b17e48910e |
import numpy as np
class neuron:
def __init__(self):
self.x = np.array([ [0, 0], [0, 1], [1, 0], [1, 1] ])
self.y = np.array([0, 0, 0, 1])
print self.y
self.syn0 = 2 * np.random.random((4, 1)) - 1
def input_function(self):
return np.dot(self.y, self.syn0)
def activation_function(self, x):
retu... | prtx/What-I-learned-in-college | AI/Neural_Network/neural_network.py | Python | mit | 405 | [
"NEURON"
] | ef5f8784b3eb3a33cd23707a090fdb17fbebe6e9554653a2f2ba0df8d980bced |
# Copyright 2012 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 ... | GoogleCloudPlatform/storage-file-transfer-json-python | chunked_transfer.py | Python | apache-2.0 | 6,919 | [
"VisIt"
] | ff334288fc3e42ad645fbdab2e015bb8077f945454bd7409449e7e7d48e2ec8e |
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2009 Raik Gruenberg & Johan Leckner
##
## 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 v... | ostrokach/biskit | Biskit/Mod/SequenceSearcher.py | Python | gpl-3.0 | 34,532 | [
"BLAST",
"Biopython"
] | 3f6069cfd80507ce99c4c745703a3596e24c42268eb809609b71849df07c05ae |
# This tests that vtkPolyDataNormals handles cell data
# for strips properly. The filter splits strips to generate
# proper normals so it also needs to split cell data.
import vtk
ps = vtk.vtkPlaneSource()
ps.SetYResolution(10)
tf = vtk.vtkTriangleFilter()
tf.SetInputConnection(ps.GetOutputPort())
ts = vtk.vtkStripp... | keithroe/vtkoptix | Filters/Core/Testing/Python/testPDNormals.py | Python | bsd-3-clause | 1,045 | [
"VTK"
] | e3c902ffe89f8b5722695a8b4647f459f4c841a8735b22a19d5f3b356ee47a4d |
# coding: utf-8
from argparse import ArgumentParser
import sys, os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import ConfigReader as cr
from pandas.tools.plotting import table as pd_table
def autolabel(rects, ax):
# attach some text labels
for rect in rects:
... | hmendozap/master-arbeit-projects | plotting_param_distros/validation_distro_plots.py | Python | mit | 8,948 | [
"Amber"
] | 7b18bedaf1ca98d175c6720cdf4c787ad28bec55c2ab05d0466adc21c7d2d31b |
# -*- coding: utf-8 -*-
#
# Copyright (c), 2015-2016, Quantum Espresso Foundation and SISSA (Scuola
# Internazionale Superiore di Studi Avanzati). All rights reserved.
# This file is distributed under the terms of the MIT License. See the
# file 'LICENSE' in the root directory of the present distribution, or
# http://o... | afonari/q-e_schrodinger | bin/qexsd/qespresso/xsdtypes/exceptions.py | Python | gpl-2.0 | 1,753 | [
"Quantum ESPRESSO"
] | bacdc688b0f2fc6074d4620d2713c812a1680380b6205df611a333952962f84b |
"""Tests for user-friendly public interface to polynomial functions. """
from sympy.polys.polytools import (
Poly, PurePoly, poly,
parallel_poly_from_expr,
degree, degree_list,
LC, LM, LT,
pdiv, prem, pquo, pexquo,
div, rem, quo, exquo,
half_gcdex, gcdex, invert,
subresultants,
resu... | wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/polys/tests/test_polytools.py | Python | mit | 105,537 | [
"Gaussian"
] | 9bbc537413dec31fd14f4159fb82fc6c892bda207a693eeb774ae6c584fca882 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (... | xiangel/hue | apps/useradmin/src/useradmin/test_ldap.py | Python | apache-2.0 | 36,825 | [
"MOE"
] | a0986a6214b02ca14bc10fecf3dc18f7e620f1b2cabcc20b8af5d1408701875e |
## numpy-oldnumeric calls replaced by custom script; 09/06/2016
## Automatically adapted for numpy-oldnumeric Mar 26, 2007 by alter_code1.py
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner
##
## This program is free software; you can r... | graik/biskit | biskit/md/trajectory.py | Python | gpl-3.0 | 48,430 | [
"Amber",
"NetCDF"
] | a24fddfd13e77ab10ca3b48275808cd00861a4c8ff6fc8f27c6158e0420fa895 |
# -*- 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 required by applicable law or... | googleapis/python-compute | tests/unit/gapic/compute_v1/test_images.py | Python | apache-2.0 | 164,421 | [
"Octopus"
] | 90a18da789393deb383585479dfff4f6cc98030de20a59638cbe12e488f32093 |
import numpy as np
import numpy.testing as npt
import pyhrf
from pyhrf.graph import graph_from_lattice
from pyhrf.tools import add_prefix
def b():
""" for debug """
raise Exception()
### modified hierachical.py from scikit learn
"""Hierarchical Agglomerative Clustering
These routines perform some hierac... | philouc/pyhrf | python/pyhrf/sandbox/parcellation.py | Python | gpl-3.0 | 63,707 | [
"Gaussian"
] | aa74e3fdedfa0ddadd424e1038075273582a05f5e40cbfdf56f2f4ea9c580a4d |
"""
An object to register callbacks and dispatch event wiring mouse clicks
on a scene to picking.
"""
# ETS imports
from traits.api import HasTraits, Dict, Instance, \
Enum, Int, Callable, on_trait_change, List, Tuple, WeakRef
from mayavi.core.scene import Scene
from tvtk.api import tvtk
VTK_VERSION = ... | dmsurti/mayavi | mayavi/core/mouse_pick_dispatcher.py | Python | bsd-3-clause | 7,476 | [
"Mayavi",
"VTK"
] | 1aa42d39acaac00916d3c05995789c747083a4eea1f792d33cbf2e3efa729f36 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, 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.
"""Facilities for moving parsed data to other cheminformatic libraries."""
from cclib.parser.utils import find_package
i... | berquist/cclib | cclib/bridge/__init__.py | Python | bsd-3-clause | 917 | [
"ASE",
"Psi4",
"PySCF",
"cclib"
] | ce0da287542004297b14590c21271d395bbb8915bb84fd7e56f05c2fff3b0151 |
"""Qt implementation of _Renderer and GUI."""
# Authors: Guillaume Favelier <guillaume.favelier@gmail.com>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: Simplified BSD
from contextlib import contextmanager
import pyvista
from pyvistaqt.plotting import FileDialog
from PyQt5.QtCore import Qt, pyqtSign... | wmvanvliet/mne-python | mne/viz/backends/_qt.py | Python | bsd-3-clause | 28,748 | [
"VTK"
] | bcf29b4c707499d8945dc6b65b0ae977eb13c87670ca310ab38766786ed76eb9 |
# (c) 2015, Brian Coca <bcoca@ansible.com>
#
# 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.... | goozbach/ansible | lib/ansible/plugins/lookup/url.py | Python | gpl-3.0 | 2,143 | [
"Brian"
] | 951ba2baaec60900ab667c1313e5dbb1a16a55b8a28efd75b03ecdec7596ac00 |
"""
fraunhofer.py: calculates 2D Fraunhofer diffraction (via Fourier Transform)
"""
__author__ = "Manuel Sanchez del Rio"
__contact__ = "srio@esrf.eu"
__copyright = "ESRF, 2016"
import numpy as np
#
# wavefront definitions
#
def wavefront_initialize(pixelsize_h=1e-6,pixelsize_v=1e-6,npixels_h=1024,npixels_v=1... | srio/Diffraction | fraunhofer.py | Python | gpl-2.0 | 18,761 | [
"Gaussian"
] | 83fcd5cb4efb1ea71b96376d3e020639be8da7ea04cffa64a6e9c12df06ebd5d |
"""
Shadows
~~~~~~~
Demonstrate the usage of lights and shadows in PyVista.
"""
# sphinx_gallery_thumbnail_number = 2
import pyvista
from pyvista import examples
import numpy as np
mesh = examples.download_dragon()
mesh.rotate_x(90)
mesh.rotate_z(120)
###############################################################... | akaszynski/vtkInterface | examples/04-lights/shadows.py | Python | mit | 3,642 | [
"VTK"
] | 5c9af37b4eb25a3ca2e299014aaca0cb38ece1b48fe9723010d8d63ce06902cd |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2008 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Softw... | andrebellafronte/stoq | stoqlib/domain/interfaces.py | Python | gpl-2.0 | 3,737 | [
"VisIt"
] | 70ed00328fee96f5f66ba7f2ab292431060d0ceb2fe5fea5b87e4a205b2f8cc7 |
#!/usr/bin/env python
'''
Example:
./disp_reconstruct.py \
--equation=4 \
--lookup=./digicampipe/tests/resources/disp_lookup/disp_lookup_method4.npz \
--pixels=/home/jakub/science/fzu/sst-1m_simulace/data_test/ryzen_test2018/0.0deg/Data/processed/pixels.txt \
--images=/home/jakub/science/fzu/sst-1m_simulace... | calispac/digicampipe | digicampipe/scripts/disp_reconstruct.py | Python | gpl-3.0 | 9,386 | [
"Gaussian"
] | f5f463294b8eb9fd9ebfd6a975a186166138a4f8166b009b677ed5febfb4593b |
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from .gp import GP
from .parameterization.param import Param
from ..inference.latent_function_inference import var_dtc
from .. import likelihoods
from GPy.core.parameterization.varia... | befelix/GPy | GPy/core/sparse_gp.py | Python | bsd-3-clause | 5,441 | [
"Gaussian"
] | 3958ac146aab17e773d398033dae740f9da5247427310c20cb2fd54ba410466a |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf import gto
from pyscf import scf
'''
Specify irrep_nelec to control the wave function symmetry
For atomic calculations, see also 31-v_atom_rohf.py
'''
mol = gto.Mole()
mol.build(
verbose = 0,
atom = '''
C 0. 0. ... | sunqm/pyscf | examples/scf/13-symmetry.py | Python | apache-2.0 | 1,609 | [
"PySCF"
] | 9e287e1fc3d20efaed04ff12b2d21cb8efa68763f148938d0a77b3f8614e1bde |
#!/usr/bin/env python
""" logs franklin Wireless MHS800L a.k.a. Verizon Ellipsis MiFi RSSI and connection status
simple example of parsing a jQuery driven site.
Not notable for efficiency.
Michael Hirsch
"""
import dryscrape #needed to get jQuery outputs
#
from pathlib import Path
from bs4 import BeautifulSoup
from da... | scivision/mifirssi | mifiRSSI.py | Python | gpl-3.0 | 2,517 | [
"VisIt"
] | 3bf08a5ce846b93cdef28230ad0e64fdf5c444531d1729963e84fe0c3f7a794f |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# 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/sequence/tests/test_sequence.py | Python | bsd-3-clause | 37,141 | [
"scikit-bio"
] | fc5222cff62115cd817fc1179b76ed0f6076d830cead51610f5b394562587f27 |
# GromacsWrapper: test_amber03star.py
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
from __future__ import division, absolute_import, print_function
import numpy as np
import numpy.matlib
from numpy.te... | pslacerda/GromacsWrapper | gromacs/tests/test_fileformats/test_top/test_amber03star.py | Python | gpl-3.0 | 727 | [
"Gromacs"
] | c2123ff7240c009e1c0be8e8e8dcc2b712d43941749c426b93c66c25dba72629 |
''' Tests for netcdf '''
import os
from os.path import join as pjoin, dirname
import shutil
import tempfile
import warnings
from io import BytesIO
from glob import glob
from contextlib import contextmanager
import numpy as np
from numpy.testing import (assert_, assert_allclose, assert_equal,
... | aeklant/scipy | scipy/io/tests/test_netcdf.py | Python | bsd-3-clause | 19,202 | [
"NetCDF"
] | b42d1e007c063f71f524f268eb0313507648a4ba972a76aaeae7efbd3c747cce |
#!/usr/bin/env python
########################################################################
# File : dirac-dms-lfn-accessURL
# Author : Stuart Paterson
########################################################################
"""
Retrieve an access URL for an LFN replica given a valid DIRAC SE.
Example:
$ dira... | ic-hep/DIRAC | src/DIRAC/Interfaces/scripts/dirac_dms_lfn_accessURL.py | Python | gpl-3.0 | 1,733 | [
"DIRAC"
] | c39a6eb10ba6721db8f89e9fcede5de2d9deddeee052a666db76a27cf38891df |
import sys
import numpy as np
from ase import Atoms
from ase.io import write, read
a = 5.0
d = 1.9
c = a / 2
atoms = Atoms('AuH',
positions=[(c, c, 0), (c, c, d)],
cell=(a, a, 2 * d),
pbc=(0, 0, 1))
extra = np.array([ 2.3, 4.2 ])
atoms.set_array('extra', extra)
atoms *= (1, 1... | grhawk/ASE | tools/ase/test/fio/oi.py | Python | gpl-2.0 | 2,234 | [
"ASE"
] | 1a4049b32615704551a13a129b24779acfc6a6be0b5bbe5e3b6627bed87e3a3f |
#!/usr/bin/env python
import sys, re, optparse
try:
from common_methods import *
except ImportError:
sys.exit("Could not find common_methods.py... download the full toolkit from https://github.com/MonroCoury/Forensic_Tools")
def read_moz_cookies(cookies_db):
'''Read mozilla firefox cookies. Takes one argu... | MonroCoury/Forensic-Tools | firefox_scanner.py | Python | mit | 9,161 | [
"VisIt"
] | 0bd870d3dd4af8b1e756a247cf653a16a6bb9c2d78b64f253fccf8eb44ec7b40 |
"""
Bayesian Block implementation
=============================
Dynamic programming algorithm for finding the optimal adaptive-width histogram.
Based on Scargle et al 2012 [1]_
References
----------
.. [1] http://adsabs.harvard.edu/abs/2012arXiv1207.5578S
"""
import numpy as np
# TODO: implement other fitness functi... | CodeMonkeyJan/hyperspy | hyperspy/external/astroML/bayesian_blocks.py | Python | gpl-3.0 | 11,803 | [
"Gaussian"
] | 20bf0b5e688ac88e06376d2df1f8338c0a927c8d1019af90a52b4c50eeb4b2a7 |
import numpy as np
from ase.atoms import Atoms
def write_plt(filename, atoms, data):
if isinstance(atoms, Atoms):
cell = atoms.get_cell()
else:
cell = np.asarray(atoms, float)
if cell.ndim == 2:
c = cell.copy()
cell = c.diagonal()
c.flat[::4] = 0.0
if c.any... | grhawk/ASE | tools/ase/io/plt.py | Python | gpl-2.0 | 1,598 | [
"ASE"
] | b2906f9b3f445a60a623aeb4e7b4373ed46a0ab0b265a5b3d48029acaa11b018 |
## This file is part of Invenio.
## Copyright (C) 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 your option) any later ... | lnielsen/invenio | invenio/legacy/authorlist/engine.py | Python | gpl-2.0 | 34,382 | [
"VisIt"
] | ae9949ed9328fb79990727c5a75c337b7a96116716ebe600c3df37298ca57843 |
from __future__ import unicode_literals
import base64
import datetime
import hashlib
import json
import netrc
import os
import re
import socket
import sys
import time
import math
from ..compat import (
compat_cookiejar,
compat_cookies,
compat_etree_fromstring,
compat_getpass,
compat_http_client,
... | TRox1972/youtube-dl | youtube_dl/extractor/common.py | Python | unlicense | 102,486 | [
"VisIt"
] | bed21dad72ca0d5ae1a9ca59809000661ea8b9cdcf1880f61e5364d80c1961f3 |
import numpy as np
import sys
import sklearn.tree
import Context, Argmax, Metrics
from Policy import *
import string
import ContextIterators
import Metrics
class BanditSim(object):
def __init__(self, X, N, K, eps, one_pass=False, reward_noise=0.0):
"""
Simulate a K-armed contextual bandit game with... | akshaykr/oracle_cb | Simulators.py | Python | mit | 31,311 | [
"Gaussian"
] | 1e6ccf309b23e7c6fb04a35958bda9a5fda1ff9962730b42d466503b287e0203 |
#!/usr/bin/python
##
# Daily Dilbert
#
# A simple scraper that picks up the day's Dilbert comic and emails it to people.
##
import os
import sys
import urllib2
import logging
import time
import datetime
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEIm... | paambaati/daily-dilbert | daily_dilbert.py | Python | mit | 4,942 | [
"VisIt"
] | 563142b3ebd4bfe8e7c930514f90fd2088ebf43ad5173005eec8a3b836b750cd |
"""Base class for creating HTML processing modules
This class is designed to take HTML as input and spit out equivalent
HTML as output. By itself it's not very interesting; you use it by
subclassing it and providing the methods you need to create your HTML
transformation.
This program is part of "Dive Into Python", ... | puzzlet/chardet | util/BaseHTMLProcessor.py | Python | lgpl-2.1 | 3,750 | [
"VisIt"
] | 192f5c61cad2f643e2a52654caff62396486be6e3daf5d05566922e965d942c0 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import tempfile
import h5py
from pyscf import gto, scf, ao2mo
'''
Save the transformed integrals in the given file in HDF5 format
'''
mol = gto.Mole()
mol.build(
atom = 'H 0 0 0; F 0 0 1.1', # in Angstrom
basis = 'ccpvdz',
symmetry = ... | gkc1000/pyscf | examples/ao2mo/01-outcore.py | Python | apache-2.0 | 743 | [
"PySCF"
] | e6c3f2d6baddf184899f2418651effe513e5db152db7829024bedaa0a02a7fa8 |
"""The Gaussian / Normal distribution."""
from equadratures.distributions.template import Distribution
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
from scipy.special import erf, erfinv, gamma, beta, betainc, gammainc
RECURRENCE_PDF_SAMPLES = 8000
class Gaussian(Distribution):
... | psesh/Effective-Quadratures | equadratures/distributions/gaussian.py | Python | mit | 3,134 | [
"Gaussian"
] | 37917132175434cca10b892c0e0e064ea7639d2dd422b28ed5845e9926ad26a5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.