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 |
|---|---|---|---|---|---|---|---|
"""
Functional Alignment
====================
When performing any type of group analysis, we assume that each voxel is
reflecting the same computations across all participants. This assumption is
unlikely to be true. Several standard preprocessing steps assist in improving
'anatomical alignment'. We spatially normaliz... | elvandy/nltools | examples/02_Analysis/plot_hyperalignment.py | Python | mit | 9,764 | [
"Gaussian"
] | b2151c33ab851ea070c39fca1e403c099e748fd1f095c250c0eb11ba10e5b24d |
#!/usr/bin/env python
#pylint: disable=missing-docstring
####################################################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simu... | Chuban/moose | python/MooseDocs/tests/presentation/test_presentation.py | Python | lgpl-2.1 | 2,441 | [
"MOOSE"
] | 766e2f89277a852006e60366a9f762e98725e08ef19b7c42de37eafa9be03d47 |
#!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
current_font_size = 16
default_text = "ABCDEFGHIJKLMnopqrstuvwxyz"
text_color = (246/255.0, 255/255.0, 11/255.0)
bg_color = (56/255.0, 56/255.0, 154/255.0)
renWin = vtk.vtkRenderWindow()
renWi... | hlzz/dotfiles | graphics/VTK-7.0.0/Rendering/OpenGL/Testing/Python/TestFreetypeTextOverlay.py | Python | bsd-3-clause | 1,771 | [
"VTK"
] | 0ed343ac4ac7d429d35cc073f8c94235bb8d540e68851e5fe1c4e8e478961723 |
# Monte Carlo policy evaluation
# Every-visit
# Deterministic state transition
import numpy as np
from grid_world import standard_grid, negative_grid
from dp_ipe_dst_dp import print_values, print_policy
SMALL_ENOUGH = 1e-4
GAMMA = 0.9
def play_one_episode(grid, policy):
valid_states = list(grid.actions.keys())
# p... | GitYiheng/reinforcement_learning_test | test00_previous_files/mc_pe_dst_ev.py | Python | mit | 1,908 | [
"VisIt"
] | e8501040eb21e93c59c025d90fff056309e7e38bcd6d0fb6f215725c5b0e8e65 |
"""
kmerfreq_ar_2_wrapper.py
A wrapper script for KmerFreq_AR_v2.0
Peter Li - GigaScience, BGI-HK
"""
import optparse
import os
import shutil
import subprocess
import sys
import tempfile
def stop_err(msg):
sys.stderr.write(msg)
sys.exit()
def cleanup_before_exit(tmp_dir):
if tmp_dir and os.path.exists(... | gigascience/galaxy-bgisoap | tools/kmerfreq_ar_2/kmerfreq_ar_2_wrapper.py | Python | gpl-3.0 | 7,986 | [
"Galaxy"
] | 1bb6a954295eb33934091465d539bd2e0866283805f659ed65b326205bc06ff4 |
#!/usr/bin/env python
__author__ = 'Duane Edgington'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'duane at mbari.org'
__doc__ = '''
Master loader for all CANON activities in September 2011 and beyound
Mike McCann and Duane Edgington and Reiko
MBARI 15 August 2013
@var __date__: Date of last s... | mikemccann/stoqs | loaders/CANON/loadCANON_september2011_dor.py | Python | gpl-3.0 | 5,057 | [
"NetCDF"
] | 06c42f4bcef35c828ecc29fafaad4770170bed143707513223e5ff70711af610 |
"""
Script to automate verification of msprime against known statistical
results and benchmark programs such as ms and Seq-Gen.
Tests are structured in a similar way to Python unittests. Tests
are organised into classes of similar tests. Ideally, each test
in the class is a simple call to a general method with
differe... | jeromekelleher/msprime | verification.py | Python | gpl-3.0 | 202,116 | [
"DIRAC"
] | 9f00130709d9bd1aff53260f600aca7e67112488babb3ddea9f1c0617e3e12c9 |
"""
Tests which scan for certain occurrences in the code, they may not find
all of these occurrences but should catch almost all. This file was adapted
from numpy.
"""
from __future__ import division, absolute_import, print_function
import os
import sys
import scipy
import pytest
if sys.version_info >= (3, 4):
... | lhilt/scipy | scipy/_lib/tests/test_warnings.py | Python | bsd-3-clause | 4,192 | [
"VisIt"
] | fdf2fd04cb71b496ed2783f240d2098b2d4342c0de2de0fb447aeaa50749f6b8 |
import os
from pymol import cmd
cwd = os.getcwd()
files = os.listdir(cwd)
targets = [x for x in files if x[-3:] == 'pdb']
for target in targets:
cmd.load(target)
| dvillega/scripts | load_all_pdbs.py | Python | mit | 168 | [
"PyMOL"
] | 828842a5dbc3dad0b6a785a8fca0a63b9b816833382c1b7e1217490fef896607 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@brief: Import netcdf precipitation data in GRASS GIS
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
@author: Brendan Harmon (brendanharmon@gmail.com)
"""
import os
import sys
impor... | baharmon/panama_hydrological_modeling | utilities/precipitation_stats.py | Python | gpl-2.0 | 2,835 | [
"NetCDF"
] | 6b6de9f8a4aee276954c9b00bd66c1ff85806c2ecba7ae7285bbc7953c9caeed |
#!/usr/bin/env python3
"""
```swagger-yaml
/addcontact/ :
get:
produces:
- application/json
description: | ... | chalbersma/persist_transaction | api/addcontact.py | Python | gpl-3.0 | 4,565 | [
"VisIt"
] | 8cc96bf29a6966b3face005cdc4948add1bf5cbbf5045c072434f8b1ff30989f |
# -*- coding: utf-8 -*
from django.utils.translation import ugettext as _
PURPOSESADDRESSINCONTRACT = (
('D', _('Delivery Address')),
('B', _('Billing Address')),
('C', _('Contact Address')),
)
PURPOSESADDRESSINCUSTOMER = (
('H', _('Private')),
('O', _('Business')),
('P', _('Mobile Private'))... | scaphilo/koalixcrm | koalixcrm/crm/const/purpose.py | Python | bsd-3-clause | 935 | [
"VisIt"
] | e7d6acc784114a0352f92c3f0e348cc14f1e102a53493cf97fb6530e058eda50 |
# This file is part of DmpBbo, a set of libraries and programs for the
# black-box optimization of dynamical movement primitives.
# Copyright (C) 2014 Freek Stulp, ENSTA-ParisTech
#
# DmpBbo is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publis... | stulp/dmpbbo | python/bbo/DistributionGaussian.py | Python | lgpl-2.1 | 3,624 | [
"Gaussian"
] | 027952bd381d14f3a00a2bc3f587fcf59e4c0af7b0f4a5acb279b6e37c9bac97 |
"""Radiative corrections to electron-proton scattering: a Python library
Copyright (c) Alexander Gramolin, 2016
https://github.com/gramolin/rosenbluth/
"""
import numpy as np
from scipy import special
from scipy import integrate
"""Some mathematical and physical constants"""
pi = np.pi
m_e = 0.510998928e-... | gramolin/rosenbluth | radcorr.py | Python | mit | 24,687 | [
"Avogadro"
] | 7ccd02a2381b3f46b4d1325a0bdaa12a92388b4ec7c1482e8bb8fcf482847b9b |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Test sub pixel positioning (A round about way of getting an iso surface.)
# See cubed sphere for the surface before sub pixel poisitioning.
sphere = vtk.vtkSphere()
sphere.... | hlzz/dotfiles | graphics/VTK-7.0.0/Filters/General/Testing/Python/subPixelPositionMin.py | Python | bsd-3-clause | 2,045 | [
"VTK"
] | 6f638a3541ba4bd2b7fc0670d8abf63c39cfe8e1f3dc1b401609e93770c8d457 |
#!/usr/bin/env python
'''
setup board.h for chibios
'''
import argparse
import sys
import fnmatch
import os
import dma_resolver
import shlex
import pickle
import re
import shutil
parser = argparse.ArgumentParser("chibios_pins.py")
parser.add_argument(
'-D', '--outdir', type=str, default=None, help='Output directo... | meee1/ardupilot | libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | Python | gpl-3.0 | 86,310 | [
"CRYSTAL"
] | 57c535d788b5b394b3a5027929268dbce3292a6b972453bcb28ff64ffa63cd8e |
from subprocess import call
from pymatgen.analysis.structure_matcher import StructureMatcher
from pymatgen.core.structure import Structure
from glob import glob
import os
# This test is simply calling a shell script, which calls a python main recipe
# (Originally a function used for ad-hoc manual testing) and verifie... | henniggroup/MPInterfaces | mpinterfaces/tests/main_recipes/test_interface_main.py | Python | mit | 1,286 | [
"VASP",
"pymatgen"
] | 9e7ed734a062ed07b956de2688bae5c2579b4628531e77a3960d3c038c856bb4 |
# This file is part of Androguard.
#
# Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# 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://... | CZ-NIC/thug | src/Analysis/androguard/decompiler/dad/graph.py | Python | gpl-2.0 | 16,773 | [
"VisIt"
] | 6098c71fc0775d8dafd4af00ffe5fab0ab35d58c6a41256e8d45fe98c9326e0a |
import numpy as np
import numpy.linalg as linalg
import numpy.matlib
gama = 1 #kernel width parameter for gaussian kernel
alpha = np.random.uniform(0, 1, 51)
while True:
temp = np.random.uniform(-1, 0, 49)
if abs(linalg.norm(alpha) - linalg.norm(temp)) < 0.01:
break
alpha = np.append(alpha, temp)
alpha = alpha.r... | akhilpm/Masters-Project | miscellaneous/syntheticData/synthetic.py | Python | mit | 1,705 | [
"Gaussian"
] | 496a21a5dc61d97ab0fe5022d87f6ef6ac8fe3553c9808e23203a60c809aa26c |
#!/usr/bin/env python
# Copyright 2012, 2013 The GalSim developers:
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
#
# GalSim is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | mardom/GalSim | devel/get_sysinfo.py | Python | gpl-3.0 | 940 | [
"Galaxy"
] | 4a865b034075d18041301e8ea656302c9361eef8d0470c5d9bd875188032d3ff |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# https://github.com/paramaggarwal/CarND-LaneLines-P1/blob/master/P1.ipynb
#https://github.com/NikolasEnt/Advanced-Lane-Lines/blob/master/LaneLine.ipynb
from __future__ import print_function
from __future__ import division
import roslib
import sys
import traceback
import r... | wilselby/diy_driverless_car_ROS | rover_cv/lane_detection/src/lane_detection/lane_detection_module.py | Python | bsd-2-clause | 20,590 | [
"Gaussian"
] | e4d91eba0856ebb7b8f3173b7d17699b36f0279a5de8bbd2be05118303ff4ae6 |
from magma import *
class Crystal(Part):
name = 'Crystal'
IO = ['output O', Bit]
def __init__(self, freq, name='Crystal', board=None):
super(Crystal, self).__init__(name, board)
self.frequency = freq
def on(self):
gpio = self.O.getgpio()
gpio.input().on()
Part... | bjmnbraun/icestick_fastio | thirdparty/magma/parts/generic/crystal.py | Python | mit | 350 | [
"CRYSTAL"
] | f26a36ae3e3ba9cbbf627663246c328f0d536a08d820da1e106fc237f8e02da4 |
"""Tests for routines in tetrahedron_method.py."""
import numpy as np
from phonopy.structure.tetrahedron_method import (
get_all_tetrahedra_relative_grid_address,
get_tetrahedra_integration_weight,
)
rel_ga_ref = [
0,
0,
0,
1,
0,
0,
1,
1,
0,
1,
1,
1,
0,
... | atztogo/phonopy | test/structure/test_tetrahedron_method.py | Python | bsd-3-clause | 11,231 | [
"phonopy"
] | fef7b39c88cdb48bee9c1eb8f493c346a36a14702ab30093a2929f32087a07e4 |
# -*- coding: utf-8 -*-
"""Tests for getters."""
import unittest
from pybel import BELGraph
from pybel.dsl import ComplexAbundance, Protein, Rna
from pybel.struct.getters import get_tf_pairs
from pybel.testing.utils import n
def _tf_up(graph, protein, rna):
graph.add_directly_increases(
ComplexAbundanc... | pybel/pybel | tests/test_struct/test_getters.py | Python | mit | 1,963 | [
"Pybel"
] | 55f99682aaa2bd58289a92daa7dde29efc127f1d0ecbf0c691228b79d0d7664b |
#! /usr/bin/env python
from __future__ import print_function, division
from collections import namedtuple
"""
Copyright (C) 2016 Wesley Fraser
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, eithe... | fraserw/PyMOP | trippy/pill.py | Python | gpl-2.0 | 27,616 | [
"Gaussian"
] | 6da99363efcce3f0ddc2e424cfee431fa7f104650feeae051c0d8b19168fe9c6 |
"""This class is deprecated and is only here to give an informative
error message to users about the new interface."""
"""This module provides the class VariationalProblem in Python. This
needs special handling and we cannot use the SWIG wrapper directly
since we need to call the JIT compiler."""
# Copyright (C) 2007... | maciekswat/dolfin_1.3.0 | site-packages/dolfin/fem/variationalproblem.py | Python | gpl-3.0 | 1,625 | [
"VisIt"
] | 8e4fcce73b5a3e83d424aaf6b5d6a55ecfa720013ee9104ee3ad2f6a91d780fb |
#This is the implementation of the Naive Bayes classifier with laplace and gaussian smoothing
from random import shuffle;
import math
class NBclassifier:
def __init__(self):
self.p_y = {} #this stores the class labels and their counts
self.p_X_y = {} #this stores... | adirastogi/carlemon | src/NBcode/naive_bayes.py | Python | mit | 8,624 | [
"Gaussian"
] | 3446a8727e2bcd9b0da9b3e28c932a61c829ba27022cb795b8de55096bab30ee |
import logging
import os
import Queue
import shutil
import subprocess
import tempfile
import threading
import time
from contextlib import contextmanager
# TODO: eliminate the use of fabric here.
from galaxy import eggs
eggs.require( 'paramiko' )
eggs.require( 'ssh' )
eggs.require( 'Fabric' )
from fabric.operations i... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/tool_shed/galaxy_install/tool_dependencies/recipe/install_environment.py | Python | gpl-3.0 | 12,974 | [
"Galaxy"
] | 8711bc13e76ed90c1cefd5d5be4ce85e2923e1bdef348ea4e6b73297a04c64b9 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 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/test/test_feedback_dialog.py | Python | gpl-2.0 | 1,497 | [
"VisIt"
] | d27d8fd98fa36176b90116584ec1f41d0372a9aaddeb2b4f98f71ef1442e8570 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | python/peacock/tests/postprocessor_tab/test_MediaControlPlugin.py | Python | lgpl-2.1 | 5,711 | [
"MOOSE"
] | efbaf3505c015c1ca3d346adbe53fa72a6459d292de3b48af260bb7f6335033d |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2016 - 2021 Bas van Meerten and Wouter Franssen
# This file is part of ssNake.
#
# ssNake 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 ver... | smeerten/ssnake | src/ssNake.py | Python | gpl-3.0 | 399,024 | [
"FLEUR",
"Gaussian"
] | 4474ca6fef6cf948407c544fa6880eb8929b6454ea3058fe6115375e6b178538 |
"""Utility functions for the work with response matrices."""
from __future__ import division
import numpy as np
from scipy import stats
from matplotlib import pyplot as plt
from remu import binning
from remu import migration
from remu import plotting
def _block_mahalanobis2(X, mu, inv_cov):
"""Efficiently calcula... | ast0815/likelihood-machine | remu/matrix_utils.py | Python | mit | 36,606 | [
"Gaussian"
] | d0fd76dca9030471a5362e7c46e22101bc37124cee5260eb54c3a0c5ca2d9763 |
""" Contains the base classes for rollover targets and rollover target banks."""
# rollover.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
# Documentation and more info at http://missionpinball.com/mpf
import logging
... | jabdoa2/mpf | mpf/devices/rollover.py | Python | mit | 2,432 | [
"Brian"
] | bacfecbe2afefb54c885b2ff3524c07418a95907f81bf9e61953ca1ab041c513 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgarren/spack | var/spack/repos/builtin/packages/r-genefilter/package.py | Python | lgpl-2.1 | 1,881 | [
"Bioconductor"
] | 4ef94f1615547ce0ed54db0c55df8a4fc3ec18c2f15c44a04685e13c0ff5a765 |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__all__ = ["multivariate_gaussian_samples", "nd_sort_samples"]
import numpy as np
from scipy.spatial import cKDTree
def multivariate_gaussian_samples(matrix, N, mean=None):
"""
Generate samples from a multidimensional Gaussian with a g... | dfm/george | george/utils.py | Python | mit | 2,454 | [
"Gaussian"
] | c65ac3469b4cd5f51304c03aa424ad8c98220ff899298354b2e97b270406cc83 |
# -*- coding: utf-8 -*-
#
# Copyright © 2011 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""
Utilities for the Dictionary Editor Widget and Dialog based on Qt
"""
import re
#----Numpy arrays support
class FakeObject(object):
"""Fake class u... | koll00/Gui_SM | SMlib/widgets/dicteditorutils.py | Python | mit | 8,736 | [
"NetCDF"
] | a88234547cf2d8e069ca71d70cba5c2789cda54e87957261bcedb52abb3979d6 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2018, CRS4
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify... | crs4/hl7apy | hl7apy/v2_3_1/tables.py | Python | mit | 31,360 | [
"VisIt"
] | 98eee724443a158ed2b6ceb3052bd0eea82e53ab6c09f0a01f05509f04fc5ba3 |
from __future__ import division
from statsmodels.compat.python import iteritems, range, string_types, lmap, long
import numpy as np
from numpy import dot, identity
from numpy.linalg import inv, slogdet
from scipy.stats import norm
from statsmodels.regression.linear_model import OLS
from statsmodels.tsa.tsatools import... | phobson/statsmodels | statsmodels/tsa/ar_model.py | Python | bsd-3-clause | 33,913 | [
"Gaussian"
] | 31c7d6953b9657e4e895dc2a5c3e9e140b720ff3d454c4d92d6dc947c922999b |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 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... | andrebellafronte/stoq | stoqlib/gui/test/test_productiondetailsdialog.py | Python | gpl-2.0 | 6,838 | [
"VisIt"
] | 76a79cd01405d0e1dea58c580aa13359bc7a77ac2182f10c31e9cc2f81540e88 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSva(RPackage):
"""Surrogate Variable Analysis.
The sva package contains functions... | iulian787/spack | var/spack/repos/builtin/packages/r-sva/package.py | Python | lgpl-2.1 | 2,392 | [
"Bioconductor"
] | 18f8ab0e007a8b97b7a6849cbe724ee86285d140fb944b73ca77417363e04fb2 |
# 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
#
# Unless required by appl... | sunqm/pyscf | pyscf/adc/radc.py | Python | apache-2.0 | 115,909 | [
"PySCF"
] | 52cfca7c3861d070decf93ea1c882672cf22b236a0b875f4da62a94f9a14bb70 |
# Copyright (c) 2013 Michael Bitzi
# Licensed under the MIT license http://opensource.org/licenses/MIT
import logging
from pwm.ffi.xcb import xcb
import pwm.windows
import pwm.atom
class Cursor:
fleur = 52
left_ptr = 68
sizing = 120
bottom_left_corner = 12
bottom_right_corner = 14
top_left_c... | mibitzi/pwm | pwm/root.py | Python | mit | 3,290 | [
"FLEUR"
] | 562ac776567127b94925596c18ec36cb31a46469b38d5cf1f6254d78295b71b1 |
#!/usr/bin/python
###############################################################################
#
# This script produces state labels for all ionic states in MDAnalysis output
# based on coordination integers and groups these according to a passed
# regular expression. Though, the passed state_labels could be any num... | cing/ChannelAnalysis | ChannelAnalysis/CoordAnalysis/Grouping.py | Python | mit | 9,522 | [
"MDAnalysis"
] | 14957d1f2838c9ee8fc79f2e69902b4c8e988c649ad0e52816d497ca265cd1f1 |
# -*- coding: utf-8 -*-
# @Author: YangZhou
# @Date: 2016-09-06 16:41:54
# @Last Modified by: YangZhou
# @Last Modified time: 2017-06-01 21:40:29
from aces.materials import Material
from aces.modify import get_unique_atoms
from ase import Atoms,Atom
from math import pi,sqrt
from ase.dft.kpoints import ibz_points
f... | vanceeasleaf/aces | aces/materials/ZrNiSn.py | Python | gpl-2.0 | 1,158 | [
"ASE"
] | cb9a31299da3a968eeb3ee5b50daca89479a3f694be27c768492264b0b994d9a |
from datetime import datetime
import threading
from time import time, sleep
import sys
"""
Module with different timer options. These control how often a callable is called.
"""
# this is adapted code from the original gist
class RepeatTimer(threading.Thread):
"""
This timer creates a thread. When the time l... | m2ci-msp/ematoblender | ematoblender/scripts/ema_io/ema_staticserver/scheduler.py | Python | gpl-3.0 | 4,542 | [
"Brian"
] | d930dcdaa8f59ac1bc973c4600fd85e4e425d991af6bd55465b8c3dd868e4674 |
import numpy as np
import matplotlib.pyplot as pl
from scipy.io import netcdf
def readResults(rootFile):
# Read inverted profiles
ff = netcdf.netcdf_file(rootFile+'.inversion', 'r')
synthProf = ff.variables['map'][:]
ff.close()
# Read inverted parameters
ff = netcdf.netcdf_file(rootFile+'.parameters', 'r')
par... | cdiazbas/hazel | runMPI/readResults.py | Python | mit | 550 | [
"NetCDF"
] | 85555177ac9a67813441736d7590551a89d9bb04a48f46a73b9112c096b80840 |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import datetime
import json
from copy import deepcopy
from collections import defaultdict
__version__ = '0.0.8.dev'
class Color(object):
"""
A color type. Internally stored as RGB, and does not supp... | storborg/pyweaving | pyweaving/__init__.py | Python | mit | 19,858 | [
"Octopus"
] | bc4459619e57934117f8ed9b7f684c38ec2d53c1319c334d9378fd5606e2d20c |
"""
Predicting potential dopants
"""
import warnings
import numpy as np
from pymatgen.analysis.structure_prediction.substitution_probability import (
SubstitutionPredictor,
)
from pymatgen.core.periodic_table import Element, Species
def get_dopants_from_substitution_probabilities(structure, num_dopants=5, thre... | gmatteo/pymatgen | pymatgen/analysis/structure_prediction/dopant_predictor.py | Python | mit | 7,469 | [
"pymatgen"
] | a5bb3f15ec23337ce0b7ac9cc0f9a7626214954e133af268b9c85f11bd8a7e8f |
# File: sshcustodian/vasp/sshjobs.py
# -*- coding: utf-8 -*-
# Python 2/3 Compatibility
from __future__ import (unicode_literals, division, absolute_import,
print_function)
"""
Modifies custodian.vasp.jobs() to also check the PBS_NUM_PPN environment
variable. This is necessary if you plan to ... | jkglasbrenner/sshcustodian | sshcustodian/vasp/sshjobs.py | Python | mit | 4,145 | [
"VASP",
"pymatgen"
] | d4008f74ba931a5e62261597b842555efd9861a8b00adab1b498d964b6354b83 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
from diraccfg import CFG
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import List
def loadJDLAsCFG(jdl):
"""
Load a JDL as CFG
"""
def cleanValue(value):
value = v... | yujikato/DIRAC | src/DIRAC/Core/Utilities/JDL.py | Python | gpl-3.0 | 4,840 | [
"DIRAC"
] | 83ca5751d9a436da72a6e77e54604d78d6e5b3c2d03023383efcd8e081f14115 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | SKIRT/PTS | do/modeling/replot.py | Python | agpl-3.0 | 3,552 | [
"Galaxy"
] | 25ff8b8b12aa3903f02fe771e3dc06aea6ed3b8216bc04bb2916751d88b35f9b |
# Copyright 2002 by Jeffrey Chang, Brad Chapman. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# The SQL and Corba was modified from an original implementation by
# Brad Chapm... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/config/DBRegistry.py | Python | apache-2.0 | 23,676 | [
"BioJava",
"BioPerl",
"Biopython"
] | ac1c82581168731320051c9f8255a92e66e8a737568d8fac752cf0e0347810c5 |
# -*- coding: utf-8 -*-
"""
Model classes for the chemical batches and multiple batches that are used to hold datasets in ChemBio Hub
"""
from django.db import models, connection
from django.contrib.auth.models import User
try:
# django >= 1.7
from django.apps import apps
get_model = apps.get_model
except... | thesgc/cbh_chembl_model_extension | cbh_chembl_model_extension/models.py | Python | mit | 21,896 | [
"Pybel",
"RDKit"
] | e706147d41ffd11e690e99ec6d3c09d99b6364389d283ab716b8751d210aa8da |
# Checks all psi4 relevant files for proper boilerplate GNU license.
# This is sold as is with no warrenty-- probably should double check everything
# after running. I am not responsible if you break Psi4.
#
# Do not forget to do share/plugins by hand!
import os
# File type we know how to handle
ftypes = ['cc', 'h', ... | susilehtola/psi4 | psi4/share/psi4/scripts/apply_license.py | Python | lgpl-3.0 | 3,497 | [
"Psi4"
] | 658dc997f9a5a1c7ae2ee419007a823adbdd17a9c1bbd3c1c1b3388732091808 |
"""
Testing for the forest module (sklearn.ensemble.forest).
"""
# Authors: Gilles Louppe, Brian Holt, Andreas Mueller
# License: BSD 3 clause
from collections import defaultdict
import numpy as np
from numpy.testing import assert_array_equal
from numpy.testing import assert_array_almost_equal
from numpy.testing imp... | JT5D/scikit-learn | sklearn/ensemble/tests/test_forest.py | Python | bsd-3-clause | 18,683 | [
"Brian"
] | f1b16ab93b9310f73071501c6e274f7727499259cf4604e2f603cd226a50e55d |
""" Here, we need some documentation...
"""
import sys
import os
import types
import threading
import time
from DIRAC import gLogger
from DIRAC.Core.Utilities.DIRACSingleton import DIRACSingleton
from DIRAC.ConfigurationSystem.Client.Helpers.CSGlobals import Extensions
class Devloader( object ):
__metaclass__ = DI... | vmendez/DIRAC | Core/Utilities/Devloader.py | Python | gpl-3.0 | 2,424 | [
"DIRAC"
] | 96a4b1c11a6624cf1f3b8bc62f69573f2f90772e10b262bbecb6be5c123850d0 |
# 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... | tornadozou/tensorflow | tensorflow/contrib/distributions/python/ops/mvn_tril.py | Python | apache-2.0 | 7,096 | [
"Gaussian"
] | 7a4c4d2e8e8247bd7c25df28a47146237fa3ce107be6e1b9c0c73a0175e65e9a |
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2009 Toms Bauģis <toms.baugis at gmail.com>
# This file is part of Project Hamster.
# Project Hamster 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 vers... | blaxter/hamster-applet | hamster/edit_activity.py | Python | gpl-3.0 | 25,789 | [
"FLEUR"
] | 7724e0a7d8643604c2a4c4256c759d9580d320dd04562a6284caf3f97ebc567c |
#!/usr/bin/env python
"""
A program to solve the 3D Klein Gordon equation using a
second order semi-explicit method
More information on visualization can be found on the Mayavi
website, in particular:
http://github.enthought.com/mayavi/mayavi/mlab.html
which was last checked on 6 April 2012
"""
import math
import n... | openmichigan/PSNM | PythonPrograms/Programs/PythonCode/KleinGordonImp3D.py | Python | bsd-2-clause | 6,137 | [
"Mayavi"
] | 4b969f262808f6e74fae1417d932cb762326d0a946a6077171905495fc7d5d71 |
"""
Optimise the combination of profile and summation intensity values.
"""
from __future__ import annotations
import logging
import boost_adaptbx.boost.python
from cctbx import crystal, miller
from dials.algorithms.scaling.scaling_utilities import DialsMergingStatisticsError
from dials.array_family import flex
fro... | dials/dials | algorithms/scaling/combine_intensities.py | Python | bsd-3-clause | 18,019 | [
"CRYSTAL"
] | b16483877ff34332211fb720a72bd38ab5e3970a39eaa47081da99f7de7f00d9 |
import json
import logging
import re
import time
from json import JSONDecodeError
from typing import Optional, Tuple, Dict, Any
from requests import HTTPError, Response
from importer import JSON
from importer.functions import requests_get
from importer.models import CachedObject
logger = logging.getLogger(__name__)... | meine-stadt-transparent/meine-stadt-transparent | importer/loader.py | Python | mit | 12,891 | [
"VisIt"
] | 3fa9bf81bc52cd9a185086a8b7301387f739030df7d7793ec0a5ba12a9f3a83a |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# safeinput - user input validation functions
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | heromod/migrid | mig/shared/safeinput.py | Python | gpl-2.0 | 33,096 | [
"Brian"
] | 3d92bfe9cdd46740d9b52a39001cd01c4334ccfda21169f947e6773db38e56f3 |
#!/usr/bin/env python3
#
# moves a chosen atom from a ase-compatible input around and saves all the coordinate files as xyz
#
# by Patrick Melix
# 2017/03/17
#
# Usage:
# a) Call this script, answer the questions, done.
# b) Call this script with follogin arguments: <deltaX> <deltaY> <deltaZ> <nX> <nY> <nZ> <atomNumber... | patrickmelix/Python4ChemistryTools | move_atom.py | Python | mit | 2,693 | [
"ASE"
] | 06700b13f08759eaa91fba447d08b12734294f643cb89bf3fb7714f24a051f2e |
'''apport package hook for foomatic-db
(c) 2009 Canonical Ltd.
Author: Brian Murray <brian@ubuntu.com>
'''
from apport.hookutils import *
def add_info(report):
attach_hardware(report)
attach_printing(report)
| Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/apport/package-hooks/source_foomatic-db.py | Python | gpl-3.0 | 219 | [
"Brian"
] | d7fbdd47eaf5af50c2f68c4baa4756a1bd6beb80cb20fc720fad82d0d9b76db2 |
# $HeadURL$
"""
DIRAC.Core.Utils package
"""
__RCSID__ = "$Id$"
from DIRAC.Core.Utilities.File import makeGuid, checkGuid, getSize, getGlobbedTotalSize, getGlobbedFiles, getCommonPath, getMD5ForFiles
from DIRAC.Core.Utilities.List import uniqueElements, appendUnique, fromChar, randomize, ... | marcelovilaca/DIRAC | Core/Utilities/__init__.py | Python | gpl-3.0 | 1,572 | [
"DIRAC"
] | 4803232a572d2df1888767737b286210a41d1b99943e4ad678f436462bf31a18 |
#!/usr/bin/env python
# coding=utf-8
# aeneas is a Python/C library and a set of tools
# to automagically synchronize audio and text (aka forced alignment)
#
# Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it)
# Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it)
# Copyright (C) 2015-2017, A... | danielbair/aeneas | aeneas/ttswrappers/awsttswrapper.py | Python | agpl-3.0 | 11,016 | [
"Brian"
] | 43e897bee37e94598b7aa6e189fc6c54cce1eb3ab3f430d359c3124f479a0119 |
#!/usr/bin/env python
#
# $File: locateRelative.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistri... | BoPeng/simuPOP | docs/locateRelative.py | Python | gpl-2.0 | 3,469 | [
"VisIt"
] | 8d2654c145cdb3b663c8f8507053b9456ac8fbc56ea136772fdacfef4be06c02 |
#!/usr/bin/env python2.7
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redis... | olpaw/mx | mx_unittest.py | Python | gpl-2.0 | 13,709 | [
"VisIt"
] | dc2d2e6fefe90fdd3e2482329e70409e87562ac73bb965189b2e615bf2ceb44a |
#!/usr/bin/env python -i
# preceeding line should have path for Python on your machine
# plot.py
# Purpose: plot Temp of running LAMMPS simulation via GnuPlot in Pizza.py
# Syntax: plot.py in.lammps Nfreq Nsteps compute-ID
# in.lammps = LAMMPS input script
# Nfreq = plot data point every this many s... | arielzn/lammps | python/examples/plot.py | Python | gpl-2.0 | 1,909 | [
"LAMMPS"
] | 60d7cbba62a287f40cab3412ef5d019268772f5cf3ee63b0b0ed8f6d25ff2070 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/orca/src/bigdl/orca/tfpark/gan/gan_estimator.py | Python | apache-2.0 | 7,941 | [
"ORCA"
] | 4baef1087852bffd174897757254ded20b2ac0e778580d4367ce032479197488 |
# https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.list_objects
"""
Configuration of an S3 storage
Like others, but in protocol S3 add:
* SecureConnection: true if https, false otherwise
* Aws_access_key_i... | yujikato/DIRAC | src/DIRAC/Resources/Storage/S3Storage.py | Python | gpl-3.0 | 25,974 | [
"DIRAC"
] | 18dc4e81411dd9b3b3a03b7d3ff4746c8fae59c0b21666f3d1dcd316f4f5d8a8 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import threading
import functools
import six
from DIRAC.Core.Utilities.DIRACSingleton import DIRACSingleton
@six.add_metaclass(DIRACSingleton)
class ThreadConfig(threading.local):
""" This class allows to c... | yujikato/DIRAC | src/DIRAC/Core/DISET/ThreadConfig.py | Python | gpl-3.0 | 2,979 | [
"DIRAC"
] | 04f042452719f88144680a033ecb673d13b2bd387fe56831df402f0e5d6d84a3 |
# Created by: Josh Carrigg Hodson, Aditya Dua, Chee Ho Chan
# 1 June, 2017
""" This file contains all of the transforms functions that will be used within the toolbox"""
import math
import numpy as np
from scipy.linalg import expm
from . import check_args
from ..tests import test_transforms
from . import common
import ... | adityadua24/robopy | robopy/base/transforms.py | Python | mit | 46,019 | [
"VTK"
] | 27a72860a4210b1225740ff8b9304dd49338e811f9464dd3a95f334370c2dad6 |
# coding: utf-8
from __future__ import unicode_literals
"""
Created on Jan 22, 2013
@author: Bharat Medasani
"""
import unittest
from pymatgen.command_line.gulp_caller import *
from pymatgen.core.structure import Structure
from monty.os.path import which
from pymatgen.io.vasp.inputs import Poscar
test_dir = os.pat... | rousseab/pymatgen | pymatgen/command_line/tests/test_gulp_caller.py | Python | mit | 11,711 | [
"GULP",
"VASP",
"pymatgen"
] | a1cd9549f81c2af630fb8c8e4458e9007159d9fb674274ed5114f7bb741696e8 |
import re
import types
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.DISET.RPCClient import RPCClient
from DIRAC.Core.Utilities import DEncode, Time
class UserProfileClient:
def __init__( self, profile, rpcClientFunctor = False ):
if rpcClientFunctor:
self.rpcClientFunctor = rpcClientFunctor
else:
... | avedaee/DIRAC | FrameworkSystem/Client/UserProfileClient.py | Python | gpl-3.0 | 4,351 | [
"DIRAC"
] | 5b9cdb711e09223f89f1057cbc231d8a0fb295efd5b8ca7efdb68d177430391c |
# disable missing docstring
# pylint: disable=missing-docstring
import json
from lettuce import step, world
from nose.tools import assert_equal, assert_true
from advanced_settings import ADVANCED_MODULES_KEY, change_value
from common import open_new_course, type_in_codemirror
from course_import import import_file
D... | pepeportela/edx-platform | cms/djangoapps/contentstore/features/problem-editor.py | Python | agpl-3.0 | 12,793 | [
"VisIt"
] | c092f2036619f650614dcca1bc97a2b1b3cc6331a0c25699a39703f4e412f528 |
#!/usr/bin/python
# Copyright 2014 Brno University of Technology (author: Karel Vesely)
# 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
#
# TH... | Louiiiss/ros_asr | src/utils/nnet/make_nnet_proto.py | Python | gpl-2.0 | 8,442 | [
"NEURON"
] | 6a6388e7f189ea57c7d9fcca68bc4774a4920ce2cd00c72e44aef5120b9841ce |
import numpy as np
from scipy.signal import fftconvolve
from scipy.ndimage import center_of_mass
import scipy.optimize as opt
from scipy.ndimage.interpolation import shift
# with open("d1.raw", 'rb') as d1:
# with open("d2.raw", 'rb') as d2:
# shape = (200,200) # height,width
# datatype = n... | fedebarabas/tormenta | tormenta/analysis/xydrift.py | Python | gpl-3.0 | 8,222 | [
"Gaussian"
] | b0f88aafe5a5a964d913f3aaac547093e5b64363bbbef7d778bd4cbffa0e6144 |
from math import pi, sqrt
import numpy as np
from ase.units import Hartree, Bohr
from ase.parallel import paropen
from gpaw.utilities import pack
from gpaw.analyse.wignerseitz import wignerseitz
from gpaw.setup_data import SetupData
from gpaw.gauss import Gauss
from gpaw.io.fmf import FMF
from gpaw.utilities.blas impor... | qsnake/gpaw | gpaw/utilities/dos.py | Python | gpl-3.0 | 17,302 | [
"ASE",
"GPAW",
"Gaussian"
] | 538bb7ae35d3b71bd7cd85ba2f943f30baab96df632f892f6d53380dedc1536e |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Definitions of derived coordinates.
"""
from abc import ABCMeta, abstractmethod
import warnings
import cf_units
import d... | SciTools/iris | lib/iris/aux_factory.py | Python | lgpl-3.0 | 69,935 | [
"NetCDF"
] | bac224f8d88e8d7b49f3c8391d97e4fdd6238d2c05e0fc4728d665a38072c7d5 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
This module implements some standard regression models: OLS and WLS
models, as well as an AR(p) regression model.
Models are specified with a design matrix and are fit using their
'fit' method.
Subcla... | bthirion/nipy | nipy/algorithms/statistics/models/regression.py | Python | bsd-3-clause | 28,856 | [
"Gaussian"
] | f72b7d087c6f98db6901bfb16f1c3e3d0b7894bcf363a7c910b7cb682ef17c32 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Deep learning via word2vec's "skip-gram and CBOW models", using either
hierarchical softmax or negative sampling [1]_ [2]_.
The train... | TaddyLab/gensim | gensim/models/word2vec.py | Python | gpl-3.0 | 78,869 | [
"VisIt"
] | 0290e0e58ad884615618920625f6b33b09ac58af8998542f2c87c465bf758025 |
from ..libmp.backend import xrange
from .functions import defun, defun_wrapped
def _check_need_perturb(ctx, terms, prec, discard_known_zeros):
perturb = recompute = False
extraprec = 0
discard = []
for term_index, term in enumerate(terms):
w_s, c_s, alpha_s, beta_s, a_s, b_s, z = term
h... | lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/mpmath/functions/hypergeometric.py | Python | gpl-3.0 | 51,631 | [
"Gaussian"
] | 4f1f1f9a2b2b5811793c10041eafed83f0e7ae7b98c1e886996fc6d5144b31ed |
#!/usr/bin/env python
'''
Based on:
Zenke, Friedemann, Everton J. Agnes, and Wulfram Gerstner.
"Diverse Synaptic Plasticity Mechanisms Orchestrated to Form and Retrieve Memories in Spiking Neural Networks."
Nature Communications 6 (April 21, 2015).
Part of Zenke's rule embedded in modified Brunel 2000 / Ostojic 2014... | h-mayorquin/camp_india_2016 | tutorials/LTPinnetworks2/Step3d_Zenke_etal_2014.py | Python | mit | 8,978 | [
"Brian",
"NEURON"
] | 4fe1d60924ea45e4b96e4d906e631b3e174757cd74f2c1e1e6bb20a390dc94c6 |
""" BaseAction
Base class for Actions.
"""
from DIRAC import gLogger
class BaseAction:
"""
Base class for all actions. It defines a constructor an a run main method.
"""
def __init__(self, name, decisionParams, enforcementResult, singlePolicyResults, clients):
# enforcementResult suppose... | ic-hep/DIRAC | src/DIRAC/ResourceStatusSystem/PolicySystem/Actions/BaseAction.py | Python | gpl-3.0 | 1,367 | [
"DIRAC"
] | 58c4db7261bdd165f5e53244462c1dd21c0192911002b0c9c47d3299ca01b707 |
import numpy as np
import random as rand
import sys, os
import copy
import pickle
from mpi4py import MPI
from pymatgen import Lattice, Structure, Element, PeriodicSite
from pymatgen.io.vasp import Poscar, VaspInput
from pymatgen.analysis.structure_matcher import StructureMatcher, FrameworkComparator
from py_mc.mc impo... | skasamatsu/py_mc | examples/latgas-HAp/HApOHflip.py | Python | gpl-3.0 | 4,088 | [
"VASP",
"pymatgen"
] | e2d7055f4bf2127666cd9f04bea908848ac12c2447c2b45983e89269df2f2408 |
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.ants as ants
import nipype.interfaces.afni as afni
from nipype.interfaces.afni import utils as afni_utils
import nipype.int... | FCP-INDI/C-PAC | CPAC/registration/registration.py | Python | bsd-3-clause | 186,634 | [
"Gaussian"
] | a95d5fdb49ae9ad21c816ef3ee4f912e03b2414298b8d5f6bd2026bb34b7dbe7 |
#!/usr/bin/env python
###############################################################################
# TODO JMP JE JG JL JGE JLE SETJMP LONGJMP DATA LABEL
# TODO discover how to keep code resident and send it new data
# TODO discover how to reference other pixel data for convolution/correlation
# TODO Use Tower of Han... | jlettvin/shmathd | gpgpu/gpu11.py | Python | gpl-3.0 | 26,973 | [
"Gaussian"
] | 080b0930e1fc0ec454a4ccd0d96add73c5de0d03e7701fcb4358d5a01b2b5941 |
# Copyright (c) 2012 Spotify AB
#
# 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 writing, s... | neilisaac/luigi | setup.py | Python | apache-2.0 | 2,723 | [
"VisIt"
] | fdb84c71f0324bd0b6d4c857c27a19dfb14d70c294b2e92e761d1f430cf0028a |
#!/usr/bin/env python
"""
mtpy/utils/plotmodel3d.py
Class and functions for the imaging of a 3D model from WingLink, ModEM, Ws3Dinv
Class:
Model3d()
Functions:
Batch processing
plot setup
Output to be sent to mayavi or paraview
@UofA, 2013
(LK)
"""
#========================================... | geophysics/mtpy | mtpy/imaging/plotmodel3d.py | Python | gpl-3.0 | 561 | [
"Mayavi",
"ParaView"
] | e546b773d1bceaf3f676b45fbc7df32926e4b86b6eb73986d1c51eda7c9b435d |
#!/usr/bin/env python
#
# Copyright (C) 2014
# Brian Caswell <bmc@lungetech.com>
# Narf Industries <info@narfindustries.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without res... | f0rki/cb-multios | original-challenges/LMS/poller/for-testing/machine.py | Python | mit | 4,191 | [
"Brian"
] | ecdd32bcf5dd385dd67526076263e395d6b47f63e8e76820c4bc7ed183f40821 |
import numpy as np
import logging
import theano.tensor as tt
import pymc3 as pm
import theano as th
import pymc3.distributions.dist_math as pm_dist_math
from typing import Tuple
_logger = logging.getLogger(__name__)
_log_2_pi = 1.837877066409345 # np.log(2 * np.pi)
_10_inv_log_10 = 4.342944819032518 # 10 / np.log(1... | magicDGS/gatk | src/main/python/org/broadinstitute/hellbender/gcnvkernel/models/commons.py | Python | bsd-3-clause | 8,166 | [
"Gaussian"
] | 41a621dffb2334956c45c905550483d66543cf6ac1a5f252ecbb9152f694a3cf |
""" Test class for Stalled Job Agent
"""
import pytest
from mock import MagicMock
# DIRAC Components
from DIRAC.WorkloadManagementSystem.Agent.StalledJobAgent import StalledJobAgent
from DIRAC import gLogger
# Mock Objects
mockAM = MagicMock()
mockNone = MagicMock()
mockNone.return_value = None
gLogger.setLevel("DEB... | DIRACGrid/DIRAC | src/DIRAC/WorkloadManagementSystem/Agent/test/Test_Agent_StalledJobAgent.py | Python | gpl-3.0 | 1,936 | [
"DIRAC"
] | 8d549203a897c45ad35d3e78c76febe42631abe94bf2d6e4696413b8559d9ece |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script generates a header containing a dictionary from locales to
# accept language strings from chromium's .xtb files. It is not very
# robust at th... | endlessm/chromium-browser | components/cronet/tools/generate_accept_languages.py | Python | bsd-3-clause | 1,807 | [
"xTB"
] | d87c205eea2a093bd2133029ed21e06d0e64efdf76431fe10078a1bdc3d89584 |
from yambopy import *
from schedulerpy import *
import time
import os
from copy import deepcopy
overflow = 1e8
def integerize(number):
"""
Check if number is integer, if False make it integer
"""
if isinstance(number,int): return number
if isinstance(number,float):
if number.is_integer(): r... | alexmoratalla/yambopy | yambopy/rt/rt_timestep_optimize.py | Python | bsd-3-clause | 23,281 | [
"Yambo"
] | 111612804920e0ea735e547e5df791dacba360d095a68d3c5f23ad07f0c94359 |
import numpy as np
import theano
# def create_weights_uniform( rng, n_in, n_out, activation=None ):
# # Bound ?
# W_bound = np.sqrt(6. / (n_in + n_out))
# # Create W_init from a Uniform distribution.
# W_init = np.asarray( rng.uniform( low=-W_bound, high=W_bound, size=(n_in, n_out) ), dtype=theano.config.floa... | luckylwk/neural-network-theano | core/utils/weights.py | Python | mit | 2,439 | [
"Gaussian"
] | 79cb208ef75e7f7f2dae3d36acc991967ce8dbddcd3dee56d95b69e5f0191511 |
# -*- coding: utf-8 -*-
#
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pu... | thica/ORCA-Remote | src/scripts/tools/tool_irdbitach/script.py | Python | gpl-3.0 | 6,815 | [
"ORCA"
] | f0e7da8a2766c111ab379bd94ed6f6ad6da5f0b2c71901278e46e0275245c30a |
import openpnm as op
import numpy as np
# Workspace and project
ws = op.Workspace()
proj = ws.new_project()
# Network
np.random.seed(7)
net = op.network.Cubic(shape=[51, 19, 1], spacing=1e-4, project=proj)
# Geometry
geo = op.geometry.SpheresAndCylinders(network=net, pores=net.Ps, throats=net.Ts)
# Phase
phase = o... | PMEAL/OpenPNM | scripts/example_transient_diffusion.py | Python | mit | 1,073 | [
"VTK"
] | 08f63763ce4e70f7991fb6da30cf213deb50e6f42c9c71ff7821035b73fa0a5e |
# Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | SickGear/SickGear | lib/sg_futures/futures/process.py | Python | gpl-3.0 | 14,969 | [
"Brian"
] | b65e5f9299660a0926a209c1d27e950f04ce279f8d9ed0b48dba872ef53ef847 |
from setuptools import setup, find_packages
setup(
name='ob-pipelines',
author='Jacob Feala',
author_email='jake@outlierbio.com',
version='0.1',
url='http://github.com/outlierbio/ob-pipelines',
packages=find_packages(),
description='Bioinformatics apps (using Docker) and workflows (using Lu... | outlierbio/ob-pipelines | setup.py | Python | apache-2.0 | 706 | [
"pysam"
] | c94bc42e349eb3a83507b83f83a33943bf6dd89664dbcc9dab283d913ac19b57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.