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 |
|---|---|---|---|---|---|---|---|
# proxy module
from __future__ import absolute_import
from mayavi.core.ui.engine_rich_view import *
| enthought/etsproxy | enthought/mayavi/core/ui/engine_rich_view.py | Python | bsd-3-clause | 100 | [
"Mayavi"
] | efb173c4ae009c1820ee0b277a229a9ef2202c3a6d4e17208c4a5eae638afe14 |
'''test methods related to Red Hat Enterprise Linux, e.g. entitlement'''
from behave import *
import ConfigParser
import re
from distutils.version import LooseVersion
config = ConfigParser.ConfigParser()
config.read('config/uat.cfg')
rh_gpg_fingerprint = '567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51'
rh_gpg_fin... | mdshuai/UATFramework | steps/redhat.py | Python | gpl-2.0 | 12,806 | [
"VisIt"
] | bcdd3d5e5b3f77edc2f6d40f690b506836862b531124639c17bf720c303ec4bb |
#!/usr/bin/env python
"""
Created on Fri 7 March 2014
For backing up SI constants before converting them to CGS units in main
program.
@author Kristoffer Braekken
"""
"""PHYSICAL CONSTANTS"""
_L_SUN = 3.846e26 # [W]
_R_SUN = 6.96e8 # [m]
_M_SUN = 1.989e30 # [kg]
_G = 6.67384e-11 # [m^3 kg^-1 s^-2]
_C = 3.e8 # [m s... | PaulMag/AST3310-Prj01 | python/SI_constants.py | Python | mit | 1,247 | [
"Avogadro"
] | f27d0ee1938fe0f654f9a948eb49e64e39bfde32dac6dee5a2adbb0eb5ca479c |
import numpy as np
import cv2
import imutils
import sys
from scipy.misc import imread
from scipy import signal
image2 = cv2.imread(sys.argv[1],)
image2 = imutils.resize(image2, height=500)
cv2.imshow('image', image2)
cv2.waitKey(0)
image1 = cv2.cvtColor(image2, cv2.COLOR_BGR2GRAY)
image = imutils.resize(image1, height=... | ITCoders/Surveillance-System | scripts/LOG_image.py | Python | gpl-3.0 | 1,613 | [
"Gaussian"
] | aca7904cf7d4076ff35243fa8d514cdd7d621cf1e5690e81e77cd6cc99c46351 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Module containing classes to generate grain boundaries.
"""
import itertools
import logging
import warnings
from fractions import Fraction
from functools import reduce
from math import cos, floor, gcd
imp... | davidwaroquiers/pymatgen | pymatgen/analysis/gb/grain.py | Python | mit | 116,292 | [
"CRYSTAL",
"pymatgen"
] | 553e8cb6342d9f30ff7396efcbed2a10ba0ce3b0669440501a9a9da7f1f8460d |
#!/usr/bin/env python
from __future__ import division, print_function
import argparse
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import json
import os
import os.path
import re
import sys
import requests
DATA_TABLE_NAME = "primer_scheme_bedfiles"
def write_artic_style_be... | mblue9/tools-iuc | data_managers/data_manager_primer_scheme_bedfiles/data_manager/install_primer_scheme_bedfiles.py | Python | mit | 6,053 | [
"Galaxy"
] | 67e5a076409682ed5984eaf500f89927b1978fc5527cb25e4296ab2d8736e01b |
# coding: utf-8
# !/usr/bin/env python
#
# This code is part of the binding affinity prediction tools distribution
# and governed by its license. Please see the LICENSE file that should
# have been included as part of this package.
#
"""
Binding affinity predictor based on Intermolecular Contacts (ICs).
Anna Vangone... | haddocking/binding_affinity | predict_IC.py | Python | apache-2.0 | 11,803 | [
"Biopython",
"PyMOL"
] | e05e3c1e2a17e70fc2be51bb67d0fd4d17532b235fd6caef112842e9f251c9b4 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | SamStudio8/scikit-bio | skbio/diversity/alpha/tests/test_base.py | Python | bsd-3-clause | 17,647 | [
"scikit-bio"
] | 5d15e8d9e302748ca8439b6500ca7e50ed523e45108cfc920c067909e715ee72 |
import atexit
import contextlib
import fnmatch
import importlib.util
import itertools
import os
import shutil
import sys
import uuid
import warnings
from enum import Enum
from errno import EBADF
from errno import ELOOP
from errno import ENOENT
from errno import ENOTDIR
from functools import partial
from os.path import ... | pexip/os-pytest | src/_pytest/pathlib.py | Python | mit | 21,411 | [
"VisIt"
] | 626d6ae6534a563c591e59725a772556f95b3581c2466e7c6be2f6801a4c14a4 |
"""
Miscellaneous utility functions.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
import cPickle
import gzip
import numpy as np
import os
import pandas as pd
from rdkit import Chem
from rdkit.Chem.Scaffolds import MurckoScaffold
from vs_utils.u... | rbharath/vs-utils | vs_utils/utils/__init__.py | Python | gpl-3.0 | 11,924 | [
"RDKit"
] | 3baa248ef6af61dee68f0a10e225f74659da0618e451eb2b3a3b0dafe4796564 |
# run with: python manage.py test hs_core.tests.serialization.test_resourcemeta_sax_parsing
import unittest
import xml.sax
from hs_core.serialization import GenericResourceSAXHandler
from hs_geo_raster_resource.serialization import RasterResourceSAXHandler
from hs_app_netCDF.serialization import NetcdfResourceSAXHandl... | RENCI/xDCIShare | hs_core/tests/serialization/test_resourcemeta_sax_parsing.py | Python | bsd-3-clause | 11,024 | [
"Brian"
] | 994cb43c71b438e89735d1815e86ac0155161a3ce5a00f03a02ff6ef36b1dad1 |
#!/usr/bin/env python
'''
Project: Geothon (https://github.com/MBoustani/Geothon)
File: Vector/netcdf_to_shp.py
Description: This code converts netCDF file to Shapefile.
Author: Maziyar Boustani (github.com/MBoustani)
'''
import os
from netCDF4 import Dataset
try:
import ogr
except Import... | MBoustani/Geothon | Conversion Tools/netcdf_to_shp.py | Python | apache-2.0 | 2,714 | [
"NetCDF"
] | 8280d951fafaf70bbf74c88781324c3ec543d774b9861caaf162f3aecdca80df |
import gen_utils
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import vtk
class opening(ScriptedConfigModuleMixin, ModuleBase):
def __init__(self, module_manager):
# initialise our base class
ModuleBase.__init__(self, module_manager)
... | nagyistoce/devide | modules/filters/opening.py | Python | bsd-3-clause | 2,661 | [
"VTK"
] | 5ac59fee091dc8985c8d5bb0307015426807e53988d935d8cde6d45b0387bd01 |
# 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
#
# Unless required by appl... | gkc1000/pyscf | pyscf/pbc/lib/arnoldi.py | Python | apache-2.0 | 10,542 | [
"PySCF"
] | 0c34e3033c38805173627289884ca3bf29f2846d5f4a858c23472297943efa01 |
# Copyright 2012 Patrick Varilly, Stefano Angioletti-Uberti
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version... | patvarilly/DNACC | dnacc/physics.py | Python | gpl-3.0 | 3,077 | [
"Avogadro"
] | 4d498f1d18c355c9d159dcb053491f9e39a6787df7b8a3a17a07e180797aaf13 |
import webbrowser
import tempfile
import shutil
import requests
import logging
import platform
import os
import configparser
from collections import Counter
from PyQt5 import QtCore, QtWidgets, Qt, QtGui
from ui.Ui_mainwindow import Ui_MainWindow
from ui.Ui_aboutwindow import Ui_aboutWindow
from ui.Ui_aboutstandard imp... | eufarn7sp/asmm-eufar | ui/mainwindow.py | Python | bsd-3-clause | 49,065 | [
"NetCDF"
] | b0f017e80cd07f19e0d75542120a10c8e999a143caec4e5721820f6a03a8f62c |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import sys
import re
import datetime
from collections import namedtuple
import json
from io import StringIO
from monty.json import MontyDecoder, MontyEncoder
from monty.string import remove_non_ascii
from pym... | dongsenfo/pymatgen | pymatgen/util/provenance.py | Python | mit | 13,521 | [
"pymatgen"
] | 9b25235ee7984d6a8e27ac5d25edcfcbfababf586890ea9dc442bb8f8273732e |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | liesbethvanherpe/NeuroM | setup.py | Python | bsd-3-clause | 3,932 | [
"NEURON"
] | 9b1c6235157b7cb696abb3e88ddda71aed28385523a64db212c8bdedd6710b0e |
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - LocalSiteMap action
The LocalSiteMap action gives you a page that shows
nearby links. This is an example of what appears on the
page (names are linkable on the real page):
MoinMoin
GarthKidd
OrphanedPages
... | Glottotopia/aagd | moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/action/LocalSiteMap.py | Python | mit | 4,416 | [
"VisIt"
] | 8fc85d89ec0130abaabf118a67b3696d039f989180524dfceef08bf7b0722074 |
''' Command
Base class for all commands.
'''
from DIRAC import gLogger, S_OK
__RCSID__ = '$Id: $'
class Command( object ):
'''
The Command class is a simple base class for all the commands
for interacting with the clients
'''
def __init__( self, args = None, clients = None ):
self.apis ... | hgiemza/DIRAC | ResourceStatusSystem/Command/Command.py | Python | gpl-3.0 | 2,134 | [
"DIRAC"
] | 8ef1c0b0632d04315d3ec5b8babc20051b85c06a106703c43225b74def4def96 |
from exceptions import ValidationError
from flask import request, current_app, url_for
from flask.ext.mail import Message
import requests
def get_post_data(request):
if request.headers.get('content-type','application/json')=='application/json':
data = request.get_json()
else:
data = request.form
return d... | ehenneken/adsws | adsws/accounts/utils.py | Python | gpl-2.0 | 3,290 | [
"VisIt"
] | c9079974e8431b9af87b8d0205be4747aa19ce228b03be64de73d00b7fa90faa |
# -*- coding: utf8 -*-
"""Lookup tables used in the Researcher Format transformation."""
# Import required modules
# These should all be contained in the standard library
from collections import OrderedDict
__author__ = 'Victoria Morris'
__license__ = 'MIT License'
__version__ = '1.0.0'
__status__ = '4 - ... | victoriamorris/iams2rf | marc2rf/lookup.py | Python | mit | 68,546 | [
"Dalton"
] | 2c3b5f680e2473f128335504965933e7336ac74c7217d0f6a855cfd1afad3a44 |
#!/usr/bin/env python
#
# $File: reichDemo.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 redistribute ... | BoPeng/simuPOP | docs/reichDemo.py | Python | gpl-2.0 | 2,024 | [
"VisIt"
] | 1329d1d9aba472cf9fef4d08eb91103d4324ae394a901d5e1fb9064f3efeeca1 |
#Cauchy root finding
from __future__ import division
import numpy as np
import pylab as pl
import numpy.linalg as la
from numpy import pi, exp, arange, zeros, ones, real, imag, dot, roots, absolute, inf, roll, log, unwrap, linalg
from numpy import array, angle
_CROOT_PLOTRESULTS=0
_CROOT_DEBUG=0
def findzero_delves... | morris254/polymode | Polymode/mathlink/cauchy_findzero.py | Python | gpl-3.0 | 9,376 | [
"CRYSTAL"
] | 9a4d74f855c2e0e7020ab50af9f44839273bba90ad5a056507850dd98a816c4f |
##############################################################################
# Copyright (c) 2013-2018, 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... | mfherbst/spack | var/spack/repos/builtin/packages/macsio/package.py | Python | lgpl-2.1 | 5,044 | [
"NetCDF"
] | c732f934705e26e58093db41a7c58b9261e982877464802d1a2ddc9c0b6fbb24 |
import unittest
import datetime
from conjure.documents import Document, EmbeddedDocument
from conjure.fields import StringField, IntegerField, ReferenceField, DateTimeField, EmailField, ListField, EmbeddedDocumentField
from conjure.exceptions import ValidationError
from conjure.utils import Alias
import bson
class Doc... | vishnevskiy/conjure | tests/test_documents.py | Python | mit | 11,711 | [
"exciting"
] | da2575ad8aa8afa8039d6f901a94628e15307ba93fb493a232c2ff70f4141c41 |
import random
import pycurl
import urllib
import cStringIO
import json
def _u(i):
try:
return unicode(i, errors='ignore')
except:
return i
class HerpesNetPanel:
def __init__(self, gateway_url):
self.gateway_url = gateway_url
@staticmethod
def _get_field(gateway, table, c... | bwall/BAMF | IntegrationQueue/http/herpesnet/herpesnet.class.py | Python | mit | 3,564 | [
"Brian"
] | ecb401fdb71b861bcb8b3fdda8f00a40a0ee8010dac1631bf15229cc91128136 |
"""Database models.
Note on filesystem directory structure: (IN PROGRESS)
Since we are storing data output from various bioinformatics programs, the
models below result in the creation and maintenance of a directory
structure for data location. In general, the strategy is to have a
directory correspon... | woodymit/millstone | genome_designer/main/models.py | Python | mit | 65,925 | [
"BWA",
"Biopython",
"Galaxy"
] | 1303a353b6d6a6b46112fd771a7fad1a3ce516ca1d6537e3ae1e8b40f6d95e39 |
from __future__ import absolute_import
import json
import datetime
import pytz
import logging
from django.core.mail import send_mail
from django.contrib.auth import authenticate, login as auth_login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group, User
from django... | RENCI/xDCIShare | hs_core/views/__init__.py | Python | bsd-3-clause | 76,892 | [
"NetCDF"
] | 8a476ce1ddad82406576763372e02f30efdb2541ebd33fb950a43145cb13c656 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Development script to test the algorithms of a given model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "2.0"
__maintainer__ = "David ... | materialsproject/pymatgen | dev_scripts/chemenv/test_algos.py | Python | mit | 3,284 | [
"pymatgen"
] | ba16e84f7b5d28f3e6f6cdd08d823b31afca755965b5692178e85c9bb9048fa3 |
import csv,re
import cx_Oracle
filename='BlueFly-test.csv'
pipe_names = {}
BULLET1_MAPS = ['ARMS', 'BEZEL', 'BEZEL FUNCTION', 'BEZEL MATERIAL', 'BRACELET', 'BRACELET COLOR', 'BRACELET LENGTH', 'BRACELET MATERIAL', 'BRACELET WIDTH',]
BULLET2_MAPS = ['CALENDAR', 'CASE', 'CASE BACK', 'CASE DIAMETER', 'CASE HEIGHT', 'CA... | relic7/prodimages | python/SWIReader.py | Python | mit | 4,497 | [
"CRYSTAL"
] | ee0d5d87af0a6d279ccc1ab32dbc7388901833e5808b15200ce27248fa79e639 |
#!/usr/bin/env python
# L. Brodeau, april 2010
import sys
import numpy as nmp
from netCDF4 import Dataset
from string import replace
if len(sys.argv) != 2:
print 'Usage: '+sys.argv[0]+' <mesh_mask_ORCA1_file.nc>'
sys.exit(0)
cf_mm = sys.argv[1]
cf_out = replace(cf_mm, 'mesh_mask', 'basin_mask')
print '\n... | brodeau/barakuda | python/exec/.old/orca1_create_basin_mask_from_meshmask.py | Python | gpl-2.0 | 4,667 | [
"NetCDF"
] | 1de4b53490261c39e76c09b7743e09921b6b5f5d10471e1920038ecdd3a99406 |
from morphforge.stdimports import *
from morphforgecontrib.stdimports import StdChlLeak
# Create the morphology for the cell:
morphDict1 = {'root': {'length': 20, 'diam': 20, 'id':'soma'} }
m1 = MorphologyTree.fromDictionary(morphDict1)
# Create the environment:
env = NEURONEnvironment()
# Create the simulat... | mikehulluk/morphforge | doc/srcs_generated_examples/python_srcs/singlecell_simulation010.py | Python | bsd-2-clause | 1,399 | [
"NEURON"
] | df16f270ee9b4567f26040ca0d04c43acf9d055d7a8830c5d65f614f2c408764 |
# -*- coding: utf-8 -*-
"""
marksweep.group-crawler
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This modules contains a crawler that will traverse the facebook graph depth-first and persist
all groups, posts, comments and likes.
"""
__author__ = 'JasonLiu'
from Queue import Queue
import logging
import datetime
import time
from py... | jxnl/fbms-crawler | graph-crawler/crawlers.py | Python | mit | 7,106 | [
"VisIt"
] | 8f5a3da9f5702c93fe447bc754f647910bc772fc9b2b18f04d75510fcd9ddcf9 |
"""
The B{0install select} command-line interface.
"""
# Copyright (C) 2011, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import sys
from zeroinstall import _, logger
from zeroinstall.cmd import UsageError
from zeroinstall.injector import mode... | dsqmoore/0install | zeroinstall/cmd/select.py | Python | lgpl-2.1 | 8,502 | [
"VisIt"
] | 0688ede0f9d91a3889bcfdb7b520ae302a149e55339f5aeec1da78e2eb9601a8 |
from __future__ import division, print_function, absolute_import
from scipy import stats
import numpy as np
from numpy.testing import (assert_almost_equal, assert_,
assert_array_almost_equal, assert_array_almost_equal_nulp)
import pytest
from pytest import raises as assert_raises
def test_kde_1d():
#some bas... | gfyoung/scipy | scipy/stats/tests/test_kdeoth.py | Python | bsd-3-clause | 7,955 | [
"Gaussian"
] | d708fe652d45548d5c6039ceb1400aaae675c1a6b138dcf1e580f3d495b04bff |
#!/usr/bin/python
"""
This module contains an OpenSoundControl implementation (in Pure Python), based (somewhat) on the
good old 'SimpleOSC' implementation by Daniel Holth & Clinton McChesney.
This implementation is intended to still be 'Simple' to the user, but much more complete
(with OSCServer & OSCClient classes)... | ilzxc/m158a-node_python_odot | python/python2/pyOSC-0.3.5b-5294/OSC.py | Python | bsd-2-clause | 79,549 | [
"VisIt"
] | 1355b741a0af433286d21c8f7824209433b8b099b737c54f27c8416d5809bfe3 |
"""
SEMI-PASSIVE Plugin for Testing for Session Management Schema (OWASP-SM-001)
https://www.owasp.org/index.php/Testing_for_Session_Management_Schema_%28OWASP-SM-001%29
"""
import json
from collections import defaultdict
from owtf.config import config_handler
from owtf.requester.base import requester
from owtf.manage... | owtf/owtf | owtf/plugins/web/semi_passive/Session_Management_Schema@OWTF-SM-001.py | Python | bsd-3-clause | 1,677 | [
"VisIt"
] | e284f017addf4746e87a4f0881d507728c1f31c4cf9d65b7654672f9d4dbd01b |
from __future__ import division
import numpy as np
import time
from scipy.signal import convolve2d
def lpq(img,winSize=7,freqestim=1,mode='h'):
rho=0.90
STFTalpha=1/winSize # alpha in STFT approaches (for Gaussian derivative alpha=1)
sigmaS=(winSize-1)/4 # Sigma for STFT Gaussian window (applied if freq... | psilva-leo/AutonomousDoorman | system/livenessDetection.py | Python | mit | 5,871 | [
"Gaussian"
] | 356a824301edc5f190a338ee71fa16bd6ce172e8a38ab5be353d9471ab2a5e0c |
import logging
import sys
# Need to import rdBase to properly wrap exceptions
# otherwise they will leak memory
from . import rdBase
try:
from .rdBase import rdkitVersion as __version__
except ImportError:
__version__ = 'Unknown'
raise
logger = logging.getLogger("rdkit")
# if we are running in a jupyter noteb... | bp-kelley/rdkit | rdkit/__init__.py | Python | bsd-3-clause | 931 | [
"RDKit"
] | 8ff6bd167fa87581b6c4ebeb320f0863259924a1838ce3f7a99d0c1e2f08fb8a |
import vtk
class VTKAlgorithm(object):
"""This is a superclass which can be derived to implement
Python classes that work with vtkPythonAlgorithm. It implements
Initialize(), ProcessRequest(), FillInputPortInformation() and
FillOutputPortInformation().
Initialize() sets the input and output ports ... | berendkleinhaneveld/VTK | Wrapping/Python/vtk/util/vtkAlgorithm.py | Python | bsd-3-clause | 3,826 | [
"VTK"
] | bc00336217593b6b5eb4961b4bb40bdbce15dc016be506f5fc374650ecb9daae |
#!/usr/bin/env python
"""
Simple JavaScript Checker Module for Grabber v0.1
Copyright (C) 2006 - Romain Gaucher - http://rgaucher.info
- Look at the JavaScript Source...
"""
import sys, re, os
from spider import htmlencode
from xml.sax import * # Need PyXML [http://pyxml.sourceforge.net/]
# JavaS... | pwnieexpress/raspberry_pwn | src/pentest/grabber/javascript.py | Python | gpl-3.0 | 5,929 | [
"CRYSTAL"
] | 77342eff84da0a07de3b4af13169a77103807ee5a5413f28c378d7805c0c112c |
# Package imports
from ..workspace import Block, Disconnected, Cancelled, Aborted, anyOfStackIs
# Octopus Imports
from octopus.constants import State
from octopus.sequence.error import NotRunning, AlreadyRunning, NotPaused
# Twisted Imports
from twisted.internet import reactor, defer
from twisted.internet.error impor... | richardingham/octopus | octopus/blocktopus/blocks/controls.py | Python | mit | 9,739 | [
"Octopus"
] | f6f325232733f26b4071737e361a65254b8e0e01c71897736b53a1be1b002410 |
# This file is part of the Fluggo Media Library for high-quality
# video and audio processing.
#
# Copyright 2010 Brian J. Crowell <brian@fluggo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Founda... | fluggo/Canvas | fluggo/editor/ui/canvas/markers.py | Python | gpl-3.0 | 3,772 | [
"Brian"
] | 7a0d6d30e9c6aa253a431c392044204135f9059ab365e5043a00102fac072341 |
#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | 0x0all/nupic | py/regions/extra/GaborNode2.py | Python | gpl-3.0 | 141,860 | [
"Gaussian"
] | 20a65ad9dcb9e19962edb16a79296a1916474c0d7521788f38401a0d82a2197c |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkRectilinearGridReader(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... | chrisidefix/devide | modules/vtk_basic/vtkRectilinearGridReader.py | Python | bsd-3-clause | 512 | [
"VTK"
] | 04548348b872513085bda9b2e3b80dbac937f5efc6039a1aa44eadac47a874c3 |
"""
Helper functions for mlab. These combine creation of the data sources,
and applying the modules to them to make standard visualization
operation. They should always return the module object created, for
consistency, and because retrieving the vtk data source from a module object
is possible via tools.get_vtk_src
E... | liulion/mayavi | mayavi/tools/helper_functions.py | Python | bsd-3-clause | 40,211 | [
"Mayavi",
"VTK"
] | fc21660deea595af7316ecffebe9ba3d0afecf0e13cb26f3356ab0917547c4d2 |
########################################################################
# $Id$
########################################################################
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.List import stringListToString, intListToS... | Andrew-McNab-UK/DIRAC | DataManagementSystem/DB/FileCatalogComponents/FileManagerFlat.py | Python | gpl-3.0 | 14,198 | [
"DIRAC"
] | 538936df844392c15d88cd3f0fd305a3c43182abc0f6fd8b36b90229a04236f2 |
# $Id$
"""
This module defines a classs for a generic Workflow Parameter. It also defines
a ParameterCollection class as a list of parameters as well as an AttributeCollection
class which is the base class for the main Workflow classes.
"""
__RCSID__ = "$Revision: 1.33 $"
from DIRAC.Core.Workflow.Utility i... | vmendez/DIRAC | Core/Workflow/Parameter.py | Python | gpl-3.0 | 24,537 | [
"DIRAC"
] | 8d53434f16127d88b4a75b7bc98f30784d2a875dc1ef08739bf560774596de77 |
#!/usr/bin/python
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.widgets as Cursor
import scipy.constants as cte
from sympy import *
from matplotlib.widgets import Cursor
import sys
if sys.version_info[0] < 3:
import Tkinter as Tk1
else:
import tkinter as Tk1
from Tkinte... | ingelectronicadj/FisicaConPython | FisicaCuantica/distribucionDeFermi/DisdeFermiNe.py | Python | gpl-3.0 | 2,838 | [
"DIRAC"
] | 989e22c61236d5ddffd87149a3dcd313c6a6d605932ef78d45a0a0471179d233 |
from ase.test.fleur import installed
assert installed()
from ase.tasks.main import run
atoms, task = run("fleur bulk Al -x fcc -a 4.04 --k-point-density=3.0 -p xc=PBE")
atoms, task = run('fleur bulk Al -s')
| alexei-matveev/ase-local | ase/test/fleur/fleur_cmdline.py | Python | gpl-2.0 | 210 | [
"ASE",
"FLEUR"
] | 44514d9941c914fe3f5d102fbacff8a4a7b7a5741af4a969afe6ee5aa3531482 |
"""
A collection of utility functions and classes. Many (but not all)
from the Python Cookbook -- hence the name cbook
"""
from __future__ import generators
import re, os, errno, sys, StringIO, traceback, locale, threading, types
import time, datetime
import warnings
import numpy as np
import numpy.ma as ma
from weakr... | tkaitchuck/nupic | external/linux64/lib/python2.6/site-packages/matplotlib/cbook.py | Python | gpl-3.0 | 42,525 | [
"VisIt"
] | 52690d069fbe3c5df94c6655d09c731150346a6219478c36787726bb399dfcef |
#! /usr/bin/env python
# FIXME: if it requires a dirac.cfg it is not a unit test and should be moved to tests directory
import unittest
import time
import os
import shutil
import sys
import six
from DIRAC.Core.Base.Script import parseCommandLine, getPositionalArgs
parseCommandLine()
from DIRAC import gLogger
from... | DIRACGrid/DIRAC | src/DIRAC/Resources/Storage/test/FIXME_Test_StorageElement.py | Python | gpl-3.0 | 40,461 | [
"DIRAC"
] | 2fa43a3e062406331caba8e939352b2c66b521b619300a498a21fcb2b45a168a |
# import os
# import subprocess
# import uuid
import sys
from datetime import datetime
sys.path.append('../../python')
try:
import moose
except ImportError:
print 'Please include the directory containing moose.py and _moose.so in your PYTHONPATH environmental variable.'
sys.exit(1)
def time_creation(n... | dilawar/moose-full | moose-core/tests/python/benchmark.py | Python | gpl-2.0 | 686 | [
"MOOSE"
] | b0348bc58502c8b3d6d4cada1bc4f14b43ddfab734addae6ef5c75ccc7a220f7 |
import os
import unittest
import shutil, tempfile
from shyft.repository.netcdf.cf_region_model_repository import CFRegionModelRepository
from shyft import shyftdata_dir
from shyft.api.pt_gs_k import PTGSKModel
class CFRegionModelRepositoryTestCase(unittest.TestCase):
# Create a temporary directory
test_dir... | jfburkhart/shyft | shyft/tests/test_cf_region_model_repository.py | Python | lgpl-3.0 | 3,505 | [
"NetCDF"
] | 1bf3094daa4262a9d3d017e032045c3d341c665446c30db24df1c4cd3f24d20b |
#!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['stableinterf... | jbenden/ansible | lib/ansible/modules/cloud/amazon/elb_classic_lb.py | Python | gpl-3.0 | 53,955 | [
"Dalton"
] | a32cc37b52ab51e81ea69c22a51d128ce6fb837fc4fb6d8c21e05b2c275fbe02 |
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Australian Government, Department of the Environment
#
# 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 lim... | ssutee/metageta | metageta/utilities.py | Python | mit | 32,330 | [
"Brian"
] | adac841428e1f8a8516697d4fad9be0a889c059d27e5532929afbca46c66675d |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_column('profiles_indicator', 'generate_percent', 'display_percent', )
def backwards(self, orm):
db.r... | ProvidencePlan/Profiles | communityprofiles/profiles/oldmigrations/0018_change_generate_percent_to_display_percent.py | Python | mit | 10,591 | [
"MOE"
] | 6240100c677780a9ea9e3a2690ecfc648b2d19176af9fd1be843f59d9462713e |
"""
Generating Mock Objects with IRAF
=================================
This script provides a class that can be used to generate objects such as galaxies using IRAF.
:requires: PyRAF
:requires: PyFITS
:requires: NumPy
:author: Sami-Matias Niemi
:contact: smn2@mssl.ucl.ac.uk
:version: 0.1
"""
from __future__ import... | boada/planckClusters | snippets/generateGalaxies.py | Python | mit | 7,185 | [
"Galaxy",
"Gaussian"
] | d25d504549744d03d79b69424f9f80ef6a82a2ea95f476dd70f38142fa764e60 |
"""This module defines classes used in tvtk code generation,
`SpecialGenerator` defines methods that write out special code for
some of the VTK classes. `HelperGenerator` helps generate the
`tvtk_helper.py` class.
"""
# Author: Prabhu Ramachandran
# Copyright (c) 2004-2007, Enthought, Inc.
# License: BSD Style.
imp... | liulion/mayavi | tvtk/special_gen.py | Python | bsd-3-clause | 18,831 | [
"VTK"
] | 7885f8eb8d12d3811ce8edec3ae257e8a18cbe4ffda0a2ab6fe1e809eb15c26e |
import math
from datetime import timedelta as delta
from glob import glob
from os import path
import numpy as np
import pytest
import dask
from parcels import AdvectionRK4
from parcels import Field
from parcels import FieldSet
from parcels import JITParticle
from parcels import ParticleFile
from parcels import Partic... | OceanPARCELS/parcels | parcels/examples/example_dask_chunk_OCMs.py | Python | mit | 27,874 | [
"ORCA"
] | 3589c21b058f2232d6d72b21ad5558df5450f9970a34438a530e2aa48ccbfe03 |
""" Definitions of a standard set of pilot commands
Each commands is represented by a class inheriting CommandBase class.
The command class constructor takes PilotParams object which is a data
structure which keeps common parameters across all the pilot commands.
The constructor must call the supercla... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/PilotAgent/pilotCommands.py | Python | gpl-3.0 | 38,094 | [
"DIRAC"
] | d4c01850f13c28a7494f098b0705bd5034e4ac2decbe763fc3a6eab13dbb67a2 |
__author__ = "Brian Lenihan <brian.lenihan@gmail.com"
__copyright__ = "Copyright (c) 2012 Python for Android Project"
__license__ = "Apache License, Version 2.0"
import os
import logging
import sl4a
"""
Create and set a new Tasker variable, display the variable's value in a Tasker
popup, and then clear the variable.
... | tomMoulard/python-projetcs | scripts3/tasker_example.py | Python | apache-2.0 | 1,874 | [
"Brian"
] | 0544f6219091045f3573640eb388a85f918c5bf4d17b49b7dc16f4c6d6609650 |
"""Reusable decorators and functions for custom installations.
"""
from __future__ import print_function
from contextlib import contextmanager
import functools
import os
import socket
from string import Template
import sys
import tempfile
from tempfile import NamedTemporaryFile
import urllib
import uuid
import shutil
i... | chapmanb/cloudbiolinux | cloudbio/custom/shared.py | Python | mit | 30,622 | [
"Galaxy"
] | 80cb0407771edf3fc83537695e5940469858d63b26facbc26787bf973dd5070d |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements equivalents of the basic ComputedEntry objects, which
is the basic entity that can be used to perform many analyses. ComputedEntries
contain calculated information, typically from VAS... | mbkumar/pymatgen | pymatgen/entries/computed_entries.py | Python | mit | 18,004 | [
"VASP",
"pymatgen"
] | e9d6cd84b2642eb25f9fc6816256efdabddb55cfa91f27d8e891db249d0db172 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | gregcaporaso/scikit-bio | skbio/metadata/_testing.py | Python | bsd-3-clause | 53,266 | [
"scikit-bio"
] | 8c3fd3c98c3bb51a10978d9bab1cc9b5ec5263dfef7832608a5e3168534826f3 |
# BurnMan - a lower mantle toolkit
# Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S.
# Released under GPL v2 or later.
import operator
import bisect
import os
import pkgutil
import numpy as np
import constants
def pretty_print_table(table,use_tabs=False):
"""
Takes a 2d table an... | QuLogic/burnman | burnman/tools.py | Python | gpl-2.0 | 2,943 | [
"Avogadro"
] | 49105adcc36bb4c8fc2c39489522c9fe3cf56b65e7d27195df528e52c7e34f49 |
#!/usr/bin/env python
"""
Dispersion analysis of a heterogeneous finite scale periodic cell.
The periodic cell mesh has to contain two subdomains Y1, Y2, so that different
material properties can be defined in each of the subdomains (see `--pars`
option).
"""
from __future__ import absolute_import
import os
import sys... | lokik/sfepy | examples/linear_elasticity/dispersion_analysis.py | Python | bsd-3-clause | 21,427 | [
"VTK"
] | 6f6580ab9c043b8885b6bbde56fdd65fc6a2d58aa196537eb8f1341ddb76d72f |
#!/usr/bin/env python
#
# Copyright 2008,2009,2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at ... | tyc85/nwsdr-3.6.3-dsc | gr-uhd/apps/uhd_siggen_base.py | Python | gpl-3.0 | 16,747 | [
"Gaussian"
] | b0ae5a661c05ae82b6afa49aba75dff2c154cfe414205b08474c012a2abc61bd |
#!/usr/bin/env python2
# Copyright (C) 2015-2017(H)
# Max Planck Institute for Polymer Research
#
# 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, eit... | kkreis/espressopp | examples/lennard_jones/lennard_jones.py | Python | gpl-3.0 | 13,497 | [
"ESPResSo",
"VMD"
] | 9f407b1ffe2f8bbf9fb87421adb35c0315485ec9065f566b07b78e6771577073 |
import struct, string, re
__all__ = [ 'resolve' ]
def resolve(code):
"""
Transform a twocc or fourcc code into a name. Returns a 2-tuple of (cc,
codec) where both are strings and cc is a string in the form '0xXX' if it's
a twocc, or 'ABCD' if it's a fourcc. If the given code is not a known
twocc... | freevo/kaa-metadata | src/fourcc.py | Python | gpl-2.0 | 30,686 | [
"CRYSTAL"
] | eb1211acb2de27127f04af405792905f6d762a900e8184d43b73d6af23286ae1 |
from numpy import *
'''
Authors: Kai Liao, Adri Agnello (UCSB and UCLA)
Phil Marshall (Stanford)
Started: Liao, Aug.2014
Description: Convert Adri's Mathematica version into Python.
Given the survey imaging conditions and an object ID in OM10,
paint it in chosen band (g,r,i,z). Current python version
adap... | mbaumer/OM10 | om10/imagenew.py | Python | mit | 2,083 | [
"Gaussian"
] | bce5105bcdc95d70e334268a6fde3cb6a38598b5e7a3932b2bdf468efae1e78b |
import sys
sys.path.append('..')
import stile
class DummyDataHandler(stile.DataHandler):
def __init__(self):
self.source_file_name = 'example_source_catalog.dat'
self.lens_file_name = 'example_lens_catalog.dat'
self.read_method = stile.ReadASCIITable
self.fields={'id': 0, 'ra': 1, '... | msimet/Stile | examples/dummy.py | Python | bsd-3-clause | 2,110 | [
"Galaxy"
] | daaae61714df28d0dedec3d36c03d447c9435d6ff5a0c980c1cfa1ee7b288d0a |
#!/usr/bin/env python3
# Version 1.1
# Author Alexis Blanchet-Cohen
# Date: 09/06/2014
import argparse
import glob
import os
import os.path
import pandas
import subprocess
import util
# Read the command line arguments.
parser = argparse.ArgumentParser(description="Generates GATK BaseRecalibrator scripts.")
parser.ad... | blancha/abcngspipelines | exomeseq/baserecalibrator.py | Python | gpl-3.0 | 4,830 | [
"BWA"
] | e81ec8132215e8ba121c7802e7f91b312401dad51a1789e8962b760e4a1735ef |
""" Python test discovery, setup and run of test functions. """
import re
import fnmatch
import functools
import py
import inspect
import sys
import pytest
from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr
try:
import enum
except ImportError: # pragma: no cover
# Only ... | mhils/pytest | _pytest/python.py | Python | mit | 85,260 | [
"VisIt"
] | 8c51beaf7c75b56665ad8a208acde34002aa2ea425cb4c96a468e265ea0c0291 |
# 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.
"""
Unittests for Bio.Align.Applications interface for MAFFT
This code is part of the Biopython distribution and governed by its
license. Please see t... | updownlife/multipleK | dependencies/biopython-1.65/Tests/test_Mafft_tool.py | Python | gpl-2.0 | 7,614 | [
"Biopython"
] | 42da166de48abd4da60b403221bf9a698e549412d21429288c0633731df9e143 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the G... | govarguz/espressopp | src/analysis/MeanSquareInternalDist.py | Python | gpl-3.0 | 2,007 | [
"ESPResSo"
] | 389345040b2b9cf69b41cabaf0313eab5b31571a6dc377d5e71798357aae96cd |
from __future__ import print_function, division
import os, unittest, numpy as np
from timeit import default_timer as timer
from pyscf.nao import mf as mf_c
from pyscf.nao.m_ao_eval import ao_eval
class KnowValues(unittest.TestCase):
def test_ao_eval_speed(self):
""" Test the computation of atomic orbital... | gkc1000/pyscf | pyscf/nao/test/test_0204_ao_eval_speed.py | Python | apache-2.0 | 896 | [
"PySCF"
] | 72c6aba4bf5543bfe1480da212d59c242047c790b0975eec2aa63fb46b6b5fdc |
# NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
import os
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
# To set up environmenta... | TwilioDevEd/api-snippets | notifications/rest/notifications/send-passthrough-notification/send-passthrough-notification.7.x.py | Python | mit | 800 | [
"VisIt"
] | 25b95f89b287480f3a8e3f107f4794f43ddb63007aaf64f6c206c3c2acc93ad3 |
# -*- encoding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from h2o.exceptions import H2OValueError
from h2o.model.extensions import has_extension
from h2o.model.model_base import ModelBase
# noinspection PyUnresolvedReferences
from h2o.utils.compatibility import * # ... | h2oai/h2o-3 | h2o-py/h2o/model/regression.py | Python | apache-2.0 | 5,424 | [
"Gaussian"
] | f95d521daf3310ffb1ebbdbb301656f3fc7452d42a63423cd9af81f1cf80561a |
import mysql.connector,string,math
from mysql.connector import errorcode
DB_CONFIG={
'user':'zt',
'password':'123456',
'host':'localhost',
'database':'neuron'
}
def get_db_con(conf=DB_CONFIG):
try:
conn=mysql.connector.connect(**conf)
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS... | yanxiangtianji/Neuron | dataInit/db_base.py | Python | gpl-2.0 | 7,237 | [
"NEURON"
] | 69e7cf12372acc08cd69ae172274ed71cec2b082890a4631819bf1c58f134528 |
'''
Functions over spatial regions of images.
'''
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ['map_window', 'map_outer_window_stats', 'map_class_ids',
'map_classes']
import itertools
import numpy as np
import spectral as spy
from .algorithms import Gaussi... | spectralpython/spectral | spectral/algorithms/spatial.py | Python | gpl-2.0 | 27,113 | [
"Gaussian"
] | 536240e1d590505021cbe3b77c0a9dba541026009efd1be0bd16d61ad8b2e0fc |
# #-------------------------------------------------------------------------------
# # Cloud-COPASI
# # Copyright (c) 2013 Edward Kent.
# # All rights reserved. This program and the accompanying materials
# # are made available under the terms of the GNU Public License v3.0
# # which accompanies this distribution, and ... | edkent/cloud-copasi | cloud_copasi/web_interface/task_plugins/__init__.py | Python | gpl-3.0 | 1,570 | [
"COPASI"
] | f472e9b878ad2cd8fc1391fb876b61935db339a3a42d77bfb7010569d12db7e8 |
# Copyright (c) 2017, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
from yambopy import *
from math import sqrt
from time import time
max_exp = 50
min_exp =-100.
def abs2(x):
return x.real**2 + x.imag**2
def lorentzian(x,x0,g):
height=1./(np.pi*g)
return height*(... | alexandremorlet/yambopy | yambopy/dbs/dipolesdb.py | Python | bsd-3-clause | 9,838 | [
"Gaussian"
] | 97f0d80cb303bdde3b1a6fc5d91db27d5b313d112884b24f56f95b67a26e176b |
###############################################################################
# Copyright 2016 - Climate Research Division
# Environment and Climate Change Canada
#
# This file is part of the "EC-CAS diags" package.
#
# "EC-CAS diags" is free software: you can redistribute it and/or modify
# it under... | neishm/EC-CAS-diags | eccas_diags/interfaces/transcom3_input.py | Python | lgpl-3.0 | 3,785 | [
"NetCDF"
] | 75d85d82bf3aeefe1d051e6ae708a5ec34e0ed93b4cbfa2ef1d1b9349d133c91 |
# (c) 2015, Brian Coca <briancoca+dev@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 later v... | Censio/ansible-dev | lib/ansible/plugins/action/patch.py | Python | gpl-3.0 | 2,651 | [
"Brian"
] | 222c92cdf43861bd2bb099ade2aa0c54e1c0558f451e8662e53ab5dbe94d3c7c |
#!/usr/bin/env python
# This work was funded by Roche and generously donated to the free
# and open source cheminformatics community.
## Copyright (c) 2012 Andrew Dalke Scientific AB
## Andrew Dalke <dalke@dalkescientific.com>
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or... | rdkit/rdkit-orig | rdkit/Chem/MCS.py | Python | bsd-3-clause | 83,945 | [
"RDKit",
"VisIt"
] | 179682eb65ba162349fdc8542c538cd9dcbb36984ce34dc2ddda1852ffcd4b13 |
"""
python -c "import doctest, cyth; print(doctest.testmod(cyth.cyth_helpers))"
TODO: Change this file to cyth_manglers? Functions which mangle names?
"""
from __future__ import absolute_import, division, print_function
from os.path import splitext, split, join, relpath
import utool
import os
import astor
rrr = utool... | aweinstock314/cyth | cyth/cyth_helpers.py | Python | apache-2.0 | 2,759 | [
"VisIt"
] | 8b07ee7a98e3d97cbcd2bbbd10960470fd3ac191321211621c675397940519c5 |
# Natural Language Toolkit: Corpus Reader Utilities
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Steven Bird <sb@ldc.upenn.edu>
# Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
import os
import sys
import bisect
import re
import temp... | abad623/verbalucce | verbalucce/nltk/corpus/reader/util.py | Python | apache-2.0 | 31,153 | [
"VisIt"
] | 47652b67b5a70ab8735ab1cd1967aac295a7ebff77c6cd4614365a0848485812 |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# LICENSE
#
# Copyright (C) 2010-2022 GEM Foundation, G. Weatherill, M. Pagani,
# D. Monelli.
#
# The Hazard Modeller's Toolkit is free software: you can redistribute
# it and/or modify it under the terms of the GNU Affero General Public
# License a... | gem/oq-engine | openquake/hmtk/tests/faults/mfd/test_characteristic.py | Python | agpl-3.0 | 6,255 | [
"Gaussian"
] | b99bd4632e6197006edf01c2b7119cedd287aa20dd322a911979f5dae16f0ca9 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Collection of utility functions that can be used throughout
the photometry package.
.. codeauthor:: Rasmus Handberg <rasmush@phys.au.dk>
"""
import numpy as np
from astropy.io import fits
from bottleneck import move_median, nanmedian, nanmean, allnan, nanargmin, nana... | tasoc/photometry | photometry/utilities.py | Python | gpl-3.0 | 30,338 | [
"Gaussian"
] | 0954e1105112461fd2b9b7d82beffb7011fb2eec2596a933d909f9eacbc820d3 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2014 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundati... | tiagocardosos/stoq | stoqlib/gui/test/test_personmergedialog.py | Python | gpl-2.0 | 5,377 | [
"VisIt"
] | 805483a433c1983742f0207469efb180dd4218d62a027df9e1ff98a02b2ac1d7 |
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved.
"""
Add synchronization primitives
Mark off the start and end of each concurrent block for each channel
with a Barrier() message. These are points at which all channels should be brought
in sync with each other.
Later (evenblocks.py) we'll calc... | BBN-Q/pyqgl2 | src/python/attic/sync.py | Python | apache-2.0 | 9,551 | [
"VisIt"
] | ec4f5191d8e05161c3c7b2577450cbe83150990f5bef7cd00e72a485ea8eb2c3 |
"""Helpers for tests."""
from pkg_resources import resource_filename
from collections import namedtuple
from datetime import datetime
from pycds import get_schema_name, Contact, Network, Station, History, Variable
# Fixture helpers
# The following generators abstract behavior common to many fixtures in this
# test ... | pacificclimate/pycds | tests/helpers.py | Python | gpl-3.0 | 8,352 | [
"MOE"
] | 49fa469f505d860051c22b5b8e93c20ff030b91c0f03f51a87765b79db3881c2 |
# $Id: test_MurckoScaffold.py 3672 2010-06-14 17:10:00Z landrgr1 $
#
# Created by Peter Gedeck, June 2008
#
from collections import namedtuple
import doctest
import unittest
from rdkit import Chem
from rdkit.Chem.Scaffolds import MurckoScaffold
from rdkit.Chem.Scaffolds.MurckoScaffold import (GetScaffoldForMol, _pyGe... | ptosco/rdkit | rdkit/Chem/Scaffolds/UnitTestMurckoScaffold.py | Python | bsd-3-clause | 37,500 | [
"RDKit"
] | 0fb03c1b9faf14d4119ca03e01d0a8f4b1cf84deb667096ac13ebd6fd2e5b08b |
from pymol.cgo import *
from pymol import cmd
from pymol.vfont import plain
#this is a plugin version of the axes_cyl scripts by Dr. Robert L. Campbell (in fact I only added
#the __init__ function and englobed the resto of the code in a main function)
#As a very minor change I replaced the "ORIGIN" label for the orig... | weitzner/Dotfiles | pymol_scripts/showaxes.py | Python | mit | 1,326 | [
"PyMOL"
] | 1d885526bed17422256829b063e42932a8b8b076b2791ea7ffa6987a346bc9da |
# Copyright 2017 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... | sarvex/tensorflow | tensorflow/python/data/experimental/kernel_tests/rejection_resample_test.py | Python | apache-2.0 | 6,755 | [
"DIRAC"
] | 4b07cbd8fa430beffb105f86a871ce5bd205d79db74ece9bed693b5c9a458c1b |
# texttable - module for creating simple ASCII tables
# Copyright (C) 2003-2020 Gerome Fournier <jef(at)foutaise.org>
"""module for creating simple ASCII tables
Example:
table = Texttable()
table.set_cols_align(["l", "r", "c"])
table.set_cols_valign(["t", "m", "b"])
table.add_rows([["Name", "Age", "... | foutaise/texttable | texttable.py | Python | mit | 22,617 | [
"Brian"
] | ebf3cab5d06a1949736aea297c446d63ab19874fe08e9708086d684778b71357 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Feature_Comparison/single_feature/results/test10_cross_validate_objects_1200ms_scaled_method_v_force.py | Python | mit | 4,558 | [
"Mayavi"
] | 7e95536d7ef4748bd1e566225cfbb87133fb5e31e6915563f55c7cb4bca6956b |
#!/usr/bin/env python
from setuptools import setup, find_packages
def readme():
with open('README.md') as f:
return f.read()
def version():
with open('VERSION') as f:
return f.read().strip()
reqs = [line.strip() for line in open('requirements.txt') if not line.startswith('#')]
setup(
... | SECOORA/GUTILS | setup.py | Python | mit | 1,583 | [
"NetCDF"
] | 974adbad5b90843cb7cc2c5f1e747ca6a46588274ebdf9e28471a8156d120366 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.