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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
from subprocess import check_call, STDOUT
from tempfile import NamedTemporaryFile
import Bio, get_pdb_fold, get_tAI, csands_folds_reader, os, sys, random, itertools, re, scipy, math
###################################... | Alicimo/codon_optimality_code | legacy_code/latest_version/analysis_folds_conservation_bar_assign_possible.py | Python | gpl-2.0 | 11,739 | [
"CRYSTAL"
] | 65480c8a72470bada7864e8a1a97aa3d02d462eb4b85d7d7f8e5ddd458e3606d |
""" DIRAC FileCatalog base class for mix-in classes to manage users and groups
"""
import time
import threading
from DIRAC import S_OK, S_ERROR, gConfig, gLogger
from DIRAC.Core.Security import Properties
class UserAndGroupManagerBase(object):
def _refreshGroups(self):
"""Refresh the group cache"""
... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/UserGroupManager/UserAndGroupManagerBase.py | Python | gpl-3.0 | 959 | [
"DIRAC"
] | abfc0dcc1171739730297993434df18d05915673b23b335599ba875254c5de8a |
# BEGIN_COPYRIGHT
# END_COPYRIGHT
# pylint: disable=W0105, C0103
"""
..
Running Galaxy workflows
=========================
Run a workflow on a biobank object
----------------------------------
In this example we will run a simple galaxy workflow on biobank data
and save the results back in biobank.
FIXME Det... | crs4/omero.biobank | test/galaxy/OME_demo.py | Python | gpl-2.0 | 10,311 | [
"Galaxy"
] | 83be89b136d3562b9785788a445574157f008f35a0b5640c7c70c25f9153d3f1 |
__author__ = 'Jwely'
# general imports
import cPickle
import os
import math
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import matplotlib.ticker as mtick
# package imports
from shorthand_to_tex import shorthand_to_tex
from py.piv.MeanVecFieldCartesian import MeanVecFieldCa... | Jwely/pivpr | py/piv/AxialVortex.py | Python | mit | 62,472 | [
"Gaussian"
] | 46d074551b6d4172978f03c62797244bb0e24d63fa71d879ea503b091922138f |
__author__ = 'dalton'
import world
from player import Player
visited = []
def play():
world.load_tiles()
player = Player()
room = world.tile_exists(player.location_x, player.location_y)
print(room.intro_text())
while player.is_alive() and not player.victory:
room = world.tile_exists(playe... | dalrrard/text-adventure-tut | adventuretutorial/game.py | Python | mit | 1,129 | [
"Dalton"
] | 9e71095dbb36614dd3e68acd4e26f2bc45a51353bb9f04ac32de3ea3f1f5db8d |
# -*- coding: utf-8 -*-
"""The app module, containing the app factory function."""
from flask import Flask, render_template, Markup
from . import public, admin
from .extensions import *
from .config import Config
#extensions
def getPackage(num):
packages = {
"0": "No Package",
"1": "Basic Package"... | rileymjohnson/fbla | app/main.py | Python | mit | 3,324 | [
"BLAST"
] | 8b13266fc3db1f68a9940a3923611cb75424bc7955f317f93d0d1800d68393a6 |
# Version: 0.15+dev
"""
HEADS UP!
=========
You are looking at a heavily modified version of the original
[Versioneer](https://github.com/warner/python-versioneer), customized
to fit the development of [OctoPrint](https://github.com/foosel/OctoPrint).
This version adds
* support for inclusion of the current bran... | beeverycreative/BEEweb | versioneer.py | Python | agpl-3.0 | 80,421 | [
"Brian"
] | b5405e7c41e047a1e24b904476a20a3544c73582f85df20e5f3d3e5104afabf8 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lothian/psi4 | psi4/__init__.py | Python | lgpl-3.0 | 3,965 | [
"Psi4"
] | 0759ad3a91ec0058a4836a60ee7d13721c0a5afed134f3d5c621ce133c17af32 |
import numpy as np
import multiprocessing as mp
from lmfit import Parameters, minimize
def biweight(data, axis=None):
"""Biweight estimation of location and scale according to
Understanding Robust and Exploratory Data Analysis, Hoaghley, Mosteller, & Tukey,
formula 4. Tuning constant as at page 417. Locat... | darioflute/sospex | sospex/moments.py | Python | gpl-3.0 | 25,978 | [
"Gaussian"
] | 2b3d0ba3937fb7cb8d6168bb33b0e479c12838467823d3cc85a7fb5caf08c7e6 |
## \package GOProteinGraph
# A graph that extends a GOGraph that will contain all of the gene products
# as vertices in a graph. Since "distance" and "weight" are basically
# meaningless for the edges between terms and proteins, this graph will
# only a accept an unweighted, undirected GOGraph.
# \author Brian Muller ... | aswarren/GOGranny | GOGranny/GOProteinGraph.py | Python | gpl-2.0 | 3,301 | [
"Brian"
] | e7cc71d7ca963020987cc0b7a291a0891f88f6eba75ee0e3584fed14f9430c2a |
from __future__ import unicode_literals, division, absolute_import
from datetime import timedelta, datetime
from flexget.manager import Session
from flexget.plugins.api_tvmaze import APITVMaze, TVMazeLookup, TVMazeSeries
from tests import FlexGetBase, use_vcr
lookup_series = APITVMaze.series_lookup
class TestTVMaz... | lildadou/Flexget | tests/test_tvmaze.py | Python | mit | 18,561 | [
"Firefly"
] | 35ebfdc7fc2a347263ef9b61195332a1e7471f350e94e0326b490894afb2c65a |
#!/usr/bin/env python
# encoding: utf-8
"""
test_general.py
Created by José Sánchez-Gallego on 7 Apr 2016.
Licensed under a 3-clause BSD license.
Revision history:
7 Apr 2016 J. Sánchez-Gallego
Initial version
15 Jun 2016 B. Andrews
Converted to pytest
"""
from __future__ import division
from _... | sdss/marvin | tests/utils/test_general.py | Python | bsd-3-clause | 14,493 | [
"Galaxy"
] | 1424fbc9f5f236b5f7d2508aded0b3cb9fa34ccd3f064aa42e5e81f2f62d7979 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
An interface to the excellent spglib library by Atsushi Togo
(http://spglib.sourceforge.net/) for pymatgen.
v1.0 - Now works with both ordered and disordered structure.
v2.0 - Updated for spglib 1.6.
v3.0 ... | mbkumar/pymatgen | pymatgen/symmetry/analyzer.py | Python | mit | 64,050 | [
"CRYSTAL",
"pymatgen"
] | 16a31cfff26811476994f18ea604c3bbcd8a51d3a8d078b4191b977f9d2419b1 |
# -*- coding: utf-8 -*-
'''
Bubbles Addon
Copyright (C) 2016 lambda
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Th... | azumimuo/family-xbmc-addon | plugin.video.bubbles/resources/lib/sources/english/hoster/open/torba.py | Python | gpl-2.0 | 6,373 | [
"VisIt"
] | b0db4544c9201e9482039f5cd54539f54acacb2b0c1eecf53a6d1b4485553d71 |
#
# Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
#
# 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
# (at your option) any late... | stephengroat/miasm | miasm2/expression/expression.py | Python | gpl-2.0 | 45,069 | [
"VisIt"
] | 12f92ef9aba1b5a1b26713d98ea4e4b17ffdc7c08cbdbbe6b97d96bc830a242f |
'''
function [res] = getDistanceCTF_local_Conj9nomask(ind, q, df, emPar, filterPar, imgFileName, outFile, options)
% [res] = getDistanceCTF_local_Conj8(ind, q, df, emPar, sigmaH, imgFileName, outFile, options)
% Calculates squared Euclidian distances for snapshots in similar
% projection directions. Includes CTF correc... | hstau/manifold-cryo | getDistanceCTF_local_Conj9combinedS2.py | Python | gpl-2.0 | 15,302 | [
"Gaussian"
] | 89dc540959f96aee98b45deea41aa6c271215c42692371b86c08df893757cb39 |
"""""
Simple proof of concept code to push data to Google Analytics.
Related blog posts:
* http://www.canb.net/2012/01/push-data-to-google-analytics-with.html
* https://medium.com/python-programming-language/80eb9691d61f
"""
import Globals
import EPGWindow
import ChannelList
import sys, re
from random import rand... | DrSpaceMonkey/script.pseudotv.live | resources/lib/ga.py | Python | gpl-3.0 | 2,236 | [
"VisIt"
] | d8e2476f1510053668d22f984fed385b4f3a606c4cf5c1f017f5d8ec6bdd555a |
'''PipelineIDR.py - Tasks for IDR analysis
=============================================
Reference
---------
'''
import os
import re
import pysam
import random
import CGATPipelines.Pipeline as P
import CGAT.IOTools as IOTools
import CGATPipelines.PipelineTracks as PipelineTracks
from CGAT import WrapperIDR
def spl... | CGATOxford/CGATPipelines | obsolete/PipelineIDR.py | Python | mit | 19,212 | [
"pysam"
] | 20f9327fe922275d996ca14cd73cd6db5e02919c8ed5ca7fed0d2b7706be824f |
import unittest, os, random, time
from toil.job import Job
from toil.common import Toil
from sonLib.bioio import getTempFile, getTempDirectory, system
from textwrap import dedent
from cactus.shared.common import cactus_call, runSelfLastz
from cactus.shared.test import getCactusInputs_encode, silentOnSuccess
from cact... | benedictpaten/cactus | src/cactus/blast/mappingQualityRescoringAndFilteringTest.py | Python | mit | 20,026 | [
"BLAST"
] | 4c7e1c77bc8f7c05525a03db04db404be34c5523972ab156428c5a1e4ddb77a8 |
###############################################################################
# Re-implementation of the ProcessPoolExecutor more robust to faults
#
# author: Thomas Moreau and Olivier Grisel
#
# adapted from concurrent/futures/process_pool_executor.py (17/02/2017)
# * Backport for python2.7/3.3,
# * Add an extra m... | lesteve/joblib | joblib/externals/loky/process_executor.py | Python | bsd-3-clause | 45,172 | [
"Brian"
] | 797883aa4816d9c384ec805e60ae7d98dc8a5ceaa77c1a2716d0db55c9826599 |
r"""
Ordination methods (:mod:`skbio.stats.ordination`)
==================================================
.. currentmodule:: skbio.stats.ordination
This module contains several ordination methods, including Principal
Coordinate Analysis, Correspondence Analysis, Redundancy Analysis and
Canonical Correspondence Analy... | Kleptobismol/scikit-bio | skbio/stats/ordination/__init__.py | Python | bsd-3-clause | 3,884 | [
"scikit-bio"
] | 2d6ff83455ab50259d6ad5588d6ce77f2e494a8f45ee0504170e4916a53d7310 |
"""
==============================================
Plot randomly generated classification dataset
==============================================
Plot several randomly generated 2D classification datasets.
This example illustrates the :func:`datasets.make_classification`
:func:`datasets.make_blobs` and :func:`datasets.... | davidam/python-examples | scikit/datasets/plot_random_dataset.py | Python | gpl-3.0 | 2,461 | [
"Gaussian"
] | 2b81c99a205c4e0c97ec65877dfc7e496be9a287b78744ff5e48cb3689d5b336 |
# -*- coding: utf-8 -*-
"""Tests for provenance summary functions."""
import unittest
from pybel.examples import sialic_acid_graph
class TestProvenance(unittest.TestCase):
"""Tests for provenance summary functions."""
def test_count_citations(self):
"""Test counting citations."""
count = s... | pybel/pybel | tests/test_struct/test_summary/test_provenance.py | Python | mit | 394 | [
"Pybel"
] | 77a597b4662fa90ec1b8c206e6a99a002662d2183511392c0d11fca0058b2a5f |
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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 ve... | vidartf/hyperspy | hyperspy/tests/model/test_chi_squared.py | Python | gpl-3.0 | 3,341 | [
"Gaussian"
] | 8c59857f30dd81ba1880a676710677835569b3eff81e3bc97fc4cc19a4d402cd |
#!/usr/bin/env python
"""
Removes dummy atoms from trajectory/topology pair and
associated checkpoint/state files.
.2019. joaor@stanford.edu
"""
from __future__ import print_function, division
import argparse
import logging
import os
import sys
import mdtraj as md
import simtk.openmm.app as app
# Format logger
lo... | csblab/md_scripts | utils/removeDUMs.py | Python | mit | 2,388 | [
"MDTraj",
"OpenMM"
] | cd3076dbc571043139049657b0d9abf76e1ae07bf57e0adce099c29dcf20db44 |
# -*- coding: utf-8 -*-
# PEP8 asserts
from copy import deepcopy
import httplib as http
import mock
import time
from nose.tools import * # noqa
from modularodm.exceptions import ValidationValueError
from tests.base import OsfTestCase, fake
from tests.factories import (
UserFactory, NodeFactory, ProjectFactory,... | TomHeatwole/osf.io | website/addons/wiki/tests/test_wiki.py | Python | apache-2.0 | 58,760 | [
"VisIt"
] | 855bff0e64110f340daa40aaa3c00dd9d236fc0fecf4494767ba75f0f3ce0136 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net>
# (c) 2015, Brian Coca <bcoca@ansible.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
#... | jcftang/ansible | lib/ansible/modules/files/find.py | Python | gpl-3.0 | 13,494 | [
"Brian"
] | f88fa09ade1e56085ac00ed35d05071196ccf79544d92a66d7d2815f19e64671 |
from .ast import *
from .error import *
class PrettyPrint(ASTVisitor):
def __init__(self):
super().__init__()
def visit(self, node):
print(node.__class__.__name__)
class CheckSingleAssignment(ASTVisitor):
def __init__(self):
super().__init__()
self._component_frames = ... | mc-hammertimeseries/cs207project | pype/semantic_analysis.py | Python | mit | 2,250 | [
"VisIt"
] | 5ea4acea782d7d29b5ab858423768c1653b46d99ba84b05fa0d03c19ae6428e8 |
import inspect
from abc import ABC
from typing import Iterable, List
from morelia.exceptions import MissingStepError
from morelia.grammar import Feature, Node, Scenario, Step, Visitor
class VisitorObserver(ABC):
def feature_started(self, node: Feature) -> None:
self.node_started(node)
def feature_fi... | kidosoft/Morelia | morelia/visitors.py | Python | mit | 6,197 | [
"VisIt"
] | e26c7cf7fd031cb83820ffeec628ac03aa8201dce0e378b9785e2196671b1aa3 |
#!/usr/bin/env python
#
# $File: migrateByPropAndCount.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can r... | BoPeng/simuPOP | docs/migrateByPropAndCount.py | Python | gpl-2.0 | 1,858 | [
"VisIt"
] | 1365d11906feb51d861c42fd1df0e0c791e7260286ee765a9c299c8a754f374b |
#!/usr/bin/env python3
import httplib2
import os
import sys
from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import argparser, run_flow
class YoutubePlaylist():
# The CL... | kevinrigney/PlaylistDatabase | youtube_playlist.py | Python | mit | 4,726 | [
"VisIt"
] | e3a7d7172d6177d29abee132eb009dc706d38a35c5d1386d9aa229e1891f806e |
# c: 15.02.2008, r: 15.02.2008
input_name = '../examples/diffusion/octahedron.py'
output_name = 'test_octahedron.vtk'
from testsBasic import TestInput
class Test( TestInput ):
pass
| olivierverdier/sfepy | tests/test_input_octahedron.py | Python | bsd-3-clause | 186 | [
"VTK"
] | e947e3d99c5f5eac9276c87a5b6675da1a6a7c4b82652fe8a0fca9586e4a3b4c |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# vmconnect - connect to running virtual machine
# Copyright (C) 2003-2012 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | heromod/migrid | mig/cgi-bin/vmconnect.py | Python | gpl-2.0 | 1,085 | [
"Brian"
] | 5446bb482a7a035d7cd835037bdeb46f847f7657df6428b7e1cade2eb353c07c |
"""
Brian T. Bailey
ITM 513 - MP3
Task Class Module
"""
PRIORITY_CODE = {2: 'Low', 1: 'Medium', 0: 'High'}
PRIORITY_COLOR = {2: 'blue', 1: 'green', 0: 'red'}
PRIORITY_VALUE = {'Low': 2, 'Medium': 1, 'High': 0}
class Task:
"""Models Task data.
This class is a model for 2Dooz task data.
Attributes:
tit... | briantbailey/ITM-513 | mp3/src/domain/Task.py | Python | mit | 1,607 | [
"Brian"
] | f8b679ee2d8623632907e1433459d4b868e125fd39b7e1dda8f1bbe7e0e80e0b |
from __future__ import absolute_import
import sys
import copy
import codecs
from . import TypeSlots
from .ExprNodes import not_a_constant
import cython
cython.declare(UtilityCode=object, EncodedString=object, BytesLiteral=object,
Nodes=object, ExprNodes=object, PyrexTypes=object, Builtin=object,
... | roxyboy/cython | Cython/Compiler/Optimize.py | Python | apache-2.0 | 183,237 | [
"VisIt"
] | 6f60042dfbd8fefcc4a0bdd23c81165bc12a6514fc4b912278646a89c18da143 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Spotify AB
#
# 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 requi... | Houzz/annoy2 | setup.py | Python | apache-2.0 | 2,366 | [
"VisIt"
] | a2eae751b0211ceafd1407e84148dc55741728f096633840ad4f0eeeef4dccad |
#
# gm2pc.py
#
# Conversion routines from glemur to pencil code.
import numpy as np
import glemur as gm
from scipy.interpolate import griddata
import pyvtk as vtk
from vtk.util import numpy_support as VN
import struct
def gm2pc(dataDir = 'data', gmFile = 'save.vtk', pcFile = 'gm2pc.vtk', method = 'linear', nxyz = [])... | SimonCan/glemur | python/glemur/gm2pc.py | Python | gpl-2.0 | 3,301 | [
"VTK"
] | d3bd9c5ffa9f15c729c999ab25714059016089ea6091344ed98136e64a72165e |
# -*- coding: utf-8 -*-
#
# muda documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 2 12:49:27 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | silky/muda | docs/source/conf.py | Python | apache-2.0 | 9,256 | [
"Brian"
] | 0253b02c2c6906e1d6dbc16da61638ff2edd2878b494024ae15b1e3726a485be |
# -*- coding: utf-8 -*-
from django.db import models
from django.template.defaultfilters import slugify
from django.core.exceptions import ValidationError
from django.utils.safestring import mark_safe
from django.utils.encoding import smart_str, force_unicode
from django.utils.translation import ugettext_lazy as _
fro... | pacofvf/django-djobberbase | djobberbase/models.py | Python | mit | 12,528 | [
"VisIt"
] | 35061bf1a34894ddd9586de6eed5c97f136f3e74e6d1ad03653c7392d793e0e3 |
import lan
import copy
import collect_loop as cl
import collect_gen as cg
class GlobalArrayIds(lan.NodeVisitor):
def __init__(self):
self.all_a_ids = set()
self.local_a_ids = set()
def visit_ArrayRef(self, node):
name = node.name.name
self.all_a_ids.add(name)
for c_nam... | dikujepsen/OpenTran | v3.0/framework/processing/collect_array.py | Python | mit | 10,406 | [
"VisIt"
] | 44f24b33feaafc7ebcf09a0d1beb6c1063ca137f096dff9b6c612f65d7b4d408 |
import os
import sys
import vtkAll as vtk
from ddapp import botpy
import math
import time
import types
import functools
import numpy as np
from ddapp import transformUtils
from ddapp import lcmUtils
from ddapp.timercallback import TimerCallback
from ddapp.asynctaskqueue import AsyncTaskQueue
from ddapp.fieldcontainer ... | RussTedrake/director | src/python/ddapp/doordemo.py | Python | bsd-3-clause | 55,325 | [
"VTK"
] | 9016a1e3fd145ab4af3ae84f001927d5e49fa496dcc4dc62262e5d29cad08c15 |
#!python
import numpy as np
import cPickle
import glob
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA as sklearnPCA
import pylab
#import hsp90Helpers
import POVME.packages.binana.peel as peel
import os
import re
pdb2Lig = {#'1BYQ':'ADP',
'1UYF_every50ns':'PU1',
... | POVME/POVME | POVME/packages/clustering/pocketPointsPca.py | Python | mit | 15,148 | [
"VMD"
] | f3ebaa32fcd05ed74edbb8b9f92d2fe62d6db1a864a1b8474176f81b74f0d33c |
"""
@name: PyHouse/src/Modules/Drivers/USB/_test/test_USB_open.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2015-2018 by D. Brian Kimmel
@license: MIT License
@note: Created on Aug 15, 2015
@Summary:
Passed all 1 tests - DBK - 2018-02-13
"""
__updated__ = '2018-02-13... | DBrianKimmel/PyHouse | Project/src/Modules/Core/Drivers/Usb/_test/test_Usb_open.py | Python | mit | 915 | [
"Brian"
] | 1b002989e51f30d64621faaeaaa61c3b28df2b4655a5495ce736417ec0c4145a |
import json
import os
import os.path
import re
import sys
from collections import defaultdict
from distutils.command.build_scripts import build_scripts as BuildScripts
from distutils.command.sdist import sdist as SDist
try:
from setuptools import setup, find_packages
from setuptools.command.build_py import bu... | nrwahl2/ansible | setup.py | Python | gpl-3.0 | 8,115 | [
"Galaxy"
] | 27111b6dc3c88ba0920fefb67ba3a4339ae20cbd8592515ade6cd9371b5b40ce |
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of Logilab-common.
#
# Logilab-common is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as publ... | esparta/logilab_common3 | registry.py | Python | gpl-2.0 | 41,377 | [
"VisIt"
] | 5fb31f21cc7fb84b3f9b51bed0ee1506133597615e96bb948d3e7625b4a07ed9 |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2018 OSGeo
#
# 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 ... | timlinux/geonode | geonode/tests/bdd/e2e/conftest.py | Python | gpl-3.0 | 1,934 | [
"VisIt"
] | 37029e9c12a3cdc1dcd2bbde62f4f1159976624cb66814cd947df98be989511d |
from fuzzysearch.common import group_matches, Match, get_best_match_in_group, \
count_differences_with_maximum, consolidate_overlapping_matches
from fuzzysearch.substitutions_only import \
has_near_match_substitutions as hnm_subs, \
find_near_matches_substitutions as fnm_subs, \
find_near_matches_substi... | taleinat/fuzzysearch | tests/test_substitutions_only.py | Python | mit | 16,224 | [
"Biopython"
] | ed44368769c16b4e5902ba9ba5d6aaff32d96c3b52ce20c3649a3ab260750f60 |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-get-proxy
# Author : Stuart Paterson
########################################################################
"""
Retrieve a delegated proxy for the given user and group
Example:
$ dirac-admin-get-... | DIRACGrid/DIRAC | src/DIRAC/FrameworkSystem/scripts/dirac_admin_get_proxy.py | Python | gpl-3.0 | 5,383 | [
"DIRAC"
] | 3bc029b72c504ad72b7512ff2ca79ceeaf8bcc79e25f994c53e1e0bd0600a467 |
# -*- coding: utf-8 -*-
"""
For information and usage see README, or http://pypi.python.org/pypi/numericalunits
"""
# Copyright (C) 2012-2020 Steven J. Byrnes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in... | sbyrnes321/numericalunits | numericalunits.py | Python | mit | 15,873 | [
"Avogadro",
"Dalton"
] | 15c21894c77c5777e12abf2f40b4e24e4b0aceebf97f74c05895e5329ed614ed |
"""
sfc_models.examples.scripts
This package consists of a set of interactive example scripts, designed to be run as the entry point for
Python. If you import them, they will run automatically.
A script will be built to deploy these scripts to a more sensible location.
This package is obviously not going to be cover... | brianr747/SFC_models | sfc_models/examples/scripts/__init__.py | Python | apache-2.0 | 898 | [
"Brian"
] | 05e9848d1c30483450dc0c172cc8b0d244d7b44f786bf2770e3dda7fce652993 |
'''
SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | madscatt/zazzie | src_2.7/sassie/test_sassie/calculate/sld_mol/test_smaller3.py | Python | gpl-3.0 | 76,694 | [
"Gaussian"
] | 3952ff319fe54302dd030977581328188abdadb22cb5f662be175958c7e2eea0 |
#########################################################################################
# $HeadURL$
# OAR.py
# 10.11.2014
# Author: Matvey Sapunov, A.T.
#########################################################################################
""" OAR.py is a DIRAC independent class representing OAR batch system.
... | vmendez/DIRAC | Resources/Computing/BatchSystems/OAR.py | Python | gpl-3.0 | 6,983 | [
"DIRAC"
] | c8da69d89f07437528765e1dd58120f1957bd396170afb93de986182674bf76f |
# Copyright (c) 2012 - N.P. de Klein
#
# This file is part of Python Mass Spec Analyzer (PyMSA).
#
# Python Mass Spec Analyzer (PyMSA) 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 ver... | davidmam/pyMSA | build/lib/pyMSA/test/test_mzmlFunctions.py | Python | gpl-3.0 | 8,499 | [
"OpenMS"
] | 56a782669e7f6fdbdcf09a3b49f0d3edaafd7ff93776c2a8f4ddca9140262b63 |
"""
# Notes:
- This simulation seeks to emulate the COBAHH benchmark simulations of (Brette
et al. 2007) using the Brian2 simulator for speed benchmark comparison to
DynaSim. However, this simulation includes CLOCK-DRIVEN synapses, for direct
comparison to DynaSim's clock-driven architecture. The synaptic connec... | asoplata/dynasim-benchmark-brette-2007 | output/Brian2/brian2_benchmark_COBAHH_clocksyn_lodens_250/brian2_benchmark_COBAHH_clocksyn_lodens_250.py | Python | gpl-3.0 | 3,778 | [
"Brian"
] | baee3a75ebdd53402744aa379abf2185c365d14927e741dc9cc8fd288a99eb7a |
# This file is part of Viper - https://github.com/botherder/viper
# See the file 'LICENSE' for copying permission.
import os
import re
import getopt
from socket import inet_pton, AF_INET6, error as socket_error
from viper.common.out import *
from viper.common.abstracts import Module
from viper.core.session import __s... | LMSlay/wiper | modules/strings.py | Python | bsd-3-clause | 8,700 | [
"Brian"
] | 3cf65686ffc5bf5ff3c30198b7d461c906f74d5f2fc005617883e7462b6bdf8f |
# -*- coding: utf-8 -*-
"""
Install and manage python packages
usage: pip.py [-h] [--verbose] sub-command ...
optional arguments:
-h, --help show this help message and exit
--verbose be more chatty
List of sub-commands:
sub-command "pip sub-command -h" for more help on a sub-command
list ... | ywangd/stash | bin/pip.py | Python | mit | 70,151 | [
"VisIt"
] | 857bada7e22296855ef9173b55017dd169ac837d2879b09f2f9fdc40b6e7d1a8 |
#!/usr/bin/env python2
from __future__ import print_function
import sys
from pycparser import c_parser, c_generator, c_ast, plyparser
from pycparser.ply import yacc
with open("paren/stddef") as f:
STDDEF = f.read()
class CParser(c_parser.CParser):
def __init__(self, *a, **kw):
super(CParser, self)._... | pragma-/pbot | applets/paren/paren.py | Python | mit | 2,699 | [
"VisIt"
] | 4bb4265b17d3e70081539024c597ad9eab4103d816cce013e4a33b828d36117a |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/utils/Platform/generic/generic_RequestPermissions.py | Python | gpl-3.0 | 941 | [
"ORCA"
] | c625ebd1d32760faf022a749794dbf6bde5fa8e943376a425f9f0fe6cd85c50b |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
r"""Regression detection in ASV is based on detecting stepwise changes
in the graphs. The assumptions on the data are as follows: the curves
are piecewise constant plus random noise. We don't know the scaling of
the data or the ampl... | spacetelescope/asv | asv/step_detect.py | Python | bsd-3-clause | 32,644 | [
"Gaussian"
] | c12b3786a2e0294624ffe92cb00fd748154b7a21be16f13b7e2ca408d27b6731 |
from ovito.io import import_file
from ovito.data import Bonds
# Load a system of atoms and bonds.
node = import_file('bonds.data.gz', atom_style = 'bond')
# Create bond enumerator object.
bonds_enum = Bonds.Enumerator(node.source.bonds)
# Loop over atoms.
bonds_array = node.source.bonds.array
for particle_index in r... | srinath-chakravarthy/ovito | doc/python/example_snippets/bonds_enumerator.py | Python | gpl-3.0 | 661 | [
"OVITO"
] | 615284074dcbde9584d29f0f1141598134c6b81a82f281201d881c26ec5ecc93 |
#! /usr/bin/env python
"""
Yet Another BLAST parser for NCBI BLAST output.
Goals:
- nice introspection
- nice Pythonic accessibility
- maintainability in the face of changing NCBI BLAST output formats
Sample usage: ::
for record in parse_file('blast_output.txt'):
print '-', record.query_name, record.dat... | jrherr/bioinformatics_scripts | python_scripts/blastparser.py | Python | mit | 9,294 | [
"BLAST"
] | a5a62c472a4c636e2a50240fd3f671cbc7163a9404cdf9893e21b6426fc9b877 |
import json
import logging
import re
from decimal import Decimal
from logging import NullHandler, getLogger
from subprocess import check_output
from knowit.core import Property
from knowit.properties import (
AudioCodec,
Basic,
Duration,
Language,
Quantity,
VideoCodec,
VideoDimensions,
... | ratoaq2/knowit | knowit/providers/mkvmerge.py | Python | mit | 10,175 | [
"VisIt"
] | bd7c5e253f5fea0c13acae0d74f6ccf8cc5518e1bff2bb3ec9d65e1b5ebf823b |
import os, sys, re, inspect, types, errno, pprint, subprocess, io, shutil, time, copy
import path_tool
path_tool.activate_module('FactorySystem')
path_tool.activate_module('argparse')
from ParseGetPot import ParseGetPot
from socket import gethostname
#from options import *
from util import *
from RunParallel import R... | waxmanr/moose | python/TestHarness/TestHarness.py | Python | lgpl-2.1 | 40,317 | [
"MOOSE",
"VTK"
] | 5825169eed1b0499fe5c2f20e1c9726933e6299a2c6810a17106e9685b6521e5 |
#!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# RPMDrate - Bimolecular reaction rates via ring polymer molecular dynamics
#
# Copyright (c) 2013 by Yury V. Suleimanov (ysuleyma@mit.edu, ysuleyma@princeton.edu)
# Jo... | YurySuleymanov/RPMDrate_v2.0 | rpmdrate/thermostat.py | Python | mit | 6,056 | [
"Gaussian"
] | 65ad9076612a15435c6cf03b7a42d413a74a22316a77fdeb3c2fffb7ac41faa9 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License
import re
import numpy as np
import warnings
from monty.io import zopen
from collections import defaultdict
from pymatgen.electronic_structure.core import Spin, Orbital
from pymatgen.io.vasp.outputs import Vas... | montoyjh/pymatgen | pymatgen/io/lobster.py | Python | mit | 19,685 | [
"VASP",
"pymatgen"
] | 54f71736405e2d47422a1ace2070f70acfcadca99a8826c3be3a4c873120133a |
"""
Acceptance tests for the certificate web view feature.
"""
from common.test.acceptance.tests.helpers import UniqueCourseTest, EventsTestMixin, load_data_str, get_element_padding
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc, CourseUpdateDesc... | romain-li/edx-platform | common/test/acceptance/tests/lms/test_certificate_web_view.py | Python | agpl-3.0 | 10,203 | [
"VisIt"
] | 288bdd5e5c644cdfdae113ba180e4919484cc1a99abac9d395de1dc886b860d3 |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-get-pilot-output
# Author : Stuart Paterson
########################################################################
"""
Retrieve output of a Grid pilot
Example:
$ dirac-admin-get-pilot-output http... | ic-hep/DIRAC | src/DIRAC/Interfaces/scripts/dirac_admin_get_pilot_output.py | Python | gpl-3.0 | 1,251 | [
"DIRAC"
] | 63ead8afe3d97b401a6884148c8f1bd72f6ef6470d3ffbb20780194eea00e023 |
from enum import Enum
import numpy as np
from math import degrees
from dedop.model import SurfaceData
from .netcdf_writer import NetCDFWriter
from dedop.conf import CharacterisationFile, ConfigurationFile, ConstantsFile
class L1BSDimensions(Enum):
time_l1bs_echo_sar_ku = 'time_l1bs_echo_sar_ku'
echo_sample_... | DeDop/dedop | dedop/data/output/l1bs_writer.py | Python | gpl-3.0 | 30,995 | [
"NetCDF"
] | 1dcdbcfdf0af4a2d15dd0edffde33a838f30c59f30b3e456b9ef3f2a06cf1906 |
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Implementation for `pmg config` CLI.
"""
import glob
import os
import shutil
import subprocess
import sys
from urllib.request import urlretrieve
from monty.serialization import dump... | richardtran415/pymatgen | pymatgen/cli/pmg_config.py | Python | mit | 6,633 | [
"pymatgen"
] | b37c8e81e936394b78d221c70bb4b27f8f74f2366a4f52d3cfad468715f67a7a |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | kdmurray91/scikit-bio | skbio/metadata/_repr.py | Python | bsd-3-clause | 5,981 | [
"scikit-bio"
] | 198a21dccda531fc124a03d9bfbd92c945e600d799ba4d0d088cbe2bb131653f |
#ImportModules
import ShareYourSystem as SYS
import operator
#Definition of a brian structure
MyTransmitter=SYS.TransmitterClass(
).collect(
"Transmiters",
'First',
SYS.TransmitterClass().update(
[
('ConnectingCatchGetStrsList',
[
'/NodePointDeriveNoder/<Transmiters>SecondTransmitter'
]
... | Ledoux/ShareYourSystem | Pythonlogy/draft/Noders/Transmitter/01_ExampleDoc.py | Python | mit | 1,032 | [
"Brian"
] | 0d49f03ed50f37f1e3c9e22e3e3a23b096c38fb146b740364cf68a553257b929 |
from quick.multitrack.MultiTrackCommon import getGSuiteFromGalaxyTN
from gold.application.HBAPI import Track, doAnalysis, AnalysisSpec, GlobalBinSource
from quick.statistic.DistanceMetricsBlockFoundationStat import DistanceMetricsBlockFoundationStat
from quick.statistic.DistanceMetricsFuzzyFoundationStat import Distanc... | johhorn/gwas-clustering | Tools/LociClusteringTool.py | Python | gpl-3.0 | 10,462 | [
"Gaussian"
] | 452bca0e09237f2c047141e80f1a817431b5dd9eee963577c983c2d7576773c5 |
#!/usr/bin/env python
__author__ = "Mike McCann"
__copyright__ = "Copyright 2012, MBARI"
__license__ = "GPL"
__maintainer__ = "Mike McCann"
__email__ = "mccann at mbari.org"
__status__ = "Development"
__doc__ = '''
The GulperLoader module had a load_gulps() method that parses an odv _gulper.txt
file and saves the gul... | mikemccann/stoqs | loaders/GulperLoader.py | Python | gpl-3.0 | 7,050 | [
"GULP"
] | cf8cabc4c2ee81641fa8762c4e5cfc68404643ebe54c3fe9c07d881b24339dfd |
"""
Stratified Plume Model: File input/output
==========================================
Use the ``TAMOC`` `stratified_plume_model` to analyze results of previous
simulations. This script reads in data stored on the hard drive in netCDF
format and creates `stratified_plume_model.Model` objects to store the saved
da... | socolofs/tamoc | bin/spm/spm_file_io.py | Python | mit | 2,973 | [
"NetCDF"
] | 2f4b538dd011c6cf7fbbe37757a0f331df0926d947e11b185678b68e0997c0cd |
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 10 09:29:27 2016
@author: ludovic autin
align PDB file to the symetrical axis obtainewd from http://symd.nci.nih.gov/
"""
import sys
import os
import numpy as np
#import c4d
sys.path.append("/home/ludo/Tools/mgltools_x86_64Linux2_latest/MGLToolsPckgs/")
sys.path.append(... | corredD/ePMV | demo/alignToAxis.py | Python | gpl-3.0 | 1,569 | [
"PyMOL"
] | 6e7a9097ccebf25b65e982e7dfead983c56774a713e5e9ec3476f89f2f92c5c0 |
#!/usr/bin/env python
import os, sys, subprocess
from os.path import basename,dirname
import h5py
from netCDF4 import Dataset
import numpy as np
import numpy.ma as ma
import gdal
from gdalconst import *
from osgeo import ogr, osr
from datetime import datetime, date
def createImgSCISAT(fileAbsPath):
# read info fr... | SISTEMAsw/TAMP | pep.lib/proc/procSCISAT.py | Python | mit | 3,303 | [
"NetCDF"
] | c0217379b6ad524ecfa10dc0482a782cfa587e237773436b55c2a417368db310 |
<<<<<<< HEAD
<<<<<<< HEAD
import unittest
from test import support
import sys
import random
import math
import array
# Used for lazy formatting of failure messages
class Frm(object):
def __init__(self, format, *args):
self.format = format
self.args = args
def __str__(self):
return se... | ArcherSys/ArcherSys | Lib/test/test_long.py | Python | mit | 153,512 | [
"Brian"
] | f8c0babec91654e37e4623bc21540b7310d16b196a46763296678877ae64988f |
# -*- coding: utf-8 -*-
import moose
print( 'Using moose from %s. VERSION=%s' % (moose.__file__, moose.__version__) )
import numpy as np
import chan_proto
import param_chan
t_stop = 10
dend_diameter = 2.2627398e-6
dend_length = 1.131369936e-6
Cm = 4.021231698e-12
Rm = 1865100032
Em = -0.07100000232
Vm_0 = -0.0705
dt... | upibhalla/moose-core | tests/python/test_difshells.py | Python | gpl-3.0 | 6,543 | [
"MOOSE"
] | 58b33e56a9dad0e92d510d10b907bdbe78ebfd6bf608b4c4d358aa9fbc335f7f |
# IDJCmixprefs.py: Preferences window code for IDJC
# Copyright (C) 2005-2011 Stephen Fairchild (s-fairchild@users.sourceforge.net)
#
# 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, ei... | leofiore/idjc-alternate | python/preferences.py | Python | gpl-2.0 | 65,462 | [
"Brian"
] | f087bc49edc17963e71327b46691a74137ffb176408762ad6cd7bd1f1c9afc03 |
# ===========================================================================
# Copyright 2013 University of Limerick
#
# This file is part of DREAM.
#
# DREAM 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 Founda... | nexedi/dream | dream/simulation/Operator.py | Python | gpl-3.0 | 20,247 | [
"VisIt"
] | 5b9ca9deb4b21f1157db623f27155415a8dfa9d2d5e59ca6761ce89e9874dff7 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
import numpy as np
import scipy.spatial as ss
try:
from calc import SiestaCalc
from voronoi.dump import dump_shs
from voronoi.numpy.ngbr import model_ngbr as MN
except (ImportError,):
from shs.calc import SiestaCalc
from shs.voronoi.dump import dump_shs
... | ansobolev/shs | bin/plot.py | Python | mit | 3,564 | [
"Mayavi"
] | 1cb2450e4747203c1e4d1ec5ac9d2f8057322e626b940c85de36bf444fc16e66 |
#!/usr/bin/env python3
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import pytest
from pysisyphus.calculators.AnaPot import AnaPot
from pysisyphus.calculators.MullerBrownSympyPot import MullerBrownPot
from pysisyphus.calculators.PySCF import PySCF
from pysisyphus.calculators import Gau... | eljost/pysisyphus | tests/test_irc/test_irc.py | Python | gpl-3.0 | 7,603 | [
"PySCF",
"TURBOMOLE"
] | 153cabf30ff52497527734f82dac0f58b434938470ae3c70b5e5914b89a2d36a |
# !/usr/bin/env python3
#
# altair documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 7 12:52:48 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | altair-viz/altair | doc/conf.py | Python | bsd-3-clause | 10,810 | [
"Brian"
] | eb6f047c110558980d0d3de4316a22ab727686b6f997027f2e19646649ac53b5 |
#!/usr/bin/env python
#
# Copyright 2007 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... | GoogleCloudPlatform/appengine-python-standard | tests/google/appengine/api/taskqueue/taskqueue_test.py | Python | apache-2.0 | 147,935 | [
"Brian"
] | f4e2b30fbef815098009c64b1c7b81b473867b928e287b3d649e54ac9d239cc1 |
"""
This module consists of some helper functions for creating neuronal networks.
"""
import numpy as np
def poisson_homogenous(lam, timesteps):
"""
Generate a poisson spike train for a single neuron
using a homogenous poisson distribution.
.. image:: _images/homogenous_plot.png
:alt: Homogen... | johannesmik/neurons | neurons/tools.py | Python | bsd-2-clause | 2,654 | [
"NEURON"
] | 5ab6306bffd6db216f5d1df06f20be626ae9a33dae311a2234251c8df85bb591 |
# 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 RAbsseq(RPackage):
"""ABSSeq: a new RNA-Seq analysis method based on modelling absolute
... | LLNL/spack | var/spack/repos/builtin/packages/r-absseq/package.py | Python | lgpl-2.1 | 1,317 | [
"Bioconductor"
] | fcc6b88b56974ddade33c4dcdec0a44bd62d59132624966b045a3b16f636ff04 |
from six import PY2
from syn.five import xrange
from syn.types.a import Type, Sequence, List, Tuple, \
hashable, serialize, deserialize, estr, rstr, visit, find_ne, \
DifferentLength, DiffersAtIndex, deep_feq, primitive_form, collect
from syn.types.a import enumerate as enumerate_
from syn.base_utils import is_... | mbodenhamer/syn | syn/types/a/tests/test_sequence.py | Python | mit | 3,200 | [
"VisIt"
] | b84c7a452ac8e9924f5c523f3b37e54a128b666cbcc2505f4324b6046b8ff880 |
""" The Watchdog Factory instantiates a given Watchdog based on a quick
determination of the local operating system.
"""
__RCSID__ = "$Id$"
import re
import platform
from DIRAC import S_OK, S_ERROR, gLogger
class WatchdogFactory(object):
####################################################################... | chaen/DIRAC | WorkloadManagementSystem/JobWrapper/WatchdogFactory.py | Python | gpl-3.0 | 2,262 | [
"DIRAC"
] | 8fa679661a7a1a986d3777383e178f0b97581d5166d7178ba68b6876cb1c8606 |
# -*- coding: utf-8 -*-
#
# brunel_siegert_nest.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the Lic... | hakonsbm/nest-simulator | pynest/examples/brunel_siegert_nest.py | Python | gpl-2.0 | 8,500 | [
"NEURON"
] | fdde976384b47bb70145f93575cc9e1a9940583547dee3632acafc9282e32819 |
from abc import abstractmethod
from functools import partial
from typing import List
import numpy as np
class ScoreModifier:
"""
Interface for score modifiers.
"""
@abstractmethod
def __call__(self, x):
"""
Apply the modifier on x.
Args:
x: float or np.array ... | BenevolentAI/guacamol | guacamol/score_modifier.py | Python | mit | 6,418 | [
"Gaussian"
] | 837876c6c7ddbe35b89796c86248244eefb2ec61baa387750d01daea583fad9b |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi4/psi4 | psi4/driver/qcdb/modelchems.py | Python | lgpl-3.0 | 30,569 | [
"CHARMM",
"Psi4"
] | fd994646061f708d1f6295bd9b25a00212c9367bda83858032b2ebc12a2071e3 |
import tornado.ioloop
import tornado.web
import string
import random
"""
This script redirects all requests to a SMB server (Redirect to SMB)
Developed by Brian Wallace @botnet_hutner
"""
class RedirectAll(tornado.web.RequestHandler):
def get(self):
self.set_status(302, "Found")
self.redirect("fi... | byt3bl33d3r/SMBTrap | smbtrap/redirect_server.py | Python | mit | 1,559 | [
"Brian"
] | a3838a3016db9dff92e8d55b3950c692b75d31140f6acae1ca631dedac2fead8 |
"""Mayavi/traits GUI for converting data from KIT systems."""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)
from collections import Counter
import os
import queue
import sys
import numpy as np
from scipy.linalg import inv
from threading import Thread
from mayavi.core.ui.mayav... | Teekuningas/mne-python | mne/gui/_kit2fiff_gui.py | Python | bsd-3-clause | 28,795 | [
"Mayavi"
] | 46959d0fa67434bb3eb55b0955f5b5694adfc785bc05195daf199d079dcc7292 |
"""
A context manager for managing things injected into :mod:`__builtin__`.
Authors:
* Brian Granger
* Fernando Perez
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team.
#
# Distributed under the terms of the BSD License.
#
# C... | mattvonrocketstein/smash | smashlib/ipy3x/core/builtin_trap.py | Python | mit | 4,003 | [
"Brian"
] | 0e849e54bbeca9b019a7afd4db0e544a7c7380f1731d2198950d0fe4bf20e808 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals, division, print_function
import ruamel.yaml as yaml
import unittest
import sys
from pymatgen.util.testing import PymatgenTest
from pymatgen.io.abinit.tasks import Paral... | Bismarrck/pymatgen | pymatgen/io/abinit/tests/test_qadapters.py | Python | mit | 15,850 | [
"ABINIT",
"pymatgen"
] | cc0941230bc3d295826b9d60b523226727740161676076b623abe74c9dbdac1e |
#www.stuffaboutcode.com
#Raspberry Pi, Minecraft Bombs - Turn any block into a bomb!
#Martin O'Hanlon script - blocks into bombs using events
#import the minecraft.py module from the minecraft directory
import mcpi.minecraft as minecraft
#import minecraft block module
import mcpi.block as block
#import time, so delays... | jargonautical/mcpi | mcpipy/ohanlon_blocks.py | Python | cc0-1.0 | 2,658 | [
"BLAST"
] | b7ef15f7f899c2368e76e4244a4ed526bfb2abdd9d2b686475509d0ebd1a37e5 |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import glob
import itertools
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import time
import urllib2
import xmlrpclib
import zlib
from xml.etree import ElementTree
from cStringIO import StringIO
import b... | Erls-Corporation/openerp-web | addons/web/controllers/main.py | Python | agpl-3.0 | 76,436 | [
"VisIt"
] | bd38f0ee35b3b0436825b96bdb9d647be47a95076a1e096293667ab1c71d126f |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | Chuban/moose | python/chigger/tests/range/range.py | Python | lgpl-2.1 | 1,402 | [
"MOOSE"
] | 361f7134d2ccbb025ee055c32193247f34720aade1c5ede1ef102e25696cc133 |
# Copyright (c) 2012 - 2014 the GPy Austhors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import GP
from .. import likelihoods
from .. import kern
class GPRegression(GP):
"""
Gaussian Process model for regression
This is a thin wrapper aroun... | strongh/GPy | GPy/models/gp_regression.py | Python | bsd-3-clause | 1,098 | [
"Gaussian"
] | b8b1aac56c8d62ef14f5015058e7335695350e958a080230f0a7b7b61145c3cc |
from __future__ import division
from menpo.transform import AlignmentSimilarity
from menpo.transform.modeldriven import OrthoMDTransform, ModelDrivenTransform
from menpo.fit.lucaskanade.residual import LSIntensity
from menpo.fit.lucaskanade.appearance import AlternatingInverseCompositional
from menpo.fitmultilevel.bas... | jabooth/menpo-archive | menpo/fitmultilevel/aam/base.py | Python | bsd-3-clause | 8,391 | [
"Gaussian"
] | 44ccfd222dbfaf37a394b659a2499807074d98245e24c2fccc8a5de81f70d3c8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.