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 |
|---|---|---|---|---|---|---|---|
# generic docstring for whitelist/extract
GENERIC_DOCSTRING_WE = '''
Barcode extraction
------------------
""""""""""""""""
``--bc-pattern``
""""""""""""""""
Pattern for barcode(s) on read 1. See ``--extract-method``
"""""""""""""""""
``--bc-pattern2``
"""""""""""""""""
Pattern for barcode(s) on read 2. S... | CGATOxford/UMI-tools | umi_tools/Documentation.py | Python | mit | 15,892 | [
"VisIt"
] | 1d831ba6655f913b231fe040ee551d968e5580ca8a2dcfc97136923745fed43f |
# -*- coding: utf-8 -*-
from math import sqrt
import numpy as np
from ase.units import kJ
class EquationOfState:
"""Fit equation of state for bulk systems.
The following equation is used::
2 3 -1/3
E(V) = c + c t + c t + c t , t = V
0 1 2 ... | JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/utils/eos.py | Python | gpl-2.0 | 2,541 | [
"ASE"
] | 522ca6a4ed80e3d76df4e85e21ee4f7480d9e722824cb1e90d4dba5825ec9e9d |
import hashlib
import pickle
import sys
import warnings
import numpy as np
import pytest
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
from numpy.random import MT199... | WarrenWeckesser/numpy | numpy/random/tests/test_randomstate.py | Python | bsd-3-clause | 77,995 | [
"Gaussian"
] | c0a2e343564f1d60b958a6b5bd5c75145d0ac35dfd463fb5d5590472f166080a |
# Copyright (C) 2010-2018 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 v... | mkuron/espresso | src/python/espressomd/MDA_ESP/__init__.py | Python | gpl-3.0 | 7,651 | [
"ESPResSo",
"MDAnalysis"
] | dd3cadf68e7eb00daf14fd6989ed7f47f5a91f324b14773532d4ffa8542d1423 |
"""
adaptive basin-hopping Markov-chain Monte Carlo for Bayesian optimisation
This is the python (v2.7) implementation of the hoppMCMC algorithm aiming to identify and sample from the high-probability regions of a posterior distribution. The algorithm combines three strategies: (i) parallel MCMC, (ii) adaptive Gibbs ... | kerguler/hoppMCMC | src/hoppMCMC/__init__.py | Python | gpl-3.0 | 28,781 | [
"Gaussian"
] | a78dc11e45fa4462e8ce363a97b8ed0fdd7a45124563efce88d242a4963daa39 |
from collections import namedtuple
import themis.channel
# all in milliseconds
SpeedControlSpecs = namedtuple("SpeedControlSpecs", "rev_max rev_min rest fwd_min fwd_max frequency_hz")
# from WPILib HAL
TALON_SR = SpeedControlSpecs(0.989, 1.487, 1.513, 1.539, 2.037, 200.0)
JAGUAR = SpeedControlSpecs(0.697, 1.454, 1.5... | celskeggs/themis | themis/pwm.py | Python | mit | 992 | [
"Jaguar"
] | 273329880341d6c2a03c4aa77a62865e0ceecc6361b06d0aa9bdd6eec919e019 |
# -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | toastedcornflakes/scikit-learn | sklearn/naive_bayes.py | Python | bsd-3-clause | 30,634 | [
"Gaussian"
] | 7a8d7b7b4ee32ec38f712c55e73d63b3cd3e7e7e32f040873f6194aa91223884 |
# unboxer.py
from . import drg
import sys
def generate_from_referent(drg, ref, surface, complete=False, generic=False):
#sys.stderr.write("generate from %s\n" % (ref))
in_edges_dict = dict()
for edge in drg.in_edges(ref):
in_edges_dict[edge.token_index] = edge
in_edges = []
for key in sor... | valeriobasile/learningbyreading | src/unboxer/unboxer.py | Python | gpl-2.0 | 3,582 | [
"VisIt"
] | ff286df92c8f6a1c0cbe166acc035375963cd0d597b81be340f9e56953843f39 |
# -*- coding: utf-8 -*-
"""
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
"""
import socket
import os
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bo... | IronCountySchoolDistrict/powerschool_apps | config/settings/local.py | Python | mit | 2,640 | [
"GULP"
] | 41328a6a5bbd41a2c18e992b74342716d9f70715b1a28f1557b03e4e19204d61 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
from unittest import TestCase
import unittest
from pymatgen.analysis.molecule_structure_comparator import \
MoleculeStructureComparator
from pymatgen.core.structure import Molecule
__author__ = ... | tschaume/pymatgen | pymatgen/analysis/tests/test_molecule_structure_comparator.py | Python | mit | 4,916 | [
"pymatgen"
] | 73ca9335a71e206e7d26be9c6577e86cbdc9c8c8cb9a94999a69048e9fddf781 |
"""
CBMPy: CBConfig module
======================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Pub... | SystemsBioinformatics/cbmpy | cbmpy/CBConfig.py | Python | gpl-3.0 | 2,474 | [
"PySCeS"
] | 0a706a420168d647ce0772002dbc63e8e06580113c44204f7cb6294ecdb274b8 |
# (c) 2017, Brian Coca <bcoca@ansible.com>
#
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in th... | shepdelacreme/ansible | lib/ansible/cli/inventory.py | Python | gpl-3.0 | 16,793 | [
"Brian"
] | 7def2b30f793edd7272f05f2bb689e15eb6e988bed488410f117aa380d7f4049 |
import csv
import random
class NeuronParameters:
def __init__(self, name, brain_region_name, brain_side, threshold):
self.name = name
self.brain_region_name = brain_region_name
self.brain_side = brain_side
self.threshold = threshold
class NeuralConnectionParameters:
def __init__(self, src_neuron... | zibneuro/brainvispy | IO/conmat.py | Python | bsd-3-clause | 7,528 | [
"NEURON"
] | 7dda5acab416956bf29ab73e794869c933cc56598d2a1b4b5dc0758a0a546dea |
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@ansible.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 Software ... | jaddison/ansible | lib/ansible/cli/galaxy.py | Python | gpl-3.0 | 24,621 | [
"Galaxy"
] | bba0bfcc603fea8cf65c305091693d6413dac14039be4ed00f7a771605f75619 |
from yade import pack, export
pred = pack.inAlignedBox((0,0,0),(10,10,10))
O.bodies.append(pack.randomDensePack(pred,radius=1.,rRelFuzz=.5,spheresInCell=500,memoizeDb='/tmp/pack.db'))
export.textExt('/tmp/test.txt',format='x_y_z_r_attrs',attrs=('b.state.pos.norm()','b.state.pos'),comment='dstN dstV_x dstV_y dstV_z')
#... | bcharlas/mytrunk | examples/test/paraview-spheres-solid-section/export_text.py | Python | gpl-2.0 | 785 | [
"ParaView",
"VTK"
] | bf8365e6a0b3daceef357bc9ffe16345bcd6b1c74fc1bda163b9f8bd9dc3583b |
"""
An implementation of a random forest. Uses the provided DecisionTree class.
The RF is parameterized by the following values:
1. n_trees: The number of trees in the forest
2. boot_percent: The bootstrap percent. For each tree, we select a
bootstrap sample of the dataset (with replacement). This is the
... | bdol/bdol-ml | random_forests/random_forest.py | Python | lgpl-3.0 | 3,210 | [
"Brian"
] | 68dbd82afa1b7c52b96ec162c79369508a5143b8ef890d927f89fad380575955 |
#!/usr/bin/python
#
# #################################################################
# ## WARNING : this is a generated file, don't change it !
# #################################################################
#
# \file 1_export.py
# \brief Export clodbank
# \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi... | osgcc/ryzom | nel/tools/build_gamedata/processes/clodbank/1_export.py | Python | agpl-3.0 | 4,656 | [
"MOE"
] | 20da85838b33cd59c868be2a8ee7ec0ec15a3cf156102f1cfd4a916f6a80c18c |
"""
NetcdfReader class file
There are several different Netcdf libraries out there. ArcGIS has some
netcdf reading ability,and there is Scientific Python among others. We use
this class as a wrapper to plug in different libraries. I've notice the way
ArcGIS reads data is kinda slow for large files..maybe I h... | retoomey/WDSS2Python | w2py/netcdf/netcdf_reader.py | Python | apache-2.0 | 2,495 | [
"NetCDF"
] | adf0c74228d7ccdd1a62019e4cca99889890e4757230ed258b5d201356edfe4f |
#
# 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... | yasharmaster/scancode-toolkit | src/textcode/__init__.py | Python | apache-2.0 | 1,358 | [
"VisIt"
] | 47d54fb3e40f3eba76beddfc1c75cc3225873137394015463fec99420ad4e588 |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | fingeronthebutton/RIDE | src/robotide/lib/robot/model/message.py | Python | apache-2.0 | 2,506 | [
"VisIt"
] | da5e758fb7e39173a4fe8d5fd26809f3f9961ac9f7787b42568897d1d16a5bb9 |
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
import gtk, os, pango, sys
from zeroinstall import _, logger
from zeroinstall.cmd import slave
from zeroinstall.support import tasks
from zeroinstall.injector import model
from zeroinstall.gtkui import gtkutils
from z... | afb/0install | zeroinstall/gui/impl_list.py | Python | lgpl-2.1 | 6,575 | [
"VisIt"
] | 5ad454fb28cd195b6207f02dc7bf1cc6d21e553aee7bbf3239f65be8190147d9 |
"""
Example psfMC model file. The ModelComponents and distributions import
statements are optional (they are injected automatically when the model file is
processed), but their explicit inclusion is recommended.
Model components have several parameters that can generally be supplied as
either a fixed value or as a prio... | mmechtley/psfMC | examples/model_J0005-0006.py | Python | mit | 2,347 | [
"Galaxy"
] | 50b3fe90790825570b199a4cbb0a0f21b85b39e705579187c804f74e909439a1 |
# -*- coding: utf-8 -*-
"""An implementation of the Zephyr Abstract Syntax Definition Language.
See http://asdl.sourceforge.net/ and
http://www.cs.princeton.edu/research/techreps/TR-554-97
Only supports top level module decl, not view. I'm guessing that view
is intended to support the browser and I'm not interested ... | shiquanwang/numba | numba/asdl/py2_7/asdl.py | Python | bsd-2-clause | 12,446 | [
"VisIt"
] | 7c8afa72702aef01df607225a1f29de4b454c9eea07846278ac0a9272b44ee4e |
#
# Copyright (C) 2006-2007 Cooper Street Innovations Inc.
# Charles Eidsness <charles@cooper-street.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, ... | Narrat/python3-eispice | module/device.py | Python | gpl-2.0 | 32,675 | [
"xTB"
] | 55dbb245ff11f81d270af10765ae8dcfd86d52c53b06edf3badd97208997e77e |
'''
Created on Jun 2, 2011
@author: mkiyer
chimerascan: chimeric transcript discovery using RNA-seq
Copyright (C) 2011 Matthew Iyer
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 3... | madhavsuresh/chimerascan | chimerascan/deprecated/sam_v2.py | Python | gpl-3.0 | 7,926 | [
"pysam"
] | c611214d84bae92fcc214a260404c1d8a087d24b1543f572def95239eb302695 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-28 09:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('foirequest', '0020_auto_20180605_1053'),
]
operations = [
migrations.AddFi... | stefanw/froide | froide/foirequest/migrations/0021_foimessage_kind.py | Python | mit | 597 | [
"VisIt"
] | 152d8fd175948b112aa477120d6237ce0b1afb295292a653656d4ad911763f42 |
# 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/interaction/FENECapped.py | Python | gpl-3.0 | 3,595 | [
"ESPResSo"
] | 676e9d96a7384b500955b6d3a6d058e2e61bb91c72af82345e11322f2a23a3f2 |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 2: Nature-Inspired Algorithms
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2014 by Jeff Heaton
Licensed under the Apache License, Versi... | trenton3983/Artificial_Intelligence_for_Humans | vol2/vol2-python-examples/examples/example_flock.py | Python | apache-2.0 | 7,457 | [
"VisIt"
] | 80637656455e4e645b978021506dfabfbb970081fa9f5afcbd35515188413321 |
from note.module.element import AllNoteHandleResults, OneNoteHandleResult
from note.utils import Base
class Visitor:
def visit(self, results: AllNoteHandleResults):
raise NotImplementedError
class StatusResultVisitor(Visitor):
def visit(self, results: AllNoteHandleResults):
"""返回HandleResult... | urnote/urnote | note/module/visitor.py | Python | gpl-3.0 | 2,557 | [
"VisIt"
] | a15a3c18bb5b08c9da628ee4071c30c9a78ee44a19d6db75c920ad910d60b63e |
import sys
import os
from io import StringIO
import inspect
import numpy as np
import matplotlib.gridspec as gridspec
from matplotlib import pylab
import matplotlib.pyplot as plt
import scipy as sp
from scipy.interpolate import interp1d
from scipy.interpolate import Rbf, InterpolatedUnivariateSpline, splrep, splev, spl... | yuginboy/from_GULP_to_FEFF | feff/libs/GaMnAs_concentration.py | Python | gpl-3.0 | 39,959 | [
"FEFF"
] | ec7aa3d3153369625aadd374b6bb6e3ff99332c185162695f4719f20c9a89857 |
#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2012-2013 Esteban Tovagliari, Jupiter Jazz Limited
# Copyright (c) 2014-2017 Esteban Tovagliari, The appleseedhq Organization
#
# P... | aytekaman/appleseed | src/appleseed.python/__init__.py | Python | mit | 1,730 | [
"VisIt"
] | 9b2c7e5edeb2d81e1c7fbee2ef81fa1acd0f066895e9f56279023168f4da7055 |
"""Django forms for hs_core module."""
import copy
from django.forms import ModelForm, BaseFormSet
from django.contrib.admin.widgets import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, HTML
from crispy_forms.bootstrap import Field
from .hydroshare import utils
f... | hydroshare/hydroshare | hs_core/forms.py | Python | bsd-3-clause | 45,279 | [
"NetCDF"
] | 0bcae37f1e0dbaa9463ca37afa049b34ba520158cd2862cb3aeab70d62c3c408 |
## INFO ########################################################################
## ##
## plastey ##
## ======= ... | kitchenbudapest/vr | plane.py | Python | gpl-3.0 | 7,471 | [
"VisIt"
] | 6adc06afa91d699982a12b17ea849601b3616454d141ce613d7d824a30645463 |
# Expose the different parameter classes (they are really just structures)
class MCMCParamsBPHMM():
''' Creates a struct encoding the default settings for MCMC inference '''
def __init__(self):
self.Niter = 50
self.doSampleFShared = 1
self.doSampleFUnique = 1
self.doSampleUniqueZ = 0
self.doSp... | mathDR/BP-AR-HMM | parameters.py | Python | mit | 3,694 | [
"Gaussian"
] | 4002d5e3fec9ca5d30eae2bb613566afcfa00f91dcd6440f1dbf26c3d6d32e34 |
# coding: utf-8
"""
Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor
accepts.
## Getting Started
Visit our [Developer Portal](https://developers.vericred.com) to
create an account.
Once you have created an account, you can create one Application for
Production and an... | vericred/vericred-python | test/test_plan_medicare_bulk.py | Python | apache-2.0 | 10,039 | [
"VisIt"
] | 0527709931ee708e60bb41e29cb2228935a574fbdd86dbf276efb482f066ce5d |
#coding=utf8
import sys
sys.path.insert(0, '..')
from redbreast.core.spec.parser import WorkflowGrammar, WorkflowVisitor
if __name__ == '__main__':
text = """
task task1:
'''
desc abc def;
'''
class : a.b.c
end
task task2(task1):
end
task task3(task1):
end
process workflow:
'''
desc text... | uliwebext/uliweb-redbreast | test/sandbox/other_parser.py | Python | bsd-2-clause | 1,490 | [
"VisIt"
] | 078febc7a4e0953c17e2275c96fdb21794af2172d7dae9cc46c7c8c107b25b3c |
# Copyright 2020 Verily Life Sciences LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Functions to read and write data from different file systems."""
import tensorflow as tf
import xarray as x... | verilylifesciences/site-selection-tool | bsst/io.py | Python | bsd-3-clause | 3,594 | [
"NetCDF"
] | 3a63dd52edd8d7c61a66c4f50471f94e21244763b5bbd521af1e96869ef8cd8a |
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved.
# Revisions copyright 2008-2010 by Peter Cock.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Contact: Leighton Pritchard,... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/Graphics/GenomeDiagram/_GraphSet.py | Python | gpl-2.0 | 7,907 | [
"Biopython"
] | 1a79415c1525d9c332124f3a451ff672cd0c5d953fd09ed4b2411364082a37e1 |
#!/usr/bin/env python
# Author: Derrick H. Karimi
# Copyright 2014
# Unclassified
import re
import botlog
import pprint
from bbot.Utils import *
from bbot.BaseStates import *
from bbot.Data import *
from bbot.Data import *
from bbot.RegionBuy import RegionBuy
from bbot.Strategy import Strategy
#rom BaseStates.State... | AlwaysTraining/bbot | bbot/State.py | Python | mit | 35,873 | [
"VisIt"
] | bfa0178ea8d9502434d37092bb8b41bd16156bb8c643e57fb3164f23be5af9ec |
#==========================================================================
#
# Copyright NumFOCUS
#
# 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/l... | malaterre/ITK | Wrapping/Generators/Python/Tests/extras.py | Python | apache-2.0 | 14,695 | [
"VTK"
] | 39758aa5b756346bc6f1dde3c4f5e4bcf7b65c6beebdda3d1efebb20d9762afa |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import math
import numpy as np
from monty.dev import deprecated
"""
Utilities for generating nicer plots.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = ... | tallakahath/pymatgen | pymatgen/util/plotting.py | Python | mit | 10,567 | [
"pymatgen"
] | 822ebbbacdc7a4c56f14392049740c7f6ee94b32a7efa887e7949d1939c42248 |
#From : https://github.com/AnalogArsonist/qpsk_ofdm_system
import numpy
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter
from scipy.special import erfc
import sys
import logging
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
#size of constellation (N symbols per frame; N frame... | TomKealy/pyDemod | QPSKSig.py | Python | gpl-2.0 | 4,030 | [
"Gaussian"
] | 8d609ff53c6f1c72a089b0041b5202d614602b6603aa7614e352e7809ee66a88 |
__author__ = 'brian'
"""
Output in test run:
Looking up 10 keys from Google Finance
Time to download 10 stocks from Google with Multi-Threading : 6.987292528152466 seconds.
Looking up 10 keys from Google Finance
Time to download 10 stocks from Google with Multi Processing : 6.1684489250183105 seconds.
Looking up 1... | briwilcox/Concurrent-Pandas | benchmark.py | Python | apache-2.0 | 1,750 | [
"Brian"
] | 5df91a844e05b9f974bfe2095acb6c91efc5bb93820fa5dd90d62c15d1b88961 |
#!/usr/bin/env python
"""
Michael Hirsch
Original fortran code by A. E. Hedin
from ftp://hanna.ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/hwm93/
"""
from pathlib import Path
from numpy import arange
from dateutil.parser import parse
from argparse import ArgumentParser
import hwm93
from matplotlib.pyplot import show
f... | scienceopen/pyhwm93 | RunHWM93.py | Python | mit | 1,540 | [
"NetCDF"
] | b687a0cfe518ef39269fd6a52f08bbd2c8bbf0bdd120c67c48eeec9ba4e75cba |
#! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Vladimír Slávik 2012
# Python 3.2
#
# for Simutrans
# http://www.simutrans.com
#
# code is public domain
#
# read all dat files in all subfolders
# reformat pictures and save aside
import os, math, sys
import simutools
#-----
Data = []
paksize = 128
outdir = ... | simutrans/pak128 | tools/split-items-multiimage.py | Python | artistic-2.0 | 3,752 | [
"VisIt"
] | 4dbdb3fc0bfe5cbea0724462c2b9bdf7678ad3d0fe8302e7de57376becc7c713 |
import ocl
import camvtk
import time
import vtk
import datetime
import math
# 2018.08: Weave not wrapped..
def generateRange(zmin,zmax,zNmax):
if zNmax>1:
dz = (float(zmax)-float(zmin))/(zNmax-1)
else:
dz = 0
zvals=[]
for n in range(0,zNmax):
zvals.append(zmin+n*dz)
return ... | aewallin/opencamlib | examples/python/fiber/fiber_10_offsets.py | Python | lgpl-2.1 | 3,803 | [
"VTK"
] | 39caeb8232845e3ab93eba86382470963f2a89337893c550450191fe9f109b21 |
#!/usr/bin/env python
"""
This is a script for quick VTK-based visualizations of finite element
computations results.
Examples
--------
The examples assume that run_tests.py has been run successfully and the
resulting data files are present.
- View data in output-tests/test_navier_stokes.vtk.
$ python res... | sfepy/sfepy | resview.py | Python | bsd-3-clause | 30,216 | [
"VTK"
] | adcfff5e8d24ce05d06aa39c34b6250e7d52dab811b2ff0a48e868f3ee634aff |
import sys
sys.path.append('/Users/phanquochuy/Projects/minimind/prototypes/george/build/lib.macosx-10.10-x86_64-2.7')
import numpy as np
import george
from george.kernels import ExpSquaredKernel
# Generate some fake noisy data.
x = 10 * np.sort(np.random.rand(10))
yerr = 0.2 * np.ones_like(x)
y = np.sin(x) + yerr * n... | fqhuy/minimind | prototypes/test_george.py | Python | mit | 669 | [
"Gaussian"
] | e25b9a8e6083830572cf65c2c94ff1d49d61590f2dc8840b8b19ddd89d9f3172 |
from django.conf import settings
from django.contrib.auth.models import User, Group
from django.contrib.gis.db.models import *
from django.utils.translation import ugettext_lazy as _ # internationalization translate call
from django.shortcuts import get_object_or_404
import simplejson
from psycopg2 import ProgrammingEr... | Ecotrust-Canada/terratruth | django_app/referrals/models.py | Python | gpl-3.0 | 19,141 | [
"MOE"
] | 658a1f49a3f5122ba44474135c6ed8227defd15fdafd1d99e40303c3e2954b3a |
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - Multiple configuration handler and Configuration defaults class
@copyright: 2000-2004 Juergen Hermann <jh@web.de>,
2005-2008 MoinMoin:ThomasWaldmann.
2008 MoinMoin:JohannesBerg
@license: GNU GPL, see COPYING for details.
"""
... | RealTimeWeb/wikisite | MoinMoin/config/multiconfig.py | Python | apache-2.0 | 70,847 | [
"VisIt"
] | 860291faebc42d7a0f019c59f2b3a9a2d25801d199dbcc756cb7ee0a444e6ed9 |
"""
DIRAC.WorkloadManagementSystem.DB package
"""
__RCSID__ = "$Id$"
| fstagni/DIRAC | WorkloadManagementSystem/DB/__init__.py | Python | gpl-3.0 | 73 | [
"DIRAC"
] | 9f407bf9e31c0b07096b860ef7627d01071c17fa00f7180b589567f5be886f89 |
"""
Support for creating videos.
"""
# Copyright (C) 2009-2011 University of Edinburgh
#
# This file is part of IMUSim.
#
# IMUSim 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 Licens... | martinling/imusim | imusim/visualisation/video.py | Python | gpl-3.0 | 2,860 | [
"Mayavi"
] | 59c5a595f9012fe06ef12cbde18c982a77e95c6a766ebd0d091112092a81f721 |
# 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.
#
"""Code to interact with the primersearch program from EMBOSS.
"""
__docformat__ = "restructuredtext en"
class InputRecord(object):
"""Represe... | updownlife/multipleK | dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/Emboss/PrimerSearch.py | Python | gpl-2.0 | 2,366 | [
"Biopython"
] | 2d71d20307539efa5e1a8d8f3c06dd20459b5b7e1dd50b0c9bf797b8c891c0b5 |
# coding: utf-8
"""
Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor
accepts.
## Getting Started
Visit our [Developer Portal](https://developers.vericred.com) to
create an account.
Once you have created an account, you can create one Application for
Production and an... | vericred/vericred-python | test/test_provider_details.py | Python | apache-2.0 | 10,029 | [
"VisIt"
] | c2c5949b7b8c32d32f3b25a99b3751871a9b5ef89ffff57896fe2e15aad6c2cf |
# -*- coding: utf-8 -*-
import logging
import feedparser
from kalliope.core.NeuronModule import NeuronModule, MissingParameterException
logging.basicConfig()
logger = logging.getLogger("kalliope")
class Rss_reader(NeuronModule):
def __init__(self, **kwargs):
super(Rss_reader, self).__init__(**kwargs)
... | kalliope-project/kalliope_neuron_rss_reader | rss_reader.py | Python | mit | 1,345 | [
"NEURON"
] | bd7db2acacb53af5bd3b5c8da7c6a6a95c117b0c4d374292e4635249eeaccf6b |
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | tkelman/utf8rewind | tools/gyp/pylib/gyp/common.py | Python | mit | 20,338 | [
"VisIt"
] | a6f3d13b12dbdf11eb9a8e752d8b6af51b037ea967b7e5abe4b5a8edac86145c |
from __future__ import absolute_import
from ..engine import Layer
from .. import backend as K
import numpy as np
class GaussianNoise(Layer):
"""Apply additive zero-centered Gaussian noise.
This is useful to mitigate overfitting
(you could see it as a form of random data augmentation).
Gaussian Noise ... | surgebiswas/poker | PokerBots_2017/Johnny/keras/layers/noise.py | Python | mit | 2,912 | [
"Gaussian"
] | 2f99c45c76323e89efcefbbf695a7774f67c715111c3cc1bf19c55bec12be206 |
#!/usr/bin/env python
# encoding: utf-8
"""
The ipcluster application.
Authors:
* Brian Granger
* MinRK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license i... | cloud9ers/gurumate | environment/lib/python2.7/site-packages/IPython/parallel/apps/ipclusterapp.py | Python | lgpl-3.0 | 22,236 | [
"Brian"
] | 0ce9d543ff09e8114b3c25367fee033c1591bb4a57750e36ef3524d493c0f5cb |
from __future__ import division
import logging
import numpy as np
from nengo import AdaptiveLIFRate, LIF
from nengo.params import Parameter, NumberParam
from nengo.utils.compat import range
class AdaptiveLIF(AdaptiveLIFRate, LIF):
"""Adaptive spiking version of the LIF neuron model."""
probeable = ['spikes... | fragapanagos/adaptive_lif | neurons.py | Python | mit | 4,823 | [
"NEURON"
] | 6c2151815904ea6a6847c4ecb93151df591aea2db0d74a975da367a2f3bd06f6 |
#!/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... | mikedanese/contrib | hack/boilerplate/boilerplate.py | Python | apache-2.0 | 4,733 | [
"VisIt"
] | 66d9ffc40ba5410baf3bd3f046fbf1624c0d038f8e736cd9ffb13f9c1ee8cfa6 |
"""Plot various quantities related to electronic stucture integration.
"""
import numpy as np
from numpy.linalg import norm, inv, det
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d import proj3d
import matplotlib.pyplot as plt
from itertools import pr... | jerjorg/BZI | BZI/plots.py | Python | gpl-3.0 | 62,428 | [
"VASP"
] | 12c1eb378dd2c867ed6942fabac4ce35588cea5862a8f664c02342f9ff4def66 |
"""
OGRe Twitter Interface
:func:`twitter` : method for fetching data from Twitter
"""
import base64
import hashlib
import logging
import sys
import time
from datetime import datetime
from twython import Twython
from ogre.validation import sanitize
from ogre.exceptions import OGReError, OGReLimitError
from snowflake2... | dmtucker/ogre | ogre/Twitter.py | Python | lgpl-2.1 | 15,081 | [
"VisIt"
] | 5188c80cf986503975070eb17752311696bcfe239ed385753ebc774d3b82f431 |
# coding: utf-8
# Copyright 2013 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 ap... | supunkamburugamuva/course-builder | tests/functional/tests.py | Python | apache-2.0 | 122,267 | [
"VisIt"
] | f94b4efcbf12945cf9447b35933fc9e41aca97bdcb2aeb8d9d5b42381e78e699 |
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg
##
## 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 3 of the
... | graik/biskit | biskit/dock/delphiBindingEnergy.py | Python | gpl-3.0 | 18,273 | [
"Amber"
] | dbe28284421a5c606f683134f7a8da13a1a9a854ca51854b4cbd10393b564361 |
"""
Class encapsulating the management of repository dependencies installed or being installed
into Galaxy from the Tool Shed.
"""
import json
import logging
import os
import urllib
import urllib2
from galaxy.util import asbool
from tool_shed.galaxy_install.tools import tool_panel_manager
from tool_shed.util import ... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/tool_shed/galaxy_install/repository_dependencies/repository_dependency_manager.py | Python | gpl-3.0 | 33,928 | [
"Galaxy"
] | f50e5089d981af4aef2a84b8c4ac78fd53df92121051fe1e45398a29f37790f4 |
__author__ = 'lovci'
"""a tool to extract ranges from indexed .maf file, adapted from bx-python / scripts / maf_tile.py and \
http://biopython.org/wiki/Phylo_cookbook"""
import bx
import bx.align.maf
from Bio import Phylo
import pyfasta
from collections import defaultdict
import os, sys
import socket
if "tscc" in s... | YeoLab/gscripts | gscripts/conservation/maf_handler.py | Python | mit | 7,886 | [
"Biopython"
] | cc65ee2b55ecc33b50fc45d1bba1605236e2e68157db4d777df11f6c2acf28a5 |
#!/usr/bin/env python
# coding=utf-8
import glob
import click
import os
import json
import datetime
import re
import csv
from requests.exceptions import ConnectionError
from exchangelib import DELEGATE, IMPERSONATION, Account, Credentials, ServiceAccount, \
EWSDateTime, EWSTimeZone, Configuration, NT... | Fatman13/gta_swarm | sendmail_win_cs.py | Python | mit | 4,113 | [
"CRYSTAL"
] | fdac5709d591a57589188639f353e6f16e4f9510242f017eb1c56b901a77c491 |
from time import time
try:
from cStringIO import StringIO # Faster, where available
except:
from StringIO import StringIO
import sys
from tests.web2unittest import Web2UnitTest
from gluon import current
try:
from twill import get_browser
from twill import set_output
from twill.browser import *
e... | ashwyn/eden-message_parser | modules/tests/smoke/broken_links.py | Python | mit | 11,841 | [
"VisIt"
] | cb18ace14edcca187e776c1345faaabd81d936cbee3ff6d0727c3a7aeabf0d43 |
import numpy as np
import math
from scipy import stats
import matplotlib.pyplot as plt
import matplotlib.gridspec
from sklearn.mixture import GMM
def exp_max_test(max_wij_resid_sum=0.0001):
# Author: Andrew Schechtman-Rook
# This is an attempt to implement the expectation maximum algorithm from 4.4.3.
# Fi... | AndrewRook/machine_learning | chap_4.py | Python | mit | 10,072 | [
"Gaussian"
] | be95992b4973c95e2551d90afa29c85a07e92794f044793d89f7ef812f800040 |
import numpy as np
from ase.dft.stm import STM
from ase.dft.dos import DOS
from ase.dft.wannier import Wannier
def monkhorst_pack(size):
if np.less_equal(size, 0).any():
raise ValueError('Illegal size: %s' % list(size))
kpts = np.indices(size).transpose((1, 2, 3, 0)).reshape((-1, 3))
return (kpts ... | freephys/python_ase | ase/dft/__init__.py | Python | gpl-3.0 | 966 | [
"ASE"
] | af738643c8041cb92774439bb60013a3351d4dba1fe0e38a5a03179c6c1c8bf3 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software F... | andrebellafronte/stoq | stoqlib/gui/slaves/workorderslave.py | Python | gpl-2.0 | 18,157 | [
"VisIt"
] | 00bf890853ad480ca01cb2bf37bb7f876ca9846ad33c0accb9ef3fd3d18770ec |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | ravibhure/ansible | lib/ansible/modules/network/avi/avi_httppolicyset.py | Python | gpl-3.0 | 5,380 | [
"VisIt"
] | c28b2270028688ed2a0b8f80e9bf78a8efa1bc8697b7ba1d3b3603ee6ac181ea |
import matplotlib.pyplot as pl
import numpy as np
import copy
import pickle
import sys
sys.setrecursionlimit(2000)
import morphologyReader as morphR
import neuronModels as neurM
import functionFitter as funF
## parameters
Veq = -65. # mV
tmax = 300. # ms
dt = .1 # ms
K = 4
## initialization #######################... | WillemWybo/SGF_formalism | demo.py | Python | mit | 4,706 | [
"NEURON"
] | c25d9bd3edc58939be7fed7db86277b4451c2ec744c1877965aaadd3613d89a4 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import vtk
import vtk.test.Testing
import math
data_2008 = [10822, 10941, 9979, 10370, 9460, 11228, 15093, 12231, 10160, 9816, 9384, 7892]
data_2009 = [9058, 9474, 9979, 9408, 8900, 11569, 14688, 12231, 10294, 9585, 8957, 8590]
data_2010 = [9058, 10941... | hlzz/dotfiles | graphics/VTK-7.0.0/Charts/Core/Testing/Python/TestBarGraph.py | Python | bsd-3-clause | 2,326 | [
"VTK"
] | ef905e458138d26d4adfef6636b0a477af813c6f9c7b339307052069282d6486 |
#!/usr/bin/env python
from vtk import *
addStringLabel = vtkProgrammableFilter()
def computeLabel():
input = addStringLabel.GetInput()
output = addStringLabel.GetOutput()
output.ShallowCopy(input)
# Create output array
vertexArray = vtkStringArray()
vertexArray.SetName("label")
vertexArray.SetNumberOf... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Examples/Infovis/Python/graph_tree_ring.py | Python | gpl-3.0 | 2,950 | [
"VTK"
] | 6b441c827d05e796c1c9717089898cdc2c6f4a7d9bd160b308b86001ca4f19c6 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | tiagocardosos/stoq | stoqlib/gui/test/test_daterangedialog.py | Python | gpl-2.0 | 1,789 | [
"VisIt"
] | a409ac25cd89a98e6501903cd7e06f4c6226162f0da7f6f942c99d0a33990381 |
import numpy as np
import sys, random, math
from mpi4py import MPI
"""
This is a code for doing widom insertions inside LAMMPS using the python wrapper lammps.py
Usage: python widom_ins.py infile ninsert nsteps molfile
"""
def run(steps):
lmp.command("run %s" % int(steps))
def grabpe():
pe = lmp.extract_co... | piskuliche/Python-Code-Collection | Monte-Carlo/widom/widom_ins.py | Python | gpl-3.0 | 2,917 | [
"LAMMPS"
] | 45df32f68e0579875a7240b469db67f5ad549be8bf962e446401e806e2ff6cf6 |
# ./gen_mlp_init.py
# script generateing NN initialization for training with TNet
#
# author: Karel Vesely
#
import math, random
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option('--dim', dest='dim', help='d1:d2:d3 layer dimensions in the network')
parser.add_option('--gauss... | troylee/nnet-asr | tools/init/gen_recurrent_init.py | Python | apache-2.0 | 1,278 | [
"Gaussian"
] | 61563f75f3268f4fb3c3dc93ce91123f7abd5b35be44800506d227d4fbf78ca2 |
"""
Views of pages.
NOTE: Put new Ajax-only actions into main/xhr_handlers.py.
"""
import json
import os
import re
import urllib
from django.conf import settings
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.cor... | churchlab/millstone | genome_designer/main/views.py | Python | mit | 23,605 | [
"BWA"
] | 81d39359c798a5c1fd19da8aeb607a6381337023d0082bdedf3fd1466a9829c8 |
"""
NetCDF reader/writer module.
This module is used to read and create NetCDF files. NetCDF files are
accessed through the `netcdf_file` object. Data written to and from NetCDF
files are contained in `netcdf_variable` objects. Attributes are given
as member variables of the `netcdf_file` and `netcdf_variable` objects... | DailyActie/Surrogate-Model | 01-codes/scipy-master/scipy/io/netcdf.py | Python | mit | 37,641 | [
"NetCDF"
] | 3b28cb4c178339091adad014559161b573cbe6f40978b30b7acde1b2fb7febbb |
"""
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | hsorby/mapclient | src/mapclient/view/managers/plugins/pluginupdater.py | Python | gpl-3.0 | 16,669 | [
"Mayavi"
] | 84c37b2ea6f48d401d742537968bbf26cbb24243fcdb471dcfdbbacbff58301d |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the Account Settings page.
"""
from datetime import datetime
from unittest import skip
import pytest
from bok_choy.page_object import XSS_INJECTION
from pytz import timezone, utc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage, FULL_NAME
from com... | ahmedaljazzar/edx-platform | common/test/acceptance/tests/lms/test_account_settings.py | Python | agpl-3.0 | 21,256 | [
"VisIt"
] | caa10568f0cb428dd592cc45277f54c6c7dbd7d5011225572fe63c2ec25be809 |
import code
import os
import readline
import sys
from octopus.shell.completer.octopus_rlcompleter import OctopusShellCompleter
from octopus.shell.config.config import config
from octopus.shell.octopus_shell_utils import reload as _reload
class OctopusInteractiveConsole(code.InteractiveConsole):
def __init__(self... | octopus-platform/octopus | python/octopus-mlutils/octopus/shell/octopus_console.py | Python | lgpl-3.0 | 2,887 | [
"Octopus"
] | fbb52dd19d3d670bbeab7c8207fc229b3f67ba5881e8db331b7afa6901e4e7a5 |
"""User-friendly public interface to polynomial functions. """
from __future__ import print_function, division
from sympy.core import (
S, Basic, Expr, I, Integer, Add, Mul, Dummy, Tuple
)
from sympy.core.mul import _keep_coeff
from sympy.core.symbol import Symbol
from sympy.core.basic import preorder_traversal
... | ojengwa/sympy | sympy/polys/polytools.py | Python | bsd-3-clause | 169,982 | [
"Gaussian"
] | a10a157692906f1dbfab16a20ef6cd806240a4788c4f57f6357451c1db2ca088 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/gto/eval_gto.py | Python | apache-2.0 | 6,798 | [
"PySCF"
] | cb32b6a6823c96cf5129a1aa7aad054b2509990b96e6130b63ab8aa00d2ea1c2 |
#!/usr/bin/env python3
###############################################################
# Copyright 2014 Lawrence Livermore National Security, LLC
# (c.f. AUTHORS, NOTICE.LLNS, COPYING)
#
# This file is part of the Flux resource manager framework.
# For details, see https://github.com/flux-framework.
#
# SPDX-License-I... | chu11/flux-core | t/python/t0010-job.py | Python | lgpl-3.0 | 23,886 | [
"NEURON"
] | 1ffa5e339bc4a12c00902dab1ac9389fb0602ea8d5171eb14b43dbef7aedce81 |
""" phenny module written as an example of how to write
phenny modules; supposed to accompany phenny_module_howto.md
written by Mozai <moc.iazom@sesom> one Saturday afternoon
Do I even need to put a license statement here? I do? Jeez.
"This work is licensed under the Creative Commons
Attribution-... | bbot/ircbot | doc/crackship.py | Python | unlicense | 2,834 | [
"VisIt"
] | 861b1e4ede31cd86ba64dacf3b296a1933673b280d53fd7aae12653ad60618bc |
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from ase.units import Bohr
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
dat = np.loadtxt('out_0_2dsurfdown.dat')*Bohr
x = dat[0,1:].copy()
y = dat[1:,0].copy()
X, Y = np.meshgrid(x,y)
... | fuulish/surf | tests/surface/plot_2d_surf.py | Python | gpl-3.0 | 588 | [
"ASE"
] | 27b833f8c90b5f023107e04ae25873f83fed50e2f8901eab043daa064e6024a0 |
import os
import numpy as np
from ase import Atom, Atoms
from gpaw import GPAW
from gpaw.test import equal
from gpaw.lrtddft import LrTDDFT
txt = '-'
txt = None
load = True
load = False
xc = 'LDA'
R = 0.7 # approx. experimental bond length
a = 4.0
c = 5.0
H2 = Atoms([Atom('H', (a / 2, a / 2, (c - R) / 2)),
... | robwarm/gpaw-symm | gpaw/test/lrtddft2.py | Python | gpl-3.0 | 1,416 | [
"ASE",
"GPAW"
] | 10782e4140d47b8882781bfb3c0bdd79cd464d1e4254a0d091e33e8c742109e4 |
from milecastles import Story, Box, ThroughPage, ThroughSequence, ConditionFork, NodeFork, SackChange
# inspects the module to figure out the story name (e.g. corbridge)
storyName = __name__.split(".")[-1]
# create story
story = Story(
uid=storyName,
# choose an alternative startNodeUid and startSack for debug... | cefn/avatap | python/stories/housesteads.py | Python | agpl-3.0 | 16,431 | [
"VisIt"
] | a4633e4c27d81677d1e3245d24647e361a070b1b6afe4882ace0b4b7b0121836 |
#!/usr/bin/env python3
'''
This script tests the correctness of the algorithm implementation
using the technique called 'stress testing'. It pseudorandomly generates
test cases for the algorithm, and then uses 'networkx' Python library
to compute the right answer. Then it calls the app to get it's answ... | vnetserg/contraction | test.py | Python | mit | 5,845 | [
"ASE"
] | cbd301ce7b46b3c426e9abbfea0898a7e4ea616d15e0cfdfa0a8b18be0d46727 |
# Copyright 2018 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... | jart/tensorflow | tensorflow/contrib/autograph/converters/directives.py | Python | apache-2.0 | 4,040 | [
"VisIt"
] | 7bb33dc3a47f6d5caee9ccef24c9d0a72344aa6639b97ac66831b5257f421ba3 |
# Copyright (C) 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 versio... | pkreissl/espresso | testsuite/scripts/benchmarks/test_lj.py | Python | gpl-3.0 | 1,177 | [
"ESPResSo"
] | e0bf61376a0e985858e71854c392c808803f9a108651104ed667a1ef8c30d5ed |
# -*- coding: utf-8 -*-
"""
This module contains routines to convert from SACData and yt DataSets into
tvtk fields via mayavi.
"""
import numpy as np
from mayavi.tools.sources import vector_field, scalar_field
__all__ = ['get_sacdata_mlab', 'get_yt_mlab', 'process_next_step_yt',
'process_next_step_sacdata'... | Cadair/pysac | pysac/analysis/tube3D/process_utils.py | Python | bsd-2-clause | 8,784 | [
"Mayavi",
"VTK"
] | a442d496db2b880cba471c839df27a2a97fe3c68556f0049d559f75c6412e285 |
#!/usr/bin/env python
"""
forcing.py
Functions for generating ROMS forcing files (atmosphere, tides,
rivers, etc.)
Written by Brian Powell on 02/09/16
Copyright (c)2010--2021 University of Hawaii under the MIT-License.
"""
import numpy as np
from datetime import datetime
import netCDF4
import seapy
from col... | powellb/seapy | seapy/roms/forcing.py | Python | mit | 11,817 | [
"Brian",
"NetCDF"
] | c645d15e93af17afb3630b948f25cce4a84c48f2da97bf0bbed53b6a8cdb5e40 |
from ase import *
h2 = Atoms('H2', positions=[(0, 0, 0), (0, 0, 1.1)],
calculator=EMT())
print h2.calc.get_numeric_forces(h2)
print h2.get_forces()
| freephys/python_ase | ase/test/h2.py | Python | gpl-3.0 | 161 | [
"ASE"
] | 356b9015e9d264f276c884974c9790ef759fe519683b3a134bd8b8ffaaa2add6 |
from math import sqrt
from typing import List
import pytest
from guacamol.common_scoring_functions import IsomerScoringFunction, SMARTSScoringFunction
from guacamol.score_modifier import GaussianModifier
from guacamol.scoring_function import BatchScoringFunction, ArithmeticMeanScoringFunction, GeometricMeanScoringFun... | BenevolentAI/guacamol | tests/test_scoring_functions.py | Python | mit | 6,376 | [
"Gaussian"
] | 8ae029204ed0b0348379e65c691b10ce6d4e603cfe60ad43b1e76327fbba75a3 |
#!/usr/bin/env python
'''
MO integrals in PBC code
'''
import numpy
from pyscf import ao2mo
from pyscf.pbc import gto, scf, tools
cell = gto.M(
a = numpy.eye(3)*3.5668,
atom = '''C 0. 0. 0.
C 0.8917 0.8917 0.8917
C 1.7834 1.7834 0.
... | gkc1000/pyscf | examples/pbc/30-mo_integrals.py | Python | apache-2.0 | 1,370 | [
"PySCF"
] | 81628f91de436e17e572879b76736f0960834375570f64ef4a2965131ac72d4e |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'ChangeRequest.request_type'
db.add_column('core_changerequest', 'request_type', self.gf('d... | praekelt/txtalert | txtalert/core/migrations/0013_auto__add_field_changerequest_request_type.py | Python | gpl-3.0 | 14,968 | [
"VisIt"
] | cd60ace17f6396ca34cbb03356b0ec8df4ced5916549d52cc6d09083ed3f0742 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRende... | hlzz/dotfiles | graphics/VTK-7.0.0/Filters/Texture/Testing/Python/AutomaticPlaneGeneration.py | Python | bsd-3-clause | 1,327 | [
"VTK"
] | 1953250503e9f1f960ef58238cf0765c7c4397bd5eada00fe5127c60dbef05e3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.