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 |
|---|---|---|---|---|---|---|---|
from __future__ import print_function
# All functions using f2py need to be loaded before pybel/openbabel,
# otherwise it will segfault.
# See BUG report: https://github.com/numpy/numpy/issues/1746
from scipy.optimize import fmin_l_bfgs_b
from itertools import chain
from subprocess import check_output
import warnings... | oddt/oddt | oddt/toolkits/ob.py | Python | bsd-3-clause | 35,240 | [
"Open Babel",
"Pybel",
"RDKit"
] | eaa8ed58fa82939be6dd84e78e04a5937c939b3d8f3d0ae7a647dbf02b159160 |
import sys
if sys.version_info >= (3, 5, 0):
# Add async functions
from .async_ import Route
else:
from .sync_ import Route
imgtypes = [
"cry", "cuddle", "hug", "kiss", "lewd",
"lick", "nom", "nyan", "owo", "pat",
"pout", "rem", "slap", "smug", "stare",
"tickle", "triggered", "nsfw-gtn",
... | martmists/ram-api-wrapper | ram/v2.py | Python | mit | 911 | [
"MOE"
] | 64531e39ae01f32b52fb8be5e47c834a2deaa9130bb7cd930ef469820e7fdb6c |
# -*- coding: utf-8 -*-
"""
The role of dipole orientations in distributed source localization
==================================================================
When performing source localization in a distributed manner
(MNE/dSPM/sLORETA/eLORETA),
the source space is defined as a grid of dipoles that spans a large p... | teonlamont/mne-python | tutorials/plot_dipole_orientations.py | Python | bsd-3-clause | 9,675 | [
"Mayavi"
] | fd84ab4e6f310d1a0cc78d41a75b2d077a7171f4f031abd113ec652f8a47b747 |
import pytest
import warnings
import numpy as np
import astropy.units as u
# from astropy.modeling import models, fitting
from ..analysis_utilities import stack_spectra, fourier_shift
from .utilities import generate_gaussian_cube, gaussian
from ..utils import BadVelocitiesWarning
def test_shift():
amp = 1
v... | low-sky/spectral-cube | spectral_cube/tests/test_analysis_functions.py | Python | bsd-3-clause | 12,009 | [
"Gaussian"
] | e54f8b300e438eefcbd717151704bf905e55615a14ccc696b3a7c281696e5165 |
# Copyright (C) 2011 by Brandon Invergo (b.invergo@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import re
line_floats_re = re.compile("-*\d+\.\d+")
def parse_basics(lines, results):
... | zjuchenyuan/BioWeb | Lib/Bio/Phylo/PAML/_parse_baseml.py | Python | mit | 11,291 | [
"Biopython"
] | 9485ce94b5b59f5b7a17f52669983c51adfe1e6b7961089e71eedb1b02999545 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines the BorgQueen class, which manages drones to assimilate
data using Python's multiprocessing.
"""
import json
import logging
import os
from multiprocessing import Manager, Pool
from mo... | gmatteo/pymatgen | pymatgen/apps/borg/queen.py | Python | mit | 4,625 | [
"pymatgen"
] | 70b203347cf67073cf4bfe6ba06da5ff8d41b648f9575a54cba0789dc64c09df |
# -*- coding: UTF-8 -*-
import urllib
from HTMLParser import HTMLParser
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.in_table = False
self.in_title = 0
self.in_list = False
self.cu... | Kazatel/hns.moe | test.py | Python | gpl-2.0 | 1,760 | [
"MOE"
] | a5ffb4c4724c116fdfa1b2af35fb272215957f62d1cfdc6f43dd690a280c3542 |
# This script implements the automated execution for similarity measures
# It creates a formatted blast database with all protein sequences in the database
# CD Hit results are also inserted in database
from database_info_parameters import parser
import biana.BianaDB
import biana.BianaObjects.sequenceUtilities
import ... | emreg00/biana | scripts/processing/calculate_sequence_similarities.py | Python | gpl-3.0 | 3,277 | [
"BLAST"
] | 15448d162570d5d46eb855f2f1302cc4e305ffd42c5cf2b75eb2511179d0f882 |
#!/usr/bin/python
"""Test of sayAll."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
sequence.append(KeyComboAction("<Shift>Tab"))
sequence.append(KeyComboAction("<Shift>Tab"))
sequence.append(KeyComboAction("<Control>H... | chrys87/orca-beep | test/keystrokes/firefox/say_all_bugzilla_search.py | Python | lgpl-2.1 | 8,366 | [
"ORCA"
] | fe8a907079d8c0c2142ee9eec312c534a7c0b4d5ba94f1158ec1ae7e8b755ba1 |
'''
Add on 2011.08.23
@change:\n
- 2011.09.06\n
- make some change in Read_crd()\n
'''
import string
import unit_atom
import sys
def Read_top(filename):
'''
Read in an amber top file and output the atom list.
'''
try:
fp=open(filename,'r')
except IOError, e:
print e
... | zhuhong/g4analysis | G4Analysis/Coor/amber_top.py | Python | gpl-2.0 | 4,193 | [
"Amber"
] | dc985c8653503790aecc43848209394a1d0242874baffa1c8a607a59b885f87d |
#! /usr/bin/env python
# coding:utf-8
# Author: bingwang
# Email: toaya.kase@gmail.com
# Copylight 2012-2012 Bing Wang
# LICENCES: GPL v3.0
__docformat__ = "epytext en"
"""
This program will take two nt fasta file as input,
use balst one to one pair.
>>> import compare2fsa
>>> compare2fsa.main(fsafile_1,fsa_file_2)... | BingW/yeast_anno_pipe | src/double_blast.py | Python | gpl-3.0 | 1,877 | [
"BLAST"
] | 90e1082a8787e38cb2b27ad57f6bd8f80c1f51b7c22c98981442a1a88f65e09e |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | kobejean/tensorflow | tensorflow/contrib/timeseries/python/timeseries/math_utils.py | Python | apache-2.0 | 43,072 | [
"Gaussian"
] | bc490099c4cd05d2d6056f41bf884d6be427061df77cb0c7a8e22c2c28e90124 |
#
# Copyright (C) 2016 greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" unit testing code for IPython/Jupyter integration
"""
im... | ptosco/rdkit | rdkit/Chem/Draw/UnitTestIPython.py | Python | bsd-3-clause | 3,373 | [
"RDKit"
] | b9d41f1b56e49f29ecdefd85cbffb9c25d0ac335a6a1bfb2ab95d119bcd99dd9 |
# test_cachans.py ---
#
# Filename: test_cachans.py
# Description:
# Author:
# Maintainer:
# Created: Sat Jun 2 11:07:05 2012 (+0530)
# Version:
# Last-Updated: Sun Jun 25 16:17:20 2017 (-0400)
# By: subha
# Update #: 15
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Ch... | BhallaLab/moose-examples | traub_2005/py/test_cachans.py | Python | gpl-2.0 | 3,322 | [
"NEURON"
] | ee598a99e669146284bd0d853c041da376dfba208e33f0f6f9101ff9a544ba38 |
#!/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/gto/test/test_moleintor.py | Python | apache-2.0 | 12,416 | [
"PySCF"
] | 401270604aa7b1f8ad3b05473cc6dd780c2e5e37db3072e2e4d30f117302d3f9 |
from galaxy.datatypes.text import Json
from galaxy.datatypes.data import Text
from galaxy.datatypes.data import get_file_peek
from galaxy.datatypes.data import nice_size
from galaxy.datatypes.metadata import MetadataElement
from galaxy import util
import tempfile
import subprocess
import json
import gzip
import os
im... | oanc/galaxy-tools | lapps_datatypes_1_0_0/lapps.py | Python | apache-2.0 | 4,399 | [
"Galaxy"
] | d6dcf2d8459c091ae4d90acc51e4dd221527aa1fd6c4ef4ca60ef5c37825d4cd |
#
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El, time
m = 2000
n = 1000
display = True
worldR... | justusc/Elemental | examples/interface/CPDense.py | Python | bsd-3-clause | 1,817 | [
"Gaussian"
] | 20919ced16d08b1803ef4e9b023d2ad1edacb718ae8f57da159b783ab3c15944 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for Student's Profile Page.
"""
from contextlib import contextmanager
from datetime import datetime
from bok_choy.web_app_test import WebAppTest
from nose.plugins.attrib import attr
from ...pages.common.logout import LogoutPage
from ...pages.lms.account_settings import Acc... | unicri/edx-platform | common/test/acceptance/tests/lms/test_learner_profile.py | Python | agpl-3.0 | 31,630 | [
"VisIt"
] | 2a284f58a6a67dc5a3aaf4b2df9c16ff57d4571b0de3d31222ee3254aa04584e |
"""
This file builds pipeline for detecting any contaminations in cho RNAseq samples.
"""
#============= import required packages =============
import os
from os import listdir
import sys
sys.path.append('/home/shangzhong/Codes/Pipeline')
from Modules.f00_Message import Message
from Modules.f01_list_trim_fq import l... | shl198/Pipeline | DetectContamination/01_Detect_Contamination.py | Python | mit | 3,920 | [
"BLAST"
] | 7e7585ec1217827e1dbca9fcb130756bc0d65ff64f5d9ca83137a94168fae5b7 |
country_codes_2 = [
"AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB",
"BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BA", "BA", "BW", "BV", "BV", "BR", "IO", "BN", "BG", "BF", "BI",
"KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", ... | svebk/dig-alignment | versions/2.0/karma/python/addresses.py | Python | apache-2.0 | 20,337 | [
"BWA"
] | d7a5ed29c35ead2b6de19f7f7b0fc6bf1787b7858d98a6a04a5f102703d0cdfb |
import unittest
import os
import yaml
from pymatgen import SETTINGS_FILE, _load_pmg_settings, get_structure_from_mp
import warnings
class SettingsTestCase(unittest.TestCase):
def test_something(self):
SETTINGS = _load_pmg_settings()
if os.path.exists(SETTINGS_FILE):
with open(SETTINGS... | xhqu1981/pymatgen | pymatgen/tests/test_init.py | Python | mit | 904 | [
"pymatgen"
] | 270c4431413d2295ff4ac0c0baa2178794abb8338556b15e1bbd90bcb00bf93c |
from __future__ import print_function
__author__ = """Alex "O." Holcombe, Charles Ludowici, """ ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor
import time, sys, platform, os
from math import atan, atan2, pi, cos, sin, sqrt, ceil, radians, degrees
import numpy as np
import psychopy, ... | alexholcombe/dot-jump | dataRaw/Fixed Cue/test_dot-jump25Oct2016_12-16.py | Python | gpl-3.0 | 25,917 | [
"Gaussian"
] | 7552ebb7a9008271b61f58d788cc52240b004f1036a999fef8112515dce312d7 |
#!/usr/bin/env python
# encoding: utf-8
# Created by Brian Cherinka on 2016-02-18 18:04:14
# Licensed under a 3-clause BSD license.
# Revision History:
# Initial Version: 2016-02-18 18:04:14 by Brian Cherinka
# Last Modified On: 2016-02-18 18:04:14 by Brian
from __future__ import print_function
from __future... | bretthandrews/marvin | python/marvin/web/jinja_filters.py | Python | bsd-3-clause | 3,271 | [
"Brian",
"Galaxy"
] | ceee02f40e24a5a92270702628f3ab598e469faa3767cb3c8ed7e73fc789c84e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest
import tempfile
from monty.json import MontyDecoder
from monty.serialization import loadfn
from pymatgen.io.vasp.sets import *
from pymatgen.io.vasp.inp... | gpetretto/pymatgen | pymatgen/io/vasp/tests/test_sets.py | Python | mit | 34,925 | [
"VASP",
"pymatgen"
] | e7c2c511a54dcf22d21a2fdb95e84eb99b7e4ecd1850ea5dc290c5efbb142693 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Brewing Classic Styles: 80 Winning Recipes Anyone Can Brew
by Jamil Zainasheff and John J. Palmer
Biere de l'Inde
Used by permission of Brewers Publications (2007). All rights reserved.
You can purchase the book here:
- http://www.brewerspublications.com/books/bre... | chrisgilmerproj/brewday | examples/brewing_classic_styles/biere_de_linde_dict.py | Python | mit | 2,790 | [
"ADF",
"CRYSTAL"
] | 9edc0296a32e01e291a90bcf5139a6d9a28649c241ba44d0503dc335e9413925 |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattersmith"
_path_str = "scattersmith.marker"
_valid_props = {
"autocolorscale",
... | plotly/plotly.py | packages/python/plotly/plotly/graph_objs/scattersmith/_marker.py | Python | mit | 61,843 | [
"Bowtie"
] | 6f4f46cc8270ba7842aa7b32688e2862f65af7cc7978e3bf1d68b5655e0b2f73 |
# Copyright (c) 2016-2018 Mount Sinai School of Medicine
#
# 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 l... | hammerlab/varcode | varcode/effects/translate.py | Python | apache-2.0 | 7,161 | [
"Biopython"
] | 476d6ac005f0d87b109cf7a9498713267ef17fe840a3bc624105d2f558ca6b17 |
"""Pluralize English nouns (stage 2)
This program is part of "Dive Into Python", a free Python book for
experienced programmers. Visit http://diveintopython.org/ for the
latest version.
Command line usage:
$ python plural2.py noun
nouns
"""
__author__ = "Mark Pilgrim (mark@diveintopython.org)"
__version__ = "$Revis... | tapomayukh/projects_in_python | sandbox_tapo/src/refs/diveintopython-pdf-5.4/diveintopython-5.4/py/plural/stage2/plural2.py | Python | mit | 1,307 | [
"VisIt"
] | ec08095c338ec47df4557405e255831d39821cc224deff537d2b42bcb31f20b1 |
# this program corresponds to special.py
### Means test is not done yet
# E Means test is giving error (E)
# F Means test is failing (F)
# EF Means test is giving error and Failing
#! Means test is segfaulting
# 8 Means test runs forever
### test_besselpoly
### test_mathieu_a
### test_mathieu_even_coef
##... | mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/scipy/special/tests/test_basic.py | Python | mit | 131,599 | [
"Elk"
] | 8a85c409d82e5222c90a9a4920653a84702e7d074b160812b5b9553782fa3996 |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
#
# Impressive, a fancy presentation tool
# Copyright (C) 2005-2008 Martin J. Fiedler <martin.fiedler@gmx.net>
# portions Copyright (C) 2005 Rob Reid <rreid@drao.nrc.ca>
# portions Copyright (C) 2006 Ronan Le Hy <rlehy@free.fr>
# portions Copyright (C) 2007 Luke Campag... | dgleich/impressive-twitter | impressive.py | Python | gpl-2.0 | 161,429 | [
"VisIt"
] | 3572ec1a1c86f8a9179b1780281f48763729fc089aef956bdde08df11c20df16 |
#
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | kidaa30/spacewalk | backend/server/rhnServer/server_class.py | Python | gpl-2.0 | 30,690 | [
"CDK"
] | 703b4029fba1a9ae28fcfa1920d6c4ee9b0b914fbd090ea08b99936a4cfc6a4b |
import itertools
import logging
import re
import time
import urllib
from collections import defaultdict
from datetime import datetime, timedelta, timezone
from decimal import Decimal
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, Type, Union
from urllib.parse import urlencode
import pytz... | kou/zulip | analytics/views.py | Python | apache-2.0 | 59,053 | [
"VisIt"
] | 4eb467b4008e5a40fbe46502c531dd83c1418668ec60176c9dcf4b4d46bde3ec |
#!/usr/bin/env python
##########################################################################
#
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files ... | devlato/kolibrios-llvm | contrib/sdk/sources/Mesa/src/gallium/tools/trace/parse.py | Python | mit | 12,705 | [
"VisIt"
] | 68064edd36f912094f6d94d65e00a4ceb488334655a0dcbbca4b4656a5f3be82 |
########################################################################
# File: AdlerTestCase.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2011/02/11 09:08:19
########################################################################
""" :mod: AdlerTestCase
=======================
.. module: AdlerTestCa... | arrabito/DIRAC | Core/Utilities/test/Test_Adler.py | Python | gpl-3.0 | 3,561 | [
"DIRAC"
] | 0782650e0ff53cca16e919db65a43b99b49f412d5d64a86dc8bc13e70bc05ab1 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgarren/spack | var/spack/repos/builtin/packages/r-delayedarray/package.py | Python | lgpl-2.1 | 2,858 | [
"Bioconductor"
] | b18ee707014763e1e75281cb1954eed27a0b83fbec417c9beaa57e4e4270815e |
'''
This file is part of an ICSE'18 submission that is currently under review.
For more information visit: https://github.com/icse18-FAST/FAST.
This 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 ve... | icse18-FAST/FAST | tools/generate-scalability-input.py | Python | gpl-3.0 | 2,132 | [
"VisIt"
] | b93dc2abf51208acc6e062a67ad8bf6a3072f860fb80bddacbd3de2089d4774e |
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 22 21:48:17 2015
A script to analyze the survival and brood size data of female P. red worms
injected with cas9.
@author: davidangeles
"""
from __future__ import division, print_function, absolute_import
import pandas as pd
import numpy as np
import matplotlib.pyplot as... | dangeles/WormFiles | useful_scripts/src/cas9_unc54_analysis_script.py | Python | mit | 11,670 | [
"Gaussian"
] | 7ebf1285aa9c7e067be5d647ff990f9671f98634e81ed7f257bd5ae77f7fd8ae |
# -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup
version = '0.2.0'
description = 'Bird Feeder publishes Thredds metadata catalogs to a Solr index service with birdhouse schema.'
long_description = (
open('README.rst').read() + '\n' +
open('AUTHORS.rst').read() + '\n' +... | bird-house/bird-feeder | setup.py | Python | apache-2.0 | 1,481 | [
"NetCDF"
] | 42c65d32a96ea86cc49a0265f17625855a3815b786871aad2458e5e7113575d9 |
#!/bin/python
def foo(*args):
arg1,arg2 = args
print "foo() arg1: %s \nfoo() arg2: %s" % (arg1,arg2)
def bar(arg1,arg2):
print "bar() arg1: %s \nbar() arg2: %s" % (arg1,arg2)
def baz():
print "baz() no args"
foo("eeny","meeny")
bar("miney","moe")
baz()
| pshanks01/learn_python | examples/ex18.py | Python | gpl-3.0 | 273 | [
"MOE"
] | e78423f0574aa7206c4fd0d7c67f4fb724968af5496731f2e2094a6ab4e67229 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | filipenf/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 23,732 | [
"Galaxy",
"MOOSE"
] | 9d0269358622dade4ae8242e24f4de03f3d3cfda26e6afb9e075448ad8441a40 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The fsl module provides classes for interfacing with the `FSL
<http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This
was written to work with FSL version 5.0.4.
Change directory to p... | JohnGriffiths/nipype | nipype/interfaces/fsl/epi.py | Python | bsd-3-clause | 37,962 | [
"Gaussian"
] | 035c6807bd698037a3293e9e4391e20fa54b474d076b2e8de2fa01e2095cd773 |
# Copyright 2012 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | rhyolight/nupic.son | tests/app/melange/request/test_links.py | Python | apache-2.0 | 5,255 | [
"VisIt"
] | c3da9f9dc99c23d191b902afdfcd2efeda4a4f35cfb0a18fa3c07fad6f4ff2b3 |
"""
@created_at 2014-06-09
@author Exequiel Fuentes <efulet@gmail.com>
@author Brian Keith <briankeithn@gmail.com>
Basado en el trabajo de Juan Bekios-Calfa <juan.bekios@ucn.cl>
"""
# Se recomienda seguir los siguientes estandares:
# 1. Para codificacion: PEP 8 - Style Guide for Python Code (http://legacy.python.or... | efulet/laberinto | laberinto/lib/busqueda.py | Python | mit | 12,112 | [
"Brian"
] | 1884c92258be42b7e27cbb4ad4ff7af791282e058f31db5bc5af58432faf764f |
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
import pyglet
import cocos
from cocos.director import director
from cocos.actions import *
from cocos.layer import *
from cocos.particle_systems import *
cl... | adamwiggins/cocos2d | test/test_particle_meteor.py | Python | bsd-3-clause | 784 | [
"Galaxy"
] | 3dae05163d1875d0bb8f74a0e0fe7ebae2737396f0d11fa8da8a93f031fcc165 |
from __future__ import division, absolute_import
from matplotlib import rc,rcParams
rc('text', usetex=True)
rc('axes', linewidth=2)
rc('font', weight='bold')
# In[251]:
import astropy.stats
import glob
import math
import matplotlib.pyplot as plt
from matplotlib import ticker
from matplotlib.ticker import FormatStr... | hrichstein/Stellar_mass_env_Density | Codes/Scripts/adding_plots_7_23.py | Python | mit | 59,855 | [
"Galaxy"
] | 3e9106bf6f84110641b2e61cde24ca735e5692eca977c7a611f055b5e32b22c4 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 16.3.8
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | bjolivot/ansible | lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py | Python | gpl-3.0 | 5,571 | [
"VisIt"
] | 3e993e85b2fad946c2a8bfc5d75cc4064bed258ecac63b95408b7e99e218e997 |
#!/usr/bin/python
import os, sys # low level handling, such as command line stuff
import string # string methods available
import re # regular expressions
import getopt # comand line argument handling
from low import * # custom functions, written by myself
# =================================================... | lotharwissler/bioinformatics | python/blast/cluster_sequences.py | Python | mit | 6,059 | [
"BLAST"
] | 217682f703cb32b53b72a78011eb0b781c6d176b2f7b4b3c9ae8032bfa8abf46 |
import hashlib
import urllib
import json
import os
from datetime import datetime, timedelta
from random import randint
import time
import re
import codecs
import robotparser
from utils import stdout_logger as logger
from utils.config import USER_AGENT
class HttpCache:
def __init__(self, session, browser):
... | jmrnilsson/beei | utils/http_cache.py | Python | mit | 3,714 | [
"VisIt"
] | 985a996664c0eb36ea10791e5d37be4547b6348147b87184091bee8554a65673 |
# -*- coding: utf-8 -*-
# Copyright 2022 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... | googleapis/python-assured-workloads | tests/unit/gapic/assuredworkloads_v1/test_assured_workloads_service.py | Python | apache-2.0 | 102,499 | [
"Octopus"
] | e1261fb82aae986a2decf90986784b526aa7ba5312f38de8e135d90f040882c2 |
"""
Distribution functions used in GLM
"""
# Author: Christian Lorentzen <lorentzen.ch@googlemail.com>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
from collections import namedtuple
import numbers
import numpy as np
from scipy.special import xlogy
DistributionBoundary = namedtuple("Distribution... | bnaul/scikit-learn | sklearn/_loss/glm_distribution.py | Python | bsd-3-clause | 11,869 | [
"Gaussian"
] | c339deee9fef23236890f8f2c44589a683d3891ac7458fa682134bad66936489 |
from mdt import CompositeModelTemplate, CompartmentTemplate
import numpy as np
__author__ = 'Robbert Harms'
__date__ = '2019-10-22'
__maintainer__ = 'Robbert Harms'
__email__ = 'robbert@xkls.nl'
__licence__ = 'LGPL v3'
class sIVIM(CompositeModelTemplate):
"""Simplified IVIM model with only a diffusion constant a... | cbclab/MDT | mdt/data/components/standard/composite_models/ivim.py | Python | lgpl-3.0 | 1,527 | [
"DIRAC"
] | e309785c6cbcb37301d75bfc55407781101abbd1c4e9cee3bbc3f89d4ffd88be |
import copy
import csv
import datetime
import json
import mock
import re
import urllib
import pyquery
from cStringIO import StringIO
from nose.tools import eq_, ok_, assert_raises
from nose.plugins.skip import SkipTest
from django.test.client import RequestFactory
from django.test.utils import override_settings
from ... | cliqz/socorro | webapp-django/crashstats/crashstats/tests/test_views.py | Python | mpl-2.0 | 199,383 | [
"VisIt"
] | 3693aaf80eb8979e788c0bdf1ea7690e05e74267c51762b544560af0ff4c47c9 |
"""Test methods that use default parameter values.
Created on Feb 9, 2016 by David Gobbi
"""
import sys
import vtk
from vtk.test import Testing
class TestDefaultArgs(Testing.vtkTest):
def testDefaultInt(self):
"""Simple test of an integer arg with default value."""
image = vtk.vtkImageData()
... | keithroe/vtkoptix | Common/Core/Testing/Python/TestDefaultArgs.py | Python | bsd-3-clause | 2,159 | [
"VTK"
] | 539ffee30b05f127a1866e8de1c0a8ce0118a3a3a47b8ccf1b93dd85be1905b5 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import sys
import os
import ast
from py2cpp.converter import Converter
from py2cpp.cpp import BuildContext
def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument("input", type=argparse.File... | mugwort-rc/py2cpp | py2cpp/__main__.py | Python | gpl-3.0 | 849 | [
"VisIt"
] | a9ab9bb14da21472b023490dd9efb2e83690086945d3171af11893d60495083a |
# 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, software
# distributed under the... | openstack/zaqar | zaqar/conf/notification.py | Python | apache-2.0 | 4,557 | [
"VisIt"
] | 3ff7989f6d89e77b953a8a330938f4aa03092a02bbd7f0e6e5225436046c5f0e |
# -*- coding: utf-8 -*-
import re
import unittest
from pybel.constants import DIRTY
from pybel.exceptions import MissingNamespaceRegexWarning, NakedNameWarning
from pybel.parser import ConceptParser
class _ParserMixin(unittest.TestCase):
def setUp(self):
self.namespace_to_term = {
"A": {
... | pybel/pybel | tests/test_parse/test_parse_identifier.py | Python | mit | 6,942 | [
"Pybel"
] | 409ea0ec11aa57233727a614f8f2cf20afdb2671edfad80822cab56ea386504f |
#!/usr/bin/env python -i
# preceeding line should have path for Python on your machine
# viz_pymol.py
# Purpose: viz running LAMMPS simulation via PyMol
# Syntax: viz_pymol.py in.lammps Nfreq Nsteps
# in.lammps = LAMMPS input script
# Nfreq = dump and viz shapshot every this many steps
# Ns... | SGenheden/lammps | python/examples/viz_pymol.py | Python | gpl-2.0 | 1,912 | [
"LAMMPS",
"PyMOL"
] | 902cd1b7a6b76f14272bf89cfb58b60df8db29f2284e3f2fedf92c1f41ba0e7e |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpat... | uNotes/Notes | config/urls.py | Python | bsd-3-clause | 1,275 | [
"VisIt"
] | 3e38feb6694a9008bfd3b6ce4159a543b845edb4a00eff038bdd02a7998e6e0a |
from cis.data_io import hdf_sd as hdf_sd, hdf_vd
import cis.utils as utils
import logging
def get_hdf4_file_variables(filename, data_type=None):
"""
Get all variables from a file containing ungridded data.
Concatenate variable from both VD and SD data
:param filename: The filename of the file to get ... | zak-k/cis | cis/data_io/hdf.py | Python | gpl-3.0 | 5,292 | [
"NetCDF"
] | 4ccf74156f1cd980f04deed6235a2057264d16faed534145ed282347a62a5875 |
import h5py
import numpy as np
# x, y, z, t, c
#11,13,18,50,31
mode="broken15"
#original_train_file="/home/woody/capn/mppi033h/Data/ORCA_JTE_NEMOWATER/h5_input_projections_3-100GeV/4dTo4d/xyz_channel_-350+850/concatenated/elec-CC_and_muon-CC_xyzc_train_1_to_480_shuffled_0.h5"
#outfile_train="channel/elec-CC_and... | StefReck/Km3-Autoencoder | data/generate.py | Python | mit | 16,216 | [
"Gaussian"
] | 19f57f882f54fd1a5d9b5728a1bde9102183fa2c509bcba8fc068a4bd3cd4401 |
"""
Tests related to the cohorting feature.
"""
from uuid import uuid4
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.courseware import... | Stanford-Online/edx-platform | common/test/acceptance/tests/discussion/test_cohorts.py | Python | agpl-3.0 | 6,008 | [
"VisIt"
] | 393eddfc870d303011736804aee11d3c8c419afa8bfcdaaa5bf1e50de02eedac |
""" @package antlr3.tree
@brief ANTLR3 runtime package, treewizard module
A utility module to create ASTs at runtime.
See <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different.
"""
# begin[licence]
#... | geary/claslite | web/app/lib/treewizard.py | Python | unlicense | 18,329 | [
"VisIt"
] | 446fad4f9e4717ad93d178ae01cea2e2bfd54b704b02230abef410726d349587 |
# Copyright 2012 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.
"""Runs Mozilla's Kraken JavaScript benchmark."""
import os
from core import perf_benchmark
from telemetry import page as page_module
from telemetry.page ... | danakj/chromium | tools/perf/benchmarks/kraken.py | Python | bsd-3-clause | 5,339 | [
"Brian",
"Gaussian"
] | aaeb12b4a7eeca804922c474dcdbe5663c68b79bf5dcf290257840411a142644 |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | ehankland/PerfKitBenchmarker | perfkitbenchmarker/benchmarks/speccpu2006_benchmark.py | Python | apache-2.0 | 9,396 | [
"GAMESS",
"Gromacs",
"NAMD"
] | b41e09947c74867292f88062e8bcece5f5af4adca4f7986bb91453418a714315 |
"""Utilities to measure and estimate memory"""
# The functions _VmB, memory, resident, and stacksize are based on
# Python Cookbook, recipe number 286222
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222
import os
import resource
import numpy as np
_proc_status = '/proc/%d/status' % os.getpid()
_sca... | qsnake/gpaw | gpaw/utilities/memory.py | Python | gpl-3.0 | 4,359 | [
"GPAW"
] | 3291b38c27505830ad3e5b298c1e1eb898efcc4128c67f5b4cbf6bbc5ddb9b7b |
"""
cmlsystem.py -- CML2 configurator front-end support
by Eric S. Raymond, <esr@thyrsus.com>
Mode-independent code for front ends. This supplies one big class that you
initialize by loading a compiled rulebase. The class provides functions for
doing tests and manipulations on the rulebase, and for writing out
conf... | vh21/codezero | tools/cml2-tools/cmlsystem.py | Python | gpl-3.0 | 53,563 | [
"VisIt"
] | 39f6fb4eb985306e29d35b426363d85956b9abd4b479a882e27b1744591af53f |
from __future__ import print_function
from hotbit import Hotbit
#from hotbit import Calculator0
from ase import *
from ase.build import molecule
from hotbit.test.misc import default_param
import sys
systems=['C2H6','CH3CH2O','H2COH','H2','C2H6CHOH','isobutane']
energies0=[-153.471502365,-232.206844117,-166.801950557,... | pekkosk/hotbit | hotbit/test/standard_set.py | Python | gpl-2.0 | 1,159 | [
"ASE"
] | c91981b9800f147886c3d078bb0470e5fc66ac28f47faed4cb3af755f3907690 |
#!/usr/bin/env python
"""
Example of a model fitting script.
The user should modify the model
according to the characteristics of
the signal of interest.
Part of the code is taken from the
kmpfit examples:
http://www.astro.rug.nl/software/kapteyn/kmpfittutorial.html#profile-fitting
"""
import numpy as np
import argp... | astrofle/CRRLpy | examples/synth_spec/makemodel.py | Python | mit | 4,292 | [
"Gaussian"
] | 7ce82c4259f53c860e293439469457564313b60dc2d61b10365ec3e6d920cddf |
../../../../share/pyshared/orca/httpserver.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/httpserver.py | Python | gpl-3.0 | 45 | [
"ORCA"
] | 2f98cd68f2d231355cba6aa550ad484d31a605d9e798fb1f314721da3c0a8bc1 |
#
# (C) Copyright 2018 InovaDevelopment.comn
#
# 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.
#
# This program... | zenoss/pywbem | pywbem_mock/_wbemconnection_mock.py | Python | lgpl-2.1 | 138,026 | [
"NAMD"
] | 9f3458a809366b23433cc2ffb02aec2dd05a41e46e97758f8894f676324db8fb |
import collections
import os
import sys
import math
import time
__author__ = 'Peipei YI'
class Digraph:
def __init__(self, path=None, type=None):
self.vertices = set()
self.edges = collections.defaultdict(set)
def __iter__(self):
for v in self.vertices:
yield v
def a... | yipeipei/peppy | graph/graph.py | Python | mit | 2,796 | [
"VisIt"
] | e8814a5ed51db07d1c626206c6cdc70c83e61b32bd28e674a6bcf1f59f340bce |
'''
this script quantifies the read counts using HTSeq. To be run in osiris.
'''
import sys,os
import multiprocessing,multiprocessing.pool
def htseqCounter(sample):
'''
this function calls HTSeq
'''
htseqExecutable='htseq-count'
flag1='-m union'
flag2='-f bam'
flag3='-t gene'
flag5='... | adelomana/30sols | F1.interplay/expressionQuantification/pipeline.star.htseq-count.deseq2/readCounter.py | Python | gpl-3.0 | 1,413 | [
"HTSeq"
] | 0c5e11012e270c5792749a2e372b4c1bfc29a791f6db69d641b2b5cb7683b07d |
#!/usr/bin/env python
import sys
import subprocess
import h5py
try:
from pyx import *
except:
pass
from ..fivec import FiveC
from ..plotting import plot_fivec_dict, plot_key
def run(args):
if not args.image is None and args.pdf and "pyx" not in sys.modules.keys():
print >> sys.stderr, ("-p/--pd... | bxlab/hifive | hifive/commands/create_fivec_heatmap.py | Python | mit | 7,635 | [
"Galaxy"
] | f40bc248395cbaa2330ccb312134054c7a29f57974ee9bda22670b90e3bd4ecc |
#! coding: utf-8
import copy
import datetime
import inspect
from sqlalchemy import exc
from sqlalchemy import sql
from sqlalchemy import testing
from sqlalchemy import util
from sqlalchemy.sql import column
from sqlalchemy.testing import assert_raises
from sqlalchemy.testing import assert_raises_message
from sqlalche... | kawamon/hue | desktop/core/ext-py/SQLAlchemy-1.3.17/test/base/test_utils.py | Python | apache-2.0 | 78,632 | [
"MOE"
] | 5a69e38f44c190a39dd93483e091f80eec635ca524d86a2fcc9e7d08e6685156 |
#!/usr/bin/env python
########################################################################
# File : dirac-wms-job-get-output-data
# Author : Stuart Paterson
########################################################################
"""
Retrieve the output data files of a DIRAC job
"""
import DIRAC
from DIRAC.Core... | DIRACGrid/DIRAC | src/DIRAC/Interfaces/scripts/dirac_wms_job_get_output_data.py | Python | gpl-3.0 | 1,292 | [
"DIRAC"
] | 7b7c8002c020e92e94953a3cbc09943582aab322d90540aee38429abd2431f4a |
"""
==========================================
Affine Registration in 3D
==========================================
This example explains how to compute an affine transformation to register two
3D volumes by maximization of their Mutual Information [Mattes03]_. The
optimization strategy is similar to that implemented i... | jyeatman/dipy | doc/examples/affine_registration_3d.py | Python | bsd-3-clause | 10,569 | [
"Gaussian"
] | 5e19437413e4d52c7a6ed586018cc7f3a72111098fec937c158e080ed513ab3e |
#!/usr/bin/env python3
import itertools as it
from collections import namedtuple
import numpy as np
from scipy.spatial.distance import pdist
# from pysisyphus.calculators import *
from pysisyphus.calculators import Gaussian16, OpenMolcas, ORCA, Psi4, Turbomole, XTB
from pysisyphus.calculators.Calculator import Calcu... | eljost/pysisyphus | deprecated/ONIOM.py | Python | gpl-3.0 | 5,710 | [
"ORCA",
"OpenMolcas",
"Psi4",
"PySCF",
"TURBOMOLE",
"xTB"
] | e85b1b1d63b1684290ba2da3ba15772e90a595fdb8689adea0ab2471117284eb |
from __future__ import print_function
import numpy as np
from gpaw.response.g0w0 import G0W0
class GW0(G0W0):
def __init__(self, calc, filename='gw0', **kwargs):
G0W0.__init__(self, calc, filename, **kwargs)
try:
self.qp_xsin = np.load(filename + '-gw0.npy')
except IOError:
... | robwarm/gpaw-symm | gpaw/response/gw0.py | Python | gpl-3.0 | 1,648 | [
"GPAW"
] | 48658e430e5cc0d6ff54aaa399541fcb008e0a52622c59536615ab459b1523b8 |
#!/usr/bin/env python
"""
Remove the given file replica or a list of file replicas from the File Catalog
and from the storage.
Example:
$ dirac-dms-remove-replicas /formation/user/v/vhamar/Test.txt IBCP-disk
Successfully removed DIRAC-USER replica of /formation/user/v/vhamar/Test.txt
"""
from __future__ import pri... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/scripts/dirac_dms_remove_replicas.py | Python | gpl-3.0 | 2,118 | [
"DIRAC"
] | db6406d3bba498071211f169f9c5aae17eb03743db77a22eafdcdd66c0ead165 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import numpy as np
from ..sile import add_sile, sile_fh_open, sile_raise_write
from .sile import SileSiesta
from sisl.... | zerothi/sisl | sisl/io/siesta/kp.py | Python | mpl-2.0 | 4,785 | [
"SIESTA"
] | 93fe2f9ed7340ccbf43cb4c504f0b9af42c798c322afbaff03f612ca8943f46f |
#/*
# *
# * TuneIn Radio for Kodi.
# *
# * Copyright (C) 2015 Brian Hornsby
# *
# * 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... | brianhornsby/plugin.audio.tuneinradio | resources/lib/tunein.py | Python | gpl-3.0 | 40,322 | [
"Brian"
] | a0499235115691eb70842435898adfce3d9ebbcd84ee45f8d7acd4cf5beeaed6 |
import numpy as np
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten, pooling
from keras.layers import Convolution2D, MaxPooling2D
from keras.utils import np_utils
from keras import backend as K
from keras.models import load_model
'''Cho... | Spookz0r/Temporal_Insanity | Gabriel/Code/Keras/Conv_network.py | Python | mit | 4,495 | [
"NEURON"
] | 46df81d5dd71a55db2f634a4d9b17898525d3698c637ee98c8d61493c41944b7 |
#########################################################################
## multiscaleOneCompt.py ---
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2014 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU General Pu... | BhallaLab/moose-examples | snippets/multiscaleOneCompt.py | Python | gpl-2.0 | 7,306 | [
"MOOSE",
"NEURON"
] | a4261c29933d334d93ab82f89b3899552a8e872878a11d2ae005d1362e5bac83 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.cm as cm
from matplotlib.colors import ListedColormap
import argparse
import math
import plot_analysis as analysis
def plot_autocal(data1, data2):
if data2.autocal == 1:
auto_plot_1(dat... | manurs/clamp-cli | plot_autocal.py | Python | gpl-3.0 | 7,486 | [
"NEURON"
] | c06c5cd3b83d91d32cb1874732be93ce89ade1922d85ad1936353f461d998cb4 |
"""
@file
@brief Definition of colors
"""
colors_definition = [
('Alice blue', '#f0f8ff'),
('Alizarin crimson', '#e32636'),
('Almond', '#efdecd'),
('Amaranth', '#e52b50'),
('Amber', '#ffbf00'),
('American rose', '#ff033e'),
('Amethyst', '#9966cc'),
('Green', '#a4c639'),
('Antique br... | sdpython/ensae_teaching_cs | src/ensae_teaching_cs/helpers/colorsdef.py | Python | mit | 22,929 | [
"Amber"
] | 9d3ceb3dbf7293ecd980d9cd2d83a63f21dbc9e66a154facc01e83e9a92e767f |
"""
Test PLA parsing functions
"""
from nose.tools import assert_raises
from pyeda.boolalg.espresso import FTYPE, DTYPE, RTYPE
from pyeda.parsing.pla import Error, parse
BASIC = """
# Filename: basic.pla
.i 4
.o 2
.ilb x y z
.ob f g
.p 3
.type fr
0001 00
0010 01
0100 10
1000 11
.e
"""
def test_errors():
# Gen... | GtTmy/pyeda | pyeda/parsing/test/test_pla.py | Python | bsd-2-clause | 1,219 | [
"ESPResSo"
] | ad76984620f0ec07b3309fb30ae5262cbbe9d7503d0c700249e2dde4d3906564 |
#!/usr/bin/env python
# This does exactly the same as GenerateFile.c .
# There are several netCDF interfaces for python available,
# this script will try use the one from scipy and fall back to pupynere.
# (http://pypi.python.org/pypi/pupynere/).
try:
from scipy.io import *
except:
from pupynere import *
... | modelica-3rdparty/netCDF-DataReader | NcDataReader2/Resources/examples/GenerateFile.py | Python | lgpl-2.1 | 1,653 | [
"NetCDF"
] | 2b5850dfe49072fb82e264775f1972e317e8b54a49e050a60662ab5adb04fec0 |
# Adrian Soto
# February 28, 2016
# Stony Brook University
#
# Program to generate relative coordinates and
# order paramterers of water from an ANI (or XYZ) file
#
# Up until know it can only calculate dimer coordinates
# but the code structure allows any cluster size
#
#
import math
import numpy as np
class sna... | adrian-soto/Waterpack | pack/h2o.py | Python | gpl-2.0 | 46,745 | [
"CRYSTAL"
] | 9c074de7526db808a5a6f1ee156b41e8803fde22cad480dfc5f5fc8a4d81bcd8 |
#!/usr/bin/env python
# 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.
#
# This library is distributed in the ... | FluidityProject/multifluids | python/fluidity/diagnostics/structured_fields.py | Python | lgpl-2.1 | 10,761 | [
"VTK"
] | aaa0d19e8cf677c4a2700445adbd12528997d0f91ac36b7317b48e0f95542a0b |
"""
Parameters for reading and plotting thermal flux
"""
import os
import yaml
import pprint
from copy import deepcopy
from .default import default_parameters
class Parameters:
def __init__(self, par_set=None):
if par_set is not None:
self.set(par_set)
else:
self.set(defaul... | kbsezginel/tee_mof | thermof/parameters/parameters.py | Python | mit | 1,475 | [
"LAMMPS"
] | a461db9920c81f75ab9f7a287061b4eca82d4573aeaf2389488c7cdea773902d |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | peterbraden/tensorflow | tensorflow/python/ops/control_flow_grad.py | Python | apache-2.0 | 7,761 | [
"VisIt"
] | 80ae050e71449c1ecb3b625c80727dc63690040ff9c931611379e5fce227d91c |
#!/usr/bin/env python
def error(msg,code=9):
print 'Error: ' + msg
exit(code)
# Imports
try: import argparse
except: error('This version of python is not new enough. python 2.7 or newer is required.')
try: from netCDF4 import Dataset
except: error('Unable to import netCDF4 module. Check your PYTHONPATH.\n'
... | StevePny/NOAA-GFDL-MOM6-examples | tools/python/025gridGeneration/editTopo.py | Python | gpl-3.0 | 18,852 | [
"NetCDF"
] | e731232dbdbb4fb65f580b9160dfa68a7af8f912f326db4c887afb97d92f2a0c |
"""!
The main file with the class definitions
Core
==============
This file contains all of the classes for the module.
"""
from contextlib import contextmanager
import os.path as p
import re
from six import string_types
from builtins import int
import numpy as np
from scipy.io import FortranFile
from dask import... | edoddridge/MIM | aronnax/core.py | Python | mit | 16,302 | [
"NetCDF"
] | 12d76635c2b83b60a20e6927923c93b81aa57b6a9f3a60ca3e85e7a5ca0a75b0 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2008 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 Lesser General Public License as published by
## the Free Softw... | andrebellafronte/stoq | stoqlib/gui/search/personsearch.py | Python | gpl-2.0 | 19,925 | [
"VisIt"
] | 45e3f8c9045a9ce07d2c869ff0a977ce688324d88215987a576f9fddc43e7098 |
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 23 15:54:36 2014
This file is part of pyNLO.
pyNLO 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 optio... | ycasg/PyNLO | src/validation/Old and Partial Tests/PPLN_SHG.py | Python | gpl-3.0 | 4,198 | [
"CRYSTAL"
] | 49c9f26957a45e2383ef6db160d002c7bbbed8d0fdc28522b1a7e042547f2a53 |
# -*- Mode: Python; coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2012 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 Fre... | tiagocardosos/stoq | stoq/gui/receivable.py | Python | gpl-2.0 | 19,373 | [
"VisIt"
] | 8d6af19af505fadd8b4872effe7019c0d714f79dbb3ef14dc5f6e6ae025a49b0 |
"""
Gaussian Mixture Models.
This implementation corresponds to frequentist (non-Bayesian) formulation
of Gaussian Mixture Models.
"""
# Author: Ron Weiss <ronweiss@gmail.com>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Bertrand Thirion <bertrand.thirion@inria.fr>
import warnings
import numpy as... | marscher/bhmm | bhmm/_external/sklearn/mixture/gmm.py | Python | lgpl-3.0 | 27,500 | [
"Gaussian"
] | 06f78fe65ecc3f0ae7cd0d66c8daddff6f1b858f3bd9586e960707066c5cf4b7 |
#
# Original Version of Software by Brian M Wilcox
# Please visit http://brianmwilcox.com for documentation
#
#
# pysite_monitor (site_monitor.py) is a python site up time monitor.
# It is capable of alerting you through email and sms regarding the
# status of your website.
#
#
# Copyright 2014 Bria... | briwilcox/pysite_monitor | pysite_monitor.py | Python | gpl-3.0 | 7,391 | [
"Brian",
"VisIt"
] | 837794da25daed5628c6043bdf6f9180b11d478e1197728d29d81cc8e952b2d8 |
import os
import numpy as np
from ase.units import Bohr, Hartree
elk_parameters = {
'swidth': Hartree,
}
class ELK:
def __init__(self, dir='.', xc=None, kpts=None, tasks=[0], **kwargs):
for key, value in kwargs.items():
if key in elk_parameters:
kwargs[key] /= elk_par... | JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/calculators/elk.py | Python | gpl-2.0 | 15,278 | [
"ASE",
"Elk"
] | 754c9787902da11618e7ed6e6dc3e5d30c939ab42f0f13d476832b1e108619bc |
# coding: utf-8
from __future__ import unicode_literals, division, print_function
#!/usr/bin/env python
__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "mjvansetten@gmail.com"
__date__ = "Mar 24, 2014"
import unittest
from pymatgen.util.t... | yanikou19/pymatgen | pymatgen/io/gwwrapper/tests/test_scheduler_error_parser.py | Python | mit | 631 | [
"pymatgen"
] | b831f226237e729fcab09d1f90acffbb727e5c04813f3f9cd794ff3528121499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.