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 |
|---|---|---|---|---|---|---|---|
# similarity.py --- Simularity measures between protein ensembles
# Copyright (C) 2014 Wouter Boomsma, Matteo Tiberti
#
# 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 Li... | encore-similarity/encore | encore/similarity.py | Python | gpl-3.0 | 81,833 | [
"CHARMM",
"MDAnalysis"
] | 128ee64d9455b5004bdc0b7b9bd92efc99ad86da3fa95e7aa30566958497bcd7 |
"""
Tests for discussion pages
"""
import datetime
from uuid import uuid4
from nose.plugins.attrib import attr
from nose.tools import nottest
from pytz import UTC
from flaky import flaky
from common.test.acceptance.tests.discussion.helpers import BaseDiscussionTestCase
from common.test.acceptance.tests.helpers impor... | synergeticsedx/deployment-wipro | common/test/acceptance/tests/discussion/test_discussion.py | Python | agpl-3.0 | 62,051 | [
"VisIt"
] | 3130f4aad59863128b8a44f65ee1678ed5cbe6de0cd3f62e6f42919d07d7ff78 |
# -*- coding: utf-8 -*-
import csv, os, time, pprint
from __main__ import qt, ctk, slicer
from CIP.logic.SlicerUtil import SlicerUtil
class PreProcessingWidget():
def __init__(self, moduleName, parentWidget = None):
"""Widget constructor (existing module)"""
# EventsTrigger.__init__(self)
... | acil-bwh/SlicerCIP | Scripted/CIP_/CIP/ui/PreProcessingWidget.py | Python | bsd-3-clause | 16,608 | [
"Gaussian"
] | 6ef08df66b3cd2aa26c58cbfddda733012118863df835f7088333fbd27d87243 |
#
# 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
# Copyright (C) 2013-2014 Paul Franklin
#
# This program is free softwar... | pmghalvorsen/gramps_branch | gramps/plugins/textreport/kinshipreport.py | Python | gpl-2.0 | 16,756 | [
"Brian"
] | d448292085858734fc2063d989b6ffb1f823e58a5451d8852745318f1ff9f754 |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
The reg module provides classes for interfacing with the `niftyreg
<http://niftyreg.sourceforge.net>`_ registration command line tools.
The interfaces were written to work with... | mick-d/nipype | nipype/interfaces/niftyreg/reg.py | Python | bsd-3-clause | 17,398 | [
"Gaussian"
] | 37ecaab60ebb36a94dc4f34e5d992196f27e0a8b3d35afbaed966e4a00008bc2 |
"""
Helper functions for the course complete event that was originally included with the Badging MVP.
"""
import hashlib
import logging
from django.urls import reverse
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _
from badges.models import BadgeAssertion, BadgeClass, Co... | ahmedaljazzar/edx-platform | lms/djangoapps/badges/events/course_complete.py | Python | agpl-3.0 | 4,239 | [
"VisIt"
] | 0d512ad36de42be7df6323a6927fb2672a4649b455b562314ef15e1b9b2f12eb |
# -*- Mode: Python; coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2011 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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 Sof... | andrebellafronte/stoq | stoq/gui/calendar.py | Python | gpl-2.0 | 17,713 | [
"VisIt"
] | fd38c7d8a68a082fcb03cb783762aa368b4f88a873bdb1ad5d2399bec17eeedd |
#!/usr/bin/python
#
# Flickr API implementation
#
# Inspired largely by Michele Campeotto's flickrclient and Aaron Swartz'
# xmltramp... but I wanted to get a better idea of how python worked in
# those regards, so I mostly worked those components out for myself.
#
# http://micampe.it/things/flickrclient
# http://www.a... | tpltnt/SimpleCV | SimpleCV/MachineLearning/query_imgs/flickrapi2.py | Python | bsd-3-clause | 18,516 | [
"Brian",
"VisIt"
] | a87de4e9eae98961f27aae74768166932f94e9ebad74a3c54634bc6ddd3300d2 |
"""
====================================================================
K-means clustering and vector quantization (:mod:`scipy.cluster.vq`)
====================================================================
Provides routines for k-means clustering, generating code books
from k-means models, and quantizing vectors ... | asnorkin/sentiment_analysis | site/lib/python2.7/site-packages/scipy/cluster/vq.py | Python | mit | 28,608 | [
"Gaussian"
] | 3dd9d24dccb185faf952b9d9658fa8bf8ecf9b48cd3998fb6bc1812c1e7c1374 |
import MDAnalysis
try:
from MDAnalysisTests.datafiles import TPR, XTC
except:
pass
try:
from MDAnalysis.analysis.rdf import InterRDF
except:
pass
class SimpleRdfBench(object):
"""Benchmarks for MDAnalysis.analysis.rdf
"""
params = ([20,75,200],
[[0,5], [0,15], [0,20]],
... | MDAnalysis/mdanalysis | benchmarks/benchmarks/analysis/rdf.py | Python | gpl-2.0 | 1,204 | [
"MDAnalysis"
] | 6d26ad35ca1403d8d3fdecc36aeea5f6a22f27e9b815888f446701e4d77b75d4 |
import argparse
import h5py
from itertools import count
from mayavi import mlab
from tvtk.api import tvtk
from tvtk.common import configure_input, configure_input_data
def main(hdf5_animation_file):
weights = None
with h5py.File(hdf5_animation_file, 'r') as f:
verts = f['verts'].value
tris = f... | tneumann/splocs | view_animation.py | Python | mit | 1,640 | [
"Mayavi"
] | abfad568d5f5f662f1b0eef767a1d4416dcb27a707331d620390d942db02141a |
import datetime
from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import DateTime
from sqlalchemy import Float
from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.ext.... | wujuguang/sqlalchemy | examples/sharding/attribute_shard.py | Python | mit | 10,199 | [
"VisIt"
] | 4f1c97f7d6e1d2b659465f97d1016be0717029a1f1b01a0b044ab92ae1eef359 |
import unittest
import itertools
import numpy as np
from pyscf.lib import finger
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import scf as pbcscf
from pyscf.pbc import df as pbc_df
import pyscf.cc
import pyscf.pbc.cc as pbcc
import pyscf.pbc.tools.make_test_cell as make_test_cell
from pyscf.pbc.lib import kpts... | gkc1000/pyscf | pyscf/pbc/cc/test/test_eom_kgccsd_diag.py | Python | apache-2.0 | 4,159 | [
"PySCF"
] | a70614527f1e2d86d4f39569a75335fd5959f05ef29d29a53ad67053b5360dec |
import os
from setuptools import setup
from neuronjs import __version__
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fn... | kaelzhang/python-neuronjs | setup.py | Python | mit | 1,123 | [
"NEURON"
] | 69c47c52adc3182647ec3d478e8e4d2573673b57b9f0093b50877235e000e64a |
words=[];
words.append('correct'); # The first four words on
words.append('horse'); # this list are from the
words.append('battery'); # XKCD comic 936 that uses
words.append('staple'); # them in an example.
words.append('about');
words.append('after');
words.append('again');
words.append('air');
words.append('all... | Inquisitor-Sasha/xkcd936 | lib/wordList.py | Python | gpl-3.0 | 50,310 | [
"COLUMBUS",
"VisIt",
"exciting"
] | 5a1ec729fa9bf6427faa70f3b90e7d50a6b0a769e310b1aa89ece9d21c8af4be |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License
from __future__ import division, unicode_literals
import re
import numpy as np
from monty.io import zopen
from pymatgen.core.units import bohr_to_angstrom, Ry_to_eV
from pymatgen.core.structure import Structur... | czhengsci/pymatgen | pymatgen/io/lmto.py | Python | mit | 15,857 | [
"pymatgen"
] | 3ef0fbf2856a02138e7b80b68015f2bd7239829f172462a6e43f8b7fd7d4e2ab |
"""
mbed SDK
Copyright (c) 2011-2013 ARM 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 agreed to in wr... | jferreir/mbed | workspace_tools/synch.py | Python | apache-2.0 | 11,521 | [
"VisIt"
] | 49888820000335bfe1f7530f934a90cda7905ec8885d833381d421ade851d3df |
#
# complete_text.py: text mode congratulations windows
#
# Copyright 2001-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
#
# You should have received a copy of the GNU Library Public License
# along with this program; if not, write to the Free Soft... | sergey-senozhatsky/anaconda-11-vlan-support | textw/complete_text.py | Python | gpl-2.0 | 1,907 | [
"VisIt"
] | 9a2f840bd792e29310e825f144939fc4d22857404a054b5648abfa62d3b9eca0 |
########################################################################
# File : Watchdog.py
# Author: Stuart Paterson
########################################################################
""" The Watchdog class is used by the Job Wrapper to resolve and monitor
the system resource consumption. The Watchdog... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/JobWrapper/Watchdog.py | Python | gpl-3.0 | 36,586 | [
"DIRAC"
] | 1e0dfb75141149533ef48ef4b99750bc379dedda904e872260c454460b4ceaee |
# -*- coding: utf8 -*-
# Script de reconnaissance de digit
# Partie Réseau de neurones
# @author Valentin PORCHET
import sys # Pour utiliser le script de Alex Yang
import time # Pour le temps d'exécution
if len(sys.argv) > 3:
generate = True if sys.argv[3] == "1" else False
else:
generate = False
if len(sys.argv) ... | TeKrop/PyDigR | reseau_neurones/main.py | Python | gpl-2.0 | 1,122 | [
"NEURON"
] | 8be48dd81c98e05a40de510176c9d5d431368c2481f135eefd2d24ada8571ce8 |
"""Provides some utilities widely used by other modules"""
import bisect
import collections
import collections.abc
import heapq
import operator
import os.path
import random
import math
import functools
import numpy as np
from itertools import chain, combinations
# ____________________________________________________... | jo-tez/aima-python | utils.py | Python | mit | 22,293 | [
"Gaussian"
] | c39e62abbc63f9e6bc4de3b3d64cf2ba0b2a3cb36bf2c24b7185f1fd50784943 |
# TD quantum dynamics with TD Gauss-Hermite basis
# Two basis only
# Test anharmonic system
import numpy as np
from math import *
import numba
Ntraj = 4000
print('Number of trajectories = {} \n'.format(Ntraj))
dt = 0.002
am = 1.0
# initial values has to be stored to compute autocorrelation function
x0 = -2.... | binghongcha08/pyQMD | GHQT/Erhenfest/dwell.py | Python | gpl-3.0 | 15,336 | [
"Gaussian"
] | 5ed1416087614b1b49d4662331405a6c0358b938734a7abe780bec3f2fec2ee2 |
#!/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'
#Basic imports
f... | danielsuo/mobot | src/move/Python/RFID-simple.py | Python | mit | 4,259 | [
"VisIt"
] | 4754a800c080611aed40a8e183d3887d54f829b2d3dec6986864ff79e5c6eefb |
# -*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from yepes.contrib.registry import Registry
from yepes.contrib.registry.fields import *
registry = Registry(namespace='metrics')
registry.register(
'EXCLUDED_PARAMETERS',
CommaSeparatedFie... | samuelmaudo/yepes | yepes/contrib/metrics/registry.py | Python | bsd-3-clause | 3,001 | [
"VisIt"
] | e9c992cf017b7c15a838983e38fe3ace108a752a9c357940c434e5f78c55b539 |
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print i
1
2
>>> g = f()
>>> g.next()
1
>>> g.next()
2
"Falling off the end" stops the generator:
>>> g.next()
Traceback ... | j5shi/Thruster | pylibs/test/test_generators.py | Python | gpl-2.0 | 52,675 | [
"VisIt"
] | ac393d31ec58d9862851fd5017756ef8a185763de0b434843118189907bdc32e |
#!/usr/bin/env python
# Copyright 2014-2018 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/cc/test/test_addons.py | Python | apache-2.0 | 2,892 | [
"PySCF"
] | 3c39b5985d8b0a8a8f2bbd6edeafd737a072f4e157d2dc7a3618908307450ee8 |
"""Module providing data structures for data collection and analysis
The main features provided in this module are the stlabmtx class and the stlabdict class as
well as the framearr_to_mtx function.
"""
from collections import OrderedDict
import numpy as np
from scipy import ndimage
import pickle
import struct
impo... | yausern/stlab | utils/stlabdict.py | Python | gpl-3.0 | 48,994 | [
"Gaussian"
] | ef23824c5b5868e1d8f3e7800dcf3003cde59e3f946d7d7358e7b7d2888bc1ea |
# -*- coding: utf-8 -*-
"""Generate graphs with a given degree sequence or expected degree sequence.
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import heapq
from itertools ... | ltiao/networkx | networkx/generators/degree_seq.py | Python | bsd-3-clause | 27,046 | [
"Brian"
] | bc4b4d55d62e8a98e09f9bffd2b58f03864cfd6caca97cf8dc0d9973106c8bc5 |
from typing import Optional
# Zulip Settings intended to be set by a system administrator.
#
# See http://zulip.readthedocs.io/en/latest/settings.html for
# detailed technical documentation on the Zulip settings system.
#
### MANDATORY SETTINGS
#
# These settings MUST be set in production. In a development environment... | amanharitsh123/zulip | zproject/prod_settings_template.py | Python | apache-2.0 | 19,071 | [
"VisIt"
] | 3bdad03113dfd2709129dece9af4eb83f1aaa427f0e6240c1f84c25fef254072 |
""" Test functions for stats module
"""
from __future__ import division, print_function, absolute_import
import warnings
import re
import sys
from numpy.testing import (TestCase, run_module_suite, assert_equal,
assert_array_equal, assert_almost_equal, assert_array_almost_equal,
assert_allclose, assert_, asse... | nvoron23/scipy | scipy/stats/tests/test_distributions.py | Python | bsd-3-clause | 85,009 | [
"Gaussian"
] | 66d3906ed2f622aa926efbeb639f254ae7821b676dd8d3caf3cf9397a99fcde3 |
#!/usr/bin/env python
# encoding: utf-8
"""Description: pgem parallel test on UFT test fixture.
Currently supports 4 duts in parallel.
"""
__version__ = "0.1"
__author__ = "@fanmuzhi, @boqiling"
__all__ = ["Channel", "ChannelStates"]
import sys
from UFT.devices import pwr, load, aardvark
from UFT.devices import erie... | hardanimal/UFT_UPGEM | src/UFT/channel.py | Python | gpl-3.0 | 54,026 | [
"Amber"
] | 4cc514c6ea597f06eec38b64b2a246676ec479a8011ea1f497d06670910c16ee |
"""
refcounting
~~~~~~~~~~~
Reference count annotations for C API functions. Has the same
result as the sphinx.ext.refcounting extension but works for all
functions regardless of the signature, and the reference counting
information is written inline with the documentation instead of a
sepa... | cloudera/avro | lang/c/jansson/doc/ext/refcounting.py | Python | apache-2.0 | 1,716 | [
"VisIt"
] | a45659c4bb401785442425593ae81bff2aeabeef8a5bbf8325946688527e43ff |
##################################################################
# Copyright 2018 Open Source Geospatial Foundation and others #
# licensed under MIT, Please consult LICENSE.txt for details #
##################################################################
"""Validator classes are used for ComplexInputs, to... | bird-house/PyWPS | pywps/validator/complexvalidator.py | Python | mit | 11,934 | [
"NetCDF"
] | fa97a4f8b9b0e516dabc4a954806ac1666d6d98bd2837e5588062fe5be386802 |
import platform, os, re
from subprocess import *
from time import strftime, gmtime, ctime, localtime, asctime
from utils import colorText
TERM_COLS = 110
LIBMESH_OPTIONS = {
'mesh_mode' : { 're_option' : r'#define\s+LIBMESH_ENABLE_PARMESH\s+(\d+)',
'default' : 'SERIAL',
... | mellis13/moose | python/TestHarness/util.py | Python | lgpl-2.1 | 10,908 | [
"VTK"
] | 89d6344253afcf661dc0c28f231609e53a954c688dab539dafa0d85d8d63318a |
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 27 14:39:00 2015
@author: alex_
"""
# Universal Imports
import numpy as np
import sunpy.map as mp
from astropy import units as u
# Visulisation Imports
from mayavi import mlab
from mayavi_seed_streamlines import SeedStreamline, Streamline
from mayavi.tools.sources impo... | Cadair/solarbextrapolation | solarbextrapolation/visualisation_functions.py | Python | mit | 12,249 | [
"Mayavi"
] | 7175a85c93b14690fe37617863bfc078040b0ec915d1a6f47440fd171e100c1a |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
'''
This software has been developed by:
GI Genética, Fisiología e Historia Forestal
Dpto. Sistemas y Recursos Naturales
ETSI Montes, Forestal y del Medio Natural
Universida... | GGFHF/NGScloud | Package/cmenu.py | Python | gpl-3.0 | 58,331 | [
"Bioconda"
] | b8a8ae0318fed40f4b06e82b41ae9d23d1462f40bc22db32dcfc3f3dad4c3f2d |
from __future__ import division
from __future__ import print_function
"""
version 1.0 26 October 2015
Posted in github for first time.
version 1.1 23 November 2015
Corrected description of the rounding off the matrix elements.
Corrected hard wrapped text the broke the script.
Added e... | MooersLab/EasyPyMOL | roundviewWindows.py | Python | gpl-3.0 | 5,784 | [
"PyMOL"
] | c6f48a71f761960b69babeb4f236d8eb984bf84aeb50eca1bf4adcac6351f84e |
import numpy as np
import shutil
import os
import mdtraj as md
from mdtraj.utils import enter_temp_directory
from mdtraj.utils.delay_import import import_
import tempfile
from distutils.spawn import find_executable
import simtk.unit as units
PACKMOL_PATH = find_executable("packmol")
HEADER_TEMPLATE = """
# Mixture
... | jchodera/openmoltools | openmoltools/packmol.py | Python | gpl-2.0 | 9,546 | [
"MDTraj",
"OpenMM"
] | a23b38c5eed13e5e3edf522c1b6e0853c3d5948137a6711117366e6f38178a49 |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | brianmay/karaage | karaage/machines/forms.py | Python | gpl-3.0 | 3,812 | [
"Brian"
] | 6b7498ef189e7de129a3115bf75dfd3fac73d12daa6bf804aea9fdea48d964e7 |
import modeller
import IMP
import IMP.test
import IMP.core
import IMP.modeller
from test_rsr_file_read import assertSimilarModellerIMPScores
class Tests(IMP.test.TestCase):
"""Check using Modeller restraints in IMP"""
def test_modeller_restraints(self):
"""Check using Modeller restraints in IMP"""
... | shanot/imp | modules/modeller/test/test_modeller_restraints.py | Python | gpl-3.0 | 1,315 | [
"Gaussian"
] | eb7083b88bc6fe927341ad1f24a76337f34af61531df38701351bb7f7c27c1d1 |
# compiler.py
# Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Base SQL and DDL compiler implementations.
Provides the [sqlalchemy.sql.compiler#DefaultCompi... | santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/sql/compiler.py | Python | bsd-3-clause | 43,724 | [
"VisIt"
] | 02445c55e65611c0d6b2ae943a0ebfeac5f84c7c4963efaa3dac145c1ec3eb4b |
from lettuce import step,before,world,after
from lettuce.django import django_url
from django.contrib.auth.models import User
from frontend.models import Feature
from codewiki.models import Scraper
@before.each_scenario
def reset_schedule(scenario):
scraper = Scraper.objects.get(pk=1)
scraper.run_interval ... | lkundrak/scraperwiki | web/frontend/features/privacy_steps.py | Python | agpl-3.0 | 1,714 | [
"VisIt"
] | 9fd4a13af4c78ae3306c80af0ac31dec6b45d83727a21fe0f3b209ede2a26c24 |
__author__ = "Zhenzhou Wu"
__copyright__ = "Copyright 2012, Zhenzhou Wu"
__credits__ = ["Zhenzhou Wu"]
__license__ = "3-clause BSD"
__email__ = "hyciswu@gmail.com"
__maintainer__ = "Zhenzhou Wu"
"""
Functionality : Define the noise that is to be added to the dataset
"""
import numpy as np
class Noise(object):
"... | hycis/Pynet | pynet/datasets/dataset_noise.py | Python | apache-2.0 | 2,228 | [
"Gaussian"
] | ba2212aa9fff365744d26975c401ab89291809c2ced9c1fef8490876e4688a04 |
#
# This file is part of jetflows.
#
# Copyright (C) 2014, Henry O. Jacobs (hoj201@gmail.com), Stefan Sommer (sommer@di.ku.dk)
# https://github.com/nefan/jetflows.git
#
# jetflows 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 So... | stefansommer/jetflows | code/generate_images.py | Python | agpl-3.0 | 3,093 | [
"Gaussian"
] | 7ad695f16fbe48a6fdb6ecf03936154d0a21831b2f32838293220f115ecb3864 |
"""Test cases and utilities for hs_core module. See also ./tests folder."""
from dateutil import parser
import tempfile
from django.conf import settings
from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.messages.storage.fallback import FallbackStorage
from django.test import TestCas... | ResearchSoftwareInstitute/MyHPOM | hs_core/testing.py | Python | bsd-3-clause | 36,889 | [
"NetCDF"
] | 08f84a348e2f785ffcac97f6841bd437de3b1748fe8b08e8926c3ad3799ae428 |
import cvxpy as cp
import numpy as np
import matplotlib.pyplot as plt
def loss_fn(X, Y, beta):
return cp.pnorm(cp.matmul(X, beta) - Y, p=2)**2
def regularizer(beta):
return cp.pnorm(beta, p=2)**2
def objective_fn(X, Y, beta, lambd):
return loss_fn(X, Y, beta) + lambd * regularizer(beta)
def mse(X, Y... | SteveDiamond/cvxpy | examples/machine_learning/ridge_regression.py | Python | gpl-3.0 | 3,104 | [
"Gaussian"
] | 770d5d55901570e199b5744035c620bd4bbafbfe6a99f448000308124fc93cef |
# -*- coding: utf-8 -*-
"""Various text used throughout the website, e.g. status messages, errors, etc.
"""
# Status Messages
#################
# NOTE: in status messages, newlines are not preserved, so triple-quotes strings
# are ok
# Status message shown at settings page on first login
# (upon clicking primary em... | wearpants/osf.io | website/language.py | Python | apache-2.0 | 8,749 | [
"VisIt"
] | 34436ac3e14fd819d0160021b5c422d3f2e9556665d343e588b2ec75ebcfe0c6 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/interaction/AngularUniqueCosineSquared.py | Python | gpl-3.0 | 3,264 | [
"ESPResSo"
] | a37b19bf9fe1b322c4eefb6dabe5304f404358e7917bee9c5a0ca9f5984370d1 |
import mxnet as mx
import logging
import os
import time
from math import sqrt
def _get_lr_scheduler(args, kv):
if 'lr_factor' not in args or args.lr_factor >= 1:
return (args.lr, None)
epoch_size = args.num_examples / args.batch_size
if 'dist' in args.kv_store:
epoch_size /= kv.num_workers
... | hpi-xnor/BMXNet | smd_hpi/examples/binary-imagenet1k/common/fit.py | Python | apache-2.0 | 7,994 | [
"Gaussian"
] | e1091983424a29c3b7e1e6018c3f2ba7a091755835dd555727e6e4d858dadac0 |
"""Generate PSIMs Tiles.
Run from RUN_NOON.sh for the previous UTC date."""
import datetime
import os
import sys
import numpy as np
from metpy.units import units
from pyiem import iemre
from pyiem.util import utc, ncopen, convert_value
from pyiem.meteorology import gdd
def make_netcdf(fullpath, valid, west, south):... | akrherz/iem | scripts/yieldfx/cfs_tiler.py | Python | mit | 8,190 | [
"NetCDF"
] | 95789d1531337c8a8d768b3447f82a7e68cea97e1d93d675aa1f698116074abf |
# Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002 Bryce "Zooko" Wilcox-O'Hearn
# This file is licensed under the
# GNU Lesser General Public License v2.1.
# See the file COPYING or visit http://www.gnu.org/ for details.
__revision__ = "$Id: EGTPConstants.py,v 1.2 2002/12/02 19:58:47 myers_c... | zooko/egtp_new | egtp/EGTPConstants.py | Python | lgpl-2.1 | 1,283 | [
"VisIt"
] | e322e181f0a2384b8ffd795b000348b99b4bc93fc7fe0e501d9d25e3db27dd62 |
# mako/pyparser.py
# Copyright (C) 2006-2013 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Handles parsing of Python code.
Parsing to AST is done via _ast on Python > 2.5, otherwise th... | adamwwt/chvac | venv/lib/python2.7/site-packages/mako/pyparser.py | Python | mit | 19,261 | [
"VisIt"
] | 342f30dbab201291c6805368a7a44a94179703ffa38344b2ac5ea556decd69b9 |
import numpy as np
from scipy.special import gammaln, hermitenorm
import scipy.stats
from scipy.misc import factorial
from nipy.testing import assert_almost_equal, dec
from nipy.algorithms.statistics import rft
#def rho(x, dim, df=np.inf):
# """
# EC densities for T and Gaussian (df=inf) random fields.
# "... | yarikoptic/NiPy-OLD | nipy/algorithms/statistics/tests/test_rft.py | Python | bsd-3-clause | 15,903 | [
"Gaussian"
] | 9de42a0c909dd2ea33ab63e1e43981d90b9be59e254d5169d433075987799cbd |
"""
Actions manager for transcripts ajax calls.
+++++++++++++++++++++++++++++++++++++++++++
Module do not support rollback (pressing "Cancel" button in Studio)
All user changes are saved immediately.
"""
import copy
import json
import logging
import os
import requests
from django.conf import settings
from django.cont... | proversity-org/edx-platform | cms/djangoapps/contentstore/views/transcripts_ajax.py | Python | agpl-3.0 | 21,639 | [
"FEFF"
] | 6dc90a4524f4d0b867d7156eebe06d266065c49c817b80542db942873ecda1d0 |
#!/usr/bin/env python
#coding:utf-8
# File: lang_detect_nltk.py
# Author: Dr. Ivan S. Zapreev
# Purpose: Detecting language using a stopwords based approach
# This script requires one parameter:
# ${1} - is the input file name with a UTF-8 text
# This script tries to detect the languag... | ivan-zapreev/Distributed-Translation-Infrastructure | script/text/lang_detect_nltk.py | Python | gpl-2.0 | 4,201 | [
"VisIt"
] | 06342928b6ceae06fd7d3219ddef0a5e4b12f01142daea5f3ed410f1ec7af0e3 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, The Horizomer Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------... | qiyunzhu/horizomer | horizomer/misc/distance-method/test_distance_method.py | Python | bsd-3-clause | 34,762 | [
"BLAST",
"scikit-bio"
] | 6e23c8b5cc43234c106a433b7e623f9671b73a4452d14ed39bd1e0cd1b772815 |
#!/usr/bin/env python
# File created on 09 Feb 2010
from __future__ import division
__author__ = "Antonio Gonzalez Pena"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Antonio Gonzalez Pena, Kyle Patnode", "Yoshiki Vazquez-Baeza"]
__license__ = "GPL"
__version__ = "1.8.0-dev"
__maintainer__ = "Ant... | wasade/qiime | scripts/plot_semivariogram.py | Python | gpl-2.0 | 14,840 | [
"Gaussian"
] | 57feb97c871d9d6508d455ce725f3d3e65618291d59b60ac0fb9581c698b5417 |
# Copyright (C) 2013, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import os
from os.path import abspath
from zeroinstall.injector import qdom
from repo import incoming, cmd, registry
from repo.cmd import update
def handle(args):
files = [ab... | gfxmonk/0repo | repo/cmd/add.py | Python | lgpl-2.1 | 1,044 | [
"VisIt"
] | d6f833c14f4288c661d9d99e26bfcf7e9ad2cae517da853277b6cd577135f730 |
import math
import sys
import numpy
import vtk
# All returned arrays are cast into either numpy or numarray arrays
arr=numpy.array
class vtu:
"""Unstructured grid object to deal with VTK unstructured grids."""
def __init__(self, filename = None):
"""Creates a vtu object by reading the specified file."""
i... | TerraFERMA/TerraFERMA | buckettools/python/buckettools/vtktools.py | Python | lgpl-3.0 | 24,491 | [
"VTK"
] | eeab0566d6453a92dae1e0a276d3492e16930f4f8e62ed479ce41ee759309711 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/e2-openwbif | plugin/controllers/views/web/movierename.py | Python | gpl-2.0 | 5,183 | [
"VisIt"
] | 11c2525686dbc5f1771527dcca10b80bd094745a51b77c534aaac286bdab5062 |
# Copyright 2014 Roberto Brian Sarrionandia
#
# 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 t... | sarrionandia/tournatrack | update_profile.py | Python | apache-2.0 | 3,096 | [
"Brian"
] | 6f8309f43e71ac76ec902c5a77a09d0e4f62fe2cb63742df5f195fad4dd338c4 |
# -*- coding: utf-8 -*-
#slb@slb.moe
import os
import codecs
import subprocess
from time import sleep
def OpenAndReadUtf8(filepath):
"""return unicode"""
try:
openfile = codecs.open(filepath,"r",encoding='utf-8')
infile = openfile.read()
openfile.close()
return infile
exce... | staalu/mr | mr.py | Python | gpl-3.0 | 6,336 | [
"MOE"
] | e64d839f77ea01322ed4f9a136ff1dd84072c0bf7ff51f2f76e37b1f167f4560 |
# Autodetecting setup.py script for building the Python extensions
#
__version__ = "$Revision$"
import sys, os, imp, re, optparse
from glob import glob
import sysconfig
from distutils import log
from distutils import text_file
from distutils.errors import *
from distutils.core import Extension, setup
from distutils.... | LaoZhongGu/kbengine | kbe/src/lib/python/setup.py | Python | lgpl-3.0 | 84,306 | [
"VisIt"
] | ae4606842a1bb0354f187cc1001916a82c0b40e532471803ee5e57cf96ae42a5 |
#~~~~~~~GLOBAL IMPORTS~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
class BlastHit(object):
"""
@class BlastHit
@brief Object oriented class containing informations of one blast hit
The following instance field are accessible :
* q_i... | a-slide/pyDNA | Blast/BlastHit.py | Python | gpl-2.0 | 5,084 | [
"BLAST"
] | 8e84841cea334e6eb0de0eec914669f7b5ef59fda3a7396136651d6775963907 |
"""
Weights.
"""
__author__ = "Sergio J. Rey <srey@asu.edu> "
import copy
from os.path import basename as BASENAME
import math
import warnings
import numpy as np
import scipy.sparse
from scipy.sparse.csgraph import connected_components
#from .util import full, WSP2W resolve import cycle by
#forcing these into methods... | lixun910/pysal | pysal/lib/weights/weights.py | Python | bsd-3-clause | 46,693 | [
"COLUMBUS"
] | e413ce3661638cbe966dc12ed06429fe3386640dfdd1d959247079e2ce359ca8 |
"""@file test_bmode_noise.py
This module started out as the script used to demonstrate that B-mode shape cancellation would work
even for the COSMOS galaxies which don't have the p(|e|) you would get from a purely Gaussian random
B-mode field. Here we tested that the ranked-ordering prescription described in the hand... | barnabytprowe/great3-public | tests/test_bmode_noise.py | Python | bsd-3-clause | 8,476 | [
"Galaxy",
"Gaussian"
] | 19413ebd098ecfed3c0b9c7ea05b0520e1793d0f8831691f9c1612905fdff298 |
from numpy import sqrt, arctan, pi, exp, random, shape
I = 1.0j
# A package for beam optics in python
def spot_size(z, zR, w0):
"""Calculate spot size at z, given zR, and w0"""
return w0 * sqrt(1 + (z/zR)*(z/zR))
def radius_curvature(z, zR):
"""calculate R(z)"""
# This could be smarter, just adding ... | DawesLab/LabNotebooks | BeamOptics.py | Python | mit | 2,036 | [
"Gaussian"
] | ede1896a7569065a90c63d860c7bbf9fb4b7e2500190220184501bb8f545fcdd |
import pandas as pd
import numpy as np
from .QCBase import VarNames
class Exporter(object):
""" Export class which writes parsed data to a certain format"""
valid_formats = ["pdf", "xlsx", "txt", "csv", "dataframe"]
def __init__(self, data=None):
self.data = data
# for later: add pand... | spectre007/CCParser | Export.py | Python | mit | 12,361 | [
"Gaussian",
"MOLCAS"
] | 9603930ac2da1d53d08e7b1db35d06a17a0e2c7cb5b97b365fee17a2ec11e1c6 |
# coding: utf-8
# # Intro to satellite data I
#
# In this notebook we take a quick look at a 5 minutes of satellite data acquired from the MODIS instrument on the Aqua polar orbiting satellite. Aqua flies in the [A-train]( <http://atrain.nasa.gov), which is formation of satellites that orbit separated by a minute... | a301-teaching/a301_code | notebooks/python/satellite_I.py | Python | mit | 6,584 | [
"Bowtie"
] | 3250206f9995a228881ff9a955467467554edc32a33b08cba1beebe338b44b6f |
# -*- coding: utf-8 -*-
#
# brunel2000_interactive.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 ... | magnastrazh/NEUCOGAR | nest/serotonin/research/C/nest-2.10.0/doc/nest_by_example/scripts/brunel2000_interactive.py | Python | gpl-2.0 | 3,535 | [
"NEURON"
] | 190412af92e5c85367a41bccce67bb2a9338ea883170d15099ed851020141aa5 |
#!/usr/bin/env python
##############################################################################################
#
#
# regrid_emissions_N96e.py
#
#
# Requirements:
# Iris 1.10, cf_units, numpy
#
#
# This Python script has been written by N.L. Abraham as part of the UKCA Tutorials:
# http://www.ukca.ac.uk/wiki... | acsis-project/emissions | emissions/python/timeslice/regrid_aircNO_n96e_360d_1975-1989.py | Python | gpl-3.0 | 8,837 | [
"NetCDF"
] | e035ddfe3b08da2921735f9ed775359b6e99c8efb89fbe1074ea9d3caa101ac0 |
import textwrap
import warnings
from io import StringIO
from pathlib import Path
import neurom.io as io
import neurom.io.neurolucida as nasc
import numpy as np
from mock import patch
from neurom import load_neuron
from neurom.core.dataformat import COLS
from neurom.io.datawrapper import DataWrapper
from nose.tools imp... | wizmer/NeuroM | neurom/io/tests/test_neurolucida.py | Python | bsd-3-clause | 8,769 | [
"NEURON"
] | cffc97c1c037f3f17ba93716424d389868f346a9510c3749cf935efc7df0564e |
''' Defines tests '''
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint, trapz
from scipy.optimize import minimize, differential_evolution
import chaospy as cp
from EntryGuidance.EntryEquations import System
from EntryGuidance.Uncertainty import getUncertainty
def Optim... | CDNoyes/EDL-Py | TestSuite.py | Python | gpl-3.0 | 7,679 | [
"Gaussian"
] | e0f8e6e882b20ddd0a5cbf9f8f1f46536ae2a20a4ee0c864e2c9afe418153578 |
"""Structural variation detection for split and paired reads using lumpy.
Uses lumpyexpress for lumpy integration and samblaster for read preparation:
https://github.com/GregoryFaust/samblaster
https://github.com/arq5x/lumpy-sv
"""
import contextlib
import os
import sys
import shutil
import vcf
from bcbio import uti... | mjafin/bcbio-nextgen | bcbio/structural/lumpy.py | Python | mit | 10,840 | [
"BWA"
] | 1c8f100bc2d925ebbafb223043ad8b012da55f5ae711c0a67b96e4f314865e26 |
#!/usr/bin/env python
# This software is distributed under BSD 3-clause license (see LICENSE file).
#
# Authors: Evangelos Anagnostopoulos
def parse_arguments():
import argparse
parser = argparse.ArgumentParser(description=
"Solve binary classification problems stored in libsvm format, "
"using Random Fourier f... | shogun-toolbox/shogun | applications/classification/random_fourier_classification.py | Python | bsd-3-clause | 3,353 | [
"Gaussian"
] | a2112599f7ab47af96dc20d3c9bcc27b373a57c94ac2fb4c8543bdc760a1ae64 |
# -*- coding: utf-8 -*-
# Created: 2018-01-04T19:46:58 PST
ilist = {
8485: u"Extended Potion of Undead Slaying",
8486: u"Extended Potion of Nightmare Court Slaying",
8487: u"Extended Potion of Sons of Svanir Slaying",
8488: u"Extended Potion of Outlaw Slaying",
8489: u"Extended Potion of Flame Legion Slaying",
84... | xanthics/gw2craft-python3 | auto_gen/Items_en.py | Python | mit | 316,034 | [
"Amber",
"CRYSTAL"
] | d25bb3ec07735aa9b6d68f3ff47c67a7a33866633be8fa706d454576ee67e08d |
"""
Recreate the trajectory fragments to the led to the discovery of a snapshot,
specified by the tuple (epoch, trajectory, snapshot) and write as a pdb file
"""
from __future__ import print_function
import os
import sys
import argparse
import glob
import itertools
from AdaptivePELE.utilities import utilities
f... | AdaptivePELE/AdaptivePELE | AdaptivePELE/analysis/backtrackAdaptiveTrajectory.py | Python | mit | 4,654 | [
"PyMOL"
] | ac0bc2256c71c9ee127f3dfb60afb4dd8c2a866c3d9f9cc316e6ba773157607e |
## Automatically adapted for numpy.oldnumeric Mar 26, 2007 by alter_code1.py
## generate random orientations of receptor and ligand
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2012 Raik Gruenberg & Johan Leckner
##
## This program is free software; you can redistribu... | ostrokach/biskit | Biskit/Dock/ComplexRandomizer.py | Python | gpl-3.0 | 9,607 | [
"Amber",
"PyMOL"
] | f3bbc5ade2db4b40b4913967dd4c67cc14ec2401ccf5e93d9f04000862e4700f |
"""
# Copyright (C) 2007 Nathan Ramella (nar@remix.net)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# T... | avroshk/VRDAW | VRDAW_working/__init__.py | Python | gpl-3.0 | 1,297 | [
"VisIt"
] | a1f5fdbe081e79cc76fe60e83cebfafd418fa59b01c50a4acc22dcf800185d53 |
# 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 glob
from spack import *
class PyMixedhtseq(PythonPackage):
"""HTSeq for mixed single and paired end reads""... | LLNL/spack | var/spack/repos/builtin/packages/py-mixedhtseq/package.py | Python | lgpl-2.1 | 1,373 | [
"HTSeq"
] | 10dbcd5da68fc474fe6062b4c6b30dd24cbffee6a86a09fda411d70753c500b4 |
#!/usr/bin/env python
"""
VMat Class
@author: Alicia Schep, Greenleaf Lab, Stanford University
"""
#Import necessary python modules
from scipy import signal, ndimage
import numpy as np
from copy import copy
import matplotlib.pyplot as plt
class VMat_Error(Exception):
"""Class for errors in VMat function"""
d... | GreenleafLab/NucleoATAC | pyatac/VMat.py | Python | mit | 8,649 | [
"Gaussian"
] | a6a4b9bb535320538afb3842363669efa2abf8c232174858f8dfb226fd90d68f |
"""Module which contains all spells that check something in a nif file."""
# --------------------------------------------------------------------------
# ***** BEGIN LICENSE BLOCK *****
#
# Copyright (c) 2007-2012, NIF File Format Library and Tools.
# All rights reserved.
#
# Redistribution and use in source and binar... | griest024/PokyrimTools | pyffi-develop/pyffi/spells/nif/check.py | Python | mit | 41,559 | [
"VisIt"
] | e3f24d792cc2bcbee0dfe66f21bdd4d4329178027d24bdc65fd8884d33070a8b |
import numpy as np
import datetime as dt
import matplotlib.pylab as plt
import netCDF4 as nc
import ezmovie_plots as ezp
import os
# ROMS specific packages
try:
import pyroms
except:
print 'pyroms is not installed, will not work with ROMS'
# MITgcm specific packages
try:
import xarray as xr
import MITgcmutils
exc... | raphaeldussin/EZmovie | EZmovie/lib_EZmovie.py | Python | gpl-3.0 | 6,438 | [
"NetCDF"
] | 8774ea4f82edff492676caf6f510044bf5d3a9d5c1fe5e7d011adba1901ac411 |
__author__ = 'Michael Isik'
from variate import UniformVariate, GaussianVariate
class Filter(object):
""" Base class for all kinds of operators on the population during the
evolutionary process like mutation, selection or evaluation.
"""
def __init__(self):
pass
def apply(self, popula... | iut-ibk/Calimero | site-packages/pybrain/supervised/evolino/gfilter.py | Python | gpl-2.0 | 3,909 | [
"Gaussian"
] | a6b4fe21d0a3ae87209ac75adc8e44dfb354d4be0c0eb068a2f6f2ecae0b7ba3 |
from __future__ import division
import difflib
import collections
import traceback
import sys
import ast
import re
from StringIO import StringIO
import sympy
from sympy.core.relational import Relational
import sympy.parsing.sympy_tokenize as sympy_tokenize
from token import NAME
OTHER_SYMPY_FUNCTIONS = ('sqrt',)
Arg... | kaichogami/sympy_gamma | app/logic/utils.py | Python | bsd-3-clause | 16,740 | [
"VisIt"
] | 33fe24a13f4c861ea3c56327bb18f2579aa2ec00c28483a3c07ba33f2d3cb93e |
from os import makedirs
from os.path import join, dirname, exists
from string import Template
from galaxy.util.bunch import Bunch
from galaxy.objectstore import build_object_store_from_config
from .test_utils import TempDirectoryTestCase
from .test_utils import skip
class MockDataset(object):
def __init__(self,... | natefoo/pulsar | test/pulsar_objectstore_test.py | Python | apache-2.0 | 5,307 | [
"Galaxy"
] | 0e5f90ad20f0358cfa775d95ac01810b5306ff9511e423ec706137acb238ecea |
# vim:expandtab:smarttab
import logging
from pylons import g, Response, config, cache
import os
import os.path as path
import cjson
from amqplib import client_0_8 as amqp
import facebook
from facebook import FacebookError
from urllib2 import URLError
import df
from puid import lookup_fingerprint
from musicbrainz2.web... | JustinTulloss/harmonize.fm | masterapp/masterapp/controllers/upload.py | Python | mit | 9,890 | [
"Brian"
] | 06fa2b598f85ea664d75809f5f897a8d4c68ae7b569847b0aec931724bab2d41 |
#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Modifications Copyright 2017 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "Licens... | youtube/cobalt | cobalt/tools/gyp_to_gn.py | Python | bsd-3-clause | 28,277 | [
"VisIt"
] | 80c2951e7b6ecdfe735e7b7116b8475e8f00fefafa41b55a3d3bd29bd6a9707e |
import os, sys, colorsys
from os.path import join, getsize
import ConfigParser
import random
import gobject
import gtk
import pango
import gconf
import goocanvas, cairo
#import canvasItems
#import db_conf, gene, pham
from phamerator import db_conf, gene, pham, phamerator_manage_db
from phamerator_manage_db import *
de... | byuphamerator/phamerator-dev | phamerator/cartographerold.py | Python | gpl-2.0 | 62,711 | [
"BLAST"
] | 86c0275b65f7817f855389aa582adbd9b8fbe20b998368a4901f30aab6bbfa6a |
import os
import unittest
from pymatgen.apps.battery.analyzer import BatteryAnalyzer
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest
class BatteryAnalyzerTest(PymatgenTest):
def load_from_cif(self, filename, oxidations, working_ion="Li"):
s = Structure.from_fi... | materialsproject/pymatgen | pymatgen/apps/battery/tests/test_analyzer.py | Python | mit | 4,663 | [
"pymatgen"
] | 7d98365e8d0511f7f00e9b76c7bfce10637194e2f8831bd41109338f79947946 |
from behave import *
use_step_matcher("parse")
@given('Exists a team created by "{username}"')
def step_impl(context, username):
from django.contrib.auth.models import User
user = User.objects.get(username=username)
from sportsBetting.models import Team
for row in context.table:
team = Team(cr... | Marcelpv96/SITWprac2017 | sportsBetting/features/steps/register_teams.py | Python | gpl-3.0 | 1,654 | [
"VisIt"
] | 11aa18f210c15f1aeb8b0839e1277fea606c12c04079f52933c39b0b3a86752a |
""" Module for converting various mesh formats."""
# Copyright (C) 2006 Anders Logg
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the L... | MiroK/dolfin | site-packages/dolfin_utils/meshconvert/meshconvert.py | Python | gpl-3.0 | 50,288 | [
"NetCDF"
] | 885f7b218095ff0c30e29d14b9999ba0289dc9481ce7abc69e18861d16365844 |
#!/usr/bin/env python
# encoding: utf-8
'''
Created by Brian Cherinka on 2016-03-28 23:30:14
Licensed under a 3-clause BSD license.
Revision History:
Initial Version: 2016-03-28 23:30:14 by Brian Cherinka
Last Modified On: 2016-03-28 23:30:14 by Brian
'''
from __future__ import print_function, division
from ... | sdss/marvin | python/marvin/db/marvindb.py | Python | bsd-3-clause | 7,361 | [
"Brian"
] | ce644f670c678293cb7ec09b9f336bab0d33bb40422527084a9385b311361890 |
"""Mission Pinball Framework Media Controller (mpf-mc) setup.py.
Notes:
This setup script is a modified/customized version of the Kivy setup.py script.
"""
import sys
import re
from copy import deepcopy
import os
from os.path import join, dirname, sep, exists, isdir
from os import walk, environ
from distutils.ve... | missionpinball/mpf_mc | setup.py | Python | mit | 26,075 | [
"Brian"
] | 7473ce4315ea7d9de3730b8389299274cf882f103af9dfccff92fe7c4bc54887 |
"""K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | maxlikely/scikit-learn | sklearn/cluster/k_means_.py | Python | bsd-3-clause | 48,669 | [
"Gaussian"
] | 43e031a59b2e1765bc2564a8e002103e5c619c97e47de8187e0fe9646e258f52 |
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 4 23:05:11 2015
@author: boland
"""
class Config:
"""
The following class contains all the required configuration information
required to process the whole set of applications!
"""
def __init__(self, config_file):
# initialise conf... | boland1992/SeisSuite | seissuite/misc/config_class.py | Python | gpl-3.0 | 14,443 | [
"Gaussian"
] | fc6c63f394f163913b5c91b5edbb01ea4f38bd2b9cca2d7bc6d8c3164e8111da |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# 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... | carlos-lopez-garces/mapnik-trunk | scons/scons-local-1.2.0/SCons/Taskmaster.py | Python | lgpl-2.1 | 37,728 | [
"VisIt"
] | eda8b586da371b164797cfa0ce73ee5e92cafee44a184dbc61b808e133afb678 |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | etcmodel/tensor_utils.py | Python | apache-2.0 | 25,205 | [
"Gaussian"
] | 3967d9f2530d715b3fbe4e22962f8b49a7e1e7d5df8d2d82aec06b1229be8f3b |
#######Angles for the differents sectors: Right[0-1],Up-Right[1-2],Up[2-3],Up-left[3-4],Down-Right[0-5],Down[5-6],Down-Left[6-7], Left[Else]
Angles_values=[-20.0, 30.0,60.0,110.0,150.0,-70.0,-120.0,-160.0]
#######Frame_id for movement
#Frame_id_mov = 'odom'
Frame_id_mov = 'world'
#######Frame_id for the marker
#Fra... | pazagra/Drone_Rviz_Visualization_Control | Config.py | Python | gpl-3.0 | 1,884 | [
"Firefly"
] | ad07aa808bcd223870adc392742c158e3006a6eb29134ba75f802d006d6be997 |
# Copyright 2011 Rackspace
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2013 IBM Corp.
# 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
#
# ... | OpenAcademy-OpenStack/nova-scheduler | nova/tests/network/test_manager.py | Python | apache-2.0 | 124,380 | [
"FEFF"
] | 7df82921a58f7ea4ad7379a0767c3d34b21c618adcb64def96b92d1324ed7c46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.