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 |
|---|---|---|---|---|---|---|---|
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | SamStudio8/scikit-bio | skbio/sequence/tests/test_sequence.py | Python | bsd-3-clause | 106,092 | [
"scikit-bio"
] | d7d9e0690bd842f7f57223bff4b0fd6c57db116887f3c384e5c551718bd4f953 |
import skbio
import skbio.diversity.beta
import numpy as np
from scipy.stats import pearsonr, spearmanr
from framework.types.parameterized import ChooseOne, List, Range
from framework.types.primitives import Boolean, Decimal, Integer, String
from . import qiime
from .types import (
DistanceMatrix, OrdinationResult... | biocore/metoo | qiime_plugin/methods.py | Python | bsd-3-clause | 3,599 | [
"scikit-bio"
] | 08c9b692dfee24cd8edefda9b01f10cd8799f58cb0d77694168d7fabba23ba4f |
#!/usr/bin/env python
#******************************************************************
# File: NormalRngTestCase.py
# Description:
# Author: Subhasis Ray
# E-mail: ray dot subhasis at gmail dot com
# Created: 2008-09-18 17:50:12
#********************************************... | BhallaLab/moose-thalamocortical | pymoose/tests/randnum/NormalRngTestCase.py | Python | lgpl-2.1 | 3,887 | [
"MOOSE"
] | d4750915bfc975f207d8bb69fd29671f8bcfcf94b589f44c53ddf6be911c8151 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-15 10:06:03 by Brian McFee <brian.mcfee@nyu.edu>
'''Helpful tools for deprecation'''
import warnings
from decorator import decorator
import six
from numba.decorators import jit as optional_jit
__all__ = ['moved', 'deprecated', 'optional_jit']
def mov... | r9y9/librosa | librosa/util/decorators.py | Python | isc | 1,987 | [
"Brian"
] | 8a914201526d140b288c29af8d9daef86fad62eaf2cb2f995fb99d73b11ff862 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
# au... | cmayes/aimless | docs/conf.py | Python | bsd-3-clause | 8,421 | [
"Amber"
] | c432cd58599086cc62a20fd909c8397120a869fe04d5f29f3a70c0ed715ea273 |
# Copyright 2019 the GPflow 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 writi... | GPflow/GPflow | tests/integration/test_dynamic_shapes.py | Python | apache-2.0 | 4,958 | [
"Gaussian"
] | 5f2148d640019a10cd3b4caed1a2d23a703dfd087ac3b772fa93aed5c9537fed |
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | postrational/django | django/conf/global_settings.py | Python | bsd-3-clause | 22,013 | [
"VisIt"
] | d2abd6343472d689a99d6d58e5318ad6745d74b53846aaa736bed7d550336386 |
""" Globals computes the value of globals(). """
from pythran.analyses.global_declarations import GlobalDeclarations
from pythran.passmanager import ModuleAnalysis
class Globals(ModuleAnalysis):
def __init__(self):
self.result = set()
super(Globals, self).__init__(GlobalDeclarations)
def vis... | hainm/pythran | pythran/analyses/globals_analysis.py | Python | bsd-3-clause | 566 | [
"VisIt"
] | 7caa35413a44e2c036fe2406de08ed61b75bb360c5c9fef225a63d59fbda5f0c |
from pandas import read_csv
from zipfile import ZipFile
from faker import Factory
import uuid
movie_fields = [ "id", "name", "release_date", "video_release_date", "url", "unknown",
"Action", "Adventure", "Animation", "Children's", "Comedy", "Crime",
"Documentary", "Dra... | rustyrazorblade/movielens-small | movielens/helpers.py | Python | apache-2.0 | 2,114 | [
"Brian"
] | d8eba65f38f151de5c9cd23a131fa4a6d8374caf8c3698c09dba02e02f17c9f7 |
# -*- coding: utf-8 -*-
"""
================================================================
GLM for Spike Train Prediction in Primate Retinal Ganglion Cells
================================================================
* Original tutorial adapted from Johnathan Pillow, Princeton University
* Dataset provided by E.... | glm-tools/pyglmnet | examples/plot_glm_retinal_ganglia.py | Python | mit | 8,891 | [
"Gaussian"
] | 3a971f2110383e696ac7f0fec9011b4eb6c1204664991b7d41ddf4831cf1c648 |
# a tentative script to upload all existing drstree "versions" into CMIP sqlite database
# each variable, mip, experiment, model, ensemble combination add a new instance in "instance"
# for each instance there should be at least one version in "version" table
# for each version add at least one file in table "files"
... | coecms/ARCCSSive | database_updates/upload_tmptree.py | Python | apache-2.0 | 3,975 | [
"NetCDF"
] | 39495f2c4f6aca8f18a8cbd1d608bac7486536a6083babde728bed55c1269735 |
from django.contrib.auth.models import User
from lettuce import step, world
from notification_prefs import NOTIFICATION_PREF_KEY
from openedx.core.djangoapps.user_api.preferences.api import get_user_preference, set_user_preference
USERNAME = "robot"
UNSUB_TOKEN = "av9E-14sAP1bVBRCPbrTHQ=="
@step(u"I have notificati... | BehavioralInsightsTeam/edx-platform | lms/djangoapps/notification_prefs/features/unsubscribe.py | Python | agpl-3.0 | 835 | [
"VisIt"
] | db6ff9876336701b750f5e37c347b40ce5ab9b25baee376778c9b0dd890b6f0c |
from basic import *
import sys
import translation
from all_genes import all_genes, gap_character
from genetic_code import genetic_code, reverse_genetic_code
import logo_tools
import random
if pipeline_params['new_probs']:
Log( 'tcr_sampler: new_probs' )
import tcr_rearrangement_new as tcr_rearrangement
else:
... | phbradley/tcr-dist | tcr_sampler.py | Python | mit | 38,956 | [
"BLAST"
] | 7bbd58e4a4a08be98a87243866a58f839447f3f13aeb0f61dd59b4483ad70e6b |
"""
#;+
#; NAME:
#; abs_line
#; Version 1.0
#;
#; PURPOSE:
#; Module for individual absorption lines
#; 01-Nov-2014 by JXP
#;-
#;------------------------------------------------------------------------------
"""
from __future__ import print_function, absolute_import, division, unicode_literals
import numpy as... | alfeinsod/xastropy | xastropy/spec/abs_line.py | Python | bsd-3-clause | 12,285 | [
"Galaxy"
] | 0bf40e2ca86207ced598696eb9e0d94ba3b3442a22d35cd86b45a918e2514f57 |
#
# Copyright 2015 James Kermode (Warwick U.)
#
# matscipy - Materials science with Python at the atomic-scale
# https://github.com/libAtoms/matscipy
#
# 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 Founda... | libAtoms/matscipy | examples/socketcalc/quip_socket_client.py | Python | lgpl-2.1 | 2,180 | [
"Matscipy"
] | 5cd045547f9d20d9e5fe99608c93719a0bd498ab695a69cab811ddc6eb3a2746 |
###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to submit
# large numbers of jobs on supercomputers. It provides a python interface to physical input, suc... | pylada/pylada-light | src/pylada/process/shared.py | Python | gpl-3.0 | 3,951 | [
"CRYSTAL",
"VASP"
] | 42c7dfe4b72ecf8b8386935f3afd8ab03a86b68f38a4ecfcf28d320f07cfdc14 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/plugins/presentations/lib/pptviewcontroller.py | Python | gpl-2.0 | 8,809 | [
"Brian"
] | 30dda70aaf98db0f49b01fc59502d536804ae9f67aafddd7a6f09b603662ef95 |
# $Id$
#
# Copyright (C) 2004 Rational Discovery LLC
# All Rights Reserved
#
from rdkit import RDConfig
import os,sys
import unittest
from rdkit import Chem
from rdkit.Geometry import Point3D
def feq(v1,v2,tol2=1e-4):
return abs(v1-v2)<=tol2
def ptEq(pt1, pt2, tol=1e-4):
return feq(pt1.x,pt2.x,tol) and ... | rdkit/rdkit-orig | Code/GraphMol/Wrap/testConformer.py | Python | bsd-3-clause | 3,548 | [
"RDKit"
] | 863702e05cd0c94397d30f63c0d7ec75ce0aa038cd1bf8c18611757070a0ae91 |
from django.contrib import admin
from django.conf import settings
from django.conf.urls import include
from django.conf.urls.static import static
from django.views import defaults as default_views
from django.urls import path
urlpatterns = [
# Django Admin
path('admin/', admin.site.urls),
# User Account
... | panuta/django-startup | {{cookiecutter.project_slug}}/config/urls.py | Python | mit | 1,302 | [
"VisIt"
] | 8d11c1d2a45ed29ac929ea0e41d05ed7333346ed4f9fa4ce344b48c94ff54650 |
# constants.py: Dark Age of Camelot Spellcrafting Calculator
#
# See http://kscraft.sourceforge.net/ for updates
#
# See NOTICE.txt for copyrights and grant of license
__all__ = [
'ScVersion',
'GemLists', 'DropLists', 'CraftedLists',
'TypeList', 'EffectTypeList', 'DropTypeList', 'CraftedTypeList',
'ValuesLists... | tomkins/spellcraftcalc | constants.py | Python | gpl-2.0 | 48,566 | [
"CRYSTAL"
] | 89bac73e052cc3984661ace6024e74661358a0bc6d68d06f4ba700fbf5387654 |
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 6 10:39:20 2017
@author: konstantin
"""
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=FutureWarning)
import h5py
from dolfin import *
import numpy as np
import time
import pickle
import os
from tissue_dielectrics impor... | andreashorn/lead_dbs | ext_libs/OSS-DBS/OSS_platform/FEM_in_spectrum_multicontact.py | Python | gpl-3.0 | 26,114 | [
"NEURON"
] | 3437fae5001f0f1c69b0bc1d8ffb57fe62087f1123bf3f12ecf7c23966e8e267 |
# This program is a tentative to have automatic renumbering of .vtk file when there is an error related
# their numbering. Since the error due to the renumbering does not give a definitive order, this script assumes that no VTK over 1000 is a valid VTK and --deletes-- the VTK with the unvalid names
# Usage : python d... | mendax-grip/cfdemUtilities | unused/deleteVTK.py | Python | lgpl-3.0 | 1,825 | [
"VTK"
] | 08902b0c17622d0384edd6f70fe679b6ebb205dbc6ed8cd5e6d2235988d86251 |
#!/bin/env python
""" Reset failed requests and operations therein """
__RCSID__ = "$Id: $"
import sys
from DIRAC.Core.Base import Script
maxReset = 100
Script.registerSwitch( '', 'Job=', ' jobID: reset requests for jobID' )
Script.registerSwitch( '', 'Failed', ' reset Failed requests' )
Script.registerSwitch( '', ... | avedaee/DIRAC | RequestManagementSystem/scripts/dirac-rms-reset-request.py | Python | gpl-3.0 | 3,325 | [
"DIRAC"
] | 6ee6982813b84f9ee176f78d8fef6fae7332089b6f2a87af235f5d5abb5a5b3f |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# glumpy is an OpenGL framework for the fast visualization of numpy arrays.
# Copyright (C) 2009-2011 Nicolas P. Rougier. All rights reserved.
#
# Redistribution and use in source and binary fo... | sh4wn/vispy | vispy/glsl/build-spatial-filters.py | Python | bsd-3-clause | 18,868 | [
"Gaussian"
] | 5facc1e2e8ffb046e19b4bfb1f5f49d07e04a0ae2f23e9f806ab55bdf8cdb7ac |
# gmsh reader
# neu writer
#
# * handles triangles (2d), tets(3d)
import numpy
import scipy
from scipy.sparse import lil_matrix, csr_matrix, coo_matrix, triu, eye
import sys
class Mesh:
"""
Store the verts and elements and physical data
attributes
----------
Verts : array
array of 3d coor... | misztal/GRIT | UTILITIES/meshing/gmsh_to_txt/gmsh.py | Python | mit | 21,672 | [
"VTK"
] | 69afba1bf27792ddbe9b7a3d3d8db5883e0d35f439a333e8a4592492fbfd5e0e |
from skimage import color
from skimage.transform import resize
from skimage.io import imread
import numpy as np
import os
import sklearn.neighbors as nn
import warnings
import configparser
# *****************************
# ***** Utility functions *****
# *****************************
def check_value(inds, val):
''... | JarbasAI/JarbasAI | jarbas_models/tf_colorize/utils.py | Python | gpl-3.0 | 10,904 | [
"Gaussian"
] | 8103c98678a4022299ea78964a862aa5800f4462d62587f63848bca523c91657 |
def send_email (message, subject, recipients):
import smtplib
from smtplib import SMTP_SSL
from email.mime.text import MIMEText
fromaddr = 'email@yandex.ru'
server = SMTP_SSL('smtp.yandex.ru:465')
msg = MIMEText(message)
msg['Subject']=subject
msg['To'] = ",".join(recipients)
msg['Fr... | apetrin/Allure-monitor | monitor.py | Python | gpl-2.0 | 1,928 | [
"VisIt"
] | 834065b6d43930b9ae892f3af17c276d086f6147875d849b72bfb0766cf02c06 |
import numpy as np
from multiprocessing import cpu_count
from glmnet import LogitNet
from GPy.models import GPClassification
from GPy.kern import RBF
class Classifier:
"""A base class for a ratio estimation classifier."""
def __init__(self):
"""Initializes a given classifier."""
raise NotImpl... | elfi-dev/zoo | pylfire/pylfire/classifiers/classifier.py | Python | bsd-3-clause | 6,672 | [
"Gaussian"
] | 44ac6e998504d688ed271be37944e3d04960999c819b65b1d2f2795b86567529 |
"""
The borg package contains modules that assimilate large quantities of data into
pymatgen objects for analysis.
"""
| rousseab/pymatgen | pymatgen/apps/borg/__init__.py | Python | mit | 119 | [
"pymatgen"
] | f3d487a4f7da7ba4952d28b52b26538eddb83626b05de5f4ffa726e99c982813 |
# Version: 0.10
"""
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, and 3.2, 3.3
[](https://tr... | foosel/GitIssueBot | versioneer.py | Python | agpl-3.0 | 35,452 | [
"Brian"
] | 084231bd0c60bd8c59c3f0efbaa79cf2b0bd6bb1a7df15c16607945d0c24c811 |
#!/usr/bin/env python
# for python 2 / 3 compatibility
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
try :
range = xrange
except NameError :
pass
try :
import ConfigParser as configparser
except Import... | andyofmelbourne/crappy-crystals | scratch/chesh.py | Python | gpl-3.0 | 3,256 | [
"CRYSTAL"
] | b232af3b1a122929dc9450e56ecf69ca2985d70c276bd364159287ae0babd128 |
../../../../../../../share/pyshared/orca/scripts/apps/planner/__init__.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/planner/__init__.py | Python | gpl-3.0 | 73 | [
"ORCA"
] | b61495829987041e662e9f19de72dee9dbf94e23b9a3518069109315c7c2a580 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Zappa CLI
Deploy arbitrary Python programs as serverless Zappa applications.
"""
from __future__ import unicode_literals
from __future__ import division
from past.builtins import basestring
from builtins import input, bytes
import argcomplete
import argparse
import... | pjz/Zappa | zappa/cli.py | Python | mit | 119,570 | [
"VisIt"
] | 567e82fa68961e3e7e9bb650566c61ece44e9a3f9b93b7c4c607c03c2d5d24a4 |
#!/usr/bin/python
import os, sys # low level handling, such as command line stuff
import string # string methods available
import re # regular expressions
import getopt # comand line argument handling
from low import * # custom functions, written by myself
import anydbm # index databases (file ... | lotharwissler/bioinformatics | python/kegg/kegg2xdom.py | Python | mit | 3,297 | [
"Biopython"
] | 117003553f07b5b97df788da1c3783ca632b400194fd0bdd28e55b4fe1548c46 |
##
# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
#
# Copyright:: Copyright 2013-2016 CaSToRC, The Cyprus Institute
# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>
# License:: MIT/GPL
# $Id$
#
##
"""
Easybuild support for building NAMD, implemented as an easyblock
@author: G... | hpcleuven/easybuild-easyblocks | easybuild/easyblocks/n/namd.py | Python | gpl-2.0 | 7,492 | [
"NAMD"
] | 88982e06be496781c32b0bc363c39441902b58207615b6a42ea5da64593489ac |
'''
Copyright 2013 Raytheon BBN Technologies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | BBN-Q/QGL | QGL/PulsePrimitives.py | Python | apache-2.0 | 20,555 | [
"Gaussian"
] | 11101cc22d3f0b3cdeb3202367dc4117cd33b085b40c9adff26fa5c97d44245f |
# -* coding: utf-8 -*-
# Utility functions for moose.
from __future__ import print_function, division, absolute_import
from __future__ import print_function, division
from __future__ import absolute_import
import types
import parser
import token
import symbol
import os
import math
import warnings
from datetime import... | upibhalla/moose-core | python/moose/utils.py | Python | gpl-3.0 | 40,232 | [
"MOOSE",
"NEURON"
] | 006c347d868b19a39ef50e120632c07c2054649c63ab0b3a66c538aafccf250e |
"""
neuron
======
For empirically-based simulations of neurons and networks of neurons in Python.
This is the top-level module of the official python interface to
the NEURON simulation environment (http://www.neuron.yale.edu/neuron/).
Documentation is available in the docstrings.
For a list of available names, try... | neurodebian/pkg-neuron | share/lib/python/neuron/__init__.py | Python | gpl-2.0 | 8,710 | [
"NEURON"
] | b34e212cef862ed45b47d18fc484f895807b0841906eeac8bc8faa0190bca5f6 |
"""
Testing for the forest module (sklearn.ensemble.forest).
"""
# Authors: Gilles Louppe, Brian Holt
# License: BSD 3
import numpy as np
from numpy.testing import assert_array_equal
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_equal
from numpy.testing import assert_almost_equa... | sgenoud/scikit-learn | sklearn/ensemble/tests/test_forest.py | Python | bsd-3-clause | 12,235 | [
"Brian"
] | 79cd03ea98a31127d7e6dd881cac00708911f0c627ffe5d8f9a9e6c49492596f |
#!/usr/bin/env python3
"""
This library allows to find similar code segments once it is given a starting node.
"""
import os
import shutil
import subprocess
import sys
from joern.shelltool.AccTool import AccTool
from octopus.server.python_shell_interface import PythonShellInterface
from octopus.mlutils.KNN import KN... | evonide/patextra | node_extrapolator.py | Python | gpl-3.0 | 14,295 | [
"Octopus"
] | 57843c55abb9266686771f148214d2a0df8345633f2ce302d2bb598c52f875c8 |
import shesha.config as conf
simul_name = "bench_scao_sh_16x16_8pix"
# loop
p_loop = conf.Param_loop()
p_loop.set_niter(100)
p_loop.set_ittime(0.002) # =1/500
# geom
p_geom = conf.Param_geom()
p_geom.set_zenithangle(0.)
# tel
p_tel = conf.Param_tel()
p_tel.set_diam(4.0)
p_tel.set_cobs(0.12)
# atmos
p_atmos = c... | ANR-COMPASS/shesha | data/par/par4tests/test_sh_influGaussian.py | Python | gpl-3.0 | 2,293 | [
"Gaussian"
] | 71d3d4bd86d7726dbece87b80996ebe3acb732e270e683bd8db4111e87d3c2b4 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the G... | kkreis/espressopp | src/analysis/StaticStructF.py | Python | gpl-3.0 | 3,673 | [
"ESPResSo"
] | 382316e7438d6f32d41f48e3034aa61ac857450eb62b0cbfd781ac2205ea1f20 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# freeseer - vga/presentation capture software
#
# Copyright (C) 2013 Free and Open Source Software Learning Centre
# http://fosslc.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | Freeseer/freeseer | src/freeseer/frontend/upload/youtube.py | Python | gpl-3.0 | 5,069 | [
"VisIt"
] | 769cf0ff97181498b07211ff38d9f2946c35a116549cd2d399bc214813e5fdf6 |
#!/usr/bin/env python
#pylint: disable=missing-docstring
####################################################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simu... | liuwenf/moose | python/MooseDocs/tests/css/test_css.py | Python | lgpl-2.1 | 1,824 | [
"MOOSE"
] | 7165d005ced77cfddb92fa0e2c6bc5e206c0af1cce68ad0859858fa316119fb2 |
# imports
import pandas as pd
import numpy as np
import time
import os
from tabulate import tabulate
import sys
from operator import add
from pyspark import SparkContext
from pyspark.sql import SparkSession
from pyspark.sql import SQLContext
from pyspark.sql import functions as F #https://stackoverflow.com/questions/3... | jphall663/GWU_data_mining | 03_regression/src/spark_kaggle_starter/spark_main.py | Python | apache-2.0 | 14,223 | [
"Gaussian"
] | 99c66970cf6b3bd9aacbcd4a7699d587aa9a207a9ac40648f5f464a22409941f |
"""SCons.Util
Various utility functions go here.
"""
#
# __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... | Distrotech/scons | src/engine/SCons/Util.py | Python | mit | 48,961 | [
"VisIt"
] | 570c059cf1bd2d11acfb1e898e953cc7d16e0f7a6490b4aa575d986711468800 |
from setuptools import setup, find_packages
setup(
name = 'jper-sword-out',
version = '1.0.0',
packages = find_packages(),
install_requires = [
"octopus==1.0.0",
"esprit",
"Flask",
"sword2"
],
url = 'http://cottagelabs.com/',
author = 'Cottage Labs',
auth... | JiscPER/jper-sword-out | setup.py | Python | apache-2.0 | 682 | [
"Octopus"
] | bbf28ef0c740c137a3502c281c50bd165c71d3686fc6aa7dc54d14044274b0a2 |
import conf
import re
import os
## TODO: Have motors communicate their own IP address
if conf.MODE == None:
raise ValueError('Check conf.py to configure settings')
elif conf.MODE == "SETUP":
from software.server import *
print("Please use a browser visit 127.0.0.1:5000 to process image")
app.run(port... | ut-ras/robotticelli | src/main.py | Python | lgpl-3.0 | 617 | [
"VisIt"
] | 93e7b6d0193faf21cd547fbb1a3666d262358f3872bd0401ea9d8b8b1278a486 |
# coding: utf8
# try something like
def index(): return dict(message="hello from cron.py")
def send_watch_email():
if request.env.remote_addr not in ["127.0.0.1","129.21.142.164"]:
raise HTTP(401, 'unauthorized')
#TODO Remove this
_username_to_email()
from datetime import datetime, tim... | FOSSRIT/Nova | controllers/cron.py | Python | gpl-3.0 | 2,503 | [
"VisIt"
] | 65f70248915f7735d4b5ec56bf008638710c8f97cc451f87180abda1b858a900 |
"""
ReportCLI class implementing command line interface to DIRAC Accounting
ReportGenerator Service. It is not complete yet
Once ready it could be used with a script as simple as:
from DIRAC.Core.Base import Script
Script.localCfg.addDefaultEntry("LogLevel", "info")
Script.parseCommandLine()
from DIRAC.AccountingS... | yujikato/DIRAC | src/DIRAC/AccountingSystem/Client/ReportCLI.py | Python | gpl-3.0 | 2,278 | [
"DIRAC"
] | 826eed60dccbba108098901a70771a933ed084fafa11b48d3a91487a2bfb6c3e |
#! /usr/bin/env python
usage = """%prog -- evaluate word segmentation
Version of 14th February 2010
(c) Mark Johnson
usage: %prog [options]
"""
import lx, tb
import optparse, re, sys
def tree_words(tree, score_cat_rex, ignore_terminal_rex):
def visit(node, wordssofar, segssofar):
"... | SnippyHolloW/contextual_word_segmentation | mark_scripts/topicsandcollocations/eval.py | Python | mit | 12,879 | [
"VisIt"
] | 3d00357537e0359dd302aa942f359a9f757cce5b3f96bd0e97bd135313846fe9 |
#
# 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 the Lice... | Lukc/ospace-lukc | client-pygame/lib/osci/dialog/EmpireOverviewDlg.py | Python | gpl-2.0 | 10,358 | [
"Galaxy"
] | d6ab1592e5a3e6f887e6a4722928e309a4fed22485e25007bb0543c414349c07 |
# -*- coding: utf-8 -*-
"""
Extraction from a data cube along specific dimensions
getGalcen : Extracts center of galaxy
extract1d : Extracts a single spectrum
extract2d : Extracts a single plane
extract3d : Extracts a subcube between two wavelengths
cutCube : Extracts a subcube between pixel range... | Kruehlio/MUSEspec | analysis/extract.py | Python | mit | 18,205 | [
"Galaxy",
"Gaussian"
] | 70c86707778fc201589c9ee93be226906c7e5ae80e1868b2d527d819d687c44c |
"""Ansible specific plyint plugin for checking deprecations."""
# (c) 2018, Matt Martz <matt@sivel.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# -*- coding: utf-8 -*-
from __future__ import annotations
import datetime
import re
import astroid
from pylint.interfac... | mahak/ansible | test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py | Python | gpl-3.0 | 11,795 | [
"VisIt"
] | 1675a9a181c51bf210a46b752b4bc1783cdd44958189a4f6efc34c80f58ccfd9 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# rmvgridres - remove resource from vgrid
# Copyright (C) 2003-2014 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | heromod/migrid | mig/cgi-bin/rmvgridres.py | Python | gpl-2.0 | 1,079 | [
"Brian"
] | b6768f1dcacbb441851e6b80ca61e2d5a29044c804933a1a9257fbcff66657f0 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-admin-ban-site
# Author : Stuart Paterson
########################################################################
"""
Remove Site from Active mask for current Setup
"""
__RCSID__ = "$Id$"
fr... | Andrew-McNab-UK/DIRAC | Interfaces/scripts/dirac-admin-ban-site.py | Python | gpl-3.0 | 3,043 | [
"DIRAC"
] | 5d1fd03059972babcd5a9c109cfc7e6c1e961f72aeacea7fbb80e8199bdb70f1 |
"""Test generation helpers
Intended to functionalize common tasks when working with the pytest_generate_tests hook.
When running a test, it is quite often the case that multiple parameters need to be passed
to a single test. An example of this would be the need to run a Provider Add test against
multiple providers. W... | anurag03/integration_tests | cfme/utils/testgen.py | Python | gpl-2.0 | 13,799 | [
"VisIt"
] | f20ef059a5cb432dcf072d74e1352a60b280b80d67fbba07499531e34a963c1a |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
import unittest
import numpy as np
from cclib.bridge import cclib2psi4
from cclib.parser.utils import find_package
cla... | langner/cclib | test/bridge/testpsi4.py | Python | bsd-3-clause | 1,040 | [
"Psi4",
"cclib"
] | a4b90f8c5feab2c0a9e50165bd81691de4e70d283070bd27471ce690efb47ac2 |
"""This demo program uses of the interface to TAO solver for
variational inequalities to solve a contact mechanics problem in
FEnics. The example considers a heavy elastic circle in a box of the
same size.
"""
# Copyright (C) 2012 Corrado Maurini
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you ca... | MiroK/DolfinSurface | demo/undocumented/contact-vi-tao/python/demo_contact-vi-tao.py | Python | gpl-3.0 | 3,297 | [
"VTK"
] | 6c1ecf8892483b07e31feefbbcc65893650054b52ae2b2e3ecfa6a21d9eec429 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms o... | Nick-Hall/gramps | gramps/plugins/tool/verify.py | Python | gpl-2.0 | 69,376 | [
"Brian"
] | ac317c3ca26038a4b56096bf12d68838bb7fd86b1ae974ba7a4488ace736e365 |
"""
=======================================
Signal processing (:mod:`scipy.signal`)
=======================================
Convolution
===========
.. autosummary::
:toctree: generated/
convolve -- N-D convolution.
correlate -- N-D correlation.
fftconvolve -- N-D convolution usi... | e-q/scipy | scipy/signal/__init__.py | Python | bsd-3-clause | 14,720 | [
"Gaussian"
] | 41c5fa9970dd5e8f1b5a85e88e08cd97d41496cadb2706c5ba548e8676c425c0 |
""" DIRAC FileCatalog component representing a directory tree with simple nodes
"""
__RCSID__ = "$Id$"
import os
from DIRAC import S_OK, S_ERROR
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryTreeBase import DirectoryTreeBase
class DirectoryNodeTree(DirectoryTreeBase):
""" Class managing Direc... | chaen/DIRAC | DataManagementSystem/DB/FileCatalogComponents/DirectoryNodeTree.py | Python | gpl-3.0 | 5,120 | [
"DIRAC"
] | ccfe327dcfa701de727645600ec372a9111c9cdc1ff3e0253f72f60ca51a2798 |
"""
Utility functions for transcripts.
++++++++++++++++++++++++++++++++++
"""
import os
import copy
import json
import requests
import logging
from pysrt import SubRipTime, SubRipItem, SubRipFile
from lxml import etree
from HTMLParser import HTMLParser
from xmodule.exceptions import NotFoundError
from xmodule.contents... | Edraak/edx-platform | common/lib/xmodule/xmodule/video_module/transcripts_utils.py | Python | agpl-3.0 | 24,421 | [
"FEFF"
] | b198a950209e52b2e79748460a1923387bcd5b3b67d685e529338aab30a3f902 |
# -*- coding: utf-8 -*-
#
# neuronview.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
... | weidel-p/nest-simulator | examples/neuronview/neuronview.py | Python | gpl-2.0 | 10,585 | [
"NEURON"
] | d652caf8064619ac97c12be2891e6eec73cd69248382b550d36d87bd8251c8f5 |
#!/usr/bin/python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without... | pombredanne/git-git.fedorahosted.org-git-pyrpm | scripts/oldpyrpm.py | Python | gpl-2.0 | 281,251 | [
"VisIt"
] | 19d952482d438bb27f2b2d050cfe5c0389d5eb2ce4477699ec55644a6aeaec12 |
from django.conf.urls import include, url
from let_me_app import views
urlpatterns = (
url(r'^view/event/(?P<pk>[0-9]+)/$',
views.EventView.as_view(),
name='view_event'),
url(r'^view/my/events/$',
views.UserEventListView.as_view(),
name='user_events'),
url(r'^view/my/proposa... | oleg-chubin/let_me_play | let_me_app/urls/urls.py | Python | apache-2.0 | 5,690 | [
"VisIt"
] | f3c0541a091e7c61ba9f540a309e73e629f8cb3f387580d06b5a302fed5da6a9 |
# Copyright 2008 by Bartek Wilczynski.
# Adapted from Bio.MEME.Parser by Jason A. Hackney. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import sys
# Add path to Bio
sys.path.... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/Motif/Parsers/MAST.py | Python | gpl-2.0 | 4,577 | [
"Biopython"
] | 539bf1bdeb2959a263b74789fc42b4771de1d27e45d6d8aa86a37eabc93c5568 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2009 Gary Burton
# Contribution 2009 by Reinhard Mueller <reinhard.mueller@bytewise.at>
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modif... | Forage/Gramps | gramps/plugins/textreport/kinshipreport.py | Python | gpl-2.0 | 17,029 | [
"Brian"
] | 137ca80a17bdace3debddf8e1068db17ec4e05a3888f50dc3c4dd99d1c5d191c |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2019 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | CDSherrill/psi4 | psi4/share/psi4/databases/BAKERJCC93.py | Python | lgpl-3.0 | 42,456 | [
"Psi4"
] | e562fb8f4ba8378a4abde5916eaebd01658a7057ef39eaaa85ce9f50ffb1e347 |
"""Sensitive variant calling using VarDict.
Defaults to using the faster, equally sensitive Java port:
https://github.com/AstraZeneca-NGS/VarDictJava
if 'vardict' or 'vardict-java' is specified in the configuration. To use the
VarDict perl version:
https://github.com/AstraZeneca-NGS/VarDict
specify 'vardict-perl'.... | biocyberman/bcbio-nextgen | bcbio/variation/vardict.py | Python | mit | 15,605 | [
"BWA"
] | 18804c568d02c258cce39459444b3960dec55e5841f235e356a23c14bacb935d |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/dft/uks_symm.py | Python | apache-2.0 | 1,830 | [
"PySCF"
] | 608fad0d54bc6ec3de86d61481c59cdd19ab61372b4d8235f755b99fd6ddd135 |
# -*- coding: utf-8 -*-
"""
Created on Tuesday Nov 1 01:59:00 2016
@author: andreas
"""
import utilities
from utilities import *
import keras
from keras.models import Sequential
from keras.layers import Dense, Activation
def test_sentence(sentence):
sentence = process_text(sentence)
vec = vectorizer.transfor... | Ichaelus/Github-Classifier | Playground/nn.py | Python | mit | 2,724 | [
"NEURON"
] | f0646af0bb674066d8bba4af8b92ee6aeafde8bc2505f27dcdff8f35074f1134 |
# Copyright 2014 The Oppia 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 applicable ... | prasanna08/oppia | core/domain/email_manager_test.py | Python | apache-2.0 | 133,002 | [
"VisIt"
] | 93c3a7f2e14af6b9d7fd3d1723fbd2876f7dfd3819bd7f0ce4019eea0a4e54b8 |
""" Base class for DIRAC Client """
__RCSID__ = "$Id$"
from DIRAC.Core.DISET.RPCClient import RPCClient
class Client:
""" Simple class to redirect unknown actions directly to the server. Arguments
to the constructor are passed to the RPCClient constructor as they are.
- The self.se... | avedaee/DIRAC | Core/Base/Client.py | Python | gpl-3.0 | 1,943 | [
"DIRAC"
] | 5021583e709648cfd1f6382e7b169c71cd865514c037dec5802f82d5d153ea77 |
from setuptools import setup, find_packages
# read README as the long description
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
name='urbansim',
version='3.2',
description='Platform for building statistical models of cities and regions',
long_description=long_description,
... | synthicity/urbansim | setup.py | Python | bsd-3-clause | 1,431 | [
"ORCA"
] | e239472a38d78e1985ed1e00097f155b3d51b63b64d73978b5343837d5f15a03 |
"""
A VTK RenderWindowInteractor widget for wxPython.
Find wxPython info at http://wxPython.org
Created by Prabhu Ramachandran, April 2002
Based on wxVTKRenderWindow.py
Fixes and updates by Charl P. Botha 2003-2008
Updated to new wx namespace and some cleaning up by Andrea Gavana,
December 2006
"""
"""
Please see... | b3c/VTK-5.8 | Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py | Python | bsd-3-clause | 24,670 | [
"VTK"
] | 69d165eccf867b6bbafeaa27b352d5d761a463d7419717c5646c548e1689c899 |
#!/usr/bin/env python
# Purpose: Run the Tn-seq mapping pipeline. Produces files
# listing reads per location. The output files can be fed
# to the annotation script for analysis.
#
# Copyright (c) 2014 University of Washington
#-----------------------------------------------------
# modules
#-------------------------... | elijweiss/Tn-seq | python/process_map.py | Python | mit | 16,749 | [
"BWA",
"Bowtie"
] | 2329c212b1c621180076057c6c7e60103c9bde294311d76f254225585c21dfa1 |
import numpy as np
import numpy.linalg as la
from scipy.special import expit
from simplenet.core import Layer
from simplenet.util import require_true
_REQUIRE_TRUE_MESSAGE = 'Must have centers to activate RBF layer'
class RbfLayer(Layer):
def __init__(self, num_inputs, num_neurons, centers=None, spread=1.):
... | rileymcdowell/simplennet | simplenet/layers/rbf_layer.py | Python | mit | 1,830 | [
"NEURON"
] | 83a4b860ab278ac90c2e1047a34e934b0906990af68e8591f7ef370bd26c02b5 |
import unittest
import os
import tempfile
from oplus import CONF, Epm, simulate
class SummaryTableTest(unittest.TestCase):
def test_summary_table(self):
current_eplus_version = CONF.eplus_version
CONF.eplus_version = (8, 5, 0)
# todo: check other versions !!!
try:
idf... | Openergy/oplus | tests/test_summary_table.py | Python | mpl-2.0 | 974 | [
"EPW"
] | bb63d36b1869f51d79e829ffa6d2740ae09e0e3331a29ab81f669fe1e44ec9bd |
import os
from ase import Atom, Atoms
from ase.optimize import BFGS
from ase.io import read
from gpaw import GPAW
from gpaw.test import equal
a = 4. # Size of unit cell (Angstrom)
c = a / 2
d = 0.74 # Experimental bond length
molecule = Atoms('H2',
[(c - d / 2, c, c),
(c + d / 2,... | qsnake/gpaw | gpaw/test/relax.py | Python | gpl-3.0 | 3,110 | [
"ASE",
"GPAW"
] | 479868efedf9a6805ceb306af97096cd85fe0ec78f37a613abdde510eeca07e0 |
__author__ = 'Victoria'
class Room(object):
def __init__(self, value, link=None):
self.value = value
self.link = link
def linkTo(self, room):
self.link = room
def printAll(self):
print (self.value)
if self.link is not None:
self.link.printAll()
def... | victorianorton/SimpleRPGGame | src/game/roomVisit.py | Python | mit | 3,506 | [
"VisIt"
] | 37fb45a0fce0078cbb1558f065f62c09d063da83d7c2d868ce4d01b09db7b7dd |
#######################
##### PLANETOPLOT #####
#######################
### A. Spiga -- LMD -- 06~09/2011 -- General building and mapping capabilities
### T. Navarro -- LMD -- 10~11/2011 -- Improved use for GCM and added sections + 1Dplot capabilities
### A. Colaitis -- LMD -- 11/2011 -- Mostly minor improv... | aymeric-spiga/planetoplot | modules/dev/planetoplot_v1/planetoplot.py | Python | gpl-2.0 | 69,081 | [
"NetCDF"
] | 969363003398a9aad414607c382bb989adbfb3d948e8cab3648c4ef4078efcec |
########################################################################
# $HeadURL$
########################################################################
""" CurveGraph represents simple line graphs with markers.
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phedex... | sposs/DIRAC | Core/Utilities/Graphs/CurveGraph.py | Python | gpl-3.0 | 5,056 | [
"DIRAC"
] | 6b31aeba476b3509de4899d9fb4a0d67281a63344e62abbc1416872c74a5f7b8 |
""" Client to interact with the S3Gateway """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from DIRAC.Core.Base.Client import Client, createClient
@createClient("DataManagement/S3Gateway")
class S3GatewayClient(Client):
"""Client code to the S3Gate... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/Client/S3GatewayClient.py | Python | gpl-3.0 | 1,282 | [
"DIRAC"
] | ba435078bbffb4658697e674f91e3ac91c4f1280561752e4787040dd65e96b85 |
from simphony.core.cuba import CUBA
from simphony.core.keywords import KEYWORDS
from ..common.atom_style_description import ATOM_STYLE_DESCRIPTIONS
class LammpsDataLineInterpreter(object):
""" Class interprets lines in LAMMPS data files using atom-style
Lines should be interpreted differently based upon th... | simphony/simphony-lammps-md | simlammps/io/lammps_data_line_interpreter.py | Python | bsd-2-clause | 4,703 | [
"LAMMPS"
] | c049835edf433de63af52c9d090dbac406b5053f59c5bb9314255ccb29d5488e |
# Copyright (c) 2016 Embedit Electronics
# Author: Brian Bradley
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | EmbeditElectronics/Python_for_PSoC | API_Python/pisoc/__init__.py | Python | mit | 41,886 | [
"Brian"
] | f903d62199da98530832c7f186219e6b9169f1cafb85c7c07acd983fe79c0155 |
import logging
import os
import numpy as np
import quantities as pq
import periodictable as pt
import parse_g09
from cclib.parser import ccopen
from pyqclib.defs import (
UNITLESS_IN_ELECTRONVOLT_TO_TYPED_KILOJOULE_PER_MOL,
UNITLESS_IN_ELECTRONVOLT_TO_TYPED_KILOCALORIE_PER_MOL,
UNITLESS_IN_ELECTRONVOLT_T... | bjodah/pyqclib | pyqclib/parsing.py | Python | bsd-3-clause | 8,465 | [
"cclib"
] | bb7e20975798aff2da1fb695e3df083beda3145e177319e8038092032b941f6b |
#!/usr/bin/env python
# encoding: utf-8
import logging
import re
# Tuples of Akan word and common spoken rendition
AKAN_TWI = [ # Order matters
(u'fo$', u'foɔ', 'e.g. sɔfo -> sɔfoɔ'),
('gua', 'dwa'),
('mb', 'mm'),
('nd', 'nn'),
('nye', 'ne'),
('nyi', 'ni'),
('te$', u'teɛ', u'e.g. aberante -> aberanteɛ'... | kasahorow/kwl | pronounce.py | Python | bsd-2-clause | 11,495 | [
"BWA"
] | 6de9eab915083e7b2ec043db8cfa92ffed326c126dc30a1145e0892a1a61a7ff |
# Physics, a 2D Physics Playground for Kids
# Copyright (C) 2008 Alex Levenson and Brian Jordan
# Copyright (C) 2012 Daniel Francis
# Copyright (C) 2012-14 Walter Bender
# Copyright (C) 2013 Sai Vineet
# Copyright (C) 2013-14 Ignacio Rodriguez
# Copyright (C) 2012-13 Sugar Labs
# This program is free software: you ... | walterbender/physics | activity.py | Python | gpl-3.0 | 29,045 | [
"Brian"
] | 4d134bd7622b29e07f4128d4d388cb24cf5de683ded45ff627f59cc546ddc572 |
"""Handle running, parsing and manipulating metrics available through Picard.
"""
import contextlib
import glob
import json
import os
import subprocess
from bcbio.utils import tmpfile, file_exists
from bcbio.distributed.transaction import file_transaction
from bcbio.broad.picardrun import picard_rnaseq_metrics
import... | Cyberbio-Lab/bcbio-nextgen | bcbio/broad/metrics.py | Python | mit | 21,573 | [
"pysam"
] | 26b6d946a0450ca5f03069f25bd89edd1633891169b047eebf927a9b91a64ca7 |
#! /usr/bin/env python
from __future__ import print_function
from openturns import *
from math import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# 1D tests
distribution = Dirac(0.7)
print("Distribution ", distribution)
# Is this distribution elliptical ?
print("Elliptical = ", distribution... | aurelieladier/openturns | python/test/t_Dirac_std.py | Python | lgpl-3.0 | 5,684 | [
"DIRAC"
] | 35380b35c0dae3832d4594326dd41ffc80d479628a38654cc55f4d05541846a8 |
from copy import deepcopy
import ast
import numpy as np
class git_vectorize():
def __init__(self, git_rdd, user_vector_type, content_vector_type, spark_context, **support_files):
"""Set up the Git vectorizer.
Args:
git_rdd (rdd): The raw git data. Each "row" is as follows:
... | tiffanyj41/hermes | src/data_prep/git_vectorize.py | Python | apache-2.0 | 12,032 | [
"VisIt"
] | addd31187fc6bb886c2cdaddd3472c9ea507a506cd04fa1639492f225f8b92f5 |
import os
import unittest
import numpy as np
from ..contiguity import Rook, Voronoi
from .. import user
from ... import examples
class Testuser(unittest.TestCase):
def test_min_threshold_dist_from_shapefile(self):
f = examples.get_path('columbus.shp')
min_d = user.min_threshold_dist_from_shapefile... | lixun910/pysal | pysal/lib/weights/tests/test_user.py | Python | bsd-3-clause | 1,155 | [
"COLUMBUS"
] | 0e985c7f7c0542238520a23ffa478d628681dc6bef39dfffb2373133d20d6607 |
"""Test of HGH pseudopotential implementation.
This is the canonical makes-sure-nothing-breaks test, which checks that the
numbers do not change from whatever they were before.
The test runs an HGH calculation on a misconfigured H2O molecule, such that
the forces are nonzero.
Energy is compared to a previous calcula... | robwarm/gpaw-symm | gpaw/test/pseudopotential/hgh_h2o.py | Python | gpl-3.0 | 2,876 | [
"ASE",
"GPAW"
] | da635b711a8f998e9d1ed08c1efcc99d0f1a75b6d760eaa3c3970f67f397f3ae |
import unittest
import numpy
import scipy.stats as st
import os
from shutil import rmtree
from unittest.util import safe_repr
from utility.accessdata import AccessData
from utility.constants import Constants
from utility.getdata import GetData
from observation.noise import Noise, APD, PMT, PPD, MPPC, Detector
class N... | gergopokol/renate-od | observation/noisetest.py | Python | lgpl-3.0 | 62,399 | [
"Gaussian"
] | 9e976b3ca5c9ad8752a958ea1d5a0775bf2f977d9e8d8e7ef96d5e13529acf4a |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module implements classes (called Fitters) which combine optimization
algorithms (typically from `scipy.optimize`) with statistic functions to perform
fitting. Fitters are implemented as callable classes. In addition to the data
to fit, the ``__c... | stargaser/astropy | astropy/modeling/fitting.py | Python | bsd-3-clause | 57,403 | [
"Gaussian"
] | 5fde2b9a01569b008979489644ae8d41243cecadc52e1056c64952e1d17e85e1 |
# Hilbert_curve.py
#
# author: Ted Pudlik
# created: May 11th, 2013
"""
Hilbert curve plotter: this program generates and plots approximations to the
Hilbert curve containing a finite number of turns. I define a 'Hilbert cap'
to be the the curve connecting four points,
------------------
| ... | tpudlik/Hilbert-curve | Hilbert_curve.py | Python | mit | 3,865 | [
"Brian"
] | 763ad4d852974670fbe249bec5df2f009ea434d3b2e918ad342fb70b97d65978 |
import unittest
import pysam
from ngs_python.bam import pysamfunc
def compareDict(d1,d2):
# Find combined keys
keySet = set()
keySet.update(d1.keys())
keySet.update(d2.keys())
# Loop through keys and find differing elements
for key in keySet:
try:
if d1[key] != d2[key]:
... | adam-rabinowitz/ngs_python | bam/pysamfunc_unittest.py | Python | gpl-2.0 | 5,912 | [
"pysam"
] | 6a5e9cca61dbdf1048c0378e7568ab9294e919e0edec458afaf6ed6eab9e18d4 |
# submission form jupyter notebook supporting code
# Author: S. Kindermann
# Version: 0.2 (March 2015)
# to do:
# separate out generic form code (e.g. git repo handling) as a super class
# from which specific form handlers inherit
"""
=============================================
Data submission form tools
===========... | IS-ENES-Data/submission_forms | dkrz_forms/form_handler.py | Python | apache-2.0 | 23,398 | [
"VisIt"
] | de89cc89caf7be802fd8619472202d82e61a3c52f0e20612befc7c2ea0678a3c |
# Author(s): TJ Lane (tjlane@stanford.edu) and Christian Schwantes
# (schwancr@stanford.edu)
# Contributors: Vince Voelz, Kyle Beauchamp, Robert McGibbon
# Copyright (c) 2014, Stanford University
# All rights reserved.
"""
Functions for performing mean first passage time
calculations for an MSM.
For a usef... | stephenliu1989/msmbuilder | msmbuilder/tpt/mfpt.py | Python | lgpl-2.1 | 4,057 | [
"MDTraj"
] | c5a12776add703ecc268ffd34f3b11ce967e892588521b7e527b068af7d662e0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.