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
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paraparser.py __version__=''' $Id: paraparser.py 3774 2010-09-08 15:11:10Z rgbecker $ ''' __doc__='''The parser used to process markup within ...
mattjmorrison/ReportLab
src/reportlab/platypus/paraparser.py
Python
bsd-3-clause
42,578
[ "VisIt" ]
448a32c9790eb42b62214c72b519017a7597e92f128ffbae821dff5ff4d48b38
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
fweik/espresso
testsuite/python/lb_pressure_tensor.py
Python
gpl-3.0
6,864
[ "ESPResSo" ]
753b2b2955b0532924eccaa7d2f4562f69ad1edfa8c80377dcb5c957b9f2dc83
#! RHF Hessian code # -*- coding: utf-8 -*- """ This script calculates nuclear Hessians of RHF Wavefunction using derivatives of one and two electron integrals obtained from PSI4 Reference: "Derivative studies in hartree-fock and moller-plesset theories", J. A. Pople, R. Krishnan, H. B. Schlegel and J. S. Binkley DO...
psi4/psi4
samples/psi4numpy/rhf-hessian/input.py
Python
lgpl-3.0
10,290
[ "Psi4" ]
4c3ccc491bb87620398a4bccd9455bb9483fb3ff9c52513363ab39df25aee456
#!/usr/bin/env python """ Token Pass TokenPasser agents will send a token to each other. This will happen in a random way. If the Spyse platform is distributed one can see the token being sent from one system to another. If the application is started with 'token' as argument then a t...
davidko/evolspyse
demo/token_pass.py
Python
lgpl-2.1
5,733
[ "VisIt" ]
7ee1dcee905e75c2d4a207991d274d043e441743c1d95b552f16144fd8838ad0
#!/galaxy/home/mgehrin/hiclib/bin/python """ For each block in a maf file (read from stdin) write a sequence of ints corresponding to the columns of the block after applying the provided sequence mapping. The 'correct' number of species is determined by the mapping file, blocks not having this number of species will...
bxlab/HiFive_Paper
Scripts/HiCLib/bx-python-0.7.1/build/scripts-2.7/maf_to_int_seqs.py
Python
bsd-3-clause
1,049
[ "Galaxy" ]
c9bef611aee0a90a917b7dcaae96c380f11f48580dcfdded267e4c49b3e42934
from mayavi.tools.mlab_scene_model import MlabSceneModel from mayavi.core.ui.mayavi_scene import MayaviScene, \ DecoratedScene from tvtk.pyface.scene_editor import SceneEditor from mayavi.core.ui.engine_view import EngineView from mayavi.core.ui.engine_rich_view import EngineRichView
dmsurti/mayavi
mayavi/core/ui/api.py
Python
bsd-3-clause
306
[ "Mayavi" ]
1511eb3a634f745f3316b4463383282f1c1974582d7f5c2694d124a881de9077
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # read data # reader ...
hlzz/dotfiles
graphics/VTK-7.0.0/IO/EnSight/Testing/Python/EnSightOfficeBin.py
Python
bsd-3-clause
2,148
[ "VTK" ]
7e732d99a75791116354109a99a46a6e5a79d54ba16ac9fef679ffbae7752c8a
""" generate a single-file self-contained version of py.test """ import py import sys def find_toplevel(name): for syspath in py.std.sys.path: base = py.path.local(syspath) lib = base/name if lib.check(dir=1): return lib mod = base.join("%s.py" % name) if mod.che...
geraldoandradee/pytest
_pytest/genscript.py
Python
mit
2,666
[ "VisIt" ]
2d15212bd6a41d9dacf27ec699d25ebe18c5eec3a249025d3c23308481ff762d
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2011-2013 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Fou...
andrebellafronte/stoq
stoqlib/domain/test/test_account.py
Python
gpl-2.0
16,556
[ "VisIt" ]
42db1be542876e7040d775e4d9d9ee9de1c6482273162ac781610feb898dd95e
""" Multivariate Conditional and Unconditional Kernel Density Estimation with Mixed Data Types. References ---------- [1] Racine, J., Li, Q. Nonparametric econometrics: theory and practice. Princeton University Press. (2007) [2] Racine, Jeff. "Nonparametric Econometrics: A Primer," Foundation and Trends in Eco...
hlin117/statsmodels
statsmodels/nonparametric/kernel_density.py
Python
bsd-3-clause
25,847
[ "Gaussian" ]
303ea6136d5594556daacd87a701fc55cca711f8b7e8e03c3929a1351f6689b6
#!/usr/bin/env python3 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
GoogleCloudPlatform/rad-lab
radlab-launcher/radlab.py
Python
apache-2.0
44,933
[ "Elk" ]
de01b0ade0d196d5d8bc8e9e18a3f5a217eb238fbeadbf562d935d1e82c9ecda
""" Featurizer implementations used in ChemCeption and Smiles2Vec models. SmilesToSeq featurizer for Smiles2Vec models taken from https://arxiv.org/abs/1712.02734 SmilesToImage featurizer for ChemCeption models taken from https://arxiv.org/abs/1710.02238 """ __author__ = "Vignesh Ram Somnath" __license__ = "MIT" impo...
miaecle/deepchem
deepchem/feat/smiles_featurizers.py
Python
mit
9,948
[ "RDKit" ]
818c615b857f30ccca875c8fcc0b31c24c992ffba349a2634441271844600162
#!/usr/bin/env python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free ...
tsdmgz/ansible
contrib/inventory/azure_rm.py
Python
gpl-3.0
35,171
[ "Galaxy" ]
6ab964c12a4886b64e599e65b8c89fbc8cb1ad39e28af42243ec6c1b3c5f7903
# coding: utf-8 # # Diffusion computation # https://github.com/alvason/diffusion-computation # # ### Lecture001 --- Diffusion equation with analytic solution # In a physical intuitive vision, an analytic solution is a crystal clear way for viewing the core. # # During numerical computation development, an analy...
alvason/diffusion-computation
code/diffusion_analytic.py
Python
gpl-2.0
6,497
[ "CRYSTAL" ]
53b112950921f355be5c3f9f70fe3691b862d6dee038745d73d30d0b39cf3551
import os import pathlib from .. import ansys, flac3d, gmsh, mdpa, ply, stl, vtk, vtu, xdmf from .._helpers import _filetypes_from_path, read, reader_map def add_args(parser): parser.add_argument("infile", type=str, help="mesh file to convert") parser.add_argument( "--input-format", "-i", ...
nschloe/meshio
src/meshio/_cli/_binary.py
Python
mit
1,821
[ "VTK" ]
7bff21636b79018ebeff101d26d8ae02dfc4d66205a4c5eff4c0e72aaf11098e
#!/usr/bin/env python """rallpack3_moose_vs_neuron.py: This file compares moose and neuron for rallpack3. Last modified: Sun May 25, 2014 07:05AM """ __author__ = "Dilawar Singh" __copyright__ = "Copyright 2013, NCBS Bangalore" __credits__ = ["NCBS Bangalore", "Bhalla Lab"] __li...
BhallaLab/benchmarks
Rallpacks/moose_vs_neuron/rallpack1/neuron_sim.py
Python
gpl-2.0
4,286
[ "MOOSE", "NEURON" ]
decc970cf1edc4235174f59a030d60d58c1860d4a2aa975413a5ec314a3e8f37
from aiida import load_dbenv load_dbenv() from aiida.orm import Code, DataFactory, load_node StructureData = DataFactory('structure') ParameterData = DataFactory('parameter') import numpy as np import os codename = 'phonopy@stern' code = Code.get_from_string(codename) cell = [[ 3.1900000572, 0, 0], ...
abelcarreras/aiida_extensions
plugins/launcher/launch_phonopy_gan.py
Python
mit
2,193
[ "phonopy" ]
0516ae0da5f7d89d110153d7f152d38e8f0ecb2de618dffcabe2ba27e0e95de1
#!/usr/bin/env python """ dirac-my-great-script This script prints out how great is it, shows raw queries and sets the number of pings. Usage: dirac-my-great-script [option|cfgfile] <Arguments> Arguments: <service1> [<service2> ...] """ __RCSID__ = '$Id$' from DIRAC import S_OK, S_ERRO...
arrabito/DIRAC
docs/source/DeveloperGuide/AddingNewComponents/DevelopingCommands/dirac-my-great-script.py
Python
gpl-3.0
2,626
[ "DIRAC" ]
d4823219790aa5fc44ef265999f2565c18863004fd45a0cfbacc9f32ea3900f3
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) from copy import deepcopy from distutils.version import LooseVersion import itertools as itt from math import...
adykstra/mne-python
mne/cov.py
Python
bsd-3-clause
74,094
[ "Gaussian" ]
210da8e29dc111a8b4c832a9fb3703c6955af2fb934a2b9a3fef09496d142759
import numpy as np """ A module which implements the continuous wavelet transform --------------------------------------------------------- Code released under the BSD 3-clause licence. Copyright (c) 2012, R W Fearick, University of Cape Town All rights reserved. Redistribution and use in source and binary forms, w...
gviejo/ThalamusPhysio
python/Wavelets.py
Python
gpl-3.0
16,624
[ "Gaussian" ]
8460a4739aa4d89153237f3eae96a1df070b9aed88add5a6b9af957320ed9a49
# -*- coding: utf-8 -*- """ Acceptance tests for Video. """ import os from ddt import ddt, unpack, data from mock import patch from nose.plugins.attrib import attr from unittest import skipIf, skip from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from common...
TheMOOCAgency/edx-platform
common/test/acceptance/tests/video/test_video_module.py
Python
agpl-3.0
51,462
[ "VisIt" ]
1d6708c61e1a441132286705d87d4924ff313ad045ee45c8820850726860da6d
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Transform a roidb into a trainable roidb by adding a bunch of metada...
CharlesShang/TFFRCNN
lib/roi_data_layer/roidb.py
Python
mit
6,128
[ "Gaussian" ]
8f871ac4c7d9b6a27437d0a5f70a7fab63c98d89fde4189a28488f6cf8874adb
# -*- coding: utf-8 -*- """Utility functions for plotting M/EEG data.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Mainak Jas <mainak...
mne-tools/mne-python
mne/viz/utils.py
Python
bsd-3-clause
92,378
[ "Mayavi", "VTK" ]
e47f869e0724ac0b4894dcfe4e88598f7150c89f2f7be8a822abcfe43a3fa30f
""" Beta diversity measures (:mod:`skbio.diversity.beta`) ===================================================== .. currentmodule:: skbio.diversity.beta This package contains helper functions for working with scipy's pairwise distance (``pdist``) functions in scikit-bio, and will eventually be expanded to contain pair...
johnchase/scikit-bio
skbio/diversity/beta/__init__.py
Python
bsd-3-clause
6,715
[ "scikit-bio" ]
efd695f35901e654b124ba321a877bed84b1d12991e9dee849cd151a9c652ff9
# this program corresponds to special.py ### Means test is not done yet # E Means test is giving error (E) # F Means test is failing (F) # EF Means test is giving error and Failing #! Means test is segfaulting # 8 Means test runs forever ### test_besselpoly ### test_mathieu_a ### test_mathieu_even_coef ##...
chaluemwut/fbserver
venv/lib/python2.7/site-packages/scipy/special/tests/test_basic.py
Python
apache-2.0
118,104
[ "Elk" ]
0acb0bf8b7a1e1af1a499a840de8ac904b4ca513f8c537d53cd4d93321c5ac66
import cv2 import numpy as np import sys import math L = 256 def salt_and_pepper(src, a, b, Pa=0, Pb=255): dst = np.copy(src) for i in range(dst.shape[0]): for j in range(dst.shape[1]): if dst[i][j] == a: dst[i][j] = Pa elif dst[i][j] == b: dst[i...
rerthal/mc920
proj05/noise.py
Python
gpl-3.0
1,561
[ "Gaussian" ]
60e838949a7907a3bd96a9e0cb8da616119eb6e3dddd55ec00ac3e3226ca933a
"""Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=True) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=True) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list ...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/mimetypes.py
Python
gpl-3.0
20,781
[ "NetCDF" ]
a3f4d0cc6e31c159cfd99d501c3a4bf0aa6fda10474257b7bcb0280f52eee1fb
# Copyright 2014 Roberto Brian Sarrionandia # # 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 t...
sarrionandia/tournatrack
regcontrol.py
Python
apache-2.0
2,633
[ "Brian" ]
c015506398263833c395fa073c5dca8c483e91fce2a1691a1a66e91141e4ceb8
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. """ Wannier90 ========= Wannier90 interoperability is mainly targeted at extracting tight-binding models from Wannier90...
zerothi/sisl
sisl/io/wannier90/__init__.py
Python
mpl-2.0
433
[ "Wannier90" ]
f5d8f54fa2d0a413b6e15ace774b276ee9fe344568bd4cb8d52eb544c8cc7c9f
# -*- coding: utf-8 -*- ## Copyright 2015 Rasmus Scholer Sorensen, rasmusscholer@gmail.com ## ## This file is part of Nascent. ## ## Nascent 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 Foundati...
scholer/na_strand_model
nascent/graph_sim_nx/componentmgr.py
Python
gpl-3.0
97,518
[ "Biopython" ]
11c8bc9471279de855fde6a97bf57cb03338eb9ff1c4cc1380ac091f4859b103
# Copyright 2008 Brian Boyer, Ryan Mark, Angela Nitzke, Joshua Pollock, # Stuart Tiffen, Kayla Webley and the Medill School of Journalism, Northwestern # University. # # This file is part of Crunchberry Pie. # # Crunchberry Pie is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
brianboyer/newsmixer
social/questions/urls.py
Python
gpl-3.0
1,307
[ "Brian" ]
42dba07f49aff76badd62385e38fc09a0765d2e9316208bd1170e764df5eb992
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
google-research/google-research
eim/models/rejection_sampling.py
Python
apache-2.0
6,591
[ "Gaussian" ]
dd1d7f3dc8030081bb0bd1ebe164886e893f5dbf81cc9d94b7c1097f07f89d0c
#!/usr/bin/env python import numpy as np import numpy.random as rn import matplotlib.pyplot as plt from Environment import Environment from NeuronNetwork import NeuronNetwork from IzhikevichLayer import IzhikevichLayer motor_max = 40 wheel_velocity_min = 0.025 wheel_velocity_max = wheel_velocity_min + wheel_velocity...
lawrencejones/neuro
iz/BraitenburgVehicleDemo.py
Python
gpl-3.0
6,020
[ "NEURON" ]
9cf56bb2776261a56f9241672e6a0f057cf4e800f87166a1647e033c8c495a15
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RLdheatmap(RPackage): """Graphical Display of Pairwise Linkage Disequilibria Between SNPs ...
LLNL/spack
var/spack/repos/builtin/packages/r-ldheatmap/package.py
Python
lgpl-2.1
1,552
[ "Bioconductor" ]
96672e8856b54ee2d765f5758914a701574b7df7b1f33644dedd431f746d9d0b
import logging import os import pandas as pd import riboutils.ribo_filenames as filenames logger = logging.getLogger(__name__) class _return_key_dict(dict): def __missing__(self,key): return key ### # The following labels are used to group similar ORF types. ### orf_type_labels_mapping = { 'cano...
dieterich-lab/riboseq-utils
riboutils/ribo_utils.py
Python
mit
82,716
[ "pysam" ]
7837dcb5ec2503668b4c90b5a87659de31057c10892517f11da358e65886ac47
import numpy as np from PyQt4.QtGui import QIntValidator, QDoubleValidator, QApplication, QSizePolicy from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import widget import orangecanvas.resources as resources import sys import os from crystalpy.diffraction.DiffractionSetupSweeps ...
edocappelli/oasys-crystalpy
orangecontrib/oasyscrystalpy/widgets/elements/CrystalCalculator.py
Python
mit
24,535
[ "CRYSTAL" ]
4222c0f54a4e638d651a64f7a985abf3e64c1eb87f108b5c9d961ad143e14dd8
from libmproxy.protocol.http import HTTPResponse from netlib.odict import ODictCaseless """ This module redirects all requests to a SMB server (Redirect to SMB) Developed by Brian Wallace @botnet_hutner """ def start(context, argv): if len(argv) != 2 and len(argv) != 3: raise ValueError('Usage: -s "redir...
CylanceSPEAR/SMBTrap
external_project_modules/mitmproxy/smbtrap-mitmproxy-inline.py
Python
mit
1,105
[ "Brian" ]
c33b24d52b651a108fbca4480f38cefce3a6643391f398ea502a480240e06ada
""" Tests the server compute capabilities. """ import pytest import qcfractal.interface as ptl from qcfractal import testing from qcfractal.testing import fractal_compute_server, test_server, reset_server_database, using_psi4, using_rdkit bad_id1 = "000000000000000000000000" bad_id2 = "000000000000000000000001" de...
psi4/DatenQM
qcfractal/tests/test_compute.py
Python
bsd-3-clause
18,820
[ "Psi4", "RDKit" ]
45722df9ff62a2e434e7246d5b58c5f844ce62f7fdab1955972d4db07fa03093
#!/usr/bin/python import socket import ssl import os import re import time import sys import string import hashlib import traceback import irc import getpass from threading import Thread from threading import RLock as Lock import Queue import chardet import modjson dec = modjson.ModJSONDecoder() enc = modjson.ModJSONE...
shersonb/pyIRC
bouncer.py
Python
mit
61,868
[ "Brian" ]
cfd5b8aabf1ee6085f2a4c47d35d9ff63749514fd4a69233bbc3bd381b0d188f
#!/usr/bin/env python ''' Example Usage of ISAM2 Fixed-Lag Smoother Class ''' # Author: Nick R. Rypkema (rypkema@mit.edu) # License: MIT import time import math import numpy as np import matplotlib.pyplot as plt from isam_fixed_lag_smoother import Noise1D, Noise2D, Noise3D from isam_fixed_lag_smoother import priorFa...
spillai/pygtsam
examples/test_isam_fixed_lag_smoother.py
Python
mit
4,591
[ "Gaussian" ]
c5ace2055345bd65683dda9de1fbcc80e58bb8db42cb25aaf54fe5e8b512026e
"""Traits-based GUI for head-MRI coregistration""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os from ..externals.six.moves import queue import re from threading import Thread import warnings import numpy as np from scipy.spatial.distance import cdist # allow import...
jaeilepp/eggie
mne/gui/_coreg_gui.py
Python
bsd-2-clause
54,493
[ "Mayavi" ]
6905479bdde27327633abcd4b20844853848c8fe8b069745e016a6ff65d80115
# Copyright (C) 2012-2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008-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 GNU Gen...
kkreis/espressopp
src/integrator/LBInitConstForce.py
Python
gpl-3.0
2,224
[ "ESPResSo" ]
9c44a901c779df30b15799ff2c15a4184bcad51405c1606e910367a04e95648e
import numpy from proteus import * from proteus.default_p import * from math import * from proteus.mprans import VOF, NCLS, VOS3P """ Linear advection of a guassian with periodic bcs """ nd = 2#number of space dimensions #constant velocity velocity = numpy.array([1.0,1.0]) if nd == 3: velocity = numpy.array([1.0,...
erdc/proteus
proteus/tests/periodic/la_periodicGauss_p.py
Python
mit
5,749
[ "Gaussian" ]
c32ab73ee1b88b62670a50abbff403810032ffc659a9cede71c19e3b78c429f7
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import random import requests import string from lxml import html from werkzeug import urls from odoo import tools, models, fields, api, _ from odoo.exceptions import UserError from odoo.osv import expression URL_MAX_...
jeremiahyan/odoo
addons/link_tracker/models/link_tracker.py
Python
gpl-3.0
12,385
[ "VisIt" ]
65cf05d93a52faea049d523d75fe036a1f3a300e8c0304e0e8388badb53161cf
"""A Skeleton HTML page template, that provides basic structure and utility methods. """ ################################################## ## DEPENDENCIES import sys import os import os.path from os.path import getmtime, exists import time import types import __builtin__ from Cheetah.Version import MinCompatibleVe...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Templates/SkeletonPage.py
Python
gpl-3.0
10,055
[ "VisIt" ]
51ebb810082e7030f568009af9ee256e597c0a85f986b4f24583e7854f0efcb7
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import os.path as op import sys sys.path.insert(0, op.join(op.dirname(__file__), "..")) from goatools.obo_parser import GODag, GraphEngines if __name__ == '__main__': import optparse p = optparse.OptionParser("%prog [obo_file]") p.add_option("--des...
mfiers/goatools
scripts/plot_go_term.py
Python
bsd-2-clause
2,049
[ "Cytoscape" ]
eb289ab56cb38fed6993310cfa773f5419e835707137c9532ddbb15d4159a57a
# Copyright (C) 2003 CAMP # Please see the accompanying LICENSE file for further information. from math import sqrt, cos, sin import numpy as np from gpaw.spherical_harmonics import Y s = sqrt(0.5) t = sqrt(3) / 3 # Points on the unit sphere: sphere_lm = [ \ np.array([(1, 0, 0)]), # s np.array([(1, 0, 0)...
qsnake/gpaw
gpaw/rotation.py
Python
gpl-3.0
1,744
[ "GPAW" ]
6c929d0b778bf881a0b66f1244e655cb6b4cf81757c74876768e514b5cf8329a
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
digitalbitbox/electrum
plugins/trustedcoin/qt.py
Python
mit
10,838
[ "VisIt" ]
8e36aa3452fbd6dc5195ccbba0c30eb65c4c70d2d07fb07061db33e341b62b41
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
lach76/scancode-toolkit
src/extractcode/archive.py
Python
apache-2.0
24,679
[ "VisIt" ]
a5ef77194466e68309e9cf8445e817f63ea2a117dd44ff017208576443089d22
import numpy as np from numpy import ix_ import xarray as xr import os from oggm import cfg, utils from oggm.cfg import G, SEC_IN_YEAR, SEC_IN_DAY def filter_ice_border(ice_thick): """Sets the ice thickness at the border of the domain to zero.""" ice_thick[0, :] = 0 ice_thick[-1, :] = 0 ice_thick[:, ...
OGGM/oggm
oggm/core/sia2d.py
Python
bsd-3-clause
15,221
[ "NetCDF" ]
3f6f76ab8ef61fcbac5b47f45799cffbb7f7cbe2ca01159964ee53b35b48f0f6
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import numpy as np import tensorflow as tf from tensorflow.contrib.layers.python.layers import regularizers from niftynet.engine.application_initializer import GlorotUniform from niftynet.layer.convolution import ConvolutionalLayer as Conv...
NifTK/NiftyNet
niftynet/network/interventional_dense_net.py
Python
apache-2.0
12,464
[ "Gaussian" ]
66aa5a70d6b83847a2da175e27ed4d0234db25833ad93e5ac6b858ddd69ef0c7
"""Notifications for Android TV notification service.""" import base64 import io import logging import requests from requests.auth import HTTPBasicAuth, HTTPDigestAuth import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, ...
tboyce021/home-assistant
homeassistant/components/nfandroidtv/notify.py
Python
apache-2.0
9,890
[ "Amber" ]
84e0802e2adfd04bbcc0623d137c523d1f01440a906f02c4a03d1f3722126209
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
thica/ORCA-Remote
src/ORCA/widgets/FileBrowser.py
Python
gpl-3.0
6,800
[ "ORCA" ]
cbb91f60d16860619bdb76274630a0b624b13bcef3d1fc93c714b4de137e8c25
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/ajax/about.py
Python
gpl-2.0
8,779
[ "VisIt" ]
ce76ff1c9e7cf8adcc51f9895c4c938555e28b348cfcda805ef81bd5a6790506
# Modified from function.py --- import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import moose simtime = 1.0 def test_example(): moose.Neutral('/model') function = moose.Function('/model/function') function.c['c0'] = 1.0 function.c['c1'] = 2.0 #function.x...
dilawar/moose-core
tests/core/test_function_example.py
Python
gpl-3.0
3,483
[ "MOOSE" ]
d66c4ef9419cfe6d836dfbc167b7c19a6de7bd65b05cdbd8f832ae5ebf7ce738
# vclamp.py --- # # Filename: vclamp.py # Description: # Author: # Maintainer: # Created: Sat Feb 2 19:16:54 2013 (+0530) # Version: # Last-Updated: Tue Jun 11 17:35:20 2013 (+0530) # By: subha # Update #: 178 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change log: #...
dilawar/moose-full
moose-examples/snippets/vclamp.py
Python
gpl-2.0
4,395
[ "MOOSE" ]
2784ac8f109589486de53382d93673e0fd3585187b869ac6b1256f04dcd13da1
#! /usr/bin/python import os SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) import sys sys.path.append(SCRIPT_PATH + '/../src/') import re; import subprocess import multiprocessing import getpass from time import gmtime, strftime from dataspec import * ASSEMBLER_TYPE = 'nonhybrid'; # hybrid or nonhybr...
kkrizanovic/DNAssMark
wrappers/wrapper_lqs.py
Python
mit
42,870
[ "BWA", "BioPerl", "Biopython", "pysam" ]
5837bda516dc13bcc7706af159d51ad1db3722d13916bde9310402f335873f50
from random import random from ase.io import write from ase.optimize import BFGS from ase.calculators.emt import EMT from ase.ga.data import DataConnection from ase.ga.population import Population from ase.ga.standard_comparators import InteratomicDistanceComparator from ase.ga.cutandsplicepairing import CutAndSpliceP...
askhl/ase
doc/tutorials/ga/basic_example_main_run.py
Python
gpl-2.0
3,182
[ "ASE" ]
25142bee3e05468428ea6a20a181036cb3ef1aea73e6af6e604a0c40778be6d2
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Converting code parameters and components from python (PsychoPy) to JS (ES6/PsychoJS) "...
psychopy/psychopy
psychopy/experiment/py2js.py
Python
gpl-3.0
7,711
[ "VisIt" ]
46314f456082b42f80c7491f1233147bf81ab4fe9569a633941e432878da3b57
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Related scripts for the HLI-STR (TREDPARSE) paper. """ import os.path as op import os import csv import sys import vcf import logging import shutil import json import numpy as np import pandas as pd from collections import defaultdict from random import sample from py...
tanghaibao/jcvi
jcvi/projects/str.py
Python
bsd-2-clause
67,829
[ "BWA", "pysam" ]
e5c749f5808f73408ad397add5048a20793c70d2c52aae7ece6452f3b5c5a293
# -*- coding: utf-8 -*- # moose.py --- # # Filename: moose.py # Description: THIS IS OUTDATED CODE AND KEPT FOR HISTORICAL REFERENCE # moose.py in this directory is the replacement for this # script. # # Author: Subhasis Ray # Maintainer: # Copyright (C) 2010 Subhasis Ray, all rights reserved....
upibhalla/moose-core
python/moose/alternate.py
Python
gpl-3.0
39,839
[ "MOOSE" ]
a233b9a15149a6d1cc053eac90a1da9649edb48c9d92216e798d752d6a96e26d
#!/usr/bin/env python # pmx Copyright Notice # ============================ # # The pmx source code is copyrighted, but you can freely use and # copy it as long as you don't change or remove any of the copyright # notices. # # ---------------------------------------------------------------------- # pmx is Copyright (C...
dseeliger/pmx
scripts/mutate.py
Python
lgpl-3.0
18,272
[ "Amber", "CHARMM" ]
8e2541c5329f63d64dc0e59e55149715ebafb2c3c7794e6fe51d1f15ad567f82
""" Utility functions for analysis of MRS data. """ import warnings import numpy as np import scipy.linalg as la import scipy.stats as stats import nitime.timeseries as nts """ lowess: Locally linear regression ================================== Implementation of the LOWESS algorithm in n dimensions. [FHT] Frie...
rhancockn/MRS
MRS/utils.py
Python
mit
16,294
[ "Gaussian" ]
5252eb47273bbab5ca3d6446e1d7fd57ba50054a6952a8daadfc8d0b22292743
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import os import random import unittest import json import six from monty.os.path import which from pymatgen import Lattice, PeriodicSite from monty.json impor...
matk86/pymatgen
pymatgen/transformations/tests/test_standard_transformations.py
Python
mit
19,196
[ "VASP", "pymatgen" ]
b72f9bd726398941a83a0123e1b0a3d4ac8a2f5427b56c58bf62a909e76ddd72
''' Second numerical example for the No-Regret work @author: Maximilian Balandat, Walid Krichene @date: Oct 9, 2014 ''' # from ContNoRegret import Domain, GaussianLossFunction, Problem # # # define some parameters # T = 0 # # # Create a domain # S = Domain(parameters) # # # Create a list of loss functions # loss...
Balandat/cont_no_regret
old_code/CNR_example2.py
Python
mit
2,161
[ "Gaussian" ]
a6323be93d5893ae4ba27a03130d34caf30f9befbfe8b2f1b4b668ec4bab2701
#!/usr/bin/env python2.7 from bap import bil from bap import adt from functools import partial from model import BapInsn from bitvector import ConcreteBitVector import collections class Memory(dict): def __init__(self, fetch_mem, initial=None): self.fetch_mem = fetch_mem if initial is not None: self.u...
KernelAnalysisPlatform/KlareDbg
tracers/concrete_executor/concrete_execution.py
Python
gpl-3.0
9,870
[ "VisIt" ]
f738aa697087d28b3385b64ac72e57bf31b8960df8a2a781b89fdef7f5ca9bfa
#!/usr/bin/env python """ Module merges a list a bam file sharing the same read group. """ import argparse import pysam import os def get_bam_pairs(bams): """ Function returns pairs of bam files because sample ID relies on samples being encoded with a '.' @bams A List of Bam files. ...
smilefreak/ancient_dna_pipeline
python_scripts/merge_bams.py
Python
mit
1,926
[ "pysam" ]
23b1ad8bba6be654ca1a3f505a318c9b3b7cd0fa09754def806fa28d8ee80889
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # """ This file contains classes and methods to generate input files The FiniteDifferencesPhononFlow """ from qepy.pw import PwIn from qepy.ph import PhIn from qepy.pwxml import PwXML from qepy.lattice import...
alexmoratalla/yambopy
yambopy/io/factories.py
Python
bsd-3-clause
24,388
[ "Yambo", "pymatgen" ]
552ad34b441c9f0ec9a774a2f4fe9dd5cecb75a9a70b182f938b10c97237d674
""" IODINE FRANCK-CONDON FACTOR CALCULATOR AND VIBRONIC SPECTRUM PREDICTOR Uses a Morse potential formalism to calculate the Franck-Condon factors for the X-->B vibronic transition for iodine. Experimental data taken from NIST. Requires Robert Johansson's "wavefunction" library, found here: https://github.com/jrjo...
nseifert/oddities
chemistry/iodine_fc_vibronic_spec.py
Python
mit
7,198
[ "Gaussian" ]
0ecaf9b1f5ebfeb063e75958b4d1cc742c66de29ff2e1f7937735a08f960fae3
#!/usr/bin/env python """Classes for storing and manipulating a phylogenetic tree. These trees can be either strictly binary, or have polytomies (multiple children to a parent node). Trees consist of Nodes (or branches) that connect two nodes. The Tree can be created only from a newick formatted string read either fr...
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/cogent/core/tree.py
Python
mit
85,847
[ "VisIt" ]
bbc6c222f469ae30c03d77b53a923169e2f437bb78aeae83eaa9988b98b33680
#-*- coding: utf-8 -*- # # test webfs_upload.py # PV` Created on 26/09/2015. # # Bases: #--------------------------------------------------- # 2006/02 Will Holcomb <wholcomb@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Licen...
pvvx/RTL00_WEB
tools/webfs/py/webfs_upload1.py
Python
unlicense
5,374
[ "Brian" ]
db2d39daca3b2c3edb8738b56e7e7ddb574724fb4f60d0ccccf32741c3686b41
import py import sys @py.test.mark.parametrize('name', [x for x in dir(py) if x[0] != '_']) def test_dir(name): obj = getattr(py, name) if hasattr(obj, '__map__'): # isinstance(obj, Module): keys = dir(obj) assert len(keys) > 0 print (obj.__map__) for name in list(obj.__map__)...
thiagopnts/servo
tests/wpt/web-platform-tests/tools/third_party/py/testing/root/test_py_imports.py
Python
mpl-2.0
1,977
[ "VisIt" ]
cefb74819852b367800f3c68066e2f795cb1ee6ceb082e5b9f07e3ea22bc14bf
#!/usr/bin/env python import glob import os import defopt import numpy as np import pandas as pd import xarray as xr import data.observational from data.observational import DataType, Platform, Sample, Station # These files were created by our scripts so they don't have nice attributes # like standard_name, etc. # ...
DFO-Ocean-Navigator/Ocean-Data-Map-Project
scripts/data_importers/concepts_drifter.py
Python
gpl-3.0
4,495
[ "NetCDF" ]
c68edb8f7a1f8f84e83e1c00e327b469ee7713b5ab6452f5b05e8f2043ccf7ff
""" Evolutionary statistics (:mod:`skbio.stats.evolve`) =================================================== .. currentmodule:: skbio.stats.evolve This package contains statistics pertaining to phylogenies and evolution. Cophylogenetic methods ---------------------- These functions test for correlation between phylo...
jdrudolph/scikit-bio
skbio/stats/evolve/__init__.py
Python
bsd-3-clause
1,075
[ "scikit-bio" ]
8daac5ce5ec843e5aef70f1a40b5198cd449b244ece2aac5b8b27a54fd68ccc3
# -*- coding: utf-8 -*- # # license: AGPLv3, see LICENSE for details. In addition we strongly encourage # you to buy us beer if we meet and you like the software. """Tests for session.""" from bson import ObjectId from passlib.context import CryptContext from passlib.hash import pbkdf2_sha256 from amivapi.au...
amiv-eth/amivapi
amivapi/tests/auth/test_sessions.py
Python
agpl-3.0
9,571
[ "VisIt" ]
ae04327950acbcd6b77b3158f5eef393dfea4ad0494b0b2deb26c55bea01cc92
""" This is used to test the ElasticSearchDB module. It is used to discover all possible changes of Elasticsearch api. If you modify the test data, you have to update the test cases... """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # TODO: move to pytes...
yujikato/DIRAC
tests/Integration/Core/Test_ElasticsearchDB.py
Python
gpl-3.0
21,505
[ "DIRAC" ]
253e03c9dd89235f565641ce6426922898acaebaa38ca9134beb292c7e7303e0
def get_words(): return """abacus abased abases abated abates abbess abbeys abbots abduct abhors abided abides abject abjure ablaze ablest abloom aboard abodes aborts abound abrade abroad abrupt absent absorb absurd abused abuser abuses acacia accede accent accept access accord accost accrue accuse acetic achier achin...
ianmiell/shutit
shutit_assets.py
Python
mit
50,564
[ "CASINO", "Galaxy", "Jaguar", "NEURON", "SIESTA", "TINKER" ]
b9c4dbcb16fb7ccd30ef39684f30ccc098005569bd85842a8a086a4bd11f6e29
""" Acceptance tests for Content Libraries in Studio """ from ddt import ddt, data from nose.plugins.attrib import attr from flaky import flaky from .base_studio_test import StudioLibraryTest from ...fixtures.course import XBlockFixtureDesc from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.utils ...
RPI-OPENEDX/edx-platform
common/test/acceptance/tests/studio/test_studio_library.py
Python
agpl-3.0
28,099
[ "VisIt" ]
00d78ecc983b2d92a05ad1807b7c13e2a933996fd76614cd307f8849e9533720
''' Created on 2012-11-10 @author: Andre R. Erler ''' ## imports from numpy import array, arange, zeros, diff import os import re # netcdf stuff from netcdf import Dataset, add_coord, copy_dims, copy_ncatts, copy_vars # data root folder from socket import gethostname hostname = gethostname() if hostname=='komputer':...
aerler/WRF-Tools
Python/archive/avgWRF_1979.py
Python
gpl-3.0
8,599
[ "NetCDF" ]
36dc165a54c5113cda006a96d43ea050607e213cdf74b32e058af03875f9dac0
# $Id$ # # Copyright (C) 2002-2006 greg Landrum and Rational Discovery LLC # # @@ 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. # """ exposes a class for...
jandom/rdkit
rdkit/Chem/FragmentMatcher.py
Python
bsd-3-clause
2,262
[ "RDKit" ]
ba304ddd5169f06035ad3ff7ccb3e5febdf6498b0b70b63a4aacd0ea9c91f0b7
''' This job class should not be used to create jobs. It shouldn't need changes either. Use L{UserJob} or L{ProductionJob}. @author: Stephane Poss ''' from DIRAC.Interfaces.API.Job import Job as DiracJob from DIRAC.Core.Utilities.PromptUser import promptUser from DIRAC.Core....
sposs/DIRACInterfaceDoc
code/Interfaces/API/Job.py
Python
gpl-2.0
12,765
[ "DIRAC" ]
aeac9b2be2937ff5bedd518deaea74ba3935a78ef6e4cd84f16c6de5f124d5e5
tests = [("python", "UnitTestChem.py", {}), ("python", "UnitTestChemv2.py", {}), ("python", "UnitTestChemAtom.py", {}), ("python", "UnitTestChemBond.py", {}), ("python", "UnitTestChemSmarts.py", {}), ("python", "UnitTestFragmentDescriptors.py", {}), ("python", "UnitTestGraphDescriptors_2.py",...
ptosco/rdkit
rdkit/Chem/test_list.py
Python
bsd-3-clause
2,676
[ "RDKit" ]
820749bae5ef71966df74ebbb5cba9edcc9c9e2b1a16e56322fc0b8dd0ad5a58
"""SAMPLE ENTROPY --------------------------------------------------------------------------- Last revised: 19 May 2016 (by joe@kinsa.us) - Moved functions out of the init method and into separate modules - Revised normalize data to more closely match the original C script; fixing some looping and mathematical bugs...
jbergantine/sampen
sampen/__init__.py
Python
gpl-2.0
1,513
[ "VisIt" ]
d42ad03934e25b4ef5bb4162102c5f0726596c7eb082e4d0914ebf129d551053
# # Copyright (C) 2003, 2004 Norwegian University of Science and Technology # Copyright (C) 2006, 2007, 2009, 2011, 2013 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License ver...
alexanderfefelov/nav
python/nav/web/__init__.py
Python
gpl-2.0
2,406
[ "VisIt" ]
ddcd37bfbcbe57e1954c7fc95325614095610f4697f4f1874428f9fd5e315ce3
from ase.parallel import paropen from ase.units import Hartree from gpaw.xc.rpa import RPACorrelation rpa1 = RPACorrelation('N.gpw', txt='rpa_N.txt') rpa2 = RPACorrelation('N2.gpw', txt='rpa_N2.txt') E1_i = rpa1.calculate(ecut=400) E2_i = rpa2.calculate(ecut=400) f = paropen('rpa_N2.dat', 'w') for ecut, E1, E2 i...
robwarm/gpaw-symm
doc/tutorials/rpa/rpa_N2.py
Python
gpl-3.0
406
[ "ASE", "GPAW" ]
5ea158c3e8c64570e53f15486004f9378897a2cb425ba1719e10277bfbcf033f
""" This module contains the objective function used by Spearmint when searching for good hyperparameters. In short, the objective function is the Re(r) where r is a complex number such that exp(r * t) is the best fit to the autocorrelation """ import numpy as np import pickle import os import tensorflow as tf i...
rueberger/MJHMC
mjhmc/search/objective.py
Python
gpl-2.0
8,155
[ "Gaussian" ]
adf2c7b1bc3c39614da21aed808f06b65200a4db070788bba5fc3c5bdefb7233
""" Module for three dimensional baroclinic solver """ from __future__ import absolute_import from .utility import * from . import shallowwater_eq from . import momentum_eq from . import tracer_eq from . import turbulence from . import coupled_timeintegrator import thetis.limiter as limiter import time as time_mod impo...
tkarna/cofs
thetis/solver.py
Python
mit
64,942
[ "VTK" ]
23616de1e13e03a2ff480646232036fed6301da821dc1c2b6e606ca96b8f4fc0
# $Id$ # # Copyright (C) 2007 greg Landrum # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # import unittest import doctest from rdkit.DataStruct...
bp-kelley/rdkit
rdkit/DataStructs/UnitTestDocTests.py
Python
bsd-3-clause
2,982
[ "RDKit" ]
762d147a005d66147eed076e4b46c8b685fecaf87478fe867c8a3c4b2b275739
# Licensed under the terms of the GPL v3. See LICENCE for details import math from itertools import product from galaxy import StarSystem from milkyway import SolX, SolY class AStar(object): def __init__(self, graph): self.graph = graph def heuristic(self, node, start, end): raise NotImplem...
RobSis/fe2router
pathfinder.py
Python
gpl-3.0
3,714
[ "Galaxy" ]
3e8d3434a93d05fe09e6ed208d951e46996a07b23c1b8ce07d2eba4b49c99193
# encoding: utf8 import re from random import * from collections import Counter from pprint import pprint from heapq import nlargest from time import time # http://blog.echen.me/2011/08/22/introduction-to-latent-dirichlet-allocation/ # https://tedunderwood.com/2012/04/07/topic-modeling-made-just-simple-enough/ # -> h...
mobarski/sandbox
topic/lda/lda4.py
Python
mit
5,951
[ "COLUMBUS" ]
6c41ab4bd546993810c1f2c1cf18ee1b689c5f503ebcf3a323aec852d9c40897
""" =========================== Formaldehyde cm-line fitter =========================== This is a formaldehyde 1_11-1_10 / 2_12-2_11 fitter. It includes hyperfine components of the formaldehyde lines and has both LTE and RADEX LVG based models Module API ^^^^^^^^^^ """ from __future__ import print_function import nu...
jpinedaf/pyspeckit
pyspeckit/spectrum/models/formaldehyde.py
Python
mit
23,644
[ "Gaussian" ]
9351bb105ad774a10b08d6a6c6ec36656d9024d0e7ad9b6a357bbbc28cc8ea61
import numpy as np class Neuron: def __init__(self, inputs, f): self.__inputs = inputs # количество входов self.__f = f # передаточная функция self.v = 0 # значение последнего рассчитанного локального поля self.s0 = (-0.5 + np.random.sample()) # значение сдвига ...
allsilaevex/NeuralNetwork
NeuralNetwork/neuron.py
Python
mit
861
[ "NEURON" ]
8898b6da1bca0fdbd5e7e89b452888ab9c3800ac25a091000b854f4a1b47966e
#!/usr/bin/env python from __future__ import print_function from random import randrange, choice, shuffle, randint, seed, random from math import sqrt from collections import deque, defaultdict import base64 from fractions import Fraction import operator import itertools from game import Game from copy import deepcop...
ido777/Skillz
starter_kit/lib/pirates.py
Python
mit
58,857
[ "exciting" ]
6d86d87463644f27121134f1ea59ea113b9e3794f27b5ba59528e1bb491325c4
from BrowserManager import Browser from DataAggregator import DataAggregator from SocketInterface import clientsocket from PostProcessing import post_processing from Errors import CommandExecutionError import MPLogger from multiprocessing import Process, Queue from Queue import Empty as EmptyQueue from sqlite3 import ...
lightnarcissus/PlayfulMesh
OpenWPM/automation/TaskManager.py
Python
gpl-3.0
20,042
[ "VisIt" ]
13313bda7987261481fb053fb4b68c1714af10a6bcf9404dc38f051924ea4296
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() def GetRGBColor(colorName): ''' Return the red, green and blue components for a color as doubles. ''' rgb = [0.0, 0.0, 0.0] # black vtk.vtkNamedColors...
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/Filters/General/Testing/Python/edgePoints.py
Python
gpl-3.0
1,711
[ "VTK" ]
642062abd011a5bf459925494ba488255f06ac788079a9a16917379474bfcf4d
"""Tests for routines in force_constants.py.""" import numpy as np import pytest from phonopy import Phonopy from phonopy.harmonic.force_constants import cutoff_force_constants from phonopy.structure.cells import get_primitive fc_1_10_ref = [ -0.037549, 0.000000, 0.000000, 0.000000, 0.002415, ...
atztogo/phonopy
test/harmonic/test_force_constants.py
Python
bsd-3-clause
3,131
[ "phonopy" ]
db6e01aabdd5fdbd33d5022e7c97583267c50a73d4feca152bc74a19b1c64ccb
#!/usr/bin/python from Pegasus.DAX3 import * import sys import os from stat import * def split_list(alist, elements_per_slice): results = [] for start in range(0, len(alist), elements_per_slice): results.append(alist[start:start+elements_per_slice]) return results def concat_outputs(dax, level...
pegasus-isi/BLAST-Workflow
dax-generator.py
Python
apache-2.0
3,547
[ "BLAST" ]
4363840cab52e678cc749a0dfc7c438ba4d0cc03d79f5b7af2a629126d117498
from querylist import BetterDict from tests.base import TestCase class BetterDictActsAsDict(TestCase): """BetterDicts should act just like dictionaries""" def setUp(self): self.src_dict = { 'foo': 1, 'bar': 2, 'kitten': 3, 'update': 4, } ...
thomasw/querylist
tests/betterdict_dict_tests.py
Python
mit
1,174
[ "BLAST" ]
5b1223b8ead9c009ff7b4f706169df1873afff5df74e8126d7159a6c20870fe1
#!/usr/bin/env python import inspect from typing import List from typing import Union from collections import OrderedDict import os import copy import re import glob import argparse import logging from importlib import import_module import yaml logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def ni...
galaxy-iuc/command-engine
autobuilder.py
Python
gpl-3.0
29,156
[ "Galaxy" ]
4b5b6f494717ab31debf8cd748f4aa0bf02879a5b7d50c94dc9de90551f5f3b2
#!/usr//bin/env python # lammps.py (2011/03/28) # An ASE calculator for the LAMMPS classical MD code available from # http://lammps.sandia.gov/ # The environment variable LAMMPS_COMMAND must be defined to point to the LAMMPS binary. # # Copyright (C) 2009 - 2011 Joerg Meyer, joerg.meyer@ch.tum.de # # This librar...
slabanja/ase
ase/calculators/lammps.py
Python
gpl-2.0
27,425
[ "ASE", "LAMMPS" ]
69d180b5eff45755715bb7bd02cbbba18738789b922761158b833536b72a6299