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 |
|---|---|---|---|---|---|---|---|
import hoomd
from hoomd.conftest import pickling_check
import pytest
import numpy
@pytest.fixture(scope='session')
def two_charged_particle_snapshot_factory(two_particle_snapshot_factory):
"""Make a snapshot with two charged particles."""
def make_snapshot(particle_types=['A'], dimensions=3, d=1, L=20, q=1):... | joaander/hoomd-blue | hoomd/md/pytest/test_pppm_coulomb.py | Python | bsd-3-clause | 4,577 | [
"LAMMPS"
] | 405b675208262937d5fab77f97b1fcadf3945a65cd914457c7f217a5263c0068 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Test the API. The API should be considered fixed in future releases and should
be equal for every implementation. Therefore it's important to have unit tests
for the API.
"""
import numpy as np
from KDEpy.FFTKDE import FFTKDE
from KDEpy.NaiveKDE import NaiveKDE
from KD... | tommyod/KDEpy | KDEpy/tests/test_api.py | Python | gpl-3.0 | 6,448 | [
"Gaussian"
] | 703453772817cddd35af813f7f2dc7d8993ae9775d4b1ca0c004a51dba71891d |
## \file
## \ingroup tutorial_pyroot
## \notebook
## Example of function called when a mouse event occurs in a pad.
## When moving the mouse in the canvas, a second canvas shows the
## projection along X of the bin corresponding to the Y position
## of the mouse. The resulting histogram is fitted with a gaussian.
## A ... | mhuwiler/rootauto | tutorials/pyroot/DynamicSlice.py | Python | lgpl-2.1 | 3,859 | [
"Gaussian"
] | 66df3c5582825be66585155d65a594552c6e77e5d5c3e7901b363ec2aaea36c7 |
#!/usr/bin/env python2.7
"""
vg_calleval.py: Compare vcfs with vcfeval. Option to make freebayes calls to use as baseline. Can
run on vg_mapeval.py output.
"""
from __future__ import print_function
import argparse, sys, os, os.path, errno, random, subprocess, shutil, itertools, glob, tarfile
import doctest, re, json... | glennhickey/toil-vg | src/toil_vg/vg_calleval.py | Python | apache-2.0 | 48,565 | [
"BWA"
] | 04781b42f517f4cd76c970d00d7ed339d27d2d3d21c2066a6f14e0b78f88fbb5 |
# GromacsWrapper
# Copyright (c) 2009-2010 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
"""
:mod:`gromacs` -- GromacsWrapper Package Overview
=================================================
**GromacsWrapper** (package :m... | CTCNano/GromacsWrapper | gromacs/__init__.py | Python | gpl-3.0 | 12,918 | [
"Gromacs"
] | e53261af10f02eb5697f731d8f9901beaed74bee7e06bd4970a68719ca1dde17 |
""" :mod: GFAL2_StorageBase
.. module: python
:synopsis: GFAL2 class from StorageElement using gfal2. Other modules can inherit from this use the gfal2 methods.
:TODO: When we are totally migrated to python 3, we can explicitely remove the str cast
of all the ctx calls. They were added because we would receive un... | yujikato/DIRAC | src/DIRAC/Resources/Storage/GFAL2_StorageBase.py | Python | gpl-3.0 | 66,281 | [
"DIRAC"
] | 13584280d7374b20953659cec148d7e95a9bcd23d02855a7a606804134703c9b |
"""
The calculate test module verifies that calculate() calculates
Model quantities correctly.
"""
import pytest
from pycalphad import Database, calculate, Model, variables as v
import numpy as np
from numpy.testing import assert_allclose
from pycalphad.codegen.callables import build_phase_records
from pycalphad.core.... | tkphd/pycalphad | pycalphad/tests/test_calculate.py | Python | mit | 5,970 | [
"pycalphad"
] | a5ab995e61f07d84c2ab06a4a72b538fe656707360ee1ae6d223310073c24395 |
#!/usr/bin/env python
import argparse
import copy
import logging
import re
import sys
from cpt_gffParser import gffParse, gffWrite, gffSeqFeature
from Bio.Blast import NCBIXML
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation
logging.basicConfig(level=lo... | TAMU-CPT/galaxy-tools | tools/blast/blast_to_gff3.py | Python | gpl-3.0 | 16,881 | [
"BLAST",
"Biopython"
] | 99144d25df909b5643645fde600302b4b303fb3fbb249f42d550e08b8c17d9af |
import numpy as np
from ChangingMatrixVector import nearestSPD
class BayesGau:
#################################################################################################
# Bayes Gaussian classifier. Either Full covariance or Naive Bayes #
# #
# Louis-Francois Arsenault, Columbia Universisty (2013-2... | L-F-A/Machine-Learning | BayesClassifiers/BayesGau.py | Python | mit | 6,614 | [
"Gaussian"
] | 55904d642f3a083a796d56fc4ffe0f6597a5fc9b512c841c84066e74fb4eb6ea |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Peter Eastman, Robert McGibbon
# Contributors: Kyle A. Beaucha... | hainm/mdtraj | mdtraj/core/topology.py | Python | lgpl-2.1 | 44,674 | [
"MDTraj",
"OpenMM",
"VMD"
] | 59f965ad004c891096783d60085340d0f8723fba8c6ef0accb4a0088c5cb9fd4 |
#!/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/ajax/rebootdialog.py | Python | gpl-2.0 | 4,745 | [
"VisIt"
] | c654df2d309cc8b1c9f03e6ed8863eee76257ab494d38210b96027e90a433caf |
from astropy import units as u
from astropy.coordinates import SkyCoord, Distance
import numpy as np
def dist_err_mag_2_pc(d_pc, e_dm, e_E):
'''
Error associated to the distance in pc, obtained via the distance modulus
relation.
d_pc = 10 ** (0.2*(dm + 5 - 3.1*E))
e_d_pc = sqrt((diff(d,dm)*e_dm... | Gabriel-p/mcs_rot_angles | modules/dist2CloudCenter.py | Python | gpl-3.0 | 3,610 | [
"Galaxy"
] | ad334a412d7b623662b07a206d67c01e11f9576bc977b4669a9a47ceaa724339 |
# Glumol - An adventure game creator
# Copyright (C) 1998-2008 Sylvain Baubeau & Alexis Contour
# This file is part of Glumol.
# Glumol 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 th... | lebauce/artub | gouzi/__init__.py | Python | gpl-2.0 | 12,352 | [
"VisIt"
] | 55d2dada86f778e088efae6dff0f5bf6d3292422692fd682629e6f2114acb264 |
"""
Module containing the base object for multivariate kernel density and
regression, plus some utilities.
"""
from statsmodels.compat.python import range, string_types
import copy
import numpy as np
from scipy import optimize
from scipy.stats.mstats import mquantiles
try:
import joblib
has_joblib = True
exce... | bert9bert/statsmodels | statsmodels/nonparametric/_kernel_base.py | Python | bsd-3-clause | 18,241 | [
"Gaussian"
] | 09327f6c5fe557cc5e505d080cc47c28e86b97d98addf36375456c3208e95689 |
# 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 functions to perform various useful operations on
entries, such as grouping entries by structure.
"""
from six.moves import filter,... | matk86/pymatgen | pymatgen/entries/entry_tools.py | Python | mit | 5,906 | [
"pymatgen"
] | bc0ec89453dc75f440d8f1b7bf8d9e3fbbd6211fffb4f9e99820792138d1c38d |
# Copyright (C) 2007, Thomas Leonard
# See the README file for details, or visit http://0install.net.
import os, subprocess, tempfile
from zeroinstall import SafeException
from logging import info, warn
from support import unpack_tarball
class SCM:
def __init__(self, root_dir, options):
self.options = options
se... | gfxmonk/0release | scm.py | Python | lgpl-2.1 | 6,178 | [
"VisIt"
] | a5a0c6cbf8d98aa0820c376b528a31e6eca9c60e4c87ed38ba6524f796be65e3 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Contains an iterative solver class to iteratively solve
Created on Thu Apr 20 10:36:48 2017
@author: ibackus
"""
from scipy.special import erf
from scipy.integrate import cumtrapz
import numpy as np
import pynbody
SimArray = pynbody.array.SimArray
G = SimArray(1.0,... | ibackus/diskpy | diskpy/ICgen/iterativesolver.py | Python | mit | 7,919 | [
"Gaussian"
] | 15eee54781d252bc5e81e0484fbdab0913a8fe59c9c3c8b7ec07f0413f2f4de0 |
import logging
import os
from galaxy.model.orm import and_
from galaxy.util.odict import odict
from tool_shed.util import hg_util
import tool_shed.util.shed_util_common as suc
log = logging.getLogger( __name__ )
def can_browse_repository_reviews( app, user, repository ):
"""
Determine if there are any reviews... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/tool_shed/util/review_util.py | Python | gpl-3.0 | 6,281 | [
"Galaxy"
] | f70d00da89e8580f601ee892f148df8d34473adb7ef5e05d8cf2fdecf3016d86 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# addvgridres - add vgrid resource
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | heromod/migrid | mig/shared/functionality/addvgridres.py | Python | gpl-2.0 | 5,866 | [
"Brian"
] | 3ca72e8057f9a2d64d13c87f03f4d7a58685f4763a08b256025e41a2517acf5a |
#import parser
import numpy as np
import pathlib2 as pl
import pandas as pd
import warnings
import plotting
import bayesModels as bayes
import itertools as it
import pymol_visualisation
import sim_run
import numerics as num_
import PolyLibScan.Database.db as DB
import PolyLibScan.Tools.config as cfg
warnings.filterwar... | luminescence/PolyLibScan | Analysis/job.py | Python | mit | 9,716 | [
"LAMMPS",
"PyMOL"
] | 20ea7f0244979398363146c1a4f5313513cc192e6bb16a05fe297374878f7f13 |
#!/usr/bin/env python
import os,glob,string,sys
from numpy.distutils.core import setup, Extension
from numpy.distutils import fcompiler
from distutils.dep_util import newer
## -------- set these
KM = 26
JM = 1
IM = 1
NC_INC = '/usr/local/include'
NC_LIB = '/usr/local/lib'
##----------------------
if '--lite' in sys.... | jswanljung/CliMT | setup.py | Python | bsd-3-clause | 8,063 | [
"NetCDF"
] | 7e55657b75a3034f15c9a3bd7b278e063602f6849ac6ca6703cd0a1dfd77916f |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS.
"""
from unittest import expectedFailure
from ..helpers import UniqueCourseTest
from ...pages.lms.auto_auth import AutoAuthPage
from ...pages.lms.course_info import CourseInfoPage
from ...pages.lms.tab_nav import TabNavPage
from ...pages.xblock.acid import Aci... | ahmadiga/min_edx | common/test/acceptance/tests/lms/test_lms_acid_xblock.py | Python | agpl-3.0 | 5,837 | [
"VisIt"
] | c2988192c4550cf635ac5bd0e1db6d6cedb54bcea9ecd6786a73a797f5803c8d |
import os
import json
import time
import numpy as np
from pychemia import pcm_log, HAS_MATPLOTLIB
from pychemia.crystal import KPoints
from ..vasp import VaspJob
from ..outcar import read_vasp_stdout
from ..kpoints import read_kpoints
from ..poscar import read_poscar
from ...tasks import Task
from ..xml_output import p... | MaterialsDiscovery/PyChemia | pychemia/code/vasp/task/convergence.py | Python | mit | 17,197 | [
"CRYSTAL",
"VASP"
] | 8996b904fc91f43ced1d20ca43a4b1833922bb8a763a5d442dd645e73deea8bc |
# -*- coding: utf-8 -*-
__author__ = 'Rainer Arencibia'
"""
The MIT License (MIT)
Copyright (c) 2016 Rainer Arencibia
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, includi... | rainer85ah/VisionViewer | src/Builders/Canny/__init__.py | Python | mit | 2,508 | [
"Gaussian"
] | 5ea3fd6353d7b2b4b7d11124a2f235ecec25360e8ebfc4a031c26462da3639cb |
#
# Copyright 2015 by Justin MacCallum, Alberto Perez, Ken Dill
# All rights reserved
#
from simtk.openmm.app import AmberPrmtopFile, OBC2, GBn, GBn2, Simulation
from simtk.openmm.app import forcefield as ff
from simtk.openmm import LangevinIntegrator, Platform, CustomExternalForce
from simtk.unit import kelvin, picos... | laufercenter/meld | meld/system/openmm_runner/runner.py | Python | mit | 34,742 | [
"OpenMM"
] | c86e9443bbfc33ed40166317d2c5ab52295a1d716e229f42c5fe0fdc23127542 |
#
# Copyright (C) 2013-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | mkuron/espresso | testsuite/python/constant_pH.py | Python | gpl-3.0 | 4,707 | [
"ESPResSo"
] | 07676e30903672cc0297352cb0dd1cae6dc2e9a97ed097d81b88b66732288ab2 |
#!/usr/bin/env python
import argparse
import importlib
import os
import sys
import glob
import click
import hashlib
import time
import subprocess
parser = argparse.ArgumentParser(description='Project Euler Helper')
# parser.add_argument('integers', metavar='N', type=int, nargs='+',
# help='an inte... | JJGO/ProjectEuler | euler.py | Python | gpl-3.0 | 3,830 | [
"VisIt"
] | 0cd8fa83854c18c077504e44424eca7fb09519998d6ef68f6f819b0944f4a282 |
#!/usr/bin/env python3
import ipaddress
import textwrap
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
# Getting IPv4 address ranges of OVH: visit these pages.
# https://bgp.he.net/AS16276#_prefixes
# https://bgp.he.net/AS35540#_prefixes
# Manually copy paste the tables into a text file. Hope... | pastly/python-snippits | src/ip-exclude.py | Python | unlicense | 5,155 | [
"VisIt"
] | c9d4b38d88b4e665595ce71f2cbf35a1430d81c31feae09edc265553ca489549 |
#!/usr/bin/env python
#
# $File: Dumper.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute it ... | BoPeng/simuPOP | docs/Dumper.py | Python | gpl-2.0 | 1,668 | [
"VisIt"
] | 743547b1d6196b0afd8a50bb2b38d66b69e1d6cbf70857e2b925a1c53f4697e4 |
# coding: utf-8
from __future__ import unicode_literals, division
"""
This module implements basic kinds of jobs for Nwchem runs.
"""
__author__ = "Shyue Ping Ong"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "ongsp@ucsd.edu"
__status__ = "Beta"
__date__ = "5/20/13"
import subprocess
import s... | alberthxf/custodian | custodian/nwchem/jobs.py | Python | mit | 2,294 | [
"NWChem"
] | 313ab9a3edb0b77c41baf5fc51f9241e3990a9efe970dece93f2aa0f61fbfb7a |
#!/usr/bin/env python
"""
segmentation-fold can predict RNA 2D structures including K-turns.
Copyright (C) 2012-2016 Youri Hoogstrate
This file is part of segmentation-fold
segmentation-fold is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by t... | yhoogstrate/segmentation-fold | scripts/energy-estimation-utility/segmentation_fold_utils/ExtractBoxedSequences.py | Python | gpl-3.0 | 5,436 | [
"pysam"
] | 49846b2f7fe085d536c900efa34b7b973579a262b1596015a2fb19fa0a34c22e |
from __future__ import absolute_import, division
import logging
import re
import time
from record import Record
NULL_BSSID = "00:00:00:00:00:00"
MIN_ACCURACY, MAX_ACCURACY = 0, 20000 # radius in meters
MIN_ALTITUDE, MAX_ALTITUDE = -418, 8848 # meters, Dead Sea, Mount Everest :)
MIN_LATITUDE, MAX_LATITUDE ... | cpeterso/stumbler-tsv | tsv/wifi.py | Python | mpl-2.0 | 7,414 | [
"Galaxy"
] | 14be8aed1c4ebf5eba0bbb1853a93e703f932741fadd26b0646b14cb9bfd6d03 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | ijingo/incubator-singa | python/singa/initializer.py | Python | apache-2.0 | 4,030 | [
"Gaussian"
] | 3124954a64e9a42b8c2ef27cf6c4abd6d756cfc00cf6bb812378fd6852008f34 |
# Copyright (C) 2004-2013 Aaron Swartz
# Brian Lalor
# Dean Jackson
# Dmitry Bogatov <KAction@gnu.org>
# Erik Hetzner
# Etienne Millon <me@emillon.org>
# Joey Hess
# ... | andresmrm/rss2email | rss2email/config.py | Python | gpl-2.0 | 8,802 | [
"Brian"
] | ac63d82da94bdf13978c4574708a5fa0b8167f8d0a2e60bb3fc1516c0a218dda |
# THIS FIRST PART IS THE ENTIRE PROGRAM OF MARIA DEGRAZIA
# KEEP ON READING TO KNOW MORE ABOUT THE THUNDERBIRD-EMAIL-PARSER
#thunderbird_parser v1.0
#This program parses the raw emails file created by Thunderbird
#located under \Users\%USERNAME%\AppData\Roaming\Thunderbird\Profiles\[random].default\
#
#These files do... | segloser/pharser | pharser.py | Python | gpl-3.0 | 24,169 | [
"VisIt"
] | 19ada02dff747bfdbaeb9340025e4b4bf9ffb869abd16720c6795a47f1b3feda |
#!/usr/bin/python
# File created on 27 Jan 2012.
from __future__ import division
__author__ = "Kishori M Konwar, Niels W Hanson"
__copyright__ = "Copyright 2013, MetaPathways"
__credits__ = [""]
__version__ = "1.0"
__maintainer__ = "Kishori M Konwar, Niels W Hanson"
__status__ = "Release"
import subprocess
import sys... | wholebiome/MetaPathways_Python_Koonkie.3.0 | libs/python_scripts/daemon.py | Python | mit | 29,805 | [
"BLAST"
] | 9313fc34017767383c8301d08e1471286a2aacbf4e7334f42441b194cef9696a |
# (C) British Crown Copyright 2010 - 2015, 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... | jkettleb/iris | lib/iris/__init__.py | Python | lgpl-3.0 | 13,686 | [
"NetCDF"
] | 7cf0799e5ec0bd70cdd342eac1e359b50e0e260bf98e3a7f8ba2b16cf00ee4db |
#! /usr/bin/env python
# Test for the adapting exponential integrate and fire model according to
# Brette and Gerstner (2005) J. Neurophysiology.
# This script reproduces figure 3.d of the paper.
# Note that Brette&Gerstner give the value for b in nA.
# To be consistent with the other parameters in the equations, b mu... | QJonny/CyNest | cynest/examples/brette-gerstner-fig-3d.py | Python | gpl-2.0 | 1,021 | [
"NEURON"
] | 84006df44d2a290a2986c2a9d614240a112d0e4651cf31e2f582f4f04b5fc5ad |
# -*- coding: utf-8 -*-
#
# Copyright © 2013 Michael Rabbitt.
#
# 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, mo... | s2hc-johan/nikola | nikola/plugins/compile/markdown/mdx_gist.py | Python | mit | 9,892 | [
"Brian"
] | 76c7ab9a6e856992e555d4fdf23841a34731789af5268e23e5acb2286630e1ee |
import os
import urllib.parse
import datetime
import time
import zlib
import hashlib
import html as pyhtml
import redis
import re
import mongoengine as mongo
import random
import requests
import html.parser as html_parser
import tweepy
import pynliner
from collections import defaultdict
from bs4 import BeautifulSoup
fr... | samuelclay/NewsBlur | apps/social/models.py | Python | mit | 147,204 | [
"BLAST"
] | 73bbc84e1eabca8989374a7979b18192ed51318afdb5a87476b7f88791edd8f8 |
# IPython log file
arr = np.random.random((64,) * 3)
plt.imshow(arr)
from skimage import data
get_ipython().run_line_magic('pinfo', 'data.binary_blobs')
from skimage.util import random_noise
get_ipython().run_line_magic('pinfo', 'random_noise')
blobs_raw = np.stack([data.binary_blobs(length=64, ndim=3, blob_size_frac... | jni/useful-histories | napari-blobs.py | Python | bsd-3-clause | 5,806 | [
"Gaussian",
"Napari"
] | 547ed40a3b81caa93e5f1bc8c91027c010b09307f93df5a60a3d4f564c38d046 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Created on Mar 9, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "Mar 9, 2012"
import unittest
import... | rousseab/pymatgen | pymatgen/symmetry/tests/test_analyzer.py | Python | mit | 19,788 | [
"VASP",
"pymatgen"
] | 6465ccebe8490ab283426ca5d2614ae033a2060b5caa0f3510767a53ec59e6ee |
# -*- coding: utf-8 -*-
# filename: lesson_122_list_methods.py
# Life is short, use Python!
# LIST METHODS
# usage: LIST.METHOD(ARGUMENTs)
# L.append(ELEMENT) ---> append ELEMENT as is at the end of list L
# L.extend('LIST') ---> add elements of LIST at the end of L
# L.insert(INDEX, 'ELEMENT') -... | Tset-Noitamotua/_learnpython | google-python-class/lesson_123_list_methods.py | Python | gpl-2.0 | 1,755 | [
"MOE"
] | 8165e861fc9e125f2d50e47b40a66e5e88cf7d4607134d2ed8645ebd5ddd9ee3 |
import numpy as np
from scipy import stats
from matplotlib import pyplot
#(0) Set parameters:
np.random.seed(0)
nResponses = 10000
#(1) Generate Gaussian data:
y = np.random.randn(nResponses)
#(2) Survival functions:
heights = np.linspace(0, 5, 21)
sf = np.array( [ (y>h).mean() ... | 0todd0000/spm1d | spm1d/rft1d/examples/val_max_0_gaussian_0d.py | Python | gpl-3.0 | 714 | [
"Gaussian"
] | 5293a65dc645e3d8e021e12f90deb4d9cdde35b7bdb850ad1994df37d1354843 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | oulinbao/kubernetes | cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py | Python | apache-2.0 | 45,473 | [
"CDK"
] | cbb7f9d66e50e6b139d8a7fc791a4dec41b8cbaf01a88553f25806d029555b17 |
"""
KeepNote
General rich text editor that saves to HTML
"""
#
# KeepNote
# Copyright (c) 2008-2009 Matt Rasmussen
# Author: Matt Rasmussen <rasmus@mit.edu>
#
# 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... | gemagomez/keepnote | keepnote/gui/richtext/__init__.py | Python | gpl-2.0 | 45,733 | [
"VisIt"
] | 44b869185e14b4ca40aa902ddf51e11389322d425e4ea603774826c5a718bf0b |
# -*- coding: utf-8 -*-
"""
CKernel evaluation of blaze AIR.
"""
from __future__ import absolute_import, division, print_function
import operator
from pykit.ir import visit
from dynd import nd, ndt
import blaze
import blz
import datashape
from ....datadescriptor import DyNDDataDescriptor, BLZDataDescriptor
#-----... | xsixing/blaze | blaze/compute/air/execution/interp.py | Python | bsd-3-clause | 4,499 | [
"VisIt"
] | d1e07e3ded691d971e7b5266885dda83be1bb07c483575468917c79b59efc815 |
"""
The main client API you'll be working with most often. You'll need to
configure a dropbox.session.DropboxSession for this to work, but otherwise
it's fairly self-explanatory.
"""
import re
import json
from dropbox.rest import ErrorResponse
from dropbox.rest import RESTClient
def format_path(path):
"""Normal... | youtify/youtify | dropbox/client.py | Python | mit | 29,273 | [
"VisIt"
] | eecea9e35c670be3e06fa9b65f1fa3f55e1be13845050f491e8d0498bdf0a7fe |
from cube_helpers import Atom, Cube, InputFormatError
import re
import math
from fortranformat import FortranRecordWriter
esp_type_in_log = {
' Merz-Kollman atomic radii used.': 'mk',
' Francl (CHELP) atomic radii used.': 'chelp',
' Breneman (CHELPG) radii used.': 'chelpg',
' Generate Potential Derive... | jszopi/repESP | repESP_old/charges.py | Python | gpl-3.0 | 12,987 | [
"Gaussian"
] | 0eb9724709e218881c11612a3ea29e591eddb92197f9a63f086c07cd9dea61e4 |
"""
GPoFM: Gaussian Process Training with
Optimized Feature Maps for Shift-Invariant Kernels
Github: https://github.com/MaxInGaussian/GPoFM
Author: Max W. Y. Lam [maxingaussian@gmail.com]
"""
import os, sys
import numpy as np
import numpy.random as npr
import matplotlib.pyplot as plt
from GPoFM import *
#####... | MaxInGaussian/GPoFM | examples/co2/CO2_1d_regression.py | Python | bsd-3-clause | 2,866 | [
"Gaussian"
] | b77a092fed7ecc80ed00c6cf0d983ba05221c776e6bae5a564819f4474123a29 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | fweik/espresso | testsuite/python/interactions_bonded_interface.py | Python | gpl-3.0 | 6,909 | [
"ESPResSo"
] | f1986ce78c459114a3bbd37172266460670d19962f57d89fdde3ec24cabbc6e7 |
""" Module that holds the ReportGeneratorHandler class
.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN ReportGenerator
:end-before: ##END
:dedent: 2
:caption: ReportGenerator options
"""
import os
import datetime
from DIRAC import S_OK, S_ERROR, rootPath, gConfig, gLogger
from DIRAC.Core.Utili... | DIRACGrid/DIRAC | src/DIRAC/AccountingSystem/Service/ReportGeneratorHandler.py | Python | gpl-3.0 | 9,228 | [
"DIRAC"
] | 2da60f836cfb2bb3a220b252fd1a1499040297cb5820cda62f3ca783dc0b5dbe |
from typing import Callable, List, Optional, Tuple, Union
import numpy as np
import os
import scipy.sparse
import scipy.io as sio
from scipy.interpolate import RegularGridInterpolator
from spins import fdfd_solvers
from spins import fdfd_tools
from spins import gridlock
from spins.invdes import problem
from spins.fdf... | stanfordnqp/spins-b | spins/invdes/problem_graph/creator_em.py | Python | gpl-3.0 | 29,422 | [
"Gaussian"
] | 03f30fa362ab99b55704ce9460ea5cbe6c3444b9afa7e10a4ac56d89ca510f63 |
# -*- coding: UTF-8 -*-
"""
``merge_table``
------------------------
:Authors: Menachem Sklarz
:Affiliation: Bioinformatics core facility
:Organization: National Institute of Biotechnology in the Negev, Ben Gurion University.
A module for merging sample tables into a single project-wide table, or into group tables b... | bioinfo-core-BGU/neatseq-flow_modules | neatseq_flow_modules/main_NSF_classes/miscellaneous/merge_table.py | Python | gpl-3.0 | 15,615 | [
"BLAST"
] | 86896b3a9e5b0e93a42eb4607d04f043602afe24efa840b5d436f32f6e60155c |
# Copyright 2021 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... | Intel-Corporation/tensorflow | tensorflow/python/util/nest.py | Python | apache-2.0 | 66,328 | [
"VisIt"
] | 370ce6c2c3da89532e01f4d39e0ac87eeebe02e48cb7112fe304440e3ff91b91 |
#!/usr/bin/env python
from ABINIT_variables import variables
from ABINIT_groups import groups
from ABINIT_sections import sections
TMPSUFFIX='_new'
def create_dictio(listofvariables):
# Create the dictionary of variables
dictio={}
for i in listofvariables:
if not i[0] in dictio.keys():
... | SamKChang/abinit-7.10.5_multipole | doc/input_variables/GAF_not_activated/make_input_variables_htmls.py | Python | gpl-3.0 | 8,252 | [
"ABINIT"
] | e9f60ae0c343869fff6182c2dc26c7af0bf442fa1a82270c7ba0a2a901d78a5f |
import claudio
import datetime
import logging
import logging.config
import numpy as np
import os
import pandas as pd
import shutil
import re
import wave
import zipfile
import colorama
COLOR_MAP = {
"yellow": colorama.Fore.YELLOW,
"red": colorama.Fore.RED,
"green": colorama.Fore.GREEN,
"blue": colorama... | ejhumphrey/harmonic-cnn | hcnn/common/utils.py | Python | isc | 10,773 | [
"Gaussian"
] | 0291d275cafadc54438126c7cce8524a423dc2f94641acb0910781c797e9deba |
""" This is the StorageElement class.
"""
# # custom duty
import copy
import datetime
import errno
import os
import re
import sys
import threading
import time
from functools import reduce
# # from DIRAC
from DIRAC import gLogger, gConfig, siteName
from DIRAC.Core.Utilities import DErrno
from DIRAC.Core.Utilities.F... | fstagni/DIRAC | Resources/Storage/StorageElement.py | Python | gpl-3.0 | 53,872 | [
"DIRAC"
] | 680a66750430879e22b49aef23bd633ec1121b28e80961ba6ff87d9938fe4a76 |
import numpy as np
import unittest
import os
import discretize
try:
import vtk.util.numpy_support as nps
except ImportError:
has_vtk = False
else:
has_vtk = True
if has_vtk:
class TestCurvilinearMeshVTK(unittest.TestCase):
def setUp(self):
sz = [16, 16, 16]
mesh = dis... | simpeg/discretize | tests/base/test_curvilinear_vtk.py | Python | mit | 1,811 | [
"VTK"
] | 1752e76e547fc3a0d29301bb0f2dec2725840daa76d593d515a895e99ca0bcfa |
from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, antecedents, out_attributes, user_options, num_cores,
out_path):
import os
from genomicode import filelib
from genomicode im... | jefftc/changlab | Betsy/Betsy/modules/call_variants_mutect2.py | Python | mit | 5,448 | [
"VisIt"
] | 062e07d65d0cef0b120f7aa76e491926f9eba09e1fabd28d5aabd26703489f4c |
# This file contains waf optimisations for Samba
# most of these optimisations are possible because of the restricted build environment
# that Samba has. For example, Samba doesn't attempt to cope with Win32 paths during the
# build, and Samba doesn't need build varients
# overall this makes some build tasks quite a ... | QGuLL/samba | buildtools/wafsamba/samba_optimisation.py | Python | gpl-3.0 | 8,758 | [
"VisIt"
] | 67575dcf6a8fe911aaacf3c3e7ae7ff1a194202ef109986c5a8820ea1008fda4 |
"""Make sure we get an exception when an atom is too close to the boundary."""
from ase import Atoms
from gpaw import GPAW
a = 4.0
x = 0.1
hydrogen = Atoms('H', [(x, x, x)],
cell=(a, a, a),
calculator=GPAW(maxiter=7))
try:
e1 = hydrogen.get_potential_energy()
except RuntimeError:
... | qsnake/gpaw | gpaw/test/pbc.py | Python | gpl-3.0 | 351 | [
"ASE",
"GPAW"
] | c9e1b60330bc7e13a5e268fa01f5e01211615cba5a9960c2eacf8c050b3c36b6 |
# Copyright 2004 by Harry Zuzan. 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.
"""
Classes for accessing the information in Affymetrix cel files.
Functions:
read Read a ... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/Affy/CelFile.py | Python | gpl-2.0 | 8,692 | [
"Biopython"
] | f3732e5171ac984ff60eba65d5609bbe7cba8b88a6ff7de7a3f95853f358d040 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Format description
# @variables : camelCase
# @functions : snake_case
from keys import mispUrl, mispKey, csvTaxonomyFile, iocMispMapping
try:
from pymisp import PyMISP
except:
print("you need pymisp form github")
import sys
sys.exit(1)
... | pombredanne/PyMISP | examples/ioc-2-misp/ioc2misp.py | Python | bsd-2-clause | 11,599 | [
"Amber"
] | 47208d9869d9a56c5a7bf014be77315525350dbc94b4f3e6505fffd8d4d54189 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/integrator/TDforce.py | Python | gpl-3.0 | 2,097 | [
"ESPResSo"
] | 810a9a5995a110b17e705c9f9ef4f2f4d4f9da138e41fe8cb831562fed7e7bbc |
import numpy as np
import sys
import os
import time
from ase.units import Bohr
from ase.lattice import bulk
from gpaw import GPAW, PW
from gpaw.test import findpeak
from gpaw.atom.basis import BasisMaker
from gpaw.response.df import DielectricFunction
from gpaw.mpi import serial_comm, rank, size, world
from gpaw.utilit... | robwarm/gpaw-symm | gpaw/test/aluminum_EELS_RPA.py | Python | gpl-3.0 | 1,952 | [
"ASE",
"GPAW"
] | c0338e83a3d83fab46ad81e81e3cd3247d51d6f5c53f5f3f68ca05c5e4840410 |
"""Basic class for interacting with NAMD standard output as a log file"""
from __future__ import division, print_function
from future.utils import iteritems
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from requests.structures import CaseInsensitiveDict
from m... | radakb/pynamd | pynamd/log.py | Python | mit | 36,010 | [
"Amber",
"CHARMM",
"NAMD"
] | 4dc049ec1710fb4187a4331b2c37adeff15e23c9251cc921d488a05b8370b55f |
#!/usr/bin/env python
import gc
import sys
import time
import numpy as np
try:
# Matplotlib is not a dependency
import matplotlib as mpl
mpl.use('Agg') # force the antigrain backend
except (ImportError, RuntimeError):
mpl = None
from ase.units import Bohr
from gpaw.mpi import world, distribute_cpus
... | ajylee/gpaw-rtxs | gpaw/test/parallel/ut_hsops.py | Python | gpl-3.0 | 31,143 | [
"ASE",
"GPAW"
] | 577d9ea25d073b854201e71519cd48dc3166b6449ecf9a31cde3e9a39d43ed66 |
# Basic setup.py structure from:
# http://stackoverflow.com/questions/16981921/relative-imports-in-python-3
from setuptools import setup, find_packages
setup(name='tmd', packages=find_packages(),
install_requires=[
'numpy',
'matplotlib',
'ase',
'pyyaml',
... | tflovorn/tmd | setup.py | Python | mit | 357 | [
"ASE"
] | 66ddb7d94d16600c80b1cef9e4dc44f2756fb618c231e696e73f742cc85c5102 |
#!/usr/bin/env python3
"""
This script is a python version of TimingAccuracy. We use some numpy functions
to simplify the creation of random coefficients.
"""
import time
import numpy as np
from pyshtools import expand
from pyshtools import spectralanalysis
# ==== MAIN FUNCTION ====
def main():
TimingAccuracyDH(... | MarkWieczorek/SHTOOLS | examples/python/TimingAccuracy/TimingAccuracyDH.py | Python | bsd-3-clause | 2,528 | [
"Gaussian"
] | c9a81d6a80d237648e9726eb15b14b2d2e71c39dec4aa00be2f945b5fbe8996f |
import numpy as np
import matplotlib.pyplot as plt
import nengo
"""
This example demonstrates how to create a neuronal ensemble
that represents a two-dimensional signal.
Network diagram:
[Input] ---> (Neurons)
Network behaviour:
Neurons = Input
"""
model = nengo.Model('2D Representation')
model.make_node... | jaberg/nengo | examples/2drepresentation.py | Python | mit | 987 | [
"NEURON"
] | de38f925088b4e68666fd6fc5eff94ef6fd7625f434d10599e53449a661ebbfa |
#----------SAMPLE----------#
"" #Research name, with either attack or research or special in front of it (ALL CAPS WORD: name)
["PRE"] = [""] # prerequisites
["DESC"] = """
Name reapeated
Type
Description
"""
["BUIL"] = [""] # for attacks, shows which buildings can use it
["COST"] = 0 # cost to research
["EX... | Saevon/astralgame | Astral (Python)/Research.py | Python | mit | 3,205 | [
"CRYSTAL"
] | 50693a98deb6bb6b7b6d3b3e5fbcdfec97d81823d3a924375a04cc84ce829716 |
#/*
# *
# * TuneIn Radio for XBMC.
# *
# * Copyright (C) 2013 Brian Hornsby
# *
# * 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... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/plugin.audio.tuneinradio.smallplayer/resources/lib/xbmcsettings.py | Python | gpl-2.0 | 1,936 | [
"Brian"
] | d1bafa40a9e0b22e20fc5b118e9fb6fa835233e2915de832747b928b88944a8e |
import astropy.table
import numpy as np
import pandas as pd
def load(path,
x_cols=('psfMag_u', 'psfMag_g', 'psfMag_r', 'psfMag_i', 'psfMag_z'),
y_col='redshift',
class_col='class',
class_val='Galaxy'):
# Cast x_cols to list so Pandas doesn't complain…
x_cols_l = list(x_cols... | alasdairtran/mclearn | projects/jakub/splitter.py | Python | bsd-3-clause | 2,801 | [
"Galaxy"
] | 62b0f2a4428dabb5a89361eee3058452634afa8ad014bd0544275ac94918a100 |
import csv
from datetime import datetime
import psycopg2
import psycopg2.extensions
import psycopg2.extras
import re
import types
from pprint import pprint
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
"""
Basic ETL script to denorma... | villagereach/openlmis-distributions-etl | distributions-etl.py | Python | agpl-3.0 | 26,364 | [
"VisIt"
] | f41019a83101df3c78d114409248056e61c04ecdf902627d90a72b21b0d30c91 |
"""Reusable decorators and functions for custom installations.
"""
from contextlib import contextmanager
import datetime
import functools
import os
import socket
from string import Template
import tempfile
from tempfile import NamedTemporaryFile
import urllib
import uuid
import subprocess
from fabric.api import *
from... | lpantano/cloudbiolinux | cloudbio/custom/shared.py | Python | mit | 27,661 | [
"Galaxy"
] | b024564153dc70a2bee5d80666e704e5d1c8a2ec74369f8d3588fcff6c250246 |
""" QualityGraph represents a Quality Map of entities as a special color schema
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phedex Project by ... <to be added>
"""
import datetime
from pylab import setp
from matplotlib.colors import Normalize
import matplotlib.cm as cm
f... | fstagni/DIRAC | Core/Utilities/Graphs/QualityMapGraph.py | Python | gpl-3.0 | 7,418 | [
"DIRAC"
] | 3b969ecb5c1a600f206d1a7ff659488a7c2a201b4e9b152ecb456ec2526472ee |
# License: BSD 3 clause
from math import sqrt
import numpy as np
from scipy.stats import chi
from sklearn.base import BaseEstimator
from sklearn.base import TransformerMixin
from sklearn.utils import check_array, check_random_state
from ..utils._cyfht import fht2 as cyfht
class Fastfood(BaseEstimator, TransformerM... | scikit-learn-contrib/scikit-learn-extra | sklearn_extra/kernel_approximation/_fastfood.py | Python | bsd-3-clause | 7,735 | [
"Gaussian"
] | 305489209d8c3b65ad1564065ba71f06755dd080c6352d623b5a33d9a73e323f |
# coding: utf-8
# Code source: Brian McFee
# License: ISC
"""
==============
PCEN Streaming
==============
This notebook demonstrates how to use streaming IO with `librosa.pcen`
to do dynamic per-channel energy normalization on a spectrogram incrementally.
This is useful when processing long audio files that are too ... | bmcfee/librosa | docs/examples/plot_pcen_stream.py | Python | isc | 3,939 | [
"Brian"
] | 1e501fc0b1f3435cde4066d4507c757d8daa84669c7c9c7fe043eab17cef9d8e |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
from mock import MagicMock
import sys
mocked_gfal2 = MagicMock()
sys.modules['gfal2'] = mocked_gfal2
from DIRAC.Resources.Storage.GFAL2_XROOTStorage import GFAL2_XROOTStorage
class XROOTStora... | yujikato/DIRAC | src/DIRAC/Resources/Storage/test/Test_GFAL2_XROOTStorage.py | Python | gpl-3.0 | 1,629 | [
"DIRAC"
] | 6f79102df7a510285ab51a882e16a02547e2380f71a257d5008ea06c6519b7d5 |
#!/usr/bin/python
import os
from distutils.core import setup
from evelink import __version__
__readme_path = os.path.join(os.path.dirname(__file__), "README.md")
__readme_contents = open(__readme_path).read()
setup(
name="EVELink",
version=__version__,
description="Python Bindings for the EVE Online API... | EricE/evelink | setup.py | Python | mit | 1,351 | [
"Amber"
] | 684ffb73d1b1528462f6ed38a7d1858bdcff84581ddbf70b192d6d03f637cf35 |
# -*- coding: utf-8 -*-
"""
===================================================================
Determining and plotting the altitude/azimuth of a celestial object
===================================================================
This example demonstrates coordinate transformations and the creation of
visibility cur... | funbaker/astropy | examples/coordinates/plot_obs-planning.py | Python | bsd-3-clause | 6,256 | [
"VisIt"
] | acf72c7d45b714149a27d722fc07da683b5f9d96dc19f47977057d7d25427204 |
""" VRT shim to allow NetCDFs as multiband rasters in QGIS
Source: Taken in large part from `tilezilla.stores.vrt`:
https://github.com/ceholden/tilezilla/blob/master/tilezilla/stores/vrt.py
"""
from collections import defaultdict
import os
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import ElementTr... | ceholden/TSTools | tstools/src/ts_driver/drivers/datacube/_vrt.py | Python | gpl-2.0 | 4,643 | [
"NetCDF"
] | b2419f1372e7cb770a8290d47b2f79315dfe86cea92236a5b5b23a3939cc4f26 |
# -----------------------------------------------------------------------------
# User configuration
# -----------------------------------------------------------------------------
outputDir = '/Users/seb/Desktop/diskout-composite-with-normal/'
inputFile = '/Users/seb/Downloads/ParaViewData-3.10.1/Data/disk_out_ref.ex... | Kitware/arctic-viewer | scripts/examples/paraview/samples/composite-diskout.py | Python | bsd-3-clause | 4,627 | [
"ParaView"
] | 1285442eeb60e83c37250ee5699db8f567332b017b64127b319c159263fa60b5 |
# HsolveInstability.py ---
# Commentary:
#
# A toy compartmental neuronal + chemical model in just a cubic volume
#
# 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, or
# (at yo... | BhallaLab/moose | moose-examples/snippets/cubeMeshSigNeur.py | Python | gpl-3.0 | 11,965 | [
"MOOSE"
] | ded32efdd42620dd21d60cd5ebaa05afa560dd6eb1dd95d1dcca030ee382f90e |
#!/usr/bin/env python3
from setuptools import setup
import multiprocessing
import os
version = 'x'
if os.path.exists('../VERSION'):
version = open('../VERSION').read().strip()
setup(
name='gubbins',
version=version,
description='Frontend to the Gubbins BioInformatics tool',
author='Andrew J. Page',... | andrewjpage/gubbins | python/setup.py | Python | gpl-2.0 | 1,237 | [
"Biopython"
] | ab1cf0c1425ae4df44c88d49941c4599ed5fab7bbba91c0891eb926e5e7ef2a8 |
#===============================================================================
# LICENSE XOT-Framework - CC BY-NC-ND
#===============================================================================
# This work is licenced under the Creative Commons
# Attribution-Non-Commercial-No Derivative Works 3.0 Unported Lic... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/net.rieter.xot.smallplayer/resources/libs/helpers/sessionhelper.py | Python | gpl-2.0 | 3,449 | [
"VisIt"
] | f3d3f60a0f3c8da1fe1026bbef38f401e4dbb714bb81b6da78530926b8c5b5a6 |
import pytest
from capybara.exceptions import ElementNotFound
from capybara.tests.helpers import extract_results
class TestWithNode:
@pytest.fixture(autouse=True)
def setup_session(self, session):
session.visit("/with_scope")
def test_asserts_content_in_the_given_scope(self, session):
wi... | elliterate/capybara.py | capybara/tests/session/test_with_node.py | Python | mit | 3,047 | [
"VisIt"
] | 2ae7a1c342e49dc278e87cd10b9d8be1d5c92b501803dd64085f2e5ca0b20bdd |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""\
Wrapper script around Rietveld's upload.py that simplifies working with groups
of files.
"""
import json
import optparse
impo... | Neozaru/depot_tools | gcl.py | Python | bsd-3-clause | 51,316 | [
"VisIt"
] | 7ea91a8540119f41f4d5f168d5c04e9d7a24d011a7f255a86edf19eda9f388d1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""fitting.py -- Default posterior probability function and high-level fitting
methods for prospector
"""
import time
from functools import partial as argfix
import numpy as np
from scipy.optimize import minimize, least_squares
from .minimizer import minimize_wrapper,... | bd-j/bsfh | prospect/fitting/fitting.py | Python | gpl-2.0 | 19,201 | [
"Gaussian"
] | ec8f963e9fef97a4d01dcdaeb1b056316d010254a1eb991c5450b01b078fdc6f |
import collections
import pparser
import tracker
import util
import besttmplcalc
import logging
class GroupTemplate(object):
def __init__(self,template,term = None):
self.term = term
if template is not None:
self.template = pparser.parseone(str(template))
self._tracker = tr... | ieb/timetables | python/lib/grouptemplate.py | Python | agpl-3.0 | 2,927 | [
"BLAST"
] | 8bcaa6b223a9e4743ae4d63305e05661f4e3ce75eed8e051dea624894fa1d059 |
# ------------------------------------------------------------------------------
# Name: xlwsf_statuscheck
# Purpose: Parse objects.txt for Excel worksheet functions to validate
# its list of page links.
#
# Author: Brian Skinn
# bskinn@alum.mit.edu
#
# Created: 11 Oct ... | bskinn/intersphinx-xlwsf | xlwsf-statuscheck.py | Python | mit | 1,952 | [
"Brian"
] | 15a949feecc44d5566beb2d7c52858bd0913ed72212ee0a424d904ccce52bd99 |
import sys
from pycparser.c_ast import *
from pycparser.c_parser import CParser, Coord, ParseError
from pycparser.c_lexer import CLexer
def expand_decl(decl):
""" Converts the declaration into a nested list.
"""
typ = type(decl)
if typ == TypeDecl:
return ['TypeDecl', expand_d... | pombredanne/pycparser-1 | z_test.py | Python | bsd-3-clause | 3,500 | [
"VisIt"
] | bd24d790efe219684b8c82cab11d873259a139943dcf0179c4e949c86696522d |
#!/usr/bin/env python3
# This script is written in such a way as to maximize the code surface
# area checkable by e.g. pylint, because it REALLY SUCKS to wait for
# hours in a slurm queue only to discover that we made a typo.
#
# This module contains a number of convoluted practices all to this effect, such as:
# ... | ExpHP/vaspmd | vaspmd/search.py | Python | mit | 11,400 | [
"VASP"
] | a88d4c7d6f4ba6bd1cc6af32d0d00f2e821e311dac7687191774c75d71665f5e |
#
#
# File to generate network for execution on parallel NEURON
# Note this script has only been tested with UCL's cluster!
#
# Author: Padraig Gleeson
#
# This file has been developed as part of the neuroConstruct project
# This work has been funded by the Medical Research Council and the
# Wellco... | pgleeson/TestArea | models/IonTest/pythonScripts/Test.py | Python | gpl-2.0 | 3,021 | [
"NEURON"
] | c26e0b2cdbd108de346570b2f63342cf1ad6a9df79069e8d19c6b5763b7b4de9 |
###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2008-2009 Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License v... | racemidev/WMI_cmd | pysamba/wbem/Query.py | Python | gpl-2.0 | 9,353 | [
"VisIt"
] | dc0264b862b903ab6788120c22317eac14e32d56181d385956bc36d618c8a927 |
'''
Created on Aug 3, 2011
@author: sean
'''
from . import Visitor
import ast
class SymbolVisitor(Visitor):
def __init__(self, ctx_types=(ast.Load, ast.Store)):
if not isinstance(ctx_types, (list, tuple)):
ctx_types = (ctx_types,)
self.ctx_types = tuple(ctx_types)
def visitDefau... | diana-hep/femtocode | lang/femtocode/thirdparty/meta/asttools/visitors/symbol_visitor.py | Python | apache-2.0 | 1,506 | [
"VisIt"
] | 46df458f0765b14ede04cd18ae52e66e64f3828f366146121664b5e1a34a0e8c |
DICTIONARY = [
('a', 'about'),
('a', 'at'),
('a', 'in'),
('a', 'to'),
('a', 'will'),
('a l\xc3\xa8z', 'at'),
('a jenou', 'kneeling'),
('a la fen', 'finally'),
('al\xc3\xa8 ki le', 'finally'),
('finalman', 'finally'),
('a pye', 'on'),
('a pye', 'walking'),
('a nouvo', ... | grahams/Tradui | dbtools/tradui_dict.py | Python | apache-2.0 | 163,954 | [
"ASE",
"Amber",
"BWA",
"CASINO",
"Firefly",
"GULP"
] | 8217add217f0ed6e858f498ae16819ba5b0edf9de23309553d8c11dcc3c8325b |
"""
Process raw data.
Populate query, product, query_product tables with data from user, visit.
"""
from utils import timeit
from query_extract import load_stop_words, QueryExtractor
class RawDataPreprocessor(object):
"""Populate query, product, query_product tables.
Make sure to source tables.sql before usin... | kavinyao/SKBPR | preprocess.py | Python | mit | 5,856 | [
"VisIt"
] | a9bd12a6f9429a9ab66bc69e01a6dab41bc29e602cb7bd7daa2102f1c9b049b8 |
from pymatgen.util.testing import PymatgenTest
import unittest
import os
import warnings
from pymatgen.analysis.solar.slme import optics, slme
class SolarTest(PymatgenTest):
_multiprocess_shared_ = True
def setUp(self):
warnings.simplefilter("ignore")
def tearDown(self):
warnings.simplef... | mbkumar/pymatgen | pymatgen/analysis/solar/tests/test_slme.py | Python | mit | 712 | [
"pymatgen"
] | e176cc99c514e2fc14cc34d7ff1037ea0c9b038edbaa3382bee403c7af066357 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.