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 |
|---|---|---|---|---|---|---|---|
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
import colle... | harterj/moose | python/moosesqa/LogHelper.py | Python | lgpl-2.1 | 1,699 | [
"MOOSE"
] | 150cccc3ed1498567f26912e1a3e8488b4eb5fb5d65edfc0e960b975ab53e6e8 |
## This parameter file contains python expressions with info on files
## and parameters.
## Note that many other parameters are specified in the parameters.py
## file in the repository. It possible to change the values for those
## other parameters simply by adding them (with a different value) to
## this file. Values... | ecbush/xenoGI | misc/xlParams.py | Python | gpl-3.0 | 4,984 | [
"BLAST"
] | 5bcb5fa75ef4c8c9722b70a950ab16d272f57326eb925b98c5b5fbc88c750448 |
"""
Test of the classical LM model for language modelling
"""
from groundhog.datasets import LMIterator
from groundhog.trainer.SGD_momentum import SGD as SGD_m
from groundhog.trainer.SGD import SGD
from groundhog.mainLoop import MainLoop
from groundhog.layers import MultiLayer, \
RecurrentMultiLayer, \
Re... | vseledkin/LV_groundhog | tutorials/DT_RNN_Tut_Ex.py | Python | bsd-3-clause | 16,497 | [
"Gaussian"
] | b343f94592f0479284fff50c882a45a7d44918cde57f8fddda43d582707ec7f5 |
#!/bin/env/python
# -*- coding: utf-8 -*-
# http://docs.pylonsproject.org/projects/pyramid/dev/narr/testing.html
# #creating-functional-tests
import unittest
import transaction
class AccountantsFunctionalTests(unittest.TestCase):
"""
these tests are functional tests ... | AnneGilles/agx_pyramid_example2 | src/pyramidonal/tests/test_webtest.py | Python | bsd-3-clause | 2,696 | [
"Brian"
] | fcc9cbfc36623dfbb6c4be99f880868a1d582b1b00a8f14a1d4eb12dd1aafe63 |
################################################################################
# #
# Copyright (C) 2010-2018 The ESPResSo project #
# #
# This file is pa... | mkuron/espresso | doc/tutorials/06-active_matter/EXERCISES/rectification_simulation.py | Python | gpl-3.0 | 7,709 | [
"ESPResSo",
"ParaView",
"VTK"
] | dfae94eae632215e568285c592eaf0bf402f692f5453dccd5cd9cdac62b1c8f6 |
#############################################################################
# $HeadURL$
#############################################################################
""" ..mod: FTSRequest
=================
Helper class to perform FTS job submission and monitoring.
"""
# # imports
import sys
import re
import... | miloszz/DIRAC | DataManagementSystem/Client/FTSRequest.py | Python | gpl-3.0 | 37,261 | [
"DIRAC"
] | 4ab587246c570f3833d3c864499649994cd106fa49081991ac2d720e19419127 |
import sys
import numpy as np
def read_cube(filename):
f=open(filename, 'r')
cube={}
cube['comment']=f.readline()
cube['type']=f.readline()
spl=f.readline().split()
cube['natoms']=int(spl[0])
cube['origin']=list(map(float, spl[1:]))
cube['npoints']=np.array([0,0,0])
cube['latvec']=np.zeros((3,3))
f... | willwheelera/mainline | utils/cubetools.py | Python | gpl-2.0 | 3,284 | [
"CRYSTAL"
] | 537bf4bf148585474b4a8e3da88eb608995523e788798622209094473c9a1bb7 |
import numpy as np
import time
import region_growing_python as rgp
import region_growing as rgc
#from mayavi import mlab
nx = 61; ny = 51; nz = 71;
tx = np.linspace(-3,3,nx)
ty = np.linspace(-3,3,ny)
tz = np.linspace(-3,3,nz)
x,y,z = np.meshgrid(tx,ty,tz)
w = x**4 - 5*x**2 + y**4 - 5*y**2 + z**4 - 5*z**2
vol = -np... | notmatthancock/notmatthancock.github.io | code/py/region_growing/test_rg_c.py | Python | mit | 919 | [
"Mayavi"
] | 9b9bdc26c84d140fedfa424c9e283aff047c653ab2bb0d9fd58c1a1d3759d951 |
import sys
PY3 = (sys.version_info[0] >= 3)
if PY3:
string_types = str,
else:
string_types = basestring,
from pybindgen.utils import any, mangle_name
import warnings
import traceback
from pybindgen.typehandlers.base import Parameter, ReturnValue, \
join_ctype_and_name, CodeGenerationError, \
param_... | ftalbrecht/pybindgen | pybindgen/cppclass.py | Python | lgpl-2.1 | 185,463 | [
"VisIt"
] | 61d4c18bb4be4e95ef81f310cb3fbcb97c745cec160ac0b9034b8bdfc037b07f |
import logging
from shapely.geometry import *
from lib.raster import Raster
import numpy as np
from os import path
import sys
sys.path.append(path.abspath(path.join(path.dirname(__file__), "../../..")))
from lib.shapefileloader import Shapefile
from lib.exception import DataException, MissingException
from lib.metrics ... | SouthForkResearch/CHaMP_Metrics | tools/topometrics/methods/thalweg.py | Python | gpl-3.0 | 6,178 | [
"VisIt"
] | 2b597a925c2570aea46d5c30d4431ee40b6866c118488b288a26f55e385fdde4 |
# Copyright (C) 2020 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 versio... | fweik/espresso | testsuite/scripts/utils/test_maintainer_CI_jupyter_warnings.py | Python | gpl-3.0 | 2,123 | [
"ESPResSo"
] | e8f1590aeda1c1d34574b993f914c21b3f7529219b31f3b2c5e7b80e1f01ca93 |
#
# Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyrigh... | rvianello/rdkit | rdkit/Chem/SaltRemover.py | Python | bsd-3-clause | 9,561 | [
"RDKit"
] | 80930288f43c04a2c42dc3a14b1fcf25bb67b6751cb21daff1f1b1a7b1b21edb |
"""
Test that the elastic scatter system updates it's state when the number of
atoms change.
"""
# TODO: We should also check that the state updates if whe transmute elements
from pyiid.tests import *
from pyiid.experiments.elasticscatter import ElasticScatter
from ase import Atom
__author__ = 'christopher'
def chec... | CJ-Wright/pyIID | pyiid/tests/test_scatter_state.py | Python | bsd-3-clause | 2,680 | [
"ASE"
] | 70b45646c482c5ee399d5d79773605c8323e42da32fed7daf999bc10c57298ad |
########################################################################
# File : LocalComputingElement.py
# Author : Ricardo Graciani, A.T.
########################################################################
""" LocalComputingElement is a class to handle non-grid computing clusters
"""
import os
import stat
i... | andresailer/DIRAC | Resources/Computing/LocalComputingElement.py | Python | gpl-3.0 | 10,662 | [
"DIRAC"
] | 06fbda637cee6e05da9060d0406eea71a99503d874aa2f5ffae50eb776e4ac90 |
from __future__ import print_function, division, absolute_import
from mdtraj.utils.six import PY2
from mdtraj.utils.six.moves import xrange
import sys
import types
import random
import numpy as np
try:
import fastcluster
except ImportError:
pass
import scipy.cluster.hierarchy
import mdtraj as md
from msmbuild... | mpharrigan/msmbuilder | MSMBuilder/clustering.py | Python | gpl-2.0 | 49,464 | [
"MDTraj"
] | af35bbc5ec55b479f53af6eb9a0bf39501fb4dd9a0abcc844cda0ff342b8df7c |
#!/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.
# ---------------------... | Jorge-C/bipy | skbio/app/util.py | Python | bsd-3-clause | 31,203 | [
"BLAST",
"scikit-bio"
] | 3a3993dde766acfeedadb6999820b417be581f9fda5bae558c0b790d19160fb6 |
import theano
import numpy
from theano import tensor as TT
def accumulate(input, neuron, time=1.0, init_time=0.05):
"""Take a neuron model, run it for the given amount of time with a fixed input
Used to generate activity matrix when calculating origin decoders
Returns the accumulated output over that time ... | printedheart/opennars | nars_gui/src/main/python/nef_theano/neuron/neuron.py | Python | agpl-3.0 | 2,326 | [
"NEURON"
] | 8157cff1543e0176a02f926f6aa45207696bce323e9ce6dbc43d9b234697e3cf |
"""
NL2BR Extension
===============
A Python-Markdown extension to treat newlines as hard breaks; like
StackOverflow and GitHub flavored Markdown do.
Usage:
>>> import markdown
>>> print markdown.markdown('line 1\\nline 2', extensions=['nl2br'])
<p>line 1<br />
line 2</p>
Copyright 2011 [Brian Neal]... | mozilla/mozilla-ignite | vendor-local/lib/python/markdown/extensions/nl2br.py | Python | bsd-3-clause | 796 | [
"Brian"
] | 4da58b21744bcb3bf4f55fdd3571b2c54c55f388b2c002b1a0cc6c9b3856dcbc |
import json
from json import JSONEncoder
import numpy as np
import os
from pymicro.xray.detectors import Detector2d, RegArrayDetector2d
from pymicro.crystal.lattice import Lattice, Symmetry
from pymicro.crystal.microstructure import Microstructure, Grain, Orientation
class ForwardSimulation:
"""Class to represent... | heprom/pymicro | pymicro/xray/experiment.py | Python | mit | 21,397 | [
"CRYSTAL"
] | 229962dda23fd0d091b885253a9a0e5220063c38b0ab64d53dea10eb36856c76 |
# -*- coding: utf-8 -*-
#
# brunel_siegert_nest.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the Lic... | terhorstd/nest-simulator | pynest/examples/brunel_siegert_nest.py | Python | gpl-2.0 | 8,534 | [
"NEURON"
] | 5048fd946a44280e5e729794b857bb64c994eca953ae2b3ea9305f88bdfca58f |
import os
from socket import gethostname
import time
import urllib
from uuid import getnode as getmac
import webbrowser
import httplib2 # included with oauth2client
from oauth2client.client import OAuth2WebServerFlow, TokenRevokeError
import oauth2client.file
import gmusicapi
from gmusicapi.clients.shared import _Ba... | dvirtz/gmusicapi | gmusicapi/clients/musicmanager.py | Python | bsd-3-clause | 24,772 | [
"VisIt"
] | e2e0588ec9e37b6810bc4fd03cc66e1b9f2a18d8668e181ceda56545479cd4d5 |
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/linux_packages/speccpu.py | Python | apache-2.0 | 26,828 | [
"GAMESS",
"Gromacs",
"NAMD",
"VisIt"
] | 6577e1ddd2b696dec149af4dcdd2954455a5545fede98abe39b0c6ffc529b142 |
#!/usr/bin/python
"""Test of label guess functionality."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
sequence.append(PauseAction(3000))
sequence.append(KeyComboAction("<Control>Home"))
sequence.append(utils.StartRec... | GNOME/orca | test/keystrokes/firefox/label_inference_mailman.py | Python | lgpl-2.1 | 6,492 | [
"VisIt"
] | 1a7757d571ed41e4980d3026e606cbac2e97c5497a2bf4bfc7e33b941729d1f2 |
# Copyright (C) 2021
# Sebastian Eibl, Max Planck Computing & Data Facility
#
# 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... | espressopp/espressopp | src/io/RestoreH5MDParallel.py | Python | gpl-3.0 | 1,924 | [
"ESPResSo"
] | 17155c7ab50a29322eb0c0af79c8a9a71f7100f13a21b5cc812b5aed479b2c09 |
#!/usr/bin/env python
"""
Deploy all scripts and extensions
Options:
* --symlink: this will create symlinks instead of wrappers
* <python path>: you can specify the folder where your python installation should be fetched from
to replace the shebang
"""
from __future__ import print_function
__RCSID__... | chaen/DIRAC | Core/scripts/dirac-deploy-scripts.py | Python | gpl-3.0 | 7,696 | [
"DIRAC"
] | 3df2874f77d3abaad9b2b3b7749d175b091b88e63a59a84c06f20087fe34e5ae |
#!/usr/bin/env python
import sys
import subprocess
sys.path.append('.')
from utils import get_version_from_github
meta_template = """
package:
name: {pytraj_status}
version: !!str {pytraj_version}
source:
{source}
requirements:
build:
- python
- cython
- libcpptraj-pytraj-v{pytraj_version} {libcpp... | Amber-MD/conda-recipes | pytraj/make_meta.py | Python | bsd-2-clause | 2,203 | [
"Amber"
] | abdcea111dc1f2c3bd39e2859146970d88c68af3865e4754df451b6cb14ea801 |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Okinawa Institute of Science and Technology, Japan.
#
# This script runs on STEPS 2.x http://steps.sourceforge.net
#
# H Anwar, I Hepburn, H Nedelescu, W Chen and E De Schutter
# Stochastic calcium mechanisms cause dendritic calcium spike... | CNS-OIST/STEPS_Example | publication_models/API_1/Anwar_J Neurosci_2013/HybridCaburst_stochBK.py | Python | gpl-2.0 | 29,174 | [
"Avogadro"
] | 844475006eed21c5d055e1dc632fb35513228f5fc6752594b8bab44980946cf8 |
from pymc.gp import *
from pymc.gp.cov_funs import *
from numpy import *
# Covariance
C = Covariance(eval_fun = matern.euclidean, diff_degree = 1.4, amp = 1., scale = 1.)
# C = Covariance(eval_fun = pow_exp.euclidean, pow=1., amp=1., scale=1.)
# C = Covariance(eval_fun = quadratic.euclidean, phi=1., amp=1., scale=.2)
... | matthew-brett/pymc | pymc/examples/gp/covparams.py | Python | mit | 1,302 | [
"Gaussian"
] | f010c7d4b44f68a37d795932c3a3dfec5abdac07944e0369013e20c0474921b8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2018 Miha Purg <miha.purg@gmail.com>
#
# 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, in... | mpurg/qtools | packages/Qpyl/core/qlibrary.py | Python | mit | 37,201 | [
"Amber",
"MacroModel"
] | a89b48658868d3af915a6349a1571bcbd21ae0ecd54a0a6439ff5c8b1e0be239 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Implements three classes representing the information in CONTCAR and
OUTCAR files and frequenices calculated using phononpy.
"""
import re
import math
import warnings
import numpy as np
class CONTCAR(object):
"""POSCAR file parser.
Attributes denoted as array ... | NanoSim/Porto | porto/src/remark-wrapper/resource/vasp_outcar.py | Python | gpl-3.0 | 17,915 | [
"ASE",
"VASP"
] | db4183f11f5dd5a1d7482f5d7cedf3dc445560b4cd5bf731cfee63ae05ccd811 |
#!/usr/bin/env python
# This file is part of the Better Python Console Plugin for Gedit
# Copyright (C) 2007 Zeth Green <zethgreen@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 Softwar... | jmanoel7/my_dot_files | .local/share/gedit/plugins/betterpythonconsole/consoleinterface.py | Python | gpl-3.0 | 21,009 | [
"VisIt"
] | 03b99dc0acc0034984bdf4a7f9d3e32fdf785726e8c170e1cd48328af08f0d83 |
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
import gtk, gobject, pango
from zeroinstall.support import tasks, pretty_size
from zeroinstall.injector import model, reader
import properties
from zeroinstall.gtkui.icon import load_icon
from zeroinstall import supp... | pombredanne/zero-install | zeroinstall/0launch-gui/iface_browser.py | Python | lgpl-2.1 | 17,256 | [
"VisIt"
] | cefb082a44b7e4cb5de2086fe9201d8cec7e01307d3f9a71ed7a15fb40bba888 |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Eric Martin <eric@ericmart.in>
# License: BSD 3 clause
from itertools import chain, combina... | dhruv13J/scikit-learn | sklearn/preprocessing/data.py | Python | bsd-3-clause | 55,482 | [
"Gaussian"
] | ff474d0a44ebd93da6e233a13dbf9402795a57beba940e34ec983ea16322cada |
# Most of this code is:
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# The server command includes the additional header:
# For discussion of daemonizing:
# http://aspn.activestate.com/ASPN/C... | jmchilton/pulsar | galaxy/util/pastescript/serve.py | Python | apache-2.0 | 36,299 | [
"Galaxy"
] | b3efb2dbbc7c56e18e6c8d4e5a80e5d97c353d9a46541d1b3a288ae9b6d1eca3 |
# efield.py ---
#
# Filename: efield.py
# Description:
# Author: Subhasis Ray
# Maintainer:
# Created: Thu Jul 21 15:12:50 2011 (+0530)
# Version:
# Last-Updated: Thu Jul 21 15:28:48 2011 (+0530)
# By: Subhasis Ray
# Update #: 38
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#... | BhallaLab/moose-thalamocortical | DEMOS/pymoose/device/efield.py | Python | lgpl-2.1 | 2,482 | [
"MOOSE"
] | e7deb3c201ffcd5da950135defd7d9b6586f5915691c8839e22e3542e48df6b8 |
# Copyright (C) 2017-2018 Michael Freitag, Shahin Amiriparian, Sergey Pugachevskiy, Nicholas Cummins, Björn Schuller
#
# This file is part of auDeep.
#
# auDeep 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, ... | auDeep/auDeep | audeep/cli/train.py | Python | gpl-3.0 | 23,445 | [
"NetCDF"
] | 347a76fe4b801f5a586a3e867c4f8c24a11848fdd4357f722869f1dffd7f476e |
"""Tkinter widgets for VTK."""
__all__ = ['vtkTkRenderWidget', 'vtkTkImageViewerWidget',
'vtkTkRenderWindowInteractor', 'vtkTkPhotoImage']
| hlzz/dotfiles | graphics/VTK-7.0.0/Wrapping/Python/vtk/tk/__init__.py | Python | bsd-3-clause | 155 | [
"VTK"
] | ed0fe4d339e06d0b4079c9ef14713e8d58332daa5535c931039836f7dd44d75f |
from bottle import route, run, request, response
from pcard.gen import create_card, SYMBOLS
_INDEX = """\
<h1>PCard</h1>
<p>Beware that anyone can sniff your secret when you post the form.
You should consider generating the card from your computer.</p>
<form action="/card" method="POST">
<input type="password" n... | tarekziade/pcard | pcard/server.py | Python | mit | 2,387 | [
"VisIt"
] | 99989e8d368ed8ba852e2e083161cfe1ac9bd27fffc196d3eaf58f376a28c3dc |
# -*- coding: utf-8 -*-
## Description: utility functions used while loading NeuroML L1,2,3 files.
## Version 1.0 by Aditya Gilra, NCBS, Bangalore, India, 2011 for serial MOOSE
## Version 1.5 by Niraj Dudani, NCBS, Bangalore, India, 2012, modified for parallel MOOSE
## Version 1.6 by Aditya Gilra, NCBS, Bangalore, Indi... | dharmasam9/moose-core | python/moose/neuroml/utils.py | Python | gpl-3.0 | 13,932 | [
"MOOSE"
] | 5717a3eb7af254efd6ac7006084c103450bb326ffe9320d3330182fd2d62a6df |
"""
## Automatically adapted for numpy.oldnumeric Jun 27, 2008 by -c
# $Id$
#
# Copyright (C) 2004 Rational Discovery LLC
# All Rights Reserved
#
Replaced numpy.oldnumeric with numpy methods - Jan 2015, PGedeck
"""
#pylint: disable=E1101,C0111,R0904
import unittest
import numpy as np
from rdkit import Dista... | soerendip42/rdkit | Code/DistGeom/Wrap/rough_test.py | Python | bsd-3-clause | 3,889 | [
"RDKit"
] | c9dbab8d0c2f8aa76499a60284e39b94d91c2e244a8395d2d3c09d613fd897d1 |
"""
The ``power_curves`` module contains functions for applying alterations like
power curve smoothing or reducing power values by an efficiency to the power
curve of a wind turbine, wind farm or wind turbine cluster.
SPDX-FileCopyrightText: 2019 oemof developer group <contact@oemof.org>
SPDX-License-Identifier: MIT
"... | wind-python/windpowerlib | windpowerlib/power_curves.py | Python | mit | 11,091 | [
"Gaussian"
] | 73ba8e12d2ebac59620010a852e5c1fb87b208dbbbb2664edca7edb8db439dc3 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.py | Python | lgpl-2.1 | 7,914 | [
"MOOSE",
"VTK"
] | f74dabfe6045112b6b348060863a23fea8c125806c3f0870de54fee743d3dd6c |
# Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | sajuptpm/neutron-ipam | neutron/tests/unit/test_policy.py | Python | apache-2.0 | 24,150 | [
"BLAST"
] | 350cd5cff4e1a098744b3b00f423aa6b3adcce8c3c0cc16494c82b5f885ca59c |
# -*- coding: ISO-8859-1 -*-
# code here
# This is a one-line c++ style comment
"""This is a multi line comment
yet another line of comment"""
"""This is a pretty multi line comment
yet another pretty line of comment
* with a list
"""
import os;
def foo():
"""This is an indented pretty multi line comment
... | alquerci/php2py | src/Instinct/Php2py/Tests/Fixtures/foo.py | Python | mit | 20,815 | [
"ESPResSo"
] | 907511d8dbf51e696dc963d51a62533696e6e0a615cff807dfb96c52586395a2 |
# !usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Licensed under a 3-clause BSD license.
#
# @Author: Brian Cherinka
# @Date: 2017-05-25 10:11:21
# @Last modified by: Brian Cherinka
# @Last Modified time: 2018-07-24 17:30:24
from __future__ import print_function, division, absolute_import
from marvin.tools.query ... | albireox/marvin | python/marvin/tests/tools/test_query.py | Python | bsd-3-clause | 11,937 | [
"Brian"
] | 8b84c782bf82a71bcd6730b1afb065efc892679efd99987f07c20e44aa534425 |
from ase import Atoms
from ase.units import Bohr
from gpaw import GPAW
from gpaw.test import equal
a = 7.5 * Bohr
n = 16
atoms = Atoms('He', [(0.0, 0.0, 0.0)], cell=(a, a, a), pbc=True)
calc = GPAW(gpts=(n, n, n), nbands=1, xc='PBE')
atoms.set_calculator(calc)
e1 = atoms.get_potential_energy()
niter1 = calc.get_number... | robwarm/gpaw-symm | gpaw/test/nonselfconsistent.py | Python | gpl-3.0 | 998 | [
"ASE",
"GPAW"
] | 79a1ad7bcf7e2ee2d9c965870bb902cf65adec9b40abe1d740770e5acfd747d2 |
#red blue green rbg, dashes squares triangles -- s ^
from ase.io import read
from ase.io.trajectory import PickleTrajectory
from ase.calculators.neighborlist import NeighborList
import matplotlib.pyplot as plt
from ase.units import fs, kB
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
def get_... | csmm/multiase | plot/plot_R.py | Python | gpl-2.0 | 2,606 | [
"ASE"
] | 37301a898748ce0770fc5a21f40ee9c7c7756d9a862a7aa52e5d61c1af17fe65 |
'''
@author: Edwin Simpson
'''
import sys, logging
import numpy as np
from copy import deepcopy
from scipy.sparse import coo_matrix
from scipy.special import psi
from scipy.stats import norm, gamma
from ibcc import IBCC
class GaussianIBCC(IBCC):
# hyperparameters
lamb0 = None # prior mean coefficient
... | christensen5/pyIBCC | python/gaussianibcc.py | Python | mit | 7,912 | [
"Gaussian"
] | 025496bb75cf943eceed14dea2936bce8742a781cd60653e476d329194336390 |
##############################################################################
# pymbar: A Python Library for MBAR
#
# Copyright 2010-2014 University of Virginia, Memorial Sloan-Kettering Cancer Center
#
# Authors: Michael Shirts, John Chodera
# Contributors: Kyle Beauchamp
#
# pymbar is free software: you can redistri... | kyleabeauchamp/pymbar | pymbar/utils_for_testing.py | Python | lgpl-2.1 | 6,858 | [
"MDTraj"
] | cfed04dbfc0d17f189f0e7748097e3a9b1ba33f2460c8e4cee9a0c9be2ac8441 |
# -*- coding: utf-8 -*-
"""
Plot mitoskel network in with various scalar values
"""
import sys
import os
import os.path as op
import matplotlib.pyplot as plt
from mayavi import mlab
from pipeline.make_networkx import makegraph as mg
from mombud.vtk_viz import vtkvizfuncs as vf
import wrappers as wr
# pylint: disable=C0... | moosekaka/sweepython | cell_pick_viz/vtk_makefigs.py | Python | mit | 1,735 | [
"Mayavi",
"VTK"
] | 17392738e4bfe3943c3ce946db23d8d6035550c06724060bcb96b49b7491d568 |
#!/usr/bin/env python
"""SfePy: Simple finite elements in Python
SfePy (simple finite elements in Python) is a software, distributed
under the BSD license, for solving systems of coupled partial
differential equations by the finite element method. The code is based
on NumPy and SciPy packages.
"""
DOCLINES = __doc__.... | vlukes/sfepy | setup.py | Python | bsd-3-clause | 8,496 | [
"Mayavi"
] | 19264cf28737c25e3031f71931088701d6053fdfce3eb4fee7f069baf9af7a2a |
import json
import urlparse
from .process import Process
from schema_salad.ref_resolver import Loader
from schema_salad.jsonld_context import makerdf
from rdflib import Graph, plugin, URIRef
from rdflib.serializer import Serializer
from typing import Any, Dict, IO, Text, Union
def gather(tool, ctx): # type: (Process,... | jeremiahsavage/cwltool | cwltool/cwlrdf.py | Python | apache-2.0 | 5,329 | [
"VisIt"
] | 7a52bc1195a8485fed5ccaa21fa18d1520c544bad96e7a56d6a1967f57486a2c |
from math import pi, sqrt
import numpy as np
from ase.atoms import Atoms
from gpaw.aseinterface import GPAW
from gpaw.wavefunctions.base import WaveFunctions
from gpaw.grid_descriptor import EquidistantRadialGridDescriptor
from gpaw.utilities import unpack
from gpaw.utilities.lapack import general_diagonalize
from gp... | qsnake/gpaw | gpaw/atom/atompaw.py | Python | gpl-3.0 | 10,741 | [
"ASE",
"GPAW"
] | 5c08045d4f6770598990e384ba5015cdd08b9d3aed0e886a39d953c357ae3a13 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | EmreAtes/spack | var/spack/repos/builtin/packages/neuron/package.py | Python | lgpl-2.1 | 8,641 | [
"NEURON"
] | 12d27192e22d03def5a5822b396572767a4d0571b6c199cc16fe32ba4c9d731d |
from __future__ import print_function
import copy
import warnings
import graphviz
import matplotlib.pyplot as plt
import numpy as np
def plot_stats(statistics, ylog=False, view=False, filename='avg_fitness.svg'):
""" Plots the population's average and best fitness. """
if plt is None:
warnings.warn(... | drallensmith/neat-python | examples/circuits/visualize.py | Python | bsd-3-clause | 5,967 | [
"NEURON"
] | 0ea836f2d1e0b7fede883d9f3dac3e5e8c9a1aa0d6cd66f110042fda09163390 |
"""A simple configuration system.
Inheritance diagram:
.. inheritance-diagram:: IPython.config.loader
:parts: 3
Authors
-------
* Brian Granger
* Fernando Perez
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
#... | noslenfa/tdjangorest | uw/lib/python2.7/site-packages/IPython/config/loader.py | Python | apache-2.0 | 24,868 | [
"Brian"
] | 64cc8f24d84534ce7f8e2edf8c10fe3815b8b32baac8497eda4a0ec65ead3eb2 |
# -*- coding: utf-8 -*-
"""
Estimators for marginal likelihood :math:`p(y | \\theta, X)` in a Gaussian
process classification model (with probit likelihood) for use in
pseudo-marginal MCMC samplers.
"""
__authors__ = 'Matt Graham'
__copyright__ = 'Copyright 2015, Matt Graham'
__license__ = 'MIT'
import numpy as np
im... | matt-graham/auxiliary-pm-mcmc | gpdemo/estimators.py | Python | mit | 13,898 | [
"Gaussian"
] | 322815c500bcb8cbf4fa83fea9de7ea6c79e65d9931ab6b1ae03902ef86a23b7 |
# 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/tools/units.py | Python | gpl-3.0 | 3,624 | [
"ESPResSo"
] | a78c86c4d31a9337220cc872e5b5c4c23a3080d8c5fe900d57d5d88191590a8c |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import datetime
from django.conf import settings
from django.http import HttpResponse
from django.test import TestCase
from django.utils import timezone
from mock import patch, MagicMock
from zerver.lib.test_helpers import MockLDAP
from confirmation.model... | susansls/zulip | zerver/tests/test_signup.py | Python | apache-2.0 | 60,182 | [
"VisIt"
] | 0c9faae1c799a084fe4886de5620f4ae6f328e1f56c7213a13e48d03abde9344 |
"""
Support for constructing and viewing custom "track" browsers within Galaxy.
Track browsers are currently transient -- nothing is stored to the database
when a browser is created. Building a browser consists of selecting a set
of datasets associated with the same dbkey to display. Once selected, jobs
are started to... | dbcls/dbcls-galaxy | lib/galaxy/web/controllers/tracks.py | Python | mit | 8,039 | [
"Galaxy"
] | 0f20d49657b4d2fdc21aaae0449b4ff2fe5817258a05ef520de80e614f0017ef |
# coding: utf-8
from __future__ import unicode_literals
from pymatgen.util.testing import PymatgenTest
from pymatgen.core.operations import SymmOp
import numpy as np
class SymmOpTestCase(PymatgenTest):
def setUp(self):
self.op = SymmOp.from_axis_angle_and_translation([0, 0, 1], 30, False,
... | yanikou19/pymatgen | pymatgen/core/tests/test_operations.py | Python | mit | 3,981 | [
"pymatgen"
] | 9830af95707261d2fb74aba57128d1bdaff09003b46064618171bfd20fe05340 |
../../../../../../../share/pyshared/orca/scripts/apps/empathy/__init__.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/empathy/__init__.py | Python | gpl-3.0 | 73 | [
"ORCA"
] | 4002d5068daffdb476dd7acb3cbdc860a9ca1228755e6ea708faa2d37bb8a0f2 |
import requests
API_ROOT = 'http://api.nytimes.com/svc/search/v2/articlesearch.'
API_SIGNUP_PAGE = 'http://developer.nytimes.com/docs/reference/keys'
class NoAPIKeyException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class articleAPI(... | evansherlock/nytimesarticle | nytimesarticle.py | Python | bsd-3-clause | 3,581 | [
"VisIt"
] | 964ed8c2d40c8d808b88323e085a57a4448d2a210a41d1c2f4fb6f1cd01111da |
"""
How to use the documentation
----------------------------
MOOSE documentation is split into Python documentation and builtin
documentation. The functions and classes that are only part of the
Python interface can be viewed via Python's builtin ``help``
function::
>>> help(moose.connect)
The documentation built i... | dilawar/moose-full | moose-core/python/moose/__init__.py | Python | gpl-2.0 | 672 | [
"MOOSE"
] | f9b91a55cc2ddd9f49a0c43f92088f548914ee1c0bba4528704bbc5dc3c802f5 |
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify ... | smarr/Truffle | compiler/mx.compiler/mx_graal_tools.py | Python | gpl-2.0 | 8,573 | [
"VisIt"
] | 9bb34a13baec1a0f4acd128ebbe872a71f1553682a7d0485d0b99496bfe36238 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Google Inc.
#
# 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 applicabl... | GoogleCloudPlatform/gce-oreilly | ch7-6.py | Python | apache-2.0 | 5,578 | [
"VisIt"
] | 05b894fa07d7c48d5711e3e2e2f3f90c964468c16ff0ac442923f25d8cd1f889 |
import logging
_logger = logging.getLogger(__file__)
class DiscourseNamesModifier:
def __init__(self, index):
self._index = index
def visit(self, g):
for item in g.vs:
item['name'] = str(self._index) + item['name']
for item in g.es:
item['name'] = str(self._in... | fractalego/pynsett | pynsett/auxiliary/names_modifier.py | Python | mit | 851 | [
"VisIt"
] | 61046cd2a94cb48c5c919322ef2769a09d5440b6ae65c88e52d574e3e4025ab8 |
import numpy as np
from cs231n.layers import *
from cs231n.layer_utils import *
from cs231n.optim import *
class TwoLayerNet(object):
"""
A two-layer fully-connected neural network with ReLU nonlinearity and
softmax loss that uses a modular layer design. We assume an input dimension
of D, a hidden dimension ... | zlpure/CS231n | assignment2/cs231n/classifiers/fc_net.py | Python | mit | 18,776 | [
"Gaussian"
] | 6c3c4ece0a7a0c27dba58ccd812068e8f0ea46f5afe4674d5a7578cc971232d6 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
# Copyright 2018 The Containerd 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... | mikebrow/cri-containerd | hack/boilerplate/boilerplate.py | Python | apache-2.0 | 7,574 | [
"VisIt"
] | 4018b32b7fd87252741287cca4fca0d39055497bfaafdf0e5d5b81dc19b446c1 |
from ..utils import *
##
# Minions
class BT_022:
"""Apexis Smuggler"""
events = Play(CONTROLLER, SECRET).after(DISCOVER(RandomSpell()))
class BT_014:
"""Starscryer"""
deathrattle = ForceDraw(RANDOM(FRIENDLY_DECK + SPELL))
class BT_028:
"""Astromancer Solarian"""
deathrattle = Shuffle(CONT... | jleclanche/fireplace | fireplace/cards/aoo/mage.py | Python | agpl-3.0 | 1,576 | [
"BLAST"
] | 2ed5d63ec3dec1d5c6eaf0ddc63198b0706f18c91ad84e0d35d098a2f52631f6 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''Pychemqt, Chemical Engineering Process simulator
Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar... | jjgomera/pychemqt | lib/mEoS/PropylenGlycol.py | Python | gpl-3.0 | 5,950 | [
"Jmol"
] | 394e9230bc4bbb045d99142459302f05a24d083802ac38105ffead0ba29097eb |
# ---
# jupyter:
# jupytext:
# formats: ipynb,.pct.py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.6.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
... | GPflow/GPflow | doc/source/notebooks/intro_to_gpflow2.pct.py | Python | apache-2.0 | 17,850 | [
"Gaussian"
] | 739b6352a4e18b13a8856a1ffaad2b039c0644373d6fd10abb94b5f9c77b1865 |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | allenlavoie/tensorflow | tensorflow/contrib/factorization/python/ops/gmm_ops.py | Python | apache-2.0 | 20,317 | [
"Gaussian"
] | a2dd59733c0baf1752514554708feec8ca44508bd0a30e350132f4286ee084d9 |
#!/usr/bin/env python
#from __future__ import print_function
import re
import os
import sys
import random
import subprocess
import argparse
import pysam
import bamsurgeon.replacereads as rr
import bamsurgeon.asmregion as ar
import bamsurgeon.mutableseq as ms
import bamsurgeon.aligners as aligners
import bamsurgeon.ma... | adamewing/bamsurgeon | bin/addsv.py | Python | mit | 49,373 | [
"BWA",
"pysam"
] | d5787e44c0d2430897d9ccf4a1161acd938ca820e20e01e6e9f289aaad910304 |
"""An NNTP client class based on:
- RFC 977: Network News Transfer Protocol
- RFC 2980: Common NNTP Extensions
- RFC 3977: Network News Transfer Protocol (version 2)
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print('Group', name, 'ha... | kevinlekiller/Python-NNTPLIB-OVER-Compression | nntplib.py | Python | gpl-2.0 | 47,177 | [
"Brian"
] | ca6fe6187bf616aa1d2a23dbcb5f4201817cf848f506b42da4bf8c13a7a1c78d |
from itertools import combinations_with_replacement
import numpy as np
from scipy import ndimage as ndi
from scipy import stats
from ..util import img_as_float
from ..feature import peak_local_max
from ..feature.util import _prepare_grayscale_input_2D
from ..feature.corner_cy import _corner_fast
from ._hessian_det_ap... | kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/skimage/feature/corner.py | Python | gpl-3.0 | 36,019 | [
"Gaussian"
] | ebcc6a05f1f4064cec51fac6e44c6d7dc952b6d1947897ad3bd9e3ed530d3fa9 |
"""
This program tests the correct addition and removal of components to the InstalledComponentsDB, as well as the components
CLI functions are used to ensure the test is as similar as possible to a real user-to-cli interaction
This test assumes that there is a DIRAC master server running on the local machine
This test... | Andrew-McNab-UK/DIRAC | tests/Integration/Framework/Test_ComponentInstallUninstall.py | Python | gpl-3.0 | 7,827 | [
"DIRAC"
] | b58fe069a6c98b9a2636fa7016c06381b96d116db3c44b7291e7993844ba481f |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... | alxgu/ansible | lib/ansible/modules/network/panos/_panos_match_rule.py | Python | gpl-3.0 | 12,382 | [
"Galaxy"
] | c548eb8676f0104f3ed9e5df9b6c0987c1d9225c87af639be42afa8009613f4a |
#
# 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... | yashdsaraf/scancode-toolkit | src/extractcode/patch.py | Python | apache-2.0 | 5,587 | [
"VisIt"
] | b5cc2e09b822daa7fde9fdb48d6fc3a013fc08e3a5ddf86e45c29bc78c1af77d |
import vtk
#read in frog data
frogReader = vtk.vtkImageReader()
frogReader.SetFilePrefix("C:/Users/Asus/Documents/GitHub/scientific-visualization/ass4/WholeFrog/frog.")
frogReader.SetFilePattern("%s%03d.raw")
frogReader.SetFileDimensionality(2)
frogReader.SetDataOrigin(1, 1, 1)
frogReader.SetDataSpacing(1, 1, 1.5)
fr... | stablum/scientific-visualization | ass4/frog.py | Python | gpl-3.0 | 1,598 | [
"VTK"
] | 8649597332839ec47aa2744cf4cc4074d9a1cc22bd0c1bb4165de82cd5243ab0 |
"Melting a copper cluster."
from asap3 import Atoms, EMT, units
from ase.visualize.primiplotter import PrimiPlotter, PngFile
from ase.lattice.cubic import FaceCenteredCubic
from asap3.md.langevin import Langevin
# Create the atoms
atoms = FaceCenteredCubic(size=(5,5,5), symbol="Cu", pbc=False)
# Associate the EMT p... | miroi/open-collection | theoretical_chemistry/software_runs/ase/runs/melting_asap3/Melting.py | Python | mit | 1,252 | [
"ASE"
] | 30cfbe9b05a833be065756b9e3f7a3c5539260800d20f8dab59867c9f608c518 |
# Copyright (c) 2013, GlaxoSmithKline Research & Development Ltd.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# ... | ptosco/rdkit | Contrib/fraggle/rdkit_tversky.py | Python | bsd-3-clause | 3,882 | [
"RDKit"
] | c5e0bbed73f7e8e309009c15c3b2cea553bbfe4e19cf89c0482f6a14d288a593 |
# -*- coding: utf-8 -*-
"""Restricted Boltzmann Machine Morphisms."""
__author__ = 'Patrick Michl'
__email__ = 'frootlab@gmail.com'
__license__ = 'GPLv3'
import numpy
import nemoa.model.morphisms.ann
from nemoa.core import ui
from nemoa.math import meta
class RBM(nemoa.model.morphisms.ann.ANN):
"""Restricted B... | fishroot/nemoa | nemoa/model/morphisms/rbm.py | Python | gpl-3.0 | 20,380 | [
"Gaussian"
] | 7351f9c2ef418b983aef11530996a2bfeafa20482a6da320150d421009369eb3 |
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | FedoraScientific/salome-hexablock | doc/test_doc/hemisphere/concentric.py | Python | lgpl-2.1 | 1,585 | [
"VTK"
] | 9ff2f3f50ce9f1f7404ebfa996d6d768df1742aeb5bb0886aa5c79ed52d7abe1 |
#!/usr/bin/env python
"""
Get the list of all the user files.
Example:
$ dirac-dms-user-lfns
/formation/user/v/vhamar: 14 files, 6 sub-directories
/formation/user/v/vhamar/newDir2: 0 files, 0 sub-directories
/formation/user/v/vhamar/testDir: 0 files, 0 sub-directories
/formation/user/v/vhamar/0: 0 files, 6 s... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/scripts/dirac_dms_user_lfns.py | Python | gpl-3.0 | 6,322 | [
"DIRAC"
] | ddf947371a5f35521ce8957d8a055fa9c2cc106ab66858bcd1ef685dced594ef |
import numpy as np
from collections import defaultdict
from scipy.stats import norm
from bokeh.plotting import show, figure
from bokeh.models import HoverTool, TapTool
from bokeh.layouts import gridplot
from bokeh.palettes import Viridis6
mass_spec = defaultdict(list)
RT_x = np.linspace(118, 123, num=50)
norm_dist =... | mindriot101/bokeh | examples/plotting/file/multi_line.py | Python | bsd-3-clause | 1,677 | [
"Gaussian"
] | e0ad771f475db65ed990e9ae1892f2904830fc98bc601da6e70cb247d9a2cea8 |
# This file is part of fesom_viz
#
################################################################################
#
# Interpolates FESOM data to regular grid. The output is netCDF4 files
# with CMOR complient attributes.
#
# Original code by Nikolay Koldunov, 2016
#
# TODO:
# Add possibility to define curvi... | FESOM/pyfesom | tools/fesom2geo_mp.py | Python | mit | 22,036 | [
"NetCDF"
] | 385f3ccf4a696daa77e9673a45e24d2b2f2b4fb540ceb55e06e630964d4d3c02 |
# coding: utf-8
from __future__ import unicode_literals
import itertools
import json
import os.path
import random
import re
import time
import traceback
from .common import InfoExtractor, SearchInfoExtractor
from ..jsinterp import JSInterpreter
from ..swfinterp import SWFInterpreter
from ..compat import (
compa... | spvkgn/youtube-dl | youtube_dl/extractor/youtube.py | Python | unlicense | 160,935 | [
"ADF"
] | 136a26b3d1fe5b62b2c54868070bed15b054d7b89ec4d379c2884c4f1b3f6757 |
# -*- coding: utf-8 -*-
import re
import urllib2
import HTMLParser
import urllib,urlparse
import xbmcgui
import xbmcplugin
import xbmcaddon
import requests
from BeautifulSoup import BeautifulSoup as bs
from utils.webutils import *
import json
try:
from addon.common.addon import Addon
from addon.common.net i... | mrquim/repository.mrquim | repo/plugin.video.p2psport/scrapers.py | Python | gpl-2.0 | 42,611 | [
"VisIt"
] | 8a1cde8bd070a61cbbe51bcf190b1a257fbe0c92962141340b0a3ac481df0290 |
from __future__ import unicode_literals
import base64
import datetime
import hashlib
import json
import netrc
import os
import re
import socket
import sys
import time
import math
from ..compat import (
compat_cookiejar,
compat_cookies,
compat_etree_fromstring,
compat_getpass,
compat_http_client,
... | Thor77/youtube-dl | youtube_dl/extractor/common.py | Python | unlicense | 87,399 | [
"VisIt"
] | 53f8d7a532e151685b06a4f12e8d143089c4055ddce9fe68fd2d8b24690b93da |
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print(i)
1
2
>>> g = f()
>>> next(g)
1
>>> next(g)
2
"Falling off the end" stops the generator:
>>> next(g)
Traceback (most recent call last... | firmlyjin/brython | www/tests/unittests/test/test_generators.py | Python | bsd-3-clause | 49,662 | [
"VisIt"
] | 706b391afc506a1cc1625ba803f28e992708ae08c05d3a32fb66c8d783e5b854 |
import vtk
import math
def get_screenshot(renWin, filename):
renWin.Render()
w2if = vtk.vtkWindowToImageFilter()
w2if.SetInput(renWin)
w2if.Update()
writer = vtk.vtkPNGWriter()
writer.SetFileName(filename)
writer.SetInput(w2if.GetOutput())
writer.Write()
renWin.Render()
##########... | DaisukeMiyamoto/visualize_silkmothbrain | draw_mothbrain.py | Python | mit | 7,186 | [
"VTK"
] | 317382038f72cc8fe9136ebaad80c308b19ac0f3ab437afa2c2d47bc4c0b8114 |
"""
sphinx.writers.html
~~~~~~~~~~~~~~~~~~~
docutils writers handling Sphinx' custom nodes.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import copy
import os
import posixpath
import sys
import warnings
from typing import Iterable, c... | lmregus/Portfolio | python/design_patterns/env/lib/python3.7/site-packages/sphinx/writers/html.py | Python | mit | 36,378 | [
"VisIt"
] | 7e3accb319e5998c41a85a546ceb0ae1f6d10d501dd4f119a98c2d72c697c184 |
from Bio import SeqIO
import argparse
import os
seq_pipeline_path = os.path.dirname(os.path.realpath(__file__))
activate_this_file = '%s/../python_env/bin/activate_this.py' % seq_pipeline_path
exec(
compile(
open(activate_this_file).read(),
activate_this_file,
'exec'),
dict(
__fi... | kmpf/uap | tools/split_fastq.py | Python | gpl-3.0 | 3,231 | [
"Biopython"
] | 364abfcc7d2d4ccc336db6e9fc17370a4633772318aca2ae3e6b4e8a5565d6b6 |
# Copyright 2009-2013 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# This unit test attempts to locate the blastall executable and the nr
# database, and if i... | updownlife/multipleK | dependencies/biopython-1.65/Tests/test_NCBI_BLAST_tools.py | Python | gpl-2.0 | 15,816 | [
"BLAST",
"Biopython"
] | ccccbd279174afb0a1bd64e19234274e5dd5814120fada8a2660ec3d8c3c89e2 |
# 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 t... | BackupTheBerlios/espressopp | src/analysis/XPressure.py | Python | gpl-3.0 | 1,587 | [
"ESPResSo"
] | b0ee56e8339b54927b715f11866b40206a60fc7dc84257829a7897a7c9ff6d64 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | sjug/perf-tests | verify/verify-flags-underscore.py | Python | apache-2.0 | 8,067 | [
"VisIt"
] | 5ac01b70aa5483e6e25b34b20962a744cd6357dd84cebbd7ac9bfff5aa5c691d |
"""
Courseware views functions
"""
import logging
import urllib
import json
import cgi
from datetime import datetime
from django.utils import translation
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
from django.conf import settings
from django.core.context_process... | benpatterson/edx-platform | lms/djangoapps/courseware/views.py | Python | agpl-3.0 | 60,854 | [
"VisIt"
] | a226c799f6621027783b380a36a3aea59b33956f059668181d135163f7d9859d |
#!/usr/bin/env python
"""
Framework to start a simulated vehicle and connect it to MAVProxy.
Peter Barker, April 2016
based on sim_vehicle.sh by Andrew Tridgell, October 2011
"""
from __future__ import print_function
import atexit
import getpass
import optparse
import os
import os.path
import re
import signal
import... | lucasdemarchi/ardupilot | Tools/autotest/sim_vehicle.py | Python | gpl-3.0 | 32,351 | [
"Firefly"
] | 84696921e373a57716415b8c57ba3c61a49d93c30cbbe8db09d383e456f477d4 |
""" SummarizeLogsAgent module
This agents scans all the log tables (SiteLog, ResourceLog and NodeLog) on the
ResourceStatusDB and summarizes them. The results are stored on the History
tables (SiteHistory, ResourceHistory and NodeHistory) and the Log tables
cleared.
In order to summarize the logs, all entri... | petricm/DIRAC | ResourceStatusSystem/Agent/SummarizeLogsAgent.py | Python | gpl-3.0 | 7,535 | [
"DIRAC"
] | 20eaaa2d4a263c9af382fad8e22bd7f6865527dc39b1a095fe5b84b17e92c834 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.