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 |
|---|---|---|---|---|---|---|---|
""" Classes and functions for Symmetric Diffeomorphic Registration """
from __future__ import print_function
import abc
from dipy.utils.six import with_metaclass
import numpy as np
import numpy.linalg as npl
import scipy as sp
import nibabel as nib
import dipy.align.vector_fields as vfu
from dipy.align import floatin... | Messaoud-Boudjada/dipy | dipy/align/imwarp.py | Python | bsd-3-clause | 71,836 | [
"Gaussian"
] | cf22522934e9fa95b34ae116fabc8ba5f8382abb5c6df986657740ad88479d92 |
# sql/util.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""High level utilities which build upon other modules here.
"""
from .. import exc, uti... | michaelBenin/sqlalchemy | lib/sqlalchemy/sql/util.py | Python | mit | 19,766 | [
"VisIt"
] | d927ca6e98b3e2c44e65f0aa4b36f7e3e75b8c3fae515f2f875801da27cea4e9 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | kbrebanov/ansible | lib/ansible/modules/network/avi/avi_virtualservice.py | Python | gpl-3.0 | 24,059 | [
"VisIt"
] | 989809b28160024b8c943f13ed96029646e0b2bd2ad4b12ae9812ff18f7e87ae |
import uuid
from typing import Any, Callable
from Firefly import aliases, logging
from Firefly.const import API_ALEXA_VIEW, API_FIREBASE_VIEW, API_INFO_REQUEST, EVENT_TYPE_BROADCAST, TYPE_DEVICE
from Firefly.helpers.events import Command, Event, Request
from Firefly.helpers.metadata import EXPORT_UI, FF_ID, HIDDEN_BY_... | Firefly-Automation/Firefly | Firefly/helpers/device/device.py | Python | apache-2.0 | 14,844 | [
"Firefly"
] | 3c303fea70fc9c2e44e2c843407a40c234fd25d06df4541fe858ee2fb942480e |
import os
import logging
# Set up logging here so we can log in the settings module.
# After initialization, Django's LOGGING settings are used.
logging.basicConfig(
format='%(asctime)s %(module)s %(message)s',
level=logging.DEBUG
)
logger = logging.getLogger(__name__)
DEBUG = True
TEMPLATE_DEBUG = True
# S... | lizardsystem/lizard-kml | lizard_kml/testsettings.py | Python | gpl-3.0 | 6,592 | [
"NetCDF"
] | 35903e9f7a2cfd10000550f60500563b12ee0979f256ef0eedd2c2817c7b0bf6 |
"""
Base Page for fitting
"""
from __future__ import print_function
import sys
import os
import wx
import numpy as np
import time
import copy
import math
import json
import logging
import traceback
from collections import defaultdict
from wx.lib.scrolledpanel import ScrolledPanel
from sasmodels.weights import MODELS... | lewisodriscoll/sasview | src/sas/sasgui/perspectives/fitting/basepage.py | Python | bsd-3-clause | 145,362 | [
"Gaussian"
] | 9d96cb66f9d3e8cc8400a0bef815e8b124667757cc666d9ed7babb2ad43a2710 |
#
# Copyright 2021 Lars Pastewka (U. Freiburg)
# 2020 Wolfram G. Nöhring (U. Freiburg)
#
# matscipy - Materials science with Python at the atomic-scale
# https://github.com/libAtoms/matscipy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | libAtoms/matscipy | matscipy/calculators/eam/average_atom.py | Python | lgpl-2.1 | 7,507 | [
"Matscipy"
] | 9f8650b8aeebd0008769183e30566b32ed5b65f6b3495c845e480cba99f6aa3d |
# -*- coding: utf-8 -*-
#
# __init__.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
# ... | lekshmideepu/nest-simulator | pynest/nest/__init__.py | Python | gpl-2.0 | 2,063 | [
"NEURON",
"VisIt"
] | f8f4785890d73e909bc92a8280fac0ed3faab2844a8911b49a24b3984b2fe304 |
#! /usr/bin/python
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
__author__="jon"
__date__ ="$Apr 12, 2014 12:57:32 PM$"
from symbol import except_clause
import flickrapi
import json
impor... | wayra-nita/aqi-platform | crawler/src/base.py | Python | gpl-3.0 | 3,303 | [
"COLUMBUS"
] | 0d3be1c488c2ce3172a5c8c2e073c58e841f1bbe34fca8088e95b86d92e2dd09 |
m __future__ import division
import MDAnalysis as mda
import datreant as dtr
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pdbionsurvey.coordination
import json
import seaborn as sb
import scipy
import mmtf
import pdbionsurvey.collection
from matp... | Becksteinlab/PDB_Ion_Survey | src/pdbionsurvey/bulkcoord.py | Python | gpl-3.0 | 6,385 | [
"MDAnalysis"
] | e621b08c8a8c7385f95f511a5bfe72a3f586abc8063afaff7ce71f7c9642d84b |
from __future__ import division
from warnings import warn
import numpy as np
from scipy.sparse import csr_matrix
from pybasicbayes.util.general import objarray
from pylds.lds_messages_interface import info_E_step, info_sample, kalman_info_filter, kalman_filter, E_step
# TODO on instantiating, maybe gaussian states s... | mattjj/pylds | pylds/states.py | Python | mit | 36,176 | [
"Gaussian"
] | 98ae17365ed5ea1611dbb29961b5975bc7deffac51f04fc32e9d1a76a850465e |
from distutils.core import setup
setup(
name='Raspberry-Pi-IO',
version='0.0.2',
author='Brian Hines',
author_email='brian@projectweekend.net',
packages=['raspberry_pi_io'],
url='https://github.com/exitcodezero/raspberry-pi-io',
license='LICENSE.txt',
description='A Python service for r... | projectweekend/raspberry-pi-io | setup.py | Python | mit | 483 | [
"Brian"
] | f942f1cb134857b3f2c29a1f0e47b68329f848854be2d36371b3e4175047a398 |
# Basic application to load a mesh from file and view it in a window
# Python imports
import sys, os
import euclid as eu
## Imports from this project
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'core')) # hack to allow local imports without creaing a module or modifying the path variable
from InputO... | nmwsharp/DDGSpring2016 | Assignment2/Assignment2.py | Python | mit | 11,896 | [
"Gaussian"
] | 7a6b706ab7398004db7a06c6c089a72b57e7cd46a661868698bc1dfcbc8de662 |
# Copyright Anne M. Archibald 2008
# Released under the scipy license
import numpy as np
import warnings
from .ckdtree import cKDTree, cKDTreeNode
__all__ = ['minkowski_distance_p', 'minkowski_distance',
'distance_matrix',
'Rectangle', 'KDTree']
def minkowski_distance_p(x, y, p=2):
"""Compu... | WarrenWeckesser/scipy | scipy/spatial/kdtree.py | Python | bsd-3-clause | 33,807 | [
"Galaxy"
] | 0c6fd0c04f4d07c0e368ebfef85da29b81553a1ed2a856df317cfd8aa4be0c4d |
# ################################################################
#
# Active Particles on Curved Spaces (APCS)
#
# Author: Silke Henkes
#
# ICSMB, Department of Physics
# University of Aberdeen
# Author: Rastko Sknepnek
#
# Division of Physics
# School of Engineering, Physics and Mathem... | sknepneklab/SAMoS | analysis/batch_nematic/batch_analyze_nematic_R16a.py | Python | gpl-3.0 | 2,380 | [
"VTK"
] | 0a9f7a24db3105f23b8249d87e021b94dde5c333b9916912580e2e4f78e59181 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
from pymatgen.analysis.diffraction.xrd import XRDCalculator
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest
"""
TODO: Mod... | materialsproject/pymatgen | pymatgen/analysis/diffraction/tests/test_xrd.py | Python | mit | 3,828 | [
"pymatgen"
] | 17717fa28c0034b8d7ec87550d1ecebde0c6747d5b4a18e93dbe2a6d213cd7b7 |
# -*- coding: utf-8 -*-
from datetime import timedelta, datetime
from dateutil import parser as dateparser
import json
import os
import pytz
import time
from typing import Any, Dict
from django.conf import settings
from django.http import HttpRequest, JsonResponse
from django.db.models.aggregates import Count
from dj... | tomka/CATMAID | django/applications/catmaid/control/stats.py | Python | gpl-3.0 | 56,004 | [
"NEURON"
] | 5e3cfb0aa369aac0e934488ae261756f1cbdb7b31ed7a2fbaa548c06ecd10e90 |
import numpy as np
def array_almost_equal(a1, a2, tol=np.finfo(type(1.0)).eps):
"""Replacement for old numpy.testing.utils.array_almost_equal."""
return (np.abs(a1 - a2) < tol).all()
# this test should be run with abinit!
from ase.calculators.emt import EMT
from ase.io import read, write
from ase.structure ... | grhawk/ASE | tools/ase/test/fio/abinit.py | Python | gpl-2.0 | 823 | [
"ABINIT",
"ASE"
] | 2d11e09560a2f6cc25fa6582f2d25f8534b8cadf05790e10ccea0a26b1b87f63 |
import os
from .job import Job
class OrcaJob(Job):
""" Base class for all ORCA calculations
Subclasses are responsible for setting the correct parameters
in the calculation.
"""
def __init__(self, basename, **kwargs):
Job.__init__(self, basename, **kwargs)
self.program = '... | cstein/calcit | calcit/orca.py | Python | mit | 2,398 | [
"ORCA"
] | 16181535212c1cef8cfd0db6a5aaab52dd001eeedfdbfa0dc6799e3db563041a |
""" MQConsumer
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import queue
from DIRAC import S_ERROR, S_OK, gLogger
from DIRAC.Resources.MessageQueue.Utilities import getDestinationAddress, getMQService, generateDefaultCallback
from DIRAC.Core.Utilities... | ic-hep/DIRAC | src/DIRAC/Resources/MessageQueue/MQConsumer.py | Python | gpl-3.0 | 2,672 | [
"DIRAC"
] | 8ebc7586f032cf79fac5e5b482b16b195e718da9991403275d9aad3d109ac421 |
"""
Artificial Intelligence for Humans
Volume 2: Nature-Inspired Algorithms
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2014 by Jeff Heaton
Licensed under the Apache License, Version 2.0 (the "License")... | PeterLauris/aifh | vol2/vol2-python-examples/examples/Equilateral.py | Python | apache-2.0 | 2,880 | [
"VisIt"
] | 4369326f5d3f0af8dc558666264d324c7ab649aa6a530206818d18a45d5cf9cb |
"""Visits models."""
from django.db import models
from django.contrib.sites.models import Site
from django.shortcuts import reverse
from django.utils.timezone import now
from dry_rest_permissions.generics import authenticated_users
from markdownx.models import MarkdownxField
class VisitQuerySet(models.QuerySet):
... | oser-cs/oser-website | visits/models.py | Python | gpl-3.0 | 8,253 | [
"VisIt"
] | 8224aca7f7f3e024529c8623b7c1d6c29fc7cd7cc56e4ebf020c4330713e3b99 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
Miscellaneous tools used by OpenERP.
"""
from functools import wraps
import cPickle
import cProfile
from contextlib import contextmanager
import subprocess
import logging
import os
import passlib.utils
import re
im... | hip-odoo/odoo | odoo/tools/misc.py | Python | agpl-3.0 | 38,249 | [
"VisIt"
] | bc1b81801ca9b86ef7473125afeb8f67abe551bc85f3191f0b07a32eaa225531 |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/FixedTupleList.py | Python | gpl-3.0 | 1,980 | [
"ESPResSo"
] | 8ca213500c860539122f2aa1815d7c2d3ecf111665e71d72ac20ec4009d2ad90 |
"""
This module defines export functions for decision trees.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Dawe <noel@dawe.me>
# Satrajit Gosh <satrajit.ghosh@gmail.com>
# Trevor... | bnaul/scikit-learn | sklearn/tree/_export.py | Python | bsd-3-clause | 37,048 | [
"Brian"
] | 36e7b9292630f772d6171ee6a365d70ac2afca7180e260628ffd1128990129c2 |
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import errno
import fnmatch
import json
import operator
import os
import shutil
import stat
import... | dpassante/ansible | lib/ansible/galaxy/collection.py | Python | gpl-3.0 | 69,076 | [
"Galaxy"
] | 36920e739f93a3c8bbb5e0497d8687b002124a49db5e7c04a2090d2046fa56d0 |
import vtk
from vtk.util.colors import blue, hot_pink
import numpy as np
""" Visualization Helpers """
def add_sensor_visualization(filter_depth_image, positions, vtk_renderer):
"""
Add visualization specific to the sensor
:param filter_depth_image: FilterDepthImage, needed to get camera info
:param... | lucasplus/MABDI | mabdi/MabdiSimulateUtilities.py | Python | bsd-3-clause | 8,203 | [
"VTK"
] | 0f3b384ebcf34dee159e061491ee97fe79627dc4686f33466dfeea416b949b0a |
# Copyright (C) 2018 Collin Capano
# 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.
#
# This program is distributed in t... | ahnitz/pycbc | pycbc/inference/models/gaussian_noise.py | Python | gpl-3.0 | 45,946 | [
"Gaussian"
] | 1fcfe25700dea248462fd05e9cabb2bfea00308ff2fb4eb285c697e40e2e5a1c |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script just updates the 'fusioncatcher/etc/configuration.cfg' file with
the paths that it finds when running in the PATH variable.
It only needs to have pre-installed:
- Python version >=2.6.0 and < 3.0.
Author: Daniel Nicorici, Daniel.Nicorici@gmail.com
Copyri... | ndaniel/fusioncatcher | bin/update-config.py | Python | gpl-3.0 | 14,402 | [
"BWA",
"Biopython",
"Bowtie"
] | ca22ed2a4019cf880d5951ade1dd36324a0a40c30cbee5c7d9afb4a86f3a8137 |
# Created by DrLecter, based on DraX' scripts
# This script is part of the L2J Datapack Project
# Visit us at http://www.l2jdp.com/
# See readme-dp.txt and gpl.txt for license and distribution details
# Let us know if you did not receive a copy of such files.
import sys
from com.l2scoria.gameserver.model.quest ... | zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/village_master/elven_human_fighters_2/__init__.py | Python | gpl-3.0 | 4,821 | [
"VisIt"
] | ac258f20f8efb2c60ad72db5a720832ac128fe7143bf7ea37d98872bee011c00 |
import numpy as np
import matplotlib as plt
import mayavi.mlab as mv
import gto
MAX_HF_ITERS = 10
class Atom:
def __init__(this, position, charge):
this.position = position
this.charge = charge
def make_initial_guess(atoms):
return []
def build_fock_matrix(atoms, current_wavef... | DmitriyNE/QmDemos | HfDemo/HfOptimize.py | Python | bsd-2-clause | 1,358 | [
"Mayavi"
] | 4f79279e7c6e1407ac47484db5b132a849a92fba40daf391619ceffd45022391 |
#! /usr/bin/env python
# coding:utf-8
# Author: bingwang
# Email: toaya.kase@gmail.com
# Copylight 2012-2012 Bing Wang
# LICENCES: GPL v3.0
__docformat__ = "epytext en"
# dependents: YGOB/
# biopython
# bing
from Bio import SeqIO
YGOB_path="/Users/bingwang/zen/yeast_anno_pipe/YGOB_dataset/"
out_path="/Users/bingwang/... | BingW/yeast_anno_pipe | src/get_ygob_intron.py | Python | gpl-3.0 | 3,751 | [
"Biopython"
] | adf107d81ac5ada04948553165b27f80ff1deed6e19ef95c0726576fc5fb76a7 |
from ..core import mutinf, nmutinf
from .base import (AlphaAngleBaseMetric, ContactBaseMetric, DihedralBaseMetric,
BaseMetric)
import numpy as np
from itertools import combinations_with_replacement as combinations
from multiprocessing import Pool
from contextlib import closing
__all__ = ['AlphaAng... | msmbuilder/mdentropy | mdentropy/metrics/mutinf.py | Python | mit | 2,364 | [
"MDTraj"
] | 67eaafc706fc77891c8a38b2989a9cf2067e3030c24dec47edefea1667634a00 |
#!/usr/bin/env python
import glob
import os
import subprocess
PULSAR_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
GALAXY_DIR = os.path.normpath(os.path.join(PULSAR_ROOT, "..", "galaxy"))
subprocess.run(["python", "-m", "pip", "install", "build"], check=True, stdout=subprocess.... | galaxyproject/pulsar | tools/replace_galaxy_requirements_for_ci.py | Python | apache-2.0 | 1,122 | [
"Galaxy"
] | 1196a151f67b41465a859e4ce0536dc57dda2da8de85c3cf0c8c506a8157607e |
"""
Metadata for all sources.
"""
# Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
# Copyright (c) 2008, Prabhu Ramachandran Enthought, Inc.
# License: BSD Style.
# Local imports.
from mayavi.core.metadata import SourceMetadata
from mayavi.core.pipeline_info import PipelineInfo
BASE = 'mayavi.sources'
open_3ds... | dmsurti/mayavi | mayavi/sources/metadata.py | Python | bsd-3-clause | 10,449 | [
"Mayavi",
"VTK"
] | 94f69a6947682dbcab6f802b9c5b553285957152db9330d15a4ba8338a131562 |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | retrography/scancode-toolkit | tests/cluecode/test_copyrights_lines.py | Python | apache-2.0 | 11,241 | [
"VisIt"
] | f11883c120eb894d3fb2ece512dca81c02215fc66c344e515db42fa16e07910c |
r"""Efficient implementation of the Gaussian divergence-free kernel."""
from time import time
from pympler.asizeof import asizeof
from numpy.random import rand, seed
from numpy.linalg import norm
from numpy import dot, zeros, logspace, log10, matrix, int, eye, float
from scipy.sparse.linalg import LinearOperator
fro... | RomainBrault/JMLR-ORFF | src/efficient_divfree_gaussian.py | Python | unlicense | 6,300 | [
"Gaussian"
] | 1be3c459f582f7ae042b6948f095a0909078986e4eb0ad0b2e62053599721ac0 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-31 11:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wagtail_personalisation', '0009_auto_20170531_0428'),
]
operations = [
migr... | LabD/wagtail-personalisation | src/wagtail_personalisation/migrations/0010_auto_20170531_1101.py | Python | mit | 1,464 | [
"VisIt"
] | 62e7fbf472bf0009e9c86571ca56cef78023c63fc0c0edda454c3ce0d3e64b64 |
#!/usr/bin/env python
renWin = vtk.vtkRenderWindow()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
renderer = vtk.vtkRenderer()
renWin.AddRenderer(renderer)
src1 = vtk.vtkSphereSource()
src1.SetRadius(5)
src1.SetPhiResolution(20)
src1.SetThetaResolution(20)
mapper = vtk.vtkPolyDataMapp... | hlzz/dotfiles | graphics/VTK-7.0.0/Rendering/Core/Testing/Python/TestGLSLShader.py | Python | bsd-3-clause | 970 | [
"VTK"
] | 4cbb33b3f236b08233e17c68bde9fe54bc4dad4b15572d1ab6ebfee10cb060bf |
import pytest
import numpy as np
import numpy.testing as npt
import scipy.sparse as spp
from itertools import product
import indigo
from indigo.backends import available_backends
BACKENDS = available_backends()
@pytest.mark.parametrize("backend,L,M,N,K,density",
list(product( BACKENDS, [3,4], [5,6], [7,8], [1,8,... | mbdriscoll/indigo | indigo/test_transforms.py | Python | bsd-3-clause | 5,323 | [
"VisIt"
] | ee51300fcd0fffae1bf41ba72d0badb4077e4f9d885c6a0fd3662ec8a93a9726 |
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Qgis(CMakePackage):
"""QGIS is a free and open-source cross-platform desktop geographic
... | iulian787/spack | var/spack/repos/builtin/packages/qgis/package.py | Python | lgpl-2.1 | 12,602 | [
"NetCDF"
] | 64ae9268dd3edd6d63ea8df201fa31ca918307e13b6dda6d5daf29eca523467a |
#!/usr/bin/python -u
import os, sys, fnmatch
try:
import autotest.common as common
except ImportError:
import common
# do a basic check to see if pylint is even installed
try:
import pylint
from pylint.__pkginfo__ import version as pylint_version
except ImportError:
print "Unable to import pylint,... | libvirt/autotest | utils/run_pylint.py | Python | gpl-2.0 | 3,195 | [
"VisIt"
] | 18b4a1e14cce58ceb23d6043a4c1fbfdce4ccb114ded1b38e99b5777a3d9ae18 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Copyright (c) 2012 Aurélien Ginolhac, Mikkel Schubert, Hákon Jónsson
and Ludovic Orlando
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... | ginolhac/mapDamage | mapdamage/main.py | Python | mit | 10,167 | [
"pysam"
] | 66bb266786fbe4c6eeaee48e2657dbf0497ce7ec63bb7bab2e5e0541fb6d3549 |
'''
this script quantifies the read counts using HTSeq. To be run in osiris.
'''
import sys,os
import multiprocessing,multiprocessing.pool
def htseqCounter(sample):
'''
this function calls HTSeq
'''
htseqExecutable='htseq-count'
flag1='-m union'
flag2='-f bam'
flag3='-t mRNA'
flag5='... | adelomana/30sols | SI/extra/other_species/eco_27924019/star/readCounter.py | Python | gpl-3.0 | 1,333 | [
"HTSeq"
] | a3a1bd671be5e961f35cf6c9a2bf730ee69887065eca05e423d9f16ad5f24950 |
#!/bin/python
import moose
import math
context = moose.PyMooseBase.getContext()
def calc_esl(form, v, A, B, V0):
if ( form == 1 ):
return A * math.exp((v-V0)/B)
if ( form == 2 ):
return A / ( 1.0 + math.exp(( v - V0 ) / B ))
if ( form == 3):
if ( math.fabs( v - V0 ) < 1e-6 ):
v = v + 1e-6
... | BhallaLab/moose-thalamocortical | DEMOS/pymoose/rallpack/rall.3/util.py | Python | lgpl-2.1 | 3,536 | [
"MOOSE"
] | d2da738c582e5731db0a21345021588c3671db94686f628660646ab8a4e13580 |
"""Unit tests for the Jobbing mail module."""
import unittest
from unittest import mock
from bob_emploi.frontend.api import user_pb2
from bob_emploi.frontend.server import scoring
from bob_emploi.frontend.server.mail.test import campaign_helper
_SCORING_MODELS_EXCEPT_JOBBING = dict(scoring.SCORING_MODELS)
del _SCOR... | bayesimpact/bob-emploi | frontend/server/mail/test/jobbing_test.py | Python | gpl-3.0 | 4,215 | [
"BLAST"
] | c8739c085e1888280fc3c2df7ecb25ff4087756491eb5e0e8f720fc976874bcd |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RAnnotationforge(RPackage):
"""Tools for building SQLite-based annotation data packages.
... | iulian787/spack | var/spack/repos/builtin/packages/r-annotationforge/package.py | Python | lgpl-2.1 | 1,466 | [
"Bioconductor"
] | 7f0e5cba409824d1385636ff8b8b5f807c7674b6b9deba0ffb8852e5e871791d |
"""
== Region description ==
Regions serve for selection of certain parts of the computational domain (= selection of nodes and elements of a FE mesh). They are used to define the boundary conditions, the domains of terms and materials etc.
"""
from pyparsing import Literal, CaselessLiteral, Word, delimitedList,\
... | olivierverdier/sfepy | sfepy/fem/parseReg.py | Python | bsd-3-clause | 7,800 | [
"VisIt"
] | ed70032af08ccdca872707e20658270f4098b8b3b9af1074b57ad5b4795915e7 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/core/lib/pluginmanager.py | Python | gpl-2.0 | 11,121 | [
"Brian"
] | 79fef329c3209a197738585199c0da07042f71319e9db2a121f4b4341e432d9c |
import sys
sys.path.append('..')
import stile
import dummy
def main():
# setups
dh = dummy.DummyDataHandler()
bin_list = [stile.BinStep('ra',low=-1,high=1,step=1),
stile.BinStep('dec',low=-1,high=1,step=1)]
sys_test = stile.CorrelationFunctionSysTest(type='GalaxyShear')
stile_a... | msimet/Stile | examples/example_run.py | Python | bsd-3-clause | 1,915 | [
"Galaxy"
] | 8f251ce8342009b03da2b4bc36ad45843c5d60169cf0ffbeec0b2c2639de9105 |
"""
The following contains the S22 and s26 databases of weakly interacting dimers and complexes
S22 geometry data are from
P. Jurecka, J. Sponer, J. Cerny, P. Hobza; Phys Chem Chem Phys 2006, 8 (17), 1985-1993.
See http://www.begdb.com/index.php?action=106a6c241b8797f52e1e77317b96a201 for the original files.
All geome... | grhawk/ASE | tools/ase/data/s22.py | Python | gpl-2.0 | 197,931 | [
"ASE"
] | f4bc1f6588be4749e72c80fb6ce3a18509b1458803c0705d62c67cf4583f1756 |
from glob import glob
import os
exclude = ["cceom/read_guess.cc", "detci/calc_pt_block.cc", "detci/graphset.cc"]
libs = []
for d in [name for name in os.listdir(".") if os.path.isdir(os.path.join(".", name))]:
print "Processing", d
if d in ["attic", "psi4"]:
continue
libs.append(d)
files = glob(... | spring01/libPSI | src/bin/make_cmake_files.py | Python | gpl-2.0 | 871 | [
"Psi4"
] | 3eaa7a4451472b5e162974b1890ba3809b56f315da6f766a712ea05ce0e58fe7 |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | blur/synapse_util.py | Python | apache-2.0 | 8,092 | [
"NEURON"
] | af3307b32bd51208dbb33bc886232c4ddc67b3b9aeb51b7401f7bfb49f8b90bb |
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008-2012 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012-2014 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | Nick-Hall/gramps | gramps/plugins/drawreport/calendarreport.py | Python | gpl-2.0 | 30,476 | [
"Brian"
] | 693353c8935ee72410d1b91ad1694b91bc4106cddd0623eccc26e223ef00a0a0 |
"""
Global average annual temperature plot
======================================
Produces a time-series plot of North American temperature forecasts for 2
different emission scenarios. Constraining data to a limited spatial area also
features in this example.
The data used comes from the HadGEM2-AO model simulations... | dkillick/iris | docs/iris/example_code/Meteorology/COP_1d_plot.py | Python | lgpl-3.0 | 4,186 | [
"NetCDF"
] | ea3ba13ce54e28392b2db6353454184c9079bf921efa095b12f1e962dbbb57ea |
import py
import os.path
dirpath = py.path.local("./")
def pytest_generate_tests(metafunc):
if "filename" in metafunc.funcargnames:
for fpath in dirpath.visit('*.scad'):
metafunc.addcall(id=fpath.basename, funcargs=dict(filename=fpath.basename))
for fpath in dirpath.visit('*.py'):
... | Obijuan/tutorial-openscad | temporada-2/T16-estudiando-codigo-de-otros/04-cyclone/smooth_rod_fix/MCAD/test_docs.py | Python | gpl-2.0 | 615 | [
"VisIt"
] | 32da298156d346f13cee2bd9a8e29bb59d76e98ef0cad2ebda60b3443921174a |
#
# Copyright (C) 2013,2014,2015,2016 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)... | KonradBreitsprecher/espresso | testsuite/interactions_bonded_interface.py | Python | gpl-3.0 | 5,347 | [
"ESPResSo"
] | 88833feb2acbbb9aeab5c9f0e9f207ecaf03f7d8eb79585681b92e15e04dfc61 |
# We want 1/2==0.5
from __future__ import division
"""Copyright (c) 2005-2017, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste... | qldhpc/eb_local | ebfiles/c/chaste/new-chaste/python/pycml/pycml.py | Python | apache-2.0 | 275,510 | [
"VisIt"
] | d66266e051c099a2c0b6c57572dcc49c442f67ba7a329b915b5a3d271a83204a |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 15 21:50:09 2017
@author: alessandro
"""
from scipy.ndimage.interpolation import zoom
import numpy as np
# ffttools
def fftd(img):
return np.fft.fftn(img)
def ifftd(img):
return np.fft.ifftn(img)
def rearrange(img):
return n... | ale93111/KCF_3D | kcftracker3d_numpy.py | Python | mit | 11,910 | [
"Gaussian"
] | 9e989de953c8635f01274afa784562afd1f1d494b95d4767a924410b622971f8 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
Miscellaneous tools used by OpenERP.
"""
from functools import wraps
import babel
from contextlib import contextmanager
import datetime
import subprocess
import io
import os
import collections
import passlib.utils
... | richard-willowit/odoo | odoo/tools/misc.py | Python | gpl-3.0 | 38,601 | [
"VisIt"
] | 3da09fe98261f0fb00c5ae52508b8722cb69c348552f7ebefd546d9375a3baa4 |
class VehicleInfo(object):
def __init__(self):
"""
waf_target: option passed to waf's --target to create binary
default_params_filename: filename of default parameters file. Taken to be relative to autotest dir.
extra_mavlink_cmds: extra parameters that will be passed to mavproxy
... | khancyr/ardupilot | Tools/autotest/pysim/vehicleinfo.py | Python | gpl-3.0 | 17,804 | [
"Firefly"
] | 9283bcce50298ca5b0cf0083a307be0b0cb81bc17aa66332268a106f5c1ab969 |
""" Client for the SandboxStore.
Will connect to the WorkloadManagement/SandboxStore service.
"""
__RCSID__ = "$Id$"
import os
import tarfile
import hashlib
import tempfile
import re
import StringIO
from DIRAC import gLogger, S_OK, S_ERROR, gConfig
from DIRAC.Core.DISET.TransferClient import TransferClient
from... | petricm/DIRAC | WorkloadManagementSystem/Client/SandboxStoreClient.py | Python | gpl-3.0 | 12,655 | [
"DIRAC"
] | c345468be5be3c7a22d89ef7095bad013673019d2db348f7670b3db6a5417f80 |
## To Do:
## Make stats fields read-only
## More descriptive description
# Author: Daryl Harrison
# Enthought library imports
from enthought.traits.api import Instance, Enum, Bool, Tuple, Float
from enthought.traits.ui.api import View, Item, Group, TupleEditor
from enthought.tvtk.api import tvtk
# Local imports
from... | rjferrier/fluidity | mayavi/mayavi_amcg/filters/mesh_diagnostics.py | Python | lgpl-2.1 | 8,416 | [
"Mayavi",
"VTK"
] | df608c818a501cc611860a72ba48c246043ab38da9fcaf2cfe8be11369737ad5 |
import ast
class ParentNodeTransformer(object):
def visit(self, node):
if not hasattr(node, 'parent'):
node.parent = None
node.parents = []
for field, value in ast.iter_fields(node):
if isinstance(value, list):
for index, item in enumerate(value... | librallu/RICM4Projet | parser/astmonkey/astmonkey-0.1.1/build/lib/astmonkey/transformers.py | Python | gpl-3.0 | 852 | [
"VisIt"
] | 2d2fa552d2793143b3e76e386ed928a4d18c3011598b6414927615b1a5ef962f |
"""
Simulation tools for generating fake images
"""
import numpy as np
import astropy.io.fits as pyfits
import astropy.wcs as pywcs
def rotate_CD_matrix(cd, pa_aper):
"""Rotate CD matrix
Parameters
----------
cd: (2,2) array
CD matrix
pa_aper: float
Position angle, in deg... | albertfxwang/grizli | grizli/fake_image.py | Python | mit | 11,308 | [
"Gaussian"
] | 15002d72cf49fc2101b42b81cd9b4b7820640a0453b292fb2937354aab8b212a |
#!/usr/bin/python
import sys
import numpy as np
import irtk
import os
from glob import glob
from lib.BundledSIFT import *
import scipy.ndimage as nd
import argparse
# filename = sys.argv[1]
# ga = float(sys.argv[2])
# output_mask = sys.argv[3]
parser = argparse.ArgumentParser(
description='Slice-by-slice dete... | ghisvail/irtk-legacy | wrapping/cython/scripts/fetalMask_detection.py | Python | bsd-3-clause | 5,528 | [
"VTK"
] | 2e7e24ae611527f126e13dfd9a5c936df863449d7724befa751e98e0a6237fde |
# This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2012 Jan Decaluwe
#
# The myhdl library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by t... | gw0/myhdl | myhdl/_always_seq.py | Python | lgpl-2.1 | 6,007 | [
"VisIt"
] | d2a2c51b7ec30e02a726d68cde451f5304f06ff49915d9eea260944a54b5a9e7 |
#!/usr/bin/evn python
import sys
import spglib
import numpy as np
#######################################
# Uncomment to use Atoms class in ASE #
#######################################
# from ase import Atoms
#######################################################################
# Using the local Atoms-like class ... | sauliusg/cod-tools | src/externals/spglib/python/examples/example.py | Python | gpl-2.0 | 10,235 | [
"ASE",
"VASP"
] | fb37cc0e278396c7953499995b97eeb69308f24d2bac3797574aa9501e03cdaa |
#!/usr/bin/env python
#
'''
Example calculation with the native DF-MP2 code.
'''
from pyscf.gto import Mole
from pyscf.scf import RHF
from pyscf.mp.dfmp2_native import DFMP2
mol = Mole()
mol.atom = '''
H 0.0 0.0 0.0
F 0.0 0.0 1.1
'''
mol.basis = 'cc-pVDZ'
mol.spin = 0
mol.build()
mf = RHF(mol).run()
DFM... | sunqm/pyscf | examples/mp/10-dfmp2.py | Python | apache-2.0 | 332 | [
"PySCF"
] | c814bcf24f34aa32f8ec49bef6437a34abffe553b2eeb5bae4d9044ff7c2293c |
#!/usr/bin/env python
##############################################################################
## Filename: PSF_analysis.py
## Version: $Revision$
## Description: Standard star spectrum extraction
## Author: $Author$
## $Id$
#####################################################################... | snfactory/extract-star | scripts/PSF_analysis.py | Python | mit | 95,995 | [
"Gaussian"
] | d59e3c519e02d42184234080f1f85a1e758dfe927cae4979affef638d9dfc668 |
"""
@name: PyHouse/src/Modules/Drivers/USB/Driver_USB_17DD_5500.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2012-2017 by D. Brian Kimmel
@license: MIT License
@note: Created on Dec 13, 2012
@summary: This module is for
Created to handle the UPB PIM which is a HID d... | DBrianKimmel/PyHouse | Project/src/Modules/Core/Drivers/Usb/Driver_USB_17DD_5500.py | Python | mit | 4,755 | [
"Brian"
] | 2b135fe8141430cd3b800d061cb6b0a6790e7410e38a5751fbd4d295c9891a23 |
#!/usr/bin/env python
import numpy as np
try:
# Matplotlib is not a dependency
import matplotlib as mpl
mpl.use('Agg') # force the antigrain backend
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg
except (ImportError, RuntimeError):
mpl = None
... | ajylee/gpaw-rtxs | gpaw/test/big/ehrenfest/oscfit.py | Python | gpl-3.0 | 4,456 | [
"ASE"
] | f534b845a38b0d5fe3c2ba13f9fd54523aa3a3ed71d1a1012a716fbae864d98b |
# coding: utf8
import logging
import random
import six
from jinja2 import Template
from kalliope.core import OrderListener
from kalliope.core.HookManager import HookManager
from kalliope.core.ConfigurationManager import SettingLoader, BrainLoader
from kalliope.core.Cortex import Cortex
from kalliope.core.Lifo.LifoMan... | kalliope-project/kalliope | kalliope/core/NeuronModule.py | Python | gpl-3.0 | 12,930 | [
"NEURON"
] | f2b68b212ac8065e9ef6c86b3de2b23e945c8a31d0634eb1aab8209759345d61 |
# Copyright 2013 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 a... | eepgwde/pyeg0 | gapi/gce/main.py | Python | gpl-3.0 | 5,684 | [
"VisIt"
] | ef585396acbb03e2d7d9f2d1c2b5467b8d985d7b8dac49034d58c1e3b4e2207b |
# NOTE: This example uses the ALPHA release of the next generation Twilio
# helper library - for more information on how to download and install this
# version, visit
# https://www.twilio.com/docs/libraries/python#accessing-preview-twilio-features
from twilio.rest import Client
# Account SID and Auth Token are found i... | teoreteetik/api-snippets | proxy/quickstart/create-service/create-service.6.x.py | Python | mit | 617 | [
"VisIt"
] | ba420f361ecd56f35345e0b3a3d18c1c168a69cae14bd49f1e079c4c9cea31e0 |
'''@package docstring
@author: Jyh-Miin Lin (Jimmy), Cambridge University
@address: jyhmiinlin@gmail.com
Created on 2013/1/21
================================================================================
This file is part of pynufft.
pynufft is free software: you can redistribute it and/or modify
it u... | jyhmiinlin/cineFSE | CsTransform/back_pynufft.py | Python | gpl-3.0 | 57,202 | [
"Mayavi"
] | c8e7078fdef41a6148a939f7613233eb7e3679712aec00e1c00e1dd122e4d8ba |
"""This module parses the VTK methods, obtains the argument and return
type information, and organizes them.
"""
# Author: Prabhu Ramachandran
# Copyright (c) 2004-2007, Enthought, Inc.
# License: BSD Style.
import re
import types
# Local imports (these are relative imports for a good reason).
import class_tree
impo... | liulion/mayavi | tvtk/vtk_parser.py | Python | bsd-3-clause | 26,870 | [
"VTK"
] | f6ffabce3395c53fc6cbac95085b8ded85c67a54922627633e4ceed5c3ce45f5 |
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | won0089/oppia | scripts/build.py | Python | apache-2.0 | 3,633 | [
"GULP"
] | f8eda6d67be663c5253f08dfc4db3020511826457a5a145842aa99a7682ed19d |
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@ansible.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 ... | dcrosta/ansible | lib/ansible/cli/galaxy.py | Python | gpl-3.0 | 24,547 | [
"Galaxy"
] | ef2192d4c9f74c05868c6a8c14fd34074754f38b2c0dd9f45d00d6ca9b43432b |
"""
DIRAC - Distributed Infrastructure with Remote Agent Control
The distributed data production and analysis system of LHCb and other VOs.
DIRAC is a software framework for distributed computing which
allows to integrate various computing resources in a single
system. At the same time it integrates al... | Andrew-McNab-UK/DIRAC | __init__.py | Python | gpl-3.0 | 5,925 | [
"DIRAC"
] | 997beab5aeb265e1a18df0292bae72f18f18bcc9d15b115becb883732f380241 |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import * # NOQA
standard_library.install_aliases() # NOQA
import copy
from logging import getLogger
import chainer
fr... | toslunar/chainerrl | chainerrl/agents/ddpg.py | Python | mit | 17,802 | [
"Gaussian"
] | f53371a420d1224b303ee37138a6f26520eaa4d608ad2eb81b7f1a78c84a8b41 |
#!/usr/bin/env python
__author__ = "Sergio Latorre"
__license__ = "GPL"
__email__ = "sergio.latorre@tuebingen.mpg.de"
from sys import exit
try:
from Bio import Entrez
except ImportError:
exit("Biopython module is missing. Try to install it by typing: pip install Biopython")
from urllib2 import urlopen
import p... | smlatorreo/get_closest_reference_genome | get_closest_reference_genome.py | Python | gpl-3.0 | 3,503 | [
"Biopython"
] | d653c1adec99023184b488718e9ea5b01967c1964c0f570d1db712b027e2da6a |
"""
DictCache.
"""
__RCSID__ = "$Id$"
import datetime
# DIRAC
from DIRAC.Core.Utilities.LockRing import LockRing
class DictCache( object ):
"""
.. class:: DictCache
simple dict cache
"""
def __init__( self, deleteFunction = False ):
"""
Initialize the dict cache.
If a delete function is sp... | coberger/DIRAC | Core/Utilities/DictCache.py | Python | gpl-3.0 | 4,837 | [
"DIRAC"
] | 3dc2805bb679d828a516db67c440dde2f41582f198f8e1646f3027558f0b8050 |
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Collection of modules for dealing with biological data in Python.
The Biopython Project is ... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/__init__.py | Python | gpl-2.0 | 3,764 | [
"Biopython"
] | 92d68394da93bb611ed9e834b4d26edde8b6523b304d1dce2ed5391031562060 |
# Note: Tests for the TitlesAlignments class are in blast/test_titles.py
# and diamond/test_titles.py because that class needs a concrete
# (iterable) dark.alignments.ReadsAlignments class passed to its
# __init__. The tests below test the simpler dark.titles classes,
# TitleAlignment and Title... | terrycojones/dark-matter | test/test_titles.py | Python | mit | 42,821 | [
"BLAST"
] | 707749965f3c5d80b06ea2010e8efb5b0cd854d69c18ffa84eaf9158f773d864 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/graphs.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, th... | 0x0mar/king-phisher | king_phisher/client/graphs.py | Python | bsd-3-clause | 10,887 | [
"VisIt"
] | 79f7b4de04ac5225c5cb3d247e77709d686d2c9d71182e97505278faeb8471f8 |
__author__ = 'ddeconti'
import FileHandler
import numpy
import pickle
import sys
from rdkit import Chem, DataStructs
from sklearn import svm, datasets
from sklearn.cross_validation import train_test_split
def svc_training(target, control):
np_fps = []
for fp in target + control:
arr = numpy.zeros((1... | dkdeconti/PAINS-train | training_methods/classifier/linear_svc_analysis.py | Python | mit | 1,406 | [
"RDKit"
] | 9fddc308cf2bc8f6c4e814aaaf78874bf4b235fbef1370c8499703db598ad9ee |
Keras is like front end and Tensorflow/Theano like backend
The best part of Keras is that the 'best-practices' are built-in
It also comes with pre-trained models for image recognition! How cool is that ;)
Tensorflow = Google
Theano = University of Montreal (MILA)
Tensorflow is low-level, but has more control.
Keras ... | iitjee/SteppinsMachineLearning | Keras/00 Intro.py | Python | apache-2.0 | 2,773 | [
"NEURON"
] | 6033c8cf232a68700c2cd23fee694bc5d7e3cee6850bc265d87d3e5ed97fa583 |
import numpy
import random
from rdkit.ML.DecTree import ID3
from rdkit.ML.DecTree import CrossValidate
def GenRandomExamples(nVars=10,randScale=0.3,bitProb=0.5,nExamples=500,seed=(0,0),
addResults=1):
random.seed(seed[0])
varWeights = numpy.array([random.random() for x in range(nVars)])*r... | rdkit/rdkit-orig | rdkit/ML/DecTree/randomtest.py | Python | bsd-3-clause | 1,060 | [
"RDKit"
] | c1fa7f99ba73f0becd7fd52f4c642d13cc215b683f87c3d7951caff067ed3969 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import numpy as np
import math
import itertools
import collections
import warnings
from monty.json import MSONable
from pymatgen.core.periodic_table import get_el_sp
fr... | gpetretto/pymatgen | pymatgen/electronic_structure/bandstructure.py | Python | mit | 41,659 | [
"CRYSTAL",
"pymatgen"
] | 70adda6077264d8a2e45006bef01f163555e3c013cf1241f8fac1afe12751485 |
import matplotlib.pyplot as plt
import numpy as np
def plot():
# Make plot with horizontal colorbar
fig = plt.figure()
ax = fig.add_subplot(111)
np.random.seed(123)
data = np.clip(np.random.randn(250, 250), -1, 1)
cax = ax.imshow(data, interpolation="nearest")
ax.set_title("Gaussian nois... | nschloe/matplotlib2tikz | tests/test_noise2.py | Python | mit | 667 | [
"Gaussian"
] | e82ad0d734b9adc0ac845be67fad0e53fab0ec19fe2a8055340202f822801c64 |
#!/usr/bin/env python
########################################################################
# File : dirac-wms-get-normalized-queue-length.py
# Author : Ricardo Graciani
########################################################################
"""
Report Normalized CPU length of queue
This script was used by the... | yujikato/DIRAC | src/DIRAC/Interfaces/scripts/dirac_wms_get_normalized_queue_length.py | Python | gpl-3.0 | 1,525 | [
"DIRAC"
] | b7507fedade1e0c91f17f91731502ecad27b5952f4894ffb621a8d36126baa08 |
"""Minimal Python 2 & 3 shim around all Qt bindings
DOCUMENTATION
Qt.py was born in the film and visual effects industry to address
the growing need for the development of software capable of running
with more than one flavour of the Qt bindings for Python - PySide,
PySide2, PyQt4 and PyQt5.
1. Bu... | pyblish/pyblish-qml | pyblish_qml/vendor/Qt.py | Python | lgpl-3.0 | 63,899 | [
"VisIt"
] | 165fd34878e1ef4b8dd96c02fe911bc7401f141a4dc8fb3b2c6ca4c2198ce7d7 |
# fileloader.py ---
#
# Filename: fileloader.py
# Description:
# Author:
# Maintainer:
# Created: Mon Feb 25 15:59:54 2013 (+0530)
# Version:
# Last-Updated: Wed May 22 12:30:14 2013 (+0530)
# By: subha
# Update #: 106
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
# Dialog for load... | dilawar/moose-full | moose-gui/loaderdialog.py | Python | gpl-2.0 | 3,433 | [
"MOOSE"
] | 83c6e321643710d634136b197e7322e1c53b50aa73b37aa457b07aaad8604c47 |
__RCSID__ = "$Id$"
""" FileCatalogFactory class to create file catalog client objects according to the
configuration description
"""
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCatalogPath
from DIRAC.Resources.Catalog.FileCatalogProxyClient ... | vmendez/DIRAC | Resources/Catalog/FileCatalogFactory.py | Python | gpl-3.0 | 2,272 | [
"DIRAC"
] | ab3b7958ed7102f0d33c6c9cb1456a0b044574606a6a919ae4f4c8d7d0b8fa69 |
from dirac.tests import *
class TestControlController(TestController):
def test_index(self):
response = self.app.get(url_for(controller='web/control'))
# Test response...
| DIRACGrid/DIRACWeb | dirac/tests/functional/test_web_control.py | Python | gpl-3.0 | 193 | [
"DIRAC"
] | 8e6fedead02a4367b54ed6810588b87f6560a91bb88090149beaac2725070911 |
from __future__ import print_function
import sys
from sympy import symbols,sin,cos
from galgebra.printer import Format,xpdf,Get_Program,Print_Function
from galgebra.ga import Ga
def Maxwells_Equations_in_Geom_Calculus():
Print_Function()
X = symbols('t x y z',real=True)
(st4d,g0,g1,g2,g3) = Ga.build('gamm... | arsenovic/galgebra | examples/LaTeX/physics_check_latex.py | Python | bsd-3-clause | 3,934 | [
"DIRAC"
] | 32af54dbcbac48bf33b7e413165d531928df2e8b71747180fb89556dc73303f5 |
# This file is adapted from https://github.com/ray-project/ray/blob
# /master/examples/parameter_server/async_parameter_server.py
#
# Copyright 2018 Analytics Zoo 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 obt... | intel-analytics/analytics-zoo | pyzoo/zoo/examples/ray_on_spark/parameter_server/async_parameter_server.py | Python | apache-2.0 | 6,132 | [
"ORCA"
] | 43bef9a32c453d756377ad07b6e8c769d4bab8ab268bad9aff9402026d3fade1 |
"""Validate dependencies."""
import ast
from pathlib import Path
from typing import Dict, Set
from homeassistant.requirements import DISCOVERY_INTEGRATIONS
from .model import Integration
class ImportCollector(ast.NodeVisitor):
"""Collect all integrations referenced."""
def __init__(self, integration: Integ... | postlund/home-assistant | script/hassfest/dependencies.py | Python | apache-2.0 | 7,826 | [
"VisIt"
] | 565929dc6c82434e6e84bf53c1c0d7cbea364fdb72ad742289b7d8d1c300ed61 |
"""
Helper Classes and Functions for docking fingerprint computation.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar and Jacob Durrant"
__license__ = "GNU General Public License"
import math
import os
import subprocess
... | joegomes/deepchem | deepchem/feat/nnscore_utils.py | Python | mit | 17,214 | [
"RDKit"
] | 2287a9f326898ad09dd35ed190af88519891ad993895e83f025272791b8b7dae |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.