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 |
|---|---|---|---|---|---|---|---|
"""All internal ansible-lint rules."""
import copy
import glob
import importlib.util
import logging
import os
import re
from argparse import Namespace
from collections import defaultdict
from functools import lru_cache
from importlib.abc import Loader
from typing import Any, Dict, Iterator, List, Optional, Set, Union
... | ansible/ansible-lint | src/ansiblelint/rules/__init__.py | Python | mit | 10,811 | [
"Galaxy"
] | c58036c78b682fb3cf9b6d64b2b9e77edb901b41b6f780f370beb76628289c44 |
#!/usr/bin/env python
"""
Loads a json molecule and draws atoms in Blender.
Blender scripts are weird. Either run this inside of Blender or in a shell with
blender foo.blend -P molecule_to_blender.py
The script expects an input file named "molecule.json" and should be in the
same directory as "atoms.json"
Writte... | getarun/blender-chemicals | structures/one-leg-nitro-porphine-to-blender.py | Python | mit | 7,918 | [
"Jmol"
] | 41fc4a7e9211c2247a8cd8ef7200798fe519ee0fc4bed4c23740d1a2c47bed06 |
# Copyright 2017 Google 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 to in writing,... | google/active-learning | sampling_methods/graph_density.py | Python | apache-2.0 | 3,651 | [
"Gaussian"
] | 2d08cafc97de7a47d216892f454ad3d5614db1b07cfdf422808be1189ae4af83 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-production-job-get-input
# Author : Stuart Paterson
########################################################################
"""
Retrieve input sandbox for DIRAC Job
"""
__RCSID__ = "$Id$"
imp... | andresailer/DIRAC | Interfaces/scripts/dirac-wms-job-get-input.py | Python | gpl-3.0 | 1,540 | [
"DIRAC"
] | 7f5befabc75d1903b886f190461e848255d8b4dd0cf8ef24c627770cfbac34a8 |
#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove ... | gratefulfrog/lib | python/chempy/charge.py | Python | gpl-2.0 | 4,225 | [
"PyMOL"
] | d355345f93d70b535ec3a5a076af3286f896f710993b354cbb4fad59e2045346 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_dlpoly.py | Python | gpl-2.0 | 7,274 | [
"DL_POLY",
"MDAnalysis"
] | 44ecb8f56111044a9ee9a43db4aeddb3bb7b9c473bf8300effa609b8f3728e6e |
"""
This file is part of RAPD
Copyright (C) 2009-2018, Cornell University
All rights reserved.
RAPD is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3.
RAPD is distributed in the hope that it will... | RAPD/RAPD | src/sites/necat_c.py | Python | agpl-3.0 | 82,985 | [
"CRYSTAL",
"Gaussian"
] | ecd7e0ce7ade7909d7bc6ee37f402c93dc9d667b012f607fd53a314ce2c67dc4 |
import numpy as np
from skimage import img_as_float
import scipy
import scipy.linalg
from scipy.interpolate import RectBivariateSpline, interp2d
from skimage.filters import sobel
def active_contour(image, snake, alpha=0.01, beta=0.1,
w_line=0, w_edge=1, gamma=0.01,
bc='... | paalge/scikit-image | skimage/segmentation/active_contour_model.py | Python | bsd-3-clause | 8,183 | [
"Gaussian"
] | 776ae09e3afd8789117473bcf20b2b735dbb3726f760f098101551d57b07d7eb |
import json
import pandas as pd
import requests
from py2cytoscape.data.network_view import CyNetworkView
from ..util import util_networkx as nx_util
from ..util import dataframe as df_util
from . import BASE_URL, HEADERS
BASE_URL_NETWORK = BASE_URL + 'networks'
# JSON = 'json'
class CyNetwork(object):
def __... | scholer/py2cytoscape | py2cytoscape/data/cynetwork.py | Python | mit | 11,379 | [
"Cytoscape"
] | dc57df2f1d05044633c211e1eeb52e370072e2981b0cdfc8289d01d81d652538 |
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be usefu... | dbbhattacharya/kitsune | vendor/packages/logilab-astng/_exceptions.py | Python | bsd-3-clause | 2,586 | [
"VisIt"
] | e73c0f08b6266ebeb8556ff1289879381f40fe0546494333c0b8f04c3e6ff8a5 |
""" **test_abstract_phasechange_simulation.py** tests **phaseflow/abstract_phasechange_simulation.py**,
Phaseflow's module for the natural and compositional convection of binary alloys."""
import phaseflow
import fenics
class LidDrivenCavityBenchmarkSimulation(phaseflow.abstract_phasechange_simulation.AbstractPha... | geo-fluid-dynamics/phaseflow-fenics | tests/test_abstract_phasechange_simulation.py | Python | mit | 5,902 | [
"ParaView"
] | 6cd2614e0e045b4e2834fba850aedd02807cb03d9696dd18eda18b7f3b38c83c |
"""Tests of PhonopyYaml."""
import os
from io import StringIO
import numpy as np
import yaml
from phonopy import Phonopy
from phonopy.interface.phonopy_yaml import PhonopyYaml
from phonopy.interface.vasp import read_vasp
from phonopy.structure.dataset import get_displacements_and_forces
data_dir = os.path.dirname(os... | atztogo/phonopy | test/interface/test_phonopy_yaml.py | Python | bsd-3-clause | 3,735 | [
"VASP",
"phonopy"
] | f9f06f91286e7e6a39e0cad78e838ec096079c4a2042b3de95873cb1d1fa9598 |
'''
@file : testFile5.py
@author (A) : Madhu Kumar Dadi.
@project : Social List
@function :
numbercount(postags) : checks for the presence of numbers(eg. five, 5) in the hashtag
@postags : a list containing pos tags for a hashtag
return : 1 if it contains number(s) else 0
@function :
prepositioncount(postags... | SummerProject16/project | CMUTweetTagger/testFile5.py | Python | cc0-1.0 | 1,676 | [
"VisIt"
] | 1f2db8090c5d399fab16e623160ec8644f3726de98e1d9f15dd94235c75fc12c |
#!/usr/bin/env python
'''
Taken from : https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_transforms/py_fourier_transform/py_fourier_transform.html
'''
import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt
# simple averaging filter without scaling parameter
mean_fil... | miguelinux/ejemplos-opencv | python/fourier-filters.py | Python | bsd-3-clause | 1,408 | [
"Gaussian"
] | 31276018bbc9aec45459795eb59dae43c80c6d2b977fbcc381b1892a17f7766d |
import errno
import glob
import sys
import os
import pysam
from . utils import *
__all__ = ["Samfile"]
class Samfile(object):
def __init__(self, basename, reffn=None):
self._cache = {}
basename_parts = basename.split('.')
if basename_parts[-1].lower() in ("sam", "bam"):
basen... | vishnubob/bones | bones/samfile.py | Python | mit | 3,936 | [
"pysam"
] | ca4109e7850972b6e8e21512ee39624f223711b73a3661a2fb7fb915e5aa31c9 |
import os
import numpy as np
import torch
import torchvision.transforms as trn
import torchvision.transforms.functional as trn_F
import cv2
from PIL import Image as PILImage
import skimage.color as skcolor
from skimage.util import random_noise
from wand.image import Image as WandImage
from wand.api import library as wa... | hendrycks/robustness | ImageNet-P/create_p/make_imagenet_64_p.py | Python | apache-2.0 | 22,902 | [
"Gaussian"
] | 07ffe00a7211d568ff9c94938bb619eb75200143a51a8abf1489f80f21c289d7 |
"""
This module contains a collection functions for calculating continuous variable
quantities from fock-basis representation of the state of multi-mode fields.
"""
__all__ = ['correlation_matrix', 'covariance_matrix',
'correlation_matrix_field', 'correlation_matrix_quadrature',
'wigner_covarianc... | cgranade/qutip | qutip/continuous_variables.py | Python | bsd-3-clause | 8,375 | [
"Gaussian"
] | 29fb520761af710ce6bb6c956da6b0d2c5ca933c02c2ad12ef327a6372e4df19 |
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems 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.o... | chetan51/neon | neon/initializers/__init__.py | Python | apache-2.0 | 871 | [
"Gaussian"
] | 9f2cf5efeeb42651cf3ac404c4e290b751eb303d99da511caa3028b91690b682 |
"""
The B{0install config} 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 os
from zeroinstall import SafeException, _
from zeroinstall.injector import model
from zeroinstall.cmd import Usa... | timdiels/0install | zeroinstall/cmd/config.py | Python | lgpl-2.1 | 2,446 | [
"VisIt"
] | 376c58daaeae41b7f520b8d2d0385d424827aa12aa8d7f2e79a82176986cb31e |
# Installation source spoke classes
#
# Copyright (C) 2011, 2012 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program ... | sujithshankar/anaconda | pyanaconda/ui/gui/spokes/source.py | Python | gpl-2.0 | 68,878 | [
"VisIt"
] | 5a8546566cfb6805f17b85f574c5c4b635da1464409bea0c864e4da820460aad |
#!/usr/bin/python
'''
The MIT License (MIT)
(c) Juergen Simon 2014 (juergen.simon@uni-bonn.de)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation t... | meteo-ubonn/meanie3D | python/meanie3D/resources/clusters_visit.py | Python | mit | 2,455 | [
"VTK",
"VisIt"
] | fcba1b1290316b9ce22e0123eb04009265bdd30bf5b6b455959618759a36401f |
from asap3 import *
from ase.lattice.cubic import FaceCenteredCubic
from asap3.testtools import ReportTest
from asap3.md.velocitydistribution import MaxwellBoltzmannDistribution
from asap3 import mpi
from ase.data import reference_states
import numpy as np
import time
import sys
debug = 0
if debug == 1:
DebugOutpu... | auag92/n2dm | Asap-3.8.4/Test/Timing/OpenKIM_MemLeak.py | Python | mit | 3,339 | [
"ASE"
] | 6ca800c4f65f193d4d87cef333636ad158999497f4fe14971c964d307b364a61 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# 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... | googleapis/python-pubsublite | tests/unit/gapic/pubsublite_v1/test_topic_stats_service.py | Python | apache-2.0 | 64,227 | [
"Octopus"
] | 5894b671b89da808dd934fd6bf43558214540014acb29ab878607e99b1a1eb26 |
"""Multivariate Gaussian density."""
from .normal_gamma import NormalGamma
class GaussianDiagCovStats(object):
"""Sufficient statistics for :class:BayesianGaussianDiagCov`.
Methods
-------
__getitem__(key)
Index operator.
__add__(stats)
Addition operator.
__iadd__(stats)
... | OliverWalter/amdtk | amdtk/models/multivariate_gaussian.py | Python | bsd-2-clause | 3,469 | [
"Gaussian"
] | a6170c3ab2d60a842f65887091e0ce28a0e36f0498d20758d8b5fecb9107dea3 |
#This program will output DAB and Hematoxylin blob counts
#Hematoxylin (Basic blue)= binds to nuclei
#CD3 (T cells) are DAB
import numpy as np
from numpy import linalg
from math import sqrt
import matplotlib.pyplot as plt
from skimage import data
from skimage.color import separate_stains, rgb2grey
from skimage.ex... | griffincalme/MicroDeconvolution | ScriptsUsedInPaper/BlobCounterDABHemaPaper.py | Python | apache-2.0 | 3,143 | [
"Gaussian"
] | 958aef0078413fd9f97d63b5bf96860333d40ccd0b05f95826dd463d0576bd7f |
"""
Sample VTK grid model
"""
import vtk
from atom.api import Atom, Dict, Value, Int
from renderers import VTKRenderController
from enaml.application import deferred_call
from constants import VTK_DATA_ROOT
class RenderViewController(VTKRenderController):
""" render view controller
"""
slice_factor = I... | viz4biz/PyDataNYC2015 | tutorial/sample_grid_model.py | Python | apache-2.0 | 4,137 | [
"VTK"
] | 7931992b6c8b9c1809c9b7806f3f014b0ae71d8ff3a4a7cc688de2f9cc6ffce4 |
import logging
import os
import shutil
from galaxy import util
from galaxy.model.orm import and_
from galaxy.web.form_builder import SelectField
from tool_shed.util import hg_util
from tool_shed.util import xml_util
log = logging.getLogger( __name__ )
def build_tool_dependencies_select_field( app, tool_shed_reposit... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/tool_shed/util/tool_dependency_util.py | Python | gpl-3.0 | 25,596 | [
"Galaxy"
] | 88634ef6ee2538eefb2999ee36eb5761091364c96b71d9be3bb7d9db01c7e776 |
"""Collection of bulk systems.
From here::
http://molmod.ugent.be/DeltaCodesDFT
Data extracted to csv file with
* Wien2K ref:
pdftotext -layout -f 13 -l 14 SupplMat.pdf - | sed -n '/text file/,$p' \
| grep -E -v "text" | sed '/^$/d' | tr '\f' ' ' \
| sed 's/,WIEN2k//g' | sed 's/V0/formula,V... | conwayje/ase-python | ase/test/tasks/dcdft.py | Python | gpl-2.0 | 44,382 | [
"ASE",
"WIEN2k"
] | 39a51721961435daf9f7b0fbdc9c563a7687017110e7670820152922dd3a8eee |
import csv
from django.contrib.auth.models import User
from rvu.models import BillingCode, PatientVisit, Provider
import dateutil.parser
r = csv.reader(file("/tmp/rvu_codes.csv"))
for nr_rvus, code_name in r:
print code_name, nr_rvus
bc = BillingCode(code_name=code_name, nr_rvus=nr_rvus)
bc.save()
r = ... | craighagan/rvumanager | rvusite/initial_data/import_codes.py | Python | apache-2.0 | 830 | [
"VisIt"
] | 55f43670861772fe2af01591bd05d24aa35d7c3d03825071eb80c5a17006fe2f |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# freeseer - vga/presentation capture software
#
# Copyright (C) 2011, 2013 Free and Open Source Software Learning Centre
# http://fosslc.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | Freeseer/freeseer | src/freeseer/framework/database.py | Python | gpl-3.0 | 29,096 | [
"VisIt"
] | 6242c0eb350c6a90061f1399aec9c98b37e66096fdb5b9f4a99728af0d59a33e |
from hashlib import sha1
from dominate import tags
from visitor import Visitor
from flask_nav.elements import *
class BootstrapView(View):
def __init__(self, text, icon, endpoint, **kwargs):
self.icon = icon
self.text = text
self.endpoint = endpoint
self.url_for_kwargs = kwargs
cla... | t4skforce/PenTestingUnit | src/app/lib/bootstraprenderer.py | Python | mit | 2,894 | [
"VisIt"
] | 45f712a4923908dc7eb0fc6521a29798438c28039cc9ba648c7a6aee993f652f |
# Copyright 2014 Google Inc. 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 applicable law or ag... | flgiordano/netcash | +/google-cloud-sdk/lib/surface/docker.py | Python | bsd-3-clause | 5,054 | [
"VisIt"
] | a07c8ee6bbac63ae9abe68133638727b431eb787316fa8c2a2ad097fc51395b1 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Bayesian Gaussian Mixture Model Classes:
contains the basic fields and methods of Bayesian GMMs
the high level functions are/should be binded in C
The base class BGMM relies on an implementation that p... | alexis-roche/nipy | nipy/algorithms/clustering/bgmm.py | Python | bsd-3-clause | 36,777 | [
"Gaussian"
] | dde32be520603cd6419dd9a751725160d68b9b934adba0246176931e75c0ff2f |
# ******************************************************************************
# Copyright 2014-2018 Intel Corporation
#
# 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.apa... | NervanaSystems/neon | neon/initializers/__init__.py | Python | apache-2.0 | 1,230 | [
"Gaussian"
] | 6c2fb73c10963ad836ae33f640f764cc2420905c7417ce69b2289cc01f3ae031 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
compliance_checker/cfutil.py
'''
from cf_units import Unit
from pkg_resources import resource_filename
from collections import defaultdict
import csv
import json
import re
# For python2/python3 support
try:
basestring
except NameError:
basestring = str
_UNITL... | petejan/compliance-checker | compliance_checker/cfutil.py | Python | apache-2.0 | 47,810 | [
"NetCDF"
] | 383666517c6ce4ad35b5360e927e8fbe40a4c9bbbb41a8dde8d61ec021701ca6 |
__author__ = "waroquiers"
import numpy as np
from pymatgen.analysis.chemenv.connectivity.environment_nodes import EnvironmentNode
from pymatgen.analysis.chemenv.utils.graph_utils import (
MultiGraphCycle,
SimpleGraphCycle,
get_delta,
)
from pymatgen.util.testing import PymatgenTest
class FakeNode:
d... | materialsproject/pymatgen | pymatgen/analysis/chemenv/utils/tests/test_graph_utils.py | Python | mit | 29,158 | [
"pymatgen"
] | c0c3bd4204b8cc8f63f3236e3c013b02a33946448a54873420dd48edad0c7144 |
#!/usr/bin/env python3
"""{PIPELINE_NAME} pipeline (version: {PIPELINE_VERSION}): creates
pipeline-specific config files to given output directory and runs the
pipeline (unless otherwise requested).
"""
# generic usage {PIPELINE_NAME} and {PIPELINE_VERSION} replaced while
# printing usage
#--- standard library imports... | gis-rpd/pipelines | somatic/mutect/mutect.py | Python | mit | 8,727 | [
"BWA"
] | 34f7757feb82487ea7f95425362d83f5a7de25eb6cfd96c251d610911a79617c |
#
# Copyright (C) 2012 - Marcus Dillavou
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope ... | line72/subte | libsubte/Database.py | Python | gpl-3.0 | 47,305 | [
"VisIt"
] | 8453a63a063c6602c2cbb993735af893dfe39d230963f3c76cbb9a7c1192d60a |
#!/home/OSUMC.EDU/blac96/source/venv/test_mucor_pip/bin/python
#-*- coding: utf8
# Copyright 2013-2015 James S Blachly, MD and The Ohio State University
#
# This file is part of Mucor.
#
# Mucor is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | blachlylab/mucor | build/scripts-2.7/mucor_config.py | Python | gpl-3.0 | 25,897 | [
"HTSeq"
] | 01bc8610b3e83ac2b5920ed5885345d4d182999e6977f1cc7a3099b1620eb2b9 |
import numpy as np
from ase.lattice.surface import fcc111
from gpaw.mpi import world
from gpaw import GPAW, PoissonSolver
from gpaw.utilities import compiled_with_sl
# This test verifies that energy and forces are (approximately)
# parallelization independent
#
# Tests the LCAO energy and forces in non-orthogonal cel... | robwarm/gpaw-symm | gpaw/test/parallel/lcao_complicated.py | Python | gpl-3.0 | 3,230 | [
"ASE",
"GPAW"
] | d6d0595effaf162c6c8816a39b3ec32ba3eb80f08d3a47791753c6979136f400 |
"""
test_RateTransmission.py
This file is part of ANNarchy.
Copyright (C) 2013-2016 Joseph Gussev <joseph.gussev@s2012.tu-chemnitz.de>,
Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com>
Copyright (C) 2016-2019 Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com>
This program is free software... | vitay/ANNarchy | tests/Unittests/test_RateTransmission.py | Python | gpl-2.0 | 16,365 | [
"NEURON"
] | 60f7ff4bd52933ddfe3f58476466a72a3c24c718e4c616241abc2326c22a051e |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Clinic', fields ['code']
db.create_unique(... | myvoice-nigeria/myvoice | myvoice/clinics/migrations/0011_auto__add_unique_clinic_code.py | Python | bsd-2-clause | 11,976 | [
"VisIt"
] | a43758273fc60968e60ab0db668eb8f5332b389889906636c9408327667f3275 |
# This file is part of the xxdiff package. See xxdiff for license and details.
#
# Note: this has originally been distributed by Michalis Giannakidis, under the
# name cvsxxdiff.py. This script was integrated in april 2006 in the xxdiff
# scripts.
"""xx-cvs-revcmp [<options>] [FILE ...]
Display file differences wit... | hackhowtofaq/xxdiff | lib/python/xxdiff/scripts/cvsrevcmp.py | Python | gpl-2.0 | 14,963 | [
"VisIt"
] | 4298d4e69cb9827b77f3f28f3f1618642cb29480b24aea40b35de1db4035fb44 |
"""
Support for constructing and viewing custom "track" browsers within Galaxy.
Track browsers are currently transient -- nothing is stored to the database
when a browser is created. Building a browser consists of selecting a set
of datasets associated with the same dbkey to display. Once selected, jobs
are started to... | volpino/Yeps-EURAC | lib/galaxy/web/controllers/tracks.py | Python | mit | 11,134 | [
"Galaxy"
] | a36a9e82c06fe845a6c2af16a56018ca55e2a33be0a48f06ed7286b1b9d2563c |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
... | nuclear-wizard/moose | python/chigger/tests/colorbar/colorbar_bottom.py | Python | lgpl-2.1 | 711 | [
"MOOSE"
] | 1fddfb7c872480340403441aa3460c5d953af9e607f68bc75bf2904bcbf052aa |
########################################################################
# File : HttpStorageAccessHandler.py
# Author : A.T.
########################################################################
""" The HttpStorageAccessHandler is a http server request handler to provide a secure http
access to the DIRAC... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/private/HttpStorageAccessHandler.py | Python | gpl-3.0 | 2,642 | [
"DIRAC"
] | 76dcd2f5feb98bdc3ba8b9ff20dfc1593026bca9399490622589fae376505e68 |
from __future__ import unicode_literals
from django.db import IntegrityError, connection, models, transaction
from django.test import TestCase
from .models import (
Bar, Director, Favorites, HiddenPointer, ManualPrimaryKey, MultiModel,
Place, RelatedModel, Restaurant, School, Target, UndergroundBar, Waiter,
)... | gannetson/django | tests/one_to_one/tests.py | Python | bsd-3-clause | 19,571 | [
"Brian"
] | 0f2af1f00f40751f34f8149b68eeada629e35a231a3dc1f7d75ff940cdd527b6 |
#!/usr/bin/env python
'''Explorer HAT Introduction'''
import atexit
import colorama
import sys
import time
explorerhat = None
DEFAULT_PAUSE = 0.5
DEFAULT_DELAY = 0.02
name = ''
def exit_handler():
print(colorama.Fore.RESET + colorama.Back.RESET)
atexit.register(exit_handler)
try:
from msvcrt import g... | dwighthubbard/explorer-hat | tutorial/welcome.py | Python | mit | 5,108 | [
"exciting"
] | fd0339e6dc8a182d56939150547af1e3bb83afa5eb8ec2e2eb3671bffe7176e8 |
# -*- coding: utf-8 -*-
'''
Package manager recycler, aero
For support please visit Aeronautics on github.
Project page: https://github.com/Aeronautics/aero
'''
import sys
from distutils import version
from collections import namedtuple
v = namedtuple('version_info', 'major minor micro releaselevel serial')
enc = ('u... | Aeronautics/aero | aero/__version__.py | Python | bsd-3-clause | 1,602 | [
"VisIt"
] | 8a7dc2b5acac76b4c6098be97eb100c558eb03bdb12fa896828a0ab2711695a4 |
#!/usr/bin/env python
"""
Calculate elastic constants C_ij by least square fitting
using Green-Lagrange deformation tensors, which is the same
scheme as materialsproject.org does.
PREPARE mode creates directories and POSCAR files to be computed.
ANALYZE mode reads the stress values obtained by some code.
Usage:
e... | ryokbys/nap | nappy/elasticity.py | Python | mit | 13,012 | [
"ASE",
"CRYSTAL",
"VASP"
] | f56041b428c1ad7bcd6cde498dc8b39cafa7d01ce884accc15752e060346662a |
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from octopus.core import app, initialise
from service.database import db, FA_API_TABLES
from service.lib import Sync, CompareAPI2Models, util
initialise()
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command(... | CottageLabs/finance | service/manage.py | Python | apache-2.0 | 5,439 | [
"Octopus"
] | 7d092a8ce31f98884b2924b0187a24c5783c220ebb58ae85de63a19842b1dc9e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import re
import logging
import os
import numpy as np
import math
from monty.io import zopen
from monty.json import jsanitize
from monty.json import MSONable
from pymatgen.core import Molecule
from .utils imp... | nisse3000/pymatgen | pymatgen/io/qchem_io/outputs.py | Python | mit | 24,523 | [
"Q-Chem",
"pymatgen"
] | 5809edbc3b7e959b9d44167fb994fc864ed57b53cdb6857ccd3c0161f318e03f |
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
... | ianfelzer1/ifelzer-advprog | Last Year/python files /arth.py | Python | gpl-3.0 | 1,114 | [
"VisIt"
] | b43440e5c6d6c2dc4700f44d0ace8d67b574320f98e8830ee13f58119a1ed1fe |
# vim: expandtab ts=4 sw=4 sts=4 fileencoding=utf-8:
#
# Copyright (C) 2007-2010 GNS3 Development Team (http://www.gns3.net/team).
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
#... | dlintott/gns3-ppa | src/GNS3/Workspace.py | Python | gpl-2.0 | 88,727 | [
"VisIt"
] | fb264bceed669eeeb4ed2a3e3f82fca0a8a41827dbde529c6828fd8228d05ad9 |
# -*- coding: utf-8 -*-
import datetime
import json
import os
import shutil
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.core.urlresolvers import reverse
import mock
from nose.tools import eq_, ok_
from pyquery import PyQuery as pq
import mkt
from mkt.... | Hitechverma/zamboni | mkt/submit/tests/test_views.py | Python | bsd-3-clause | 39,208 | [
"exciting"
] | f8c7fd5ec6a19f08f830b9b2f48b8d062c466ff482dbc39fc5967427a9e821d6 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import semver
import sys
from .lib.common impor... | F5Networks/f5-ansible | tasks/collection.py | Python | gpl-3.0 | 4,761 | [
"Galaxy"
] | 226fea8ab11bb2bdb471d4622a8d0e878f1176e4a74dd0d00419d39c22d6f540 |
#
# ImageViewTk.py -- classes for the display of FITS files in Tk surfaces
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import numpy
import PIL.Image as PILimage
i... | bsipocz/ginga | ginga/tkw/ImageViewTk.py | Python | bsd-3-clause | 12,440 | [
"FLEUR"
] | ee242991a3e16a0fee9938c5613705d455883b85420661267b87871b6d46b406 |
from ase.tasks.main import run
atoms, task = run('abinit bulk Al -x fcc -a 4.04 --k-point-density=3.0 ' +
'-p xc=PBE,ecut=340,toldfe=1e-5,chksymbreak=0')
atoms, task = run('abinit bulk Al -s')
| conwayje/ase-python | ase/test/abinit/abinit_cmdline.py | Python | gpl-2.0 | 212 | [
"ABINIT",
"ASE"
] | 5e3b267231b6dbb792b76af9c7c64935045aabbbd4dd93de215a0174eb1067de |
##############################################################################
# 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... | EmreAtes/spack | var/spack/repos/builtin/packages/mirdeep/package.py | Python | lgpl-2.1 | 2,976 | [
"Bowtie"
] | cefbc3aa4a00bb069edb2b744ed60715581599a05e6a47db62deb4d930c13668 |
# -*- coding: utf-8 -*-
#
# helpers.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
# (... | tobikausk/nest-simulator | pynest/examples/Potjans_2014/helpers.py | Python | gpl-2.0 | 14,611 | [
"NEURON"
] | 974bd95b15ce7075916873403c4367ec7f673cd32fb29534061a246c56beac53 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# Convolve MTSS rotamers with MD trajectory.
# Copyright (c) 2011-2017 Philip Fowler and AUTHORS
# Published under the GNU Public Licence, version 2 (or higher)
#
# Includ... | MDAnalysis/RotamerConvolveMD | rotcon/library.py | Python | gpl-2.0 | 5,002 | [
"MDAnalysis"
] | 883dd63ed9ace68fd6218c232a20a62116740e663580c1062f69c7a28cd1743f |
#! /usr/bin/python3
# This script is used to install propietary CLI RAID tools in ESOS. With no
# arguments given, the script will attempt to read a JSON file hosted by the
# ESOS project and display a list of RAID tools and a download location for
# each. The user is instructed to download the packages needed, then c... | astersmith/esos | scripts/raid_tools.py | Python | gpl-3.0 | 4,463 | [
"VisIt"
] | ca81b5e4359750cc2147a362d5d300a9f8fea35aa6b7c69c421c4c01174c1892 |
from setuptools import setup, find_packages
from Cython.Build import cythonize
import numpy as np
# ---- C/C++ EXTENSIONS ---- #
cython_modules = ["menpo/geodesics/kirsanov.pyx",
"menpo/shape/mesh/cpptrimesh.pyx",
"menpo/shape/mesh/normals.pyx",
"menpo/interpolati... | jabooth/menpo-archive | setup.py | Python | bsd-3-clause | 1,816 | [
"Mayavi"
] | d7f46e4be74efd6a80b0b83fea14caab0fb8facfbecb4eb4641e545046658965 |
##############################################################################
# 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... | EmreAtes/spack | var/spack/repos/builtin/packages/gapfiller/package.py | Python | lgpl-2.1 | 2,227 | [
"BWA",
"Bowtie"
] | 93d1a9d9de3b9d7009618c3de3fdf6277986ba752569a63e376a06fd9acc3112 |
import ambgmin_ as GMIN
import pygmin.potentials.gminpotential as gminpot
from pygmin.optimize import fire
import numpy as np
from copy import copy
from pygmin.potentials.potential import potential as BasePotential
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
import simtk.ope... | js850/PyGMIN | examples/amber/compare_with_ambgmin/OpenmmAmbPot.py | Python | gpl-3.0 | 5,221 | [
"Amber",
"OpenMM"
] | f858443b4533f08540801c8f42eca857a15f84074875a911ee881f2033c0810e |
# $Id$
#
# Copyright (C) 2003 Rational Discovery LLC
# All Rights Reserved
#
import sys,os.path
from rdkit import RDConfig
from rdkit.VLib.Supply import SupplyNode
from rdkit import Chem
from rdkit import six
class SmilesSupplyNode(SupplyNode):
""" Smiles supplier
Sample Usage:
>>> fileN = os.path.join... | adalke/rdkit | rdkit/VLib/NodeLib/SmilesSupply.py | Python | bsd-3-clause | 1,861 | [
"RDKit"
] | b33902bb1154d03891a35914273caae8a0d6b60d9a713b14abb4f00b58c6505c |
# This Python module is part of the PyRate software package.
#
# Copyright 2022 Geoscience Australia
#
# 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/... | GeoscienceAustralia/PyRate | pyrate/core/aps.py | Python | apache-2.0 | 16,528 | [
"Gaussian"
] | 5d2ab25dd63e7f707eb259ecf1d0d72c1166bd51f376d46fbac0fdfa44fb6c6d |
#!/usr/bin/python
# No www. because the Paste2 creator apparently dislikes the subdomain?
PASTE_URL = 'http://paste2.org/new-paste'
def paste(f, lang='text', description='', **kwargs):
"""The magic of the program that connects to the Paste2 servers and
uploads the supplied information, printing to stdout the ... | michaelschade/paste2upload | paste2.py | Python | mit | 5,007 | [
"VisIt"
] | 0ff012cbdc1dce0d954928a5475054fc5050267aabf743783b0fbba7ae350f38 |
## Kernel Smoothing estimates of mean and covariance ##
# Note that it is assumed data is temporally arranged.
#import pandas
import math
import numpy
import multiprocessing
from operator import add, sub
from itertools import repeat
def choose_h(data, rad_list, samples=None, parallel=0):
"""function to choose be... | piomonti/pySINGLE | pySINGLE/choose_h.py | Python | mit | 5,995 | [
"Gaussian"
] | cedcaf78a412d6651bc01eded283be1dfbf3556abd33719e9373fd325203a07c |
import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, json_output
@click.command('delete_history')
@click.argument("history_id", type=str)
@click.option(
"--purge",
help="if ``True``, also purge (permanently delete) the history",
is_flag=True
)
@pass_... | galaxy-iuc/parsec | parsec/commands/histories/delete_history.py | Python | apache-2.0 | 975 | [
"Galaxy"
] | 478f6df4ec97a2e83a768bedd3fbc7e4102364b8dfbda024ab07a2d71f98cf3d |
""" MonitoringHistoryCorrector is the implementation class of the BaseHistoryCorrector
which gets resources consumption history data from the ElasticSearch Monitoring
database
"""
import datetime
from DIRAC import gLogger, S_OK
from DIRAC.WorkloadManagementSystem.private.correctors.BaseHistoryCorrector import ... | DIRACGrid/DIRAC | src/DIRAC/WorkloadManagementSystem/private/correctors/MonitoringHistoryCorrector.py | Python | gpl-3.0 | 1,646 | [
"DIRAC"
] | 8ebba348bb5077417e75ad98d5f5de06a62fb0bf12fe5800eae3b347ceb8182e |
#!/usr/bin/env python2.3
#
# SchoolTool - common information systems platform for school administration
# Copyright (c) 2003 Shuttleworth Foundation
#
# 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 Foundat... | ioram7/keystone-federado-pgid2013 | build/lxml/test.py | Python | apache-2.0 | 21,628 | [
"VisIt"
] | 3dcd393df5381ab226e27a7c89a2465e46428f72e85316c8495cd96351210837 |
"""Kraken - traverser module.
Classes:
Traverser - Base Traverser.
"""
from kraken.core.objects.scene_item import SceneItem
from kraken.core.objects.object_3d import Object3D
from kraken.core.objects.components.component import Component
from kraken.core.objects.attributes.attribute import Attribute
from kraken.core... | oculusstorystudio/kraken | Python/kraken/core/traverser.py | Python | bsd-3-clause | 9,807 | [
"VisIt"
] | aecf4c656f9826ccba3c8e2a2c66955d2b9a4303bdd20df7f5e02fbd145e37b5 |
"""
KeepNote
Editor widget in main window
"""
#
# KeepNote
# Copyright (c) 2008-2009 Matt Rasmussen
# Author: Matt Rasmussen <rasmus@mit.edu>
#
# 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... | gemagomez/keepnote | keepnote/gui/editor_richtext.py | Python | gpl-2.0 | 52,407 | [
"VisIt"
] | 1d14ef7a2c1dd8c4b53577e311b70cd8e8bd5fef8b0051a9bced93ef2b83f239 |
#
# Copyright 2018 Red Hat | Ansible
#
# 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 version.
#
# ... | shepdelacreme/ansible | lib/ansible/plugins/lookup/k8s.py | Python | gpl-3.0 | 11,161 | [
"Galaxy",
"VisIt"
] | 04863bc95a6411c757769fd3fafe106c0f0ebb0407679ef198bc91c770bd5fdc |
#
# Copyright 2009-2017 Red Hat, Inc.
#
# 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.
#
# This program is distributed ... | nirs/vdsm | lib/vdsm/storage/misc.py | Python | gpl-2.0 | 16,014 | [
"VisIt"
] | 01c91fe22c716ec5a7bdd2b67a4e3ca601f128d48e516087c2c4c8780710534f |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS.
"""
from contextlib import contextmanager
import json
from datetime import datetime, timedelta
import ddt
from nose.plugins.attrib import attr
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from ..helpers import UniqueCourseTest,... | jjmiranda/edx-platform | common/test/acceptance/tests/lms/test_lms_courseware.py | Python | agpl-3.0 | 46,341 | [
"VisIt"
] | 61dbe08d054a0a5d646642aa12a23c490733b251fc361b0d3168fa2be55d6672 |
import sys
import os
import glob
import distutils.util
import doctest
build_dir = "build/lib.%s-%s" % (distutils.util.get_platform(), sys.version[0:3])
sys.path.insert(0, os.path.join(os.getcwd(), build_dir))
import HTSeq
py_fdn = 'python'+str(sys.version_info[0])
def test_rst_file(filename):
print("Doctest of... | simon-anders/htseq | python3/test/test.py | Python | gpl-3.0 | 1,389 | [
"HTSeq"
] | b750657b4c873c1b33444fbfe03275e835266e42bbae56b64dda97e9e91f3fc9 |
from __future__ import absolute_import
import os
from bioblend import galaxy, toolshed
from .config import read_global_config, global_config_path
def get_instance(instance_name=None):
# I don't like reading the config twice.
conf = read_global_config()
if not os.path.exists(global_config_path()):
... | galaxy-iuc/parsec | parsec/galaxy.py | Python | apache-2.0 | 1,170 | [
"Galaxy"
] | 9777716ba75bac2ba803d7a8075983d98d4613ed0851a4f0c30847d9188c4156 |
#!/usr/bin/env python
"""
Odor presentation
Creates GUI to control behavioral and imaging devices for in vivo calcium
imaging. Script interfaces with Arduino microcontroller and imaging devices.
"""
# import os
# if os.name == 'nt':
import matplotlib
matplotlib.use('TKAgg')
import Tkinter as tk
import tkMessageBox
im... | rlung/conveyer | odor-presentation/odor-presentation.py | Python | gpl-3.0 | 43,418 | [
"NEURON"
] | f942d908b3bbb9a483b425ad4f3622f5ec6068940867226cea00ed2d1bbda9d8 |
# This module is to estimate the sequence or position biases. It provides
# ways to access and save the bias parameters.
import pysam
import numpy as np
import matplotlib.pyplot as plt
def norm_pdf(x, mu, sigma):
return 1 / (sigma*np.sqrt(2*np.pi)) * np.exp(-1/2*((x-mu)/sigma)**2)
class FastaFile:
"""docstri... | huangyh09/diceseq | diceseq/utils/bias_utils.py | Python | apache-2.0 | 15,119 | [
"pysam"
] | 8adab15ec117735e04852933614409c9d7cbe408becfbb92fab5660bd3deaed6 |
#!/usr/bin/env python
#Copyright (C) 2011 by Glenn Hickey
#
#Released under the MIT license, see LICENSE.txt
#!/usr/bin/env python
"""Wrapper to run the cactus_workflow progressively, using the input species tree as a guide
tree.
"""
import os
import xml.etree.ElementTree as ET
from argparse import ArgumentParser... | benedictpaten/cactus | src/cactus/progressive/cactus_progressive.py | Python | mit | 26,065 | [
"BLAST"
] | 1537378679aa3b8375eaf98e90e2e6528303cf6f11934b83b595f84b98b030a1 |
from __future__ import print_function
from cntk_helpers import *
from imdb_data import imdb_data
import fastRCNN, time, datetime
print (datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'))
# dataset name
# datasetName = "Grocery"
datasetName = "Lego"
# datasetName = "pascalVoc"
# datasetName = ... | mrnameless123/LEGO-Object-Classification | param.py | Python | mit | 6,621 | [
"Gaussian"
] | 362e7db3ad3f4567d51adcf14f81f0dc966e71a3965ac9536d47fc1d9eb8f9cb |
#
# ImageViewTk.py -- a backend for Ginga using a Tk canvas widget
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import numpy
import PIL.Image as PILimage
import PIL... | rupak0577/ginga | ginga/tkw/ImageViewTk.py | Python | bsd-3-clause | 14,748 | [
"FLEUR"
] | 642d75352b3d9d93aedf44cdced1a577708f5e7ecf645a996b5600924aa83c5d |
from cheeseprism import index
from cheeseprism import utils
from cheeseprism.resources import App
from cheeseprism.utils import path
from contextlib import contextmanager
from mock import Mock
from mock import patch
from pyramid import testing
from pyramid.decorator import reify
from pyramid.events import subscriber
fr... | msabramo/CheesePrism | tests/test_views.py | Python | bsd-2-clause | 12,183 | [
"MOE"
] | 0cdc6171be036a40cc7dca66a1bc88f630c71b7489d931bb56d622e03b520a39 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Simple Bot to reply to Telegram messages
# This program is dedicated to the public domain under the CC0 license.
"""
This Bot uses the Updater class to handle the bot.
First, a few callback functions are defined. Then, those functions are passed to
the Dispatcher and r... | txemagon/1984 | modules/Telegram-bot-python/examples/conversationbot.py | Python | gpl-3.0 | 5,111 | [
"VisIt"
] | 3fc84d5dd6387948cd99b12dd6b8e8d2d0b980ed3f97c063e8a740a8ec684ec4 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
VERSION = "0.1.dev1"
COPYRIGHT = "Copyright © 2016 Brett Smith <brettcsmith@brettcsmith.org>"
LICENSE = """This program is ... | brettcs/xargs_groupby | xargs_groupby.py | Python | gpl-3.0 | 43,154 | [
"VisIt"
] | 0d9795263956d7ba1765cd70ead2e8d00b89ff371799c7fc1a2edd32e6b0de1b |
#!/usr/bin/python
# Copyright (C) 2010, 2011 by Eric Brochu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | misterwindupbird/IBO | ego/gaussianprocess/__init__.py | Python | mit | 18,612 | [
"Gaussian"
] | 4ca8197f807dba8d88224cab427748844a6298524065c658ad0c521ebc6a7c50 |
import unittest
import numpy as np
import pysal
#from pysal.spreg.twosls import BaseTSLS, TSLS
from pysal.contrib.handler import Model
from functools import partial
BaseTSLS = partial(Model, mtype='BaseTSLS')
TSLS = partial(Model, mtype='TSLS')
class TestBaseTSLS(unittest.TestCase):
def setUp(self):
db = ... | schmidtc/pysal | pysal/contrib/handler/tests/test_twosls.py | Python | bsd-3-clause | 14,526 | [
"COLUMBUS"
] | cc6d24d43b1ee3eb308c3ce2ff4038c5084bb102badffca3c914b0966e433515 |
"""
==========================================
Outlier detection with several methods.
==========================================
When the amount of contamination is known, this example illustrates three
different ways of performing :ref:`outlier_detection`:
- based on a robust estimator of covariance, which is assum... | DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/examples/covariance/plot_outlier_detection.py | Python | mit | 4,215 | [
"Gaussian"
] | 78e3176bfb400f15384406d82d315457832ee0bbc72f5377d2095ca6892cff30 |
"""Use stochastic Lanczos quadrature to approximate spectral function sums of
any operator which has an efficient representation of action on a vector.
"""
import functools
from math import sqrt, log2, exp, inf, nan
import random
import warnings
import numpy as np
import scipy.linalg as scla
from scipy.ndimage.filters... | jcmgray/quijy | quimb/linalg/approx_spectral.py | Python | mit | 30,236 | [
"Gaussian"
] | 89aef48f40cd1d3ccd21b1b51ec197239ac251d951260c58cb607a0107fb318c |
# -*- coding: utf-8 -*-
{
"'Cancel' will indicate an asset log entry did not occur": "' Cancel ' будет указывать актива запись протокола не выполнено",
"A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a b... | bobrock/eden | languages/ru.py | Python | mit | 350,852 | [
"VisIt"
] | 0ff9acf85560b8ab5310a5ae97051e7a6ab5b3a997a688be7fa4f1ba1ac877bf |
#
# Copyright (C) 2013,2014 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | Smiljanic/espresso | samples/python/electrophoresis.py | Python | gpl-3.0 | 8,658 | [
"ESPResSo"
] | a91bb4d2b78842202048d809c4d426d5d0df7512fe6654228b84725bcd0329fb |
# Script for converting nanometer units to microns also adding swc soma label.
import sys
import numpy as np
if (len(sys.argv) < 1):
print 'Error: missing arguments!'
print 'e.g. python modSWC.py neuron.swc'
else:
lines = [line.strip() for line in open(str(sys.argv[1]))]
out = []
name = True... | Robbie1977/NRRDtools | modHemiBrainSWC.py | Python | mit | 1,290 | [
"NEURON"
] | 55f172dc5dc35ddfae8e93e69982dd7d848fcc0fa57f277629d0ea4059a92d93 |
# Copyright 2015 Curtis Sand
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | fretboardfreak/space | tests/lib/test_engine.py | Python | apache-2.0 | 5,785 | [
"Galaxy"
] | 2f167bb5296aa567e8f4a05584ec01838de701e5b2a6bf059cdb025d30bb77cf |
"""
Computational Neurodynamics
Exercise 2
(C) Murray Shanahan et al, 2015
"""
from IzNetwork import IzNetwork
import numpy as np
import numpy.random as rn
def Connect2L(N0, N1):
"""
Constructs two layers of Izhikevich neurons and connects them together.
Layers are arrays of N neurons. Parameters for regular ... | JackThorp/ComputationalNeurodynamics | Exercise_2/Connect2L.py | Python | gpl-3.0 | 1,636 | [
"NEURON"
] | a83f7786d5c8a6949121dd990621f9fdbf1e2ce0401b1e6f5afb132ac0b06dd7 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | resouer/frakti | hack/boilerplate/boilerplate.py | Python | apache-2.0 | 5,245 | [
"VisIt"
] | e5da4ce6a9a376559ab794f38e304eacf874ec6d2028e3168c71b4b8ec020911 |
#!/usr/bin/env python
# coding:utf-8
__version__ = '3.1.5'
__password__ = ''
__hostsdeny__ = () # __hostsdeny__ = ('.youtube.com', '.youku.com')
__content_type__ = 'image/gif'
__mirror_userjs__ = () # __mirror_userjs__ = '//www.example.com/user.js'
import os
import re
import time
import struct
import zlib
import gz... | JerryXia/fastgoagent | goagent/server/gaebak/gae.py | Python | mit | 22,665 | [
"VisIt"
] | 3060975af91fe5e1c41df0a0e9276541018307831567cae31cc5f68a9701d611 |
#!/usr/bin/env python
#
# this took works with the 'pDNS2' project to read either a pcap file or off the wire and populate a redis database tool
# this version requires scapy and redis imports
# scapy from http://www.secdev.org/projects/scapy/
# redis from https://github.com/andymccurdy/redis-py
# Keys are Domain an... | bez0r/pDNS2 | pdns2_collect_scapy.py | Python | gpl-3.0 | 7,546 | [
"VisIt"
] | cfbeb5a3292dedd9dc25bd6116671bf657341a5a370b9986ca309cc36c8a50bd |
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_male = (
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}",
"{{first_name_male}} {{last_name}}... | joke2k/faker | faker/providers/person/it_IT/__init__.py | Python | mit | 32,695 | [
"Avogadro"
] | c45a13b3f6cbbc4ba51a23a281a2dfa767fdbe103e3b25f007ecc349ab72a8a5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.