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 |
|---|---|---|---|---|---|---|---|
from mumax2 import *
from mumax2_cmp import *
from mumax2_geom import *
########################################################################################
## Parameters ##
#####################################################################... | mumax/2 | tests/phase_diagram.py | Python | gpl-3.0 | 3,076 | [
"VTK"
] | 9e62629a76468483c092a5ce964e6b5c18343baaad12baaaa4dda2623a8ba183 |
# Mechanics IO
"""Run a pre-configured Siconos "mechanics" HDF5 file."""
from __future__ import print_function
import os
import sys
from math import cos, sin, asin, atan2
from scipy import constants
import numpy as np
import h5py
import bisect
import time
import numbers
import shutil
import tempfile
from contextl... | radarsat1/siconos | io/swig/io/mechanics_run.py | Python | apache-2.0 | 107,372 | [
"VTK"
] | dd0bf7e4842c140791f33b4ab148f8217418742df7ce85a9fa70239ee1da7721 |
# -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | vidartf/hyperspy | hyperspy/io_plugins/__init__.py | Python | gpl-3.0 | 2,279 | [
"NetCDF"
] | 3e086313ae1dfbfebde2d89fbcd0c92fc46626e78eddf134bbde5fb2ed1f17bf |
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from protein.models import Protein
from residue.models import Residue
from structure.models import Structure
from signprot.models import SignprotInteractions
from common.definitions import AMINO_ACID_GROUP_NAMES_OLD
imp... | cmunk/protwis | build/management/commands/build_signprot_interactions.py | Python | apache-2.0 | 5,313 | [
"CRYSTAL"
] | ef8b9c97ffeae0027ba968c2cd5b3d36d469e2af9cf27e3cedef989c4e8439eb |
from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import pylab as plt
import numpy as np
import os
import sys
from astrometry.util.fits import fits_table
from astrometry.libkd.spherematch import match_radec
from astrometry.util.plotutils import PlotSequence
from legacyanalysis.ps1cat impor... | legacysurvey/pipeline | py/legacyanalysis/compare-to-ps1.py | Python | gpl-2.0 | 30,435 | [
"Gaussian"
] | 7146e3a3fa659eaa33efa571fff4b1c47c990728830230640c941b13712d4fb8 |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# + nbsphinx="hidden"
# %matpl... | adrn/gala | docs/tutorials/Milky-Way-model.py | Python | mit | 6,498 | [
"Galaxy"
] | 8cd7218d4f7cf66a3c0a656a10c82c1f5a71cc39324fc0d1bc6c83c5361f9cec |
# $HeadURL$
""" GGUSTicketsClient class is a client for the GGUS Tickets DB.
"""
import urllib2
from suds import WebFault
from suds.client import Client
from DIRAC import S_OK, S_ERROR
__RCSID__ = "$Id$"
class GGUSTicketsClient:
# create the URL to get tickets relative to the site ( opened only ! ):
g... | Andrew-McNab-UK/DIRAC | Core/LCG/GGUSTicketsClient.py | Python | gpl-3.0 | 4,312 | [
"DIRAC"
] | d2ec83e75785c4248a1f2fdf2735fb5fc74dbbd05f89fc8e49897760c0f78b9d |
#
# Copyright (C) 2007, Mark Lee
#
#http://rl-glue-ext.googlecode.com/
#
# 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 b... | okkhoy/rlglue-python3-codec | src/rlglue/agent/AgentLoaderScript.py | Python | apache-2.0 | 1,568 | [
"Brian"
] | 7b62e6e63a5fbd6d19f6f1285a81f01515bb87539cc45af8086538ee8b6d092a |
# !/usr/bin/env python
# Copyright 2011 Bill Glover
#
# This file is part of Creare.
#
# Creare 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 ... | ScriptGadget/Creare | server/ncm/ncm.py | Python | gpl-3.0 | 82,109 | [
"VisIt"
] | b2f290864195948f431202f79d27491bf1376caf371190fd826f3668cbd442da |
#!/usr/bin/python
from pandas import DataFrame
from selenium import webdriver
from selenium.webdriver import PhantomJS
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from seleniu... | namiszh/fba | Toolkit/yahoo_import_pre_draft_ranks.py | Python | mit | 7,692 | [
"MOE"
] | ac1c6e9b927f185009e90779751f39c45b9e551179d4495d98654d6712adf004 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for LibraryContent block in LMS
"""
import textwrap
import ddt
import six
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.test.acceptance.fixtures.library import LibraryFixture
from common.test.acceptance.pages.common.auto_... | cpennington/edx-platform | common/test/acceptance/tests/lms/test_library.py | Python | agpl-3.0 | 11,470 | [
"VisIt"
] | 8341e1d47cc906a543794c1df12ed45987d8240b1e320a919f9a8c15c5e69457 |
# #
# Copyright 2012-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... | pescobar/easybuild-framework | test/framework/filetools.py | Python | gpl-2.0 | 124,434 | [
"NetCDF"
] | f20170fb0ff5048039872d385794e6482221f7245b318c6a22450531e6830836 |
"""Utility functions for plotting M/EEG data."""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# ... | jaeilepp/mne-python | mne/viz/utils.py | Python | bsd-3-clause | 83,519 | [
"Mayavi"
] | c22950bc8953cb5671cdea151419e2fb21b3811d0ac1113d5d0d515f6e159086 |
#!/usr/bin/env python
# CREATED:2013-08-22 12:20:01 by Brian McFee <brm2132@columbia.edu>
'''Music segmentation using timbre, pitch, repetition and time.
If run as a program, usage is:
./segmenter.py AUDIO.mp3 OUTPUT.lab
'''
import sys
import os
import argparse
import string
import numpy as np
import scipy.sp... | urinieto/hier_eval | segmenter.py | Python | gpl-3.0 | 13,186 | [
"Brian",
"Gaussian"
] | 5069bfbadc9eea400a4c3b02d7c77942f56ae546099418d82a9c3a52962f46b6 |
## A script to simulate planar Poisseuille flow in Espresso
from espressomd import lb, shapes, lbboundaries
import numpy as np
# System setup
system = espressomd.System(box_l=[1.0, 1.0, 1.0])
system.time_step = 0.01
system.cell_system.skin = 0.2
box_l = 16
system.box_l = [box_l] * 3
lbf = lb.LBFluidGPU(agrid=1, de... | KonradBreitsprecher/espresso | doc/tutorials/04-lattice_boltzmann/scripts/poisseuille.py | Python | gpl-3.0 | 1,023 | [
"ESPResSo"
] | 5c07fa1b82e6b8c1fd6092cc9d73c644c855386d5e174ea5c297697f7426f449 |
"""
diffraction is an open-source Python library for simulating x-ray and neutron
diffraction experiments and performing crystallographic calculations.
"""
from .cif.cif import *
from .crystal import *
from .lattice import *
from .symmetry import *
| noahwaterfieldprice/diffraction | diffraction/__init__.py | Python | gpl-2.0 | 250 | [
"CRYSTAL"
] | f4027e710162b06d999f06011f2ff06507b6e5593a1f67dd86661be3c445a99b |
from __future__ import print_function
import config
import re
import os
import shutil
import collections
import copy
import sys
import debug
import internal_exceptions
import subprocess
import timeit
import pycparser
from pycparser import c_ast
from pycparser import c_generator
from numpy import random
def run_compi... | chandangreddy/autotuner | blas_function_testing.py | Python | mit | 16,957 | [
"VisIt"
] | 25f4fe9bc214a89172b03d70b0cf206482e7e8ec2d0d32b92e68fe72b9a49d70 |
#
# Test executable to exercise ODE for drifting beam
#
# Copyright (c) 2013 RadiaBeam Technologies. All rights reserved
#
# scipy imports
import numpy as np
from scipy.integrate import odeint
# RadiaBeam imports
import radtrack.bunch.RbParticleBeam6D as beam
import radtrack.plot.RbPlotPhaseSpace6D as plotps
# Calc... | radiasoft/radtrack | experimental/ode/testDrift02.py | Python | apache-2.0 | 2,463 | [
"Gaussian"
] | b192377a5baef578cb9bfd9720a350bd821c7664511b9994b4fd99f1b3249f54 |
# coding: utf-8
from __future__ import unicode_literals, division, print_function
import unittest
import numpy as np
from pymatgen.io.abinitio.eos import EOS
def have_scipy():
try:
import scipy
return True
except ImportError:
return False
class EOSTestCase(unittest.TestCase):
d... | rousseab/pymatgen | pymatgen/io/abinitio/tests/test_eos.py | Python | mit | 824 | [
"pymatgen"
] | 8c95e388384abb4e5f65c64b07fa7e78d3476acf00b4daece97869a39b30ff52 |
import sys
def ex02_process_data(path):
"""This is for extracting data from the log.lammps
Originally found in http://www.cnblogs.com/bacazy/archive/2013/09/28/3344687.html
Modified by Domicor (g1114128525@gmail.com) in Nov. 3, 2014."""
b = 2
f = open(path);
fw = open(path + '.output', 'w'... | Rareson/LammpsRelated | homework/src/ex02_process_data.py | Python | gpl-3.0 | 544 | [
"LAMMPS"
] | 004b540184d8b54cc5b3b3274c146f94089610d23a91310dfbb3239fe3f1a53f |
#!/usr/bin/env python
import sys
import argparse
from dark.consensus import consensusFromBAM, ConsensusError
from dark.sam import SamError
def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description='Make a consensus sequence.')
parser.a... | acorg/dark-matter | bin/simple-consensus.py | Python | mit | 6,966 | [
"pysam"
] | da29d64895f6be3d3fba70e0e92b370b1e072e13df9debdbd6d66eb99bfd4567 |
# -*- coding: utf-8 -*-
import cgitb
import fnmatch
import io
import logging
import click
import pyjsdoc
import pyjsparser
import sys
from .parser.parser import ModuleMatcher
from .parser.visitor import Visitor, SKIP
from . import jsdoc
class Printer(Visitor):
def __init__(self, level=0):
super(Printer,... | Aravinthu/odoo | doc/_extensions/autojsdoc/__main__.py | Python | agpl-3.0 | 4,294 | [
"VisIt"
] | 869f1481c5b2e770da863dbf21b51561730ab2899788582f9e1380737a96842c |
import numpy as _np
import scipy as _sp
from openpnm.models import misc as _misc
from openpnm.utils import Docorator
__all__ = ["random",
"spatially_correlated"
]
docstr = Docorator()
def random(target, seed=None, num_range=[0, 1]):
return _misc.random(target, element='pore', seed=seed, nu... | PMEAL/OpenPNM | openpnm/models/geometry/pore_seed/_funcs.py | Python | mit | 3,515 | [
"Gaussian"
] | 8e4200661fd6b42861958f378b7ccd632a1821c1d9b81d09bb84439ea60cc5aa |
""" Container for TaskManager plug-ins, to handle the destination of the tasks
"""
from DIRAC import gLogger
from DIRAC.Core.Utilities.List import fromChar
from DIRAC.Core.Utilities.SiteSEMapping import getSitesForSE
from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers
from DIRAC.ConfigurationSystem... | Andrew-McNab-UK/DIRAC | TransformationSystem/Client/TaskManagerPlugin.py | Python | gpl-3.0 | 5,392 | [
"DIRAC"
] | 38689d2deb0274e9d78139cfd951c41d2d472ef6e09d47b1eca32b5b6a82de7b |
#!/usr/bin/env python3
"""
A partial implementation of RFC 6455
http://tools.ietf.org/pdf/rfc6455.pdf
Brian Thorne 2012
TODO:
- support long messages and multipacket frames
- closing handshake
- ping/pong
"""
import socket
import threading
import time
import base64
import hashlib
import textwrap
import select
# ... | LinuxCircle/tea5767 | websocket-other.py | Python | mit | 7,428 | [
"Brian"
] | 3ffab748d5fc6799e556cba6014a366a9198e924d3c2b2db83da1e53580e9321 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
from st... | Drekscott/Motlaes | config/urls.py | Python | bsd-3-clause | 1,388 | [
"VisIt"
] | ff2e4339372f3868c8971e533fd7fb440236d69fabcb72de4632600d8ef1c4ca |
# -*- coding: utf-8 -*-
"""Implementation of execution-related magic functions."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from __future__ import absolute_import
import ast
import bdb
import gc
import itertools
import ... | vicky2135/lucious | oscar/lib/python2.7/site-packages/IPython/core/magics/execution.py | Python | bsd-3-clause | 52,758 | [
"VisIt"
] | 67cf6c5653ad4bfa914c9d4200edf6053a9de593fcc07f21d67203e72fc4d560 |
#coding: latin1
## Copyright 2005-2006 Luc Saffre
## This file is part of the Lino project.
## Lino is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) ... | MaxTyutyunnikov/lino | obsolete/src/lino/apps/keeper/populate.py | Python | gpl-3.0 | 7,567 | [
"VisIt"
] | 000b123acdf06cfe7d1b3cdb6f2829208ff16ffb4452131c1a74561dff6e2a0c |
# Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | mkuron/espresso | samples/espresso_logo.py | Python | gpl-3.0 | 6,224 | [
"ESPResSo"
] | e9b35f539e8a1412f8f67fd5e2877990948a9c3ca3f561a3f54fe95e1fc8d4ba |
import os
import copy
import math
import functools
import numpy as np
from ddapp import transformUtils
from ddapp.asynctaskqueue import AsyncTaskQueue
from ddapp import objectmodel as om
from ddapp import visualization as vis
from ddapp import robotstate
from ddapp import segmentation
from ddapp import planplayback
f... | gizatt/director | src/python/ddapp/tabledemo.py | Python | bsd-3-clause | 58,559 | [
"VTK"
] | 8eba312e55cff257fe7a4c61aabdee3a2e1ba162063eebebf34344a015e83d80 |
# -*- coding: utf-8 -*-
try:
import numpy
except ImportError:
numpy = None
else:
from ..sulfuric_acid_density_myhre_1998 import (
sulfuric_acid_density,
density_from_concentration,
)
from chempy.util.testing import requires
from chempy.units import units_library
@requires("numpy")
de... | bjodah/aqchem | chempy/properties/tests/test_sulfuric_acid_density_myhre_1998.py | Python | bsd-2-clause | 835 | [
"ChemPy"
] | f6c66d61ef06c59f5e3802501e3bd2116b15019767e7f0fadcc3b92ee7889642 |
import functools
from math import log
import numpy as np
import tree
import gym
from ray.rllib.models.action_dist import ActionDistribution
from ray.rllib.models.torch.torch_modelv2 import TorchModelV2
from ray.rllib.utils.annotations import override
from ray.rllib.utils.framework import try_import_torch
from ray.rlli... | richardliaw/ray | rllib/models/torch/torch_action_dist.py | Python | apache-2.0 | 19,676 | [
"Gaussian"
] | 974eb30cdda2b27ca0d5a71c234650e6136af4f908bfa15e13d156fa20f993a7 |
#********************************************************************
#* Copyright (C) 2002 LSI Logic Corporation. *
#* All Rights Reserved. *
#********************************************************************
#---------------------------------... | henjo/pyoa | oaTools/oaTracerCvutl22.py | Python | apache-2.0 | 15,110 | [
"MCell"
] | 270e633ce76104a603ab8f2965e8294e4f06a49a512895c660b0eee89bd82e7e |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 Piero Dalle Pezze
#
# 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 ... | pdp10/sbpipe | sbpipe/utils/io.py | Python | mit | 6,242 | [
"COPASI"
] | 625a3039b41866ac637eb292dc9dee31afb99a9640d78ccca46e4f85f289174c |
from DIRAC.WorkloadManagementSystem.Client.SandboxStoreClient import SandboxStoreClient
from DIRAC.FrameworkSystem.Client.SystemAdministratorClient import SystemAdministratorClient
from DIRAC.FrameworkSystem.Client.NotificationClient import NotificationClient
from DIRAC.FrameworkSystem.Client.SystemAdministratorIntegr... | atsareg/WebAppDIRAC | WebApp/handler/SystemAdministrationHandler.py | Python | gpl-3.0 | 27,526 | [
"DIRAC"
] | 06fff3ee10a9ac6a916a7aba1663e877d44ebf9f820baad1157829bcf7548024 |
import shutil, tempfile
from enthought.traits.api \
import HasTraits, Instance, Button, Int, Bool, on_trait_change
from enthought.traits.ui.api \
import View, Item, Group, HGroup, spring
from enthought.traits.ui.editors.range_editor import RangeEditor
from enthought.tvtk.pyface.scene_editor import SceneEdit... | olivierverdier/sfepy | sfepy/postprocess/viewer.py | Python | bsd-3-clause | 32,045 | [
"Mayavi",
"VTK"
] | 9984089d75cba8f143c570ec042c7239b25c3438a9027040fb5930d9da3a9229 |
# Copyright (c) 2015-2016, 2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2016 Ceridwen <ceridwenv@gmail.com>
# Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com>
# Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/astroid/astroid/transforms.py | Python | mit | 3,437 | [
"VisIt"
] | 90a02ea250b2a5f27bf5c82291da7b3da1f7dd1180a674e2493f9512d58b1eb8 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/gto/eval_gto.py | Python | apache-2.0 | 6,607 | [
"PySCF"
] | 03fd1fcff607a752e3f9c1c0c0e143a9e37529d250a709f8124a66b7f095a685 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | KaiSzuttor/espresso | samples/visualization_ljliquid.py | Python | gpl-3.0 | 5,850 | [
"ESPResSo",
"Mayavi"
] | 4257ce3f8d52e4de3de095ef84a2aa656ef54177e50e5bcb3d47894836a2ec96 |
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# create a new 'XML Unstructured Grid Reader'
calc_test_node_statsvtu = XMLUnstructuredGridReader(FileName=['/raid/home/ksansom/caseFiles/mri/VWI_... | kayarre/Tools | vtk/paraview_script.py | Python | bsd-2-clause | 14,810 | [
"ParaView"
] | c9f7ff1e180c25c15ef3c1b157e0eb493bfa1f965d9f778e4222ab4b3eae2e67 |
# Copyright 2006-2010 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Nice link:
# http://www.ebi.ac.uk/help/formats_frame.html
r"""Sequence input/output as S... | poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/SeqIO/__init__.py | Python | apache-2.0 | 41,547 | [
"BioPerl",
"Biopython"
] | 820b2415506879848e3ccf4b4f53a0d31d9452035f98bccd403ed2d38534174b |
from sopel import module
from MafiaBot.MafiaBot import MafiaBot
from MafiaBot.SopelCommunication import SopelCommunication
import ResistanceBot.ResistanceBot
# ToDo: Modify bot.msg to reduce wait time, otherwise things are way too slow and blocked due to the threadlock on mb
def setup(bot):
mb = MafiaBot(SopelCo... | LLCoolDave/MafiaBot | MafiaBotModule.py | Python | mit | 4,937 | [
"VisIt"
] | 20621b00cf165ffaf8a80bf93780dd1e923556b1e9136f5c3717c4b31b17aa1e |
__author__ = 'lwhite'
#!/usr/bin/env python
import sys, os
sys.path.append("../")
from demo_runner import Demo
class CDK2Demo(Demo):
def run_demo(self):
# script
# Explain the objective
# start with da
self.print_comment(
"""
I am currently working on an ... | whitel/summit-cdk-demo-2015 | demo_cdk_2/demo_cdk_2.py | Python | gpl-2.0 | 12,795 | [
"CDK"
] | 2dbe9f0278aaae6258e1d37edd1244fdf2e8ca8220ecb1f4e810f0a7023fb598 |
# -*- coding: utf-8 -*-
"""
======================
Community and Crime
======================
This is a real dataset of per capita violent crime, with demographic
data comprising 128 attributes from 1994 counties in the US.
The original dataset can be found here:
http://archive.ics.uci.edu/ml/datasets/Communities+and... | the872/pyglmnet | examples/plot_community_crime.py | Python | mit | 2,685 | [
"Gaussian"
] | 67e8460dca51d4171dcc087a81086902811efd8e3eef5d7bf7ff4df2335057ec |
#! /usr/bin/env python
# ==========================================================================
# This script tests the model computations using the CTA response function.
#
# Copyright (C) 2011-2015 Jurgen Knodlseder
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | gammalib/gammalib | inst/cta/test/dev/test_model.py | Python | gpl-3.0 | 7,574 | [
"Gaussian"
] | 3ce5bccddf20adf54dfe31533924aa116bc82c7c494843b3eb7ffd8dc96f83f5 |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
parse_duration,
parse_iso8601,
remove_end,
unescapeHTML,
)
from ..compat import (
compat_etree_fromstring,
compat_HT... | akirk/youtube-dl | youtube_dl/extractor/bbc.py | Python | unlicense | 41,101 | [
"VisIt"
] | 965ab66b5c1b24b40de95428bcf67ed31d1b330ffacc4571e11eeb9b59845229 |
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import nose
import functools
import numpy as np
from nose.tools import eq_, ok_, raises
from numpy.testing import dec
import mdtraj as md
import os
import inspect
def load_traj():
"Load up a 3 frame, 4 at... | mpharrigan/msmbuilder | tests/common.py | Python | gpl-2.0 | 889 | [
"MDTraj"
] | 87f0c2b139d7229bbf811e1934c8bbab46f5b2ba9ed605274ab7fda42b751e5a |
# -*- coding: utf-8 -*-
#
# This file is a plugin for EventGhost.
# plugins/SunTracker/__init__.py
#
# Copyright (C) 2008
# Walter Kraembring
#
##############################################################################
# Revision history:
#
# 2014-08-11 Added event to allow controlling restart of threads when
# ... | tfroehlich82/EventGhost | plugins/SunTracker/__init__.py | Python | gpl-2.0 | 190,568 | [
"VisIt"
] | ba3b4264b10263b36c497a5dfc4b1aba95ce341522998df6d66d637db6fe231a |
#!/usr/bin/env python
'''
Six-site 1D U/t=2 Hubbard-like model system with PBC at half filling.
The model is gapped at the mean-field level
'''
import numpy
from pyscf import gto, scf, ao2mo, cc
mol = gto.M(verbose=4)
n = 6
mol.nelectron = n
# Setting incore_anyway=True to ensure the customized Hamiltonian (the _eri... | gkc1000/pyscf | examples/cc/40-ccsd_custom_hamiltonian.py | Python | apache-2.0 | 1,166 | [
"PySCF"
] | b6c75d7833dc6ae800f4d4459bf9d2c93e4476c0589a9db9b0d0b71f9b12d68a |
#!/usr/bin/env python
# -*- coding: UTF8 -*-
"""
author: Guillaume Bouvier
email: guillaume.bouvier@ens-cachan.org
creation date: 2013 10 11
license: GNU GPL
Please feel free to use and modify this, but keep the above information.
Thanks!
"""
import os
import re
import sys
import numpy
from scipy.spatial.d... | bougui505/SOM | minSOM/SOM.py | Python | gpl-2.0 | 15,561 | [
"Gaussian",
"NEURON"
] | f432fd5b9773732723281570f2ece84ec063589d2a343bc394e60ffcbfb5a769 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-02 10:09:43 by Brian McFee <brian.mcfee@nyu.edu>
"""Time stretching deformations"""
import pyrubberband as pyrb
import numpy as np
from ..base import BaseTransformer, _get_rng
__all__ = ["TimeStretch", "RandomTimeStretch", "LogspaceTimeStretch"]
cla... | bmcfee/muda | muda/deformers/time.py | Python | isc | 5,785 | [
"Brian"
] | aaac80628e9d6e3a3f920b23acec6ca356b706add79f728ea74cf14e765f0b43 |
# Authors: Jan Cholasta <jcholast@redhat.com>
#
# Copyright (C) 2014 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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 versi... | realsobek/freeipa | ipaserver/install/ipa_cacert_manage.py | Python | gpl-3.0 | 13,500 | [
"VisIt"
] | f7d583950c7333a4c9880c4641162a3d4fff7603898282cebc418ca3106d0393 |
import os
import unittest
from __main__ import vtk, qt, ctk, slicer
import cip_python.segmentation.pectoralis_segmentor as pectoralis_segmentor
import numpy as np ##temporary for debugging
from vtk.util import numpy_support as VN
# PectoralisSegmentation
#
class PectoralisSegmentation:
def __init__(self, parent):
... | acil-bwh/SlicerCIP | Scripted/attic/PectoralisSegmentation/PectoralisSegmentation.py | Python | bsd-3-clause | 15,599 | [
"VTK"
] | 851d086f1429a0ad06fe7230bfc5378817b98f417768d2ac7f5fecc77f564a1b |
#!/bin/python
import os, shutil
import numpy as np
import matplotlib.pyplot as plt
import np_helper as nph
# generate 3D points around points in pts_center using gaussian distribution
def generate_points(Rt_inv, pts_center, pts_sigma, pts_fixed, pts_num, axis_range):
# allocate mem for points
points = np.zeros... | ivankreso/stereo-vision | scripts/stereo_model/generate_features.py | Python | bsd-3-clause | 13,166 | [
"Gaussian"
] | 8aaec9b9c86439ab7e431285707bca497b755ab404c2a015d5c595ffb5a1c262 |
from ..io.fileio import FileIO
from .weights import W, WSP
from ._contW_lists import ContiguityWeightsLists
from .util import get_ids
WT_TYPE = {'rook': 2, 'queen': 1} # for _contW_Binning
__author__ = "Sergio J. Rey <srey@asu.edu> , Levi John Wolf <levi.john.wolf@gmail.com>"
__all__ = ['Rook', 'Queen', 'Voronoi']
... | lixun910/pysal | pysal/lib/weights/contiguity.py | Python | bsd-3-clause | 14,657 | [
"COLUMBUS"
] | 4af92a9b2a9065c18571816f6dc5069fd05592435e4265f0939913b99730a776 |
# 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
# "License"); you may not u... | itaiin/arrow | python/pyarrow/parquet.py | Python | apache-2.0 | 48,305 | [
"VisIt"
] | 912cca6868db54c0bb8ea534cf56119498f92bf0f91bfa5b436efdfe1cbc040f |
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2018, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify ... | smarr/Truffle | substratevm/mx.substratevm/mx_substratevm_benchmark.py | Python | gpl-2.0 | 34,905 | [
"VisIt"
] | 3a2a54e693e930159db095ea47b210b28c20f15c9c22e398199ed59e5f855005 |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS.
"""
import time
from ..helpers import UniqueCourseTest
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.lms.create_mode import ModeCreationPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.lms.courseware import Courseware... | simbs/edx-platform | common/test/acceptance/tests/lms/test_lms_courseware.py | Python | agpl-3.0 | 15,868 | [
"VisIt"
] | 9f1e58a32c0268af7c16c0c86ee6380246204f0ed7e72a725538876ccd24e3a9 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/client_rpc.py
#
# 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... | drptbl/king-phisher | king_phisher/client/client_rpc.py | Python | bsd-3-clause | 8,698 | [
"VisIt"
] | 4c3842cfae8c98e2cf121f45b4bf1db4862387f59a5e029b7a48675ac8c2f3b7 |
import sys
sys.path.insert(1, "../../../")
import h2o, tests
import random
def cv_carsGBM():
# read in the dataset and construct training set (and validation set)
cars = h2o.import_file(path=h2o.locate("smalldata/junit/cars_20mpg.csv"))
# choose the type model-building exercise (multinomial classificati... | brightchen/h2o-3 | h2o-py/tests/testdir_algos/gbm/pyunit_cv_carsGBM.py | Python | apache-2.0 | 7,239 | [
"Gaussian"
] | 70ea2d3c9d121eec96ac3ca7b624096c0aa1cf7b07d436915a30d94a71ba3c98 |
# Copyright 2002 by Jeffrey Chang. 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.
from Bio.config.DBRegistry import CGIDB, DBGroup
from _support import *
embl_xembl_cgi = CGID... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/dbdefs/embl.py | Python | apache-2.0 | 1,851 | [
"Biopython"
] | ce9afc833aa8960dde22a158b471df900bc2abd055de4509b8983c89bef06065 |
##
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | hpcugent/easybuild-easyblocks | easybuild/easyblocks/q/qt.py | Python | gpl-2.0 | 9,267 | [
"VisIt"
] | 1787c00998d9a5e6107603ec2ec42e76a50a629fd3c5c6de3f8cac6b77a27d23 |
# -*- coding: utf-8 -*-
import collections
import datetime
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
class VisitMana... | CivilHub/CivilHub | hitcounter/models.py | Python | gpl-3.0 | 2,742 | [
"VisIt"
] | 012189c8a7321d30df5ebc76f057c60656cfc9945d1825977de4fd753acd4bec |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines an excitation spectrum class.
"""
from pymatgen.core.spectrum import Spectrum
class ExcitationSpectrum(Spectrum):
"""
Basic excitation spectrum object.
.. attribute: x
... | mbkumar/pymatgen | pymatgen/analysis/excitation.py | Python | mit | 659 | [
"pymatgen"
] | af456c66310ec691f86275e780437d6eb6beba3465ef56d0561266563f1885e6 |
"""
This implements a set of classes that wraps a file object interface
around code that executes in another process. This allows you fork
many different commands and let the run concurrently.
Functions:
copen_sys Open a file-like pipe to a system command.
copen_fn Open a file-like pipe to a python function.... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/MultiProc/copen.py | Python | apache-2.0 | 10,104 | [
"Biopython"
] | 7553e5c94185d7907ffe4d804c2daa17b714a679e89933dab3689ee2158b4f0d |
# Adopted from https://github.com/airaria/TextBrewer
# Apache License Version 2.0
import torch
import torch.nn.functional as F
from hanlp_common.configurable import AutoConfigurable
def kd_mse_loss(logits_S, logits_T, temperature=1):
'''
Calculate the mse loss between logits_S and logits_T
:param logit... | hankcs/HanLP | hanlp/components/distillation/losses.py | Python | apache-2.0 | 15,061 | [
"NEURON"
] | ab381966cbc6901a73bf14578dfd4e98598212b9398ca9f614c16e8a8ea97aa2 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script reproduces the results for Figure 6, Figure 6-figure supplement 1
and Figure 8g, pertaining to the online analysis of whole brain zebrafish data
The script will load the results and produce the figures. For a script that
analyzes the data from scratch check... | agiovann/Constrained_NMF | use_cases/eLife_scripts/figure_6_8g_6suppl1.py | Python | gpl-2.0 | 15,207 | [
"NEURON"
] | b3a124a5f246e1181eea89902f03a8856b2cbbd8a6e409c7c809e2564c913802 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | eamonnmag/invenio-search | invenio_search/walkers/search_unit.py | Python | gpl-2.0 | 2,736 | [
"VisIt"
] | aaf0342ef7c988eeeccea6a340cfdb745d3efbcdffab7ad0bd44d69ede65e6e3 |
import logging, coloredlogs
from threading import Thread
from random import choice
from modules.config import *
from modules.database import Database
from modules.timer import Timer
database = Database(db_host, db_user, db_pass, db_name, db_autocommit)
database.database_connection()
class Zoltar:
CommandMain = 'zo... | LouisBluhm/PyBot | modules/modules/zoltar.py | Python | mit | 1,556 | [
"CRYSTAL"
] | be0eb2629bcdbf27d98c745f8ed800272474b5ee01bde271ba00bc1b8f92eb8f |
# 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 RAgilp(RPackage):
"""Agilent expression array processing package.
More about what ... | rspavel/spack | var/spack/repos/builtin/packages/r-agilp/package.py | Python | lgpl-2.1 | 898 | [
"Bioconductor"
] | ae1a0e5e491bb806b80cea3503c212aba1c9910cf468ea78091d38f822627a3e |
import argparse
import simulation
import Bio
import re
from Bio.Seq import Seq
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
import random
def main(seq,k,r,name,negative):
# 1) Read in sequence using biopython
directory = "../genomes"
genomeFile = directory+"/"+seq
record = SeqIO.read(geno... | karroje/RAIDER_eval | simulate_chr.py | Python | gpl-3.0 | 2,691 | [
"Biopython"
] | c49c1423a3ac5f88a62968e1a716f04e34efcc5f285e2c7d93c1e210cf001294 |
import numpy as np
from MDAnalysis.coordinates.GRO import GROReader
from MDAnalysis.topology.GROParser import GROParser
from MDAnalysisTests.datafiles import GRO
import MDAnalysis as mda
class GROReadBench(object):
def time_read_GRO_coordinates(self):
"""Benchmark reading of standard testsuite GRO file."""... | MDAnalysis/mdanalysis | benchmarks/benchmarks/GRO.py | Python | gpl-2.0 | 603 | [
"MDAnalysis"
] | 49b4b66afc71d5eb626d3575dcbe8b6b60f9e83bcb15b804ad2d4f68c21087b2 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2015, Dilawar Singh and NCBS Bangalore"
__credits__ = ["NCBS Bangalore"]
__license__ = "GNU GPL"
__version__ = "1.0.0"
__maintain... | dilawar/moose-core | tests/support/test_neuroml.py | Python | gpl-3.0 | 1,129 | [
"MOOSE"
] | 0a05c920f2938bdf0e0f3d404ad6e2f23d4ef44c1b878140a53826edb6723d08 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005, 2006 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 Soft... | tiagocardosos/stoq | stoqlib/gui/slaves/sellableslave.py | Python | gpl-2.0 | 5,274 | [
"VisIt"
] | 89b81b88cd9add4a1d023a936e30bb7f3261db3e7c761c34e2a0babd7a6df124 |
import ast
from .tools import (OptimizerStep, NodeTransformer, NodeVisitor,
pretty_dump, get_starargs, get_keywords, get_varkeywords)
class Checker(NodeVisitor):
'''Gather a list of problems that would prevent inlining a function.'''
def __init__(self):
self.problems = []
def ... | haypo/fatoptimizer | fatoptimizer/inline.py | Python | mit | 6,093 | [
"VisIt"
] | fb2901d12cd0d0e1d1b6d164bedd5dd2dbd636c19dde77a1fc1d1b0d55dca048 |
""" :mod: DErrno
==========================
.. module: DErrno
:synopsis: Error list and utilities for handling errors in DIRAC
This module contains list of errors that can be encountered in DIRAC.
It complements the errno module of python.
It also contains utilities to manipulate these err... | ic-hep/DIRAC | src/DIRAC/Core/Utilities/DErrno.py | Python | gpl-3.0 | 10,415 | [
"DIRAC"
] | 3fb3dc109a2653f2036cfcd7025a1e5596ccf37be210ce5974b764a8917a8eaf |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# migliblocal - a part of the MiG interface module
# Copyright (C) 2004-2010 MiG Core Developers 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 License as publi... | heromod/migrid | user-projects/miginterface/migliblocal.py | Python | gpl-2.0 | 16,142 | [
"Brian"
] | 9ae17d5e84acacb10ec1b864bf50eb60bf00156d9d1b6bb719330bc295d8d3f1 |
#
# Copyright 2015 The AMP HTML 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 applic... | lugray/amphtml | validator/validator_gen.py | Python | apache-2.0 | 11,132 | [
"VisIt"
] | 293cd4439f50e4f0c56a45d865b1c3a91596e0310b54e9092d2d6864d32e5866 |
##technically, this means that I don't have to force floats in my division
from __future__ import division, absolute_import
##this makes the plot lines thicker, darker, etc.
from matplotlib import rc,rcParams
rc('text', usetex=True)
rc('axes', linewidth=2)
rc('font', weight='bold')
##importing the needed modules
impo... | hrichstein/Stellar_mass_env_Density | Codes/Scripts/putting_everything_together_w_comments.py | Python | mit | 38,115 | [
"Galaxy"
] | 7a6dfbc8da1db917f8fa8d83cb9375439042a6fced3796a4147f069b22394f3c |
#! /usr/bin/env python
"""Static analysis tool for checking docstring conventions and style.
The repository is located at:
http://github.com/PyCQA/pydocstyle
"""
from __future__ import with_statement
import os
import string
import sys
import ast
import copy
import logging
import tokenize as tk
from itertools import ... | tescalada/pydocstyle | src/pydocstyle.py | Python | mit | 67,446 | [
"VisIt"
] | 9e182dd5702534c2b45f01fa361ad0e2636195a425ad8640df368bb61e45c001 |
###############################################
# Snakemake rules associated with combined
# analysis of each biosample from subsample resutls
# this file must be included into another
# Snakemake file
###############################################
# rename each contig with subsample information
# this rule is no lo... | brianyu2010/Mini-Metagenomic_Analyses | Snakefile_combined_analysis.py | Python | gpl-3.0 | 7,049 | [
"BLAST"
] | 04fb8b0e0b785231813131eb02ab7db21f8d36c6f9984448e5f7bfae54a97b5d |
# Filename: fit.py
# -*- coding: utf-8 -*-
# pylint: disable=locally-disabled
"""
A collection of fit functions and modules.
"""
import numpy as np
import km3pipe.extras
def fit_delta_ts(data, time_s):
"""Fits gaussians to delta t for each PMT pair.
Parameters
----------
data: 2d np.array: x = PMT c... | tamasgal/km3pipe | km3modules/fit.py | Python | mit | 1,141 | [
"Gaussian"
] | 975ee0a0aeff34d265581ca93edd08de3a4309b0fae9fb434363e51cf6ebf947 |
# -*- 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 re
import pyte... | 2ndQuadrant/ansible | test/units/galaxy/test_api.py | Python | gpl-3.0 | 37,450 | [
"Galaxy"
] | b8ab92cba86971ec570a3ac4411c8bc6d75097bdd3668431aceade359e85c4d0 |
#!/usr/bin/env python
# -*- coding:utf-8 mode:python; tab-width:4; indent-tabs-mode:nil; py-indent-offset:4 -*-
##
"""
test_energy_hf_gamess_us
~~~~~~~~~~~~~~
Test GAMESS-US implementations for Hartree-Fock energy jobs.
"""
import sys
import geoprep
from adapters import gamess_us
from tests.common_testcod... | mattbernst/polyhartree | tests/test_energy_hf_gamess_us.py | Python | gpl-3.0 | 843 | [
"GAMESS"
] | b3de96c2f2c4d4227ea55fac148ff04bd3aeaed089a2be5bd9efa8ccabe22870 |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | wojciechtanski/robotframework | src/robot/result/visitor.py | Python | apache-2.0 | 4,345 | [
"VisIt"
] | 80fcf0f5ba9e7f03cf6d0748ece846dbbe10dd550e0f1d1166be4245d3e7db29 |
from collections import namedtuple
import random
__author__ = 'byxor'
COMMAND = None
RESPONSE_CHANCE = 0.05
def main(bot, author_id, message, thread_id, thread_type, **kwargs):
UNIVERSAL_RESPONSES = {
"ok sam",
}
PERSONAL_RESPONSES = {
"i have a name, you know",
"beep beep boop... | sentriz/steely | steely/plugins/responder.py | Python | gpl-3.0 | 3,422 | [
"exciting"
] | c305477c6c19231c92553fbf410f9a887a71710457159b8d72938534056e2d21 |
## \file
## \ingroup tutorial_roofit
## \notebook
## Validation and MC studies: toy Monte Carlo study that perform cycles of event generation and fitting
##
## \macro_code
##
## \date February 2018
## \authors Clemens Lange, Wouter Verkerke (C++ version)
import ROOT
# Create model
# -----------------------
# Declar... | root-mirror/root | tutorials/roofit/rf801_mcstudy.py | Python | lgpl-2.1 | 5,022 | [
"Gaussian"
] | 9b8184fe1ce8e5867ad43442940b20ed4140d1522b52a1a55dc1bb2e99caa376 |
from __main__ import vtk, qt, ctk, slicer
import string
import numpy
import math
import operator
import collections
import FeatureExtractionLib
class TextureGLRL:
def __init__(self, grayLevels, numGrayLevels, parameterMatrix, parameterMatrixCoordinates, parameterValues, allKeys):
self.textureFeaturesGLRL = coll... | vnarayan13/Slicer-OpenCAD | HeterogeneityCAD/FeatureExtractionLib/TextureGLRL.py | Python | mit | 12,700 | [
"VTK"
] | 25ea92ef6d0c7e966db20c2c980c7eb68f25285ae442c1820766939afda5d1df |
##
# Copyright 2009-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... | ULHPC/modules | easybuild/easybuild-easyblocks/easybuild/easyblocks/r/rserve.py | Python | mit | 1,703 | [
"Bioconductor"
] | 59c7bae087eb447d4cd8df95c6b88d09144ff39f87738d5cd2c80186739c3b52 |
"""Simple XML-RPC Server.
This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.
It can also be used to handle XML-RPC requests in a CGI
environment using CGIXMLRPCRequestHandler.
A list of possibl... | xrg/openerp-server | python25-compat/SimpleXMLRPCServer.py | Python | agpl-3.0 | 21,731 | [
"Brian"
] | 0e42039ab09ab99ebf9f6d1732fd4212b7ddf0137262559bb91d34e97b381a31 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import numpy as np
from roppy.sample import sample2D, sample2DU, sample2DV
from roppy.depth import sdepth
class Section(object):
"""Class for handling sections in a ROMS grid
The grid is defined by a grid object having attributes
h, pm,... | bjornaa/roppy | roppy/section2.py | Python | mit | 4,685 | [
"NetCDF"
] | f136fb413e18db0df07befeaeae4a138d3c04a8cacd237575e405bead144d69c |
#!/usr/bin/env python
# Copyright 2017 Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | sdalton1/legion | language/test.py | Python | apache-2.0 | 15,062 | [
"VisIt"
] | ae9ebe9674b7a0062477e68afb834d2ea60a05c2789585921f6be20194087571 |
import numpy as np
from .cyfisher import cy_fisher
def fisher(x, means, covariances, priors, normalized=False, square_root=False,
improved=False, fast=False, verbose=False):
r"""
Computes the Fisher vector encoding of the vectors ``x`` relative to
the diagonal covariance Gaussian mixture model ... | simmimourya1/cyvlfeat | cyvlfeat/fisher/fisher.py | Python | bsd-2-clause | 2,883 | [
"Gaussian"
] | 47097518bc972ea383a1dbf3500ebdc94445076ecfac164cf2611bff74d6244d |
import cPickle
import numpy as np
import tensorflow as tf
import math
import func
from skimage.measure import block_reduce
def transform_data(image, img_size, d, noise_var):
cifar_size = 32
channels = 3
image = np.transpose(np.reshape(image, [channels, cifar_size, cifar_size]),(1,2,0))
# dow... | amrit110/deepLearThesis | tensorflow/input_data_cifar.py | Python | mit | 3,824 | [
"Gaussian"
] | d7937e71c3f6f692b17fa1f11b17fe8879853ce71e1945a003a647296fcd65b2 |
"""
=============================================
SNR estimation for Diffusion-Weighted Images
=============================================
Computing the Signal-to-Noise-Ratio (SNR) of DW images is still an open question,
as SNR depends on the white matter structure of interest as well as
the gradient direction corr... | villalonreina/dipy | doc/examples/snr_in_cc.py | Python | bsd-3-clause | 6,522 | [
"Gaussian"
] | 4bf66b4f80becf3d9b76a725b55b2d5ea9ccd05234e2d521b03393457005f11b |
""" File catalog class. This is a simple dispatcher for the file catalog plug-ins.
It ensures that all operations are performed on the desired catalogs.
"""
import types, re
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.... | fibbo/DIRAC | Resources/Catalog/FileCatalog.py | Python | gpl-3.0 | 11,056 | [
"DIRAC"
] | bc62dcb18e30e48d24020fc617da8d0e8bc0da6684128414559f773e1a8ea4d8 |
# (c) 2012, 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) any lat... | Juniper/ansible | lib/ansible/utils/__init__.py | Python | gpl-3.0 | 42,455 | [
"VisIt"
] | 847e50d56294b665ec8fd372e0252e65d6e0a4e4e1d66356ba6f89cd45027aab |
# -----------------------------------------------------------------------------
# Milky Way - Turn based strategy game from Milky Way galaxy
#
# URL: https://github.com/FedericoRessi/milkyway/
# License: GPL3
#
# pylint: disable=protected-access,redefined-outer-name
# -----------------------------------------... | FedericoRessi/milkyway | milkyway/tests/test_module.py | Python | gpl-3.0 | 787 | [
"Galaxy"
] | 567c56ce6d787177e7797c2d92b415c9af93fd1c58a487b73fde1d664f0a2997 |
#!/usr/bin/env python
from __future__ import division, print_function, unicode_literals
import os
import abipy.data as abidata
import abipy.abilab as abilab
from abipy.abilab import AbinitInput
from abipy.abilab import Structure
from ase.units import eV, Ha
from abipy.abio.factories import scf_input, ebands_input, do... | mailhexu/pyDFTutils | pyDFTutils/abipy/Perovskite.py | Python | lgpl-3.0 | 4,075 | [
"ASE"
] | 6d6ccc6263bf142cd2f446d4ebe6a921e57d83af59003bb738426525155ed57b |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/delegates/timedelegate.py | Python | gpl-2.0 | 2,542 | [
"VisIt"
] | 5a8aa8fcdb54da6e6740a48c287f3a98d0a211f4cae30ef8e56acb58a6921193 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.