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 |
|---|---|---|---|---|---|---|---|
# Author: Prabhu Ramachandran <prabhu_r at users dot sf dot net>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Enthought library imports.
from traits.api import Instance
from tvtk.api import tvtk
# Local imports
from mayavi.filters.filter_base import FilterBase
from mayavi.core.pipeline_info import Pi... | dmsurti/mayavi | mayavi/filters/extract_tensor_components.py | Python | bsd-3-clause | 1,392 | [
"Mayavi"
] | 4443f3055da9f202924d779c3058bf0a6d60be6ff508647204c77163f9109e97 |
# Load dependencies
import ovito.vis
# Load the native code module
import Tachyon
# Inject TachyonRenderer class into parent module.
ovito.vis.TachyonRenderer = Tachyon.TachyonRenderer | srinath-chakravarthy/ovito | src/plugins/tachyon/resources/python/ovito/vis/tachyon/__init__.py | Python | gpl-3.0 | 186 | [
"OVITO"
] | 6ab89b38f1002d39347d76325acdc3ef0727e40a3cf6208d100457f31f544547 |
# -*- coding: utf-8 -*-
#
# Neo4j.rb documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 9 22:41:19 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | ivopatty/neo4j | docs/conf.py | Python | mit | 10,660 | [
"Brian"
] | f5bda689326dc5b89fe58769c520cef41228e62b0db011a16dbd223d5c27ca0e |
import pysam
import argparse
import sys
import logging
import os
def count(outputFile, inputFile, logger):
gapSampleCountMap = {}
otherSampleCountMap = {}
with pysam.AlignmentFile(inputFile, "rb") as samfile:
processed = 0
for read in samfile.fetch(until_eof=True):
processed += 1
if process... | shengqh/ngsperl | lib/10x/10xCount.py | Python | apache-2.0 | 2,637 | [
"pysam"
] | 9ac433e4d15bc44bd65d6ffe01f3ce6ddec101a425e047b70b9b86f7ae7526c6 |
from diles.netcdfgeometry import NetcdfGeometry
from gridfile import GridFile
from misc import ncOpen
from netCDF4 import *
class GridMaker(object):
"""
Class that regrids a netcdf file generic latlon grid into
a uniform grid ready to be sliced in diles
"""
def __init__(self):
self.grid = None
... | RDCEP/hybrid-dile-server | lib/utils/gridmaker.py | Python | apache-2.0 | 3,463 | [
"NetCDF"
] | b2ef1ba0b008a2d5f809e1b6c3bf590c8b14657cec4bafb174501202fbce677a |
#! /usr/bin/env python
# MMapArea.py
# This file is part of Labyrinth
#
# Copyright (C) 2006 - Don Scorgie <Don@Scorgie.org>
#
# Labyrinth 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... | DakshShah/Labyrinth | src/MMapArea.py | Python | gpl-2.0 | 43,047 | [
"FLEUR"
] | 0cb4e170bf2846a14597eb4f034b4eeba09ce3a27a3e6e4696bd2a05f42fe9e0 |
import io
import threading
import synapse.link as s_link
import synapse.async as s_async
import synapse.daemon as s_daemon
import synapse.neuron as s_neuron
import synapse.common as s_common
import synapse.telepath as s_telepath
import synapse.lib.session as s_session
from synapse.common import *
from synapse.tests.... | imjonsnooow/synapse | synapse/tests/test_neuron.py | Python | apache-2.0 | 12,474 | [
"NEURON"
] | 1b72a2eed0d142971dfce686915d5b493a51f48020fbabaf01e515e614c5a448 |
#!/usr/bin/env python
__author__ = "waroquiers"
import os
import random
import shutil
import unittest
import numpy as np
from monty.tempfile import ScratchDir
from pymatgen.analysis.chemenv.coordination_environments.voronoi import (
DetailedVoronoiContainer,
)
from pymatgen.core.lattice import Lattice
from pym... | vorwerkc/pymatgen | pymatgen/analysis/chemenv/coordination_environments/tests/test_voronoi.py | Python | mit | 9,783 | [
"pymatgen"
] | 6d9b8ea5e6ab46db1a42fda358f6dfc5536125fa999ede167aa8aa9c0af2df1f |
"""Evaluate predictions. Compute CRPS for raw ensemble and PP predictions.
Need to have enstools.scores installed along with the scoringRules R package.
Some functions here are duplicates of functions in utils.py
This is done on purpose to make sure that the evaluation is correct.
"""
import argparse
from netCDF4 imp... | slerch/ppnn | results/Python_evaluation_code/evaluate_predictions.py | Python | mit | 8,438 | [
"Gaussian"
] | f0049616f4f5444487a4d9fd24a68a3d00e9a26e28f0ddf364ad4cc18d243ae8 |
from io import BytesIO
import contextlib
import os.path
import pickle
import tempfile
import unittest
import sys
import numpy as np
import pandas as pd
import xray
from xray import Dataset, open_dataset, open_mfdataset, backends
from xray.backends.common import robust_getitem
from xray.core.pycompat import iteritems,... | clarkfitzg/xray | xray/test/test_backends.py | Python | apache-2.0 | 32,168 | [
"NetCDF"
] | 9131660926f41f722a05eb7e9df7b90055443c674df2173b9beb9849f543e64b |
import numpy as np
import pandas as pd
import inspect
from numba import jit, vectorize, guvectorize
from functools import wraps
from six import StringIO
import ast
import toolz
class GetReturnNode(ast.NodeVisitor):
"""
A Visitor to get the return tuple names from a calc-style function
"""
def visit_Re... | rkuchan/Tax-Calculator | taxcalc/decorators.py | Python | mit | 11,060 | [
"VisIt"
] | 98bf02e39f3306b6a2150eb6b3dcb840b403ecde48d0f2104d59c7cd7dc23384 |
import tensorflow as tf
from lib.ops import xavier_initializer, sigmoid_loss
relu = tf.nn.relu
def _sample_z(mu, log_var):
eps = tf.random_normal(shape=tf.shape(mu))
return mu + tf.exp(log_var / 2) * eps
def _Q(X, z_dim, h_dim=128):
with tf.variable_scope("Q"):
h = tf.layers.dense(
X,
h_... | teasherm/models | vanilla_vae/model.py | Python | unlicense | 2,284 | [
"Gaussian"
] | e3ebefe4b8e9b6b319f76962b0b56450a05ec9828e6dd5ae516fad4822761beb |
""" Schemas for resonant scanners."""
import datajoint as dj
from datajoint.jobs import key_hash
import matplotlib.pyplot as plt
import numpy as np
import scanreader
from . import experiment, injection, notify, shared
from .utils import galvo_corrections, signal, quality, mask_classification, performance
from .excepti... | cajal/pipeline | python/pipeline/reso.py | Python | lgpl-3.0 | 80,881 | [
"Gaussian"
] | fb7358273f83952f0a066a970e89ebc3e1e365b3000b7da842dff26c8fdd1ba9 |
"""
Experimental bandgaps for inorganic crystals.
"""
import os
import deepchem as dc
from deepchem.molnet.load_function.molnet_loader import TransformerGenerator, _MolnetLoader
from deepchem.data import Dataset
from typing import List, Optional, Tuple, Union
BANDGAP_URL = 'https://deepchemdata.s3-us-west-1.amazonaws.... | deepchem/deepchem | deepchem/molnet/load_function/material_datasets/load_bandgap.py | Python | mit | 4,151 | [
"CRYSTAL"
] | f8b76e70291545bfb7bc6d55b7c9cdef213ffd94269bf2976c97065bf91f65ac |
from sympy.core import sympify, Lambda, Dummy, Integer, Rational, oo, Float, pi
from sympy.functions import sqrt, exp, erf
from sympy.printing import sstr
import random
class Sample(tuple):
"""
Sample([x1, x2, x3, ...]) represents a collection of samples.
Sample parameters like mean, variance and stddev c... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/sympy/statistics/distributions.py | Python | agpl-3.0 | 11,157 | [
"Gaussian"
] | 1e9451b38a9c79e8fde78897c655a1d4ac61c49930a5fb00e335dfd2f25972df |
#!/usr/bin/env python
from sys import exit
from sklearn.cross_validation import train_test_split, cross_val_score
from sklearn.metrics import confusion_matrix
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.lin... | astroswego/supervised-classification | src/learn.py | Python | lgpl-3.0 | 3,108 | [
"Gaussian"
] | 1ade017a76f429affbe36fa3c8b950f50344c2eefa6f5c69e6ad1322ba28602d |
import chess, copy, 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,ne,n],\
[ne,e,se,s,sw,w,nw,n], [ne,n,nw,w,sw,s,se,e],\
[se,s,sw,w,nw,n,ne,e], [se,e,ne,n,nw,w,s... | tectronics/olive-gui | legacy/finales.py | Python | gpl-3.0 | 8,107 | [
"VisIt"
] | 72d135abee2049f8c773db50586c81f30c13569d783b4417b29eb5131ef3e79f |
#!/usr/bin/env python
#
# $File: savePop.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/savePop.py | Python | gpl-2.0 | 1,299 | [
"VisIt"
] | 8b8ac6ea09508ab4d85cce4b992d670f29ef6ef7ff90082c9ae2523796e50ebb |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
A simple example of using polarizable embedding model in the mean-field
calculations. This example requires the cppe library
GitHub: https://github.com/maxscheurer/cppe
Code: 10.5281/zenodo.3345696
Publication: https://doi.org/10.10... | sunqm/pyscf | examples/solvent/04-scf_with_pe.py | Python | apache-2.0 | 949 | [
"PySCF"
] | a3086aa60a16cebf34130fcefc7d1c2ae2534404209ab4deb4a11bed91a75e66 |
"""Collection of function implementations.
Functions are either implemented as :class:`~chainer.Function`\\ s or
:class:`~chainer.FunctionNode`\\ s.
"""
from chainer.functions.activation.clipped_relu import clipped_relu # NOQA
from chainer.functions.activation.clipped_relu import relu6 # NOQA
from chainer.functions... | wkentaro/chainer | chainer/functions/__init__.py | Python | mit | 14,780 | [
"Gaussian"
] | a2f334384ef1e1d7eac26dbae6d2a82cef2de618ae92c8041208c2566289230d |
from __future__ import absolute_import, division, print_function
import pprint
import sys
import pytest
import _pytest._code
from _pytest.main import Session, EXIT_NOTESTSCOLLECTED, _in_venv
class TestCollector(object):
def test_collect_versus_item(self):
from pytest import Collector, Item
assert... | tareqalayan/pytest | testing/test_collection.py | Python | mit | 31,058 | [
"VisIt"
] | 82b4a4b5a26e0f1b4ad57a43e4e64502f50a9d5b473cfa6a7d5aa0c2f8feee28 |
import logging
import mimetypes
import os
import shutil
import tempfile
import zipfile
from cgi import escape
from inspect import isclass
import metadata
from galaxy import util
from galaxy.datatypes.metadata import MetadataElement # import directly to maintain ease of use in Datatype class definitions
from galaxy.ut... | myoshimura080822/galaxy_in_docker_custom_bit_wf | galaxy_lib/data.py | Python | mit | 44,382 | [
"Galaxy"
] | 58021924f6fd20272db71a041362614d5c34c396ef83892a41142831dcdecbf7 |
#!/usr/bin/env python3
from bottle import get, post, run, request, template
import simplejson as json
from smartchat import SmartChat
from dateutil.parser import parse
import configparser
from sys import exit
PRODUCT = 'HipStudio'
VERSION = '0.0.2'
COPYRIGHT = 'Copyright (C) 2014-2015 Ross Nelson'
LICENSE = 'MIT'
# R... | rnelson/hipstudio | hipstudio.py | Python | mit | 4,949 | [
"VisIt"
] | 36a228b3396fba80364f4a0428a114f40f6078b6efba40c2dfa9c1bf8165d86f |
#
# Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/]
#
# This file is part of IGE - Outer Space.
#
# IGE - Outer Space is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of t... | mozts2005/OuterSpace | server/lib/ige/ospace/IPlayer.py | Python | gpl-2.0 | 43,445 | [
"Galaxy"
] | e36fd57458212a54cd64a83b76bde5acf0a3e6cb8d90e0cfe4f296e79652ac5a |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
REGION_ORDER = [
'GMT', 'GLL', 'GLO', 'MDE', 'ANT', 'BRA', 'CAE', 'CNA', 'SSA', 'WSA',
'NSA', 'CEA', 'MEX', 'EUW', 'MOG', 'NOR', 'AUS', 'KAZ', 'JAP', 'RSE',
'AIS', 'KOP', 'USE', 'SEA', 'EUE', 'SAL', 'SAF', 'MAD', 'IND', 'GRE',
'NAF', 'NWZ', 'WAF', 'CAF', 'E... | RDCEP/climate_emulator | emulator/data/mapping.py | Python | gpl-3.0 | 534 | [
"EPW"
] | 2e1c1c26bd7db7bda12d58a2244d03dfe6b35eed8c87cda186a638c363d8c6b8 |
#!/usr/bin/python
import sys
import sqlite3
import getopt
import Bio
import os
import time
from Bio import AlignIO
from decimal import *
from mrbait import mrbait_menu
from mrbait import substring
from mrbait.substring import SubString
from mrbait import manage_bait_db as m
from mrbait import alignment_tools as a
from ... | tkchafin/mrbait | mrbait/mrbait_corefuncs.py | Python | gpl-3.0 | 55,778 | [
"BLAST"
] | dedf38c1f460a81edb6099b0d449facf10018afb6cb56a2268053606f87e3d50 |
# 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 *
import glob
class Autofact(Package):
"""An Automatic Functional Annotation and Classification To... | rspavel/spack | var/spack/repos/builtin/packages/autofact/package.py | Python | lgpl-2.1 | 1,254 | [
"BLAST",
"BioPerl"
] | d605d536fbf5643fc897e4b942c07028beb15bcc47e2cd9bf87d96f94a6bbfa5 |
# LOFAR AUTOMATIC IMAGING PIPELINE
# awimager
# The awimager recipe creates based an image of the field of view. Based on
# nine concatenated and measurementsets each spanning 10 subbands
# The recipe contains two parts: The call to awimager
# and secondairy some functionality that calculates settings (for awimager)
# ... | kernsuite-debian/lofar | CEP/Pipeline/recipes/sip/nodes/selfcal_awimager.py | Python | gpl-3.0 | 36,677 | [
"Gaussian"
] | c1f0e01254d6afb1b0c4d366d71fe17e3c1afb053f02f9a30daa06541c6c33bf |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from . import global_rand
def get_fans(shape):
fan_in = shape[0] if len(shape) == 2 else np.prod(shape[1:])
fan_out = shape[1] if len(shape) == 2 else shape[0]
return fan_in, fan_out
class WeightInitializer(object):
"""
Initializer ... | tangyaohua/dl4mt | session2/lm/deepy/utils/initializers.py | Python | bsd-3-clause | 4,076 | [
"Gaussian"
] | 386c1b417eb4f005a617456a1426a5c866736c1e52e78d1d11da50da17e9ba6d |
# generated with make_mock.py
BPF = 53
LOG4 = 1.3862943611198906
NV_MAGICCONST = 1.7155277699214135
RECIP_BPF = 1.1102230246251565e-16
class Random(object):
VERSION = 3
SG_MAGICCONST = 2.504077396776274
class SystemRandom(Random):
VERSION = 3
def __init__(self, seed=0):
"""Class that uses... | kmod/icbd | stdlib/type_mocks/random.py | Python | mit | 6,963 | [
"Gaussian"
] | 7debb44603a16c67aa7d788c1bb9fd244aea601abb62798c0c603f554523ae8d |
# Copyright (c) 2017, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
from yambopy import *
from netCDF4 import Dataset
class YamboStaticScreeningDB():
"""
Class to handle static screening databases from Yambo
This reads the databases ``ndb.em1s*``
There :mat... | alexmoratalla/yambo-py | yambopy/dbs/em1sdb.py | Python | bsd-3-clause | 6,886 | [
"Yambo"
] | f8733a577faec2b88929439749c176a18a844c2f1cc5655958fe97c401553166 |
import cv2
import numpy as np
ORANGE_MIN = np.array([0, 50, 50],np.uint8)
ORANGE_MAX = np.array([30, 255, 250],np.uint8)
MAX_P = 1100
MIN_P = 15
def get_obs(frame):
boxes = []
# Apply Gaussian
frame_blurred = cv2.GaussianBlur(frame, (15, 15), 7)
# Convert to HSV
frame_threshed = cv2.cvtColor(frame_b... | har96/ardrone-object-trail | cone_track.py | Python | mit | 717 | [
"Gaussian"
] | eee1a2bb260ac6a792bb034dedea0e90a0c94a12728fd33d2289737ef574738f |
import pytest
def _plugin_import(plug):
import sys
if sys.version_info >= (3, 4):
from importlib import util
plug_spec = util.find_spec(plug)
else:
import pkgutil
plug_spec = pkgutil.find_loader(plug)
if plug_spec is None:
return False
else:
return T... | amjames/psi4 | tests/pytest/addons.py | Python | lgpl-3.0 | 3,026 | [
"Psi4"
] | 14c254ec049ac4dde72aa16f365db6aa61658d1140931ec1226164200dcf1f9c |
import numpy as np
import unittest
import discretize
try:
import vtk.util.numpy_support as nps
except ImportError:
has_vtk = False
else:
has_vtk = True
if has_vtk:
class TestTreeMeshVTK(unittest.TestCase):
def setUp(self):
h = np.ones(16)
mesh = discretize.TreeMesh([h... | simpeg/discretize | tests/tree/test_tree_vtk.py | Python | mit | 1,584 | [
"VTK"
] | 7381304290eb4d4c1fde5929d7948287c494f36e6dc6a5e93a4ebf152b73e513 |
"""
nearly deprecated old inteface to the compounds API
"""
from tastypie.resources import ALL
from tastypie.resources import ALL_WITH_RELATIONS
from tastypie.resources import ModelResource
from django.conf import settings
from django.conf.urls import *
from django.core.exceptions import ObjectDoesNotExist
from tastypi... | thesgc/chembiohub_ws | cbh_chem_api/compounds.py | Python | gpl-3.0 | 25,920 | [
"Pybel",
"RDKit"
] | 580284b8a2029114490e5e7741535f56450345586e245ae8ffb64ab2c3e40a20 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-17 20:50
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('visit', '0110_programdirector_sitecoordinator'),
]
operations = [
migrations.AlterMo... | koebbe/homeworks | visit/migrations/0111_auto_20160717_1550.py | Python | mit | 1,172 | [
"VisIt"
] | d141a5ce74887a89317d78c7843336c16ad2081272ecdc93af017e9f67b015c3 |
"""Effective medium theory potential."""
from math import sqrt, exp, log, pi
import numpy as np
import sys
from ase.data import chemical_symbols
from ase.units import Bohr
from ase.calculators.neighborlist import NeighborList
parameters = {
# E0 s0 V0 eta2 kappa lambda n0
# eV ... | slabanja/ase | ase/calculators/emt.py | Python | gpl-2.0 | 10,181 | [
"ASE"
] | d5a7e62e7bb0b1c8e7c99494a8b0d4f10edc06de10455db6f8a38bb1d343e6b8 |
import mdtraj as md
import numpy as np
import tensorflow as tf
import tftraj.rmsd
import tftraj.rmsd_op
def test_works(sess, traj):
rmsd = tftraj.rmsd_op.load()
inds = [5, 19, 234, 235]
target = np.array(traj.xyz[inds])
target = tf.Variable(target)
prmsd, _ = rmsd.pairwise_msd(traj.xyz, target)
... | mdtraj/tftraj | tests/test_rmsd_deriv.py | Python | mit | 3,335 | [
"MDTraj"
] | 5fa92151f93036a02538f04607e08e334ed4969ef08d6177c5bfbd60c7b53ca6 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Extract fasta sequences that are above a minimal length.
Usage:
%program <input_file> <min_length> <output_file>"""
import sys
import re
try:
from Bio import SeqIO
except:
print "This program requires the Biopython library"
sys.exit(0)
try:
fasta... | wkh124/wkh124 | fasta_extract_min_length.py | Python | gpl-3.0 | 741 | [
"Biopython"
] | e09f9301759db7136cdf07b522ff01058e81a7aafe4fa56a7738749a787eef71 |
from pipe import *
from dnaio import *
from trim import *
from runner import *
from logger import *
from misc import *
from clc import *
from phmmer import *
from prodigal import *
from smalt import *
from velvet import *
from blast import *
from theseed import * | audy/cram | metacram/__init__.py | Python | bsd-3-clause | 264 | [
"BLAST"
] | c908683412f00586a6b7ef6753aaa87d421e0b6d9c882a29f571e51d5ab4e044 |
'''
Created on Jul 18, 2011
@author: sean
'''
import _ast
from graphlab.meta.asttools import Visitor, visit_children
def removeable(self, node):
'''
node is removable only if all of its children are as well.
'''
throw_away = []
for child in self.children(node):
throw_away.append(self.visit... | chen0031/Dato-Core | src/unity/python/graphlab/meta/asttools/mutators/prune_mutator.py | Python | agpl-3.0 | 4,465 | [
"VisIt"
] | 696499e965de69ce313160616f583872d416817992b474692866ab019071db40 |
# -*- coding: utf-8 -*-
##------ IMPORTS ------##
import os, sys, datetime, time
import module_locator
import PIL.Image, PIL.ImageTk
import webbrowser
from mss import mss
from tkinter import *
from tkinter import tix, filedialog, messagebox, simpledialog
##------ VAR ------##
"""Description :
'MY_PATH' is the path... | matletix/game-stats-manager | src/main.py | Python | gpl-3.0 | 52,582 | [
"VisIt"
] | 48e075d5a34fc89d9b2e94bcb639e40ce40bb890b9a1f476b284dda98bd8a83f |
import datetime
import hashlib
import pickle
import threading
import urllib.parse
import logging
from typing import Union, Optional
import requests
import simplejson as json
from django.core.cache import cache
from django.core.management.base import OutputWrapper
from django.db import connections
from django.db.models... | moodpulse/l2 | rmis_integration/client.py | Python | mit | 79,166 | [
"VisIt"
] | 2b5fc0c4e6fc130c8fa2238379931c3282212d1fb5030c58345ee5f4eac0cde7 |
# Copyright (C) 2003 CAMP
# Please see the accompanying LICENSE file for further information.
"""
Atomic Density Functional Theory
"""
from math import pi, sqrt, log
import tempfile
import pickle
import sys
import os
import numpy as np
from ase.data import atomic_names
from gpaw.atom.configurations import configur... | qsnake/gpaw | gpaw/atom/all_electron.py | Python | gpl-3.0 | 27,980 | [
"ASE",
"GPAW"
] | 0adaf8104b578ae758f6cdf6e6aca299f5cbb50446dc0f52f9f271c86fb41d18 |
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# Disable the "wildcard import" warning so we can bring in all methods from
# course helpers and ui helpers
# pylint: disable=wildcard-import
# Disable the "Unused import %s from wildcard import" warning
# pylint: disable=unused-wildcard-impor... | ahmadiga/min_edx | common/djangoapps/terrain/steps.py | Python | agpl-3.0 | 7,473 | [
"VisIt"
] | 1f1bc69aadcd204fb36fc800f6b4466207b23b006fa22180171ea475bfef433d |
from __future__ import print_function, absolute_import
import os
import warnings
import numpy as np
import mdtraj as md
from ..utils.progressbar import ProgressBar, Percentage, Bar, ETA
from ..utils import verbosedump
from ..cmdline import NumpydocClassCommand, argument, exttype, stripquotestype
from ..dataset import... | dr-nate/msmbuilder | msmbuilder/commands/featurizer.py | Python | lgpl-2.1 | 7,658 | [
"MDTraj"
] | 17d1e6f50cbf0a5117e12241690d853371d25c00066776e6230c39ec1129a9a1 |
# test_spinystellate.py ---
#
# Filename: test_spinystellate.py
# Description:
# Author:
# Maintainer:
# Created: Mon Jul 16 16:12:55 2012 (+0530)
# Version:
# Last-Updated: Thu Nov 8 17:39:06 2012 (+0530)
# By: subha
# Update #: 492
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#... | BhallaLab/moose-examples | traub_2005/py/test_spinystellate.py | Python | gpl-2.0 | 1,546 | [
"MOOSE"
] | 05263d7e495a67aca685fa5644812e22e16bb3088da99d483300569579e8f3ce |
from __future__ import annotations
import math
import warnings
from collections import namedtuple
import numpy as np
from numpy import (isscalar, r_, log, around, unique, asarray, zeros,
arange, sort, amin, amax, atleast_1d, sqrt, array,
compress, pi, exp, ravel, count_nonzero, si... | scipy/scipy | scipy/stats/_morestats.py | Python | bsd-3-clause | 130,489 | [
"Gaussian"
] | 00717a22248a20656a837789d13d18f96eff45b08a420c031215b68dce6a0677 |
"""
Base Classes and Infrastructure Supporting Concret Manager Implementations.
"""
import errno
import json
import logging
import os
from os import (
curdir,
getenv,
listdir,
makedirs,
sep,
walk,
)
from os.path import (
basename,
exists,
isdir,
join,
relpath,
)
from shutil ... | galaxyproject/pulsar | pulsar/managers/base/__init__.py | Python | apache-2.0 | 13,415 | [
"Galaxy"
] | 07fec35e788d53db3e0c2067173826fb93ef590fbad20131632869c60784582c |
"""
inflect.py: correctly generate plurals, ordinals, indefinite articles;
convert numbers to words
Copyright (C) 2010 Paul Dyson
Based upon the Perl module Lingua::EN::Inflect by Damian Conway.
The original Perl module Lingua::EN::Inflect by Damian Conway is
available from http://... | hugovk/inflect.py | inflect.py | Python | agpl-3.0 | 98,181 | [
"CASINO",
"ESPResSo",
"Elk",
"MOOSE",
"Octopus"
] | 66ebd49b82c0d80c0fc71d4211d6ba5b859aeef28cc0a43a17449d5634849f4c |
#!/usr/bin/env python
"""
Stop DIRAC component using runsvctrl utility
Usage:
dirac-stop-component [options] ... [system [service|agent]]
Arguments:
system: Name of the system for the component (default *: all)
service|agent: Name of the particular component (default *: all)
"""
from __future__ import pr... | yujikato/DIRAC | src/DIRAC/FrameworkSystem/scripts/dirac_stop_component.py | Python | gpl-3.0 | 1,201 | [
"DIRAC"
] | 9af6ae1dea9229dd67b1473ba74434fe992ec661ccf476ca4227ece33bfeecbb |
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
#
# This file is part of the Bacterial and Archaeal Genome Analyser
# Copyright (C) 2015-16 David Williams
# david.williams.at.liv.d-dub.org.uk
# License GPLv3+: GNU GPL version 3 or later
# This is free software: you are free to change and redistribute it
# There is NO W... | daveuu/baga | ComparativeAnalysis.py | Python | gpl-3.0 | 123,580 | [
"Biopython",
"pysam"
] | 6b93351eab2f5bc7e61c645910a4f13b822dcc2b9326f2303478d3f8374aa189 |
# -*- coding: utf-8 -*-
"""
Authors: Gonzalo E. Espinoza-Dávalos, Wim G.M. Bastiaanssen, Boaz Bett, and
Xueliang Cai
IHE Delft 2017
Contact: g.espinoza@un-ihe.org
Repository: https://github.com/gespinoza/hants
Module: hants
"""
from __future__ import division
import netCDF4
import pandas as pd
import... | wateraccounting/SEBAL | hants_old/wa_gdal/main.py | Python | apache-2.0 | 17,674 | [
"NetCDF"
] | f5e99fd92e290b0d1edafd12d916981bfea4f9234f666bf1bd150c812812e77b |
"""
(c) RIKEN 2015. All rights reserved.
Author: Keitaro Yamashita
This software is released under the new BSD License; see LICENSE.
"""
"""
NOTE on unit cell constraints determination:
XDS doesn't handle "real" rhombohedral space group (right?).
So, No need to support R3 or R32. They are handled as H3 or H32, ma... | keitaroyam/yamtbx | yamtbx/dataproc/xds/integratelp.py | Python | bsd-3-clause | 5,789 | [
"CRYSTAL"
] | 79986e03e7240b52fea0dc56d7a3b2d68f2c0ab4538a2617659e7c2f3e544551 |
# -*- coding: utf-8 -*-
"""
Vector Autoregression (VAR) processes
References
----------
Lütkepohl (2005) New Introduction to Multiple Time Series Analysis
"""
from __future__ import annotations
from statsmodels.compat.python import lrange
from collections import defaultdict
from io import StringIO
import numpy as n... | bashtage/statsmodels | statsmodels/tsa/vector_ar/var_model.py | Python | bsd-3-clause | 76,856 | [
"Gaussian"
] | 09871e7d335a1ef47290260c87ca85084754ce061eb216bcda8480d0044f3490 |
if 1:
api_list = [
'_alt',
'_ctrl',
'_feedback',
'_special',
'abort',
'accept',
'alias',
'align',
'alter',
'alter_list',
'alter_state',
'angle',
'attach',
'auto_measure',
'backw... | gratefulfrog/lib | python/pymol2/make_cmd2.py | Python | gpl-2.0 | 11,390 | [
"PyMOL"
] | 59d07953510c8c3d19a181b6c5c7a509d7dabe8f00ba9b38281f26672bc78a7a |
#!/usr/bin/env python
# encoding: utf-8
"""
CijUtil.py
Bits to help with elastic constants manipulation.
polyCij(Cij): Given an elastic constants matrix for a single crystal,
calculate the Voight and Reuss bounds on the bulk and
shear moduli for a random polycrystal.
Copyright (c) 2010 A... | andreww/elastic-constants | CijUtil.py | Python | bsd-3-clause | 13,430 | [
"CRYSTAL"
] | bc116235dade5e198219ec5b5e359cbb5edad10ec6f8289d4a9ebabd7f6e2e9a |
# Copyright (C) 2006-2007 Aren Olson
# 2011 Brian Parma
# 2020 Rok Mandeljc
#
# 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, or (at your ... | exaile/exaile | plugins/daapclient/__init__.py | Python | gpl-2.0 | 25,135 | [
"Brian"
] | 92a57ebc964835d59f755f21f1c038b31f6eb0a353bcf378f912fe11d3ca3f97 |
import os
import platform
import glob as glob
import pdb
import cv2
class DataPath(object):
def __init__(self,dataSource,VideoIndex):
if platform.system()=='Darwin': # on mac for test only, please ignore this....
if dataSource == 'Johnson':
self.sysPathHeader = '/Users/Chenge/Documents/github/AIG/Jay&Joh... | ChengeLi/VehicleTracking | DataPathclass.py | Python | mit | 6,094 | [
"Gaussian"
] | ebd27ce88253d389ad4f346937342a2e9e42caac414a6df9ce4d76ed785f7384 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views import defaults as default_views
from wagtail.wagtailadmin import urls as wagtailadmi... | HackSoftware/hackconf.bg | config/urls.py | Python | mit | 1,356 | [
"VisIt"
] | 8ad70f210c9fb2968ee289fe8f530df1ddd4e44ce7928557490cbadaeb9a551d |
"""
API for initiating and tracking requests for credit from a provider.
"""
import logging
import uuid
import datetime
import pytz
from django.db import transaction
from util.date_utils import to_timestamp
from student.models import User
from openedx.core.djangoapps.credit.exceptions import (
UserIsNotEligibl... | sbalde/edx-platform | openedx/core/djangoapps/credit/api/provider.py | Python | agpl-3.0 | 12,534 | [
"VisIt"
] | eeff7000473a32066019a97be475a3ecc11b84ad4fe1012268e3f1f0fddadacb |
import gen_utils
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import wx
import vtk
class myTubeFilter(ScriptedConfigModuleMixin, ModuleBase):
"""Simple demonstration of ScriptedConfigModuleMixin-based
wrapping of a single VTK object.
It would ... | chrisidefix/devide | modules/user/myTubeFilter.py | Python | bsd-3-clause | 2,694 | [
"VTK"
] | c6e0341f5f9322acd7dca18f49631b30463cf9076f3b1b87eed5e935d7a521f9 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os.path as osp
from numbers import Integral
import numpy as np
from .sile import SileCDFSiesta
from ..sile impor... | zerothi/sisl | sisl/io/siesta/siesta_grid.py | Python | mpl-2.0 | 5,612 | [
"NetCDF",
"SIESTA"
] | a4443fdbce225c19c77d54e7e4bed1c028e88b357961a81591f903a5487edde9 |
"""
An object class to exist as part of a gravitational lens system
should be able to load itself from a file, know its own redshift
know its own x and y grid coordinates, and be able to interpret
between their pixel size and physical scale in arcsec.
"""
# ==============================================================... | wmorning/EvilLens | evillens/source.py | Python | gpl-2.0 | 14,627 | [
"Gaussian"
] | fa1ec836905754fcf3af0fbd54c918bd4b75bc61d51b6474132eb5afa74864a9 |
import calendar
from Bio import Entrez
# This is for translating abbreviated month names to numbers.
months_rdict = {v: str(k) for k,v in enumerate(calendar.month_abbr)}
# Returns a list or its value if there is only one.
list_or_single = lambda l: l*(len(l)>1) or l[0]
def format_ddate(ddate):
"""Turn a date di... | lpantano/papersDB | pubmed-search.py | Python | mit | 6,870 | [
"Biopython"
] | 1ab6228f077615d5afe531e9743919d338e7865c4fed4bc40fd3f71ef94d454d |
import Scientific.IO.NetCDF as nc
import matplotlib
matplotlib.use('GTKAgg') # Change this as desired.
import gobject
from pylab import *
# if len(sys.argv) != 2:
# print "Error: invalid arguments"
# print "Usage: heat <ncfilename>"
# exit()
# # Obtain filename from command-line parameters
# filename = sys.argv... | xancandal/hdf5-heat | heat.ncdf.py | Python | gpl-3.0 | 1,120 | [
"NetCDF"
] | 305096151a87cd40ccf14ca0a49f9463e7d8c5f35bdd502e2eb724c7581fa5c8 |
import json
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.http import require_http_methods
from .models import VisitCount
from .services import update_visit_count
@require_http_methods(["POST"])
def count_visit_ajax(request):
""" add 1 ... | FrancoisConstant/django-visits | visits/views.py | Python | mit | 643 | [
"VisIt"
] | f02b10ec1f402f7cc0f23920c99bed35a9b6c6a9c7605266b78cbc99b9f713a6 |
#!/usr/local/bin/python -i
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html
# Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
#
# Copyright (2005) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
# certain rights in this... | sn-amber/mylpp | src/pizza.py | Python | gpl-2.0 | 13,199 | [
"RasMol"
] | c1489bff871b2b50550049783a719ac4d4d194696de5805a400a56cf173edef0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
"""
This module implements various transmuter classes.
Transmuters are essentially classes that generate TransformedStructures from
various data sources. They enable the... | tallakahath/pymatgen | pymatgen/alchemy/transmuters.py | Python | mit | 16,735 | [
"VASP",
"pymatgen"
] | 4c34ee7b72a11fffe0b380e90401ccd2275d2db8a03932b24d4cdf8f2eae55fc |
from datetime import datetime
from flask_babel import lazy_gettext
from c3bottles import db
from c3bottles.model import drop_point
class Visit(db.Model):
"""
A maintenance visit of bottle collectors at a drop point.
After a report of a problem with a certain drop point has been
generated or a drop ... | der-michik/c3bottles | c3bottles/model/visit.py | Python | mit | 2,216 | [
"VisIt"
] | a414a909196d2593e41ac4381280205638a515f3ddf0d56e5348043195e315db |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------... | Kleptobismol/scikit-bio | skbio/parse/__init__.py | Python | bsd-3-clause | 431 | [
"scikit-bio"
] | abaa0224d639903f105137bfd71f488b145de96f19001b1787aa4df1b066793a |
import numpy
from jsonfield.fields import JSONField
from django.db import models
from arousal_modeler.utils import list_normalization, smooth_kaiser
from dataset_manager.enums import FeatureType, FeatureFunctionType
from math import fabs
class ArousalModeler():
"""
Affection arousal modeling class, used to si... | dumoulinj/ers | ers_backend/arousal_modeler/models.py | Python | mit | 19,266 | [
"exciting"
] | 306d4e9ef42d3e6674e9519203787059948b4c57737a732414f3c8982607a691 |
"""
A module to read in and analyze data output from AFiNES
Methods paper that describe AFiNES:
http://www.cell.com/biophysj/abstract/S0006-3495(17)30622-7
A Versatile Framework for Simulating the Dynamic Mechanical Structure of
Cytoskeletal Networks
By:
Simon L. Freedman, Shiladitya Banerjee, Glen M. Hocky, Aaron R... | dsseara/afinesAnalysis | src/python/afinesanalysis/afinesanalysis.py | Python | gpl-3.0 | 11,900 | [
"Gaussian"
] | 9f45e0880ce92186a8135ec8fd585928904272fd19a608790f5751d57a2f007c |
#!/usr/bin/env python
import re
import os
import sys
import random
import subprocess
import traceback
import argparse
import pysam
import bamsurgeon.replacereads as rr
import bamsurgeon.asmregion as ar
import bamsurgeon.mutableseq as ms
import bamsurgeon.aligners as aligners
from bamsurgeon.common import *
from uuid ... | MischaLundberg/bamsurgeon | bin/addsv.py | Python | mit | 32,630 | [
"BWA",
"pysam"
] | bcbc35b60669e6e675b8e39721f6f0dec502faeee58b5e0dfe006185fffbdd87 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | kbrebanov/ansible | lib/ansible/modules/network/avi/avi_systemconfiguration.py | Python | gpl-3.0 | 6,008 | [
"VisIt"
] | 1a3400f3795569d1dfbedb4b02414be1a4533aedb07fc4f600a4464dfff0d1ec |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import pytest # type: ignore
import pickle
import os
import numpy as np
import warnings
import scipy.constants as const
from pathlib import Path
from monty.tempfile import ScratchDir
from pyma... | gVallverdu/pymatgen | pymatgen/io/vasp/tests/test_inputs.py | Python | mit | 34,370 | [
"VASP",
"pymatgen"
] | 87baa428a07bd918d320b7dda372a4f11f8b445d36bfd6a700088c4f385b456b |
from ovito import *
from ovito.io import *
from ovito.modifiers import *
import numpy as np
node = import_file("../../files/NetCDF/sheared_aSi.nc")
modifier = WignerSeitzAnalysisModifier()
node.modifiers.append(modifier)
modifier.reference.load("../../files/NetCDF/sheared_aSi.nc")
dataset.anim.current_frame = 4
pri... | srinath-chakravarthy/ovito | tests/scripts/test_suite/wigner_seitz_modifier.py | Python | gpl-3.0 | 1,252 | [
"NetCDF",
"OVITO"
] | 83e0ea82dec83cd7b8e930c4252470d38515ce0b6f6253b052b1f801fd609535 |
"""
Format the data so that atram can use it later in atram itself.
It takes sequence read archive (SRA) files and converts them into coordinated
blast and sqlite3 databases.
"""
import multiprocessing
import sys
from os.path import basename, join, splitext
from Bio.SeqIO.FastaIO import SimpleFastaParser
from Bio.Se... | AntonelliLab/seqcap_processor | bin/aTRAM-master/lib/core_preprocessor.py | Python | mit | 4,141 | [
"BLAST"
] | 4f751ed70c2abe2a8669a46c0d71457ee0e17d8a84676e648ca1ad93e4898c70 |
#!/usr/bin/env python
#
# Authors: Gregory S Mendez and Bastian Bentlage
#
# This script fetches sequences listed in hmmsearch results files and writes out a plain text
# file. The plain text file is intended for use by another script to write new fasta files
# with the full length sequences using the def-lines listed ... | mendezg/DATOL | parse_hmm_search.py | Python | gpl-2.0 | 5,826 | [
"Biopython"
] | 001e56823233fa45cd89a9391a0ca0b744eb0fa647fe940f558ad294f5087508 |
#/*##########################################################################
# Copyright (C) 2004-2012 European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
#
# This toolkit is free software; you can redistribute it and/or m... | tonnrueter/pymca_devel | PyMca/SpecfitFunctions.py | Python | gpl-2.0 | 48,910 | [
"Gaussian"
] | b1e2fb095ad8344a0ccd887a0d9fec73087c05248c710b313340b8f6b324b269 |
""" :mod: GFAL2_StorageBase
=================
.. module: python
:synopsis: GFAL2 class from StorageElement using gfal2. Other modules can inherit from this use the gfal2 methods.
Environment Variables
---------------------
DIRAC_GFAL_GRIDFTP_SESSION_REUSE: This should be exported and set to true in ser... | andresailer/DIRAC | Resources/Storage/GFAL2_StorageBase.py | Python | gpl-3.0 | 65,797 | [
"DIRAC"
] | 1e2a97d46f1695b6d4b5208eba8bec71621e165a82d9153707b8e6a54c228271 |
# Copyright (C) 2010-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 v... | fweik/espresso | samples/MDAnalysisIntegration.py | Python | gpl-3.0 | 3,504 | [
"CHARMM",
"ESPResSo",
"Gromacs",
"MDAnalysis"
] | 8415937a09e7a0bc584e0926c0dcc4c52008adc3c477f8887c4032485c7fc295 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/orca/example/tfpark/estimator/pre-made-estimator.py | Python | apache-2.0 | 4,099 | [
"ORCA"
] | b6a246d7112e82f4e47d308ba972672df30f9fdbb86ab6e2efbb2f28a0d493ca |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import random
import unittest
from pymatgen.util.num import abs_cap, min_max_indexes, round_to_sigfigs
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2013, The Materials Project"
__version__ = "0.1"
__maintainer__ ... | vorwerkc/pymatgen | pymatgen/util/tests/test_num_utils.py | Python | mit | 1,841 | [
"pymatgen"
] | 6eaa3dd7a100afa2c6cf46b1c79c2747b88ad4a4d70e78b68436b8f1da717976 |
#!/usr/bin/env python
""" This script instantiate a DFC client against a given service,
and hammers it with mixed request (read/write/delete) for a given time.
It produces two files : time.txt and clock.txt which contain time measurement,
using time.time and time.clock (see respective doc)
It assumes t... | DIRACGrid/DIRAC | tests/Performance/DFCPerformance/writePerf.py | Python | gpl-3.0 | 3,917 | [
"DIRAC"
] | a98e01041ca5007d458a8291576ede1428ad849388111c598f2180c8edf3311a |
import time
from Bio import AlignIO
def print_perf(name, time):
print("BioPython," + name + "," + str(time))
tmin = float('inf')
for i in range(5):
t = time.time()
AlignIO.read("../data/PF08171.sth", "stockholm")
t = time.time()-t
if t < tmin: tmin = t
print_perf("Read Pfam Stockholm MSA", 1000*t... | diegozea/mitos-benchmarks | BioPython/Pipeline.py | Python | mit | 326 | [
"Biopython"
] | 9c30f5eab077ec24f67c3dfa45e5a029574ef82b92ca161ba5b004f17eb7d2b9 |
#!/usr/bin/env python
# encoding: utf-8
"""
eg1.py - Code for "Basic Fits"
Created by Peter Lepage on 2016-12.
Copyright (c) 2016-2021 Cornell University. All rights reserved.
"""
DO_PLOT = True
DO_BAYES = False # should be False
DO_BOOTSTRAP = False # should be False
import collections
import sys
import te... | gplepage/lsqfit | doc/source/eg1.py | Python | gpl-3.0 | 9,326 | [
"Gaussian"
] | 5bd823c5834f3f2a95bcd26846a9c8c4951b7c6297c05a33f3607a23863bd575 |
from worldengine.simulations.basic import find_threshold_f
from noise import snoise2 # http://nullege.com/codes/search/noise.snoise2
import numpy
class TemperatureSimulation(object):
@staticmethod
def is_applicable(world):
return not world.has_temperature()
def execute(self, world, seed):
... | esampson/worldengine | worldengine/simulations/temperature.py | Python | mit | 5,167 | [
"Gaussian"
] | 257ca8f19ae95017f0f151163480e1aa69ddbccdeed14620faa9e644eb4d34c2 |
'''
The one parameter exponential family distributions used by GLM.
'''
# TODO: quasi, quasibinomial, quasipoisson
# see http://www.biostat.jhsph.edu/~qli/biostatistics_r_doc/library/stats/html/family.html
# for comparison to R, and McCullagh and Nelder
import numpy as np
from scipy import special
from . import links... | lixun910/pysal | pysal/model/spglm/family.py | Python | bsd-3-clause | 27,913 | [
"Gaussian"
] | 75ee08f46a6ddf26418823501156e343b704fded48b16218a0add3d10b555f84 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides utility classes for string operations.
"""
import re
from fractions import Fraction
SUBSCRIPT_UNICODE = {
"0": "₀",
"1": "₁",
"2": "₂",
"3": "₃",
"4": "₄",
"5": "₅",
"6": "... | vorwerkc/pymatgen | pymatgen/util/string.py | Python | mit | 14,776 | [
"pymatgen"
] | cd42740158cd5c372c1e733c90e6315825859a74d305dcb89a03e21fa18eb76e |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'PatientInformation.patient_id'
db.add_column(u'patient_patientinformation', 'patient_id',
... | aazhbd/medical_info01 | patient/migrations/0034_auto__add_field_patientinformation_patient_id.py | Python | bsd-3-clause | 30,381 | [
"VisIt"
] | 244f08a42d7faf168336c05ae02a3f4ccbf1535ba282769bdfdcc9fd1f6a7d48 |
#!/usr/bin/python
import getopt
import sys
from Bio import SeqIO
from Bio.SeqUtils import GC
import time# import time, gmtime, strftime
import os
import shutil
import pandas
from Bio.SeqRecord import SeqRecord
from Bio.Seq import Seq
import csv
#from datetime import datetime
import numpy as np
from scipy import stats
... | nyirock/mg_blast_wrapper | mg_blast_wrapper_v1.14.1.py | Python | mit | 26,062 | [
"BLAST"
] | 56f65c5036956bca09abb95602d16635bb0fd92feab068a15c6cac3f1646d9c0 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. module:: kep2cart
:platform: Unix
:synopsis: Convert keplerian elements to cartesian elements
.. moduleauthor:: Henry Mortimer <henry@morti.net>
"""
import math
from ..data import GM
def calculateGausVects(Ω, ω, i):
"""Calculates the gaussian vecto... | hennersz/pySpace | satelliteSimulator/converters/kep2cart.py | Python | gpl-3.0 | 3,468 | [
"Gaussian"
] | 8b1c97d6f72cabe57d87eeb2079dcfba44e0cd8989f913b2bf5d359bd5bd3e0b |
#--------------------------------------------------------------------------------------------------
#
# Description :
#
#
# Usage : python
#
#
# Author : Bruno Blais
#
#
#
#--------------------------------------------------------------------------------------------------
# Imports
import o... | mendax-grip/cfdemUtilities | mixing/pca/randomGenerator.py | Python | lgpl-3.0 | 1,947 | [
"LAMMPS"
] | 12594ef4804e1d4babe45d3b9243fc49c170a7bc17f1dc6b13cdbcd54421d074 |
################################################################################
# Peach - Computational Intelligence for Python
# Jose Alexandre Nalon
#
# This file: tutorial/mapping-a-plane.py
# Using a neuron to map a plane
################################################################################
# Please, f... | PaulGrimal/peach | tutorial/neural-networks/mapping-a-plane.py | Python | lgpl-2.1 | 2,368 | [
"NEURON"
] | e1ef20a887a8e30446b5b9e281983c59c12f4dcf360762d94ac1cf1774ab47e7 |
"""
.. versionadded:: 0.5
This function generates Levy flight by integration of Levy
alpha-stable distribution (also reffered just as stable distribution).
The Levy distribution is defined by two parameters :math:`\\alpha`
and :math:`\\beta`. The Gaussian distribution is special case of
Levy distribution with :math:... | matousc89/signalz | signalz/generators/levy_flight.py | Python | mit | 1,768 | [
"Gaussian"
] | 237e8082716319d3d6671b74269973f7a37eefd09138e45dea805c50f14f41ff |
#!/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 | python/MooseDocs/test/extensions/test_gallery.py | Python | lgpl-2.1 | 2,841 | [
"MOOSE"
] | 4fb8d12e06687d73047ca9de7cdb362aa7504ed84b77a97fa099e0561a3b6496 |
import enum
import inspect
import pydoc
import unittest
from collections import OrderedDict
from enum import Enum, IntEnum, EnumMeta, Flag, IntFlag, unique, auto
from io import StringIO
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
from test import support
# for pickle tests
try:
class Stooges(E... | anbangleo/NlsdeWeb | Python-3.6.0/Lib/test/test_enum.py | Python | mit | 90,724 | [
"MOE"
] | 8eabd068ced6839372a17dab40ee40bbad49b8647ca89b5d8ef7691cbd18fc5b |
# !/usr/bin/env python
"""
align FASTQ, SAM, or BAM file (gzip and bzip2 supported)
with bwa, produces BAM files (sorted and indexed)
output will be in ./align_bwa
In align_bwa, there will be a folder for each reference genome
e.g. align_bwa/ref1 , align2/ref2, align2/ref1, align2/ref2
"""
import logging
import os
... | benjschiller/seriesoftubes | scripts/align_bwa.py | Python | artistic-2.0 | 15,746 | [
"BWA"
] | 354e49627b8d936c2c9e69e8c29b39e7f2c40a106a49e3b250b2848dbfcceb95 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Bridge for using cclib data in biopython (http://biopython.org)."""
try:
from Bio.PDB.Atom import Atom
except Impor... | gaursagar/cclib | src/cclib/bridge/cclib2biopython.py | Python | bsd-3-clause | 1,280 | [
"Biopython",
"cclib"
] | 97468bdecf538f3c34e9f410af2c601073c0192f2b013fc0772446ff5b930524 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.