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 python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | harterj/moose | modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_2.py | Python | lgpl-2.1 | 1,882 | [
"MOOSE"
] | 3cff44932b2c935b2d41024f7ce74f5d9ff532db63206a890dfa1b03264f6fa6 |
# -*- coding: utf-8 -*-
"""Implementation of execution-related magic functions."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import ast
import bdb
import builtins as builtin_mod
import gc
import itertools
import os
import shlex
import sys
import time
import ... | Foxfanmedium/python_training | OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/IPython/core/magics/execution.py | Python | apache-2.0 | 54,460 | [
"VisIt"
] | 1d1a05a8b73f6263e725382e537af048a6825bbaaa35218fa35cff98d28503a0 |
from stencil_kernel import *
import sys
import numpy
import math
width = int(sys.argv[2])
height = int(sys.argv[3])
image_in = open(sys.argv[1], 'rb')
stdev_d = 3
radius = stdev_d * 3
class Kernel(StencilKernel):
def run(self, in_grid, out_grid):
self.kernel(in_grid, self.gaussian(stdev_d, radius*2), self.... | richardxia/asp-multilevel-debug | specializers/stencil/demo/mallard/gaussian_filter.py | Python | bsd-3-clause | 1,835 | [
"Gaussian"
] | 883e75c97c47c4e745e85d40ccc63204cc4b3902289a0e2e678e97d7ad8f2bb0 |
"""Bulk Al(bcc) test"""
from math import sqrt
from ase import Atoms
from ase.visualize import view
from gpaw import GPAW
afcc = 3.985 # Theoretical fcc lattice parameter
a = afcc * 2**(-1/3.) # Assuming the same volume per atom
a = afcc * sqrt(2/3.) # Assuming the same nearest neighbor distance
bulk = Atom... | qsnake/gpaw | doc/exercises/aluminium/Al_bcc.py | Python | gpl-3.0 | 1,398 | [
"ASE",
"GPAW"
] | 0caf4a41987e313d22d7012e4cf65ffcaf9a52c4ac2b90ca40e36011709bac0c |
# -*- coding: utf-8 -*-
"""
***************************************************************************
OTBUtils.py
---------------------
Date : 11-12-13
Copyright : (C) 2013 by CS Systemes d'information (CS SI)
Email : otb at c-s dot fr (CS SI)
Contrib... | herow/planning_qgis | python/plugins/processing/algs/otb/maintenance/OTBSpecific_XMLcreation.py | Python | gpl-2.0 | 26,427 | [
"Gaussian"
] | f97b0a27517ae6c84fb869df7ed5a224ac0483c699dff652113280b7f148d499 |
from setuptools import setup
setup(name='SportStat',
version='0.1',
description='sport statistics data analysis and REST API',
url='',
author='Nathan Breitsch, Brian Breitsch',
author_email='brianbreitsch@gmail.com',
packages=['sportstat', 'sportstat_server'],
zip_safe=False)
| brianbreitsch/sportstat | setup.py | Python | bsd-3-clause | 320 | [
"Brian"
] | e5fba82f3c6dae0f21219f49080360b3e666c2876839f333b32ffd64ee6f583d |
# created by Chirath R, chirath.02@gmail.com
# -*- coding: utf-8 -*-
import datetime
from django.contrib.auth.models import User
from django import forms
from django.contrib.sites.shortcuts import get_current_site
from django.forms.utils import ErrorList
from django.shortcuts import redirect
from django.urls import rev... | amfoss/fosswebsite | workshop/views.py | Python | mit | 13,671 | [
"VisIt"
] | 6306bd938f22b06a3da5295d81046b369d7f4a7e3afe6052fef43e053ac705be |
import numpy as np
import warnings
from .. import Spectrum
def test_eqw():
dx = 0.1
x = np.arange(-6,6,dx)
y = 1-np.exp(-x**2 / 2.)
with warnings.catch_warnings():
# ignore warning about creating an empty header
warnings.simplefilter('ignore')
sp = Spectrum(xarr=x, data=y)
... | low-sky/pyspeckit | pyspeckit/spectrum/tests/test_eqw.py | Python | mit | 1,681 | [
"Gaussian"
] | 315c59d01e3919435773639eb63246c8c0cbf9c8702d6d0a96642673af708916 |
# -*-python-*-
#
# Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit h... | marcellodesales/svnedge-console | svn-server/lib/viewvc/idiff.py | Python | agpl-3.0 | 5,484 | [
"VisIt"
] | c02786d086859a6372538f01c2f25f595018066556f7ce535d688c8cec4db555 |
#!/usr/bin/env python
#
# Scipy.stats examples.
#
#
# agomez (at) tacc.utexas.edu
# 30 Oct 2014
#
# ---------------------------------------------------------------------
import scipy as sp
import numpy as np
s = sp.rand(50)
#Show the mean, variance, std. deviation and the median
mean = sp.mean(s)
std = sp.std(s)
prin... | antoniogi/HPC | Python/TACC_HPC/3_scipy/stats.py | Python | apache-2.0 | 893 | [
"Gaussian"
] | 08cbc67583df07f3103c0e77d1c858d49ac5d2b1c680ba0a1774b404cfe9052c |
"""This module defines an alternative ASE interface to VASP.
In contrast to the original VASP-interface an additional
correction can be added to the potential energy and the forces.
"""
import numpy as np
import vasp
import sys
from ase.dftd.dftd_interface import d2_pbc as d2_pbc
from ase.dftd.dftd_interface import d3_... | alexei-matveev/ase-local | ase/calculators/vasp_d.py | Python | gpl-2.0 | 6,228 | [
"ASE",
"VASP"
] | 6314aa57aa74f4d45df7961b2f4c3de438e3188a3511db7979cbbc50fa3be43d |
#!/usr/bin/env python
#
# earthshook.py
# pyanalysis
#
# Created by Brian Baughman on 1/23/10.
# Copyright (c) 2010 Brian Baughman. All rights reserved.
#
try:
import re, sys, time
from time import sleep
from os import environ, _exit
except:
print 'Failed to load base modules'
sys.exit(-1)
try:
from b... | bbaugh/earthshook | earthshook.py | Python | gpl-2.0 | 5,498 | [
"Brian"
] | 92d084b70470fd1a4e0d39623f43881e1def60ff476bdce1c2fac4d29aa4d7e3 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import datetime
import errno
import json
from sqlalchemy import orm
from DIRAC.DataManagementSystem.Client.FTS3Job import FTS3Job
from DIRAC.DataManagementSystem.private import FTS3Utilities
from DIRAC.DataMana... | yujikato/DIRAC | src/DIRAC/DataManagementSystem/Client/FTS3Operation.py | Python | gpl-3.0 | 21,190 | [
"DIRAC"
] | 145d0380a23870a509ff13402a28650d36a8f60aba4b293e8399e7081e76a95e |
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import _, gobject
from zeroinstall.support import tasks
from zeroinstall.injector import handler, download
version = '1.13'
class GUIHandler(handler.Handler):
dl_callbacks = None # Download -> [ c... | michel-slm/0install | zeroinstall/0launch-gui/gui.py | Python | lgpl-2.1 | 2,898 | [
"VisIt"
] | 123016491bb0f050d5a865a7acf19a240be7a2ea49a1f81f2f37b0248a9ddf2b |
#!/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/Openwebif | plugin/controllers/views/ajax/epgpop.py | Python | gpl-2.0 | 9,261 | [
"VisIt"
] | 97b136f58a9205cf3d4aa579c3c17daf9b72f40610acdd0414802d387775580d |
import time
import socket
import random
import logging
import warnings
import six
from six.moves import range
from six.moves.queue import Queue
from io import BytesIO
from gzip import GzipFile
from itertools import count
import requests
from collections import deque
from threading import Thread, Event
from .utils impor... | scrapinghub/python-hubstorage | hubstorage/batchuploader.py | Python | bsd-3-clause | 9,293 | [
"Gaussian"
] | 6b43d3a17bbe9c5ab23ec8650cc491a2ad77db697383c6db8165cacac30a92d4 |
import json
import logging
from datetime import datetime
import ddt
from django.urls import reverse
from django.http import Http404
from django.test.client import Client, RequestFactory
from django.test.utils import override_settings
from django.utils import translation
from edx_django_utils.cache import RequestCache
... | ahmedaljazzar/edx-platform | lms/djangoapps/discussion/tests/test_views.py | Python | agpl-3.0 | 85,111 | [
"VisIt"
] | 4ffe5b95ee6a5ac0835d835d776251265a7d2c6f736560394d448d160427573d |
""" Figs sub module to generate figures"""
# Global variable that gives us imports status
FIGS = True
try:
import cclib
from cclib import parser
import numpy as np
import matplotlib.pyplot as plt
except ImportError:
FIGS = False
def figs(opts):
"""
Determine type of output from opts or f... | ben-albrecht/qcl | qcl/figs.py | Python | mit | 4,021 | [
"cclib"
] | eb82a304912a23bb36ba752a2e4541419d25615ea893bd7aaae9418ffcc33f60 |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | Lekensteyn/buildbot | master/buildbot/changes/svnpoller.py | Python | gpl-2.0 | 17,985 | [
"Brian"
] | 5d2a50cb6111902bd0b67b9e00ec07473e4c8fbec255d6ac34d4a70ec339ded5 |
"""
==============================================
Window functions (:mod:`scipy.signal.windows`)
==============================================
The suite of window functions for filtering and spectral estimation.
.. autosummary::
:toctree: generated/
get_window -- Return a window of a given length and ... | gfyoung/scipy | scipy/signal/windows/__init__.py | Python | bsd-3-clause | 1,778 | [
"Gaussian"
] | e93260a49a2caf68486f5fded927ed54c4cd30e87132627ee0968f49d5b8c675 |
from __future__ import print_function, division
from sympy.core.basic import C
from sympy.core.singleton import S
from sympy.core.function import Function
from sympy.core import Add
from sympy.core.evalf import get_integer_part, PrecisionExhausted
######################################################################... | wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/functions/elementary/integers.py | Python | mit | 5,301 | [
"VisIt"
] | 2416643732b3b373232987a3613f70ca21f60007689bba571fe1e85e90c9709b |
#!/usr/bin/env python
'''
Based on:
Zenke, Friedemann, Everton J. Agnes, and Wulfram Gerstner.
"Diverse Synaptic Plasticity Mechanisms Orchestrated to Form and Retrieve Memories in Spiking Neural Networks."
Nature Communications 6 (April 21, 2015).
Part of Zenke's rule embedded in modified Brunel 2000 / Ostojic 2014... | h-mayorquin/camp_india_2016 | tutorials/LTPinnetworks2/Step3e_Zenke_etal_2014.py | Python | mit | 9,216 | [
"Brian",
"NEURON"
] | 135d6309e862134f36ca1efae097647f6d08e12cf0a73cd7abba67239f296348 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from metaphone.metaphone import doublemetaphone
class MetaphoneTestCase(unittest.TestCase):
"""
"""
def test_single_result(self):
result = doublemetaphone(u"aubrey")
self.assertEquals(result, ('APR', ''))
... | oubiwann/metaphone | metaphone/tests/test_metaphone.py | Python | bsd-3-clause | 11,123 | [
"Brian"
] | edcbe1685121d2c654641b8f4dcb43d9a83a953b82830557a56f3fddd1727e17 |
#
# 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/h5md.py | Python | gpl-3.0 | 7,413 | [
"ESPResSo"
] | 394d44dc4b899c2262ecd36fcc6a32ab3744d7b8d84ef446ca0179152d7587de |
#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import cookielib
import glob
import inspect
import logging
import httplib
import os
import random
import re
import socket
import string
import sys
import tempfile
import threa... | undefinedv/Jingubang | sqlmap/lib/core/option.py | Python | gpl-3.0 | 93,494 | [
"VisIt"
] | 87a92e9d579a176a04e317de9ee5dae0bcefde5a10657dc7bb3e649c47a3018f |
# Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/ndimage/filters.py | Python | gpl-3.0 | 49,136 | [
"Gaussian"
] | 8dd660ea6dabc7a927bc3fb28aabb5444b9af45437ec805539a0f2a891cd7b28 |
########################################################################
# $HeadURL$
# Author : Andrei Tsaregorodtsev
########################################################################
"""
Utilities for managing DIRAC configuration:
getCEsFromCS
getUnusedGridCEs
getUnusedGridSEs
getSiteUpdates
get... | miloszz/DIRAC | ConfigurationSystem/Client/Utilities.py | Python | gpl-3.0 | 16,563 | [
"DIRAC"
] | 6af2f11c57dd89cf849848411c198f9686c51d7c62e90b191b3dcff61f3ff12d |
from . import chess
import copy
from . import common
sw, w, nw, n, ne, e, se, s = (-1, -1), (-1, 0), (-1, 1), (0, 1), \
(1, 1), (1, 0), (1, -1), (0, -1)
traversals = [
[sw, w, nw, n, ne, e, se, s], [sw, s, se, e, ne, n, nw, w],
[nw, n, ne, e, se, s, sw, w], [nw, w, sw, s, se, e, n... | dturevski/olive-gui | legacy/finales.py | Python | gpl-3.0 | 8,645 | [
"VisIt"
] | 4051b5d93f6a2acad275378cc99bf3309dc565b61757d80eea7ead82a42770f1 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements input and output processing from Gaussian.
"""
import re
import warnings
import numpy as np
import scipy.constants as cst
from monty.io import zopen
from pymatgen.core.composition import Compositi... | materialsproject/pymatgen | pymatgen/io/gaussian.py | Python | mit | 59,197 | [
"Gaussian",
"pymatgen"
] | 5caed03a0a6df9e5d5e8d669e2453654284b5085a8f8e2029aa701b8be8f0156 |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattergl"
_path_str = "scattergl.marker"
_valid_props = {
"autocolorscale",
... | plotly/python-api | packages/python/plotly/plotly/graph_objs/scattergl/_marker.py | Python | mit | 55,155 | [
"Bowtie"
] | 8ce5e70574befe6f6adfb165d246220a940d6977d1c5cc00c34a87e2fec4d3fd |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2016 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | kannon92/psi4 | psi4/share/psi4/databases/NCB31.py | Python | gpl-2.0 | 53,565 | [
"Psi4"
] | 3f9d9d5b0efafd833c161dee775977dfce13ec8927bb6e773e7bbd7de705231b |
"""PyQt v5 widget for VTK."""
__all__ = ['QVTKRenderWindowInteractor']
| mspark93/VTK | Wrapping/Python/vtk/qt5/__init__.py | Python | bsd-3-clause | 72 | [
"VTK"
] | bab0d4dca7b81f22afeccaff1d521847d048a069b3cbf99858d2dee4fad53bc7 |
"""Guess the MIME type of a file.
This module defines two useful functions:
guess_type(url, strict=1) -- guess the MIME type and encoding of a URL.
guess_extension(type, strict=1) -- guess the extension for a given MIME type.
It also contains the following, for tuning the behavior:
Data:
knownfiles --... | kleientertainment/ds_mod_tools | pkg/win32/Python27/Lib/mimetypes.py | Python | mit | 21,297 | [
"NetCDF"
] | 621d9bd7d8f1c32f6fffd490b12492bc7195c908a88530bc55893da5ebd83f46 |
from setuptools import setup
setup(
name='allay',
version='0.3.1',
description='Alleviate environmental pains',
url='https://github.com/brian-dlee/Allay.git',
author='Brian Lee',
author_email='briandl92391@gmail.com',
license='MIT',
packages=['allay'],
install_requires=[
'Py... | orionnetworksolutions/Allay | setup.py | Python | mit | 570 | [
"Brian"
] | e5b7f04cc90551d634c1afbe4ad109f7cf9cf155889bd642b38cdbb88d902fac |
# coding=utf-8
"""
License/Disclaimer
------------------
Copyright 2017 Brian Romanchuk
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 requ... | brianr747/sfc_gui | sfc_gui/__init__.py | Python | apache-2.0 | 618 | [
"Brian"
] | 410092c721f674ad506da0973a2b5b20a52f4579d62a09ff7d172e70319b9b19 |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" command line uti... | adalke/rdkit | rdkit/ML/GrowComposite.py | Python | bsd-3-clause | 19,778 | [
"RDKit"
] | ef62428206ad6d8a9496888fc807cbdddedcf27e4e26fbdc7efa39733beea010 |
#-*- coding:utf-8 -*-
# Panedr -- a library to manipulate Gromacs EDR file in python
# Copyright (C) 2016 Jonathan Barnoud
#
# 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
# vers... | jbarnoud/panedr | panedr/panedr.py | Python | lgpl-2.1 | 14,511 | [
"Gromacs"
] | 4318e8a77982cf2a0b5bb5868c93e8049db80e83b939d2addd3386c70df408be |
# 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.
#
"""Provide trainers which estimate parameters based on training sequences.
These should be used to 'train' a Markov Model prior to actually using
it... | zjuchenyuan/BioWeb | Lib/Bio/HMM/Trainer.py | Python | mit | 16,877 | [
"Biopython"
] | c6550395919ca0aaa146f7f47449943a746eb73d0ceecf41f8add56756ffa116 |
# ******************************************************************************
# Copyright 2014-2018 Intel Corporation
#
# 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.apa... | NervanaSystems/neon | tests/test_gradient_bias.py | Python | apache-2.0 | 3,767 | [
"Gaussian"
] | bb1e8a7282e018b126b600141d9c0e1ba5cf6359818488b66a8a18f42ebb171f |
# !usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under a 3-clause BSD license.
#
# @Author: Brian Cherinka
# @Date: 2017-09-20 13:24:13
# @Last modified by: Brian Cherinka
# @Last Modified time: 2018-11-15 12:00:27
from __future__ import absolute_import, division, print_function
import copy
from marvin ... | sdss/marvin | python/marvin/utils/datamodel/query/MPL.py | Python | bsd-3-clause | 3,336 | [
"Brian"
] | 66d0d108dc34cacc27743d8853f632ec9177f920efdf0e79a7bd8ee279fcf615 |
class gmx_atp():
def __init__(self,top):
self.top = top
def write_atp(self,filename):
def r(string,length):
string = str(string)
while len(string)<length: string=string+' ';
return string
def l(string,length):
string = str(string)
... | t-/gromacs_ligand_param | tools/top2itp/gmx_atp.py | Python | gpl-3.0 | 903 | [
"Amber"
] | b016072e0b1e266b477510e416c85ac3b49c7f26fc73b958c0733a53dac1f02c |
#
# @file TestXMLNamespaces.py
# @brief XMLNamespaces unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Michael Hucka <mhucka@caltech.edu>
#
# $Id: TestXMLNamespaces.py 11441 2010-07-09 02:22:23Z mhucka $
# $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/pytho... | alexholehouse/SBMLIntegrator | libsbml-5.0.0/src/bindings/python/test/xml/TestXMLNamespaces.py | Python | gpl-3.0 | 10,223 | [
"VisIt"
] | ae68a654c8dc24e73827f59200fe089aa1f8bcd1055ac078282f0a599c034b79 |
# Copyright 2016 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... | dyoung418/tensorflow | tensorflow/python/ops/distributions/special_math.py | Python | apache-2.0 | 14,730 | [
"Gaussian"
] | c8bdc0b19efaf66e448af3e695b8ea02c6d1e30a69993328193648ef72816cc2 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for Student's Profile Page.
"""
from contextlib import contextmanager
from datetime import datetime
from nose.plugins.attrib import attr
from common.test.acceptance.pages.common.logout import LogoutPage
from common.test.acceptance.pages.lms.account_settings import AccountS... | caesar2164/edx-platform | common/test/acceptance/tests/lms/test_learner_profile.py | Python | agpl-3.0 | 34,815 | [
"VisIt"
] | 2ac3ece5e93926ad2717de188aee5e5cb8c3ca79dfabb85ba294ef9749a32810 |
import os
import collections
import mdtraj as md
import copy
# pylint: disable=wildcard-import, missing-docstring, protected-access
# pylint: disable=attribute-defined-outside-init, invalid-name, no-self-use
# pylint: disable=wrong-import-order, unused-wildcard-import
# includes pytest
from .utils import *
# stuff t... | dwhswenson/contact_map | contact_map/tests/test_contact_map.py | Python | lgpl-2.1 | 43,947 | [
"MDTraj"
] | 58d1c616e01f54ddd5083bda1b769ccbc6bcfffe7985c899700eb2481fb38a38 |
try:
import scipy
except ImportError:
from ase.test import NotAvailable
raise NotAvailable('This test needs scipy module.')
import numpy as np
from ase.io import read, PickleTrajectory
from ase.lattice import bulk
from ase.calculators.emt import EMT
a0 = 3.52 / np.sqrt(2)
c0 = np.sqrt(8 / 3.0) * a0
print ... | JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/test/hcp.py | Python | gpl-2.0 | 1,115 | [
"ASE"
] | ec70ad6a80ad367571da37d04e2dcc91c9a220ffcd302a275e34e62d6baccf7a |
from click.testing import CliRunner
from perses.app.cli import cli
test_yaml = """
protein_pdb: Tyk2_protein.pdb
ligand_file: Tyk2_ligands_shifted.sdf
old_ligand_index: 0
new_ligand_index: 3
forcefield_files:
- amber/ff14SB.xml
- amber/tip3p_standard.xml
- amber/tip3p_HFE_multivalent.xml
- amber/phosaa10.xml
s... | choderalab/perses | perses/tests/test_cli.py | Python | mit | 1,082 | [
"Amber"
] | 0957e6ee9e7fb92f0a03cd7f53abc7362562efb695e62e64a5b47fc002a5061b |
##############################################################################
# Copyright 2018 Rigetti Computing
#
# 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://ww... | rigetticomputing/pyquil | pyquil/api/_devices.py | Python | apache-2.0 | 6,508 | [
"VisIt"
] | 514781aaae72c6b4115fda429cb221b2d230e61214396e28f8ed2a6889872221 |
#!/usr/bin/env python
"""
C.7 Mathematical Formulas (p187)
"""
from Arrays import Array
from plasTeX import Command, Environment, sourceChildren
from plasTeX import DimenCommand, GlueCommand
from plasTeX.Logging import getLogger
#
# C.7.1
#
# These space commands are only documented as being available in math mode... | themutt/plastex | plasTeX/Base/LaTeX/Math.py | Python | mit | 18,213 | [
"Bowtie"
] | efadb11fc38c8caddcf2da754d54a8ae800145f5ce8f98f822516c7cd418e323 |
#!/usr/bin/env python
# Computes and plots exact solution for "test V", in preparation for
# implementing C version for PISM verification.
from pylab import *
import subprocess
try:
from netCDF4 import Dataset as NC
except:
from netCDF3 import Dataset as NC
def permute(variable, output_order = ('time', 'z',... | JohannesFeldmann/pism | src/verif/tests/exactV.py | Python | gpl-2.0 | 3,843 | [
"NetCDF"
] | 3c3ac55825c9750ad2ec07fdd3553669b36b0b881361e753333ec921085aeaaf |
import functools
from wadl2rst.nodes.responses import ResponsesNode
def wrap_response_elements(tree):
""" Find all the <response> nodes and make sure they are wrapped by <responses>
nodes. """
# grab all the response nodes
response_nodes = []
response_vistor = functools.partial(get_response_nod... | annegentle/wadl2rst | wadl2rst/transformations/wrap_response_elements.py | Python | apache-2.0 | 1,220 | [
"VisIt"
] | ab1bbc9b78e313fa5464308fe07e304c6debcd9f1a8b84acca07e0422b68a705 |
# S.D. Peckham
# May 2010
import os
import sys
import time
import numpy
import file_utils
# import Nio # (a module in the PyNIO package)
#---------------------------------------------------------------------
# This class is for I/O of time-indexed 1D profiles to netCDF files.
#--------------------------------... | mdpiper/topoflow | topoflow/utils/ncps_files_Nio.py | Python | mit | 23,399 | [
"NetCDF"
] | 0826095298a952ae7a7f06c6f84058190a1e646309b1d0a16baa53be366fc74e |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vispy: gallery 30
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Just a very fake galaxy.
Astronomers and cosmologists will kill me !
"""
import numpy as np
from vispy import gl... | Eric89GXL/vispy | examples/demo/gloo/galaxy.py | Python | bsd-3-clause | 5,930 | [
"Galaxy"
] | b1a518f1b0310cd84c8a5943f5237a24a8e87b5c454adcabed12b76c09987266 |
from __future__ import print_function, division
inp = """
#File names and Format
#Directory to save output files
direc 'easy1000'
stem 'easy1000'
make_image 0
output '.gve' '.flt' '.par' '.ubi'
# Structural parameters
structure_phase_0 'Al.cif'
# Crystal/grains parameters
no_grains 1000
# Total number of grains summ... | jonwright/ImageD11 | test/simul_1000_grains/make_u_t_easy.py | Python | gpl-2.0 | 2,398 | [
"CRYSTAL"
] | 41ddb6ec28dc6f3b6982f46cc7d746734ff7c1f25af3f9bccfdb5856a2941eec |
"""
NetCDF reader/writer module.
This module is used to read and create NetCDF files. NetCDF files are
accessed through the `netcdf_file` object. Data written to and from NetCDF
files are contained in `netcdf_variable` objects. Attributes are given
as member variables of the `netcdf_file` and `netcdf_variable` objects... | yuanagain/seniorthesis | venv/lib/python2.7/site-packages/scipy/io/netcdf.py | Python | mit | 36,978 | [
"NetCDF"
] | 9f83bdad9a508a5a73299074ee285bf1a290a52cc2c42f661b5dab96487b35a0 |
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
Packet sending and receiving with libdnet and libpcap/WinPcap.
"""
import time
import struct
import sys
import platform
i... | smainand/scapy | scapy/arch/pcapdnet.py | Python | gpl-2.0 | 23,872 | [
"VisIt"
] | 3a5d343c78157de947f1ddaac3cb7f8673f87e65a02719fd04984b4d961715d1 |
# -*- coding: utf-8 -*-
import datetime
import json
import os
import shutil
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.core.urlresolvers import reverse
import mock
from nose.tools import eq_, ok_
from pyquery import PyQuery as pq
import amo
import am... | jinankjain/zamboni | mkt/submit/tests/test_views.py | Python | bsd-3-clause | 38,619 | [
"exciting"
] | 9b90f9b880b99b89c4be77bc1ec6a5682851d5d387d46955e93b72bc259ac973 |
#!/usr/bin/env python
"""
kafe2 example: Poisson cost function
====================================
In data analysis the uncertainty on measurement data is most often assumed to resemble a normal distribution.
For many use cases this assumption works reasonably well but there is a problem: to get meaningful fit result... | dsavoiu/kafe2 | examples/007_cost_functions/01_poisson_cost_function.py | Python | gpl-3.0 | 5,192 | [
"Avogadro"
] | df0a55af0b06443ce7f5bc7482e13cd9396e4affe41d5c0ef2a78ad8fd590447 |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | statsmodels/statsmodels | versioneer.py | Python | bsd-3-clause | 68,632 | [
"Brian"
] | 4e77f27356659b1cadb50993cf84a69ddb3bd99e396006e00dba52f0f4a028df |
import numpy as np
from scipy import special
import links as L
EPS = np.spacing(1.)
#==============================================================================
# Skeleton parent class for all families
#==============================================================================
class Family:
'''
Class... | awblocker/glm | lib/glm/families.py | Python | bsd-3-clause | 6,029 | [
"Gaussian"
] | b232c766a3c3c68226bb61b3315174103179b05b045462f91fe2b1acb7aae2b5 |
"""
===================================================================
Compute cross-talk functions (CTFs) for labels for MNE/dSPM/sLORETA
===================================================================
CTFs are computed for four labels in the MNE sample data set
for linear inverse operators (MNE, dSPM, sLORETA).... | effigies/mne-python | examples/inverse/plot_mne_crosstalk_function.py | Python | bsd-3-clause | 3,239 | [
"Mayavi"
] | 944697b8a3a9bbdcb125c045a7a4e7b3ddb0811ff6af02dfa883436aa833e72e |
#!/usr/bin/env python
# Author: Andrew Jewett (jewett.aij@gmail.com)
# License: MIT License (See LICENSE.md)
# Copyright (c) 2013
man_page_text = """
Usage (example):
ttree_render.py ttree_assignments.txt < file.template > file.rendered
The argument (ttree_assignments.txt) should be a 2-column file containing
ttr... | jewettaij/moltemplate | moltemplate/ttree_render.py | Python | mit | 6,332 | [
"LAMMPS"
] | 30f9fdf361b27a5087747a26be2bf6e91478d206c8c7ebd9a72a6e49792654b4 |
from __future__ import annotations
import math
import os
import pytest
from scitbx import matrix
class SpotPredictor:
def __init__(self, dials_regression):
import dxtbx
from iotbx.xds import integrate_hkl, xparm
from rstbx.cftbx.coordinate_frame_converter import coordinate_frame_convert... | dials/dials | tests/algorithms/spot_prediction/test_spot_prediction.py | Python | bsd-3-clause | 6,553 | [
"CRYSTAL"
] | 49e0bf735d659b7a828939ec8ee5f3abf2e63f529dee840c66979debf059641f |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import locale
import os
import sys
from ctypes import c_size_t, c_void_p, c_wchar_p
from logging import NullHandler, getLogger
from subprocess import check_output
from pymediainfo import MediaInfo
from pymediainfo import __version__ as pymediainfo_versi... | fernandog/Medusa | ext/knowit/providers/mediainfo.py | Python | gpl-3.0 | 15,401 | [
"VisIt"
] | 270b6fad8c8c84936310c80f6b090858c741332ce710d61ac2362cb9337b9e9c |
"""Helper functions for creating the most common surfaces and related tasks.
The helper functions can create the most common low-index surfaces,
add vacuum layers and add adsorbates.
"""
from math import sqrt
from operator import itemgetter
import numpy as np
from ase.atom import Atom
from ase.atoms import Atoms
f... | askhl/ase | ase/lattice/surface.py | Python | gpl-2.0 | 15,129 | [
"ASE"
] | 35cc9b8773b57468af73c59dd48bd48ed9dd0ed6c850dd00d45c15739b10b934 |
# pylint: disable=arguments-differ
""" Models for the shopping cart and assorted purchase types """
import csv
import json
import logging
import smtplib
import StringIO
from collections import namedtuple
from datetime import datetime, timedelta
from decimal import Decimal
from io import BytesIO
import analytics
impor... | ahmedaljazzar/edx-platform | lms/djangoapps/shoppingcart/models.py | Python | agpl-3.0 | 91,693 | [
"VisIt"
] | 9329338406d526f5ed2c64a3daab1a3566159f0708c935a849a84492ba139eea |
# -*- coding: utf-8 -*-
#
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pu... | thica/ORCA-Remote | src/scripts/helper/helper_createtvlogos/script.py | Python | gpl-3.0 | 7,307 | [
"ORCA"
] | b0874d988801cfbf08770146addd2b05c19812dbc753cfdf4433de233462097a |
# -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2012-2015 by Andrew Chadwick <a.t.chadwick@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 o... | dothiko/mypaint | gui/colors/hcywheel.py | Python | gpl-2.0 | 47,368 | [
"FLEUR"
] | 8105aa69420574efbdd7a114d496c5500b6f4e38fc89b0555b73ed3656baa5d4 |
# coding: utf-8
# In[1]:
import numpy as np
from scipy.fftpack import fft #, ifft
import scipy.optimize as opt
from sys import exit
# Wave functions definitions
# -------------------------------------------------------------------------------------
# In[2]:
def gaussian(x,n,x0,s0,w,v): # Gaussian wf in K3
... | brunojulia/ultracoldUB | Wavepackdisper/wave_functions.py | Python | gpl-3.0 | 3,154 | [
"Gaussian"
] | cb546186c3f79223d8332bbe27cbedc82f7941e978394094e055f18f84eb961b |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
import time
from django.contrib.auth.model... | shoopio/shoop | shuup_tests/browser/admin/test_quick_add_edit_button.py | Python | agpl-3.0 | 7,834 | [
"VisIt"
] | 348a6bd86b680a25490db66f0a9baf102a091cd86831142e529cfe2dea482cd5 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Image pipeline
reader = vtk.vtkImageReader()
reader.ReleaseDataFlagOff()
reader.SetDataByteOrderToLittleEndian()
reader.SetDataExtent(0,63,0,63,1,93)
reader.SetDataSpacin... | hlzz/dotfiles | graphics/VTK-7.0.0/Imaging/Core/Testing/Python/TestVariance3D.py | Python | bsd-3-clause | 758 | [
"VTK"
] | 11ba4fb3b87dbe477930d8a5bd0782f90f8668fe84592eb1ce35c7d94496c560 |
#!/usr/bin/env python3
# ver 0.1 - make codes on 3/29/2018
import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description='calculation properties (scalar) distribution using com')
## args
parser.add_argument('-icell', '--icell', default='unit_cell.npy',... | jht0664/Utility_python_gromacs | python/com_scalar_1d.py | Python | mit | 3,114 | [
"MDAnalysis"
] | 678c2662b680df1ad8c5deac6cb3d7843de4f7b526f828544d7e304791b53de6 |
"""
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permission to us... | bgoli/pysces | pysces/PyscesWeb.py | Python | bsd-3-clause | 14,492 | [
"PySCeS"
] | aa2cd2cd95a245d81f9ac0b79d2b2e56c49f751576e04e559e39cc63d50b90a5 |
#!/bin/env python
# -*- coding: utf-8 -*-
from Sire.IO import *
from Sire.System import *
from Sire.Mol import *
from Sire.MM import *
from Sire.FF import *
from Sire.CAS import *
from Sire.Maths import *
from Sire.Analysis import *
from Sire.System import *
from Sire.Base import *
from Sire.Units import *
import Sir... | chryswoods/Sire | wrapper/Tools/WSRC.py | Python | gpl-2.0 | 136,830 | [
"Amber"
] | bcc0dfed103a81db43c9845694aadc96d7bc211b898ae098dcc67a6b8d6117ea |
# -*- coding: utf-8 -*-
import re
from numbers import Integral
from collections import namedtuple
__all__ = ["countries"]
try:
basestring
except NameError:
basestring = str
Country = namedtuple('Country',
'name alpha2 alpha3 numeric apolitical_name')
_records = [
Country(u"Afghanis... | VertNet/api-geospatial | lib/iso3166/__init__.py | Python | gpl-2.0 | 18,709 | [
"BWA"
] | 7b693024b2ddedb8b02e7328eac313a835f6134e964d579a9efa66e5e58ef509 |
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@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... | maartenq/ansible | lib/ansible/executor/module_common.py | Python | gpl-3.0 | 46,743 | [
"VisIt"
] | fb4d867e0c4966cc822349f47d7a8a9f355fae90f729472745c5646206a01d87 |
from __future__ import print_function
from math import sqrt
import numpy as np
from ase.atoms import Atoms
from ase.calculators.singlepoint import SinglePointCalculator
from ase.constraints import FixAtoms
from ase.data import covalent_radii
from ase.gui.defaults import read_defaults
from ase.io import read, write, s... | suttond/MODOI | ase/gui/images.py | Python | lgpl-3.0 | 16,663 | [
"ASE"
] | 2e35f2972ac56127008ab7474771776021a5c5bd04667bc462a6c50070955dd4 |
# Copyright 2020 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... | karllessard/tensorflow | tensorflow/compiler/mlir/tfr/python/tfr_gen.py | Python | apache-2.0 | 49,382 | [
"VisIt"
] | c2734f667d1452dc2b6cd007c423a9d474077404cc6193b27895fbaf695bd278 |
import numpy as np
import sklearn.decomposition as decomp
import scipy.optimize as opt
def get_fit_on_sta(sta_array):
"""fit sta to get spaital and temporal sta and also gaussian fit
Input:
sta_array: array of shape (# units, stim size 0, stim size 1, # color channels, # frames)
Output:
... | paninski-lab/yass | src/yass/rf/sta_fit.py | Python | apache-2.0 | 4,548 | [
"Gaussian"
] | 30a6a4f9f20f1cf0805dd07a13ea1f3a0d8447de3b2bd000b1e29c9e646186f5 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 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 optio... | SDSG-Invenio/invenio | invenio/modules/deposit/models.py | Python | gpl-2.0 | 47,636 | [
"VisIt"
] | ada5bd9e497553df783e45701698eb9177019007e8413b6fa6f36d48c41dfc7b |
from DIRAC.Core.Base import Script
Script.parseCommandLine()
import unittest,types,time
from DIRAC.Resources.Catalog.FileCatalogClient import FileCatalogClient
#from DIRAC.ResourceStatusSystem.Client.ResourceStatusClient import ResourceStatusClient
testUser = 'atsareg'
testGroup = 'dirac_user'
testDir = '/vo.formati... | avedaee/DIRAC | DataManagementSystem/DB/test/TestFileCatalogDB.py | Python | gpl-3.0 | 3,226 | [
"DIRAC"
] | 4838ac5c84c3e9f7e249b7955a2cf586132b2e0449de4ad7cd77a2b875a3f88e |
#
# READBSC
#
# Routines to read and manipulate the Bright Star Catalog. These sources
# are used for optical pointing measurements, not radio observations.
#
# 2013-Jun-23 DEG
# Converted from original to use PyEphem routines
# 2015-May-29 DG
# Converted from using datime() to using Time() based on astropy
# 2... | dgary50/eovsa | readbsc.py | Python | gpl-2.0 | 27,536 | [
"Gaussian"
] | 6e2484fa81d85636e0b11b686e9a24b7d58ad1929b68737892d5a343c500ef30 |
# Copyright (c) 2018, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
import os
import numpy as np
from itertools import product
from netCDF4 import Dataset
from yambopy.tools.jsonencoder import JsonDumper, JsonLoader
from yambopy.lattice import vol_lat, rec_lat, car_red, red_car,... | alexmoratalla/yambopy | yambopy/dbs/latticedb.py | Python | bsd-3-clause | 12,165 | [
"NetCDF",
"Yambo"
] | 2c416ebf8651cde140697a5f2f432883fa1f51cfbe28379f2365a80c35b52859 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest
import json
import os
from monty.json import MontyDecoder
from pymatgen.analysis.defects.dilute_solution_model import *
try:
import sympy
except Im... | migueldiascosta/pymatgen | pymatgen/analysis/defects/tests/test_dilute_solution_model.py | Python | mit | 4,419 | [
"pymatgen"
] | 9149cef12caf74db90b92111c904df085b9667ba4b86b098927ffbcc4f855bd7 |
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_male = (
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}"... | joke2k/faker | faker/providers/person/pt_PT/__init__.py | Python | mit | 6,791 | [
"Brian"
] | b528ad07bd8675dc269e5c3586036581558d5f3289a96bf234ccff676e2d33b5 |
from dsltools import Traversal
import types
import numpy as np
def transform_value(x):
"""
Replace arrays with their shapes,
and recursively replace any instances of arrays
in data structures like tuples also with their shapes
"""
if isinstance(x, np.ndarray):
return x.shape
elif isinstance(x, ... | pombredanne/parakeet | parakeet/shape_inference/shape_eval.py | Python | bsd-3-clause | 2,137 | [
"VisIt"
] | 1b347ff4eb5395ecc05b8a9cf5294bb57622d008680313ecca2de344a1045832 |
# 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 Adios(AutotoolsPackage):
"""The Adaptable IO System (ADIOS) provides a simple,
flexibl... | rspavel/spack | var/spack/repos/builtin/packages/adios/package.py | Python | lgpl-2.1 | 7,136 | [
"NetCDF"
] | cd51c02b60267067347d3f148c6a9d05edf9b15a867e2da205d09aa48ee927c6 |
# -*- test-case-name: twisted.trial.test.test_runner -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A miscellany of code used to run Trial tests.
Maintainer: Jonathan Lange
"""
__all__ = [
'suiteVisit', 'TestSuite',
'DestructiveTestSuite', 'DocTestCase', 'DryRunVisitor',
... | Varriount/Colliberation | libs/twisted/trial/runner.py | Python | mit | 28,496 | [
"VisIt"
] | 9a96c55ca7985abaaec214096520e32e70fda326bbfb1f72d978589521756d8a |
class SynErr(Exception):
def __init__(self, *args, **info):
self.errinfo = info
Exception.__init__(self, self._getExcMsg())
def _getExcMsg(self):
props = sorted(self.errinfo.items())
displ = ' '.join(['%s=%r' % (p, v) for (p, v) in props])
return '%s: %s' % (self.__clas... | vivisect/synapse | synapse/exc.py | Python | apache-2.0 | 6,744 | [
"NEURON"
] | ef9625b0e7b96cf7f138afbc2ed4049aa67fd609d5ad0485c0a4fd8d806a1295 |
#copyright Jesse van Dam
import vcf
import inspect
import re
accessionMap = {}
mappingfile = open("mappingfile2accession.csv",'r')
first = True
for line in mappingfile:
if first:
first = False
continue
temp = line.strip().split('\t')
if len(temp) == 2:
accessionMap[temp[0]] = temp... | jessevdam/PBR_BYOD_WUR | main.py | Python | gpl-2.0 | 8,566 | [
"BWA"
] | 6565440a21a2fb542999eed2be1f879b2fa062c7917f80d27013cbf6ace498d3 |
# Copyright 2012 the rootpy developers
# distributed under the terms of the GNU General Public License
from nose.plugins.skip import SkipTest
from rootpy.utils.silence import silence_sout
try:
with silence_sout():
from ROOT import (RooFit, RooRealVar, RooGaussian, RooArgusBG,
RooA... | cms-btv-pog/rootpy | rootpy/stats/tests/test_correlated_values.py | Python | gpl-3.0 | 2,558 | [
"Gaussian"
] | a62d0a4c0441f58e0aea4c017c84e500515185e51a0c50a19bcb2bf2e76ae02a |
#!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, modify, merge, publish,
... | timj/scons | test/Parallel/ref_count.py | Python | mit | 5,115 | [
"VisIt"
] | 817eaa72c3ce044a2d4791d4909ef31c3450bb6ea94c9aee22717fdc8a6e9a44 |
# -*- coding: cp1252 -*-
# Copyright (C) 2005 by Alex Duesel <alex@alex-duesel.de>
# homepage: http://www.mandarine.tv
# See file license.txt for licensing issues
#
# This program is free software: you can redistribute it and/or modify
# it under ... | alexdd/SLOTMACHINE_PY | slotmachine_main.py | Python | gpl-3.0 | 44,733 | [
"CASINO"
] | 6ef1cf10318fa6a1db183c3e0dfffe4cc3dac13d3c095fa8fbeb0584d37c8d49 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 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, ... | Proteus-tech/nikola | nikola/plugins/compile/markdown/mdx_gist.py | Python | mit | 7,718 | [
"Brian"
] | e6d8749d6425cf5b5320c54a86d168caa0d3368ebef6e5c6c6e9ccec74178d16 |
from subprocess import check_call
from future.moves.subprocess import check_output
def test_redis_build(tmpdir):
dest = tmpdir.mkdir('default_configs')
check_call([
'env2config',
'build',
'redis',
'3.0.1',
str(dest),
])
subpaths = list(dest.visit())
as... | dacjames/env2config | tests/test_redis.py | Python | mit | 863 | [
"VisIt"
] | e2b6cde81d06e7afe01c9fb44b2641492f43237e7c7ed8847c72ac35de42c3e8 |
# -*- coding: utf-8 -*-
__author__ = "Konstantin Klementiev, Roman Chernikov"
__date__ = "22 Jan 2016"
import numpy as np
import matplotlib.pyplot as plt
# path to xrt:
import os, sys; sys.path.append(os.path.join('..', '..', '..')) # analysis:ignore
import xrt.backends.raycing.materials as rm
crystal = rm.CrystalSi... | kklmn/xrt | examples/withRaycing/00_xRayCalculator/calc_crystal.py | Python | mit | 848 | [
"CRYSTAL"
] | 1be26fc6715c861dbf3908cf33248495cb287326b76d17b6bf8728a242671efa |
# ipython --pylab
# import some needed functions
from scipy.integrate import odeint
from numpy import *
from matplotlib.pyplot import *
###seterr(all='raise')
import pint
ureg = pint.UnitRegistry()
_0 = ureg['']
_prob = _0 # TODO: custom 'probability' unit?
_m0 = _0/1000
_m = ureg['meter']
_s = ureg['... | piethanegraaf/haircell-simulation | simulating_vestibular_hair_cells.py | Python | apache-2.0 | 9,978 | [
"NEURON"
] | 1bb2f3e7846c229a54030487281b0960c6ca472abe9d67494f4a59054a46bb78 |
# -*- coding: utf-8 -*-
"""
functions.py - Miscellaneous functions with no other home
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from __future__ import division
from .python2_3 import asUnicode
from .Qt import QtGui, QtCore, USE_PYSIDE
Colors = {
'b... | tropp/acq4 | acq4/pyqtgraph/functions.py | Python | mit | 87,061 | [
"Gaussian"
] | 007c189a9fd3584ceb3e4e5ce2065f29955bf6a00233a6a2fd2b57e8ecad2881 |
# -*- coding: utf-8 -*-
# Copyright (C) 2005-2006 Joe Wreschnig
# Copyright (C) 2006-2007 Lukas Lalinsky
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
import struct
from mutage... | ronie/script.cu.lrclyrics | resources/lib/mutagen_culrc/asf/_util.py | Python | gpl-2.0 | 10,741 | [
"CRYSTAL"
] | e3ede346dce3b0472abd13a642dfd756a70ac3912a989d1acfd40e0663e96d72 |
#!/usr/bin/env python
# This example shows how to load a 3D image into VTK and then reformat
# that image into a different orientation for viewing. It uses
# vtkImageReslice for reformatting the image, and uses vtkImageActor
# and vtkInteractorStyleImage to display the image. This InteractorStyle
# forces the camera... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Examples/ImageProcessing/Python/ImageSlicing.py | Python | gpl-3.0 | 4,173 | [
"VTK"
] | aff3c023596fa0b9e391886bccd80420d39a95681a62a04efb97fa7174836bca |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.