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 |
|---|---|---|---|---|---|---|---|
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2013 Brian Douglass bhdouglass@gmail.com
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Softwa... | bhdouglass/remindor-qt | remindor_qt/AboutDialog.py | Python | gpl-3.0 | 2,274 | [
"Brian"
] | ba51bbf2144c2eb354fac2c1526d6873c2d625cde5f9175aacfc9ec30d395657 |
"""
Test Kkit capabilities of PyMOOSE
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2015, Dilawar Singh and NCBS Bangalore"
__credits__ = ["NCBS Bangalore"]
__license__ = "GNU GPL"
__version__ = "1.0.0"
__maintainer__ = "Dilawar Singh"
__email__ ... | dilawar/moose-full | moose-core/tests/python/test_kkit.py | Python | gpl-2.0 | 1,957 | [
"MOOSE"
] | 94b2df581bdbab303e84b5f05790c4bd69808c28af76096a929f1ff818cd43fb |
from base.twilltestcase import TwillTestCase
from functional import database_contexts
import galaxy.model
from galaxy.model.orm import (
and_,
desc,
)
class TestMetadataEdit( TwillTestCase ):
def test_00_metadata_edit( self ):
"""test_metadata_edit: Testing metadata editing"""
sa_session ... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/test/functional/test_metadata_editing.py | Python | gpl-3.0 | 3,247 | [
"Galaxy"
] | bb6971c5054bfe121b39d8b129db95559c27a5f9b24038fb1ccb9d6a8497ca66 |
# -*- 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.
"""Test logfiles related to basis sets"""
import os
import unittest
from skip import skipForParser
__file... | langner/cclib | test/data/testBasis.py | Python | bsd-3-clause | 5,924 | [
"Jaguar",
"TURBOMOLE",
"cclib"
] | 16a65f8dc3321f433bddb278ba2936472597f3be592dcadbacd06268ec1dea24 |
# Copyright 2016 Brian Innes
#
# 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, ... | brianinnes/pycupi | python/vPiP/interpolator.py | Python | apache-2.0 | 7,206 | [
"Brian"
] | f12b8bc878613ce67fd5000431897a96839b1647072b7f7cd424d7abb24af7a1 |
# Copyright 2021, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | tensorflow/federated | tensorflow_federated/python/aggregators/distributed_dp_test.py | Python | apache-2.0 | 21,483 | [
"Gaussian"
] | 7610703e5590cc3c1fe2c320bd863fed3184dc6095a6a56c6dfd718d4e2821da |
""" ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server.
More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI
.. literalinclude:: /dirac.cfg
:start-after: ## PUSP type:
:end-before: ##
:dedent: 2
:... | yujikato/DIRAC | src/DIRAC/Resources/ProxyProvider/PUSPProxyProvider.py | Python | gpl-3.0 | 2,352 | [
"DIRAC"
] | 2013d881c53bc2d1bd8e225c3a85d2dcd4aea2b760766b92371d12db6637ea9a |
import json
from pathlib import Path
from gravity.defaults import (
DEFAULT_GUNICORN_BIND,
DEFAULT_GUNICORN_TIMEOUT,
DEFAULT_GUNICORN_WORKERS,
DEFAULT_INSTANCE_NAME,
CELERY_DEFAULT_CONFIG
)
def test_register_defaults(galaxy_yml, galaxy_root_dir, state_dir, default_config_manager):
default_co... | galaxyproject/gravity | tests/test_config_manager.py | Python | mit | 3,452 | [
"Galaxy"
] | 6ef0e8d44ac2440a7c22011ff99b38674cd37c4385b1d33d9008945750d0e074 |
import numpy as np
import utils
utils.backup(__file__)
'''
Default Parameters that are used when no other parameters are specified
'''
c = utils.Bunch()
# Number of units (e: excitatory, i: inhibitory, u: input)
c.N_e = 200 # if this is changed, eta_stdp has also to change
c.N_i = int(0.2*c.N_e)
c.N_u_e = int(0.05*c... | chrhartm/SORN | common/defaults.py | Python | mit | 5,576 | [
"NEURON"
] | 4044c2a3276f055790b25e4bef2da81b524286f615234c31baeffd0508009f74 |
#!/usr/bin/python3
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015, 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This progra... | stgraber/snapcraft | snapcraft/main.py | Python | gpl-3.0 | 13,508 | [
"VisIt"
] | 966c708cd335dd630ac9a328f04935ca0078f076163d2b7f4bd4f6dfbfa0eb79 |
# Copyright 2019 Deepmind Technologies Limited.
#
# 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 agr... | deepmind/deepmind-research | transporter/transporter.py | Python | apache-2.0 | 15,822 | [
"Gaussian"
] | c88bc979cb4f07e88238be2afc0c7ef34b51196614619886b4fbdad60765ab15 |
#!/usr/bin/python
"""This script run the pathologic """
try:
import optparse, sys, re, csv, traceback
from optparse import OptionGroup
import pickle
import math
from libs.python_modules.taxonomy.LCAComputation import *
import operator
from os import path, _exit, remove, rename
import logging.... | kishori82/MetaPathways_Python.3.0 | libs/python_scripts/MetaPathways_run_pathologic.py | Python | mit | 21,362 | [
"BLAST"
] | 5e81d0937f33c6991fad62862416c27cd0ef85c279f369b85ff3deea9d13ccc5 |
# coding=utf-8
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, print_function
import json
import os
import re
import subprocess
import sys
from abc import abstractmethod
from collections import d... | pantsbuild/pex | pex/pip.py | Python | apache-2.0 | 54,605 | [
"VisIt"
] | fa6b7d1d0de707025ee0c023bc42e5ea520845ee900fec14e9faa96f499d5091 |
"""Each ElkM1 area will be created as a separate alarm_control_panel."""
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (
ATTR_CODE,
ATTR_ENTITY_ID,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_NIGHT,
ST... | fbradyirl/home-assistant | homeassistant/components/elkm1/alarm_control_panel.py | Python | apache-2.0 | 7,966 | [
"Elk"
] | 28817e2889b76415b69670000e378efa6ab8d56b254b54097d29704a5ef9aabb |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | swails/mdtraj | mdtraj/geometry/sasa.py | Python | lgpl-2.1 | 5,693 | [
"Gromacs",
"MDTraj"
] | 7c05293f62f66a5b6f3295677bd850fc3a3705f3ad8e364c8784587b52414620 |
# -*- coding: utf-8 -*-
"""
.. _tut-compute-covariance:
=============================
Computing a covariance matrix
=============================
Many methods in MNE, including source estimation and some classification
algorithms, require covariance estimations from the recordings.
In this tutorial we cover the basic... | mne-tools/mne-python | tutorials/forward/90_compute_covariance.py | Python | bsd-3-clause | 8,083 | [
"Gaussian"
] | 314c2104e73aaabc123a3c99e82856581af846e2065f3e5df4700bb7b5e69ac7 |
from __future__ import print_function
import unittest as ut
import numpy as np
import espressomd
from espressomd.interactions import *
from espressomd.magnetostatics import *
from espressomd.analyze import *
import math
from tests_common import *
from numpy import linalg as la
from numpy.random import random
from espre... | KonradBreitsprecher/espresso | testsuite/dawaanr-and-dds-gpu.py | Python | gpl-3.0 | 6,528 | [
"ESPResSo"
] | 254c0a14b671bf27a6e091bef711e98e80f40da0ee6a5cb35b1b3f47df6b9bc5 |
#!/usr/bin/env python
#this program convert movie data to atom data = for each spherocylinder make residue
#consiting of two atoms at begining and end then in vmd use cpk to draw cylinders
import os
import sys
import math
import optparse
import commands
import string
import random
import usefulmath
def write_pdb(out... | LukasSukenik/faunus | src/playground/vacha/sc-moviepdb.py | Python | gpl-2.0 | 4,700 | [
"VMD"
] | 1f0ca9d15dceabeb4a8f71b73f0a60fb518ed6903c0ab560b492e4c48fdb82f3 |
"""
This module is for hemodynamic reponse function (hrf) specification.
Here we provide for SPM, Glover hrfs and finite timpulse response (FIR) models.
This module closely follows SPM implementation
Author: Bertrand Thirion, 2011--2015
"""
import warnings
import numpy as np
from scipy.stats import gamma
def _gamma... | salma1601/process-asl | procasl/externals/nistats/hemodynamic_models.py | Python | bsd-3-clause | 16,393 | [
"DIRAC"
] | 9b09df49b73037a18d465f695f5174fc219b8d3e6c5182aaac9b4d9cc441b416 |
"""File like interface for reading Amber mdcrd files."""
import numpy as np
from floatx import floatx
STDOPEN=open
class MDCrdError(Exception):
pass
class MDCrdFile(object):
crd_per_line=10
crd_fmt='%8.3f'
def __init__(self, name, mode='r', num_atoms=None,
comment=None,
... | plediii/coord_util | mdcrd.py | Python | bsd-3-clause | 3,949 | [
"Amber"
] | 8cac6a057dfeb79a0c847506571ed0030d62297b72aebc923a5c2a6712c75a92 |
#!/usr/bin/python
#
# Copyright (C) 2010,2012,2013,2014 The ESPResSo project
# Copyright (C) 2008 Axel Arnold
#
# 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, eit... | ohickey/espresso | tools/trace_memory.py | Python | gpl-3.0 | 2,278 | [
"ESPResSo"
] | c8d134fa491561df85236c76c9fa3e15cecdff4ea187c2fa9d2da08696aec03f |
# -*- coding: utf-8 -*-
"""Utilities for BEL repositories."""
import json
import logging
import os
import sys
import time
from dataclasses import dataclass, field
from itertools import chain
from typing import Any, Iterable, Mapping, Optional, Set, TextIO, Tuple, Union
import click
import pandas as pd
from tqdm.auto... | pybel/pybel | src/pybel/repository.py | Python | mit | 18,905 | [
"Pybel"
] | ebd6a79476a2af4ad5520c911edaa9ea06522bb2914680ccf83db2f3fe3f0a1e |
# -*- coding: utf-8 -*-
'''
Module for gathering and managing information about MooseFS
'''
# Import salt libs
import salt.utils
def __virtual__():
'''
Only load if the mfs commands are installed
'''
if salt.utils.which('mfsgetgoal'):
return 'moosefs'
return False
def dirinfo(path, opts... | victorywang80/Maintenance | saltstack/src/salt/modules/moosefs.py | Python | apache-2.0 | 3,840 | [
"MOOSE"
] | 939fdb58ab2076fd74ac44e2cda4f9c02101ddef2f08ed3f841056b648c73b9f |
from django.db import models
from edc_base.model_fields import OtherCharField
from edc_base.model_validators import date_not_future
from edc_base.model_mixins import BaseUuidModel
from ..choices import (YES_NO, YES_NO_DONTWANT,
BABY_TEST, BABY_TEST_RESULT, BABY_FEEDING,
A... | botswana-harvard/bais-subject | bais_subject/models/childbearing_and_antenatal_care.py | Python | gpl-3.0 | 3,329 | [
"VisIt"
] | be255293e31f86e04f391bf22b4528d5f501a4d275e111193cdcd348f680e76c |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import glob
import itertools
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import time
import urllib
import urllib2
import urlparse
import xmlrpclib
import zlib
from xml.etree import ElementTree
from cStri... | gdgellatly/OCB1 | addons/web/controllers/main.py | Python | agpl-3.0 | 69,619 | [
"VisIt"
] | 11f0513d313a8c919512c3ec578df8bc8376d57427d40ecdeac9ecaec5f06ce2 |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | demis001/scikit-bio | skbio/io/_warning.py | Python | bsd-3-clause | 668 | [
"scikit-bio"
] | 56ba8725d60411d7c37decd513a34f13c2c46c5b825289d3a07d0ea3f2a6e8e1 |
import sys
import struct
import cStringIO
import zlib
from PIL import Image
def read_fmt(fmt, fp):
"""
Reads data from ``fp`` according to ``fmt``.
"""
fmt = str("<" + fmt)
fmt_size = struct.calcsize(fmt)
data = fp.read(fmt_size)
assert len(data) == fmt_size, (len(data), fmt_size)
x = struct.unpack(fmt, data)
... | tommo/gii | lib/util/AsepriteFile/AsepriteFile.py | Python | mit | 7,658 | [
"ASE"
] | 14fb612bc1cc5908cb16c7d1277e18a080925041402eca5a0e1f77614f4a481a |
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator as glm
# test scoring_history for Gaussian family with validation dataset and cv
def testGLMGaussianScoringHistory():
col_list_compare = ["iterations", "objective", "nega... | h2oai/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_PUBDEV_7968_scoring_history_glm_gaussian_generate_scoring_history_cv.py | Python | apache-2.0 | 2,876 | [
"Gaussian"
] | 6156b4396fb6554219412222cbac4d4151cc824a1b69696261b89390d12b94ab |
#
# Copyright (C) 2013-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | hmenke/espresso | testsuite/python/thermalized_bond.py | Python | gpl-3.0 | 5,268 | [
"ESPResSo"
] | 46a5762e4c2259adb50111beafec00fdcba0ae1be3611fb06c1d344a9db50e17 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals, division, print_function
"""
This module provides utilities for basic math operations.
"""
import collections
from six.moves import zip
def abs_cap(val, max_abs_val... | migueldiascosta/pymatgen | pymatgen/util/num_utils.py | Python | mit | 3,740 | [
"pymatgen"
] | c967fe18eb29d2b9dbb0b08f483cff42efc2e6d118f1740f9cd61265976d3cfb |
# coding=utf-8
# Copyright 2021 TF.Text 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 ag... | chromium/chromium | third_party/tensorflow-text/src/tensorflow_text/python/ops/sentencepiece_tokenizer.py | Python | bsd-3-clause | 15,693 | [
"VisIt"
] | 79f00e48629bc43599c72f77f5ba92e54a598a88870041278e7c1eaa21a86c7e |
# (c) 2017, Brian Coca <bcoca@ansible.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in th... | hryamzik/ansible | lib/ansible/cli/inventory.py | Python | gpl-3.0 | 14,516 | [
"Brian"
] | 55d8c9031818b682fe840de329456a402f312acfb90b3f6f09bfc3dd80f7bec3 |
from __future__ import absolute_import
from __future__ import print_function
import datetime
import scipy.io.netcdf as nc
import glob
from .make_grids import grid_h5flashfiles
def write_AWIPS_netcdf_grid(outfile, t_start, t, xloc, yloc, lon_for_x, lat_for_y,
ctr_lat, ctr_lon, grid, grid_var_name, grid... | deeplycloudy/lmatools | lmatools/grid/AWIPS_tools.py | Python | bsd-2-clause | 5,759 | [
"NetCDF"
] | 7dcd04cc240f93f2e621ff14e2affcebcfc9df04b418ef233bdbc56108ad44c7 |
#! /usr/bin/env python
import sys, os, re
def unix2dos(file_aclimax):
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# replace \n with \r\n in the *.aclimax file
#
f = open(file_aclimax, 'r')
full_text = f.read()
f.close()
f = open(file_aclimax, 'w')
f.write(full_t... | stuartcampbell/vision | 2climax/2climax.py | Python | apache-2.0 | 23,860 | [
"CASTEP",
"Gaussian",
"Quantum ESPRESSO",
"VASP",
"phonopy"
] | 1a4e1fd16ab4dfbae5ef2454898424ee048b0ccd8e31b270e0140760ff2d0259 |
import sys
from abstract_step import *
import os
from logging import getLogger
logger = getLogger('uap_logger')
class CuffLinks(AbstractStep):
'''
CuffLinks is part of the 'Cufflinks suite of tools' for
differential expr. analysis of RNA-Seq data and their
visualisation. This step applies the cuffl... | kmpf/uap | include/steps/cufflinks.py | Python | gpl-3.0 | 23,465 | [
"Bowtie"
] | 7521426a25da78d0f2d8e3cd7b3786397ace402b3820ddda287ad9906f68e3a8 |
# -*- coding: utf-8 -*-
#
# hl_api_info.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 | pynest/nest/lib/hl_api_info.py | Python | gpl-2.0 | 10,791 | [
"VisIt"
] | a3c6c584052fc946147ddaaab9e0f2c23913c1b23211ef3e414d2832837fe4e0 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/web/mediaplayerfindfile.py | Python | gpl-2.0 | 5,535 | [
"VisIt"
] | a10a7929302d0300cd41bde81fa5702f7e5009039fe81356db687ffc2d526eef |
# hg.py - hg backend for convert extension
#
# Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# Notes for hg->hg conversion:
#
# * Old versions of Mercurial didn't tr... | iluxa-com/mercurial-crew-tonfa | hgext/convert/hg.py | Python | gpl-2.0 | 13,654 | [
"Octopus"
] | df54118b1d3c00cd6f73793b9e66fee10449e351447303e904118a25408eba9a |
# -*- coding: utf-8 -*-
"""
The `Node` Class
----------------
The basic building block for the linked list implementation is the
**node**. Each node object must hold at least two pieces of information.
First, the node must contain the list item itself. We will call this the
**data field** of the node. In addition, eac... | Bradfield/algos | book/lists/unordered_list.py | Python | cc0-1.0 | 11,833 | [
"VisIt"
] | 1dfe1268670d2e7aa0fc3d7bfd9b45b57465e4d430e033df31baf9321ebb746e |
#!/usr/bin/env python
"""Copyright 2010 Phidgets Inc.
This work is licensed under the Creative Commons Attribution 2.5 Canada License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/
"""
__author__ = 'Adam Stelmack'
__version__ = '2.1.8'
__date__ = 'May 17 2010'
#Basi... | danielsuo/mobot | src/move/Python/Servo-simple.py | Python | mit | 4,419 | [
"VisIt"
] | e67e4864ca4b2b7f284155d74fecf085848bbe472973485e25c75f646deaeda0 |
# -*- coding: utf-8 -*-
"""Classes for handling input/output prompts.
Authors:
* Fernando Perez
* Brian Granger
* Thomas Kluyver
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
# Copyright (C) 2001-2007 Fernando Per... | Vvucinic/Wander | venv_2_7/lib/python2.7/site-packages/IPython/core/prompts.py | Python | artistic-2.0 | 17,077 | [
"Brian"
] | 686df449dcc9a4eae0c36c208045870d3f51dc512cb80be92e81d008545c11d0 |
"""
Acceptance tests for Content Libraries in Studio
"""
from common.test.acceptance.pages.studio.library import LibraryEditPage
from common.test.acceptance.tests.studio.base_studio_test import StudioLibraryTest
from openedx.core.lib.tests import attr
@attr('a11y')
class StudioLibraryA11yTest(StudioLibraryTest):
... | eduNEXT/edunext-platform | common/test/acceptance/tests/studio/test_studio_library.py | Python | agpl-3.0 | 1,039 | [
"VisIt"
] | b9005c061a12cd0f9fd42bc8ac78c1c3afd5f7cfe8a678dea20c538a72a5f163 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = r'''
---
module: win_linein... | hryamzik/ansible | lib/ansible/modules/windows/win_lineinfile.py | Python | gpl-3.0 | 6,655 | [
"Brian"
] | ce70d54b7a81674ddd9bf29e235477c6e7babe1b2173bf1b339fdd2f857ae6e4 |
"""Tools for using spherical harmonic models to fit diffusion data.
References
----------
Aganj, I., et al. 2009. ODF Reconstruction in Q-Ball Imaging With Solid
Angle Consideration.
Descoteaux, M., et al. 2007. Regularized, fast, and robust analytical
Q-ball imaging.
Tristan-Vega, A., et al. 2010. A new metho... | FrancoisRheaultUS/dipy | dipy/reconst/shm.py | Python | bsd-3-clause | 37,210 | [
"DIRAC"
] | 02a0a334f5fdf592eebf1781c1e6b00b6ec7d32cbee659c7b531bad2bccb87cf |
#!/bin/env pypy
from __future__ import print_function
import itertools
import sys
import argparse
import re
def blast_result_iter():
""" input is like this :
# BLASTN 2.7.1+
# Query: D00390:494:CDT5UANXX:1:1107:19400:10481 1:N:0:0
# Database: /dataset/GBS_Tcirc/ztmp/SQ1014_analysis/db/microbial_references
# 0 hit... | AgResearch/prbdf | utils/semi_tab_to_nr_tabular.py | Python | gpl-3.0 | 3,252 | [
"BLAST"
] | c1e30261b1e5185530dc3609b06e520a180dd5baa977fe0edaf4d0d1a554617b |
# Copyright 2014->future! Mikko Korpela
#
# 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 agree... | hirsivaja/pabot | pabot/result_merger.py | Python | apache-2.0 | 4,388 | [
"VisIt"
] | bed84e190bba60cb2456f82ff0bfad88b5e0b67629037e871a0416556cf9c105 |
# ==================================================================================================
#
# Copyright (c) 2016, Chen Kian Wee (chenkianwee@gmail.com)
#
# This file is part of py4design
#
# py4design is free software: you can redistribute it and/or modify
# it under the terms of the GNU General ... | chenkianwee/envuo | py4design/citygml2eval.py | Python | gpl-3.0 | 38,338 | [
"EPW"
] | 2f4cc6089a8c791dd559ac5d6331c142bc47f42bfa6159590dc7f8e333abea6c |
import shelve
import time
import pytest
from wmr.players import START_RANK
from wmr.players import PlayerRepository
@pytest.fixture
def app(browser, server):
return ScoringApp(browser, server)
def test_shows_player_rating(app, database_url):
player_repo = PlayerRepository(database_url, START_RANK)
pla... | abele/whatsmyrank | tests/acceptance/test_tournaments.py | Python | bsd-2-clause | 1,908 | [
"VisIt"
] | 6530a69e8e8178205248c6c3734bb6d4345ec2f5cd07c4eb363470d645691060 |
from pylab import *
from copy import deepcopy
close('all')
def V(x, Z):
return -Z / sqrt(2 / Z ** 2 + x ** 2)
def E(t, E0, omega, n):
return E0 * sin(omega * t) * sin(omega * t / (2 * n))
def V_e(x, t, E0, omega, n):
return - x * E(t, E0, omega, n)
def V_tot(x, t):
return V(x, 1) + V_e(x, t, E... | LorenzoBi/courses | CQD/project.py | Python | mit | 3,208 | [
"Gaussian"
] | 4b1fdef10431b37b31fdf65e02175b3e057bc7b366e2b496612ab124bb6ab2d2 |
from __future__ import absolute_import, division, print_function
from jaspyx.visitor import BaseVisitor
class Subscript(BaseVisitor):
def visit_Subscript(self, node):
self.visit(node.value)
self.visit(node.slice)
def visit_Index(self, node):
self.output('[')
self.visit(node.va... | ztane/jaspyx | jaspyx/visitor/subscript.py | Python | mit | 649 | [
"VisIt"
] | ce30776b615efce7968d2aad43b6b0d5a098c699c99d172804d89c17d6b489bc |
"""
Unit Tests for observe module.
"""
import unittest
import sys
import pysam
from mixemt import observe
class TestObservedBases(unittest.TestCase):
def setUp(self):
self.mq = 30
self.bq = 30
aln1 = pysam.AlignedSegment()
aln1.reference_start = 10
aln1.query_name = 'read... | svohr/mixemt | mixemt/test/observe_test.py | Python | mit | 5,580 | [
"pysam"
] | 78fa4d9c8ff768a8efb15af8a8d8f186e35b55f3e445507b3e0cb6cbfd82c06d |
# python3
# pylint: disable=line-too-long
from absl import app
from absl import flags
from absl import logging
from acme import specs
from acme.utils import counting
from acme.utils import loggers
from ml_collections.config_flags import config_flags
import pathlib
import sys
ROOT_PATH = pathlib.Path(__file__).resol... | liyuan9988/IVOPEwithACME | main/run_kiv.py | Python | mit | 4,616 | [
"Gaussian"
] | d2eff2f0f076849254b6f24129ece2108f4498bf1cff9a50d8dc024813448783 |
# encoding: utf-8
"""
A base class for a configurable application.
Authors:
* Brian Granger
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in... | marcoantoniooliveira/labweb | oscar/lib/python2.7/site-packages/IPython/config/application.py | Python | bsd-3-clause | 21,121 | [
"Brian"
] | 7f39e49b76305e2c757daa315c1cfbb99f86b3fc0756d4d98c801be213f9f09f |
# Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | KaranToor/MA450 | google-cloud-sdk/lib/third_party/concurrent/futures/process.py | Python | apache-2.0 | 14,880 | [
"Brian"
] | 8bcc1ef8255e00aec42ef4bb2cd400777f64f18bf81c3160305e70545441556a |
########################################################################
# File : CREAMComputingElement.py
# Author : A.T.
########################################################################
""" CREAM Computing Element
"""
__RCSID__ = "$Id$"
import os
import re
import tempfile
import stat
from types import S... | miloszz/DIRAC | Resources/Computing/CREAMComputingElement.py | Python | gpl-3.0 | 14,584 | [
"DIRAC"
] | edeb2202ebc9a028501e7ab03f6a8df580f2792732ea647a50f3c8202c9ba27b |
""" Decorators for DIRAC.
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import os
import inspect
import functools
import traceback
__RCSID__ = "$Id$"
def deprecated(reason, onlyOnce=False):
"""A decorator to mark a class or function as deprecat... | ic-hep/DIRAC | src/DIRAC/Core/Utilities/Decorators.py | Python | gpl-3.0 | 6,918 | [
"DIRAC"
] | 8ec980ade5a5360551ae90b7a218ef67cc23b7a2f0d682c490b986442d54d33d |
# Copyright 2013-2021 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)
import re
import pytest
from llnl.util.tty.color import color_when
import spack.store
from spack.main import SpackComma... | LLNL/spack | lib/spack/spack/test/cmd/dependents.py | Python | lgpl-2.1 | 2,202 | [
"ESPResSo"
] | aa92c6e8b9e176d60c50db3f3a0c9e279ad69debd36bb16a1eae6d933da56fe3 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Access Sloan Digital Sky Survey database online.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import io
import warnings
import numpy as np
from astropy import units as u
import astrop... | ceb8/astroquery | astroquery/sdss/core.py | Python | bsd-3-clause | 47,187 | [
"Galaxy"
] | e6f0823269f01d5c404becd152210a92f74d84cba2fac2837fc67e232f768454 |
#!/usr/bin/env python
class codata2016:
def __init__(self):
self.mp = 1.672621898e-27 # kg
self.me = 9.10938356e-31 # kg
# end def
# end class
# HELPER FUNCTIONS
# ======================================
from lxml import etree
def xml_print(node):
print etree.tostring(node,pretty_print=Tru... | Paul-St-Young/QMC | setup_prod.py | Python | mit | 10,913 | [
"GAMESS",
"Gaussian",
"QMCPACK"
] | ab2da70794a5e0c17c9072c18b98949eb595565e6be1daf2b1c8c2a5c48848e1 |
#!/usr/bin/env python
from __future__ import print_function
import vtk
import numpy
from icqsol.bem.icqBaseLaplaceSolver import BaseLaplaceSolver
class LaplaceSolver(BaseLaplaceSolver):
def __init__(self, pdata, max_edge_length, order=5):
"""
Constructor
@param pdata instance of vtkPolyDa... | gregvonkuster/icqsol | bem/icqLaplaceSolver.py | Python | mit | 4,029 | [
"VTK"
] | cb43174154b0e6c2a6f5b97351d40b9f69d6218b3d8b61cca4ee3adb3ca2bba2 |
#!/usr/bin/python
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 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... | susilehtola/psi4 | doc/sphinxman/extract_changeset.py | Python | lgpl-3.0 | 1,762 | [
"Psi4"
] | 96caec909c18b35c959019d5f9f5c742fd4175c43440abf93b3e7c6ef6b6eed6 |
#!/usr/bin/env python3
"""
Copyright 2020 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 ... | pwillworth/galaxyharvester | html/udAlert.py | Python | gpl-3.0 | 3,147 | [
"Galaxy"
] | f47c0b2c7d13f939cd9d656a2d7e68500f6129760efc5463539299ec7ac99cf0 |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/ui/BasePopup.py | Python | gpl-3.0 | 2,415 | [
"ORCA"
] | 2e33fc8308bfad77fb4942aad85ba291fabe60d2098be17248ea7938d3b22924 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
CISD density matrix
'''
import numpy
from pyscf import gto, scf, ci, ao2mo
mol = gto.M(
atom = 'H 0 0 0; F 0 0 1.1',
basis = 'ccpvdz')
mf = scf.RHF(mol).run()
myci = ci.CISD(mf).run()
#
# CISD density matrix in MO basis
#
dm1 = myci.m... | gkc1000/pyscf | examples/ci/01-density_matrix.py | Python | apache-2.0 | 1,329 | [
"PySCF"
] | dc39dc3823422813c6c499d1fd6248b9fc403e9ab89350ca8401ab55e90e0d41 |
from ase.md.nvtberendsen import NVTBerendsen
| auag92/n2dm | Asap-3.8.4/Python/asap3/md/nvtberendsen.py | Python | mit | 45 | [
"ASE"
] | 7d32d11fedc9c1965c36bb410cf26be106343f0b270fd8f81dd3f5a9074e8cb4 |
"""Kohn-Sham single particle excitations realated objects.
"""
from math import pi, sqrt
import numpy as np
from ase.units import Bohr, Hartree, alpha
import gpaw.mpi as mpi
from gpaw.utilities import packed_index
from gpaw.lrtddft.excitation import Excitation, ExcitationList
from gpaw.localized_functions import cre... | robwarm/gpaw-symm | gpaw/lrtddft/kssingle.py | Python | gpl-3.0 | 15,939 | [
"ASE",
"GPAW"
] | 891a929a1dc9eca8a3c929c91db90d892388f5d96b21d5719a5228eb55d4f1bb |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/web/addlocation.py | Python | gpl-2.0 | 5,236 | [
"VisIt"
] | 980db809c0a4dd76e33c8ef505aa096d9ab5d1b61a1fc79a7f8399c0274a74eb |
#!/usr/bin/python
#-----------------------------------------------------------------------
# File : testacc.py
# Contents: examples how to use the fim module
# Author : Christian Borgelt
# History : 2011.07.21 file created
# 2011.07.22 example with an external file added
# 2011.07.28 output of a... | podshumok/pyarules | pyfim/ex/testacc.py | Python | mit | 5,794 | [
"NEURON"
] | 817318b9b22314102cc233907fdcf86ba55a57f78bdffbe266f4304a331bd0fe |
"""
@brief test log(time=42s)
"""
import sys
import os
import unittest
import datetime
if "temp_" in os.path.abspath(__file__):
raise ImportError(
"this file should not be imported in that location: " +
os.path.abspath(__file__))
from pyquickhelper.pycode import ExtTestCase
from pyquickhelpe... | sdpython/pyquickhelper | _unittests/ut_loghelper/test_history_helper.py | Python | mit | 7,338 | [
"VisIt"
] | 855dfdabf7b065e8ff02c3ba1a0df5b710f08ef506b92558fd5f6c71ebeb247d |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from CTFd.models import Teams, Solves, Challenges, WrongKeys, Keys, Tags, Files, Tracking
from CTFd import create_app
from random import randint
import datetime
import random
import hashlib
import os
import sys
app = create_app()
USER_AMOUNT = 50
CHAL_AMOUNT = 20
categorie... | breadchris/CTFd | populate.py | Python | apache-2.0 | 15,196 | [
"Amber",
"Brian",
"CRYSTAL"
] | d178aff62708466f16c1d8bd769cc0230dd003e07be647dae1aa1d83a393b408 |
from nose.tools import *
def test_user_storage_consistency():
from espresso.user import User
FAKE_ID = "a_fake_id"
FAKE_NAME = "a_fake_name"
a_user = User(FAKE_ID, FAKE_NAME)
assert a_user.uid == FAKE_ID
assert a_user.name == FAKE_NAME
def test_user_default_name():
from espresso.user import User
FAKE_ID =... | ratchetrobotics/espresso | tests/user_tests.py | Python | bsd-3-clause | 385 | [
"ESPResSo"
] | 2150d69b4d350d8e2ec4d7e74717d49e1411ab817d44820c0d14bf25102c5863 |
# Copyright(c) 2009, Gentoo Foundation
#
# Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
# Copyright(c) 2010, Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# $Header: $
"""General Base Module class to hold common module operation functions
"""
from __future__ import pri... | zmedico/gentoolkit | pym/gentoolkit/module_base.py | Python | gpl-2.0 | 4,293 | [
"Brian"
] | fb4203d13384816ac7f32e81eeb5901079414439fc278835eff4abf720245d32 |
"""
Tests for transformer objects.
"""
import os
import unittest
import numpy as np
import pytest
import scipy.ndimage
try:
import tensorflow as tf
has_tensorflow = True
except:
has_tensorflow = False
import deepchem as dc
from deepchem.trans.transformers import DataTransforms
class TestDataTransforms(unittest... | deepchem/deepchem | deepchem/trans/tests/test_data_transforms.py | Python | mit | 4,819 | [
"Gaussian"
] | 2ec3d934d1df45d5091472c43b31065770fab50a5341f5c975262ebc3d62e3f9 |
# Copyright (c) 2015-2016, the authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from GPy.core import SparseGP, Model, Param
from GPy.core.parameterization.transformations import Logexp
from paramz.transformations import __fixed__
from GPy import likelihoods
fro... | zhenwendai/DeepGP | deepgp/layers/layers.py | Python | bsd-3-clause | 21,780 | [
"Gaussian"
] | 83ad19d4a7d49b8d5e4e2310b5196074a09c901a243b182003c362f201617b84 |
# Noriben Malware Analysis Sandbox
#
# Directions:
# Just copy Noriben.py to a Windows-based VM alongside the Sysinternals Procmon.exe
#
# Run Noriben.py, then run your executable.
# When the executable has completed its processing, stop Noriben and you'll have a clean text report and timeline
#
# Version 1.0 - 10 Apr ... | sonofagl1tch/MalwareResearch | noriben/Noriben.py | Python | gpl-3.0 | 52,315 | [
"Brian"
] | 03bdd156a42758f6556d6c698e4976b7d5c188c3beeec6e85670fd1bcecc1c72 |
import re
from queue import Queue, Full
class Token:
LEFT_BRACKETS = 'LEFT_BRACKETS'
RIGHT_BRACKETS = 'RIGHT_BRACKETS'
SYMBOL = 'SYMBOL'
EXPRESSION = 'EXPRESSION'
SYMBOLS = '&|!'
def __init__(self, value, type):
self.value = value
self.type = type
def __str__(self):
... | magedu/logscan | logscan/match.py | Python | apache-2.0 | 3,871 | [
"VisIt"
] | c2ec068a0dd11ea9ffe4491c608ca7190dc661e4e211b6c9f244746f22ea2d69 |
"""
# Notes:
- This simulation seeks to emulate the COBAHH benchmark simulations of (Brette
et al. 2007) using the Brian2 simulator for speed benchmark comparison to
DynaSim. However, this simulation does NOT include synapses, for better
comparison to Figure 5 of (Goodman and Brette, 2008) - although it uses the... | asoplata/dynasim-benchmark-brette-2007 | Brian2/brian2_benchmark_COBAHH_nosyn_compiled_2000.py | Python | gpl-3.0 | 3,484 | [
"Brian"
] | d4839156db8e8c8841fd392ca858c40a3120c219bba8dc2875eabb7f957e0663 |
# creates: a1.png a2.png a3.png
import numpy as np
from ase import Atom,Atoms
from ase.io import write
atoms = Atoms('Ni4', positions= [(0, 0, 0),
(0.45, 0, 0),
(0, 0.5, 0),
(0.5, 0.5, 0),])
atoms[1].x = 0.5
a = 3.55
c... | grhawk/ASE | tools/doc/tutorials/manipulating_atoms.py | Python | gpl-2.0 | 1,014 | [
"ASE"
] | 9bd43d24c1ebd8948c2a89ac8815d8827f18a2cf506049127c37c697dc2d9073 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | guoxiaolongzte/spark | python/pyspark/ml/regression.py | Python | apache-2.0 | 68,194 | [
"Gaussian"
] | 6351af9622eff9ed4a2cf4bd52c8bb8bd0e24aa1ec5e6441cea55c0c1baa65d4 |
#!/usr/bin/env python
# Media Dragon - the modular media manager
# Copyright (C) 2012 Brian Hrebec
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at y... | bhrebec/mediadragon | src/lib/plugins/dummy.py | Python | gpl-3.0 | 943 | [
"Brian"
] | ff1d16c4db2f48a07e387bb3e437c4f6d4f0b598ae001f584f2ea534aa85ac4e |
"""Sub command: check
Usage: robotx check [options]
"""
import os
import tempfile
from robot import run
from robot.api import ExecutionResult
from robotx.core.base import BaseCommand
from robotx.core.nitrateclient import TCMS
from robotx.core.exceptions import UsageError
from robotx.core.resultvistor import ResultC... | ylbian/robot-d | robotx/core/commands/check.py | Python | mit | 2,963 | [
"VisIt"
] | cdb4175d821c8758c58523336b3137048f44bc258a0bcaba7ce4bd212cfaa01b |
import distutils
import numpy
from traits.etsconfig.etsconfig import ETSConfig
from mayavi import __version__ as MAYAVI_VERSION
from simphony.core.cuba import CUBA
from simphony.core.data_container import DataContainer
from simphony.cuds import Particles, Particle, Mesh, Point, Face, ABCLattice, \
ABCMesh, ABCPar... | simphony/simphony-mayavi | simphony_mayavi/tests/testing_utils.py | Python | bsd-2-clause | 7,070 | [
"Mayavi"
] | 136df48e71edbd7aac7728487260a009a4ffa061a69780350cb39aad64e069e1 |
from markdown.util import etree
from markdown.util import AtomicString
import logging
log = logging.getLogger(__name__)
from markdown.inlinepatterns import Pattern
from MooseCommonExtension import MooseCommonExtension
class MooseBuildStatus(MooseCommonExtension, Pattern):
"""
Markdown extension for add Build ... | backmari/moose | python/MooseDocs/extensions/MooseBuildStatus.py | Python | lgpl-2.1 | 1,949 | [
"MOOSE"
] | 722c997b0f8a5e9ab32f843ec0d0afd41155bf2ef0709af4a9a9f3a4b9371b09 |
"""
Created on Mar 15, 2014
@author: tjoneslo
"""
import bisect
import logging
import itertools
import networkx as nx
from AllyGen import AllyGen
from Star import Star
class RouteCalculation(object):
# How aggressive should the route finder be about reusing existing routes?
# Set higher to make the route les... | makhidkarun/traveller_pyroute | PyRoute/TradeCalculation.py | Python | mit | 42,431 | [
"Galaxy"
] | 8b62251ff23907d88f19f212f5ac9e638e23559288f00b4a858fafb6946be092 |
from PIL import Image
import numpy as np
import math
from scipy import signal
def boxfilter(n):
assert (n%2 != 0),"Dimension must be odd"
a = np.empty((n, n))
a.fill(1/(n*n))
return a
def gauss1d(sigma):
arr_length = 6*sigma
if arr_length % 2 == 0:
val = ((arr_length)/2)+1
elif arr... | NicholasHoCode/Galaxy | assets/code/GF.py | Python | mit | 2,040 | [
"Gaussian"
] | a6f6e90d41532ee3f0deed92cc24556b61d4defec2f0841fbc2cd97d0d2058e3 |
# -*- coding: utf-8 -*-
"""
:created: 2014-01-25
:author: Rinze de Laat
:copyright: © 2014 Rinze de Laat, Delmic
This file is part of Odemis.
.. license::
Odemis is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2 as published by the Free
... | ktsitsikas/odemis | src/odemis/gui/comp/overlay/view.py | Python | gpl-2.0 | 50,884 | [
"Gaussian"
] | a7402405a3eddf36d36f53fed810c28ac1a4cdd1aa163cc082153a7a97b8b022 |
# -*- coding: utf-8 -*-
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst.
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
import argparse
import logging
import os
import sys
from netCDF4 import Dataset
from o... | lizardsystem/threedilib | threedilib/subgrid/extract.py | Python | gpl-3.0 | 3,906 | [
"NetCDF"
] | f54e92b8ef7db829cd2497b40f478f0ac5f931c3bd6f5f6707853136ffde1a68 |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/editors/onetomanychoiceseditor.py | Python | gpl-2.0 | 2,469 | [
"VisIt"
] | 193dbda72678041a9cf4616d7c300e3b592f3608e8789c1552ab5b7706e44873 |
#
# libtcod 1.5.1 python wrapper
# Copyright (c) 2008,2009,2010 Jice & Mingos
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright... | Dozed12/df-style-worldgen | libtcodpy.py | Python | mit | 60,719 | [
"Amber"
] | 430dc09e7dd44ba7bdd146c588704610ff8bf1a3849bb4bc67d3a3b07c79c333 |
"""Metrics to assess performance on classification task given class prediction.
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better.
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better.
"""
# Authors: Alexandre Gramfort <alexandre.gr... | sergeyf/scikit-learn | sklearn/metrics/_classification.py | Python | bsd-3-clause | 99,537 | [
"Brian"
] | f121fbcaa33779a79f4ae644c44d3f35606adc8198710635f341a69b46e8b9ed |
"""
Module to set up run time parameters for Clawpack.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
import os
import numpy as np
#------------------------------
def setrun(claw_pkg='amrclaw'):
#------------------------------
""... | torrilhon/MyClawpack | examples/advection_2d_inflow/setrun.py | Python | gpl-3.0 | 11,391 | [
"NetCDF"
] | e5d43d8ead8080b1e62075edfad130a592d3e3ffb5798d19bcceaf83b62c8b39 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Final/results/4-categories/24/test10_cross_validate_categories_24_no_motion_1200ms.py | Python | mit | 4,372 | [
"Mayavi"
] | 0fca91858306d1ef41dd20fd745b25c839266f5cf24692e0aba5caed7970fcb7 |
#coverage:ignore
""" Pretty-print a table comparing number of THC vectors vs accy and cost """
import numpy as np
from pyscf import scf
from openfermion.resource_estimates import thc
from openfermion.resource_estimates.molecule import (factorized_ccsd_t,
cas_to_pyscf... | quantumlib/OpenFermion | src/openfermion/resource_estimates/thc/generate_costing_table_thc.py | Python | apache-2.0 | 6,626 | [
"PySCF"
] | ab7218121b14fd4069e53945ccc56e0162deac36601e95b54f8858b3675c531c |
__author__ = 'tylin'
__version__ = '1.0.1'
# Interface for accessing the Microsoft COCO dataset.
# Microsoft COCO is a large image dataset designed for object detection,
# segmentation, and caption generation. pycocotools is a Python API that
# assists in loading, parsing and visualizing the annotations in COCO.
# Ple... | Yanakz/Caption | coco.py | Python | mit | 15,261 | [
"VisIt"
] | f6091e7e4bc6864eb3831b1974692ecd02c9ed0f90c1951316753736e4be1f71 |
""" PublisherHandler
This service has been built to provide the RSS web views with all the information
they need. NO OTHER COMPONENT THAN Web controllers should make use of it.
"""
# pylint: disable=no-self-use
from datetime import datetime, timedelta
# DIRAC
from DIRAC import S_OK, gConfig, S_ERROR
from DIRAC.Core... | ic-hep/DIRAC | src/DIRAC/ResourceStatusSystem/Service/PublisherHandler.py | Python | gpl-3.0 | 12,468 | [
"DIRAC"
] | b8bab15effa50cef9859d275a84f341dac1fddb7096dfa0e58ba3e80ee51a1d5 |
#!/usr/bin/env python
# Please only modify the indicated area below!
from math import *
import random
landmarks = [[20.0, 20.0], [80.0, 80.0], [20.0, 80.0], [80.0, 20.0]]
world_size = 100.0
class robot:
def __init__(self):
self.x = random.random() * world_size
self.y = random.random() * world_s... | francisc0garcia/autonomous_bicycle | test/udacity_AI_robotics/3_1_particle_filter.py | Python | apache-2.0 | 4,425 | [
"Gaussian"
] | 5d889f7e646ea7027a66c4f6bb7dad78e9c9f24653f03bf1df6a8d7ea0e19736 |
# 31.05.2007, c
# last revision: 25.02.2008
from sfepy import data_dir
filename_mesh = data_dir + '/meshes/2d/circle_sym.mesh'
material_1 = {
'name' : 'coef',
'values' : {
'val' : 1.0,
},
}
material_2 = {
'name' : 'm',
'values' : {
'K' : [[1.0, 0.0], [0.0, 1.0]],
},
}
field_1 ... | olivierverdier/sfepy | tests/test_laplace_unit_disk.py | Python | bsd-3-clause | 3,844 | [
"VTK"
] | a2df55b4c76fa23b83a6a37d321c9c71253d4b80a026099847a43c34d3eda3d5 |
# textrender.py
# module to render text, tries to understand a basic LateX-like syntax
# Copyright (C) 2003 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | KDB2/OpenReliability | veusz/utils/textrender.py | Python | gpl-2.0 | 48,564 | [
"Bowtie"
] | ce4cede3b0e7f3ab036ddb709b600be44087200dee07e32c2450e460fb75c539 |
# ***** GPL LICENSE BLOCK *****
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/scripts/addons/io_export_dxf/__init__.py | Python | gpl-3.0 | 1,757 | [
"VisIt"
] | 6fdc267cb2bbb32c022e4a89bd0601d025bd551357e4fb0575cc4969a60cce5b |
"""
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import logging
import six
from django.conf import settings
from django.contrib import messages
... | BuildingLink/sentry | src/sentry/web/frontend/accounts.py | Python | bsd-3-clause | 19,790 | [
"VisIt"
] | 6a5f132cdb17f4d9a8837f7210d8ddbb55f69c04ccbae24212756f1023feb7aa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.