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 2016 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | google/smilesparser | test_smilesparser_rdkit.py | Python | apache-2.0 | 6,797 | [
"RDKit"
] | f7332e66866ed6004acbf8fe16e307733a65876bfb30840d0c0392d7081e8eb8 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals, division, print_function
import numpy as np
import unittest
from pymatgen.analysis.eos import EOS, NumericalEOS
from pymatgen.util.testing import PymatgenTest
class ... | czhengsci/pymatgen | pymatgen/analysis/tests/test_eos.py | Python | mit | 4,944 | [
"pymatgen"
] | e1950a0e9c717af59f610dad8e1ece86bab19f4650f147689ad3bd150861d892 |
#pylint: disable=invalid-name, too-few-public-methods, too-many-public-methods, unused-parameter
from __future__ import print_function, absolute_import
import sys
import unittest
from nose.exc import SkipTest
from katana import util
from katana.util import ReadTransformation
from katana import pysamadapter as pysama... | umich-brcf-bioinf/Katana | test/util_test.py | Python | apache-2.0 | 27,359 | [
"pysam"
] | dd49802f9001cc55874c86c09a15a1ccba07011444f97ad1c18e300ab7cce149 |
"""Create a function that reads a CSV file and return a list of dictionaries
where the keys are the names in the first row and each dict contains the values
in each subsequent row.
A CSV file 'data.csv' is provided.
Issues: What happens if the row is to long or two short?
What happens with duplicate names in the firs... | manahl/PythonTrainingExercises | Beginners/stdlib/csv/solution.py | Python | bsd-3-clause | 1,859 | [
"Brian"
] | a579054faf445f87b109fa0fc7d9b842d3301d6dfc3721497b6e430f57ff100b |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import json
import frappe.utils
from frappe.utils import cstr, flt, getdate, comma_and, cint
from frappe import _
from frappe.model.utils ... | manqala/erpnext | erpnext/selling/doctype/sales_order/sales_order.py | Python | gpl-3.0 | 26,903 | [
"VisIt"
] | b0dafb9d01de6dcf6955bbcc67f5e2888ad0b5da6daaffada280bc9b9f3d0997 |
import os
import sys
import json
import logging
import datetime
from tornado.web import authenticated, HTTPError
from tornado.httputil import parse_body_arguments
from motherbrain.api_server.handlers import UrlistHandler, \
smart_user_id, \
... | urlist/urlist | motherbrain/api_server/handlers/tracker.py | Python | gpl-3.0 | 2,451 | [
"VisIt"
] | 53a55692f6feb3e045273652361548d74b1fea1995f49afec7e70549439f3767 |
#
# This file is part of the CCP1 Graphical User Interface (ccp1gui)
#
# (C) 2002-2007 CCLRC Daresbury Laboratory
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 ... | alexei-matveev/ccp1gui | objects/zmatrix.py | Python | gpl-2.0 | 172,331 | [
"CHARMM",
"ChemPy",
"Dalton",
"GAMESS",
"MacroModel",
"PyMOL"
] | be1eb1fcf3edb5c46570eb87f99f2873ca02ef150e362d59871de191e96cfb22 |
# Copyright 2013-2020 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 *
import os
import subprocess
import sys
import llnl.util.tty as tty
class Catalyst(CMakePackage):
... | iulian787/spack | var/spack/repos/builtin/packages/catalyst/package.py | Python | lgpl-2.1 | 10,521 | [
"ParaView"
] | 8b6d6e3051764f2116e228a4a21258abb6adf85a33b7102596728a6bebd22114 |
import argparse
import os
import pysam
from Bio import SeqIO
from Bio.Seq import Seq
def main():
parser = argparse.ArgumentParser(
prog='trim_alignments',
description='Trim alignments in multiple bams to common overlap window.',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
p... | nanoporetech/pomoxis | pomoxis/trim_alignments.py | Python | mpl-2.0 | 4,332 | [
"pysam"
] | 445b0c65f66c4c7ade436af53a81fa25e14958a175b599cde17d16ceca868a45 |
"""Driver interface to the MOM ocean model.
:copyright: Copyright 2011 Marshall Ward, see AUTHORS for details
:license: Apache License, Version 2.0, see LICENSE for details
"""
import os
import shlex
import shutil
import subprocess
import sys
import f90nml
import payu.envmod
from payu.models.fms import Fms
from payu.... | nicjhan/payu | payu/models/mom.py | Python | apache-2.0 | 10,905 | [
"NetCDF"
] | 91eaf451ee388501f4b1aad7acff97a1ee6d8552e55e4fe559f377de2afea956 |
""" Create and send a combined request for any pending operations at
the end of a job:
fileReport (for the transformation)
jobReport (for jobs)
accounting
request (for failover)
"""
from DIRAC import gLogger
from DIRAC.Workflow.Modules.ModuleBase import ModuleB... | miloszz/DIRAC | Workflow/Modules/FailoverRequest.py | Python | gpl-3.0 | 3,655 | [
"DIRAC"
] | 8de6528cb8b065a46c8db1146e5b075c2497fac325fc573c41d1ee5e06726164 |
# Copyright (c) 2016, the GPyOpt Authors
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from ..acquisitions import AcquisitionEI, AcquisitionMPI, AcquisitionLCB, AcquisitionEI_MCMC, AcquisitionMPI_MCMC, AcquisitionLCB_MCMC, AcquisitionLP, AcquisitionEntropySearch
from ..core.bo import BO
from ..core.erro... | SheffieldML/GPyOpt | GPyOpt/methods/bayesian_optimization.py | Python | bsd-3-clause | 11,205 | [
"Gaussian"
] | 435f2ab6a849287f78810eb34e69d431f1b0f9273b44af3b654a9607b0e84a27 |
"""Translation of the BioNetGen example "egfr_simple" from the BNG wiki.
http://bionetgen.org/index.php/Egfr_simple
"""
from __future__ import print_function
from pysb import *
Model()
Parameter('NA', 6.02e23) # Avogadro's number (molecules/mol)
Parameter('f', 1) # Fraction of the cell to simulate
E... | LoLab-VU/pysb | pysb/examples/bngwiki_egfr_simple.py | Python | bsd-2-clause | 3,296 | [
"Avogadro"
] | 48184f58c24fdae39fba3e47d89d09b9d6f5275373c3b14da67869c2e2b7331b |
#!/usr/bin/env python
from __future__ import print_function
import os
import h5py
from loaddata import *
from peptotensor import *
def parse_part(AA):
active_site = open("results/"+AA_abbre[AA]+"/active_site.dat", "r")
input_site=open("data/"+AA_abbre[AA]+"/active.dat",'r').readlines()
# input_site=open("data/"+AA_a... | whbpt/pepture | parse.py | Python | mit | 2,763 | [
"BLAST"
] | 6e56431f0c884fad5d1f5410ea0890b6d7e2aedcbe3b484a4d224f0e92301d0d |
# -*- coding:Utf-8 -*-
"""
Body Class
===========
This class implements the body model
.. autosummary::
:toctree: /generated
Body.__init__
Body.__repr__
Body.load
Body.center
Body.posvel
Body.settopos
Body.setccs
Body.setdcs
Body.setacs
Body.loadC3D
Body.plot3d
Bo... | buguen/pylayers | pylayers/mobility/ban/body.py | Python | lgpl-3.0 | 97,864 | [
"Mayavi"
] | 976893a53648a62541afa4589e2ce0d1a67425986df63dfbdff49f38c85c27f7 |
# encoding: utf-8
"""
The Base Application class for IPython.parallel apps
Authors:
* Brian Granger
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full lice... | cloud9ers/gurumate | environment/lib/python2.7/site-packages/IPython/parallel/apps/baseapp.py | Python | lgpl-3.0 | 10,015 | [
"Brian"
] | 99eca62aafaae10cc8af3d5a13f5324de89abe826946ecea67fadea0100e9831 |
"""
refcounting
~~~~~~~~~~~
Reference count annotations for C API functions. Has the same
result as the sphinx.ext.refcounting extension but works for all
functions regardless of the signature, and the reference counting
information is written inline with the documentation instead of a
sepa... | henryr/Impala | thirdparty/avro-c-1.7.4/jansson/doc/ext/refcounting.py | Python | apache-2.0 | 1,715 | [
"VisIt"
] | eb4239f642a14e58e59d3cc90a96324a347b305e0fa0f21b5ac539d6d5274139 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-07-23 13:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | spark8103/ops | cmdb/migrations/0001_initial.py | Python | apache-2.0 | 5,890 | [
"Elk"
] | 96172387765cf4006688263307669dd70731207561e100c2a84fbca6adb032fd |
from behave import given, when, then
from django.urls import reverse_lazy
from page_object_models.forms import FormPage
from app.models.profile import Profile
from app.models.gym import Gym
PAGE_MAPPING = {
'sign up': 'signup',
'login': 'login',
'gym list': 'gym_list',
'active raid list': 'raid_list',... | Gimpneek/exclusive-raid-gym-tracker | app/features/steps/common.py | Python | gpl-3.0 | 3,993 | [
"VisIt"
] | 6a2904026ddc0e7c341824b7acfa00a024878157c90699344436ebf39bc0156e |
# Copyright (C) 2013-2017 2ndQuadrant Limited
#
# This file is part of Barman.
#
# Barman 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... | infoxchange/barman | tests/test_output.py | Python | gpl-3.0 | 36,976 | [
"ESPResSo"
] | 529fab23563d89756090e9fff46989455c6730f5ebf813e36728b17d830d7ede |
# Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework 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
... | alexandrul-ci/robotframework | src/robot/result/executionresult.py | Python | apache-2.0 | 5,013 | [
"VisIt"
] | 188efc3262bcc7670153e91b63e20252504422011c66883e5f5e13554e569c40 |
"""Perform in-place updates of geminicassandra and databases when installed into virtualenv.
"""
import os
import shutil
import subprocess
import sys
import geminicassandra.config
def release(parser, args):
"""Update geminicassandra to the latest release, along with associated data files.
"""
url = "https... | bgossele/geminicassandra | geminicassandra/gemini_update.py | Python | mit | 6,860 | [
"pysam"
] | 4dcca169097db7c3211cc59543e4b5d74062b082f90afaf4c919cd54f0e5cae9 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Logit function
=========================================================
Show in the plot is how the logistic regression would, in this
synthetic dataset, classify values as either 0 or 1,
i.e. class one or two, us... | florian-f/sklearn | examples/linear_model/plot_logistic.py | Python | bsd-3-clause | 1,390 | [
"Gaussian"
] | d1595c584ff76ae302c3f39e77e28d177be873262c37c21c1054a8e61556b40c |
# coding: utf-8
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Interfaces to perform image registrations and to apply the resulting
displacement maps to images and points.
"""
import os.path as op
import re
from ..base import (CommandLine, Comma... | JohnGriffiths/nipype | nipype/interfaces/elastix/registration.py | Python | bsd-3-clause | 8,132 | [
"VTK"
] | dc187dde90d435af01d035616c95b2510d064785011f5ef4e38b18798dcd7dcb |
# Mechanics IO
from __future__ import print_function
import os
import sys
from math import cos, sin
import shlex
import numpy as np
import h5py
import tempfile
from contextlib import contextmanager
from operator import itemgetter
try:
import vtk
except:
pass
from siconos.mechanics.contact_detection.tools... | siconos/siconos-deb | io/swig/io/mechanics_io.py | Python | apache-2.0 | 53,019 | [
"VTK"
] | 7e73faa8efa6a9419f26130a2628f404f12e4d0f1fc227c0c99cea6c005f6586 |
#!/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... | pli3/e2-openwbif | plugin/controllers/views/web/moviemove.py | Python | gpl-2.0 | 5,168 | [
"VisIt"
] | 0793bcda7060aae6531c573e2e3c2af7b6eded269c1ad7ab5c1199794efb4b68 |
try:
lib_dict
except NameError:
lib_dict = dict()
lib_dict['../../../lib/'] = [
{
"type": "function",
"name": " pitchbend",
"usage": "pitchbend(ch,val)",
"filename": "lib/basic2.k",
"fileline": 80,
"desc": """ Construct a pitchbend message, where ch is the channel (1-based)
and val is the pitchbend val... | YggdrasiI/Pyconsole | python/keykit_library.py | Python | lgpl-3.0 | 293,355 | [
"Galaxy"
] | b90db94fc4c11aa7db16a8596fb6dfc6c9479a8678f0538ae655ae6a876a587d |
from ase import Atom, Atoms
from gpaw import GPAW, mpi
from gpaw.test import equal
from gpaw.lrtddft import LrTDDFT
from gpaw.pes.dos import DOSPES
from gpaw.pes.tddft import TDDFTPES
txt = None
R=0.7 # approx. experimental bond length
a = 3.0
c = 3.0
h = .3
H2 = Atoms([Atom('H', (a / 2, a / 2, (c - R) / 2)),
... | robwarm/gpaw-symm | gpaw/test/pes.py | Python | gpl-3.0 | 1,980 | [
"ASE",
"GPAW"
] | 9f74880c563e94bfc47f15c56be60fb0ca02bd53eea108241a8574c5ad5327e6 |
class VehicleInfo(object):
def __init__(self):
"""
make_target: option passed to make to create binaries. Usually sitl, and "-debug" may be appended if -D is passed to sim_vehicle.py
default_params_filename: filename of default parameters file. Taken to be relative to autotest dir.
... | gmorph/ardupilot | Tools/autotest/pysim/vehicleinfo.py | Python | gpl-3.0 | 10,250 | [
"Firefly"
] | 4c3cd409262a71904cd990560cd7f4adb85882c8affa71841221ae09dd07071f |
from ase.ga.data import PrepareDB
from ase.ga.data import DataConnection
from ase.ga.startgenerator import StartGenerator
from ase.ga.utilities import closest_distances_generator
import os
import numpy as np
from ase.lattice.surface import fcc111
from ase.constraints import FixAtoms
db_file = 'gadb_logics_test.db'
sl... | askhl/ase | ase/test/ga/database_logic.py | Python | gpl-2.0 | 2,330 | [
"ASE"
] | e00bb04eeb40b7a1ffc38e5d7bc71f6a7583035ae5561428962ece16d0e9e8f6 |
"""
minimal.py
a Minimal example of GC-PV connection
"""
import numpy as np
from neuron import h, gui
from Cell_builder import GCbuilder, BCbuilder
h.tstop = 100
h.v_init = -80
GC = GCbuilder()
PV = BCbuilder()
#=========================================================================
# Conductance necessa... | JoseGuzman/NeuralNetworks | GCNetwork/minimal.py | Python | gpl-2.0 | 1,751 | [
"NEURON"
] | b4773bd23aaf69deb8382064f41d3e15d9c731c00e4b1d403ba0d3dcd70b9b16 |
from Components.Converter.Converter import Converter
from Components.Element import cached
from Poll import Poll
from ServiceReference import ServiceReference
from enigma import eServiceCenter, eServiceReference, iServiceInformation, iPlayableService, eDVBFrontendParametersSatellite, eDVBFrontendParametersCable
from... | sklnet/opendroid-enigma2 | lib/python/Components/Converter/ExtremeInfo.py | Python | gpl-2.0 | 15,874 | [
"Galaxy"
] | ec2a8c6f824c28cf31c321280b9737fbb97e3c9399d5ea4245857059dfba1b0c |
#!/usr/bin/env python
import sys
import os
import subprocess
import pysam
import textwrap
import argparse
from uuid import uuid4
def print_header():
print(textwrap.dedent("""\
##fileformat=VCFv4.1
##phasing=none
##INDIVIDUAL=TRUTH
##SAMPLE=<ID=TRUTH,Individual="TRUTH",Description="bamsurgeon spik... | adamewing/bamsurgeon | scripts/makevcf_sv.py | Python | mit | 5,051 | [
"pysam"
] | 4faf7a6db45a4ad25a5da555dec3d3c4f347fc2136f33236c40e8299071adce1 |
""" This module implements basic kinds of jobs for FEFF runs."""
import logging
import os
import shutil
import subprocess
from monty.shutil import decompress_dir
from custodian.custodian import Job
from custodian.utils import backup
logger = logging.getLogger(__name__)
__author__ = "Chen Zheng"
__version__ = "0.1"... | materialsproject/custodian | custodian/feff/jobs.py | Python | mit | 2,976 | [
"FEFF"
] | 117ca0ba840e032809232e455f4b9f2cfebd9462403c62e2b83a46c6c5b11bd5 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
OpenBabel interface module, which opens up access to the hundreds of file
formats supported by OpenBabel. Requires openbabel with python bindings to be
installed. Please consult the
`openbabel documentation <http://openbabel.org/wiki/Main_Page>`_.
... | Dioptas/pymatgen | pymatgen/io/babelio.py | Python | mit | 4,914 | [
"Pybel",
"pymatgen"
] | f04d01981ece0847a32a989ca2269f4cef38c5cd2facee7b0d2d7810cc3ed137 |
"""
# Notes:
- This simulation seeks to emulate the CUBA benchmark simulations of (Brette
et al. 2007) using the Brian2 simulator for speed benchmark comparison to
DynaSim. However, this simulation does NOT include synapses, for better
comparison to Figure 5 of (Goodman and Brette, 2008).
- The time taken to si... | asoplata/dynasim-benchmark-brette-2007 | Brian2/brian2_benchmark_CUBA_nosyn_compiled_2000.py | Python | gpl-3.0 | 2,140 | [
"Brian"
] | 8de7f8e6248d6f78e64bcb6c2563051f202285d4a0d59966692504e514081658 |
#! /usr/bin/env python
"""
Converts rigid body coordinates to pymol script producing cylinders
Scott Olesen (swo24@cam.ac.uk) August 2012
This script imports argparse. If argparse is not installed in python, you can put argparse.py in the same directory as this script. (hg.python.org/cpython/file/default/Lib/argpars... | marktoakley/LamarckiAnt | SCRIPTS/visuals/chir2py.py | Python | gpl-3.0 | 4,755 | [
"PyMOL"
] | 6e856b216185e7bf3765a6fc7ce9c6071b4cbe7d99e52b8c2af8dc8693297343 |
import argparse
from paraview.simple import *
parser = argparse.ArgumentParser(description='Command line arguments')
parser.add_argument('--raytracing', action='store_true', default=False)
parser.add_argument('--screenshots', action='store_true', default=False)
parser.add_argument('--animation', action='store_true', d... | BioDynaMo/biodynamo | demo/pyramidal_cell/pv_script.py | Python | apache-2.0 | 3,543 | [
"ParaView"
] | ef4f541845f02cd2fbeb9454bdbb27fefcfaa17fdb6a993b3d622fb300fcbda6 |
import sys
from pysamimport import pysam
import re
import inspect
class BadRead(RuntimeError):
def __init__(self):
RuntimeError.__init__(self, self.header)
class IsBadRead(BadRead):
header = "BadRead"
class IsDuplicate(BadRead):
header = "Alignment:IsDuplicate"
class IsQCFail(BadRead):
... | HorvathLab/NGS | attic/readCounts/src/util.py | Python | mit | 6,744 | [
"pysam"
] | bdf756af4d27d37b3565a1bc4e1cea3cabca9eaf5722a5f4ac2306f937279446 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This file contains printing-related functionality of the bisect."""
import datetime
import re
from bisect_results import BisectResults
import bisect_uti... | Chilledheart/chromium | tools/auto_bisect/bisect_printer.py | Python | bsd-3-clause | 12,474 | [
"VisIt"
] | 19c4c55b43d67643105d2a95bb34fe191bbf068bb426792c7048c98fa8e07d04 |
import numpy as np
from time import time, ctime
from datetime import timedelta
from ase.lattice import bulk
from ase.units import Hartree
from gpaw import GPAW, FermiDirac
from gpaw.response.gw import GW
from gpaw.mpi import serial_comm, world, rank
from gpaw.wavefunctions.pw import PW
starttime = time()
a = 3.567
at... | robwarm/gpaw-symm | gpaw/test/gw_static.py | Python | gpl-3.0 | 1,223 | [
"ASE",
"GPAW"
] | bef2f04e31460a76d2d0e014d80a62b94a51c804080499c616659425080b9877 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... | thaim/ansible | lib/ansible/modules/network/avi/avi_trafficcloneprofile.py | Python | mit | 4,187 | [
"VisIt"
] | 0ed32d745ec88b8660f69cb28e7ffc3937898926be723e5a8c3e0258e2a3ef44 |
import logging
import calendar
import copy
import dateutil
import numpy
import datetime
from couchdbkit.ext.django.schema import Document, StringProperty, IntegerProperty, DateTimeProperty
from couchdbkit.schema.base import DocumentSchema
from couchdbkit.schema.properties import LazyDict
from casexml.apps.case.models i... | gmimano/commcaretest | corehq/apps/indicators/models.py | Python | bsd-3-clause | 33,105 | [
"VisIt"
] | 2606d7719be4ef634c713eb40fe440d1a58c734a6d24dceeff22e96059020289 |
##########################################################################
#
# Copyright 2010 VMware, Inc.
# All Rights Reserved.
#
# 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 res... | PeterLValve/apitrace | retrace/retrace.py | Python | mit | 21,186 | [
"VisIt"
] | 60c6f321a368f10c167620b6c7bcc5ee3b737a3abff9207b7dd3785a36a6909f |
#!/usr/bin/env python
# coding: utf-8
"""A set of meshes that can be used as a Mesh."""
# Copyright (C) 2017-2019 Matthieu Ancellin
# See LICENSE file at <https://github.com/mancellin/capytaine>
import logging
import reprlib
from itertools import chain, accumulate
from functools import lru_cache
from typing import Ite... | mancellin/capytaine | capytaine/meshes/collections.py | Python | gpl-3.0 | 9,737 | [
"VTK"
] | f21afc6197c922ad2a523c5a6eb97c197428d301745ed561ebf8b09d9944e206 |
#!/usr/bin/env python3
#
# This file is part of GreatFET.
#
"""
Self-testing framework for GreatFET hardware.
"""
import math
import sys
import unittest
import functools
from greatfet import GreatFET
from greatfet.utils import GreatFETArgumentParser
# By default, don't run the "suspicious-only" tests.
be_suspicious ... | dominicgs/GreatFET-experimental | host/greatfet/commands/greatfet_selftest.py | Python | bsd-3-clause | 4,375 | [
"CRYSTAL"
] | ecd2b830e6de9d45d384974ae1e9a0a665dfbc197c4bbf470b5b246e174eadd8 |
#!/usr/bin/env python2
"""
"Front-end" for the real script
"""
#Timing
import time
#Config
import os.path
#Own helpers
from libs.runParser import parse_args
from libs.IO import time_to_steps
from libs.IO import dependency_check
from libs.IO import import_network
from libs.IO import saveKey, hashDict, write_log
from... | nico202/pyNeMo | Runner.py | Python | gpl-2.0 | 7,197 | [
"NEURON"
] | e37e4b8b4b807dfda527929b7c0be4587aa887f953fd87f205c92b0265519efb |
import sys
sys.path.insert(1, "../../")
import h2o
def offset_1388(ip, port):
h2o.init(ip, port)
print "Loading datasets..."
pros_hex = h2o.import_frame(h2o.locate("smalldata/prostate/prostate.csv"))
pros_hex[1] = pros_hex[1].asfactor()
pros_hex[3] = pros_hex[3].asfactor()
pros_hex[4] = pros_h... | ChristosChristofidis/h2o-3 | h2o-py/tests/testdir_jira/pyunit_NOPASS_pubdev_1388_offset_comparisons.py | Python | apache-2.0 | 3,018 | [
"Gaussian"
] | dc9906d3c4dd53e1715487963b28e47098bc49d0fb5f27279936877db8280811 |
class Solution:
# @param root, a tree node
# @return root of the upside down tree
def upsideAux(self, root, left, right) :
if not left :
return root
v = self.upsideAux(left, left.left, left.right)
root.left, root.right = None, None
left.left, left.right = right, ... | yelu/leetcode | Tree/BinaryTreeUpsideDown.py | Python | gpl-2.0 | 893 | [
"VisIt"
] | e20a8cec8a196b4e7bfa0d576b1d9789d435e9718393e59e0f7d91ad6eb29ff4 |
#
# Copyright 2016 The BigDL 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 applicable law or agreed to in ... | intel-analytics/BigDL | python/orca/src/bigdl/orca/automl/xgboost/auto_xgb.py | Python | apache-2.0 | 16,031 | [
"ORCA"
] | c5b67e4f5bb5efb6bec5700203f0f4a57eb744a11a671b39b73ef91a11065ca0 |
#!/usr/bin/env python
#
# E-Mail post-processing script for NZBGet
#
# Copyright (C) 2013-2016 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; e... | Mhynlo/nzbget | scripts/EMail.py | Python | gpl-2.0 | 9,671 | [
"VisIt"
] | a93eba80c3ad45bbe7cc80b39c893edde6df44650977b2e84450684bfd489d97 |
from __future__ import print_function
from builtins import range
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
import random
import os
def javapredict_dynamic_data():
# Generate random dataset
dataset_params = {}
dataset_params['rows'] = random.sample(list(range(5000,150... | nilbody/h2o-3 | h2o-py/tests/testdir_javapredict/pyunit_javapredict_dynamic_data_paramsGBM.py | Python | apache-2.0 | 3,496 | [
"Gaussian"
] | f9f07243335ad9e3c0656fe57d64bfd43e8f44223f109de98df2dc2520af8cec |
#
# Copyright (C) 2013-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/coulomb_cloud_wall.py | Python | gpl-3.0 | 4,300 | [
"ESPResSo"
] | 4d051c7808d49439887cdafa08ca0bbf98b75d472fe8dc45d0b25b622b270ff0 |
import numpy as np
from scipy.linalg import norm
import amnet
from collections import deque
import copy
from math import isinf
"""
Contains routines for manipulating and simplifying Amn trees
"""
def compose_rewire(phi1, phi2):
"""
Given two AMNs and pointers to their input variables,
rewires the first... | ipapusha/amnet | amnet/tree.py | Python | bsd-3-clause | 10,939 | [
"VisIt"
] | d2015ec83cdf95afff54cb7e19f11f32b1ea985c8885c4630ca491de8b2efd60 |
#!/usr/bin/env python
import os
import sys
import re
import mmap
import pysam
import numpy
from logging import debug,warning,error,getLogger
from optparse import OptionParser
COMPLEMENT = {
'a' : 't',
't' : 'a',
'c' : 'g',
'g' : 'c',
'k' : 'm',
'm' : 'k',
'r' : 'y',
'y' : 'r',
's' :... | BaconKwan/Perl_programme | find_circ/find_circ.py | Python | apache-2.0 | 18,088 | [
"pysam"
] | ed93b0004b35bd817ff999ad9d8af291e2c2c6ed7d088963aa32f2893b3ee314 |
#!/usr/bin/python
import sys
import misc_utils as utils
from Bio import AlignIO
############################# CLASSES ##################################
class consensAlign():
'Consensus alignment object'
#Default constructor
def __init__(self, alignment, threshold=0.1, mask=0.1):
self.alnVars = []
self.conSeq... | tkchafin/fst_filter.py | alignment_tools.py | Python | gpl-3.0 | 4,850 | [
"Biopython"
] | 57dc32a37ed3adc2278a60ff7a3b72d70788a957095b8ebd2e473863384c6498 |
# Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# revlog.py - storage back-end for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distribut... | facebookexperimental/eden | eden/hg-server/edenscm/mercurial/revlog.py | Python | gpl-2.0 | 90,398 | [
"VisIt"
] | e0bb10e589a65fa1e094fcc6e3ba78b2c70124b5e5d7d21f0c3d627d33c41322 |
#!/ysr/bin/env python
from __future__ import division
import numpy as np
import theano
import theano.tensor as T
from theano import tensor
floatX = theano.config.floatX
#-----------------------------------------------------------------------------
def my_batched_dot(A, B):
"""Batched version o... | drewlinsley/draw_classify | draw/attention_cnn.py | Python | mit | 10,420 | [
"Gaussian"
] | 13aaadef18b598587ec67e4b9b6e0f569f5b3de92a70adcc6e0eba9ae8501ca4 |
# -*- coding: utf-8 -*-
################################################################################
# Copyright 2014, The Open Aggregator
# GNU General Public License, Ver. 3 (see docs/license.txt)
################################################################################
"""Probability Features File
The... | ClimateImpactLab/open-estimate | openest/models/features_interpreter.py | Python | gpl-3.0 | 17,935 | [
"Gaussian"
] | 8c0329e08f4b9d34b72757298d766545c3675c533c4c576b7ad57bc0bb7d2216 |
"""End-To-End Memory Networks.
The implementation is based on http://arxiv.org/abs/1503.08895 [1]
"""
from __future__ import absolute_import
from __future__ import division
import tensorflow as tf
import numpy as np
from six.moves import range
def position_encoding(sentence_size, embedding_size):
"""
Positio... | domluna/memn2n | memn2n/memn2n.py | Python | mit | 11,285 | [
"Gaussian"
] | 8b25525d0e526d8c408a33ab577f95c69fe0b7aa3ca17521958af435b1f819a9 |
# coding: utf-8
from __future__ import unicode_literals, division
import logging
import subprocess
import sys
import datetime
import time
from glob import glob
import tarfile
import os
from abc import ABCMeta, abstractmethod
from itertools import islice
import six
from monty.tempfile import ScratchDir
from monty.sh... | davidwaroquiers/custodian | custodian/custodian.py | Python | mit | 27,137 | [
"VASP"
] | eeaf622769e46d9e0c370d0897684edbe142cafeecd8f7e1783e1c4038e837a9 |
###########################################################
# $HeadURL$
###########################################################
"""
CloudEndpoint is a base class for the clients used to connect to different
cloud providers
"""
from VMDIRAC.Resources.Cloud.Utilities import createMimeData
__RCSID__ = '$Id$'
... | atsareg/VMDIRAC | VMDIRAC/Resources/Cloud/Endpoint.py | Python | gpl-3.0 | 4,116 | [
"DIRAC"
] | 60a4709293522a87d1cd374d9731a93e9afc57cd9871d5955a51a289d2ba2366 |
"""
.. module:: services.py
:platform: Windows, Linux
:synopsis: Represents functions/classes used to control Feature Services,
Feature Service Layer, Map Service, etc...
.. moduleauthor:: Esri
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import... | adegwerth/ArcREST | src/arcrest/agol/services.py | Python | apache-2.0 | 122,568 | [
"VisIt"
] | 3d1b051d175411e5dcf64e593d78ea3abde72325900118596f41a3dfca74ffa4 |
"""This module is used to generate atomic orbital basis sets."""
import os
import sys
from StringIO import StringIO
import numpy as np
from numpy.linalg import solve
from ase.units import Hartree
from gpaw.spline import Spline
from gpaw.atom.all_electron import AllElectron, ConvergenceError
from gpaw.atom.generator ... | ajylee/gpaw-rtxs | gpaw/atom/basis.py | Python | gpl-3.0 | 26,542 | [
"ASE",
"GPAW",
"Gaussian"
] | 02bb2956e00f1c98eedf7223a3b431148aee4a4e8bfc3fdf49bc3e0617607d33 |
# 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 unittest2 as unittest
import json
import six
from monty.os.path import which
from pymatgen import Lattice, PeriodicSite
from mon... | aykol/pymatgen | pymatgen/transformations/tests/test_standard_transformations.py | Python | mit | 19,149 | [
"VASP",
"pymatgen"
] | 641ea19ddef26e590c5fe4d11b125434b50e6c7381db1e2d316a2b6602305b50 |
# encoding: utf-8
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# The number of lines will be reduced after 2018 update is complete and
# the old stories are removed: https://crbug.com/878390.
# pylint:... | scheib/chromium | tools/perf/page_sets/system_health/browsing_stories.py | Python | bsd-3-clause | 77,366 | [
"VisIt"
] | 7ffb0312eb8a227b50633ffcb1c4e25bdba06dbff95cc1ea96c24f06d7ecd133 |
#!/usr/bin/env python
# Copyright 2013 John C. Earls
#
#This file is part of GPUDirac
#
#GPUDirac is free software:
#GPUDirac is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#Licen... | JohnCEarls/GPUDirac | setup.py | Python | agpl-3.0 | 2,364 | [
"DIRAC"
] | e0148f39b7325e4df03803c63b89e7735e24adbabb9bef42ac854f36b3105e25 |
# -*- coding: utf-8 -*-
import os
import re
import urllib
import logging
import datetime
import urlparse
from collections import OrderedDict
import warnings
import pytz
from flask import request
from django.core.urlresolvers import reverse
from HTMLParser import HTMLParser
from modularodm import Q
from modularodm imp... | bdyetton/prettychart | website/project/model.py | Python | apache-2.0 | 106,608 | [
"VisIt"
] | ac6abc0fb3a4bdb42b9f02d2e2fe44b3daf0db09248f394df0de2fe6bb5cbdab |
## Taken from pyhmmtb project who, in turn, claims to have
## converted Kevin Murphy's mix Gauss HMM code.
import numpy as np, string
from numpy.dual import cholesky
from numpy.linalg.linalg import LinAlgError
EPS = 2.2204e-16
def sqdist(p, q, A=None):
'''
% SQDIST Squared Euclidean or Mahalanobis dist... | burakbayramli/dersblog | tser/tser_080_hmm/mhmm.py | Python | gpl-3.0 | 42,009 | [
"Gaussian"
] | c76170121f3b6b743331edfd2a1e9bf68f70b1bb2988757af8f1ff0f833f0a00 |
# Copyright 2002 by Katharine Lindner. 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.
"""
NetCatch enables the user to scan a list of labelled urls and select
a subset ... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/NetCatch.py | Python | apache-2.0 | 6,710 | [
"Biopython"
] | 2a7742632ad875f0ac78292d5377004374470a94a36605e8a9bebd5214f32c52 |
# Copyright 2015 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... | dongjoon-hyun/tensorflow | tensorflow/python/training/learning_rate_decay.py | Python | apache-2.0 | 27,425 | [
"Gaussian"
] | 0dabf797fce809ebf736e0c658603c2df46663c0c40b64783acdadcbf096dc98 |
# 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... | capoe/espressopp.soap | src/integrator/CapForce.py | Python | gpl-3.0 | 2,748 | [
"ESPResSo"
] | 34a147ef19d6ad57d1b0e143e3d0f3afa5245a76c1f591a8d1c65937eb79aa4b |
#!/usr/bin/env python3
from accessoryFunctions.accessoryFunctions import GenObject, MetadataObject
from MLSTsippr.mlst import GeneSippr as MLSTSippr
from sipprverse_reporter.reports import Reports
from geneseekr.geneseekr import GeneSeekr
from geneseekr.parser import Parser
import multiprocessing
from glob import glob
... | OLC-Bioinformatics/pythonGeneSeekr | geneseekr/blast.py | Python | mit | 21,295 | [
"BLAST"
] | d09a1c9f0631da32d49c045e879f9595957002e62559e967ebb4a98e9788cc7d |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
... | nuclear-wizard/moose | python/chigger/tests/range/none.py | Python | lgpl-2.1 | 788 | [
"MOOSE"
] | ebe85e5e17d61fbf776340ab6fbd316de11623f19a15576561e9c67ad6db8802 |
#!/usr/bin/env python2.7
"""
Runs GATK best practices pipeline for germline SNP and INDEL discovery.
BWA Alignment
0: Download FASTQ(s) or BAM
1: Align to reference
2: Sort BAM
3: Index Bam
GATK Preprocessing
4: Mark duplicates
5: Indel realignment
6: Base quality score recalibration
7: Apply recalibration
GATK Vari... | jpfeil/toil-scripts | src/toil_scripts/gatk_germline/germline.py | Python | apache-2.0 | 41,802 | [
"BWA"
] | 8d5c16c92d4106e1c8ab81b7f857be3ce91a1fd968231efea70f48ca867d50c4 |
""" Threaded implementation of service interface
"""
import time
import threading
from concurrent.futures import ThreadPoolExecutor, as_completed
from DIRAC import gLogger
from DIRAC.ConfigurationSystem.private.ServiceInterfaceBase import ServiceInterfaceBase
from DIRAC.ConfigurationSystem.Client.ConfigurationData imp... | DIRACGrid/DIRAC | src/DIRAC/ConfigurationSystem/private/ServiceInterface.py | Python | gpl-3.0 | 1,894 | [
"DIRAC"
] | 95433b365a567b2acf0eca2b43e2d0140ee552276ec6c065bed3fa781dcd77af |
################################################################################
# citlalatonac.py #
# Citlalatonac is the name of the Aztec god who created the stars #
# Oscar Barragan, March 2021 ... | oscaribv/pyaneti | pyaneti_extras/citlalatonac.py | Python | gpl-3.0 | 16,233 | [
"Gaussian"
] | 1e2f468d16184d1f07d25621ffbd6f8ae33cac83286b5efabd57fe0bc69a1b2d |
# Copyright (c) 2016-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2016 Moises Lopez <moylop260@vauxoo.com>
# Copyright (c) 2017, 2020 hippo91 <guillaume.peillex@gmail.com>
# Copyright (c) 2019, 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
# Copyright (c) 2019 Hugo van Kemenade <hugovk@users.noreply.g... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/pylint/pylint/extensions/mccabe.py | Python | mit | 6,278 | [
"VisIt"
] | f9fdf5a0cfee298ae1e16e56338011e57e04dd2c403ec37d2f7962354b656c57 |
#!/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/mobile/index.py | Python | gpl-2.0 | 8,316 | [
"VisIt"
] | a97d68cda7aa038d12e5eb2347c99cbafc19a2878c4f2c66eb1ac77da187ee6d |
"""Main for espresso"""
import argparse
from e_parser import parse_string, test_parser
from e_codegen import gen_unit
from e_nodes import BlockStmt
def testing(args):
print("testing: ")
test_parser()
def no_runtime(args):
with open(args.input) as input_file:
src_data = input_file.read()
s... | zetavm/zetavm | espresso/main.py | Python | bsd-3-clause | 1,556 | [
"ESPResSo"
] | aaea56cb0ccf14976a6d481be055f38e9c9b756837987b5bc6d6f5a80904232a |
# -*- coding: utf-8 -*-
"""This file contains a parser for the Mozilla Firefox history."""
try:
from pysqlite2 import dbapi2 as sqlite3
except ImportError:
import sqlite3
from plaso.containers import time_events
from plaso.lib import eventdata
from plaso.parsers import sqlite
from plaso.parsers.sqlite_plugins imp... | dc3-plaso/plaso | plaso/parsers/sqlite_plugins/firefox.py | Python | apache-2.0 | 15,879 | [
"VisIt"
] | b7e91a331d2692d3d535bfe873fe31ffc72c78d7107d0d9aeb5739e0d4a56c87 |
"""
Acceptance tests for Studio's Setting pages
"""
import re
from common.test.acceptance.pages.lms.create_mode import ModeCreationPage
from common.test.acceptance.pages.studio.settings_advanced import AdvancedSettingsPage
from common.test.acceptance.pages.studio.settings_certificates import CertificatesPage
from comm... | ahmedaljazzar/edx-platform | common/test/acceptance/tests/studio/test_studio_settings_certificates.py | Python | agpl-3.0 | 13,191 | [
"VisIt"
] | baeccc0f25e5610f58aeb5e6c6ffe0ba54345b630d430e164da5115eb6061d9d |
#!/usr/bin/env python
import os
import hashlib
import requests
import subprocess
import sys
downloads = [{
'_id': '598359e08d777f7d33e9c05b',
'name': 'paraview.zip',
'target': '.',
}, {
'_id': '58a21ab58d777f0721a4b212',
'name': 'itk-4.9.0-windows-64bit.zip',
'target': 'itk',
}, {
'_id': '5... | cryos/tomviz | scripts/appveyor/cache_restore.py | Python | bsd-3-clause | 2,445 | [
"ParaView"
] | 9f8e163a36a40484bcdd33d6710a9c406f1a9463bc72ebc74fb4be18c169d324 |
# 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... | cxxgtxy/tensorflow | tensorflow/python/util/nest.py | Python | apache-2.0 | 64,788 | [
"VisIt"
] | 72ead25ed422715c833327b5073d7dc08a06c97638fe0aeaf063e923798ad471 |
"""Provide data structures for IDTxl analysis."""
import numpy as np
from . import idtxl_utils as utils
VERBOSE = False
class Data():
"""Store data for information dynamics estimation.
Data takes a 1- to 3-dimensional array representing realisations of random
variables in dimensions: processes, samples ... | pwollstadt/IDTxl | idtxl/data.py | Python | gpl-3.0 | 48,233 | [
"Gaussian"
] | cf7ed27135eb415696a76c13150f0d8221e73083937868575a5dbeb73df259a0 |
# $HeadURL$
'''
:mod: Pfn
.. module: Pfn
:synopsis: pfn URI (un)parsing
.. moduleauthor:: Krzysztof.Ciba@NOSPAMgmail.com
'''
__RCSID__ = "$Id:$"
## imports
import os
## from DIRAC
from DIRAC import S_OK, S_ERROR, gLogger
def pfnunparse( pfnDict ):
"""
Create PFN URI from pfnDict
:param dict pfnDict:
... | sposs/DIRAC | Core/Utilities/Pfn.py | Python | gpl-3.0 | 4,090 | [
"DIRAC"
] | 4450fe8cf371d48a96d2e9f6650326bcce2563897f4c04f41c9e4115d10576ad |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | neuroidss/nupic.vision | nupicvision/regions/ImageSensorExplorers/BlockSpread.py | Python | gpl-3.0 | 14,075 | [
"VisIt"
] | 29d3f253faeb79719b243353bdcf7712d7a507ea47f94de0600f95aaf3adbba8 |
#!/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 errno
import getpass
import optparse
import os
import os.path
import re
import ... | csieg/ardupilot | Tools/autotest/sim_vehicle.py | Python | gpl-3.0 | 38,374 | [
"Firefly"
] | 06dcf0771d74a8525c5e775119d30199bb55031bb8c7e8f034f7ead5c3c0bc80 |
"""2D fiber-to-chip grating coupler optimization code.
This is a simple spins example that optimizes a fiber-to-chip grating coupler
for the SOI platform. See Su et al. Optics Express (2018) for details.
To run an optimization:
$ python3 grating.py run save-folder
To view results:
$ python3 grating.py view save-fold... | stanfordnqp/spins-b | examples/invdes/grating_coupler/grating.py | Python | gpl-3.0 | 25,229 | [
"Gaussian"
] | 9d0cef17115a6d0ec8f9313aac82203277efc410d719b9093e306d5b2ac09c21 |
"""
Emotion controller for 5-motors spectrometer test bench in EH1
(ID26)
"""
# IMPORTS #
from emotion import CalcController
from emotion import log as elog
from emotion.controller import add_axis_method
import math
# GLOBAL VARIABLES #
HC = 1.2398418743309972e-06 # eV * m
ALAT_SI = 5.431065 # Ang at 25C
ALAT_... | esrf-emotion/emotion | emotion/controllers/spectro_eh1_test.py | Python | gpl-2.0 | 5,512 | [
"CRYSTAL"
] | 746fa8969e1893d73daee17b18213f3f8da07e43c9653a9ef3712fd1700304a9 |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This progr... | godfryd/pylint | checkers/format.py | Python | gpl-2.0 | 25,280 | [
"VisIt"
] | 9f4a2e83eba725813850a8d9a4208ab430e1f71b1b2669b13710da150d8f2327 |
from microbit import *
wheels=[
{
'forward': [9,14,4,18,10,15,6,-2,16,7,-9,-7,1,-6,11,2,-13,-7,-18,-1,3,-10,-14,-21,-5,-3],
'reverse': [18,9,21,13,7,2,-4,6,14,-9,7,10,-6,-1,-10,-14,-7,-2,1,5,-15,-18,3,-3,-16,-11],
'offset': 0
},
{
'forward': [13,24,7,4,2,12,-4,16,4,15,8,11,-11,1,6,-10,-16,-9,3,-8,-5,-17,-12,-... | loopspace/microbit | enigma/enigma.py | Python | mit | 2,002 | [
"Brian"
] | 7fd695adfe629b5a928191ea7ca0ca5ef99122aed30a995efd5b8b51b3ac4782 |
#!/usr/bin/env python3
from ._approximate_mll import _ApproximateMarginalLogLikelihood
class VariationalELBO(_ApproximateMarginalLogLikelihood):
r"""
The variational evidence lower bound (ELBO). This is used to optimize
variational Gaussian processes (with or without stochastic optimization).
.. mat... | jrg365/gpytorch | gpytorch/mlls/variational_elbo.py | Python | mit | 3,900 | [
"Gaussian"
] | 6088ed93ea07d07b3f92416b2b3e6aae8990633410ee0338d58ef8266866b986 |
# -*- coding: utf-8 -*-
'''
Copyright (c) 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska
This class holds the MarkovChainMonteCarlo (MCMC) algorithm based on Metropolis et al. (1953).
Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. ... | p-lauer/spotpy | spotpy/algorithms/mcmc.py | Python | mit | 7,445 | [
"Gaussian"
] | f1bf9eb4a578dcc7a9c65e0300893687a8cb4943fa2aa6a1100aabde60b52ec2 |
"""
This decoder is similar to the MADIS MAP network decoder, except it produces
data for stations in the NOAA profiler network. Many things are the same though.
"""
from pyodec.core import FileDecoder, VariableList, FixedVariableList
import numpy as np
import os
import time
import gzip
import scipy.io.netcdf
# and mak... | pyodec/pyodec | pyodec/files/madis_npn.py | Python | mit | 4,506 | [
"NetCDF"
] | 615551b2d5053605753e5459c544c2ec521a1d877a1b91b36d05f80f740082c5 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of c... | comocheng/RMG-Py | rmgpy/data/solvation.py | Python | mit | 33,877 | [
"VisIt"
] | 786df7417289846a9885d849438b0c4eead0b96c96516104232159ff2ec89db8 |
"""
1D Math Functions.
Bruce Wernick
10 June 2021
"""
import math
__all__ = ['Quad', 'Cubic', 'PolyEval', 'PolyEvalH', 'ExpFunc',
'ModExpFunc', 'LogFunc', 'RecipLogFunc', 'VaporPressureFunc',
'PowerFunc', 'ModPowerFunc', 'ShiftPowerFunc', 'GeometricFunc',
'ModGeometricFunc', 'RootFunc', 'HoerlFunc... | bru32/magz | magz/funcs.py | Python | mit | 6,919 | [
"Gaussian"
] | 0ff35bc1e3cbb76615f8b7a3fe2d23bd03475a100b2589d0f1902dbaea8225f6 |
#!/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 ... | mheap/ansible | contrib/inventory/azure_rm.py | Python | gpl-3.0 | 40,161 | [
"Galaxy"
] | beeb289579bc37313dcb942f8b6d629771d23a092568e3a9f65951cf8b4c2e03 |
# -*- coding: utf-8 -*-
## all SI units
########################################################################################
## Plot the membrane potential for a leaky integrate and fire neuron with current injection
## Author: Aditya Gilra
## Creation Date: 2012-06-08
## Modification Date: 2012-06-08
#############... | h-mayorquin/camp_india_2016 | tutorials/chemical switches/moose/neuroml/LIF/twoLIFxml_firing.py | Python | mit | 3,082 | [
"MOOSE",
"NEURON"
] | 2622c7d1baa184313ba1cfb6bf565bb80215b306edcb917d0227482e7fcb48cb |
#!/usr/bin/python
__author__="Brian Hone"
import sys, os, string
import matplotlib.pyplot as plot
import mpl_toolkits.mplot3d.axes3d as p3
import numpy as np
import gdb
from gp_data_extractor import *
class Plotter( gdb.Command ):
def __init__( self ):
super( Plotter, self ).__init__("plot", gdb.COMMAN... | bthcode/cmake_scipy_ctypes_example | gdb-plot/plotter.py | Python | bsd-3-clause | 1,448 | [
"Brian"
] | 8023dc84c4bcdeb31c5480c2a9016c329d61e68b9fa92a751aee9ea12d8bf61d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.