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 |
|---|---|---|---|---|---|---|---|
import numpy as np
import seaborn as sns
from matplotlib import patches
import matplotlib.pyplot as plt
from scipy.signal import gaussian
from scipy.spatial import distance
XY_CACHE = {}
STATIC_DIR = "_static"
plt.rcParams["savefig.dpi"] = 300
def poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, ... | mwaskom/seaborn | doc/tools/generate_logos.py | Python | bsd-3-clause | 6,982 | [
"Gaussian"
] | c946a559c2c6664353a9b1a4626136746554acd7b6eaf11d585e709af7b1adff |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | Chuban/moose | python/chigger/tests/exodus/blocks/all_boundary.py | Python | lgpl-2.1 | 1,539 | [
"MOOSE",
"VTK"
] | f953464104b41f8e9e3ae2dd78a65db31b2d4e5787937c8302f2388acdd6469a |
#!/usr/bin/env python
# Uses Brian's python cron code from
# http://stackoverflow.com/questions/373335/suggestions-for-a-cron-like-scheduler-in-python
from datetime import datetime
import math
import logging
import optparse
from subprocess import Popen
import sys
import time
import six
import re
def main():
pr... | zemiak/podcasts | src/main/bin/devcron.py | Python | gpl-2.0 | 8,222 | [
"Brian"
] | f9c8b613d783cf7bd07f449b0f82c7f560a9cdbc191ff9e2e90e3deb7cfe322d |
# pylint: disable=invalid-name
# pylint: disable=no-self-use
# pylint: disable=too-many-instance-attributes
# pylint: disable=redefined-variable-type
'''
manage network (for summaries)
'''
from __future__ import print_function
from __future__ import with_statement
import logging
from collections import OrderedDict
... | cstoeckert/iterativeWGCNA | iterativeWGCNA/network.py | Python | gpl-2.0 | 14,905 | [
"Cytoscape"
] | 6b7059162d2666186ce22b4bdb067fe6a9ae4b46f9b961a96f7b1f1bf61142f8 |
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2016-2019 Esteban Tovagliari, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaini... | appleseedhq/appleseed-maya | scripts/appleseedMaya/logger.py | Python | mit | 1,860 | [
"VisIt"
] | 8b7a1fea4c9a14121679e9cb301165823625988e6f3218190e0544c4b5853c91 |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | ProtractorNinja/qutebrowser | scripts/dev/pylint_checkers/config.py | Python | gpl-3.0 | 2,975 | [
"VisIt"
] | 957e793f8c9e4193db5a8ff4f0af21d7d4dbdb93013b5dd35e103c473eedec11 |
# $HeadURL$
__RCSID__ = "$Id$"
import GSI
requiredGSIVersion = "0.3.9"
if GSI.version.__version__ < requiredGSIVersion:
raise Exception( "pyGSI is not the latest version (installed %s required %s)" % ( GSI.version.__version__, requiredGSIVersion ) )
GSI.SSL.set_thread_safe()
nid = GSI.crypto.create_oid( "1.2.42.4... | Sbalbp/DIRAC | Core/Security/__init__.py | Python | gpl-3.0 | 780 | [
"DIRAC"
] | 82ddb9a2301e981e9b53d2659b2902518a8cb0d1c4d9ae423b1c739876707d59 |
"""
================================================
PipelineBamStats.py - Tasks for QC'ing Bam Files
================================================
:Author: Adam Cribbs
:Release: $Id$
:Date: |today|
:Tags: Python
Perfroming stats on a bam file is an important task in quality control
of `.bam` files. The majority o... | CGATOxford/CGATPipelines | CGATPipelines/PipelineBamStats.py | Python | mit | 45,509 | [
"pysam"
] | ac2b434d73608bc4d614a75f010b6bad79ad3e16acd37886c41e184b4eeb4588 |
#!/usr/bin/env python
"""
sids: Library to handle siesta and other dft programs in pure python.
"""
DOCLINES = __doc__.split("\n")
import sys, subprocess
import os, os.path as osp
CLASSIFIERS = """\
Development Status :: 4 - Beta
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI A... | zerothi/siesta-es | setup.py | Python | gpl-3.0 | 2,515 | [
"SIESTA"
] | e2774d0d646ec1418a84d9088981e3fe018c03451b16a4754a37057a867f3e07 |
"""
Star Wars: Dark Forces colormap functions.
A Dark Forces colormap maps colors to other colors in the palette
depending on the surrounding light value. It also contains a
gradient for the headlamp.
"""
from formats import pal
from util import imaging
# Some notes on the colormap.
# When mapping a color with a lig... | njankowski/dftools | formats/cmp.py | Python | isc | 150,730 | [
"VTK"
] | 6f5a85833a3f2378f5a17fb51e74b39a354447cfd75fc984939ea37cb8d2bf44 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 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 Software F... | tiagocardosos/stoq | stoqlib/lib/test/test_payment.py | Python | gpl-2.0 | 1,662 | [
"VisIt"
] | 5adfdf666939b657bcf12df040a61369697f8ca4977bd7282d6b926c26722c60 |
import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, json_output
@click.command('copy_from_dataset')
@click.argument("library_id", type=str)
@click.argument("dataset_id", type=str)
@click.option(
"--folder_id",
help="id of the folder where to place the u... | galaxy-iuc/parsec | parsec/commands/libraries/copy_from_dataset.py | Python | apache-2.0 | 785 | [
"Galaxy"
] | d3bf37747b922f590c567d15a00ba700a5a5311b7a71ec057150b5dbab867505 |
# -*- coding: utf-8 -*-
"""
Part of the astor library for Python AST manipulation.
License: 3-clause BSD
Copyright (c) 2008 Armin Ronacher
Copyright (c) 2012-2017 Patrick Maupin
Copyright (c) 2013-2017 Berker Peksag
This module converts an AST into Python source code.
Before being version-controlled as part of... | ryfeus/lambda-packs | Tensorflow_Pandas_Numpy/source3.6/astor/code_gen.py | Python | mit | 28,587 | [
"VisIt"
] | f58c9dbf93d99ea521b32178e4d78b183b60d309a1f439ee5c3b460592b8b426 |
"""
Views (in ``vtk``) for fibers and isotropic regions.
"""
import vtk
from matplotlib.colors import colorConverter
import numpy as np
major_version = vtk.vtkVersion.GetVTKMajorVersion()
class ViewFiber():
"""
A fiber is represented as a vtkPolyData, and attached to a vtk renderer.
"""
def __init__(s... | oesteban/phantomas | phantomas/visu/views.py | Python | bsd-3-clause | 6,798 | [
"VTK"
] | dd5b20fb7384ef03ff8986859d3032b05be2b6e75e44718a4e18dbae9ba6c1e0 |
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.contenttypes.models import Co... | timberline-secondary/hackerspace | src/djcytoscape/views.py | Python | gpl-3.0 | 6,827 | [
"Cytoscape"
] | 945cc7e583c3a9ab9dc42c9825ef5518efa5dfb4d2526f66a36bbe09bcb1cc10 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'moose_gui.ui'
#
# Created: Fri Feb 5 23:56:33 2010
# by: PyQt4 UI code generator 4.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_MainWindow(object):
def setupUi(self, MainWind... | BhallaLab/moose-thalamocortical | pymoose/gui/ui_mainwindow.py | Python | lgpl-2.1 | 20,050 | [
"MOOSE"
] | d96c7da9f38b4cf74b364743a502edba89a1659af5da4c8dfe4d74ccc4181c6f |
# -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import tempfile
import time
import re
import sys
from contextlib import contextmanager
from selenium.common.exceptions import NoSuchEle... | harish0507/GMapsScrapper | lib/splinter-0.7.2/splinter/driver/webdriver/__init__.py | Python | mit | 21,065 | [
"VisIt"
] | b640a467a2989ca444b5761944c341863beca28496e6b3999c72e5a03c1c21b1 |
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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... | Senseg/robotframework | src/robot/model/testsuite.py | Python | apache-2.0 | 3,455 | [
"VisIt"
] | b37b37ad1899695f41d011cff9fe691fda3fa2753cc5d07ff4a68ae2a3b48bf8 |
from uaperrors import StepError
import sys
import os
from logging import getLogger
from abstract_step import AbstractStep
logger = getLogger('uap_logger')
class BwaGenerateIndex(AbstractStep):
'''
This step generates the index database from sequences in the FASTA format.
Typical command line::
... | kmpf/uap | include/steps/bwa_generate_index.py | Python | gpl-3.0 | 2,652 | [
"BWA"
] | ae99c4604a13b242d246e778d006134a6d76459baa76346c059a1cedb0572537 |
"""
BLAST+7 format (:mod:`skbio.io.format.blast7`)
==============================================
.. currentmodule:: skbio.io.format.blast7
The BLAST+7 format (``blast+7``) stores the results of a BLAST [1]_ database
search. This format is produced by both BLAST+ output
format 7 and legacy BLAST output format 9. The ... | anderspitman/scikit-bio | skbio/io/format/blast7.py | Python | bsd-3-clause | 15,430 | [
"BLAST",
"scikit-bio"
] | b6bf5b5b2fa7bf89832ca89a1c3d234f87b12a56164a83c25c52e9b45a6be967 |
"""Simple test to check the VTK XML reader -- this is basically a copy
of test_contour.py with just the reader changed.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005-2008, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
from os.path import abspath
import copy
# Loca... | dmsurti/mayavi | integrationtests/mayavi/test_vtk_xml_reader.py | Python | bsd-3-clause | 1,014 | [
"Mayavi",
"VTK"
] | cae4b5967225d355ccc0fb30c952aa9b9184e01c15ec19268f5600602dc16f0a |
'''
Neuromuscular simulator in Python.
Copyright (C) 2017 Renato Naville Watanabe
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
any late... | rnwatanabe/projectPR | Interneuron.py | Python | gpl-3.0 | 7,714 | [
"NEURON"
] | 7d03fcc0533b450670572df0d2c05c3fa6ba19d19374af8ebec648fde6eece58 |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from collections import OrderedDict
from django.db import models
from apps.core.models import User, Group
from libs.mixins import NycModel
class AchievementDefinition(object):
... | maurizi/nyc-trees | src/nyc_trees/apps/users/models.py | Python | agpl-3.0 | 10,096 | [
"VisIt"
] | 3db7b8e30dbd7f7759f0a9d7608d5c372e84e2f416f51fea8b5c613fd45556cd |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
r"""
This module contains classes useful for analyzing ferroelectric candidates.
The Polarization class can recover the spontaneous polarization using
multiple calculations along a nonpolar to polar ferroelectr... | gVallverdu/pymatgen | pymatgen/analysis/ferroelectricity/polarization.py | Python | mit | 19,904 | [
"CRYSTAL",
"VASP",
"pymatgen"
] | 2dad85556855c9d55e27a1ae15729759aff8668a12624fdf13e13edfe115246c |
# load just the first few frames from a giant PDB-format trajectory
import mdtraj
def extract_first_frames(filename,num_desired_frames=1):
''' filename is an unwieldy large pdb file, containing a large number of
frames, separated by "ENDMDL."
Instead of loading the entire thing into memory, we just want ... | maxentile/msm-learn | scripts/read_pdb.py | Python | mit | 1,084 | [
"MDTraj"
] | 55fa81d057d112e67113a812ea1a25c07ecd59a716bc9ad2870bce270289e68e |
#!/usr/bin/env python
# File: add_hist_lines.py
# Created on: Mon Oct 22 14:56:24 2012
# Last Change: Mon Oct 22 15:36:16 2012
# Purpose of script: <+INSERT+>
# Author: Steven Boada
from hist_overlap import hist_overlap
from mk_galaxy_struc import mk_galaxy_struc
import numpy as np
# make some bins
start = 1.5
stop =... | boada/ICD | sandbox/legacy_plot_code/add_hist_lines.py | Python | mit | 1,084 | [
"Galaxy"
] | 3e3db074c0f6b5670f92d0776e11156320e3d03611c13717b780322b12ec26da |
import sys
sys.path.insert(1, "../../../")
import h2o, tests
def offsets_and_distributions():
# cars
cars = h2o.upload_file(h2o.locate("smalldata/junit/cars_20mpg.csv"))
cars = cars[cars["economy_20mpg"].isna() == 0]
cars["economy_20mpg"] = cars["economy_20mpg"].asfactor()
offset = h2o.H2OFrame(py... | brightchen/h2o-3 | h2o-py/tests/testdir_algos/deeplearning/pyunit_offsets_and_distributionsDeeplearning.py | Python | apache-2.0 | 1,662 | [
"Gaussian"
] | e051816458d467b8e15b4f6d27f0ce9f4ae60c85cbd3aa59c48d219807ad788f |
"""
This is the main module of the new ChemiReg API
It provides the webservices to add, search for and index CBHCompoundBatch objects
"""
from chembl_business_model.models.compounds import CompoundProperties, MoleculeDictionary
from cbh_chembl_model_extension.models import CBHCompoundBatch, generate_uox_id, index_new_... | thesgc/chembiohub_ws | cbh_chem_api/resources.py | Python | gpl-3.0 | 34,664 | [
"RDKit"
] | 575860beec384e514f0308a13f5b5e4abc576eaa7d60b7e89986a0b0e3b8cec3 |
# -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | kmike/scikit-learn | sklearn/naive_bayes.py | Python | bsd-3-clause | 15,010 | [
"Gaussian"
] | 26e912906be57d787aab80980982b02533c26395a6061e6a59cb20332bab0547 |
# Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or ... | hpfem/agros2d | resources/python/pylint/checkers/exceptions.py | Python | gpl-2.0 | 9,382 | [
"VisIt"
] | a4512d4e40a2f383a12a49ff86acf55b580bb812b06c4838d19a90efba6b0ad5 |
#!/bin/python
from numpy import *
#from pylab import *
import sys
import re
from optparse import OptionParser
import os
import gzip
from scipy.stats import gaussian_kde
#import matplotlib.pyplot as plt
from Bio.PDB.PDBParser import PDBParser
if __name__ == "__main__":
parser=OptionParser()
parser.add_option("-... | chris-lee-mc/MutInf | stress_sum_over_atoms_in_residues.py | Python | gpl-3.0 | 4,701 | [
"Biopython"
] | 583739b355e3f14ac00a1a3cda704a96e21a0c97276f526214f6ff26bf146cc7 |
#!/usr/bin/python
"""
Exp5_Bumpers -- RedBot Experiment 5
Now let's experiment with the whisker bumpers. These super-simple switches
let you detect a collision before it really happens- the whisker will
bump something before your robot crashes into it.
This sketch was written by SparkFun Electronics, with l... | Rosebotics/pymata-aio | examples/sparkfun_redbot/sparkfun_experiments/Exp5_Bumpers.py | Python | gpl-3.0 | 2,908 | [
"VisIt"
] | 927df146f0420169a560a00d5f8e7c3699e8f57be0fdc90aad59e44c36aba78c |
#!/usr/bin/python
#
# Copyright (C) 2015, Jaguar Land Rover
#
# This program is licensed under the terms and conditions of the
# Mozilla Public License, version 2.0. The full text of the
# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
#
#
# Register a service specified by command line with an RVI nod... | magnusfeuer/rvi_core | python/rvi_service.py | Python | mpl-2.0 | 3,035 | [
"Jaguar"
] | 20eb75c3a50bc4201a7189358e6f2b7e94aea3cc28a3409fc7092248c8c13600 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Test logfiles with core electron data in cclib"""
import os
import unittest
import numpy
from cclib.parser.utils imp... | gaursagar/cclib | test/data/testCore.py | Python | bsd-3-clause | 1,500 | [
"ADF",
"cclib"
] | a734c6c05477f33f6d383bd7f92d6bbf2f4510b6973adcd12e825dbf77313c63 |
# -*- coding: utf-8 -*-
import logging
import os
import json
import urllib2
import csv
import chardet
import StringIO
from django.conf import settings
from django.core.paginator import EmptyPage, InvalidPage
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.http import HttpRe... | saukrIppl/seahub | seahub/group/views.py | Python | apache-2.0 | 23,180 | [
"VisIt"
] | d32dd28da6ec4e4a544db9452e26875e3099291e2d53fb27136035d65606c209 |
#!/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/signal.py | Python | gpl-2.0 | 5,494 | [
"VisIt"
] | ea6760c04095aaf46ab0dc941d189f4795ea012ebc3e48320047cd2a5b9286a5 |
#!/usr/bin/env python
##############################################################################
#
# diffpy.pyfullprof by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 Trustees of the Columbia University
# in the City of New York. All rights reserve... | xpclove/autofp | diffpy/pyfullprof/pcrfilewriter.py | Python | gpl-3.0 | 114,235 | [
"CRYSTAL"
] | 543a76f914476a8c90572b6a5c9146e6df87d5c7966a9aaf31f16bb3bf0de410 |
import csv
import tkSimpleDialog
import webbrowser
from Tkinter import *
import ttk
import pandas as pd
import os
import collections
import subprocess
import tkFileDialog, tkMessageBox
import json
import requests
from camera_handler import API_Camera_Handler
from hp_data import exts
import data_files
"""
Contains clas... | rwgdrummer/maskgen | hp_tool/hp/CameraForm.py | Python | bsd-3-clause | 33,662 | [
"Galaxy"
] | c4409236e546e182ba969fd3dc2fad4129dfa690b7a93a7c182d542122b39af3 |
# 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)
from spack import *
class Grads(AutotoolsPackage):
"""The Grid Analysis and Display System (GrADS) is an interactive... | LLNL/spack | var/spack/repos/builtin/packages/grads/package.py | Python | lgpl-2.1 | 2,412 | [
"NetCDF"
] | 06807696a2b65d2421e8d59a079824321d101f37c5f94e74a5366456c3bf566e |
# -*- coding: utf-8 -*-
# @Author: Zachary Priddy
# @Date: 2016-04-26 23:06:59
# @Last Modified by: Zachary Priddy
# @Last Modified time: 2016-10-22 18:29:10
import logging
from core.models.app import App
from core.models.command import Command as ffCommand
class App(App):
METADATA = {
'title' : 'Firefl... | zpriddy/Firefly | Firefly/apps/ffAdvancedLighting/switch.py | Python | apache-2.0 | 6,083 | [
"Firefly"
] | 47a5c47dd1fc3575e090a97a3d3159e8247272a7ba9313dd1f7b6498b1dd8b62 |
#!/usr/bin/env python
#
# Copyright (c) 2012 OpenDNS, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this... | job/pdns | regression-tests.recursor-dnssec/clientsubnetoption.py | Python | gpl-2.0 | 11,556 | [
"Brian"
] | 13b5aea84311e589cac1c73aa854a6bde7f0762373c0e3a4a871e7664a0fa9b6 |
"""The basic dict based notebook format.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed a... | sserrot/champion_relationships | venv/Lib/site-packages/nbformat/v1/nbbase.py | Python | mit | 1,867 | [
"Brian"
] | 32fc8c6202d5516f26ad8a1b7d4e119df7b5c67d2c2f18db41e00eb1b698cc89 |
"""
Srivatsan Ramanujam, Nov-2007
Implementation of Particle Filtering algorithm
for Simultaneous Localization and Mapping (SLAM)
in Autonomous Robots.
"""
import os,sys
from math import sqrt,sin,cos,atan,atan2,fabs,pi
import thread,time
from Tkinter import Canvas,Tk,NW
from PIL import Image,ImageTk
import numpy
Gr... | vatsan/slam | scripts/slam.py | Python | apache-2.0 | 28,262 | [
"Gaussian"
] | 1ad85865818d5fc2511a79a3a35b5d061d85351de5ffeb8522aa56779b5b7976 |
"""
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permission to us... | bgoli/pysces | pysces/kraken/controllers/kraken_intersect.py | Python | bsd-3-clause | 3,304 | [
"PySCeS"
] | 9b6da1f30454a254aee9d337240a95e2b2336c4bc803a54a805a31f3d4c0e3df |
"""
Fundamental Physical Constants
==============================
Defines various constants from recommended values by the Committee on Data for
Science and Technology (CODATA).
"""
from colour.utilities.documentation import (
DocstringFloat,
is_documentation_building,
)
__author__ = "Colour Developers"
__co... | colour-science/colour | colour/constants/codata.py | Python | bsd-3-clause | 1,527 | [
"Avogadro"
] | b614fd00e33d56c69d663f1371678d4ae99e1a1d3cded3ba79c8267d56d19cba |
# Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
import sys
import timeit
from . import sigtools, dlti
from ._upfirdn import upfirdn, _output_len
from scipy._lib.six import callable
from scipy._lib._version import NumpyVersion
... | jakevdp/scipy | scipy/signal/signaltools.py | Python | bsd-3-clause | 115,724 | [
"Gaussian"
] | ba177d5fe433149a8485237b5eb6a98d264d3ee404a90d3eaa05bc2de84dc878 |
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | da2ce7/cjdns | node_build/dependencies/libuv/build/gyp/pylib/gyp/common.py | Python | gpl-3.0 | 19,668 | [
"VisIt"
] | d7386f71305a868142d13f2889c363bbdc48d87e1b4159b8b11be5ddaddb1149 |
"""Mayavi stuff."""
# http://docs.enthought.com/mayavi/mayavi/auto/example_mri.html
import logging
import numpy as np
from mayavi import mlab
import dwi.files
import dwi.image
import dwi.util
from dwi.files import Path
def transform_axes(pmap):
axes = (0, 2, 1)
pmap = np.transpose(pmap, axes=axes)
# s... | jupito/dwilib | dwi/mayavi.py | Python | mit | 2,260 | [
"Mayavi"
] | f70ac69dbf9b11cd20354cdbfec0d6b2728d097a58d44a9180c5c989029fbbce |
from ConfigParser import ConfigParser
from twx.utils import ymdL, mkdir_p
import numpy as np
import os
import pandas as pd
class TwxConfig():
'''Class to load and access TopoWx configuration settings in a INI file.
Upon initialization, also creates necessary sub-directories in the TopoWx
data root dir... | jaredwo/topowx | twx/utils/config.py | Python | gpl-3.0 | 10,923 | [
"NetCDF"
] | a21b9b9b08b0b774c9340b2f468d914b0ca7746ddcf3fadc3025b0575919346c |
# ======================================================================
# USER-GFMD - Elastic half-space methods for LAMMPS
# https://github.com/Atomistica/user-gfmd
#
# Copyright (2011-2016,2021)
# Lars Pastewka <lars.pastewka@imtek.uni-freiburg>,
# Tristan A. Sharp and others.
# See the AUTHORS file in the top... | Atomistica/user-gfmd | tests/_DISABLED_TEST_stiffness_fcc100/rotspec.py | Python | gpl-2.0 | 1,571 | [
"LAMMPS"
] | fe7c4abbf59f2d2996a28104033ad48c03ad49ec1aaf2d261efa6688d6f19071 |
from django.core.management import call_command
from django.test import TestCase
from django.test.client import Client
from django.utils.six import StringIO
from guardian.shortcuts import assign_perm
from catmaid.models import Class, ClassInstance, Project, User, Treenode
class PruneSkeletonsTest(TestCase):
"""
... | catsop/CATMAID | django/applications/catmaid/tests/command_tests.py | Python | gpl-3.0 | 2,738 | [
"NEURON"
] | 77d2ea671680514f87c2aa60620169b656d732e37f911e4ffc5797e5a0370d47 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# 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 Licens... | Russell-IO/ansible | lib/ansible/modules/network/cnos/cnos_reload.py | Python | gpl-3.0 | 5,193 | [
"VisIt"
] | 429463d1d4ade8a55abd44076f7fe9d51230b77421321ac13323e6ff452c1a95 |
"Base class for simulation windows"
import gtk
from ase.gui.widgets import oops, pack, help
from ase import Atoms
class Simulation(gtk.Window):
def __init__(self, gui):
gtk.Window.__init__(self)
self.gui = gui
def packtext(self, vbox, text, label=None):
"Pack an text frame into the wi... | slabanja/ase | ase/gui/simulation.py | Python | gpl-2.0 | 5,168 | [
"ASE"
] | fc2cc34275093b3fa1a0dc48ec7e8a109b5150fa56f5a6218a32058002d17c50 |
# Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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... | klmitch/jenkins-job-builder | jenkins_jobs/modules/scm.py | Python | apache-2.0 | 55,141 | [
"Octopus"
] | 14d5022e2fbcd9a539f94490b18bb5b82f12677797fd8dc5bee0d4a504f6708a |
#===============================================================================
# Copyright (c) 2012-2015, GPy authors (see AUTHORS.txt).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Red... | befelix/GPy | GPy/plotting/gpy_plot/plot_util.py | Python | bsd-3-clause | 15,308 | [
"Gaussian"
] | bfd076babc2ef50b8c7b7edb2ad118b07a572c8475f43fea3d712f0bc2dd5707 |
import sys
import numpy as np
from PyQt5.QtCore import pyqtSignal, QObject
from matplotlib.lines import Line2D
import matplotlib.transforms as transforms
from matplotlib.patches import Rectangle, Polygon
from matplotlib.artist import Artist
def dist_point_to_segment(p, s0, s1):
"""
Get the distance of a point... | darioflute/sospex | sospex/interactors.py | Python | gpl-3.0 | 60,572 | [
"Gaussian"
] | 2c8d17b6edd818f2af4ef799d7cd90097291b161c2828ef4deafcd7d7df39152 |
#! /bin/python
'''
USAGE
call using: python <filepath to mesh_terminal>/mesh_terminal [commands] <DomainFile> <IdFile> <MeshmetricFile>
'''
import sys
import shlex
from scripts import define_id, export_geo
from scripts.MeshOperations import MeshOp
from scripts.PosFileConverter import *
import os
from scripts.flat_mes... | janhui/test_engine | dev/plugins/mesh_netcdf/modular_meshing.py | Python | lgpl-2.1 | 8,809 | [
"NetCDF"
] | 25148133f996ebcb3291c6ef0b41a9333fd6642cb6641676359a22e6dece7166 |
#!/usr/bin/env python
#from sumatra.projects import load_project
#from sumatra.parameters import build_parameters
#from sumatra.decorators import capture
from ruffus import *
import sys
import os
import time
import datetime
import drmaa
from omics_pipe.utils import *
from omics_pipe.modules.fastqc import fastqc
from... | adammaikai/OmicsPipe2.0 | tests/custom_TCGA_counts2.py | Python | mit | 3,124 | [
"HTSeq"
] | fa182bbf42a0e5c49ab14bc374405c71deca3c90264b3019fb1db8040e7ac0c0 |
"""
Lemur
=====
Is a TLS management and orchestration tool.
:copyright: (c) 2018 by Netflix, see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
from __future__ import absolute_import
import datetime
import json
import logging
import os.path
import sys
from subprocess import check_output
from s... | Netflix/lemur | setup.py | Python | apache-2.0 | 6,884 | [
"GULP"
] | a8688762b710028599ea85ec880458e3ef399b3d96d878162328e721f9e5b5b1 |
# Copyright (C) 2012,2013,2015
# 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... | kkreis/espressopp | src/FixedTupleList.py | Python | gpl-3.0 | 1,980 | [
"ESPResSo"
] | eaf21ac3cbecff8c194803a08a4ee85929d300d499a3886aea19ceb0c4b9ce6a |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | KaiSzuttor/espresso | testsuite/python/hat.py | Python | gpl-3.0 | 2,056 | [
"ESPResSo"
] | fb1b4c6df2e5e97a692e9bb50c38ad8d7293b738122fa4a69f57663669322ef5 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
TODO: Modify module doc.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "... | migueldiascosta/pymatgen | pymatgen/io/tests/test_nwchem.py | Python | mit | 13,066 | [
"NWChem",
"pymatgen"
] | 6e22861e56ceaf32f6f04995ac4025164154e9b4c553b36892bfc0c2276a2d3f |
'''
Created on 2013-09-23
A script to reproject and resample datasets in this package onto a given grid.
@author: Andre R. Erler, GPL v3
'''
# external imports
import os # check if files are present
import numpy as np
from importlib import import_module
from datetime import datetime
import logging
# internal im... | aerler/GeoPy | src/processing/regrid.py | Python | gpl-3.0 | 24,422 | [
"Brian",
"NetCDF"
] | 50d1f8bb9eb2ce97be1cf4fd5722e5958dd955a378b31752f3c2fac49374d4b4 |
# =====================================================================
# HPClusterJobConfigurator
# Copyright (C) 2014 by Gabriel Nützi <gnuetzi (at) gmail (dot) com>
#
# 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
# fil... | gabyx/HPCJobConfigurator | HPCJobConfigurator/jobGenerators/jobGeneratorMPI/generatorToolPipeline/scripts/civPipeline/accivImageProcessing.py | Python | mpl-2.0 | 15,217 | [
"Gaussian"
] | 9fdf9d927241891c2e609d17e1be7ffa11026fae4853d1ab3a651299e0895011 |
#!/usr/bin/env python
"""
This code is based on the VTK file: Examples/Modelling/Tcl/DelMesh.py.
This example demonstrates how to use 2D Delaunay triangulation.
We create a fancy image of a 2D Delaunay triangulation. Points are
randomly generated.
"""
import vtk
def main():
colors = vtk.vtkNamedColors()
... | lorensen/VTKExamples | src/Python/Modelling/DelaunayMesh.py | Python | apache-2.0 | 3,344 | [
"VTK"
] | adcd20fe974e74e60e62a34174c093bca63933607174953928845d4eba459938 |
import json
import ast
import astor
class Variable(object):
def __init__(self, name, original_name=None):
self.name = name
self.original_name = original_name
self.in_nodes = []
self.out_nodes = []
self.lines = []
def to_dict(self):
return {
"name": s... | nanchenchen/script-analysis | pyanalysis/apps/enhance/analyses.py | Python | mit | 9,706 | [
"VisIt"
] | ebea0168690b88477a50759ec659829eb93a8e99356080f34fb7a4f1133e0593 |
#!/usr/bin/env python
################################################################################
#
# Copyright (c) 2012, Alexander Todorov <atodorov@nospam.dif.io>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ... | difio/difio | cpan.py | Python | apache-2.0 | 10,171 | [
"MOOSE"
] | 50d82eab9e32dfc6f36a5d73f131206827528ddc6debab030e760b9563850f14 |
#!/usr/bin/python
import urllib2
import sys
import cv2.cv as cv
import numpy
# SRGB-linear conversions using NumPy - see http://en.wikipedia.org/wiki/SRGB
def srgb2lin(x):
a = 0.055
return numpy.where(x <= 0.04045,
x * (1.0 / 12.92),
numpy.power((x + a) * (1.0 / (... | petterreinholdtsen/cinelerra-hv | thirdparty/OpenCV-2.3.1/samples/python/numpy_array.py | Python | gpl-2.0 | 2,096 | [
"Gaussian"
] | 84a23a4964e88141d5e1a7d28bc0e6aca5514799f1aa5dd52c66e79435f2f026 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | sandbox_tapo/src/skin_related/BMED_8813_HAP/Features/single_feature/best_kNN_PC/cross_validate_objects_kNN_PC_BMED_8813_HAP_scaled_method_II_area.py | Python | mit | 4,366 | [
"Mayavi"
] | 249785e93fb8e2d04821f17e5e5cc2edfd1f9a190009c4b1a219c2e501c7bb49 |
"""
Views related to the Custom Courses feature.
"""
import csv
import datetime
import functools
import json
import logging
import pytz
from contextlib import contextmanager
from copy import deepcopy
from cStringIO import StringIO
from django.core.urlresolvers import reverse
from django.http import (
HttpResponse... | adoosii/edx-platform | lms/djangoapps/ccx/views.py | Python | agpl-3.0 | 21,044 | [
"VisIt"
] | 998aa87d2e241cbea204193b431eccc7b1e2d3bd2150494c60c390d3650c8528 |
#!/usr/bin/env python
"""
Martin Kircher
Stripped down from paleomix
"""
import sys
import pysam
from argparse import ArgumentParser
def calc_consensus(reads):
count = len(reads)
outread = None
maxsumqual = 0
for read in reads:
nsum = sum(map(ord, read.qual))
if nsum > maxsumqual:
... | smilefreak/ancient_dna_pipeline | python_scripts/filterUniqueBam.py | Python | mit | 4,292 | [
"pysam"
] | 14129af5a394a4ec5054b68c7b3a0a095b63b081e17caa28fc522ac71e30ca25 |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','description','copyright','license','co... | sideshowcoder/jpgcompressor | build.py | Python | bsd-2-clause | 5,876 | [
"VisIt"
] | c3cdcddb272caffa132c4b22f8f13a70195d6f262e37ea83803c734c46e5c506 |
#===============================================================================
# PyTyle - A manual tiling manager
# Copyright (C) 2009 Andrew Gallant <andrew@pytyle.com>
#
# 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
# t... | BurntSushi/pytyle1 | PyTyle/Screen.py | Python | gpl-3.0 | 11,134 | [
"TINKER"
] | 3a94f28971972c92b179c62756adc0b65554f99e0bb9a75f08b9403c277e5b13 |
import math
import pulp
import re
import random
import numpy as np
import statistics as stat
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
#from datetime import datetime
class PersTour:
"""Reproduce the IJCAI'15 paper"""
def __init__(self, dirname, fname, fpoi=None, writeFile=True):... | alasdairtran/digbeta | tour/src/ijcai15.py | Python | gpl-3.0 | 45,688 | [
"VisIt"
] | b7f55926dcb5325565d44fa4dc4171f418cde9ed9acfc270e94fb8fd66df9d90 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Brian Hicks'
__email__ = 'brian@brianthicks.com'
__version__ = '0.0.1' | BrianHicks/perch | perch/__init__.py | Python | bsd-3-clause | 131 | [
"Brian"
] | 73b6f31dab28a8177628bd66ae1274312b8fab69d92c1081fccdc2b1c1ff3b83 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#################################################################################
# LAYMAN CONFIGURATION
#################################################################################
# File: argsparser.py
#
# Handles layman command line interface configura... | jmesmon/layman | layman/argsparser.py | Python | gpl-2.0 | 14,518 | [
"Brian"
] | 80efdad3e7f749b1c06526856d07fe5fd83538424e4cd70f289111d2dfd6fb7a |
from mango import mpi
from mango.core import mtype
import mango.core
import sys
if sys.platform.startswith('linux'):
import DLFCN as dl
_flags = sys.getdlopenflags()
sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
from . import _mango_open_io as _mango_open_io_so
sys.setdlopenflags(_flags)
else:
... | pymango/pymango | misc/python/mango/io/_ddsio.py | Python | bsd-2-clause | 6,902 | [
"NetCDF"
] | 52f34b0fb70b49cea61c242c4828d43f872b7bf757319d29d02c15fac73d6cce |
# Orca
#
# Copyright 2004-2009 Sun Microsystems Inc.
#
# 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... | h4ck3rm1k3/orca-sonar | src/orca/script.py | Python | lgpl-2.1 | 25,142 | [
"ORCA"
] | e92e2c7819351a953e0b7877087df170b212b593f8f3ef669d671ab34c3f5ba3 |
#!/usr/bin/env python2
"""
USAGE: fix_nonstandard_chars.py < input.fasta > output.fasta
This script is designed to replace all bases not in {ACTG} in a fasta
file with a semi-random base within {ATCG}. This is necessary for
bowtie, which will not map reads to bases with non-standard chars.
From the bowtie manual
(htt... | epruesse/EMIRGE | utils/fix_nonstandard_chars.py | Python | gpl-3.0 | 2,391 | [
"Bowtie"
] | 8a96bb874c58c57aa8eed954ebfdcfce2f351ef68e702be2b1cae1946add306f |
import argparse
from joblib import Parallel, delayed
import pybedtools
import pysam
def get_path_for_interval(interval, bam_name):
bam = pysam.AlignmentFile(bam_name, "rb")
reads = [read for read in bam.fetch(interval.chrom, interval.start, interval.end)]
query = interval.name
query_read = None
f... | EichlerLab/pacbio_variant_caller | scripts/tiling_path_in_reference_to_contigs.py | Python | mit | 1,779 | [
"pysam"
] | b50c523bfbdcad7b114bfd65e185a88263bf1e821a0e984c2fe6715e95a529f1 |
# 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... | Karaage-Cluster/karaage | karaage/plugins/kgsoftware/tests/fixtures.py | Python | gpl-3.0 | 1,285 | [
"Brian"
] | 42c9dcf1333860f4c114cfa9562dcf15384ee04acdc500497fc550c3f1a54bd7 |
"""
This module defines export functions for decision trees.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Dawe <noel@dawe.me>
# Satrajit Gosh <satrajit.ghosh@gmail.com>
# Trevor... | manhhomienbienthuy/scikit-learn | sklearn/tree/_export.py | Python | bsd-3-clause | 36,169 | [
"Brian"
] | 509591a6ef4ecef2028f625933c4887c4944d5b2f41d7838ecade86f1f97b468 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gaussFit.py
#
# Copyright 2014 Carlos "casep" Sepulveda <casep@alumnos.inf.utfsm.cl>
#
# 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; ... | creyesp/RF_Estimation | Clustering/helpers/gaussFitSTA/gaussFit.py | Python | gpl-2.0 | 2,992 | [
"Gaussian"
] | 8bbdb8df8dad45c5085a165cc78050d3badfa10dfa8b50bdaeb4b3f8080e59eb |
import numpy as np
import pandas as pd
class Convert(object):
def __init__(self):
protein_info = pd.DataFrame.from_csv('../data/ecoli_genome_info.tsv', sep='\t')
self.g_mol = protein_info['molecular_weight[Da]']
def copies_fL_to_mmol_gCDW(self,copies_fL):
rho = 1100 # avera... | dandanvidi/capacity-usage | scripts/unit_conversion.py | Python | mit | 1,166 | [
"Avogadro"
] | 99640ef1b91681c70dcef9ab9f07e590e0ee6ba1e8a98590469a04023e54a63b |
import numpy as np
import time
import scipy.stats as stats
from learning_objective.hidden_function import evaluate, true_evaluate, get_settings
import pyGPs
def contains_row(x, X):
""" Checks if the row x is contained in matrix X
"""
for i in range(X.shape[0]):
if all(X[i,:] == x):
retu... | RuiShu/Neural-Net-Bayesian-Optimization | sequential/seq_gaussian_process.py | Python | mit | 3,152 | [
"Gaussian"
] | 697d6c0e4aa49c20030a5d2eb4a5334b02fcc5a7c48fc768514db755408ed0f5 |
""" CAUpdateAgent is meant to be used in a multi-server installations
where one server has some machinery of keeping up to date the CA's data
and other servers are just synchronized with the master one without "official" CA installations locally.
It's like installing CAs in the pilot in dirac-install but f... | Andrew-McNab-UK/DIRAC | FrameworkSystem/Agent/CAUpdateAgent.py | Python | gpl-3.0 | 1,364 | [
"DIRAC"
] | 83f8f6753e023ddc8de29af78a58c2d6810ac0194d81ef51e691520ab479ef6b |
#!/usr/bin/env python
"""
"""
import vtk
def main():
colors = vtk.vtkNamedColors()
fileName1, fileName2 = get_program_parameters()
# This example shows how to use decimation to reduce a polygonal mesh. We also
# use mesh smoothing and generate surface normals to give a pleasing result.
#
... | lorensen/VTKExamples | src/Python/VisualizationAlgorithms/DecimateFran.py | Python | apache-2.0 | 3,787 | [
"VTK"
] | 2c4387e6e203aede0ae931214b5a945207345ffbad84527f39ceda2dedb558ea |
#!/usr/bin/python
import os
import sys
import cPickle
import argparse
import traceback
from urlparse import urlparse
from collections import defaultdict
H2 = 'h2'
H1 = 'http/1.1'
SPDY = 'spdy'
PROTOCOLS = { H2, H1, SPDY }
class Fetch(object):
def __init__(self, url, request_time, new_connection, push, size, iden... | scoky/node-http2 | example/phase3_reader.py | Python | mit | 5,719 | [
"VisIt"
] | 34775a8250898f0c02d4f979b48fe3b67ab27ff376fbb8fb686e54d6c1ed9ed3 |
from math import pi, cos, sin, sqrt, acos
import numpy as np
from ase.atoms import Atoms
from ase.parallel import paropen
def read_cc1(fileobj, index=-1):
"""Read Chem3D(CC1) format"""
if isinstance(fileobj, str):
fileobj = open(fileobj)
lines = fileobj.readlines()
L1 = lines[0].split()
... | qsnake/gpaw | gpaw/io/cc1.py | Python | gpl-3.0 | 756 | [
"ASE"
] | a66036c921ee993adbd2fcea356669fdca2cc54d8a02451969b94b2e6d56d214 |
#! /usr/bin/env python
#
# Copyright (C) 2015-2016 Rich Lewis <rl403@cam.ac.uk>
# License: 3-clause BSD
"""
## skchem.core.base
Define base classes for scikit chem objects
"""
from abc import ABCMeta, abstractmethod
import warnings
import numpy as np
import pandas as pd
class ChemicalObject(object):
""" A mix... | richlewis42/scikit-chem | skchem/core/base.py | Python | bsd-3-clause | 8,352 | [
"RDKit"
] | 21cc74a40838bca7ba7e07eba569111694078ddd052192362c5d656007278281 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
... | fernandezcuesta/ansible | lib/ansible/modules/net_tools/ipify_facts.py | Python | gpl-3.0 | 2,944 | [
"VisIt"
] | 6ae9220c8df906dc584c53556a5d440ad334770c095d9859b9f4c881e55eafff |
################################################################################
# Copyright (C) 2012-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
This module contains VMP nodes for Gaussian Markov chains.
""... | SalemAmeen/bayespy | bayespy/inference/vmp/nodes/gaussian_markov_chain.py | Python | mit | 69,403 | [
"Gaussian"
] | 939008ea89ce105a782a15ad6a69e7bfad8a0e9af7f428638c7fc9b46519b45b |
import pytest, py
from _pytest.main import Session, EXIT_NOTESTSCOLLECTED
class TestCollector:
def test_collect_versus_item(self):
from pytest import Collector, Item
assert not issubclass(Collector, Item)
assert not issubclass(Item, Collector)
def test_compat_attributes(self, testdir,... | jaraco/pytest | testing/test_collection.py | Python | mit | 26,378 | [
"VisIt"
] | 969760595ede66b7faae17b7efaae532a86f9506c039dad20e81ed58b5bf1e9d |
# Copyright 2006 by Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.SeqIO support for the "swiss" (aka SwissProt/UniProt) file format.
You are expected to ... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/SeqIO/SwissIO.py | Python | apache-2.0 | 1,150 | [
"BioPerl",
"Biopython"
] | 93ff9f30989f5295009de27844bcf874b327882c4779edc95b9475f6fdaa227e |
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2017, 2018, 2019, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "So... | CalebBell/thermo | thermo/joback.py | Python | mit | 41,459 | [
"RDKit"
] | bb4f90ff8312908a5a736bd2ea352a0f23f11cf10c6011df4b0d3ac6ef386cf7 |
# -*- coding: utf-8 -*-
"""
Acceptance tests for Video.
"""
import os
from mock import patch
from nose.plugins.attrib import attr
from unittest import skipIf, skip
from ..helpers import UniqueCourseTest, is_youtube_available, YouTubeStubConfig
from ...pages.lms.video.video import VideoPage
from ...pages.lms.tab_nav i... | Edraak/edx-platform | common/test/acceptance/tests/video/test_video_module.py | Python | agpl-3.0 | 45,283 | [
"VisIt"
] | 35428022403b0e04c19f72d42eb12dd14124dfb6e16d38c94e58a3677b3d41d7 |
#
# 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
n = 4000
numLambdas = 5
startLambda = 1... | justusc/Elemental | examples/interface/TV.py | Python | bsd-3-clause | 1,737 | [
"Gaussian"
] | fba1ed58b3e8b6e06e7bbb2fc2373d5bfccf50db1caaa7f643239a37de9810e0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rdkit
from rdkit.Chem import AllChem
from rdkit import DataStructs
__license__ = "X11"
METADATA = {
"id": "method_rdkit_fcfc6_tanimoto",
"representation": "fcfc6",
"similarity": "tanimoto"
}
def _compute_fingerprint(molecule):
return AllChem.GetM... | skodapetr/lbvs-environment | methods/fcfc/fcfc6_tanimoto.py | Python | mit | 1,383 | [
"RDKit"
] | c1a297b4ac1a2148be7cc6a732b083486411e06456cfb3e149cf11ba3dfee307 |
# -*- coding: utf-8 -*-
# Tested on Markdown 2.3.1
#
# Copyright (c) 2014, Esteban Castro Borsani
# Copyright (c) 2014, Jesús Espino García
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to... | taigaio/taiga-back | taiga/mdrender/extensions/emojify.py | Python | agpl-3.0 | 14,149 | [
"Bowtie",
"Octopus"
] | a4972f146f604e6944ca4dfcc318726579979d404516147da14de00144458c70 |
""" Evaluates various methods for automatic optimization of time-delay embedding parameters. """
import sys
sys.path.append('..')
import numpy as np
import matplotlib.pylab as plt
from collections import Counter
import argparse
from sklearn.gaussian_process import GaussianProcess
from maxdiv import maxdiv, maxdiv_... | cvjena/libmaxdiv | experiments/optimize_td_embedding.py | Python | lgpl-3.0 | 13,895 | [
"Gaussian"
] | 9cd8eb5d7dfdb980f6113b3861e1635484abe5404ac2bd29f98f0220e8eab61c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.