text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
from flask import Flask, render_template, request, redirect, session
import random, time
app = Flask(__name__)
app.secret_key = "TopSecret"
arr = []
mydatetime=time.localtime()
timevar= time.strftime('%b %d %Y %H:%M:%S', time.localtime())
@app.route('/')
def index():
return render_template("index.html", messages=arr... | authman/Python201609 | Guerrero_Melissa/Assignments/Ninja_Gold/server.py | Python | mit | 1,611 | [
"CASINO"
] | 914e0ac48a045d33262ca4d56134ba86fd04beb09faff446931677033c21a4e7 |
#
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El
n0 = 25
n1 = 25
numLambdas = 5
startLambda = ... | mcopik/Elemental | examples/interface/DS.py | Python | bsd-3-clause | 2,660 | [
"Gaussian"
] | 04fd329675e7b565f9babd6d6cc64b2043ec4659b9bb2be2fa0da51dbeec9812 |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | atljohnsen/adlcoursebuilder | modules/review/stats.py | Python | apache-2.0 | 5,775 | [
"VisIt"
] | 78fa879f03dd7f5908832ebd6942188115cb202b56629ff338ed8f82802ee0d6 |
# -*- coding: utf-8 -*-
#
# connplotter_tutorial.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 Li... | SepehrMN/nest-simulator | extras/ConnPlotter/examples/connplotter_tutorial.py | Python | gpl-2.0 | 27,772 | [
"Gaussian",
"NEURON"
] | c762a34f4267ab58cc3ff73c7f7b3e159479b31a3df63003ee5074e9f378b789 |
"""
======================
Module: bbcflib.rnaseq
======================
Methods of the bbcflib's RNA-seq worflow. The main function is ``rnaseq_workflow()``.
From a BAM file produced by an alignement on the genome, gets counts of reads
on the exons, and uses least-squares to infer counts on genes and transcripts.
""... | bbcf/bbcflib | bbcflib/rnaseq.py | Python | gpl-3.0 | 23,636 | [
"pysam"
] | 623f3bf01c0f539dc30fd73d285859701558462c327850acf3856cc902101534 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | beernarrd/gramps | gramps/plugins/tool/changenames.py | Python | gpl-2.0 | 10,634 | [
"Brian"
] | 43a6eedbcbaf24d67386e65664fe1abaf99469fa7e7926598b3e5b107b2b11c2 |
"""
Tests for the Piwik template tags and filters.
"""
from django.contrib.auth.models import User
from django.http import HttpRequest
from django.template import Context
from django.test.utils import override_settings
from analytical.templatetags.piwik import PiwikNode
from analytical.tests.utils import TagTestCase
... | bittner/django-analytical | analytical/tests/test_tag_piwik.py | Python | mit | 6,017 | [
"VisIt"
] | 8737f7c118e9b972e3e632614156301abb2a2d940408a8794dd042ed1bc7781b |
#
# intrinio_lib - Reusable classes and functions for accessing Intrinio
# Copyright (C) 2017 Dave Hocker (email: qalydon17@gmail.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version ... | qalydon/intrinio-localc | src/intrinio_lib.py | Python | gpl-3.0 | 25,149 | [
"VisIt"
] | 676d63f3d6012fde3cad7e9dfe36d8df453ebc93a128b0dec62137d476e6f6e2 |
# Online training of a logistic regression model
# using Assumed Density Filtering (ADF).
# We compare the ADF result with MCMC sampling
# For further details, see the ADF paper:
# * O. Zoeter, "Bayesian Generalized Linear Models in a Terabyte World,"
# 2007 5th International Symposium on Image and Signal Process... | probml/pyprobml | scripts/adf_logistic_regression_demo.py | Python | mit | 5,340 | [
"ADF",
"Gaussian"
] | f43576830a82fd68d9ce0488e5c210ac5cd2b3095fc4356057e7e06f4074d4b8 |
# Copyright (C) 2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
import hashlib
import json
import textwrap
from hypothesis import... | SoftwareHeritage/swh-web-ui | swh/web/tests/api/views/test_graph.py | Python | agpl-3.0 | 9,280 | [
"VisIt"
] | 9588e0b93dcab840a8279eed0ece5ebe3eb46773544d7dff3d15e95acc299e5f |
# -*- coding: utf-8 -*-
# A simple script for running a Lennard-Jones simulation.
# Statistics such as energy, (instantaneous) temperature, and (instantaneous) pressure are
# output to "LJ-example.npz", and coordinates are output to "LJ-example.xyz".
# These xyz files can be read by VMD; a file named "LJ-example.tcl"... | wackywendell/parm | pyparm/examples/LJ.py | Python | bsd-3-clause | 5,478 | [
"Gaussian",
"VMD"
] | 30f31231a049675b4b3f835a991303c95ef7f5aa58046fc7f45aaba1b52bad79 |
#!/usr/bin/env python
from __future__ import print_function
import re
import sys
import time
import fileinput
import subprocess
# Fetch version from git tags, and write to version.py.
# Also, when git is not available (PyPi package), use stored version.py.
initfile = "ipyrad/__init__.py"
version_git = sys.argv[1]
pr... | dereneaton/ipyrad | versioner.py | Python | gpl-3.0 | 3,298 | [
"Bioconda"
] | 22fe99b26f0464824ef737beed70964d6a265168b4f70551035a6c9ea629f796 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import random
import re
import unittest
import warnings
import requests
from pymatgen.core import SETTINGS, SETTINGS_FILE, yaml
from pymatgen.analysis.phase_diagram import PhaseDiagram
from pymatgen.analysis.p... | richardtran415/pymatgen | pymatgen/ext/tests/test_matproj.py | Python | mit | 21,466 | [
"pymatgen"
] | 2d1cddabffbc6255cb438e726f4cbcc98a6e3325f8e9d3195e16f45fcff2f838 |
#!/usr/bin/env python
#
# Hygrosens Logging/Graphing application
# Copyright 2005 by Brian C. Lane <bcl@brianlane.com>
# http://www.brianlane.com/software/hygrosens/
#
# Requires Python MySQLdb module and Round Robin Database binaries
#
# Logs data to a MySQL database and to a RRDb graph log
#
# 1. Read current senso... | bcl/hygrosens | examples/weather.py | Python | gpl-2.0 | 10,299 | [
"Brian"
] | 1309e9d1977256804c9939c7a9313e9284734c96b5f37ae181318f891226b0e9 |
#pylint: disable=C0111
#pylint: disable=W0621
# Disable the "wildcard import" warning so we can bring in all methods from
# course helpers and ui helpers
#pylint: disable=W0401
# Disable the "Unused import %s from wildcard import" warning
#pylint: disable=W0614
# Disable the "unused argument" warning because lettuce... | abhinavp13/IITBX-edx-platform-dev | common/djangoapps/terrain/steps.py | Python | agpl-3.0 | 5,605 | [
"VisIt"
] | 9cc9973dcdf22a1a5c7058ece7101e1247262efb454cb3beb7188ac5a49c6a4e |
#################################################################
# $HeadURL$
#################################################################
"""
Usage of ThreadPool
ThreadPool creates a pool of worker threads to process a queue of tasks
much like the producers/consumers paradigm. Users just need to fill the queue
w... | Sbalbp/DIRAC | Core/Utilities/ThreadPool.py | Python | gpl-3.0 | 11,423 | [
"DIRAC"
] | 28b7a577fb6a5dbd9911dcfe7fb398191c01230c50ed15c86e8636524da47c2b |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
import time
import pytest
from django.core.urlresolvers import re... | hrayr-artunyan/shuup | shuup_tests/browser/admin/test_picotable.py | Python | agpl-3.0 | 2,749 | [
"VisIt"
] | 68bd548ccb6774cb74b276f09d98439c6965fd76ee807f6a3079b616e183b460 |
"""
===========
gaussfitter
===========
.. codeauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com> 3/17/08
Latest version available at <http://code.google.com/p/agpy/source/browse/trunk/agpy/gaussfitter.py>
"""
import numpy
from numpy.ma import median
from numpy import pi
#from scipy import optimize,stats,pi
from scip... | comptech/atrex | Software/gaussfitter.py | Python | lgpl-3.0 | 23,761 | [
"Gaussian"
] | c7bb5a21b76d0d3079a70426436d700f9b9dd6ec421f04c655351e9353f84892 |
# Copyright (c) 2014, James Hensman, Alan Saul
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import GP
from ..core.parameterization.param import Param
from ..inference.latent_function_inference import VarGauss
log_2_pi = np.log(2*np.pi)
class GPVariationalGaussianApproxi... | SheffieldML/GPy | GPy/models/gp_var_gauss.py | Python | bsd-3-clause | 1,092 | [
"Gaussian"
] | 800c53ec686f7b5c74aa225bddc8d1fcf2759abc6725eca0b2b68459752edb5f |
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from pattern.en import article, referenced
from pattern.en import pluralize, singularize
from pattern.en import comparative, superlative
from pattern.en import conjugate, lemma, lexeme, tenses
from pattern.en import NOUN, VERB, ADJ... | krishna11888/ai | third_party/pattern/examples/03-en/01-inflect.py | Python | gpl-2.0 | 3,745 | [
"Octopus"
] | 04fa4827cc5323f4b607287ab048acdc92380b225b0f40e464c04ad22020f7f7 |
# Copyright 2012, 2013 The GalSim developers:
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
#
# GalSim 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... | mardom/GalSim | examples/demo3.py | Python | gpl-3.0 | 14,111 | [
"Galaxy",
"Gaussian"
] | d34a858a22cfb20326e313fe778161522e53583a741696cf3d5869903c7533cc |
# -*- coding: utf-8 -*-
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2012-2021 rdiffweb contributors
#
# 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 ... | ikus060/rdiffweb | rdiffweb/controller/tests/test_page_login.py | Python | gpl-3.0 | 10,684 | [
"VisIt"
] | cd886058599d18bb8bfb7617d3ae4a17a5a0a7b8db8dc7edbcb6c6e6bfe6a903 |
#! /usr/bin/env python3
#-*- coding: utf-8 -*-
# Copyright 2017, National University of Ireland and The James Hutton Insitute
# Author: Nicholas Waters
#
# This code is part of the riboSeed package, and is governed by its licence.
# Please see the LICENSE file that should have been included as part of
# this package.
... | nickp60/riboSeed | riboSeed/classes.py | Python | mit | 30,056 | [
"BWA",
"pysam"
] | ecafb463105f63f5a1a4dfb72ed681889f18e8394ef3db292b724ba2dd9462aa |
#!/usr/bin/env python2
# Copyright (C) 2016-2017(H)
# Max Planck Institute for Polymer Research
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation,... | kkreis/espressopp | examples/adress/fadress_protein/ubiquitin.py | Python | gpl-3.0 | 23,695 | [
"ESPResSo",
"Gromacs"
] | e1c14f64dd3039c5c031b924093b73ee016161703558cb0e0e88daa100d58172 |
#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Anders F Bjorklund <afb@users.sourceforge.net>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager 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 Softwar... | blackPantherOS/packagemanagement | smartpm/smart/interfaces/qt/mirrors.py | Python | apache-2.0 | 7,896 | [
"CRYSTAL"
] | f5e50726b1f21dc45e9f99505353f87a1fcedb72eea08f77375996bd1800b640 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Astronomical and physics constants in SI units. See :mod:`astropy.constants`
for a complete listing of constants defined in Astropy.
"""
import numpy as np
from .constant import Constant, EMConstant
# PHYSICAL CONSTANTS
class CODATA2010(Constant):... | pllim/astropy | astropy/constants/codata2010.py | Python | bsd-3-clause | 3,962 | [
"Avogadro"
] | fd79b52eba117c7394745dc90764d9b527072abba1fd56f786b1d32527a232af |
import json
import networkx as nx
from itertools import imap
from functools import partial
from collections import defaultdict
from math import sqrt
from datetime import datetime
from django.core.serializers.json import DjangoJSONEncoder
from django.db import connection
from django.http import HttpResponse
from rest_... | aschampion/CATMAID | django/applications/catmaid/control/skeletonexport.py | Python | gpl-3.0 | 40,160 | [
"NEURON"
] | 67b49d5dc9cc6d801e96533dce6855ceda5464fdbc1b6cb0f298851065407dff |
import numpy as np
import tensorflow as tf
import elbow.util as util
from elbow.elementary import Gaussian, BernoulliMatrix, GammaMatrix, BetaMatrix, DirichletMatrix
from elbow.joint_model import Model, BatchGenerator
from elbow.models.factorizations import *
from elbow.transforms import UnaryTransform, TransformedDi... | davmre/elbow | examples/compositional_search/models.py | Python | bsd-3-clause | 8,493 | [
"Gaussian"
] | 608277d96242db9001d8c1342d7c5898ec875893e00823a8c219235970ea0ecc |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/prop/polarizability/uhf.py | Python | apache-2.0 | 15,082 | [
"ORCA",
"PySCF"
] | 5a3bd8dd12ea5498cefe325d86d2350bfa4bef5c9bbe757862be9ba9f0fc8350 |
#
# dnfhelper.py
#
# Copyright (C) 2010-2015 Red Hat, Inc.
#
# 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 later version.
#
# This pr... | dashea/lorax | src/pylorax/dnfhelper.py | Python | gpl-2.0 | 3,492 | [
"Brian"
] | 74fb8a8b17248027b549a2924e3f3cf334c31a6fa43c455589635e959b5813ae |
# -*-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/vclib/ccvs/rcsparse/texttools.py | Python | agpl-3.0 | 10,488 | [
"VisIt"
] | 396b38ff28e20544025fd661be402e3b280046af4f10a34ce59c7372ee045f4c |
#!/usr/bin/env python
"""moose_methods.py: Some helper function related with moose to do multiscale
modelling.
Last modified: Thu Jun 05, 2014 01:20AM
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2013, NCBS Bangalore"
__credits__ = ["NCBS Bangalore", "Bhalla Lab"]
__li... | dilawar/moose-full | moose-core/python/libmumbl/helper/moose_methods.py | Python | gpl-2.0 | 5,572 | [
"MOOSE"
] | 34cadea12f9cbfe666f983359eb4a3bf2356f1b126b17e93af96d9d981352f13 |
"""Serve pre-compressed static content from GridFS with aiohttp.
Requires Python 3.5 or later and aiohttp 3.0 or later.
Start a MongoDB server on its default port, run this script, and visit:
http://localhost:8080/fs/my_file
"""
# -- include-start --
import asyncio
import gzip
import tempfile
import aiohttp.web
fr... | mongodb/motor | doc/examples/aiohttp_gridfs_example.py | Python | apache-2.0 | 1,577 | [
"VisIt"
] | a02549e4fd2d27254aa72b1f49794ab10236ea9c511bce1fbd78e65a1db19304 |
from os import getcwd, chdir, mkdir, system
from shutil import rmtree
from argparse import ArgumentParser
from datetime import datetime
from uuid import uuid4
from sccdftb_config import HUBBARD_LDEP, CRD2XYZ_EXE
from sccdftb_config import SCRATCH_DIR, D3H4_BIN_DIR, CHARMM_EXE
from sccdftb_config import SLKO_DIR, ZETA, ... | andersx/charmm-dftb-py | sccdftb_api.py | Python | unlicense | 11,509 | [
"CHARMM"
] | 8d5aff8c46150a9d864d7f812c36c8f11bd67bbac1cb56df66f0ca1547e1533b |
#!/usr/bin/env python
import copy
import datetime
import json
import logging
import os
import re
import six
from Levenshtein import jaro_winkler
from ansibullbot._text_compat import to_bytes, to_text
from ansibullbot.parsers.botmetadata import BotMetadataParser
from ansibullbot.utils.extractors import ModuleExtract... | jctanner/ansibullbot | ansibullbot/utils/component_tools.py | Python | gpl-3.0 | 67,744 | [
"Galaxy"
] | 25a37d1facb4af6f4e74cda8e49c602db93a75493c51412c1d95b936d1c6ce36 |
import unittest
import ast
from ctree.transformations import PyBasicConversions
from ctree.c.nodes import *
class TestAssigns(unittest.TestCase):
def setUp(self):
self.foo, self.bar = SymbolRef("foo"), SymbolRef("bar")
def test_simple_assign(self):
node = Assign(self.foo, self.bar)
s... | mbdriscoll/ctree | test/test_assign.py | Python | bsd-2-clause | 2,073 | [
"VisIt"
] | 7662e6ce7ebc483d1114505bcfe2350d242da7a81c3d677c3d3a85d7c500a32c |
# encoding: utf-8
"""
Standard cells for the Brian module.
:copyright: Copyright 2006-2016 by the PyNN team, see AUTHORS.
:license: CeCILL, see LICENSE for details.
"""
import logging
from brian import ms
from pyNN.standardmodels import synapses, build_translations
from ..simulator import state
logger = logging.get... | anupkdas-nus/global_synapses | pyNN-dispackgaes/brian/standardmodels/synapses.py | Python | gpl-3.0 | 7,403 | [
"Brian"
] | 671baabed15d70b30471e2c097aeb86cd4090f75b46ae4eb284be0670f3cf45a |
from kameleon_mcmc.distribution.Discrete import Discrete
from kameleon_mcmc.distribution.Gaussian import Gaussian
from kameleon_mcmc.distribution.MixtureDistribution import MixtureDistribution
from kameleon_mcmc.mcmc.samplers.AdaptiveMetropolis import AdaptiveMetropolis
from numpy.lib.twodim_base import eye
from numpy.... | karlnapf/kameleon-mcmc | kameleon_mcmc/mcmc/samplers/AdaptiveMetropolisPCA.py | Python | bsd-2-clause | 5,222 | [
"Gaussian"
] | 0790e64079eed8ac3bea96f9b87f1914a2ddaf3343f5db8e0755a7b6eed18632 |
# coding=utf-8
from ladybug.epw import EPW
from ladybug.datacollection import HourlyContinuousCollection, MonthlyCollection
from ladybug.designday import DesignDay
from ladybug.analysisperiod import AnalysisPeriod
import os
import pytest
def test_import_epw():
"""Test import standard epw."""
relative_path = ... | ladybug-analysis-tools/ladybug-core | tests/epw_test.py | Python | gpl-3.0 | 16,184 | [
"EPW"
] | cd2cd7366d3227767f19fdcb6e4737851cbed2a2684fb5e1750eeb87625a17be |
# %matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
def lif(T):
"""A leaky integrate and fire model neuron.
Params
------
T : scalar
The number of time steps to simulate.
Returns
-------
time : array-like
Time steps
voltages : array-like
Th... | parenthetical-e/ampsocialdemo | ejp.py | Python | mit | 2,192 | [
"NEURON"
] | 04b5810ed7e2eaa58e0c28bbee32d5f7b74d9db7d81ab724a1d44955ac108ee8 |
# -*- coding: utf-8 -*-
"""
This module controls LaserQuantum lasers.
Qudi 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.
Qudi is distribu... | childresslab/MicrocavityExp1 | hardware/laser/millennia_ev_laser.py | Python | gpl-3.0 | 9,899 | [
"CRYSTAL"
] | ff2fe73f3d7e91decb953b2b81b545f065dd7af95aae4cd1bb7042f2411f9f8e |
# -*- coding: utf-8 -*-
#
# futures documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 3 19:35:34 2009.
#
# 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... | Insanityandme/dotfiles | vim/bundle/YouCompleteMe/third_party/pythonfutures/docs/conf.py | Python | unlicense | 6,302 | [
"Brian"
] | 3e04f957028239400cc093dc41ee08c38f90451629a01bfa2e29277362a1cb79 |
import numpy as np
from gpaw import GPAW
from gpaw.response.df import DF
w = np.linspace(0, 24., 481) # 0-24 eV with 0.05 eV spacing
q = np.array([0.0, 0.00001, 0.])
df = DF(calc='si.gpw',
q=q,
w=w,
eta=0.1, # Broadening parameter
ecut=150, # Energy cutoff for pl... | qsnake/gpaw | doc/tutorials/dielectric_response/silicon_ABS1.py | Python | gpl-3.0 | 592 | [
"GPAW"
] | df74a8cfebefa28d807502c4901143b090e9b23efc261528114d15d6a20effec |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_gro.py | Python | gpl-2.0 | 19,030 | [
"MDAnalysis"
] | c2e5f848f778abd8178c110234341065218dcbebdbd3390cdbb62bc7bebb4489 |
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 26 12:51:58 2015
@author: Wasit
"""
import numpy as np
from matplotlib import pyplot as plt
# the saleman starts from node0 and find the shortest
# to visit all nodes before comming back to node0
def tsp(A=[],nodes=[],prenode=[],visit={}):
if len(nodes)==1:
... | wasit7/tutorials | algorithm/tsp.py | Python | mit | 912 | [
"VisIt"
] | 7de0134d799d99fc9bf4859a305464591743bb68b81fb9f37a923e04b6a3462e |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################################################
################################# DISCLAIMER ACHTUNG ##########################################
# ESTE SCRIPT ES MUY RUDIMENTARIO QUEDA PENDIENTE
# ... | AudioHumLab/FIRtro | bin/do_brutefir_config.py | Python | gpl-3.0 | 20,668 | [
"DIRAC"
] | 3a5e4b3fc839967e6ac9d9f95f6104a581d76fa96c9cbc0331180b4c6166f2df |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
from io import BytesIO
import numpy as np
import warnings
from .. import Variable
from ..core.pycompat import iteritems, OrderedDict, basestring
from ..core.utils import (Frozen, FrozenOrdered... | rabernat/xray | xarray/backends/scipy_.py | Python | apache-2.0 | 8,357 | [
"NetCDF"
] | d3c14e5654939a2677de0d9175922402f9effcc51aa3afc9a038088a02724d85 |
# -*- coding: utf-8 -*-
"""
toolbox.py
Create Oficina Toolbar in Sugar
Copyright 2007, NATE-LSI-EPUSP
Oficina is developed in Brazil at Escola Politécnica of
Universidade de São Paulo. NATE is part of LSI (Integrable
Systems Laboratory) and stands for Learning, Work and Entertainment
Research Group. Visit our web p... | samdroid-apps/paint-activity | toolbox.py | Python | gpl-2.0 | 32,889 | [
"VisIt"
] | 63d88df0abec875de3e3a5845c3a2c80a7f29b38c7d62e0ac5ec341147a42c43 |
#!/usr/bin/env python
"""
PURPOSE:
to understand how well galfit recovers galaxy parameters as a function of galaxy brightness
PROCEDURE
create range of galaxies using galfit
add galaxies to blank regions on MIPS images
run galfit to see how we are able to recover galaxy parame... | rfinn/LCS | paper1code/LCSgalfitsim.py | Python | gpl-3.0 | 127,907 | [
"Galaxy",
"Gaussian"
] | f522894ab7469ad5d3f9b91e48c6b103918b0c6375e69b40d72217f7a676fe3b |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import re
import pkg_resources
import subprocess
import errno
from natsort import natsorted
import funannotate.library as lib
def perlVersion():
proc = subprocess.Popen(['perl', '-e', 'print $];'],
stdout=subprocess.PI... | nextgenusfs/funannotate | funannotate/check.py | Python | bsd-2-clause | 17,139 | [
"Biopython"
] | 5bec71c953c391aebd9b2a11a171e15a33acf9610a5333c4c08e5d9db4763354 |
'''
Spectral Extraction from a 2D image.
Uses superextract written by Ian Crossfield and modified by JTF.
superextract is based on optimal spectral extraction as detailed by Marsh (1989) and Horne (1986)
Crossfield's version can be found at www.lpl.arizona.edu/!ianc/python/index.html
Dependencies: superextract.py and s... | bkaiser94/red_cam_pipeline | spectral_extraction.py | Python | mit | 22,166 | [
"Gaussian"
] | 5a52f2b84c34cf18954f0728acfb27fa876ff45bd489069dd328bf612c381e88 |
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #
# (c) 2010... | liuwenf/moose | python/chigger/exodus/ExodusSource.py | Python | lgpl-2.1 | 14,491 | [
"MOOSE",
"VTK"
] | 4ce70ad489e9283ac9c8bff2052afd6f9687c7a97ce801ab60661e21733ba570 |
import numpy as np
import glob
import random
def delSiO2 (SiID, Otype):
Si_list = [] #list of Si atoms (list of [lists of different Si atoms and their neighbors])
Otype_full = []
Obridging = [] #list of bridging O with two Si or Al neighbors (i.e. Si-O-Al)
ONBO = []
#***************Make a list of ... | msadat/CSH-GP | add_hydrogen_tobermorite.py | Python | gpl-3.0 | 6,809 | [
"LAMMPS"
] | 98b20d0e56b41b93705e45753bb7d754c974ecf461e0e50044bd476631faec3f |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... | kain88-de/mdanalysis | testsuite/MDAnalysisTests/core/test_topologyattrs.py | Python | gpl-2.0 | 15,016 | [
"MDAnalysis"
] | 7da74921fa43d1a7f540352db61b6ba9e6a29f3466411f6eaab95129866df227 |
#!/usr/bin/env python
#
# $Id$
#
# This python program/module takes a VTK object and provides a GUI
# configuration for it.
#
# This code is distributed under the conditions of the BSD license.
# See LICENSE.txt for details.
#
# Copyright (C) 2000 Prabhu Ramachandran
# Conversion to wxPython, other changes copyright (... | chrisidefix/devide | external/vtkPipeline/ConfigVtkObj.py | Python | bsd-3-clause | 32,427 | [
"VTK"
] | 0b4aaa8a94667649a3b399c4308cfbfd8601c3143090da448ec30d57220d41f7 |
#!/usr/bin/env python
#encoding: utf-8
import urllib.request, urllib.error, urllib.parse, json, time
from datetime import datetime, timedelta
from .reset_lib import joinOr, sentenceCap, NoGameException, NoTeamException, DabException
from string import capwords
intRolloverUtcTime = 1000
preferredTZ = ({"offset":-5,"t... | joshcvt/resetter | chalicelib/nhl.py | Python | mit | 14,230 | [
"COLUMBUS",
"VisIt"
] | 09849f015a8baa68e020f130cb92ee7253b29c73d327604d483811bbabd8b25f |
#
# Copyright (C) 2019 Greg Landrum and T5 Informatics GmbH
# All Rights Reserved
#
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
import pickle
import unittest
from rdkit im... | bp-kelley/rdkit | Code/GraphMol/ScaffoldNetwork/Wrap/testPickleScaffoldNetwork.py | Python | bsd-3-clause | 1,322 | [
"RDKit"
] | 15d1bf11ddf40c3f8b9f5c08ec58cf1dcf95f22e0d606e6eeb8501c18345d4c9 |
"""
Try Gaussian smoothing before edge detection.
"""
import cv2
import numpy as np
def get_frame(videocapture):
# Read one frame of the video
_, frame = videocapture.read()
return cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
def main(videofile):
# Initialize video stream
cap = cv2.VideoCapture(videof... | drusk/fishcounter | scratch/smooth_edges.py | Python | mit | 841 | [
"Gaussian"
] | 25026531c55f5fb994f28a9c46697afa2779ef1066331471c4be085168d5ac5f |
#
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El
n = 4000
numLambdas = 5
startLambda = 1.
endL... | birm/Elemental | examples/interface/TV.py | Python | bsd-3-clause | 1,727 | [
"Gaussian"
] | de8ad1e275671544838547ccf8e8e449fc8c32420215e6b8d0128744834b2edd |
# -*- coding: utf-8 -*-
""" GIS Module
@requires: U{B{I{gluon}} <http://web2py.com>}
@requires: U{B{I{shapely}} <http://trac.gispython.org/lab/wiki/Shapely>}
@copyright: (c) 2010-2015 Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaini... | michaelhowden/eden | modules/s3/s3gis.py | Python | mit | 393,137 | [
"Amber"
] | 5d998ec0438ed19c6fe1b3c5e765da1deadc7b23df31f9d261acf73851a3f0a9 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the G... | espressopp/espressopp | src/analysis/MaxPID.py | Python | gpl-3.0 | 1,637 | [
"ESPResSo"
] | 8a9192325ce374828ae2997fc7a3ccab32f34ad8c4d43b4c0139c2cff02585f7 |
#!/usr/bin/env python
'''
CREATED:2014-01-17 16:30:07 by Brian McFee <brm2132@columbia.edu>
Compute segmentation evaluation metrics
Usage:
./segment_eval.py TRUTH.TXT PREDICTION.TXT
'''
from __future__ import print_function
import argparse
import sys
import os
import eval_utilities
import mir_eval
def process_ar... | bmcfee/mir_eval | evaluators/segment_eval.py | Python | mit | 2,376 | [
"Brian"
] | 59b11135fe98df3ee471b155eb948b13441ed4639dcdfcc4655b40faad5041db |
#!/usr/bin/env python
"""Processed version of the documentation.
The documentation from the objects of raw_doc is further processed into
objects from the module proc_doc. These objects can then be processed
into structured documents such as HTML more easily.
"""
# TODO(holtgrew): Location traceability for entries an... | bkahlert/seqan-research | raw/workshop13/workshop2013-data-20130926/trunk/util/py_lib/seqan/dox/proc_doc.py | Python | mit | 53,564 | [
"VisIt"
] | ff600ed598e9bffa8e0557cb552041335245fac3ff45b43a9905fc0b06cfc6a9 |
"""
Classes for reading, parsing, and writing workflow batch submit files for
Globus Galaxy.
"""
import logging
import re
from collections import OrderedDict
from .. import parsing
logger = logging.getLogger(__name__)
class WorkflowBatchFile(object):
def __init__(self, path, state='template'):
"""
... | jaeddy/bripipetools | bripipetools/io/workflowbatch.py | Python | mit | 5,960 | [
"Galaxy"
] | 5ca906922095255c7099aa3d073beb03b2a1e682f37b5e58110f78df2eea8791 |
import re
def facts_switch_style(junos, facts):
persona = facts['personality']
if persona in ['MX', 'SRX_HIGHEND']:
style = 'BRIDGE_DOMAIN'
elif persona in ['SWITCH', 'SRX_BRANCH']:
model = facts['model']
if re.match('firefly', model, re.IGNORECASE):
style = 'NONE'
... | spidercensus/py-junos-eznc | lib/jnpr/junos/ofacts/switch_style.py | Python | apache-2.0 | 505 | [
"Firefly"
] | 7663db6abb64de8519d92dde363398ddce8ee9f560d9f26f283828bf2f843181 |
"""
Histogram-related functions
"""
import contextlib
import functools
import operator
import warnings
import numpy as np
from numpy.core import overrides
__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']
array_function_dispatch = functools.partial(
overrides.array_function_dispatch, module='numpy')
... | madphysicist/numpy | numpy/lib/histograms.py | Python | bsd-3-clause | 40,129 | [
"Gaussian"
] | f7ac07d010b486e0da0eb7a23c7eaea6ae334e9593c2599e066fbff6fe1567e9 |
# -*- coding: utf-8 -*-
# coding: utf-8
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import pytest
import nipype.testing as npt
from nipype.testing import example_data
import numpy as np
from nipype.algorithms import mesh as m
from ...inte... | mick-d/nipype | nipype/algorithms/tests/test_mesh_ops.py | Python | bsd-3-clause | 2,554 | [
"VTK"
] | 14dd787587501903aa4373a0286842b914bb4a173b86b683ffa62718b7de8e5f |
import random
import time
import math
import copy
from agents.agent import Agent
from util import info, opponent
class MonteCarloAgent(Agent):
def __init__(self, reversi, color, **kwargs):
self.color = color
self.reversi = reversi
self.sim_time = kwargs.get('sim_time', 5)
# map s... | andysalerno/reversi-ai | agents/monte_carlo_agent.py | Python | mit | 9,129 | [
"VisIt"
] | 4395b0907e9fc61b0f55f66a395998acd7a6eb8cbe016b6adf6a8dcedad95644 |
"""
A collection of functions to find the weights and abscissas for
Gaussian Quadrature.
These calculations are done by finding the eigenvalues of a
tridiagonal matrix whose entries are dependent on the coefficients
in the recursion formula for the orthogonal polynomials with the
corresponding weighting function over ... | valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/scipy/special/orthogonal.py | Python | gpl-2.0 | 49,350 | [
"Gaussian"
] | 5c1196a2399de9c7a6cfd4c8867cafcb2db8c1ba1a265df8eea8ad0025d9474f |
#!/usr/bin/env python3
import warnings
from typing import Any
import torch
from torch import Tensor
from ..constraints import GreaterThan
from ..distributions import base_distributions
from ..functions import add_diag
from ..lazy import (
BlockDiagLazyTensor,
DiagLazyTensor,
KroneckerProductLazyTensor,
... | jrg365/gpytorch | gpytorch/likelihoods/multitask_gaussian_likelihood.py | Python | mit | 14,266 | [
"Gaussian"
] | 5b2ffd26a2ba4efc6a81f79d67ebf4895b9da515e6835362a7413c9a5b5a037a |
# -*- coding: utf-8 -*-
import logging
import luigi
import os
from OrthoEvol.Tools.sge import SGEPipelineTask
from OrthoEvol.Orthologs.Blast import OrthoBlastN
# This is more pythonic with YAML loading
Blast_config = {
"taxon_file": None,
"go_list": None,
"post_blast": True,
"template": None,
"save_data": ... | datasnakes/Datasnakes-Scripts | OrthoEvol/Pipeline/blastpipeline.py | Python | mit | 1,433 | [
"BLAST"
] | e403753e6e9390ad26fcbc2c424d039c4c4cf068fc406725b3f6dfa436260d0a |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2016 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | crisely09/horton | horton/gbasis/__init__.py | Python | gpl-3.0 | 938 | [
"Gaussian"
] | a49e8c67d33bf2fdd66b9edde2c03f8b05826b26af49a35a471aad75cd397cdb |
# -*- coding: utf-8 -*-
"""Contains the main data structure for PyBEL."""
import os
from typing import TextIO, Union
from networkx.utils import open_file
from pkg_resources import iter_entry_points
from ..struct import BELGraph
__all__ = [
"load",
"dump",
"InvalidExtensionError",
]
#: Mapping from ext... | pybel/pybel | src/pybel/io/api.py | Python | mit | 2,607 | [
"Pybel"
] | 10361cc468b4c1d2f4fd19532a22fc7857e2ce16fea15df2e4fd90162b4a3bf5 |
from cctbx import miller
from cctbx import crystal
from cctbx.array_family import flex
def read_x(xfile, take_full=False):
"""
according to http://www.hkl-xray.com/denzo-output
Regular (film output file, Denzo _ip) imaging plate output format (i.e. the format you would you to read in in FORTRAN) is:
format (... | keitaroyam/yamtbx | cctbx_progs/read_x_and_dano.py | Python | bsd-3-clause | 5,430 | [
"CRYSTAL"
] | e2427a4dd99675b035867092f807231e723693c4639701a8490a97aff597182b |
"""Contains functions for interfacing with freesurfer
"""
from __future__ import print_function
import os
import copy
import shutil
import struct
import tempfile
import warnings
import shlex
import subprocess as sp
from builtins import input
import numpy as np
import nibabel
from nibabel import gifti
from tempfile imp... | gallantlab/pycortex | cortex/freesurfer.py | Python | bsd-2-clause | 46,393 | [
"Mayavi"
] | 02a02f65090268f7597211fe3a3c839751ae84739aa4e6fb37f7a5b31ab3471c |
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# 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.
# --------------------... | JWDebelius/scikit-bio | skbio/parse/sequences/tests/__init__.py | Python | bsd-3-clause | 378 | [
"scikit-bio"
] | f574c625a6ba9ef1975a1a788bbf07b50525bd2a685043014eb8980e98f37570 |
# (C) Copyright 2005 Nuxeo SAS <http://nuxeo.com>
# Author: bdelbosc@nuxeo.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it wil... | mozilla-services/FunkLoad | src/funkload/ReportRenderRst.py | Python | gpl-2.0 | 25,731 | [
"VisIt"
] | 4934548c73992e47cf3d43fae314040f96fbcaa605f5792d65a3d25431afbf7a |
import numpy as np
import pandas as pd
# from matplotlib.pyplot import plot,show,draw
import scipy.io
import sys
sys.path.append("../")
from functions import *
from pylab import *
from sklearn.decomposition import PCA
import _pickle as cPickle
import matplotlib.cm as cm
import os
#####################################... | gviejo/ThalamusPhysio | python/figure_article_v2/main_article_v2_fig_3.py | Python | gpl-3.0 | 14,831 | [
"Gaussian"
] | e93ed5bc2a8ae9059c8d3c72d2f260cee23afa043924028e026a2278abb8eba2 |
from __future__ import print_function
from rdkit import RDConfig
import os.path
from rdkit.six.moves import cPickle
from rdkit import Chem
from rdkit.Chem import Descriptors
descrs=['SMR_VSA1','SMR_VSA10','SMR_VSA2','SMR_VSA3','SMR_VSA4','SMR_VSA5','SMR_VSA6','SMR_VSA7','SMR_VSA8','SMR_VSA9','SlogP_VSA1','SlogP_VSA10... | soerendip42/rdkit | rdkit/Chem/test_data/BuildDescrsTestSet.Crippen.py | Python | bsd-3-clause | 1,578 | [
"RDKit"
] | 9b8a42914f6b19a9755e2a1073eeb6bb352169413ae95cfb43e6be862552f1b8 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpat... | denchip/Tinkoff_order_bot | config/urls.py | Python | mit | 1,627 | [
"VisIt"
] | 8ed41cda532efe597a5f180b773a7ead6aeafab85f1b9643705ce3c8318ba54e |
import unittest
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.pbc import gto
from pyscf.pbc.dft import gen_grid
from pyscf.pbc.dft import multigrid
from pyscf.pbc.dft.multigrid import eval_mat, eval_rho
multigrid.EXPDROP, bak_EXPDROP = 1e-14, multigrid.EXPDROP
multigrid.EXTRA_PREC, bak_EXTRA_PREC ... | gkc1000/pyscf | pyscf/lib/test/test_numint_uniform_grid.py | Python | apache-2.0 | 15,949 | [
"PySCF"
] | 674722385dd6c63ae1bd9a88c5bedde4ff2cb7571182db1650a7f180b848bbe8 |
"""Leetcode 286. Walls and Gates (Premium)
Medium
URL: https://leetcode.com/problems/walls-and-gates/
You are given a m x n 2D grid initialized with these three possible values.
- -1 - A wall or an obstacle.
- 0 - A gate.
- INF - Infinity means an empty room. We use the value 231 - 1 = 2147483647 to
represent INF as ... | bowen0701/algorithms_data_structures | lc0286_walls_and_gates.py | Python | bsd-2-clause | 4,102 | [
"VisIt"
] | d07625074fad2c50b46e0ad52a9f33c53ab34b59d505ee436e55197cd1a938d3 |
"""Creates a 2D hyperspectrum consisting of two gaussians and plots it.
This example can serve as starting point to test other functionalities on the
simulated hyperspectrum.
"""
import numpy as np
import hyperspy.api as hs
import matplotlib.pyplot as plt
# Create an empty spectrum
s = hs.signals.Signal1D(np.zeros(... | vidartf/hyperspy | examples/simple_simulations/two_gaussians.py | Python | gpl-3.0 | 1,512 | [
"Gaussian"
] | c9be05c807ba2e960df0a4698d0dfa5b9e47da15edfd15002524ca02c331f190 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/scf/test/test_uhf.py | Python | apache-2.0 | 16,941 | [
"PySCF"
] | a64ee58d40cce0b6c91487ebdc78dcd751cf4d5fc2facbb2f03272fbd8f1146a |
from drizzlepac import tweakreg
import glob, os
from astropy.io import fits
from multiprocessing import Pool
import numpy as np
from stsci.tools import teal
import argparse
import astropy.units as u
from astropy.table import Table
from astropy.coordinates.sky_coordinate import SkyCoord
from astropy.units import Quanti... | gbrammer/pabeta | driz_tools/reg_drzs.py | Python | mit | 5,664 | [
"VisIt"
] | 04b5b59139880b7bbfc6c6b3336b370210459a35a23d6646b67f2df6dc575459 |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/nao/test/test_0069_vnucele_coulomb_water_ae.py | Python | apache-2.0 | 1,885 | [
"PySCF"
] | 88c25401ef7e3f86e9e33a57c750847bc61ae5a5c3ebd4ae5a9194467105e499 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
import sys
try:
with open('README.rst') as readme_file:
readme = readme_file.read()
except FileNotFoundError:
readme = ''
requirements = [... | mhozza/covest | setup.py | Python | gpl-3.0 | 2,046 | [
"Biopython"
] | 3e414b3aff237abea737e7bf91048ee9bad3b089d735271ad3b26bb74e52a92b |
from node import NodeVisitor, ValueNode, ListNode, BinaryExpressionNode
from parser import atoms, precedence
atom_names = {v:"@%s" % k for (k,v) in atoms.iteritems()}
named_escapes = set(["\a", "\b", "\f", "\n", "\r", "\t", "\v"])
def escape(string, extras=""):
# Assumes input bytes are either UTF8 bytes or unic... | danlrobertson/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py | Python | mpl-2.0 | 4,527 | [
"VisIt"
] | 1899944d10b269d28dcb1c43ae404aa2187e40365b2e1e74198c5fdcd6d4218d |
class Solution(object):
def minAbbreviation(self, target, dictionary):
"""
:type target: str
:type dictionary: List[str]
:rtype: str
"""
n = len(target)
diffs = {sum(2**i for i, c in enumerate(w) if c != target[i])
for w in dictionary if len(w... | dichen001/Go4Jobs | JackChen/Google/411. Minimum Unique Word Abbreviation.py | Python | gpl-3.0 | 744 | [
"Amber"
] | 758858841bcbc704bfc7a2b20148d492e8d488788efc63ff12979cf3bb1979dc |
#Here are all the different scenes for the different rooms
import random
from pyaudiogame import storage
from pyaudiogame import speak as spk
def add_text(text):
storage.text = text
def start():
add_text("Welcome to pie Heavens! Press return to blast off into space and escape to exit!")
def start2():
add_text("""... | frastlin/PyAudioGame | examples/basic_games/pie_heavens/scenes.py | Python | mit | 3,324 | [
"BLAST"
] | d39e0abdabf1d0d5848416ca59bedee05eb2c5d80529cd347650809a1deafdcf |
"""Search Google from the command line
This program is part of "Dive Into Python", a free Python book for
experienced programmers. Visit http://diveintopython.org/ for the
latest version.
"""
__author__ = "Mark Pilgrim (mark@diveintopython.org)"
__version__ = "$Revision: 1.2 $"
__date__ = "$Date: 2004/05/20 18:53:59... | tapomayukh/projects_in_python | sandbox_tapo/src/refs/diveintopython-pdf-5.4/diveintopython-5.4/py/search.py | Python | mit | 1,168 | [
"VisIt"
] | ecf3cc04959d8193e639573365365f42ee62e5d0d776ffc8c567238af0fb853b |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | jensreeder/scikit-bio | skbio/tests/test_base.py | Python | bsd-3-clause | 714 | [
"scikit-bio"
] | bc576edce82ac3aea3cbb5ebf8115f293953a629d280770bf727ad70303734e2 |
import numpy as np
from matplotlib import pyplot
import rft1d
eps = np.finfo(float).eps
def here_anova1(Y, X, X0, Xi, X0i, df):
Y = np.matrix(Y)
### estimate parameters:
b = Xi*Y
eij = Y - X*b
R = eij.T*eij
### reduced design:
b0 = X0i*Y
eij0 = Y - X0*b0
R... | 0todd0000/rft1d | rft1d/examples/val_upx_2_F_cluster.py | Python | gpl-3.0 | 2,559 | [
"Gaussian"
] | 8d07873e53fcd416a8f9f16f8846469cd9a06bcb1b8993c9d221e22ea78e7d90 |
import os
from bisect import bisect_left
import neuron
import numpy as np
import sys
import CurrentGenerator
class Simulator:
def __init__(self):
self.recordings = []
self.stimuli = []
self.cell = []
self.time = 3000
self.sigmamax = 0.8
self.sigmamin = 0.3
... | cigani/NEST | L5_TTPC1_cADpyr232_1/run2.py | Python | mit | 6,878 | [
"NEURON"
] | fbb130c74c3861fed47d9e5c1970493a327648ff0c0aced0e8c243c96365c3d4 |
"""
Tests for xhr_handlers.py.
"""
import json
import os
import re
import StringIO
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.core.files.uploadedfile import UploadedFile
from django.core.urlresolvers import reverse
from django.http.request import HttpRequest
f... | woodymit/millstone_accidental_source | genome_designer/main/tests/test_xhr_handlers.py | Python | mit | 19,178 | [
"BWA"
] | 26c8e0e6994ca27f48094490c1c2c0df1713edf8c0373e86b1e44c56debad125 |
from ase import Atom, Atoms
from gpaw import GPAW
from gpaw.test import equal
a = 6.
b = a / 2
mol = Atoms([Atom('O',(b, b, 0.1219 + b)),
Atom('H',(b, 0.7633 + b, -0.4876 + b)),
Atom('H',(b, -0.7633 + b, -0.4876 + b))],
pbc=False, cell=[a, a, a])
calc = GPAW(gpts=(32, 32, 32), nba... | robwarm/gpaw-symm | gpaw/test/lcao_h2o.py | Python | gpl-3.0 | 568 | [
"ASE",
"GPAW"
] | bbce0b6c4c54364d42f54da82e7db60f0334e26afa62648bd7728655f9130571 |
# beamsearch.py - breadth-first search with limited queueing
#
# Copyright 2016 NetworkX developers.
#
# This file is part of NetworkX.
#
# NetworkX is distributed under a BSD license; see LICENSE.txt for more
# information.
"""Basic algorithms for breadth-first searching the nodes of a graph."""
import networkx as nx... | cmtm/networkx | networkx/algorithms/traversal/beamsearch.py | Python | bsd-3-clause | 3,538 | [
"VisIt"
] | fee53baa85c3e32ceef168d772a1534cc2208c749f657e94b8b90d1d7ac15a2c |
"""
Manager and Serializer for Roles.
"""
import galaxy.web
from galaxy import exceptions
from galaxy.model import orm
from sqlalchemy.orm.exc import MultipleResultsFound
from sqlalchemy.orm.exc import NoResultFound
import logging
log = logging.getLogger( __name__ )
# ===============================================... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/managers/roles.py | Python | gpl-3.0 | 1,390 | [
"Galaxy"
] | 766fd2dc5930966222fffdb59bb5a2eb34cb57179cc352e643cd2a46d4a7d736 |
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Contact: Leighton Pritchard, Scottish Crop Research Institute,
# ... | zjuchenyuan/BioWeb | Lib/Bio/Graphics/GenomeDiagram/_Colors.py | Python | mit | 8,852 | [
"Biopython"
] | e465eab57802b416542a6ad281a8ad184ca350eab892c06253b9c29397e5d4a2 |
'''Please note that it's Function problem i.e.
you need to write your solution in the form of Function(s) only.
Driver Code to call/invoke your function would be added by GfG's Online Judge.'''
# Your task is to complete this function
# Function should return Topologically Sorted List
# Graph(graph) is a defaultict o... | isendel/algorithms | algorithms/graph/graph_topological_sort.py | Python | apache-2.0 | 862 | [
"VisIt"
] | cb90bc2193d92a67f0b4bfdad359cb80ebd0fe43f660587cdb501fc2867cacf8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.