text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to
# submit large numbers of jobs on supercomputers. It provides a python interface to physical input,
# ... | pylada/pylada-light | src/pylada/crystal/A2BX4.py | Python | gpl-3.0 | 52,473 | [
"CRYSTAL",
"VASP"
] | 594c772dfc792ba15b1d93938f6f8ced0789aa6b1b3e03be362d8059e9ee175c |
# -*- coding: utf-8 -*-
"""
Created: Nov 12, 2016
Author : Nicholas Pike
Email : Nicholas.pike@ulg.ac.be
Purpose: To calculate the Raman spectrum, at a user defined orientation and angle,
by reading in data from an abinit calculation. This program will read
the anaddb output file "anaddb.o... | abinit/abinit | scripts/post_processing/Raman_spec.py | Python | gpl-3.0 | 30,849 | [
"ABINIT",
"NetCDF"
] | 0053f0aa45388efac1af3f09d2104e4ff6bb581ed813e14c1c9dc0580c6c44de |
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import os
import pytest
import ... | kustodian/ansible | test/units/galaxy/test_collection.py | Python | gpl-3.0 | 24,460 | [
"Galaxy"
] | 65edcf171eb9024733484214ee76f0237c2dea1181d63d597661a5ad244ce22e |
"""Utilities used by the documentation scripts."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from builtins import open
import atexit
import os
import re
import sys
import shlex
import logging
import subprocess32... | yujikato/DIRAC | docs/diracdoctools/Utilities.py | Python | gpl-3.0 | 5,489 | [
"DIRAC"
] | bc5aa19e1269a43ef7a743c19e5e76b5571e983e2d9185116c20be10c0e762f4 |
from numpy import *
#import mdp
import re, os, sys, os.path, time, shelve
from optparse import OptionParser
from scipy import weave
from scipy import stats as stats
from scipy import special as special
from scipy import integrate as integrate
from scipy import misc as misc
from scipy.weave import converters
import tim... | chris-lee-mc/MutInf | dihedral_covar.py | Python | gpl-3.0 | 37,642 | [
"Gromacs",
"MDAnalysis"
] | 66bda58e5c4bea6fa476d1515baae5daa27ba36a81cce4c91bb8f968e0709d9b |
from __future__ import division
import random
import numpy as np
from sklearn.svm import SVC
from sklearn.linear_model import SGDClassifier
from sklearn import tree
from sklearn.naive_bayes import GaussianNB
def train_support_vector_machine(features):
rate = train(SVC(), features)
print 'support vector machine:',... | nh0815/py-congress | src/learn.py | Python | mit | 1,751 | [
"Gaussian"
] | d6879e2145f656de7ffb10c7bbd7fe1ba27f100a3ab2faa3972ef711a71386ab |
#!/usr/bin/env python
# This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
#
# MAUS 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 ... | mice-software/maus | src/common_py/analysis/beam_sampling.py | Python | gpl-3.0 | 30,350 | [
"Gaussian"
] | 792be9fc2e643b0c214af7725f0a66b44b86f9d8c8c37d8b20c25a3ad001e267 |
"""Atmospheric soundings.
--- NOTATION ---
The following letters will be used throughout this module.
T = number of lead times
n = number of storm objects
p = number of pressure levels, not including surface
P = number of pressure levels, including surface
F = number of sounding fields
N = number of soundings = T*n... | thunderhoser/GewitterGefahr | gewittergefahr/gg_utils/soundings.py | Python | mit | 61,534 | [
"NetCDF"
] | e7706bed08bd03ecd5ed3e000105d74869f895786bf889dc055cd0ad4daacdff |
########################################################################
# $HeadURL$
########################################################################
""" BarGraph represents bar graphs with vertical bars both simple
and stacked.
The DIRAC Graphs package is derived from the GraphTool plotting pack... | sposs/DIRAC | Core/Utilities/Graphs/BarGraph.py | Python | gpl-3.0 | 6,337 | [
"DIRAC"
] | 7a6245fed9e345af9b25757c80a638b742c0c61fab8edc99b31faf28f7fd6d87 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | kain88-de/mdanalysis | package/MDAnalysis/analysis/__init__.py | Python | gpl-2.0 | 4,540 | [
"Gaussian",
"MDAnalysis"
] | cc5b2e3aec7e51ee592fab3a61119944dfbb1af33cc5aa62ef315e9d2d721943 |
"""
This app is intended to provide the core functionality for tracking user
engagement with content and Kolibri in general. As such, it is intended
to store details of user interactions with content, a summary of those
interactions, interactions with the software in general, as well as user
feedback on the content and... | ralphiee22/kolibri | kolibri/logger/models.py | Python | mit | 4,048 | [
"VisIt"
] | c9d6ab3707a3cac4fa729041d0a3d53142b5603eed6287ed6a2e78ffa21f025b |
#!/usr/bin/env python
# coding:utf-8
__version__ = '3.1.18'
__password__ = ''
__hostsdeny__ = () # __hostsdeny__ = ('.youtube.com', '.youku.com')
__content_type__ = 'image/gif'
__mirror_userjs__ = () # __mirror_userjs__ = '//www.example.com/user.js'
import os
import re
import time
import struct
import zlib
import b... | JerryXia/fastgoagent | goagent/server/gae/gae.py | Python | mit | 17,011 | [
"VisIt"
] | afaffddd4e36fa50c61d927fa02ea9adf20c8e69ea3481bb1f013f5cb6346b19 |
# Copyright notice
# ================
#
# Copyright (C) 2010
# Lorenzo Martignoni <martignlo@gmail.com>
# Roberto Paleari <roberto.paleari@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software... | shotgunner/wusstrace | pywuss/visitor/ddg.py | Python | gpl-3.0 | 2,595 | [
"VisIt"
] | e05c3628b98942b60b09067c3c8be447e5a5438c1fd8e24ae160b61118c08c72 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
import multiprocessing
import os
import unittest
import warnings
import numpy as np
from monty.serialization import loadfn
from pymatgen.core import SETTINGS
from pymatgen.analysis.pourbaix_di... | richardtran415/pymatgen | pymatgen/analysis/tests/test_pourbaix_diagram.py | Python | mit | 14,060 | [
"pymatgen"
] | fb05b1139134a18d9d92970a6007cceec2f4f5c61d05a94b99c1a4c1a3fac054 |
from os.path import join, isfile
from os import listdir
import cv2 as cv
import numpy as np
from time import time
def openImagesInFolder(folder):
img_paths = [join(folder, fname)
for fname in listdir(folder)
if isfile(join(folder, fname))]
try:
return [(cv.imread(img_... | ArtemZamuruev/FingerprintRecognitionPython | fp_rec_opencv.py | Python | gpl-3.0 | 7,529 | [
"Gaussian"
] | 8ace0c169422f973e5b461cc6e3537e2940311be626eb244945ad1c13fff68bd |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','description','copyright','... | benbahrenburg/Ti.SpeechKit | iOS/build.py | Python | mit | 6,789 | [
"VisIt"
] | ff2cf3f31e949ec4f5c2d2454f2a2c9a275d80afc73b662bd35e79196d987d08 |
#
# Copyright (C) 2013-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... | mkuron/espresso | src/python/espressomd/checkpointing.py | Python | gpl-3.0 | 9,652 | [
"ESPResSo"
] | 82e306682b1e6d6a7a6645ff13473ad919a878b908801c8fd260f7a11cdb7094 |
# coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | kevinlee12/oppia | scripts/linters/pylint_extensions.py | Python | apache-2.0 | 94,179 | [
"VisIt"
] | 80c42d3d5a724f02e81cfd38ab41be3497c5b9d183a0fab7697556825771e640 |
spell_check_dict={
'steele stake': 'steel stake',
'gas mowe': 'gas mower',
'metal plate cover gcfi': 'metal plate cover gfci',
'lawn sprkinler': 'lawn sprinkler',
'ourdoor patio tile': 'outdoor patio tile',
'6 teir shelving': '6 tier shelving',
'storage shelve': 'storage shelf',
'American Standard Bone round toliet': '... | hamid-omid/search_relevance | spell_corr.py | Python | mit | 170,663 | [
"Amber",
"CRYSTAL",
"ESPResSo"
] | f58f874d8561f3d192bbdd9709caeac539b662d8abd087cc0132bb767813c59d |
""" passive_soma.py:
In this script, we simulate a single compartment soma in MOOSE.
This soma does not have any ion-channels, only passive properties. It should
behave like a RC circuit. A current is injected into soma.
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2015, Dilawar... | BhallaLab/moose-examples | passive/passive_soma.py | Python | gpl-2.0 | 1,513 | [
"MOOSE"
] | 0d3d7eeaa3d773370ba7c736155fc71fdd6dea50e7dff0f98bd11aedbd5f4153 |
''' Tests for netcdf '''
from __future__ import division, print_function, absolute_import
import os
from os.path import join as pjoin, dirname
import shutil
import tempfile
import warnings
from io import BytesIO
from glob import glob
from contextlib import contextmanager
import numpy as np
from numpy.testing import a... | valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/scipy/io/tests/test_netcdf.py | Python | gpl-2.0 | 9,376 | [
"NetCDF"
] | dacdb5e6b2325be6093a6a316d46f195ceaa1f2ff8074879fd15dc4f0ddd815d |
"""Simple shallow test of the CASTEP interface"""
import os
import shutil
import tempfile
import traceback
from ase.test.castep import installed
assert installed()
# check if we can import everything
ase_castep_dir = "ase"
try:
castep_calc = __import__(ase_castep_dir + ".calculators.castep", globals(), locals(... | grhawk/ASE | tools/ase/test/castep/castep_interface.py | Python | gpl-2.0 | 3,026 | [
"ASE",
"CASTEP"
] | f2f9c68c99389b406f50dd6abf91b697ed4919792fcf5aa9cc74b5f100ce9de8 |
from fern.primitives import Undefined
import tools
class Node(object):
def __init__(self):
self._parent = None
self.value = None
self.namebearing = False
def reference(self, key):
'''
Looks up a name/key reference in either this scope
or the containing one.
... | andrewf/fern | fern/ast/node.py | Python | mit | 3,785 | [
"VisIt"
] | 446dd30fcd71b111157f3d932d8fce60c96cbf5faf5ea84958973fe0039b6e18 |
# Frame Rate Converter
# Version: 2.0 (2021-09-18) beta 9
# By Etienne Charland
# Based on Oleg Yushko's YFRC artifact masking,
# johnmeyer's frame interpolation code, and
# raffriff42's "weak mask" and output options.
# Pinterf is the one who spent the most time working on the core libraries, adding features and fixin... | mysteryx93/FrameRateConverter | FrameRateConverter.py | Python | gpl-2.0 | 23,977 | [
"VisIt"
] | c0d4e6c53543d0954681428d3f0e05301ce3bd202a29ebeeeb8ce9e5df513d6b |
#!/usr/local/bin/env python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
Replica-exchange simulation algorithms and specific variants.
DESCRIPTION
T... | choderalab/brokenyank | src/yank/repex.py | Python | lgpl-3.0 | 95,611 | [
"NetCDF",
"OpenMM"
] | 40761229d93551ac7d10369d7cb8689338c719ef7560f8637ff9ca5f419609c2 |
"""
constants.py
this file contains any application-wide constants:
help, about messages, version numbers, geometry, styles, etc
djo, 5/07
"""
# ------------------------- imports -------------------------
import sys
# ------------------------- version -------------------------
version = "0.87"
# -------------... | JaneliaSciComp/Neuroptikon | Source/realdata/constants.py | Python | bsd-3-clause | 7,560 | [
"NEURON"
] | 7929588764d6480dcc2b624b4f05925cdd4f13b6ef711df8686ff842d38b1601 |
# -*- coding: utf-8 -*-
"""Preprocessing of fMRI data and pRF model time courses."""
# Part of py_pRF_mapping library
# Copyright (C) 2016 Ingo Marquardt
#
# 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
# ... | ingo-m/py_pRF_mapping | pyprf/analysis/preprocessing_main.py | Python | gpl-3.0 | 9,479 | [
"Gaussian"
] | 5788df55d7ff8185f4f7abebf20d2a998a123bb5f9686de9d524811ebbdfe974 |
# coding=utf8
# Copyright (c) 2012 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.
"""Collection of subprocess wrapper functions.
In theory you shouldn't need anything else in subprocess, or this module failed.
"""
import... | yquant/gn-standalone | tools/subprocess2.py | Python | apache-2.0 | 16,450 | [
"VisIt"
] | edf237ba8a27e14e2b8fb9f2dc7a2777b24ca061f0f39885de2ff05503cdb7bd |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_nwchempy
----------------------------------
Tests for `nwchempy` module.
"""
import unittest
#from nwchempy import nwchempy
from nwchempy.nwchempy import NWChem, NWChemFreq
nwc = NWChem('./data/butan-1-ol')
class TestNwchempy(unittest.TestCase):
def setU... | benjaminabel/nwchempy | tests/test_nwchempy.py | Python | bsd-3-clause | 667 | [
"NWChem"
] | 73e8f6913302aa51e434968066e7947aa4f285fd33943ccc02d222f0b8ff1921 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/scf/atom_hf.py | Python | apache-2.0 | 6,993 | [
"PySCF"
] | 3d9cb34affd9a648411b4183554ebcded66cb2575095030ec0da33b3d2e8155d |
#!/usr/bin/env python2.7
# coding=utf-8
###############################################################################
##############################PROJET MODELISATION##############################
###############################################################################
import mdtraj as md
import csv
im... | eloiletagant/DiffusionLateraleDeLipides | Diffusion.py | Python | mit | 4,793 | [
"MDTraj"
] | 69ddc2f2ca29e7d75c75bf2f8ef2e2938bd62cecbb50924836681b385c992ee6 |
from gpaw import GPAW
from gpaw.response.df import DielectricFunction
calc = GPAW('Ag_GLLBSC.gpw')
calc.diagonalize_full_hamiltonian(nbands=30)
calc.write('Ag_GLLBSC_full.gpw', 'all')
# Set up dielectric function:
df = DielectricFunction(calc='Ag_GLLBSC_full.gpw', # Ground state input
domega0... | robwarm/gpaw-symm | doc/exercises/eels/eels.py | Python | gpl-3.0 | 774 | [
"GPAW"
] | 374d0fae93d4d62335b7f3acf9255715651fbb61d9fe5daefbc9f2596208223b |
# jhbuild - a tool to ease building collections of source packages
# Copyright (C) 2001-2006 James Henstridge
#
# tinderbox.py: build logic for a non-interactive reporting build
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | GNOME/jhbuild | jhbuild/frontends/tinderbox.py | Python | gpl-2.0 | 14,413 | [
"VisIt"
] | 667bd2d1b9de6cbfd52fd78bfa7d478ae14328ec5c209bd2262cbf81c624546f |
########################################################################
# This example demonstrates volume scaling of spine as part of a
# multiscale computation. As in ex8.2, we have the reactions:
#
# Ca+CaM <===> Ca_CaM; Ca_CaM + CaMKII <===> Ca_CaM_CaMKII (all in
# spine head, except that the Ca_CaM_C... | BhallaLab/moose | moose-examples/tutorials/Rdesigneur/ex8.3_spine_vol_change.py | Python | gpl-3.0 | 2,904 | [
"MOOSE"
] | c2777ff12b035891edf07dc74576967b4ef7074a51fc99028e99acdf6782f582 |
"""
Statistical tools for time series analysis
"""
import numpy as np
from scipy import stats, signal
from statsmodels.regression.linear_model import OLS, yule_walker
from statsmodels.tools.tools import add_constant
from tsatools import lagmat, lagmat2ds, add_trend
#from statsmodels.sandbox.tsa import var
from adfvalu... | pprett/statsmodels | statsmodels/tsa/stattools.py | Python | bsd-3-clause | 29,665 | [
"ADF"
] | 24cbd6dcd3d53fb70e43e0bbd5c9f8f72003597197e0d9f4e481e17e174fda1b |
# -*- coding: utf-8 -*-
''' Diagram to display a property defined at nodes over linear elements. '''
import geom
import vtk
from postprocess.xcVtk import colored_diagram as cd
class NodePropertyDiagram(cd.ColoredDiagram):
'''Diagram to display a property defined at nodes over linear elements.'''
def __init__(... | lcpt/xc | python_modules/postprocess/xcVtk/node_property_diagram.py | Python | gpl-3.0 | 2,069 | [
"VTK"
] | d5bd99a2e8a293290f1bf2f8c183acb60efb02288e8ce9e9e89c895c6e7d9cd8 |
# this is from https://github.com/cython/cython/wiki/PackageHierarchy
import sys, os, stat, subprocess
from distutils.core import setup
from Cython.Distutils import build_ext
from distutils.extension import Extension
# we'd better have Cython installed, or it's a no-go
try:
from Cython.Distutils import build_ex... | bblais/plasticity | setup.py | Python | mit | 2,798 | [
"Brian"
] | 4940b24d301d8f4b69c5a6fccabdd79926825043ed3b26013c233c366fe8cd6d |
"""Plotting functions for visualizing distributions."""
from __future__ import division
import numpy as np
from scipy import stats
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.transforms as tx
from matplotlib.collections import LineCollection
import warnings
from distut... | petebachant/seaborn | seaborn/distributions.py | Python | bsd-3-clause | 24,321 | [
"Gaussian"
] | 1da9b4a47141aa74b2dc035ad41113e152867e343bd33171d90f903261b9f870 |
# This file is part of BHMM (Bayesian Hidden Markov Models).
#
# Copyright (c) 2016 Frank Noe (Freie Universitaet Berlin)
# and John D. Chodera (Memorial Sloan-Kettering Cancer Center, New York)
#
# BHMM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public Licen... | jchodera/bhmm | bhmm/tests/test_output_gaussian.py | Python | lgpl-3.0 | 2,008 | [
"Gaussian"
] | 7a38e90f3a21fc77d048f3d190c891cc8d635868cb241abaedaa9549c8c8399d |
#!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | fluo-io/zetten | lib/muchos/existing.py | Python | apache-2.0 | 15,232 | [
"Elk"
] | 6b26486bfd70bf665c4cdfcd243aa260798e54cc49f9fbe27dfc6dc286631054 |
# A collection of tools to remotely access a CATMAID server via its API
#
# Copyright (C) 2017 Philipp Schlegel
#
# 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 ... | schlegelp/pymaid | pymaid/upload.py | Python | gpl-3.0 | 109,416 | [
"NEURON"
] | 1aa7396d55648594457e92ad3c6c659d6241dec5c0d506b146f2747c01e9016a |
# 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/unittest/TestEsLogging.py | Python | gpl-3.0 | 2,190 | [
"ESPResSo"
] | 16beeb373c1a9cbb783ccde257ca0f4e858119d77a0bea65f0bed7332b16a193 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, lepture.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, ... | juposocial/jupo | src/lib/emoji.py | Python | agpl-3.0 | 13,783 | [
"Bowtie",
"Octopus"
] | ce61d65260dbc8746f518e16fc2938cd4af600df2f2534431b407ed2e16a90de |
from sfepy.base.base import *
from sfepy.base.ioutils import skip_read_line, read_token, read_array, read_list, pt
import sfepy.base.la as la
from sfepy.base.progressbar import MyBar
import os.path as op
supported_formats = {
'.mesh' : 'medit',
'.vtk' : 'vtk',
'.node' : 'tetgen',
'.txt' : 'comsol',
... | certik/sfepy | sfepy/fem/meshio.py | Python | bsd-3-clause | 38,679 | [
"VTK"
] | a20347df92d6873d6c0e0363bb820324f74b7f432725953d906e0e84b13841da |
"""
Crops an input FITS image to a specified pixel dimension about a position (ra, dec).
Author: Robin Cook
Date: 24/03/17
TO-DO:
- Add combine feature.
"""
# Astropy imports
from astropy.io import fits as pyfits # FITS input/output
from astropy import wcs # World Coordinate System
from astropy.nddata import Cutou... | AstroRobin/xGASS-decomposition | CropImage.py | Python | agpl-3.0 | 12,293 | [
"Galaxy"
] | d76b04ea34e16cfd91f45da05bfde17466d3c0eb6ee4fc5f43240292076ffe39 |
import pygame
# Shared stats for towers (starting stats)
red1name = 'Ember Crystal (Fire 1)'
red1damage = 120
red1rad = 70
red1cost = 70
blue1name = 'Ice Crystal (Ice 1)'
blue1damage = 80
blue1rad = 85
blue1cost = 90
green1name = 'Earth Crystal (Earth 1)'
green1damage = 100
green1rad = 70
green1cost = 60
red2name ... | taytam/crystaldefense | tower_stats.py | Python | mit | 848 | [
"CRYSTAL"
] | 1df15faf9510b369706eb1b129b18e71003f0d7e8b19dd4e2eea9051ffc102e8 |
from itertools import zip_longest
import tensorflow as tf
from functools import reduce
from operator import mul
import numpy as np
VERY_BIG_NUMBER = 1e30
VERY_SMALL_NUMBER = 1e-30
VERY_POSITIVE_NUMBER = VERY_BIG_NUMBER
VERY_NEGATIVE_NUMBER = -VERY_BIG_NUMBER
def get_initializer(matrix):
def _initi... | Incogniiito/Chrononaut | my/tensorflow/general.py | Python | apache-2.0 | 6,128 | [
"Gaussian"
] | 01608fd97e8c66d940d728ba7857867f876149b01057ad8d0da935a98b0f8ef6 |
import copy
import logging
from datetime import datetime
import six
from six import string_types
from elasticsearch import Elasticsearch
from elasticsearch.helpers import bulk_index
from elasticutils._version import __version__ # noqa
from elasticutils import monkeypatch
monkeypatch.monkeypatch_es()
log = loggi... | einvalentin/elasticutils | elasticutils/__init__.py | Python | bsd-3-clause | 71,366 | [
"Brian"
] | 212641f1f956ef18377daf4fb1a24b48847108a40fd10f2c9d4c1390f53a1a3f |
# -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2011 Thomas Perl and the gPodder Team
#
# gPodder 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... | xerxes2/gpodder | src/gpodder/gui.py | Python | gpl-3.0 | 192,079 | [
"VisIt"
] | 1f7c1ebe6688bb21e0fb5dd9dfe5a581a31b3bfd4b94d5cb011319531a604752 |
import pysam
import sys
from palindrome import lcs as fastLCS
min_matching_stretch = 999 # require a dimer at minimum
###################################################################################################
def lcs(s, t, a=0, b=1e10):
"""
longest common substring, which includes at least one ch... | andyrimmer/Platypus | scripts/annotatePalindromes.py | Python | gpl-3.0 | 3,821 | [
"pysam"
] | b4750281044dad4ff24030df2686903684cc46a1e32ed7d873e6b165989c5e71 |
# Copyright (C) 2016 Zhixian MA <zxma_sjtu@qq.com>
# MIT license
"""
This module split simulated galaxy particles hdf5 file into two sub
hdf5 files.
"""
import os
import re
import h5py
import numpy as np
class PartSplit:
"""
The partticle split class
Parameters
----------
input_dir: string
... | myinxd/gastrack | gastrack/partsplit.py | Python | mit | 5,391 | [
"Galaxy"
] | 8059c95822dcb5d6edcf7c517b0f0538ec36f8058922f800b43c47c67dbe8964 |
# Heavy refactor of https://github.com/MNoichl/physarum
#import numpy as np
import cupy as np
from PIL import Image as IMG
from typing import List, Tuple
import math
import tqdm
from cupyx.scipy.ndimage.filters import gaussian_filter, uniform_filter, median_filter
#from scipy.ndimage.filters import gaussian_filter, u... | 5agado/data-science-learning | graphics/physarum/Physarum.py | Python | apache-2.0 | 17,014 | [
"Gaussian"
] | 653f05baaf01f66b9b60c971d6dee1d64b47924e27ffe2a6e898f01604fe3ddb |
"""
Test for weights in GLM, Poisson and OLS/WLS, continuous test_glm.py
Below is a table outlining the test coverage.
================================= ====================== ====== ===================== === ======= ======== ============== ============= ============== ============= ============== ==== =========
Tes... | bashtage/statsmodels | statsmodels/genmod/tests/test_glm_weights.py | Python | bsd-3-clause | 39,626 | [
"Gaussian"
] | 477f5b2dacff8b4ce2b58437df70f22b8a5389f5da1e8bd731e8dfebe9abcb44 |
from __future__ import print_function, division
import unittest, numpy as np
from pyscf import gto, scf
from pyscf.nao import scf as nao_scf
mol = gto.M( verbose = 1, atom = '''Mn 0 0 0;''', basis = 'cc-pvdz', spin = 5, )
#gto_mf_rhf = scf.RHF(mol)
#gto_mf_rhf.kernel()
gto_mf_uhf = scf.UHF(mol)
gto_mf_uhf.kernel()
dm ... | gkc1000/pyscf | pyscf/nao/test/test_0085_mn_scf.py | Python | apache-2.0 | 2,248 | [
"PySCF"
] | d8fd3b059474a51a28db8f88df0bc12d5602e39de8c5f665cc9d557513fd5c0d |
# -*- coding: utf-8 -*-
# @Author: YangZhou
# @Date: 2017-06-19 13:12:54
# @Last Modified by: YangZhou
# @Last Modified time: 2017-06-19 13:13:42
from aces.materials import Material
from ase.dft.kpoints import ibz_points
from ase.lattice import bulk
class structure(Material):
def set_parameters(self):
... | vanceeasleaf/aces | aces/materials/Al.py | Python | gpl-2.0 | 986 | [
"ASE"
] | 83a7306383e8a8371c15db1db9f86f84cfe5691a38523b1f2ad812beb9936461 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import gzip
import json
import os
import unittest
import warnings
import xml.etree.cElementTree as ET
from pathlib import Path
from shutil import copyfile, copyfileobj
import numpy as np
import pytest
from mo... | davidwaroquiers/pymatgen | pymatgen/io/vasp/tests/test_outputs.py | Python | mit | 86,350 | [
"VASP",
"Wannier90",
"pymatgen"
] | 7681e1e8b3fbcaa20f85c7a7f8b7a452640b37c8f8f2b79e5566a86378fe3af9 |
import os
import platform
import sys
import unittest
from glob import glob
import numpy as np
class NotAvailable(Exception):
pass
# Custom test case/suite for embedding unittests in the test scripts
if sys.version_info < (2, 4, 0, 'final', 0):
class CustomTestCase(unittest.TestCase):
assertTrue =... | alexei-matveev/ase-local | ase/test/__init__.py | Python | gpl-2.0 | 5,859 | [
"ASE"
] | 0d9665ce15529c70d748aa7f485759336874d2c07d37192c868582819a09b294 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 Foundation, either version 3 of the License, or
# (at your option) an... | LukeHoersten/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 16,250 | [
"Galaxy"
] | d938b1f8820e0575d921cd4f61a64eee32537b66b029d7887f851b7a0fa5ca73 |
# -*- coding: utf-8 -*-
"""Advent of Code 2015 - Day 03: Perfectly Spherical Houses in a Vacuum."""
from typing import NamedTuple
from dataclasses import dataclass
class Position(NamedTuple):
row: int
col: int
@dataclass
class Santa:
row: int = 0
col: int = 0
def move(self, order):
if ... | BrendanLeber/adventofcode | 2015/day-03.py | Python | mit | 2,537 | [
"VisIt"
] | a4c23f795b35fff80e7435f92efc178c5e9cff19d140606e32524b96f91ef335 |
#! rhf gradient code
"""
This script calculates nuclear gradients of RHF Wavefunction using
gradients of one and two electron integrals obtained from PSI4.
Reference: "Derivative studies in Hartree--Fock and Moller--Plesset theories",
J. A. Pople, R. Krishnan, H. B. Schlegel and J. S. Binkley
DOI: 10.1002/qua.560160... | ashutoshvt/psi4 | samples/psi4numpy/rhf-gradient/input.py | Python | lgpl-3.0 | 5,029 | [
"Psi4"
] | 62a2b5253509a1f145b746626c2109a753379e2a74d9e616c83450c01b967f71 |
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""
This is an implementation of a state-emitting MarkovModel. I am using
terminology similar to Manning and Schutze.
Functions:
train_bw ... | poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/MarkovModel.py | Python | apache-2.0 | 22,733 | [
"Biopython"
] | 6011c6e463f19ac30f705844ff65b55f68cd2c0157e31e8988537ecbe4ff5f82 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides objects for extracting timing data from the ABINIT output files
It also provides tools to analye and to visualize the parallel efficiency.
"""
from __future__ import unicode_literals, d... | migueldiascosta/pymatgen | pymatgen/io/abinit/abitimer.py | Python | mit | 24,683 | [
"ABINIT",
"pymatgen"
] | 6604e5d5d8de2e046ebde64133db71fd94a2cf3d597d1ec8298e5805e3a2ec24 |
#!/usr/bin/env python
from setuptools import setup, find_packages
import re
# Auto-update ipyrad version from git repo tag
# Fetch version from git tags, and write to version.py.
# Also, when git is not available (PyPi package), use stored version.py.
INITFILE = "ipyrad/__init__.py"
CUR_VERSION = re.search(r"^__vers... | dereneaton/ipyrad | setup.py | Python | gpl-3.0 | 1,498 | [
"pysam"
] | 577e678cdd86aea6437ca8a4066488cdb59da73593054c41a1958a1f72c3903b |
"""
Galaxy job handler, prepares, runs, tracks, and finishes Galaxy jobs
"""
import os
import time
import logging
import threading
from Queue import Queue, Empty
from sqlalchemy.sql.expression import and_, or_, select, func
from galaxy import model
from galaxy.util.sleeper import Sleeper
from galaxy.jobs import JobW... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/jobs/handler.py | Python | gpl-3.0 | 42,408 | [
"Galaxy"
] | ea32b1c0ab3442f91067d863a0921f4b8bf5c2a3e6d7c3621d0cd812b2e5fb4a |
#
# 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 ... | qiuxin2012/BigDL | pyspark/bigdl/nn/criterion.py | Python | apache-2.0 | 32,306 | [
"Gaussian"
] | 35d2a81d500045f62a802e1d856e6b098ddd7be998fba105dbecc05fafa6c22e |
# -*- encoding: utf-8 -*-
import abc
import base64
import json
import logging
import requests
import six
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from xml.dom.minidom import parseString
from module import loging
try:
from urllib import urlencode
except ... | wylok/opsweb | sso_cas/cas_client.py | Python | gpl-3.0 | 20,727 | [
"CASINO"
] | 6bb471692d0095c2390ee3d474ddbdc194373c13569c1eabd968083c20070184 |
import pytest
import os
import glob
import numpy as np
from fireworks.core.rocket_launcher import rapidfire
from abiflows.fireworks.workflows.abinit_workflows import NscfFWWorkflow
from abiflows.fireworks.tasks.abinit_tasks import NscfFWTask
from abiflows.fireworks.utils.fw_utils import load_abitask, get_fw_by_task_in... | gmatteo/abiflows | abiflows/fireworks/integration_tests/itest_nscf.py | Python | gpl-2.0 | 4,142 | [
"ABINIT"
] | 2c3ae141b023c914ee6c83643a5e575c44236cdd69ca77c419ac20dc004934a0 |
import datetime
import errno
import json
from sqlalchemy import orm
from DIRAC.DataManagementSystem.Client.FTS3Job import FTS3Job
from DIRAC.DataManagementSystem.private import FTS3Utilities
from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers
from DIRAC.DataManagementSystem.Client.DataManager impor... | fstagni/DIRAC | DataManagementSystem/Client/FTS3Operation.py | Python | gpl-3.0 | 18,737 | [
"DIRAC"
] | fd6be13566a120c20ce9c70b400b365bf910c45e2deb36b6b629528cc4c19d0c |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | biocore/micronota | setup.py | Python | bsd-3-clause | 2,553 | [
"scikit-bio"
] | cf027586a8c3dd3ca580b61f69f98c5224d2175686e89e9eb03f4f62a8e1e173 |
# 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... | cloudpbl-senrigan/combinator | tools/gyp/pylib/gyp/common.py | Python | mit | 19,170 | [
"VisIt"
] | 08c3f506c1b24e8e918d7fec84972b8a7b5d6d7bcf872a16efc8e31182a90100 |
"""
Module for parsing python code
"""
import os
import re
import sys
from ast import iter_child_nodes
from ast import NodeVisitor
from ast import parse
SUFFIX_RE = re.compile('/?(__init__)?\.py[cwo]?')
class InvalidPythonFile(ValueError):
pass
class Visitor(NodeVisitor):
"""
Walk a module's ast. Buil... | ChrisBeaumont/smother | smother/python.py | Python | mit | 6,631 | [
"VisIt"
] | 9b42b87451c356fc26eff858ed578f73b90c2ebb5e5b22942ec3db66c374e5f4 |
import subprocess
from .exceptions import PyperclipException
EXCEPT_MSG = """
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.org """
def init_osx_clipboard():
def copy_osx(text):
p = subprocess.Popen(['pbcopy', 'w... | cbertinato/pandas | pandas/io/clipboard/clipboards.py | Python | bsd-3-clause | 3,639 | [
"VisIt"
] | b02070059bb412aa1dabc0d8cbeca6c5281a476609a1d5e237b76a030668a66c |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
#
# 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... | tszym/ansible | lib/ansible/modules/network/avi/avi_prioritylabels.py | Python | gpl-3.0 | 3,614 | [
"VisIt"
] | af57dd0be7699b92519cdef4c1e24eccb7fd75db5ff4fb8249e6fd9324c127af |
import argparse
import time
from itertools import repeat
import random
ap = argparse.ArgumentParser()
ap.add_argument('difficulty', metavar='difficulty', type=int,
help='Difficulty level of the problem. Can be 1, 2, 3, 4')
ap.add_argument('-l', '--language', type=str,
help='Implementa... | mertyildiran/Plexus | examples/classification_prime.py | Python | mit | 3,668 | [
"NEURON"
] | 3545bb1cf5522f16b8bbb13f91cfec5244924e8e95a2eee7a7b113765d67ee42 |
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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 a... | matrix-org/synapse | synapse/storage/databases/main/metrics.py | Python | apache-2.0 | 20,314 | [
"VisIt"
] | a2d37bf91ef2fc0f534175d222e61f4a1a26ab216275db0b7a63ecca84222092 |
#!/usr/bin/env python
desc="""Report distance matrix between proteins.
Dependencies:
- Biopython, numpy & scipy
"""
epilog="""Author: l.p.pryszcz@gmail.com
Bratislava, 28/04/2016
"""
import os, sys, gzip
import numpy as np
from datetime import datetime
from Bio import SeqIO
from multiprocessing import Pool
from scip... | lpryszcz/rclups | rclups0.py | Python | gpl-3.0 | 9,729 | [
"Biopython"
] | a0a44862ccf6fcaf60f17e71722933f72b6f0009334fad8da9380124aec99b68 |
"""
DIRAC Wrapper to execute python and system commands with a wrapper, that might
set a timeout.
3 FUNCTIONS are provided:
- shellCall( iTimeOut, cmdSeq, callbackFunction = None, env = None ):
it uses subprocess.Popen class with "shell = True".
If cmdSeq is a string, it specifies the command string... | ic-hep/DIRAC | src/DIRAC/Core/Utilities/Subprocess.py | Python | gpl-3.0 | 22,673 | [
"DIRAC"
] | eea6ccb013ce208ea071d33ff6a8abb1e3325380ecd11e0fe717f8f629c9aa70 |
"""
Contains an abstract base class that supports chemically aware data splits.
"""
import inspect
import os
import random
import tempfile
import itertools
import logging
from typing import Any, Dict, List, Iterator, Optional, Sequence, Tuple
import numpy as np
import pandas as pd
import deepchem as dc
from deepchem.... | lilleswing/deepchem | deepchem/splits/splitters.py | Python | mit | 50,898 | [
"RDKit"
] | e6accdd4d6bd65d5dad41517c86bba5f327adb33d6666c653306891bd0386974 |
#!/usr/bin/env python
import sys
import os
import PyQt4
import vtk
from vtk.test import Testing
class TestTimeUtility(Testing.vtkTest):
def testConvertBack(self):
t = 0
d = vtk.vtkQtTimePointUtility.TimePointToQDateTime(t)
print d
t2 = vtk.vtkQtTimePointUtility.QDateTimeToTimePoint(d)
print t2
... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/GUISupport/Qt/Testing/Python/TestTimeUtility.py | Python | gpl-3.0 | 596 | [
"VTK"
] | 5fe435d37adc59d472e0b45e0d0e9bfd2994d6f48295258cb4146e68ab44ad0c |
#!/usr/bin/python
import sys, os.path
from getopt import gnu_getopt
from datetime import datetime
from commands import getstatusoutput
from os.path import isfile, isdir, exists, join
from os import mkdir, listdir
LIB_PATH=""
INPUT=None
OUT_PATH=None
RUNS = 0
EXEC="espresso-custom "
EXEC_PATH=" ../" + EXEC
TI... | emeryberger/DieHard | src/archipelago/benchmarks/espresso/data/run-multiple.py | Python | gpl-2.0 | 1,921 | [
"ESPResSo"
] | 7603dbb07b6b6c42e8fc1d5bd156b675e2c9e881a7a133bcd85ac89810fd9ec5 |
from gi.repository import Gtk
from gajim import gui
gui.init('gtk')
from gajim.gui.dataform import FakeDataFormWidget
from gajim.common.const import CSSPriority
from test.gtk import util
util.load_style('gajim.css', CSSPriority.APPLICATION)
fake_form = {
'instructions': 'This is the a long long long long long ... | gajim/gajim | test/gtk/fake_dataform.py | Python | gpl-3.0 | 1,134 | [
"VisIt"
] | 2d0356ef84582862bf384fe1936ecc1554eacd6ec9b325d7ca2532abec5944d6 |
#!/usr/bin/env python3
"""
Convert flat DICOM file set into a BIDS-compliant Nifti structure
The DICOM input directory can be organized with or without session subdirectories:
With Session Subdirectories:
<DICOM Directory>/
<SID 1>/
<Session 1>/
Session 1 DICOM files ...
<Session 2>/
... | celstark/bidskit | dcm2bids.py | Python | mit | 30,732 | [
"VisIt"
] | 1cec27f499d9668129c70568ca6f05deb6ee3e0062c176e41527f0981006b349 |
# coding: utf-8
# Copyright (c) Henniggroup.
# Distributed under the terms of the MIT License.
from __future__ import division, print_function, unicode_literals, \
absolute_import
"""
Compute the reduced matching lattice vectors for heterostructure
interfaces as described in the paper by Zur and McGill:
Journal o... | henniggroup/MPInterfaces | mpinterfaces/transformations.py | Python | mit | 28,173 | [
"pymatgen"
] | 75356ca576cbc9f232d1b141d0c5d08ac7384194669be504397297b90499271c |
# Author: Suyog Dutt Jain <suyog.jain@aero.iitb.ac.in>
# Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
from os.path import abspath
from StringIO import StringIO
import copy
import numpy as np
import unittest
import datasets
... | liulion/mayavi | mayavi/tests/test_optional_collection.py | Python | bsd-3-clause | 4,683 | [
"Mayavi"
] | a47a89066f752098153e20fc0da6b88ffd870b16b21c075563f92a09e2c8b867 |
# Matthew Ryan Dillon
# github.com/thermokarst
#
# --- Day 20: Infinite Elves and Infinite Houses ---
#
# To keep the Elves busy, Santa has them deliver some presents by hand,
# door-to-door. He sends them down a street with infinite houses numbered
# sequentially: 1, 2, 3, 4, 5, and so on.
#
# Each Elf is assigned a n... | thermokarst/advent-of-code-2015 | day20.py | Python | mit | 2,724 | [
"VisIt"
] | ebfdae1bcb6f5d18f5b218fd94f1674ae50639706714adf9a3dfe343b6bae45b |
# -*- encoding: utf-8
from decimal import Decimal
from sqlalchemy import Column
from sqlalchemy import event
from sqlalchemy import exc
from sqlalchemy import Integer
from sqlalchemy import Numeric
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy import testing
... | monetate/sqlalchemy | test/dialect/mssql/test_engine.py | Python | mit | 21,759 | [
"ASE"
] | a723caab63e0b03851d2383efbf9d867ba0c4943b520dc9187957d74e5a031f2 |
'''
MFEM example 28
See c++ version in the MFEM library for more detail
'''
import os
import mfem.ser as mfem
from mfem.ser import intArray
from os.path import expanduser, join, dirname
import numpy as np
from numpy import sin, cos, exp, sqrt, pi, abs, array, floor, log
def build_trapezoid_mesh(offset):
... | mfem/PyMFEM | examples/ex28.py | Python | bsd-3-clause | 7,490 | [
"VisIt"
] | 6d156baca3fd9d81478ea27a30386b0404d6c6582153bd201001a45d0a16d7c4 |
# 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... | euclidjda/dnn-quant | scripts/tf_upgrade.py | Python | apache-2.0 | 26,243 | [
"VisIt"
] | 1b2c0bf69cf5efa86b3f3a1629868d890031649f20e1d976c13e7c069d49fd4a |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import numpy as np
from sisl._internal import set_module
from sisl import Atom, Geometry, SuperCell
from ._common impor... | zerothi/sisl | sisl/geom/nanotube.py | Python | mpl-2.0 | 3,536 | [
"ASE"
] | 1037285c2e181d508d32357eea0234a1604f93be128b06f4a8b29f40ec431a56 |
"""Generate SWIG interfaces
This module generates a number of SWIG interface (.i) files and Custom model
header and source files.
Generated interface files are:
-- genn_weapper.i - interface of the main module
-- NeuronModels.i -- interface of the NeuronModels module
-- PostsynapticModels.i -- interface o... | genn-team/genn | generate_swig_interfaces.py | Python | gpl-2.0 | 44,872 | [
"NEURON"
] | 278f7da5ac1379babd5db3e8cf070aa59202c8f91efeae72e660aaf120d020cd |
"""
Python ICE-CASCADE hillslope erosion-deposition model component
Null model: defines do-nothing methods for required interface, used to disable
the hillslope model component
"""
from .base import base_model
import numpy as np
class null_model(base_model):
"""
Do-nothing class to be used for disabled hills... | keithfma/py_ice_cascade | py_ice_cascade/hillslope/null.py | Python | mit | 1,299 | [
"NetCDF"
] | be87321353a40077e281bec68152ee3fcf7c52f2812400a3974d5c6b55436e0a |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import scipy.stats as ss
import os, sys, time
try:
from mpi4py import MPI
except ImportError:
import nompi4py as MPI
try:
import acor
except ImportError:
print 'Do not have acor package'
pass
class... | vhaasteren/ptaresamplelib | ptaresamplelib/ptmcmc.py | Python | gpl-3.0 | 33,765 | [
"Gaussian"
] | bd5e2f50b8ac98b2d92a6a2462c00dced81b0bd3248b87daed0ca89473a61629 |
#### PATTERN | VECTOR ##############################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
############... | EricSchles/pattern | pattern/vector/__init__.py | Python | bsd-3-clause | 105,811 | [
"VisIt"
] | 5f708548965429356da4f7048d16100a4e2ef40ccdf811d7f93f810cc3a1fc71 |
from random import choice
import pysam
import os
import sys
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('input_bam', help="input BAM or SAM file (must be sorted!)")
parser.add_argument("output_bam", help="output BAM or SAM file")
max_window=10000
options ... | TheFraserLab/Hornet | mapping/rmdup_pe.py | Python | apache-2.0 | 3,609 | [
"pysam"
] | eba0d038a181faec5cd6342dca4918d58d1f4d808d44369a19ca7cde6a95a9bf |
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
from ansible.cli.galaxy import _display_collection
from ansible... | ansible/ansible | test/units/cli/galaxy/test_display_collection.py | Python | gpl-3.0 | 1,398 | [
"Galaxy"
] | 0e57590c1d39904cb8ab026f56b365af74b80c071f1c38fbb00e5ac77fa5ba34 |
"""Support for Z-Wave lights."""
from __future__ import annotations
import logging
from typing import Any, Callable
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import ColorComponent, CommandClass
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_... | w1ll1am23/home-assistant | homeassistant/components/zwave_js/light.py | Python | apache-2.0 | 14,187 | [
"Amber"
] | 86f23c489f9fa2cbd1a2bd750b66d11487c7f9583c40a016b6f341d3fafa1da3 |
# 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... | govarguz/espressopp | src/tools/init_cfg/__init__.py | Python | gpl-3.0 | 948 | [
"ESPResSo"
] | 2e0d48953677e89e04a71ccfa63e4aa22414060f6184b32d9c5579ceacace401 |
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
#======================================================================
#
# emake.py - emake version 3.6.9
#
# history of this file:
# 2009.08.20 skywind create this file
# 2009.11.14 skywind new install() method
# 2009.12.22 skywind implementation execute int... | skywind3000/skywind3000.github.io | emake/emake.py | Python | mit | 95,860 | [
"VisIt"
] | 1f501fa3f1c161083ff7ba5a89dc829d84c41bf58e1f68ec70527bb82304eee1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
What it does
============
This optional tool adds a number of ions specified by the user to nodes with state 'em-mdrun-able' by calling the Gromacs tool genion.
The node topologies will be updated accordingly. Finally, L{zgf_grompp} will be called in order to compile... | CMD-at-ZIB/ZIBMolPy | tools/zgf_genion.py | Python | lgpl-3.0 | 2,739 | [
"Gromacs"
] | bab5db94e980bccd49382a396a305b188bcb86d23e4f1f8aa45b56e249e821db |
# -*- coding: utf-8 -*-
"""
Cpp类访问属性封装
"""
class CppVisit(object):
NONE = 0
PUBLIC = 1
PROTECTED = 2
PRIVATE = 3
def __init__(self, visit):
if visit not in range(CppVisit.NONE, CppVisit.PRIVATE + 1):
raise ValueError('visit type not in legal range')
self.__visit = vis... | lailongwei/llbc | tools/building_script/cpputils/cppvisitattr.py | Python | mit | 788 | [
"VisIt"
] | a031c17077070e6ffe5e2a207d19f5873b7d26bd2aa93041c7656274e70758a3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.