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 |
|---|---|---|---|---|---|---|---|
class Solution(object):
def findMinHeightTrees(self, n, edges):
"""
:type n: int
:type edges: List[List[int]]
:rtype: List[int]
"""
adjacency_list = [[] for _ in xrange(n)]
degree = [0] * n
for s, t in edges:
adjacency_list[s].append(t)
... | ckclark/leetcode | py/minimum-height-trees.py | Python | apache-2.0 | 950 | [
"VisIt"
] | 7aa9f1d5e3045b3fc3d8cc9f196950ed10bdc3739b9986f83ff93c74baab68da |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | PeterLauris/aifh | vol3/vol3-python-examples/examples/example_otto.py | Python | apache-2.0 | 6,382 | [
"VisIt"
] | 382db657b9281b328e10777f16328bf9ad695a25697ed433ae96bfa93977684a |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An example of a proxy which logs all requests processed through it.
Usage:
$ python logging-proxy.py
Then configure your web browser to use localhost:8080 as a proxy, and visit a
URL (This is not a SOCKS proxy). When browsing in this con... | tzewangdorje/SIPserv | Twisted-13.1.0/doc/web/examples/logging-proxy.py | Python | gpl-3.0 | 1,372 | [
"VisIt"
] | 75e6ec82dc3b715b2baca97699913d1785a72ab51ba8231c292dc21c94464815 |
# -*- coding: utf-8 -*-
localdatajobs = {
'jobtitles': {
# "020": [ "销售管理", "Sales Management" ], // 旧
"535": [ "销售管理", "Sales Management" ],
"020125": [ "销售总经理/销售副总裁", "Sales General Manager/Vice President" ],
"020010": [ "销售总监", "Sales Director" ],
"020020": [ "销售经理/主管", "... | followcat/predator | sources/liepin.py | Python | lgpl-3.0 | 156,650 | [
"BLAST"
] | 9520d3a7094c2a8e1396a6bf870b5d9a7a53514ed300585835fc119a4b7bcb65 |
# Wrapped in a try/except in those situations where someone hasn't installed
# as an egg. What do we do then? For now, we just punt since we don't want
# to define the version number in two places.
try:
import pkg_resources
version = pkg_resources.require('Mayavi')[0].version
except:
version = ''
| dmsurti/mayavi | tvtk/version.py | Python | bsd-3-clause | 314 | [
"Mayavi"
] | fad3663fe31508cb1746911ed28c3b15b690107f454842da792c4245dd715554 |
"""Utility functions for plotting M/EEG data
"""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# ... | Odingod/mne-python | mne/viz/utils.py | Python | bsd-3-clause | 16,329 | [
"Mayavi"
] | cc0384e94d41cdaf832f6da95aa3f3f04fa9c0e5b9a44849c1fce6a4b77628cc |
#!/usr/bin/env python
#
# Wrapper script for invoking the jar.
#
# This script is written for use with the Conda package manager and is ported
# from a bash script that does the same thing, adapting the style in
# the peptide-shaker wrapper
# (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-sha... | joachimwolff/bioconda-recipes | recipes/cromwell/cromwell.py | Python | mit | 2,586 | [
"Bioconda"
] | f753a1e2fbb169e9e4207051ecfad62622c4d7bd48f2487065764ee4e5f9f7b4 |
###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2008, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License versi... | zenoss/ZenPacks.Imas.BlueCoat | setup.py | Python | gpl-2.0 | 3,264 | [
"VisIt"
] | 2b7d623276fe206c56d7a69bedf25301c4c1c3bd7add1ab3c39a92a15d556a38 |
""" DIRAC Basic MySQL Class
It provides access to the basic MySQL methods in a multithread-safe mode
keeping used connections in a python Queue for further reuse.
These are the coded methods:
__init__( host, user, passwd, name, [maxConnsInQueue=10] )
Initializes the Queue and tries to connect to... | sposs/DIRAC | Core/Utilities/MySQL.py | Python | gpl-3.0 | 58,811 | [
"DIRAC"
] | 796e261a36b32dbfc52d737b9a35bbf1ee936269cd07092b328c8da116cf55e5 |
import matplotlib.pyplot as plt
import numpy as np
import scipy.io as sio
from collections import namedtuple
from functools import partial
Model = namedtuple('SVMModelResult', ['X', 'y', 'kernelFunction', 'b', 'alphas', 'w'])
def svm_train(X, Y, C, kernelFunction, tol=0.001, max_passes=5):
m, n = X.s... | mlyundin/Machine-Learning | ex6/ex6.py | Python | mit | 7,115 | [
"Gaussian"
] | 4a0fbac4ed15eb27252c9e2c32f285515e6306d6ccc5feae52b171fbe36e8734 |
# Read .Mat Files
import pylab as pyl
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy as scp
import scipy.ndimage as ni
import scipy.io
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import rospy
#import hrl_lib.mayavi2_util as mu
import hrl_lib.viz as ... | tapomayukh/projects_in_python | rapid_categorization/cross-validation check/resulting_graph.py | Python | mit | 1,386 | [
"Mayavi"
] | 7be1d4f99de801c0bc60939e25ef9622ece17eec28f5d595ea21941b834d4120 |
from __future__ import print_function, absolute_import, division
from future.builtins import *
from future import standard_library
standard_library.install_aliases()
# Copyright 2017 Autodesk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... | Autodesk/molecular-design-toolkit | moldesign/orbitals/cartesian.py | Python | apache-2.0 | 11,060 | [
"Gaussian"
] | 61d6c35e40b10030734efbb411b88fcb6c526f43643c925a41277b0a499e50c1 |
from galaxy.model import tool_shed_install as install_model
from sqlalchemy import MetaData
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Table, TEXT
from sqlalchemy.orm import relation, mapper
from galaxy.model.custom_types import JSONType, TrimmedString
from galaxy.model.orm.now impor... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/model/tool_shed_install/mapping.py | Python | gpl-3.0 | 7,308 | [
"Galaxy"
] | b616c0513702007d026e90c52d34aa054c08d27d0491fd8a5aa86a625f1aa0f5 |
import cPickle, gzip, os, sys, time
import numpy
import theano
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
class HiddenLayer(object):
""" Class for hidden layer """
def __init__(self, rng, input, n_in, n_out, W=None, b=None, activation=T.tanh,
adv_activation_method = N... | IITM-DONLAB/python-dnn | src/pythonDnn/layers/mlp.py | Python | apache-2.0 | 3,267 | [
"NEURON"
] | b01d03022068164476a05fde4f6143ff5502657974fb67a28a31fddfcc317583 |
#!/usr/bin/env python
#
# $File: advancedVSP.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 redistribut... | BoPeng/simuPOP | docs/advancedVSP.py | Python | gpl-2.0 | 2,716 | [
"VisIt"
] | c20cc2b7ebef5ce7ae5b2d7dbcdbdf0f3692ffdc88ebdcf085e03eb77af4d55d |
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
import urllib, urllib2
import re
from optparse import make_option
from django.utils.dateparse import parse_datetime
from blog.models import BlogPost, BlogCategory, Location, Photo
from blog.blog_api import BlogAPI
from blo... | argonemyth/argonemyth-blog | blog/management/commands/pull.py | Python | gpl-3.0 | 6,897 | [
"VisIt"
] | e2547d98a503d8a7b2bf661ad729957f06fe29178fccd5411a42f25a92699aee |
#!/usr/bin/env python
import argparse
import os
import subprocess
import re
import sys
import tempfile
from Bio import SeqIO
from xmfa import parse_xmfa, percent_identity
def secure_filename(filename):
r"""Borrowed from :mod:`werkzeug.utils`, under the BSD 3-clause license.
Pass it a filename and it will retu... | TAMU-CPT/galaxy-tools | tools/comparative/xmfa2bigwig.py | Python | gpl-3.0 | 6,643 | [
"Galaxy"
] | dca04c6603999a5eee243135e44bfd5c118ede7dca7a57fd297ae5d076c1a6eb |
# -*- coding: utf-8 -*-
# Copyright 2007-2020 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... | dnjohnstone/hyperspy | hyperspy/utils/peakfinders2D.py | Python | gpl-3.0 | 19,828 | [
"Gaussian"
] | d5cf131811637eedcc90cc03f6cfc080c2783831b114b5da44f4ce2371eb44b3 |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
... | nuclear-wizard/moose | python/chigger/tests/range/max.py | Python | lgpl-2.1 | 852 | [
"MOOSE"
] | 9abf5e5f7072e1bd12db6abaa83be74bdd94fbd7a46b5257096cac1e374e3742 |
from tools.load import LoadMatrix
from sg import sg
lm=LoadMatrix()
traindat=lm.load_numbers('../data/fm_train_real.dat')
testdat=lm.load_numbers('../data/fm_test_real.dat')
parameter_list=[[traindat,testdat,1.,10],[traindat,testdat,1.5,11]]
def kernel_combined(fm_train_real=traindat,fm_test_real=testdat,
weight=1... | cdawei/shogun | examples/undocumented/python_static/kernel_combined.py | Python | gpl-3.0 | 1,068 | [
"Gaussian"
] | f21ff7c5616ffb8879d809b44d099f2cf609bbfceb91a1103622cc80cdc0c58f |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
from pymatgen.util.testing import PymatgenTest
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.symmetry.analyzer import Spacegro... | gVallverdu/pymatgen | pymatgen/symmetry/tests/test_kpaths.py | Python | mit | 2,646 | [
"pymatgen"
] | f8e4372e5b22c0f4a5dce67073ef7349de9f7f25461c9e3630649d024f8248e3 |
import numpy as np
from ase.atoms import Atoms
from ase.units import Hartree
from ase.parallel import paropen
from ase.data import atomic_numbers
from ase.calculators.singlepoint import SinglePointCalculator
def write_xsf(fileobj, images, data=None):
if isinstance(fileobj, str):
fileobj = paropen(fileobj... | conwayje/ase-python | ase/io/xsf.py | Python | gpl-2.0 | 5,333 | [
"ASE",
"CRYSTAL"
] | 50f36f840d5845d79f163617be3869b5a992e34045e1eff6f975fb6d5ff5a417 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | EmreAtes/spack | var/spack/repos/builtin/packages/foam-extend/package.py | Python | lgpl-2.1 | 17,876 | [
"ParaView"
] | 9d2f5c67ca38be0cbe74ef8421837c888c5d6a0c2325cfad2b8b06d26d87d962 |
# Copyright (c) 2015 the GPy Authors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from .bayesian_gplvm import BayesianGPLVM
class DPBayesianGPLVM(BayesianGPLVM):
"""
Bayesian Gaussian Process Latent Variable Model with Descriminative prior
"""
def __init__(self, Y, inp... | SheffieldML/GPy | GPy/models/dpgplvm.py | Python | bsd-3-clause | 1,265 | [
"Gaussian"
] | 9e9f5ac7bcc712b10468f3436ac136165546056f6e467fb02a3e5c7387006b38 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
from pylab import *
try:
import moose
except ImportError:
print "ERROR: Could not import moose. Please add the directory containing moose.py in your PYTHONPATH"
import sys
sys.exit(1)
from moose.utils import * # for BSplineFill
cla... | h-mayorquin/camp_india_2016 | tutorials/chemical switches/moose/neuroml/lobster_pyloric/synapses/AchSyn_STG.py | Python | mit | 2,481 | [
"MOOSE"
] | 9f8540c66b722923c94d4d424f98e8ace55c5f9d5c7a592f484a94a39f4935e8 |
#!/usr/bin/python
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import (ascii, bytes, chr, dict, filter, hex, input,
int, map, next, oct, open, pow, range, round,
str, super, zip) #future package
from future.builtins.disabled... | pkerpedjiev/ernwin | benchmark/benchmark.py | Python | agpl-3.0 | 13,545 | [
"CRYSTAL"
] | c2e8106f3259e86bddb9c10e53831d1acd6df1f504d2ea5983cc001aaac4dc65 |
import espresso
import math
# specify number of particles in cubic box
N = 4
num_particles = pow(N, 3)
# create particle positions in 3d lattice
x, y, z, Lx, Ly, Lz = espresso.tools.lattice.createCubic(N=num_particles, rho=0.5)
# setup LennardJones system (with 0 particles)
system, integrator = espresso.standard_syst... | BackupTheBerlios/espressopp | examples/external_force/external_force.py | Python | gpl-3.0 | 1,692 | [
"ESPResSo",
"VMD"
] | 81d943c6cbd0daef21e80acba792b5d9d9f3f24adebaff11d71757eeb676da76 |
#!/usr/bin/python
# Rajarshi Guha <rajarshi.guha@gmail.com>
# 07/02/2006
import string, re, urllib, os, sys
def getBugPage(pageNum, which = 'sf'):
filename = 'page%d.html' % (pageNum)
offset = (pageNum - 1) * 50
if which == 'sf':
url = 'http://sourceforge.net/tracker/index.php?func=browse&... | egonw/cdk-build-util | old-root/tools/analyzeBugs.py | Python | lgpl-2.1 | 6,558 | [
"CDK"
] | d09b3a68ebc4e399efc45e95b94102bea9647117fe619ef732712cff0f390c0e |
# This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2015 Jan Decaluwe
#
# The myhdl 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 t... | cfelton/myhdl | myhdl/conversion/_toVHDL.py | Python | lgpl-2.1 | 76,450 | [
"VisIt"
] | 2a7d12744c47e29d56b3ecb1669e99c8ba76cf9410a22c0ddb381449d0796838 |
"""
KeepNote
Editor widget in main window
"""
#
# KeepNote
# Copyright (c) 2008-2009 Matt Rasmussen
# Author: Matt Rasmussen <rasmus@mit.edu>
#
# 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... | reshadh/Keepnote-LaTeX | keepnote/gui/editor_sourceview.py | Python | gpl-2.0 | 17,279 | [
"VisIt"
] | 93b6cd49dd71805c26acc8af493e647b49cf98430fe62d5adec270290e7a431f |
"""
========================================
Special functions (:mod:`scipy.special`)
========================================
.. currentmodule:: scipy.special
Nearly all of the functions below are universal functions and follow
broadcasting and automatic array-looping rules.
.. seealso::
`scipy.special.cython_s... | ilayn/scipy | scipy/special/__init__.py | Python | bsd-3-clause | 28,243 | [
"Gaussian"
] | a584410f2b8e0989c40f8bbe7d9403bebd2aa93955c084ab3047100d174f4286 |
# Copyright (C) 2011 Google 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 list of conditions and the ... | danialbehzadi/Nokia-RM-1013-2.0.0.11 | webkit/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py | Python | gpl-3.0 | 3,263 | [
"exciting"
] | f87d2b70b12367eadf4af466ea966298d7a33a8f673b1e2fd49fbe689997acae |
'''
MultiAlign.py - Yevheniy Chuba - 6/1/2017
Perform multiple alignment using ClustalW
Usage:
multi_align = MultiAlign(clustal_input='create.fasta').perform_alignment()
output:
{seq_id: seq}
commandline utility exectued:
clustalw2 -infile=create.fasta -outfi... | yevheniyc/Python | 1h_NGL_3D_Viewer/pyscripts/pdbmapper/MultiAlign.py | Python | mit | 2,197 | [
"Biopython"
] | 46a603e81cae48cc3ec5dde6305dcfd290085b7be7135cadcf3d8388cbfd1025 |
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | ychen820/microblog | y/google-cloud-sdk/platform/google_appengine/google/appengine/_internal/django/conf/global_settings.py | Python | bsd-3-clause | 19,252 | [
"VisIt"
] | bce9c952e20771f341cee4f78d094be7c654d0831c4773a269d307412f6dcffb |
# Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018, Ansible Project
# 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
import os.path
import re
import sh... | anryko/ansible | lib/ansible/cli/galaxy.py | Python | gpl-3.0 | 60,443 | [
"Galaxy"
] | de33e89139f53547da2f97a739bc009c3faac78ed0576fbbcfaea918b5cea4e4 |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google-research/dads | unsupervised_skill_learning/skill_discriminator.py | Python | apache-2.0 | 10,897 | [
"Gaussian"
] | dbd65b9de15dfaab9ed86e06779ca17be9cf2996b2175e5090592484944fa494 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# pipeline stuff
#
pl3d = vtk.vtkMultiBlockPLOT3DReader()
pl3d.SetXYZFileName("" + str(VTK_DATA_ROOT) + "/Data/combxyz.bin")
pl3d.SetQFileName("" + str(VTK_DATA_ROOT) + "/Da... | hlzz/dotfiles | graphics/VTK-7.0.0/Filters/Core/Testing/Python/QuadricDecimation.py | Python | bsd-3-clause | 2,207 | [
"VTK"
] | a1666ad734c685015c6255eba8e0e948c72e46bde64086bc3baad7f427e06534 |
from proceedings import Proceedings
import time
import random
import re
import glob
import os
id = {}
id['ICSE'] = 'citation.cfm?id=2568225'
id['ISSTA'] = 'citation.cfm?id=2610384'
id['FSE'] = 'citation.cfm?id=2635868'
id['ESEC'] = 'citation.cfm?id=2491411'
id['ESEM'] = 'citation.cfm?id=2652524'
id['ASE'] = 'citatio... | alipourm/semap | src/main.py | Python | apache-2.0 | 1,011 | [
"ASE"
] | a324a65763e48a0428eb9b487b4daadfaa13f28e95b9a261a5693002dfea5af0 |
"""
Extended docstrings for functions.py
"""
pi = r"""
`\pi`, roughly equal to 3.141592654, represents the area of the unit
circle, the half-period of trigonometric functions, and many other
things in mathematics.
Mpmath can evaluate `\pi` to arbitrary precision::
>>> from mpmath import *
>>> mp.dps = 50; m... | pernici/sympy | sympy/mpmath/function_docs.py | Python | bsd-3-clause | 276,029 | [
"Gaussian"
] | 7b46182e8af7d84d12ad6a544915d752d49fc27cdbddda1cdd2a6bbb0ead6b96 |
"""
Generate Gaussian and lognormal grid
"""
import lssps._lssps as c
def convert_P_to_delta_k(grid, seed, *, fix_amplitude=False):
"""
Generate random Gaussian delta(k) from P(k) grid
seed (int): random seed
fix_amplitude (bool): fix amplitude, only random phase (not Gaussian)
"""
if not is... | junkoda/lss-ps | py/lssps/lognormal.py | Python | gpl-3.0 | 513 | [
"Gaussian"
] | 0213b7f9f2a3506238d1d5be7b90aa0777f5c9334ab91b023c0b742c893fd4c9 |
# coding=utf8
#
# Copyright 2013 Dreamlab Onet.pl
#
# 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;
# version 3.0.
# This library is distributed in the hope that it will be useful,
# bu... | tikan/rmock | tests/func_tests/test_http.py | Python | lgpl-3.0 | 10,052 | [
"VisIt"
] | 44050f5dc66ae45412b606ca4dbf6e3832ae0e25066706921d55db3e09ca7e3b |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Gary Burton
#
# 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 v... | SNoiraud/gramps | gramps/gen/plug/menu/_style.py | Python | gpl-2.0 | 2,918 | [
"Brian"
] | 847647468a6adeb4796dd660b63650aed8caef4f958688bb2954d9d59ff4444a |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | txm/potato | twitter/get_access_token.py | Python | bsd-3-clause | 3,172 | [
"VisIt"
] | 2ece64a9fb26bb0e7df9a6efc76a2d55322df80bc932e45c05a42b538c280e4c |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Module for the FFTKDE.
"""
import numbers
import warnings
import numpy as np
from KDEpy.BaseKDE import BaseKDE
from KDEpy.binning import linear_binning, grid_is_sorted
from scipy.signal import convolve
from KDEpy.utils import cartesian
class FFTKDE(BaseKDE):
r"""... | tommyod/KDEpy | KDEpy/FFTKDE.py | Python | gpl-3.0 | 8,257 | [
"Gaussian"
] | 59619f0d628ccf67d5bd0967f64bdf741f00055e56d2df51ef55f74e012fdfdc |
# $Id$
#
# Copyright (C) 2006 Greg Landrum
#
import unittest, os, sys
import pickle
from rdkit import RDConfig
from rdkit import Chem
from rdkit import DataStructs
from rdkit.Chem import MolCatalog
class TestCase(unittest.TestCase):
def test1(self):
cat = MolCatalog.CreateMolCatalog()
es = []
for smi... | ptosco/rdkit | Code/GraphMol/MolCatalog/Wrap/rough_test.py | Python | bsd-3-clause | 1,279 | [
"RDKit"
] | 5be20907399d36e90430cd87b5e2c7b82d07fa45df16d245e32d7e589bf0e9dd |
class AST(object):
"""Base class for all nodes"""
def __eq__(self, other):
attrs = [attr for attr in dir(self) if not attr.startswith("_")]
boolean_values = []
for attr in attrs:
value = getattr(self, attr)
other_value = getattr(other, attr)
boolean_... | centaurialpha/pireal | src/pireal/interpreter/rast.py | Python | gpl-3.0 | 2,885 | [
"VisIt"
] | cca9b96d15cf89058b8da7ea197d9d7195b4fb500f1c0df1ff0e340eab47e789 |
# setdiscovery.py - improved discovery of common nodeset for mercurial
#
# Copyright 2010 Benoit Boissinot <bboissin@gmail.com>
# and Peter Arrenbrecht <peter@arrenbrecht.ch>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from no... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/setdiscovery.py | Python | gpl-3.0 | 7,015 | [
"VisIt"
] | 44c88ac680b0a9dd290d5c3cb1ba02543b82a51aff3c6c30add3a3696b1aca43 |
#!/usr/bin/env python
# -*- coding: utf-8 -*
#
# Copyright (c) 2013-2015 Christian Brueffer (ORCID: 0000-0002-3826-0989)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of s... | idbedead/RNA-sequence-tools | RNA_Seq_analysis/tophat_recondition.py | Python | mit | 6,738 | [
"pysam"
] | 565dd598e2d91c0f2fcc3b2d0e7c1f2887e9c376441665a6054e4aaf68f3258f |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# pyILPER 1.2.1 for Linux
#
# An emulator for virtual HP-IL devices for the PIL-Box
# derived from ILPER 1.4.5 for Windows
# Copyright (c) 2008-2013 Jean-Francois Garnier
# C++ version (c) 2013 Christoph Gießelink
# Python Version (c) 2015 Joachim Siebold
#
# This program is... | bug400/pyilper | pyilper/pilwidgets.py | Python | gpl-2.0 | 67,334 | [
"Amber"
] | 8aa71e76de7986341d6a9935703866a89dadfb5103fa4bbb809040b7f231aab8 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | TheTimmy/spack | var/spack/repos/builtin/packages/sspace-standard/package.py | Python | lgpl-2.1 | 2,490 | [
"BWA",
"Bowtie"
] | ef494c289f943ebc8f67a3e10d0ee38c9d1631853227e874defe949a3e7ea0e7 |
########################################################################
# $Id$
# File : PoolComputingElement.py
# Author : A.T.
########################################################################
""" The Computing Element to run several jobs simultaneously in separate processes
managed by a ProcessPool
"""... | petricm/DIRAC | Resources/Computing/PoolComputingElement.py | Python | gpl-3.0 | 7,362 | [
"DIRAC"
] | b694da93fe3635fa0bc1da45552a3e2b6be694a750c173454e6725a7d2c51a1a |
""" JobDoneRatioPolicy
Policy that calculates the efficiency following the formula::
done / ( completed + done )
if the denominator is smaller than 10, it does not take any decision.
"""
from DIRAC import S_OK
from DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase import PolicyBase
class JobDoneRatioPoli... | DIRACGrid/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/JobDoneRatioPolicy.py | Python | gpl-3.0 | 2,049 | [
"DIRAC"
] | 67fd641ab32956c20f025149a18a3eca60351209d7d10340482964df024c8a7a |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | wangyum/tensorflow | tensorflow/contrib/factorization/python/ops/gmm_ops.py | Python | apache-2.0 | 20,189 | [
"Gaussian"
] | 86a386921abf30b41bd3ca66e4f5aac9dcdf166fb66c1151efd7dbaba55e88ef |
# -*- test-case-name: twisted.trial.test -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Things likely to be used by writers of unit tests.
Maintainer: Jonathan Lange
"""
import doctest, inspect
import os, warnings, sys, tempfile, gc, types
from pprint import pformat
from dis import ... | nlloyd/SubliminalCollaborator | libs/twisted/trial/unittest.py | Python | apache-2.0 | 62,696 | [
"VisIt"
] | 4f7e64436aaa3620140a78c6c55755a81e25af7830595c5274a2902d419599f4 |
# Copyright (C) 2017,2018(1H)
# Max Planck Institute for Polymer Research
#
# This file is part of ESPResSo++ -> Powered by HeSpaDDA algorithm developed by horacio.v.g@gmail.com
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | kkreis/espressopp | src/tools/loadbal.py | Python | gpl-3.0 | 32,050 | [
"ESPResSo"
] | 464cdc04edc2005bf65245c709a849bbd86a449bf6c1887e95bf8a24d413caf7 |
#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2014-2017 The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this s... | jasperges/blenderseed | properties/world.py | Python | mit | 8,110 | [
"VisIt"
] | 6208a451c0345b3726696ea56cc24e3d55a4211b188b282949b4732ecbd4c7d8 |
#!/usr/bin/env python
""" """
# Standard library modules.
import math
# Third party modules.
# Local modules.
# Globals and constants variables.
g_AvogadroNumber_atom_mol = 6.02205E23
g_elementSymbol = [
"H" , "He" , "Li" , "Be" , "B" , "C" , "N" , "O"
, "F" , "Ne" , "Na" , "Mg" , "Al" ,... | drix00/pymcxray | pymcxray/ElementProperties.py | Python | apache-2.0 | 11,805 | [
"Avogadro",
"CASINO"
] | bfdd8a9578a46af265a5d600ba5f97285758b42f7506eeae2f9693bd802cda4a |
"""
Multilayer Perceptron
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2012-2013, Universite de Montreal"
__credits__ = ["Ian Goodfellow", "David Warde-Farley"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
import logging
import math
import sys
import warnings
import numpy as np
from thean... | kastnerkyle/pylearn2 | pylearn2/models/mlp.py | Python | bsd-3-clause | 179,005 | [
"Gaussian"
] | 255eaa9e172e9baa35f7e21ffdfab7f22f6af39eea69f30c07513ac2a060ff4a |
"""
Problem Statement
Elon Musk has succesfully built an automated staircase from Earth to Mars. Many people want to go to Mars, but that's
not possible due to limited capacity of the staircase and logistics involved. Hence, Elon asks interested candidates to
solve a tough challenge. If they solve it, they get a chanc... | algorhythms/HackerRankAlgorithms | Journey to Mars.py | Python | apache-2.0 | 1,926 | [
"VisIt"
] | 523171bf2e28316b4005f4dc3ddb35e3a62df6d5866cb2d92add1f84b6432da3 |
###############################################################################
# ilastik: interactive learning and segmentation toolkit
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/or
# mod... | nielsbuwen/ilastik | ilastik/applets/counting/countingGui.py | Python | gpl-3.0 | 69,295 | [
"Gaussian"
] | b5852c36b2a1c3bce1dd930b198b2bd5f3a2df8b2e5d0762c494815d68f60572 |
# Script to try and validate focus detection algorithms
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import cv2
from scipy import ndimage
import scipy.signal
from PIL import Image
import zstackLib
import time
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from m... | gtg556h/pyZstack | sharpnessAlgorithm/callFourier.py | Python | mit | 2,119 | [
"Brian"
] | bfa06175602aa8087cb63c5a2c05cebe5f13eb93a50e4112a5190582cc9c85d3 |
__docformat__ = "restructuredtext en"
import mdp
from mdp import numx, numx_linalg, utils
from mdp.utils import mult, matmult, invert_exp_funcs2
from mdp.nodes import GrowingNeuralGasNode
def nmonomials(degree, nvariables):
"""Return the number of monomials of a given degree in a given number
of variables."""... | arnaudsj/mdp-toolkit | mdp/nodes/expansion_nodes.py | Python | bsd-3-clause | 13,650 | [
"Gaussian"
] | 3b0b63ba5a92133db665fd6cb0c4ac3c2d1a6672cd80ec1525b04912476502d7 |
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.basemap import Basemap
import os
import sys
import matplotlib.colors
import colorsys
from pprint import pprint
from datetime import datetime
from datetime import timedelta
import pickle
from scipy.io import netcdf
from matplotlib.patches import Polygo... | annahs/atmos_research | WHI_location_map_w_GC_gridpoints.py | Python | mit | 3,942 | [
"NetCDF"
] | 575e6d0a5259d65e64aa44d74651a1397b4c7c60c60ba0493ea6efa7c0f2f7ca |
# $Id: dbexts.py,v 1.5 2002/01/07 04:59:50 bzimmer Exp $
"""
This script provides platform independence by wrapping Python
Database API 2.0 compatible drivers to allow seamless database
usage across implementations.
In order to use the C version, you need mxODBC and mxDateTime.
In order to use the Java version, you n... | ai-ku/langvis | jython-2.1/Lib/dbexts.py | Python | mit | 20,664 | [
"Brian"
] | f51280913c836fc5099dbd0c4a97f5c077df01459ef54174a22ea12cc99e8265 |
#
# Copyright (C) 2013-2015 RoboIME
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distrib... | roboime/pyroboime | roboime/interface/filter.py | Python | agpl-3.0 | 25,212 | [
"Gaussian"
] | 4b9571579d74390a7c000d55a6628def0c6886107c626774db2f5fdfe921f3cd |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2017 Ircam
# Copyright (c) 2016-2017 Guillaume Pellerin
# Copyright (c) 2016-2017 Emilie Zawadzki
# This file is part of mezzanine-organization.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | Ircam-Web/mezzanine-organization | organization/core/management/commands/gulp.py | Python | agpl-3.0 | 1,761 | [
"GULP"
] | 225a0d8a2578dd5cdba5ffb6a0460a5c877a23b5fe6b58decef10b867225b6b3 |
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
import os
... | harterj/moose | python/TestHarness/FileChecker.py | Python | lgpl-2.1 | 2,568 | [
"MOOSE"
] | 5754aec6ed843f3b8e548daa12baf644a79b0737507f51c1222ef6288706f1df |
from textblob import TextBlob
import pandas as pd
testwords = ['good is bad, bad is good good', 'hello', 'fucking', 'best', 'beautiful', 'bad', 'wonderful', 'horrible',
'haha', 'ok', 'accaptable', 'jnfjanfjanfja']
testparagraph = """
Google was bound to make it in here somehow. Here are some intern perks ... | panda0881/pycharmtesting | sentiment_analysis_testing.py | Python | apache-2.0 | 9,976 | [
"ESPResSo"
] | e8749c67cbefd6965a53cfecb7c88e4c50dce435ca84df8bb051b653231ec9c2 |
#!/usr/bin/env python
#!/Users/fujinobuaki/anaconda/bin/python
"""
This is a very simple plot script that reads a 3D DSM-Kernel sensitivity kernel
file and make a plot of it.
"""
import matplotlib.pyplot as plt
import numpy as np
from pyevtk.hl import gridToVTK
#from scipy.io import FortranFile
head=("head","<i")
ta... | IPGP/DSM-Kernel | util/KernelViewer/simple_write_vtk.py | Python | gpl-3.0 | 2,894 | [
"VTK"
] | ef90e6bd3ea472d65203164a3617df35e77529b7731d8ed165cd3017e4824fd3 |
#! /usr/bin/env python
from __future__ import print_function, division
import sys
import os
from os.path import basename
import argparse
if sys.version_info < (3, 2):
import subprocess32 as sp
else:
import subprocess as sp
import select
import logging
import time
import hgt_eval
import itertools
from pysam imp... | ktrappe/daisy | daisy.py | Python | gpl-3.0 | 48,446 | [
"BWA",
"pysam"
] | 20da5f976365f0e65fb3299713bc8f727446d2ab5707b72fdd7cea8e95b5aa69 |
import rapidsms
from rapidsms.parsers.keyworder import Keyworder
import re
from apps.ambulances.models import *
from apps.locations.models import Location
from apps.ubuzima.models import *
from apps.reporters.models import *
from django.utils.translation import ugettext as _
from django.utils.translation import activ... | zigama/rapidsms-rwanda | apps/ubuzima/app.py | Python | lgpl-3.0 | 31,344 | [
"VisIt"
] | d5cbfbff8683c362669dd7c70e53a60687d9a50f7187742f014bc42a7642122a |
from subprocess import call #interface to command LangevinNoisePositive
import scipy.optimize as spo
import scipy.io as sio
import numpy as np
import matplotlib.pyplot as plt
plt.ion() #interactive plotting
fig = plt.figure()
ax1 = fig.add_subplot(131)
ax1.set_title('010 loading')
ax1.set_ylim([0,35])
ax2 = fig.add... | jhektor/Puffin | inputfiles/calibration_crypla/calibration_main_altered.py | Python | lgpl-2.1 | 7,954 | [
"CRYSTAL",
"MOOSE"
] | 7ae9718563c1eeabdcc2e25375610402af3e76bee4ff7c5f90247cc66439c71f |
from __future__ import print_function
from __future__ import absolute_import
import numpy as N
from .image import *
from . import mylogger
from copy import deepcopy as cp
from . import has_pl
if has_pl:
import matplotlib.pyplot as pl
import scipy
import scipy.signal as S
from . import _cbdsm
from . import function... | lofar-astron/PyBDSF | bdsf/psf_vary.py | Python | gpl-3.0 | 49,211 | [
"Gaussian"
] | f750518fb82858464fe8ead864c0454bf8233ac6b5dc1e910fc80fb1a6cd66a9 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2010 Nick Hall
# Copyright (C) 2013-2014 Paul Franklin
#
# This program is free software; you can redistribute it and/or modif... | gramps-project/gramps | gramps/plugins/textreport/tagreport.py | Python | gpl-2.0 | 35,335 | [
"Brian"
] | 70157b1983f60d3f4d4cba514b60da22ad2df73cb5d14b7f71b1becb4588784a |
# -*- coding: utf-8 -*-
import unittest
from mock import Mock, patch
from auth0plus.management.queryset import QuerySet
from auth0plus.exceptions import UnimplementedException
f0 = []
f1 = {
"start": 0,
"limit": 50,
"length": 3,
"total": 3,
"users": [
{"email": "brian@äcdc.com"},
{"email": "bon@äcd... | bretth/auth0plus | tests/test_management/test_queryset.py | Python | isc | 4,632 | [
"Brian"
] | d56091eb05eb7daa3acb4a0eb1e14d5f3cee6594d41a9f556c683d5cda9b2870 |
# -*- coding: utf-8 -*-
import mathutils
import bpy
import math
import re
import os
import mmd_tools.core.camera as mmd_camera
import mmd_tools.core.lamp as mmd_lamp
import mmd_tools.core.vmd as vmd
from mmd_tools import utils
class VMDImporter:
def __init__(self, filepath, scale=1.0, use_pmx_bonename=True, conve... | sugiany/blender_mmd_tools | mmd_tools/core/vmd/importer.py | Python | mit | 13,158 | [
"VMD"
] | 9a32a6a8c17eead3f1176731073bf0ba028d6486195a100cf7b89cd353170fd6 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
from monty.serialization import loadfn
import warnings
import numpy as np
import multiprocessing
import logging
from pymatgen.analysis.pourbaix_diagram import PourbaixDiagram, Pourba... | gVallverdu/pymatgen | pymatgen/analysis/tests/test_pourbaix_diagram.py | Python | mit | 14,509 | [
"pymatgen"
] | 338ecd07124899b5b92cb61260a6e530405d2105cee8ab8b6a03e9e3049ddf33 |
""" Module that contains client access to the Pilots handler.
"""
from DIRAC.Core.Base.Client import Client
class PilotManagerClient(Client):
""" PilotManagerClient sets url for the PilotManagerHandler.
"""
def __init__(self, url=None, **kwargs):
"""
Sets URL for PilotManager handler
:param self:... | andresailer/DIRAC | WorkloadManagementSystem/Client/PilotManagerClient.py | Python | gpl-3.0 | 613 | [
"DIRAC"
] | 41cae93584a7e29a02939a696877be8e0bd4cb52643bf0e0b32ac6bc7d158778 |
import csv
import hashlib
from functools import partial
from os.path import walk, isfile, join, relpath
class FileAttributes:
'''
Attributes of a file to be checked and also
temporary values for processing.
'''
# Persistent
md5 = ''
# Temporary
visited = False
def __init__(self):... | RedFoxPi/Playground | CsvTest.py | Python | gpl-2.0 | 4,017 | [
"VisIt"
] | 742959e4381da20c084f2d05c879189f88b9086523fe13eb507a31bd3bbdc821 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl>
#
# This file is a part of the Simple Network Simulator (sim2net) project.
# USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO
# THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H... | mkalewski/sim2net | sim2net/packet_loss/_packet_loss.py | Python | mit | 2,737 | [
"VisIt"
] | 025c20727bc5cc1539bd45abd3517384eb56fc91688075e5ec711facb5d32cf4 |
"""
==============================================================================
Program: ice_prep.py
Author: Kyle Reese Almryde
Date: 12/20/2012 @ 12:38:47 PM
Modified: 01/09/2013 @ 15:48:13 PM
Purpose: This program performs standard pre-processing operations on 4D image
data collected for the Ice... | KrbAlmryde/Utilities | Iceword/ice_prep.py | Python | mit | 18,786 | [
"Gaussian"
] | a1d8f6fde6e973f659eb45431fd427eafbdca4ce3169541def5fcdc0157bdf97 |
from gameobjects.util import format_number
from gameobjects.vector3 import Vector3
from math import sin, cos, tan, sqrt, pi, radians
#import psyco
#psyco.full()
class Matrix44Error(Exception):
"""Matrix44 Exception class"""
def __init__(self, code, description):
Exception.__init__(self)
se... | PythonProgramming/Beginning-Game-Development-with-Python-and-Pygame | Chapter 9/gameobjects/matrix44.py | Python | mit | 35,929 | [
"ADF"
] | bf46ab71ef91d8b7e8ab565ab7c18bd3462d2f9b78a8d60fb5bd5eb67453ff5d |
# Copyright 2013 anthony cantor
# This file is part of pyc.
#
# pyc 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.
#
# pyc is distr... | cantora/pyc | pyc_sir_to_py.py | Python | gpl-3.0 | 7,199 | [
"VisIt"
] | 0ca03017f6f295d245aa557046641d626edd6e4de2b62cff983a177cf11522e1 |
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Scientific Package. This package holds all simulators, and
# analysers necessary to run brain-simulations. You can use it stand alone or
# in conjunction with TheVirtualBrain-Framework Package. See content of the
# documentation-folder for more details. See also http://ww... | rajul/tvb-library | tvb/simulator/profiling/region_deterministic_stimulus_long_bold.py | Python | gpl-2.0 | 3,922 | [
"Gaussian"
] | 70a2daf18f27a98b51e36547e5749f2506b5eddf84b39de05d67a562529e82d2 |
"""
CBMPy: CBReadtxt module
=======================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General P... | SystemsBioinformatics/cbmpy | cbmpy/CBReadtxt.py | Python | gpl-3.0 | 18,054 | [
"PySCeS"
] | bd555dcbbfefa6f284e4e24589d4821053f7acccd8394cc2500d3aa344793b7e |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | markflyhigh/incubator-beam | sdks/python/apache_beam/typehints/typehints.py | Python | apache-2.0 | 41,133 | [
"VisIt"
] | 060e7c27ebc78117a3aa78271e364f7e87fa1d2a9bd92a806fe423ee2f006991 |
#!/usr/bin/env python
""" create rst files for documentation of DIRAC """
import os
import shutil
import socket
import sys
import logging
import glob
from diracdoctools.Utilities import writeLinesToFile, mkdir, makeLogger
from diracdoctools.Config import Configuration, CLParser as clparser
LOG = makeLogger("CodeRef... | DIRACGrid/DIRAC | docs/diracdoctools/cmd/codeReference.py | Python | gpl-3.0 | 15,957 | [
"DIRAC"
] | f4835d25c5c8add25fea3f5f3ae2e636096c86db6532ce7efbab74b8c6cb8da7 |
# Machine Learning Online Class
# Exercise 6 | Support Vector Machines
#
# Instructions
# ------------
#
# This file contains code that helps you get started on the
# exercise. You will need to complete the following functions:
#
# gaussianKernel.m
# dataset3Params.m
# processEmail.m
# emailFeatur... | robotenique/mlAlgorithms | supervised/SVMclassifier/ex6.py | Python | unlicense | 4,393 | [
"Gaussian"
] | 9082dfd8ba675c8271a9096363b29e0d53405937cf5e1db691b1a61a3608b51c |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 12 21:06:51 2015
@author: sebastien
"""
from __future__ import print_function
from argparse import ArgumentDefaultsHelpFormatter
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import sys
def populate_parser(parent_parse... | seb-buch/personal-mess | gsblib/show_xvg.py | Python | gpl-3.0 | 3,075 | [
"Gromacs"
] | 168eca49f2bcba52380506cc5f4aff6a0d112f133bb0a7762d789b9177ee57f2 |
# -*-python-*-
#
# Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit h... | marcellodesales/svnedge-console | svn-server/lib/viewvc/config.py | Python | agpl-3.0 | 18,697 | [
"VisIt"
] | 5049d99c821996304e9a403d9de9982f943fe03b453849f53cfd6fe9345016c0 |
"""
View for Courseware Index
"""
# pylint: disable=attribute-defined-outside-init
import logging
import urllib
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.views import redirect_to_login
from django.core.urlresolvers import reverse
from django.http import Htt... | proversity-org/edx-platform | lms/djangoapps/courseware/views/index.py | Python | agpl-3.0 | 23,972 | [
"VisIt"
] | 3b0914edef9720e9bd8f99aace9f6131b1d6380d7f30d87f794fd3268a831f1b |
# Prelude to allow running this as a main program
def _init():
import macresource
import sys, os
macresource.need('DITL', 468, "PythonIDE.rsrc")
widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
widgetresfile = os.path.join(*widgetrespathsegs)
if not os.path.exists(wid... | xbmc/xbmc-antiquated | xbmc/lib/libPython/Python/Mac/Tools/IDE/PackageManager.py | Python | gpl-2.0 | 18,316 | [
"Jaguar",
"VisIt"
] | 3a9f953604a8a08e77d29c1f5b9d44d34872a17d1dc30c1fb60068f0b54cb05c |
""" PublisherHandler
This service has been built to provide the RSS web views with all the information
they need. NO OTHER COMPONENT THAN Web controllers should make use of it.
"""
__RCSID__ = '$Id$'
# pylint: disable=no-self-use
import types
from datetime import datetime, timedelta
# DIRAC
from DIRAC import gLo... | chaen/DIRAC | ResourceStatusSystem/Service/PublisherHandler.py | Python | gpl-3.0 | 12,006 | [
"DIRAC"
] | 91b05344744dbbbab434c3c0ad5d40b237a507eb17efd795675bf160488fb4ba |
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 15 14:24:42 2015
@author: moe
"""
import praw
r = praw.Reddit(user_agent='my_cool_application')
submissions = r.get_subreddit('opensource').get_hot(limit=5)
[str(x) for x in submissions] | dleslie1023/FlameTracker | redditFlameAwesome(1).py | Python | gpl-2.0 | 238 | [
"MOE"
] | c240f0f1b9bc943a04562aefe40316539ba537febc19641823725a55c6ba09a7 |
"""
This script interpolate broad-band photometric filters from different telescopes :
* DECam : u, g, r, i, z
* CFHT / MEGACAM : u, g, r, i, z
* SDSS : u, g, r, i, z
It also provides the mean wavelength of each filter.
"""
from os.path import join
import os
import numpy as n
from scipy.interpolate import interp1d... | JohanComparat/pySU | galaxy/python/filterList.py | Python | cc0-1.0 | 6,460 | [
"Galaxy"
] | 2dfc04031792ed123a19b0a4712155d66b86f368ce21327d55bce0c34b030c5e |
# -*- coding: utf-8 -*-
"""This module contains functions that provide summaries of the errors encountered while parsing a BEL script."""
from collections import Iterable, defaultdict
from typing import Counter, List, Mapping, Optional, Set, Tuple
from pybel import BELGraph
from pybel.constants import ANNOTATIONS
fr... | pybel/pybel-tools | src/pybel_tools/summary/error_summary.py | Python | mit | 6,594 | [
"Pybel"
] | e7592196e74e7682b792674e44abe62b914795fcafe8126a16a4323451e8b001 |
import numpy as np
from georges import Kinematics
from georges import ureg as _
from georges import PlacementSequence, Element
from georges.manzoni import Input, Beam, SigmaObserver, BeamObserver, track
from georges.madx import MadX
# Create a test sequence by manually placing all elements
sequence = PlacementSequence... | chernals/georges | examples/manzoni_basic_example.py | Python | gpl-3.0 | 2,555 | [
"Gaussian"
] | 8bd0c9b52db9eb425b8fb69ecd89a497f0badcbeaa34e31733c581257ed8121e |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | gregcaporaso/scikit-bio | skbio/io/format/tests/test_base.py | Python | bsd-3-clause | 13,438 | [
"scikit-bio"
] | 08c0603fe83046ec138bfbea8e939f3953b633a6413a1fe2eced4f3babdfe4a7 |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import glob
import itertools
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import time
import urllib
import urllib2
import urlparse
import xmlrpclib
import zlib
from xml.etree import ElementTree
from cStri... | mkieszek/jobsplus | openerp/addons/web/controllers/main.py | Python | agpl-3.0 | 68,486 | [
"VisIt"
] | 6912715a363bf7ceb52d362d6a07c4071d9e50c99f2ca5483339bd9908d80cbe |
#
# Copyright (C) 2000 Stefan Seefeld
# Copyright (C) 2000 Stephen Davies
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#
"""Abstract Syntax Tree classes.
This file contains classes which encapsulate nodes in the ASG. The base class
is the ... | stefanseefeld/synopsis | Synopsis/ASG.py | Python | lgpl-2.1 | 19,516 | [
"VisIt"
] | 2ed1dd8ca538c29d7ceffd9d92a830ab46fa6dcc31fbd9c7d35fc46d490600fa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.