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 |
|---|---|---|---|---|---|---|---|
"""A simple RPC server that show how to run multiple RPC services."""
#-----------------------------------------------------------------------------
# Copyright (C) 2012. Brian Granger, Min Ragan-Kelley
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING.BSD, distributed... | ellisonbg/zpyrpc | examples/server.py | Python | bsd-3-clause | 1,926 | [
"Brian"
] | 7cdd4518c928e8ce9e69736749a706edfcb931e50b47d73063334c164d90b943 |
from octopus.lib import paths
SWORDV2_SERVER_CONFIG = {
############################################
# Dynamically load the implementation classes for the 3 main interfaces
# In this default configuration we use the built-in SSS repository's
# implementations for everything
"sword_server" : "sss.r... | JiscPER/magnificent-octopus | octopus/modules/swordv2/settings.py | Python | apache-2.0 | 6,569 | [
"Octopus"
] | 9108e1a5bc81977c373e1ffead6122492bfcbb1ddf35e1084f29e3d46a3e73b6 |
import pychemia
import unittest
import numpy as np
class CrystalSymmetryTest(unittest.TestCase):
def test_optimized_grid(self):
"""
Test (pychemia.crystal.symmetry) :
"""
from pychemia import pcm_log
pcm_log.debug("CrystalSymmetryTest")
st... | MaterialsDiscovery/PyChemia | tests/test_crystal_symmetry.py | Python | mit | 717 | [
"CRYSTAL",
"VASP"
] | d8aea17deaf0407c7bfa3daf297f0dc4596f01af7996919fbe17bd5359c7be0b |
#! A test of the basis specification. A benzene atom is defined using a ZMatrix containing dummy atoms
#! and various basis sets are assigned to different atoms. The symmetry of the molecule is automatically
#! lowered to account for the different basis sets.
import psi4
psi4.set_output_file("output.dat", False)
re... | amjames/psi4 | tests/python/mints2/input.py | Python | lgpl-3.0 | 4,187 | [
"Psi4"
] | 09133969f706c47748c5dfb00257388add8cebb1bbc46f1392081096a45dc708 |
#!/usr/bin/env python
from ase import Atoms
from gpaw import GPAW
from gpaw import ConvergenceError
from gpaw.mpi import rank
from gpaw.eigensolvers.rmm_diis import RMM_DIIS
from gpaw import setup_paths
# Use setups from the $PWD and $PWD/.. first
setup_paths.insert(0, '.')
setup_paths.insert(0, '../')
positions=... | qsnake/gpaw | doc/devel/256H2O/b256H2O.py | Python | gpl-3.0 | 3,638 | [
"ASE",
"GPAW"
] | 57dca39555f78c7629e8d93325debba8db4566fd16bd30d9a49414fb466bcb53 |
#!/usr/bin/env python
import vtk
def main():
sphereSource1 = vtk.vtkSphereSource()
sphereSource1.Update()
delaunay1 = vtk.vtkDelaunay3D()
delaunay1.SetInputConnection(sphereSource1.GetOutputPort())
delaunay1.Update()
sphereSource2 = vtk.vtkSphereSource()
sphereSource2.SetCenter(5... | lorensen/VTKExamples | src/Python/Filtering/ConnectivityFilter.py | Python | apache-2.0 | 1,442 | [
"VTK"
] | b2a2ff34ecd4c1aa9e1d43bcb95058494ed024f1f0c3ec5e742043d3378acccd |
# Takes 30 mins with 8 cores in domain-parallel (memory ~500mb, max 1.5gb)
import numpy as np
from ase import Atom, Atoms
from gpaw import GPAW, MixerDif, mpi
from gpaw.lrtddft import LrTDDFT
from gpaw.pes.dos import DOSPES
from gpaw.pes.tddft import TDDFTPES
atoms = Atoms([Atom('N', (5.915080000001099, 5.58409993548... | robwarm/gpaw-symm | gpaw/test/big/pes/PES_NH3.py | Python | gpl-3.0 | 1,711 | [
"ASE",
"GPAW"
] | b7babae3119d710f2a1f3e5ef073041afed3778027477e74ea4b86609521ef59 |
from lacore.adf.persist import make_adf
from lacore.archive import restore_archive as _restore_archive
from lacli.nice import with_low_priority
from lacli.hash import HashIO
def archive_handle(docs):
h = HashIO()
make_adf(docs, out=h)
return h.getvalue().encode('hex')
restore_archive = with_low_priority(... | longaccess/longaccess-client | lacli/archive/__init__.py | Python | apache-2.0 | 338 | [
"ADF"
] | 9246761b4d20782495471b9cc4816339a61af0d82aedd8bbab949aa3bd9dd501 |
#!/usr/bin/python
"""
" @section DESCRIPTION
" Helper functions for training and evaluating RF models
"""
import os
import numpy as np
import cPickle as pickle
from scipy.io import loadmat
from scipy.linalg import toeplitz
from sklearn.neighbors import kneighbors_graph
from numpy.lib import stride_tricks
from operator... | JohanWesto/receptive-field-models | rf_models/rf_helper.py | Python | mit | 17,339 | [
"Gaussian"
] | 6294931bd17c5c3457d39feceb6a14b989aa4b6231e704a93fd70aa3787f01e0 |
# Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | TuSimple/simpledet | operator_py/detectron_bbox_utils.py | Python | apache-2.0 | 12,872 | [
"Gaussian"
] | b22efe2fd7e3ca50aaa9a34cd235e701cd200c6bb757ec90462988082fcd6dbc |
"""
Communicability and centrality measures.
"""
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
from networkx.utils import *
__author__ = "\n".join(['Aric Hagberg (... | LumPenPacK/NetworkExtractionFromImages | win_build/nefi2_win_amd64_msvc_2015/site-packages/networkx/algorithms/centrality/communicability_alg.py | Python | bsd-2-clause | 14,205 | [
"Desmond"
] | 57680ad9d1457c8c7245c8cf2c54fb6f46fbb7d6ed19a2fa314320810cad900f |
# $HeadURL$
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.CFG import CFG
from DIRAC.Core.Utilities import List
def loadJDLAsCFG( jdl ):
"""
Load a JDL as CFG
"""
def cleanValue( value ):
value = value.strip()
if value[0] == '"':
entries = []
iPos = 1
cu... | andresailer/DIRAC | Core/Utilities/JDL.py | Python | gpl-3.0 | 4,952 | [
"DIRAC"
] | 11b02cf7846ba7d2801fa2d2692493a041c7d73d2a54ef35eb7aa31db3eeed74 |
import logging
import wx
from service.fit import Fit
from gui.bitmap_loader import BitmapLoader
import gui.globalEvents as GE
from gui.preferenceView import PreferenceView
from service.settings import EOSSettings
import gui.mainFrame
from wx.lib.intctrl import IntCtrl
logger = logging.getLogger(__name__)
class PFF... | DarkFenX/Pyfa | gui/builtinPreferenceViews/pyfaEnginePreferences.py | Python | gpl-3.0 | 7,002 | [
"CRYSTAL"
] | 7d830b5ccc5af484990ea3f8a01451ef0dc6821bd2f4c02115fb92ba399764a2 |
#!/usr/bin/env python
##############################################################################
## Filename: libExtractStar.py
## Version: $Revision$
## Description: Extract_star utilities module
## Author: $Author$
## $Id$
#######################################################################... | snfactory/extract-star | extract_star/libExtractStar_numexpr.py | Python | mit | 49,448 | [
"Gaussian"
] | 80ef867d4fb6fe162fe6e83381d0467471be88358b15daea17b5dad54f9465ce |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
#
# $Id: 4924bbb91e59566666746c62bd76c59e178b4b6a $
"""
Configuration classes for *sqlcmd*.
COPYRIGHT AND LICENSE
Copyright © 2008 Brian M. Clapper
This is free software, released under the following BSD-like license:
Redistribution and use in source and binary fo... | ychen820/microblog | y/google-cloud-sdk/platform/google_appengine/lib/sqlcmd/sqlcmd/ecmd.py | Python | bsd-3-clause | 5,712 | [
"Brian"
] | 4ec3155c58431e46e0ba5b3d1dcb79bc1a0d99ab8d1c74c758b8411ff1f424be |
# -*- coding: utf8
# Author: David C. Lambert [dcl -at- panix -dot- com]
# Copyright(c) 2013
# License: Simple BSD
"""
The :mod:`elm` module implements the
Extreme Learning Machine Classifiers and Regressors (ELMClassifier,
ELMRegressor, SimpleELMRegressor, SimpleELMClassifier).
An Extreme Learning Machine (ELM) is a... | ashishbaghudana/mthesis-ashish | resources/tees/Utils/Libraries/PythonELM/elm.py | Python | mit | 20,319 | [
"Gaussian"
] | 420f0558c6f75cb7f08b1c8f87f097604e74c2558e8283b4ac5e035c2bad57d7 |
#!/usr/local/sci/bin/python
#*****************************
#
# Duplicate Months Check (DMC)
#
#
#************************************************************************
# SVN Info
#$Rev:: 55 $: Revision of last commit
#$Author:: rdunn ... | rjhd2/HadISD_v2 | qc_tests/duplicate_months.py | Python | bsd-3-clause | 7,950 | [
"NetCDF"
] | 13a30c7ebca339e19e345aadbe2497c448c85f6c0ac4025bee020f8d33224332 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from io import BytesIO
from threading import Lock
import contextlib
import itertools
import os.path
import pickle
import shutil
import tempfile
import unittest
import sys
import numpy as np
import pandas as pd
... | rabernat/xray | xarray/tests/test_backends.py | Python | apache-2.0 | 93,392 | [
"NetCDF"
] | d34c2672355bd2cf232956a69543ddf9091b1b2b4ceab17393347824a65f0b3c |
import os
import subprocess
import pytest
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
USERNAME = 'admin'
gunicorn = None
########################################################################
# ... | hmpf/nav | tests/functional/conftest.py | Python | gpl-3.0 | 4,785 | [
"VisIt"
] | 86d324a8e26951d4130f25c50c1bfeb768e0d874b98bbdade79da37e4bbb5fd9 |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | mlperf/training_results_v0.5 | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/models/video/savp.py | Python | apache-2.0 | 22,197 | [
"Gaussian"
] | 2882635250e44f17c7ed4dea846823029c717c89c36147db119ad9e7c01d24f8 |
# -*- coding: utf-8 -*-
"""
<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>
A Brianer
"""
#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Specials.Simulaters.Simulater"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer... | Ledoux/ShareYourSystem | Pythonlogy/draft/Simulaters/Brianer/__init__ copy.py | Python | mit | 8,063 | [
"Brian"
] | 00de1d045566fb00606dade33b09fa133bb4be08df7231d8c55ed92ac05248fa |
"""
@file inv/api/util.py
@author Brian Kim
@brief a script that defines utility methods for the server
"""
from auth import auth_inv
from datetime import timedelta
from functools import update_wrapper, wraps
from flask import current_app, make_response, request, Response
import base64
"""
convenience methods ... | briansan/inv | server/inv/util.py | Python | mit | 3,088 | [
"Brian"
] | 2c424d586faeab3ea4cfa46b8fcb880cbaf3df3b0cc703dc98868de20c55a300 |
# Copyright (c) 2012 OpenStack Foundation
# 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 ... | devoid/nova | nova/tests/compute/test_resource_tracker.py | Python | apache-2.0 | 42,059 | [
"exciting"
] | a6553fdd9e19313d8da6e5d78b34ff5dfe86414ab667ec2a2bb69e07ced016db |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
# Author: Clark Evans
""" flow.web
This contains wrappers to apply flow to components in twisted.web.*
"""
from controller import Deferred
from twisted.web import resource, server
from twisted.python.failure import Failure
clas... | hortonworks/hortonworks-sandbox | desktop/core/ext-py/Twisted/twisted/flow/web.py | Python | apache-2.0 | 1,455 | [
"VisIt"
] | 2d870567c3f4a166847c964438b819aa938b0f62e01e53494ade07b56c2cf558 |
from django.core.urlresolvers import reverse
from django.test import TestCase
class HealthViewTest(TestCase):
def test_health_view(self):
# Should get 200, without logging in or anything
rsp = self.client.get(reverse('health'))
self.assertEqual(200, rsp.status_code)
def test_health_ur... | theirc/CTS | cts/tests/test_views.py | Python | bsd-3-clause | 521 | [
"VisIt"
] | bdb8ebf911f19b921c157a5c2d490c3ea69c71417c4e27e66425be1a771b8f7f |
import BlockFactory
import unittest
import logging
import sys
from ConfigStore import Config
from tun_handler import TunHandler
from grc_gnuradio import wxgui as grc_wxgui
from random import randint
class qa_FactoryBlocks(unittest.TestCase):
def setUp(self):
conf = dict()
conf['c'] = ... | sectubs/2016s-SEP | Orcatun/qa_FactoryBlocks.py | Python | gpl-3.0 | 5,871 | [
"ORCA"
] | e584853e39aac990a294b69adca7af194fa7faa2f6df9fc5f3328414e8ff902e |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | nerzhul/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 28,119 | [
"Galaxy",
"MOOSE"
] | d479a216327f9f167df232c86b32fbab0a2d91277c8ab804b245d0bf62d20592 |
# 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):
# Changing field 'Denominator.label'
db.alter_column('profiles_denominator', 'label', self.gf('django.db.m... | ProvidencePlan/Profiles | communityprofiles/profiles/oldmigrations/0034_auto__chg_field_denominator_label.py | Python | mit | 16,174 | [
"MOE"
] | 602dda8436064a46e53b87be5258a13663f349a29e074e553a5a5dd924e647ac |
#!/usr/bin/env python
"""
VAVUQ (Verification And Validation and Uncertainty Quantification) can
be used as a general purpose program for verification, validation, and
uncertainty quantification. The motivation for the creation of and
continued development of the program is to provide a cost effective and
easy way to... | vavuq/vavuq | VAVUQ.py | Python | gpl-3.0 | 57,168 | [
"VisIt"
] | f5aaa752387064515b01f28deaa5ddb2c0f2c0e7a0cf4ee00de798aae10da7eb |
""" unit tests for Transformation Clients
"""
# pylint: disable=protected-access,missing-docstring,invalid-name
import unittest
import json
import mock
from DIRAC import gLogger, S_OK
from DIRAC.RequestManagementSystem.Client.Request import Request
from DIRAC.TransformationSystem.Client.TaskManager import TaskBase, ... | hgiemza/DIRAC | TransformationSystem/Client/test/Test_Client_TransformationSystem.py | Python | gpl-3.0 | 22,243 | [
"DIRAC"
] | 6f376c18e0db398e24ebeff7fa3662ebac8a8087c42671c98f45903862a91d3d |
# -*- coding: utf-8 -*-
"""
Models for ``critica.apps.ads`` application.
"""
import os
from django.conf import settings
from django.db import models
from django.db.models import permalink
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.template.defaultfilters import slugify... | brunobord/critica | apps/ads/models.py | Python | gpl-3.0 | 21,625 | [
"VisIt"
] | 278edaede2d0f84727f8f52b242d266d4088e615dfe0d2041b088d5353abf264 |
# Copyright 2012, 2013 The GalSim developers:
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
#
# GalSim is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software... | mardom/GalSim | galsim/config/stamp.py | Python | gpl-3.0 | 41,742 | [
"Galaxy",
"Gaussian"
] | 35cb197829e7902617e804957e4b601e98111a5a9dc906e7a1f2237c04e50a60 |
# Basic Python Server in Flask for showing reports
# Essentially put together from this page:
# http://flask.pocoo.org/docs/0.10/quickstart/
# Just run this like:
# > python server.py
# and then visit http://localhost:5000
from datetime import datetime
from flask import Flask, render_template, request, make_response
... | mozilla/zenko | zenko/server.py | Python | mit | 21,695 | [
"VisIt"
] | 4cb65f5ff50571b9a9f869507eb17f4fe299d82095415bca612e5608211019da |
import numpy
import scipy.constants as codata
from shadow4.beam.beam import Beam
from shadow4.sources.source_geometrical.probability_distributions import Rectangle2D, Ellipse2D, Gaussian2D
from shadow4.sources.source_geometrical.probability_distributions import Flat2D, Uniform2D, Conical2D
from srxraylib.util.invers... | srio/minishadow | shadow4/sources/source_geometrical/source_geometrical.py | Python | mit | 19,166 | [
"Gaussian"
] | 4c359611980da60df1a9736ef2bcd38c8e361182e4975aee040034910612b1f5 |
# -*- coding: utf8 -*-
from lib.constants import ALL_CURRENCIES
from tower import ugettext_lazy as _lazy
# From page 10 of the Mozilla Exporter API docs v1.0.0
#
# BDT not in docs, but added in for bug 1043481.
BANGO_CURRENCIES = ['AUD', 'BDT', 'CAD', 'CHF', 'COP', 'DKK', 'EGP', 'EUR',
'GBP', 'IDR... | jamesthechamp/zamboni | mkt/constants/bango.py | Python | bsd-3-clause | 9,749 | [
"BWA"
] | 3ba7be7e9faafd1b08c53af8d21caff8241083a44b38d2416cd523685f9fcee9 |
import unittest
from katas.kyu_6.calculate_string_rotation import shifted_diff
class ShiftedDiffTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(shifted_diff('coffee', 'eecoff'), 2)
def test_equals_2(self):
self.assertEqual(shifted_diff('eecoff', 'coffee'), 4)
def te... | the-zebulan/CodeWars | tests/kyu_6_tests/test_calculation_string_rotation.py | Python | mit | 760 | [
"MOOSE"
] | cf6156be74e0a57fb51b6d8b600562379594e8153ac9f3bd83f13470bf543b94 |
"""
Created on Wed 28 June
This script have the goal to generate texture with different loss function
@author: nicolas
"""
import Style_Transfer as st
from Arg_Parser import get_parser_args
import os
import tensorflow as tf
def get_list_of_images(path_origin):
dirs = os.listdir(path_origin)
dirs = sorted(dirs, ... | nicaogr/Style-Transfer | ComparaisonNetworks.py | Python | gpl-3.0 | 2,085 | [
"Gaussian"
] | 6a8837c02cf77446f2c3f2b095994e43b991776ba969b5e23686a051eb244b49 |
import numpy
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
from distutils.extension import Extension
try:
from Cython.Build import cythonize
from Cython.Distutils import build_ext
except ImportError:
print("Cython not found")
use_c... | AdaptivePELE/AdaptivePELE | setup.py | Python | mit | 3,141 | [
"MDTraj"
] | b7086a321778a1d8a4666925597d468b2cee95274d97889f2021dcc86ac19e4f |
"""
This wrapper is intended to replicate the inputs of agpy's showspec.splat_1d code.
It is uglier than the spectrum class.
"""
from __future__ import print_function
from ..spectrum.classes import Spectrum
def splat_1d(filename=None,vmin=None,vmax=None,button=None,dobaseline=False,
exclude=None,smooth=None,o... | vlas-sokolov/pyspeckit | pyspeckit/wrappers/showspec_splat1d.py | Python | mit | 2,940 | [
"Gaussian"
] | ab4926608b678ac64f2717ddc652130f6a5452aaf50cc705ff701213932047f5 |
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
import traitlets
from cesiumpy.base import _CesiumBase
import cesiumpy.util.common as com
class Viewer(_CesiumBase):
"""
Viewer
Parameters
----------
divid : str
id string used in div tag
width : str
... | sinhrks/cesiumpy | cesiumpy/viewer.py | Python | apache-2.0 | 11,044 | [
"COLUMBUS"
] | 298bb180cc6c646cf45d4bf7fe7a1eb2dc21b327f8e67f605e5bad4ff0ac1a46 |
#-*- coding:utf-8 -*-
#
# Copyright (C) 2013 Fabrice Desclaux
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Thi... | serpilliere/miasm | miasm/ir/ir.py | Python | gpl-2.0 | 35,042 | [
"VisIt"
] | 037489cd2f2c2989b2c996da68fdb3dc60886305817e76f1a80d12e639bfe9fb |
#!/usr/bin/env python
__author__ = 'greg'
import pymongo
import random
import os
import time
from time import mktime
from datetime import datetime,timedelta
import numpy as np
from scipy.stats import ks_2samp
import cPickle as pickle
project = "serengeti"
date = "2015-02-09"
# for Greg - which computer am I on?
if os... | camallen/aggregation | experimental/paper/confidence/confidence.py | Python | apache-2.0 | 6,759 | [
"Brian"
] | 3fb1e372ee9f9995d461301379ffecabc12235184fc17c13a37b881eee994bff |
try: paraview.simple
except: from paraview.simple import *
import numpy as np
from mpi4py import MPI
import os
import csv
from scipy import interpolate
import gc
import sys
gc.enable()
comm = MPI.COMM_WORLD
label = 'm_50_7'
labelo = label+'_particles'
label = label+'_2Dc_particles'
basename = 'mli_checkpoint'
dayb... | jungla/ICOM-fluidity-toolbox | Detectors/extract_Tr_12_day.py | Python | gpl-2.0 | 3,182 | [
"ParaView"
] | 08f8b09b8840c834e55c6b7a7b3806c7f1087797437605b7e5b96471b5505c85 |
# Copyright (C) 2012 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 opt... | hcs/mailman | src/mailman/runners/tests/test_confirm.py | Python | gpl-3.0 | 10,568 | [
"VisIt"
] | ac6b84e58dda81163911c1714a62499391243ec6225e03c1ba187bc673cd1546 |
import ipaddress
import re
import uuid
from django.conf import settings
from django.db import models
from django.db.models.query import QuerySet
from .reports.models import (
DeviceType,
Device,
Page,
PagePattern,
PageType,
PageVisit,
ReferrerType,
Visitor,
Visit,
)
def generate_u... | analytehealth/django-analytics | djanalytics/models.py | Python | bsd-2-clause | 5,674 | [
"VisIt"
] | 6deb00a40b84aa7eac795f280f5f9a3e928a6a52c05ed4160358e97db2bfd359 |
#!/usr/bin/env python
import os,sys
def login():
'''
this scipt use for test the account and it's password
if account input 3 times wrong password , the account will be locked
and never use this account again
'''
account_file = 'account.txt'
lock_file = 'lock_file.txt'
while True:
f = file(account_file,'r... | lichengshuang/createvhost | python/others/oldboy/day1/office.login2.py | Python | apache-2.0 | 1,499 | [
"VisIt"
] | 8e486e80346230dd114a63c9672b930476b9faec47becc41737dacd15dfc1fcc |
"""
Dashboard view and supporting methods
"""
import datetime
import logging
from collections import defaultdict
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import NoReverseMatch, reverse, reverse_lazy
fro... | proversity-org/edx-platform | common/djangoapps/student/views/dashboard.py | Python | agpl-3.0 | 33,472 | [
"VisIt"
] | 80505eb46f07e03bec9f877e8d1fb2cdd87c36618b7fcfb530dc4a06e255200b |
""" PlotBase is a base class for various Graphs plots
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phedex Project by ... <to be added>
"""
from DIRAC.Core.Utilities.Graphs.Palette import Palette
from DIRAC.Core.Utilities.Graphs.GraphData import GraphData
from DIRAC.Core.U... | andresailer/DIRAC | Core/Utilities/Graphs/PlotBase.py | Python | gpl-3.0 | 9,085 | [
"DIRAC"
] | d36b76603ab05dd01aa04b9a4a3e98f205ad662fa43efbf220de85f692bf3c85 |
from lammps_data.crystal import MOF
from lammps_data.bonds import extrapolate_bonds, extrapolate_periodic_bonds
from lammps_data.angles import get_angles
from lammps_data.dihedrals import get_dihedrals
expected_cell_vectors = [[25.832, 0, 0], [0, 25.832, 0], [0, 0, 25.832]]
def test_irmof1_and_packed_irmof1_should_r... | kbsezginel/lammps-data-file | tests/test_irmof1.py | Python | mit | 1,370 | [
"CRYSTAL"
] | a4d46364a01c6e664ba60a6ef164e658efc34e0d0f599fc63aba2023a63facdb |
#!/usr/bin/env python
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
def rehbinder(r):
# Results from Rehbinder with parameters used in the MOOSE simulation.
# Rehbinder's manuscript contains a few typos - I've corrected them here.
# G Rehbinder "Analytic solutions of stationary c... | yipenggao/moose | modules/combined/test/tests/thm_rehbinder/thm_rehbinder.py | Python | lgpl-2.1 | 5,870 | [
"MOOSE"
] | 4422b95a27406847240aa341cf6a208604fbb1399f042c84c11a22ad89a473c8 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/e2-openwbif | plugin/controllers/views/mobile/screenshot.py | Python | gpl-2.0 | 7,999 | [
"VisIt"
] | 7d53aa0b26fac5febebee31904fa3b18503f0d99c126f1ed0103ebe9d2a07123 |
# -*- coding: utf-8 -*-
"""
tests.datastructures
~~~~~~~~~~~~~~~~~~~~
Tests the functionality of the provided Werkzeug
datastructures.
Classes prefixed with an underscore are mixins and are not discovered by
the test runner.
TODO:
- FileMultiDict
- Immutable types undertested... | joshfriend/werkzeug | tests/test_datastructures.py | Python | bsd-3-clause | 29,681 | [
"TINKER"
] | 5f93ab5db7be6444f923fad515b096faa2d19adb14269d4df4f00b0b38cc5933 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Copyright (C) 2012 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later... | ryanvade/ozunity-thus | src/canonical/i18n.py | Python | gpl-3.0 | 4,162 | [
"FEFF"
] | fce813749c210f40d06b7af1d5d2a401e5ec1a7d6b331addfc5a683fcce2889b |
import numpy as np
from .control import model_setup
from .cp_confocal import threed
# 3D simple gauss
def CF_Gxyz_gauss(parms, tau):
# Model 6012
u""" Three-dimanesional free diffusion with a Gaussian laser profile
(eliptical).
G(τ) = offset + 1/( n*(1+τ/τ_diff) * sqrt(1 + τ/(SP²*τ_diff)) )... | paulmueller/PyCorrFit | pycorrfit/models/model_confocal_3d.py | Python | gpl-2.0 | 2,021 | [
"Gaussian"
] | 27533f609a974cfc682c0b12720c6c36dd0aec730a3aaddec84ae5a2a9b0fd2e |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# pack - Pack one or more files/dirs into a zip/tar archive
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | heromod/migrid | mig/shared/functionality/pack.py | Python | gpl-2.0 | 9,088 | [
"Brian"
] | f7319f5681a109fff04a4fa4da76c7b0201aede46797e34516b2af236deb86f8 |
# python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... | deepmind/enn | enn/experiments/neurips_2021/load.py | Python | apache-2.0 | 4,905 | [
"Gaussian"
] | 6d8a62b347512d9222f3f654d801d3fe5b522babbaeb4b3bd12247ef576d69f8 |
# -*- coding: utf-8 -*-
import io
import sys
import libnano.helpers.textwrap as textwrap
NEWLINE_BYT: bytes = b'\r\n' if sys.platform == 'win32' else b'\n'
def write(fd: '_io.TextIOWrapper', d: dict, order_qualifiers: bool = False):
d_info = d[b'info']
writeLocus(fd, d_info)
writeDefinition(fd, d_info)
... | libnano/libnano | libnano/fileio/gb_writer_b.py | Python | gpl-2.0 | 10,447 | [
"Biopython"
] | 2a753f0cb1eb08bfafab8e3f9950b996e2af4f599fa235e67383d93a2166ba1e |
import unittest
class TestDeepchemBuild(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
import deepchem
import os
import shutil
data_dir = deepchem.utils.data_utils.get_data_dir()
bace_dir = os.path.join(data_dir, "bace_c")
delaney_dir = os.path.join(data_dir, "delaney"... | lilleswing/deepchem | devtools/archive/conda-recipe/deepchem/run_test.py | Python | mit | 2,406 | [
"RDKit"
] | 8ea6381653878f3c0cdc514e585ae7a66744a1abc804d746d353c66f0e951d5f |
from gpaw import GPAW, restart
from ase.structure import molecule
from gpaw.test import equal
Eini0 = -17.6122060535
Iini0 = 12
esolvers = ['cg', 'rmm-diis', 'dav']
E0 = {'cg': -17.612151335507559,
'rmm-diis': -17.612184220369553,
'dav': -17.612043641621657}
I0 = {'cg': 6, 'rmm-diis': 7, 'dav': 8... | ajylee/gpaw-rtxs | gpaw/test/complex.py | Python | gpl-3.0 | 1,451 | [
"ASE",
"GPAW"
] | 3629e251c73bd68faa39afa610db0bb18c5137e3e49b15829d41c0f921f3709f |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals, division, print_function
import os.path
import collections
from tempfile import mkdtemp
from pymatgen.util.testing import PymatgenTest
from pymatgen.io.abinit import *... | aykol/pymatgen | pymatgen/io/abinit/tests/test_works.py | Python | mit | 1,438 | [
"ABINIT",
"pymatgen"
] | 11852cd5736e45a705749fb96061944c8d719eb9eec0a649125381d5d8d323b1 |
from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
column_repository_name = 'column_maker_0150'
column_repository_description = "Add column"
column_repository_long_description = "Compute an expression on every row"
convert_repository_name = 'convert_chars_0150'
convert_repository_description = "Con... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/test/tool_shed/functional/test_0150_prior_installation_required.py | Python | gpl-3.0 | 6,376 | [
"Galaxy"
] | 411fd8f46c6fe85935f6f38b894aa1438e6a6d3ac9676306759d072826b67e59 |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: random.py
"""Random variable generators.
integers
--------
uniform within range
sequences
---------
pick rand... | DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/random.py | Python | unlicense | 24,604 | [
"Gaussian"
] | 03bacddd568cede47ad51d10c9685b1d4c45994e901117c93b992b5bbf37b76d |
import numpy as np
from cs231n.layers import *
from cs231n.layer_utils import *
class TwoLayerNet(object):
"""
A two-layer fully-connected neural network with ReLU nonlinearity and
softmax loss that uses a modular layer design. We assume an input dimension
of D, a hidden dimension of H, and perform classific... | zauonlok/cs231n | assignment2/cs231n/classifiers/fc_net.py | Python | mit | 16,248 | [
"Gaussian"
] | 20b01637a7787c8d9e54c380320695a0805a6cbdb5d18cc6971a5d5a356bb08f |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-get-site-mask
# Author : Stuart Paterson
########################################################################
__RCSID__ = "$Id$"
from DIRAC.Core.Base import Script
Script.setUsageMessage( """
... | arrabito/DIRAC | Interfaces/scripts/dirac-admin-get-site-mask.py | Python | gpl-3.0 | 769 | [
"DIRAC"
] | 10daff76548959aaa7d09db3ac59f503158e6f3b9518f8d95550255cd8fcab5a |
#! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
size = 100
# ARMA parameters
ARCoefficients = ARMACoefficients(NumericalPoint([0.3]))
MACoefficients = ARMACoefficients(0)
timeGrid = RegularGrid(0.0, 0.1, size)
# White noise ==> gaussian
whi... | sofianehaddad/ot-svn | python/test/t_DickeyFullerTest_std.py | Python | mit | 1,322 | [
"Gaussian"
] | dfa6b2c8ff1016b2e056f6f12da61d02df446ce39afd9674ecb0c080f04b06ef |
"""
The ``sdm`` module contains functions to fit single diode models.
Function names should follow the pattern "fit_" + name of model + "_" +
fitting method.
"""
import numpy as np
import scipy.constants
from scipy import optimize
from scipy.special import lambertw
from scipy.misc import derivative
from pvlib.pvs... | mikofski/pvlib-python | pvlib/ivtools/sdm.py | Python | bsd-3-clause | 50,505 | [
"pysam"
] | c5f999b5980f89291ea94cc25f8c82c94853d34004286496d190fe613d6db1ac |
import os
import optparse
import traceback
from time import time
from glob import glob
import ase.db
import gpaw.mpi
from gpaw import GPAW
op = optparse.OptionParser(
usage='python run.py dir [tes1.py test2.py ...]',
description='Run tests in dir which must contain a file called ' +
'params.py defining ... | robwarm/gpaw-symm | gpaw/test/big/scf/trouble/run.py | Python | gpl-3.0 | 1,542 | [
"ASE",
"GPAW"
] | 24ab3f388b0132977082023458d00b65af00fec773acc7ea9bfc72bab76e7e48 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under the GNU Public ... | alejob/mdanalysis | package/MDAnalysis/lib/distances.py | Python | gpl-2.0 | 28,570 | [
"MDAnalysis"
] | ca3f78c029e7147d99c4da53a217623975b9ffed66399ced01eb3410c2b2047b |
"""
Updated correlation plots
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse,Arrow
import scipy.ndimage as ndimage
###############################################################################
def CorrelationAxes(N,inv=False,labels=None,left=0.07,bottom=0.07,right=0.9... | nealegibson/Infer | src/CorrelationPlots.py | Python | gpl-3.0 | 14,287 | [
"Gaussian"
] | 1c549893df8fdd0464cfe97e543a5a97105392344db6e3c736b50ef0e0279a74 |
# -*- coding: utf-8 -*-
""" Sahana Eden IRS Model
@copyright: 2009-2012 (c) Sahana Software Foundation
@license: MIT
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
... | flavour/ssf | modules/eden/irs.py | Python | mit | 50,782 | [
"VisIt"
] | f2c452dbbb5c53ee96eaba6371bad0db272255dbb0d8d519aaa48b4c31c040cc |
"""\
cgbf.py Perform basic operations over contracted gaussian basis
functions. Uses the functions in pgbf.py.
References:
OHT = K. O-ohata, H. Taketa, S. Huzinaga. J. Phys. Soc. Jap. 21, 2306 (1966).
THO = Taketa, Huzinaga, O-ohata, J. Phys. Soc. Jap. 21,2313 (1966).
This program is part of the PyQuante qua... | Konjkov/pyquante2 | pyquante2/basis/cgbf.py | Python | bsd-3-clause | 2,524 | [
"Gaussian"
] | bfc6b8b7fb4d704d66de00b79b04fae27ca708fcc44d6d6de93a3af5bf3aecb0 |
""" JobMonitoringHandler is the implementation of the JobMonitoring service
in the DISET framework
The following methods are available in the Service interface
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
__RCSID__ = "$Id$"
import six
from ... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/Service/JobMonitoringHandler.py | Python | gpl-3.0 | 22,565 | [
"DIRAC"
] | b34990e1029a3565fd5b3364632b51cc01bca2bbd564c94d1b55e860560aaf67 |
#!/usr/bin/env python
from setuptools import setup
import versioneer
import subprocess
def samtools():
v = subprocess.check_output(['samtools', '--version']).decode().split()[1].split('.')
major = int(v[0])
minor = int(v[1])
if major >= 1 and minor >= 4:
return True
return False
def bed... | ListerLab/TEPID | setup.py | Python | gpl-3.0 | 1,362 | [
"pysam"
] | ad97e247218e8ca84d3165f7df7250138c89aff85a5254ec91cae742cd116391 |
#!/usr/bin/env python
from setuptools import setup, find_packages
import fastimage
setup(
name="fastimage",
version=fastimage.__version__,
description="Finds the size or type of an image given its uri by fetching as little as needed",
author="Brian Muller",
author_email="bamuller@gmail.com",
li... | bmuller/fastimage | setup.py | Python | mit | 483 | [
"Brian"
] | f5d4bfec827986fba5e96dbd1f4e0cd26613949974a59ccb791bf11a7f4e497a |
# Copyright 2012 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia
# This file is part of ngs_crumbs.
# ngs_crumbs 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, ... | JoseBlanca/ngs_crumbs | test/seq/test_seq_filters.py | Python | gpl-3.0 | 28,326 | [
"BLAST"
] | b2c011d8419eec88c599b129b08650eaf72ed22d69a79d64f4bebe00bc5fc713 |
##############################################################################
##############################################################################
# Estimating the volatility of coffee futures
# using a stochastic volatility (SV) model with alpha-stable log-returns.
#
# The SV model is inferred using th... | compops/gpo-abc2015 | scripts-paper/example2-gpoabc.py | Python | mit | 6,141 | [
"Gaussian"
] | d0084801a0842ab054f233e70d336851da4203aff26069570117fd28dc91f5ff |
"""
Spline fit 2D rectangular example
Requires pyGpufit, pyGpuSpline (https://github.com/gpufit/Gpuspline), Numpy and Matplotlib.
"""
import numpy as np
from matplotlib import pyplot as plt
import pygpuspline.gpuspline as gs
import pygpufit.gpufit as gf
import misc
def calculate_psf(x, y, p):
"""
Test PSF c... | gpufit/Gpufit | examples/python/splinefit_2d.py | Python | mit | 7,958 | [
"Gaussian"
] | a3809c19d7164b000c15f5e9e2f76172daee27cec7f49a388858050f9f635bc7 |
# $HeadURL$
__RCSID__ = "$Id$"
import sys
import os
import getopt
import types
import DIRAC
from DIRAC import gLogger
from DIRAC import S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
from DIRAC.ConfigurationSystem.private.Refresher import gRefresher
from DIRAC.Configu... | calancha/DIRAC | ConfigurationSystem/Client/LocalConfiguration.py | Python | gpl-3.0 | 16,584 | [
"DIRAC"
] | 80bc0e732d036f32fc2b147261deebc13315f21cf202e6ff70c96462fef7361e |
#!/usr/bin/env python
"""
Sentry
======
Sentry is a realtime event logging and aggregation platform. It specializes
in monitoring errors and extracting all the information needed to do a proper
post-mortem without any of the hassle of the standard user feedback loop.
Sentry is a Server
------------------
The Sentry ... | pauloschilling/sentry | setup.py | Python | bsd-3-clause | 6,546 | [
"GULP"
] | 02943f6ee84291c90e639e94df3368859d73dcad8fb6fca18d94b7a18d0e09b0 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2014 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the L... | cvandeplas/plaso | plaso/formatters/ganalytics.py | Python | apache-2.0 | 2,209 | [
"VisIt"
] | e3ae8c060cc4fb335d55ebe647d18d27397af5348706a1873f8ad2e80d495758 |
#
# 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... | mguzdial3/MineCode | python-codec/src/rlglue/agent/AgentLoaderScript.py | Python | apache-2.0 | 1,533 | [
"Brian"
] | 096da8a7564133fae9b5b4e61e81272eb9ff6bf8a6ed10c3e5fbbb8b875cddba |
import collections
import logging
import os
import tempfile
import numpy
from svviz.utilities import mean, stddev
from svviz.kde import gaussian_kde
from svviz import plotting
def removeOutliers(data, m = 10.):
""" a method of trimming outliers from a list/array using
outlier-safe methods of calculating the ... | gatoravi/svviz | src/svviz/insertsizes.py | Python | mit | 7,435 | [
"Gaussian"
] | 5a68e12724ab90466c74d672b225457e9a026589d30fac356668af2e6a173ccf |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | odooindia/odoo | addons/project/project.py | Python | agpl-3.0 | 68,656 | [
"VisIt"
] | 7e09c4324d2bf5bcdac005ab135a53a3faddfc75559898e00ad4c1a8f04517a4 |
from equadratures.sampling_methods.sampling_template import Sampling
import numpy as np
from scipy.special import betaln
import bisect
from scipy.optimize import bisect as bisect_root_solve
class Induced(Sampling):
"""
The class defines an Induced sampling object.
:param list parameters: A list of parameter... | psesh/Effective-Quadratures | equadratures/sampling_methods/induced.py | Python | mit | 18,579 | [
"Gaussian"
] | 2e329b6b13ca63104d916631923983b13bc65e92f3db43db45b1bbe9cd8c7515 |
#!/usr/bin/python2.7
# encoding: utf-8
from __future__ import division
import numpy as np
import pandas as pd
import cPickle as pkl
#import netCDF4 as nc
#Quick fix
import scipy.io.netcdf as nc
from scipy.io import savemat
from scipy.io import loadmat
from datetime import datetime, timedelta
import cPickle as pickle... | rsignell-usgs/PySeidon | pyseidon/validationClass/validationClass.py | Python | agpl-3.0 | 18,636 | [
"NetCDF"
] | 9757b64d3c46d2b747f73ef3cd3ec247eafd5e4e09a1e6dc3beb402b883937ee |
from ase import Atoms, Atom
from ase.structure import molecule
from ase.parallel import barrier
from ase.units import Hartree, mol, kcal
from gpaw import GPAW, setup_paths
from gpaw.mixer import Mixer, MixerSum
from gpaw.occupations import FermiDirac
from gpaw.atom.generator import Generator
from gpaw.atom.configuratio... | ajylee/gpaw-rtxs | gpaw/test/AA_exx_enthalpy.py | Python | gpl-3.0 | 7,514 | [
"ASE",
"GPAW"
] | 1ea928e1b4092285276010993949238a2218d4fa4c772fedb4983575cb609d3c |
from func import *
# ATTTENTION! Maybe there are some mistakes in neuron parameters!
# Write to alexey.panzer@gmail.com.
logger = logging.getLogger('neuromodulation')
startbuild = datetime.datetime.now()
nest.ResetKernel()
nest.SetKernelStatus({'overwrite_files': True,
'local_num_threads': numb... | research-team/NEUCOGAR | NEST/cube/dopamine/3d_Hodkin-Huxley_model/scripts/neuromodulation.py | Python | gpl-2.0 | 8,339 | [
"NEURON"
] | e8b4553b494d3fba7433c05957693affdf04a52cecae97a06d20651136136454 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Simple volume rendering example.
reader = vtk.vtkSLCReader()
reader.SetFileName(VTK_DATA_ROOT + "/Data/sphere.slc")
# Create transfer functions for opacity and color
opacityTransfe... | sumedhasingla/VTK | Rendering/Volume/Testing/Python/VolumeOutlineSource.py | Python | bsd-3-clause | 4,619 | [
"VTK"
] | ec0f63ea75d40e9237f2a1bd8b6c69e8b4a883ef3c51a844e65f94bf1045ec1b |
# -*- coding: utf-8 -*-
"""
===============================================================================
InvasionPercolationBasic: Simple IP
===============================================================================
"""
import heapq as hq
import scipy as sp
from OpenPNM.Algorithms import GenericAlgori... | stadelmanma/OpenPNM | OpenPNM/Algorithms/__InvasionPercolation__.py | Python | mit | 7,120 | [
"ParaView"
] | 2e22b35ac8cfa5fce8efeecf03c43f04f3e92987bc7b5e2dfb4df2267730fdcd |
"""This script generates Slicer Interfaces based on the CLI modules XML. CLI
modules are selected from the hardcoded list below and generated code is placed
in the cli_modules.py file (and imported in __init__.py). For this to work
correctly you must have your CLI executabes in $PATH"""
from __future__ import print_fu... | FCP-INDI/nipype | nipype/interfaces/slicer/generate_classes.py | Python | bsd-3-clause | 21,600 | [
"VTK"
] | 6ca11fb29056dc4a609acad1c476a9157490c6c184c64afb7443a384e5206108 |
"""
Improve the basic AST, taken in dictionary form as exported
from the import pydetector module.
"""
import tokenize
from codecs import encode
from copy import deepcopy
from io import BytesIO
from typing import List
from python_driver.base_token import Token, create_tokenized_lines
from python_driver.locationfixer ... | juanjux/python-driver | native/python_package/python_driver/astimprove.py | Python | gpl-3.0 | 9,748 | [
"VisIt"
] | b67875d6203571e216f460b525bd8c1aceaa4c4c2985b9e91dbceef8e94fbc5e |
# 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... | MBoustani/climate | examples/model_ensemble_to_rcmed.py | Python | apache-2.0 | 7,768 | [
"NetCDF"
] | 7dee05bdb007d6aec9dd75c2e137d65e62e34cf52ee64903859107e1d7569a53 |
#!/usr/bin/env python
# Copyright 2013 Velodyne Acoustics, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | frizaro/Veloview | Superbuild/Projects/apple/fixup_bundle.py | Python | apache-2.0 | 9,474 | [
"ParaView"
] | 17970109867efe41051f2cb5c4710445e155db0302658c1ce8a0a3597858595f |
"""
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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.
T... | odicraig/kodi2odi | addons/plugin.video.salts/scrapers/myddl_scraper.py | Python | gpl-3.0 | 7,831 | [
"ADF"
] | 644651677561e24940a18120d875f4533f157cd2155aeda682af5b5c8ffcfb97 |
# -*- coding: utf-8 -*-
"""
functions.py - Miscellaneous functions with no other home
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
"""
from __future__ import division
from .python2_3 import asUnicode
from .Qt import QtGui, QtCore, USE_PYSIDE
Colors = {
'b... | vallsv/pyqtgraph | pyqtgraph/functions.py | Python | mit | 83,314 | [
"Gaussian"
] | c1478e7ceb1928648e4afd0958cf47cd1bc15e031c06eb4a287c96a2387bfa89 |
#
# Samples a 2d Gaussian using Umbrella sampling in the temperature (serial version)
#
# Usage:
# > python gaussian.py
#
import usample.usample
import numpy as np
import emcee
#
# Sample a 2D Gaussian
#
# Define the log probability function:
#
def log_prob_fn(p , means , icov ):
pp = p - means
... | c-matthews/usample | gaussian.py | Python | gpl-3.0 | 1,318 | [
"Gaussian"
] | a3e2c5cb5972096ba8c5ae6f70e271763bcdb5a9de9a1b5a0be79a21e8e6daaf |
"""
A module that implements the ensemble of inverse optimal control models
"""
import cPickle as cp
from collections import defaultdict
import copy
import numpy as np
import matplotlib.pyplot as plt
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn import decomposition
from sklearn.ensemble import R... | navigator8972/ensemble_ioc | ensemble_ioc.py | Python | bsd-2-clause | 37,900 | [
"Gaussian"
] | 16b249699d1e3fd25837f67e90cd28b8494df4000b4a1df8c084418f8370539c |
#!/usr/bin/env python
########################################
#Globale Karte fuer tests
# from Rabea Amther
########################################
# http://gfesuite.noaa.gov/developer/netCDFPythonInterface.html
import math
import numpy as np
import pylab as pl
import Scientific.IO.NetCDF as IO
import matplotlib as... | CopyChat/Plotting | Python/climate_change/global_changes_pr_rcp85.py | Python | gpl-3.0 | 7,782 | [
"NetCDF"
] | 9bdf0d9c73756ce46ac50260d7e5cb07972be5ccb11e86eb567996cdb73727bf |
# Zulip's OpenAPI-based API documentation system is documented at
# https://zulip.readthedocs.io/en/latest/documentation/api.html
#
# This file defines the Python code examples that appears in Zulip's
# REST API documentation, and also contains a system for running the
# example code as part of the `tools/test-api` t... | punchagan/zulip | zerver/openapi/python_examples.py | Python | apache-2.0 | 48,728 | [
"Octopus"
] | 64243e1e697baa432ad5256462f9a55a197ab43b0ac8a817f1a3f3be43e80e33 |
# Copyright (c) Amber Brown, 2015
# See LICENSE for details.
"""
Responsible for writing the built news fragments to a news file without
affecting existing content.
"""
from __future__ import absolute_import, division
import io
import os
def append_to_newsfile(
directory, filename, start_string, top_line, cont... | hawkowl/towncrier | src/towncrier/_writer.py | Python | mit | 1,342 | [
"Amber"
] | b6b9e6a956f66975810ab447cf2c4e57faec558f38140db11e64698c29f34ec3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.