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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''Density expansion on plane waves'''
import sys
import copy
import numpy
import h5py
from pyscf import lib
from pyscf import gto
from pyscf import dft
from pyscf.pbc import tools
from pyscf.pbc import gto as pgto
from pyscf.pbc.df import ft_ao
... | sunqm/mpi4pyscf | mpi4pyscf/pbc/df/fft.py | Python | gpl-3.0 | 9,680 | [
"PySCF"
] | 17299b8547ea1da0340df90b6632f1baee4c3aa0dcd1f6cb19003bc9679660d5 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# Copyright (c) 2010 Brian E. Granger
#
# This file is part of pyzmq.
#
# pyzmq is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation; either versi... | takluyver/pyzmq | zmq/tests/test_message.py | Python | lgpl-3.0 | 7,325 | [
"Brian"
] | 828dccff6be56f7509a784615f18e7cbc6fcaa5853b2d14443a00f601dbfad29 |
# This plugin is adapted from the Python Console plugin and the IPython
# cookbook at:
# http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK
# Copyright (C) 2009-2010 Brian Parma
# Updated 2012 Brian Parma
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU... | Zarokka/exaile | plugins/ipconsole/__init__.py | Python | gpl-2.0 | 7,800 | [
"Brian"
] | 63eb632f84c266e981cf1668eb0bbfc7a6d189b370653f158607991b5b659117 |
# Copyright 2015 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... | awni/tensorflow | tensorflow/python/ops/control_flow_grad.py | Python | apache-2.0 | 7,614 | [
"VisIt"
] | b65a8ed753f0cbb03a9fffa453d3423c8412c7d8eb2913cca75c52f63b583f57 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
%prog blastfile --qsizes query.sizes --ssizes subject.sizes
Visualize the blastfile in a dotplot. At least one of --qsizes and --qbed must
be specified, also at least one of --ssizes and --sbed. The --sizes options help
to define the molecule border as well as the dra... | sgordon007/jcvi_062915 | graphics/blastplot.py | Python | bsd-2-clause | 9,940 | [
"BLAST"
] | a1fb423e10e498437e4b8293ffa5f00c858c0b3416ab4ca4f09bced528fef180 |
import io
import os
import re
from setuptools import setup
def read(path, encoding='utf-8'):
path = os.path.join(os.path.dirname(__file__), path)
with io.open(path, encoding=encoding) as fp:
return fp.read()
def version(path):
"""Obtain the packge version from a python file e.g. pkg/__init__.py... | pablodecm/cartographer | setup.py | Python | mit | 2,305 | [
"VisIt"
] | ba1ecb2b2bac36de3514f5edfc28fa063e28bac6e9f935a875ea469ebfad2f9c |
from sympy.physics.matrices import msigma, mgamma, minkowski_tensor, pat_matrix, mdft
from sympy import zeros, eye, I, Matrix, sqrt, Rational
def test_parallel_axis_theorem():
# This tests the parallel axis theorem matrix by comparing to test
# matrices.
# First case, 1 in all directions.
mat1 = Matr... | wxgeo/geophar | wxgeometrie/sympy/physics/tests/test_physics_matrices.py | Python | gpl-2.0 | 2,619 | [
"DIRAC"
] | f35a037420413a10fa3cd1dcc8bf028c02e7d22c547571a4754e135ce30b3a24 |
"""
A simple VTK input file for PyQt, the qt bindings for python.
See http://www.trolltech.com for qt documentation, and
http://www.river-bank.demon.co.uk or http://www.thekompany.com
for the qt python bindings.
This class is based on the vtkGenericRenderWindowInteractor and is
therefore fairly powerful. It should al... | b3c/VTK-5.8 | Wrapping/Python/vtk/qt/QVTKRenderWindowInteractor.py | Python | bsd-3-clause | 11,991 | [
"CRYSTAL",
"VTK"
] | 028ffda460924a2305cf75cf6babeafc7d6f934c074c55687e4daa51379a0795 |
#!/usr/bin/env python
import os
from log import get_logger, interlog
import uuid
import numpy as np
from generate import generate_pseudo, test_pseudo
from calc_delta import DeltaCalculation
def find_pseudo(settings):
cwd = os.getcwd()
element = settings.calc["element"]
fdf_file = os.path.join(cwd, "siest... | ansobolev/PseudoGenerator | pseudogen/find_pseudo.py | Python | mit | 1,311 | [
"SIESTA"
] | 34d4a5cb0bff4374e7c1b8118f2066cb1df6da2080df0f473f83881c5243585c |
"""
Tests for geography support in PostGIS
"""
import os
from unittest import skipIf, skipUnless
from django.contrib.gis.db import models
from django.contrib.gis.db.models.functions import Area, Distance
from django.contrib.gis.measure import D
from django.db import connection
from django.db.models.functions import Ca... | edmorley/django | tests/gis_tests/geogapp/tests.py | Python | bsd-3-clause | 6,982 | [
"VisIt"
] | d7830e05b00e273e77d5c2e995af3ead6247f349a554543a0158c73a6468cf42 |
## polymer section
# check connectivity of atoms of a polymer
# sometimes, "a broekn polymer" may happen due to periodic boundary condition
# input:
# mda_system mda.Universe(structure,input)
# select selection command
# nmol number of polymer molecules
# cutoff cut-off distance to check connectivity
# m... | jht0664/Utility_python_gromacs | python/hjung/polymer.py | Python | mit | 2,031 | [
"Gromacs",
"MDAnalysis"
] | 2b8e3dbe64ad874334fa03d9a10f22f5a7807043c14e026e5a3be8ffe6b4ec6e |
"""
Tests for the Piwik template tags and filters.
"""
from django.contrib.auth.models import User
from django.http import HttpRequest
from django.template import Context
from django.test.utils import override_settings
from analytical.templatetags.piwik import PiwikNode
from analytical.tests.utils import TagTestCase
... | machtfit/django-analytical | analytical/tests/test_tag_piwik.py | Python | mit | 4,964 | [
"VisIt"
] | cb792dde7e0d54517d01542d8688d170d6b0a5a7d3d363eaa428f0ba14dcf2e4 |
import threading
import datetime
import sys
import os
import csv
import io
from PyQt5 import QtCore, QtGui, uic, QtWidgets
from PyQt5.QtCore import QCoreApplication as QC
from opensnitch import ui_pb2
from opensnitch.config import Config
from opensnitch.version import version
from opensnitch.nodes import Nodes
from o... | evilsocket/opensnitch | ui/opensnitch/dialogs/stats.py | Python | gpl-3.0 | 89,901 | [
"VisIt"
] | 5d5da6317f75162986f54f8da32f6582904c2241d0da24af30ee7c0d15c2c4ce |
import os
from setuptools import setup,find_packages
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.j... | cypherai/PySyft | setup.py | Python | apache-2.0 | 1,117 | [
"Amber"
] | 2fdf7eb71168faaa9d961e7603c989020550ac667437a79b3bea5b7f1345dc0b |
#!/usr/bin/env python
"""
TurnkeyLaserExporter
-----------------------------------
Maintained by Turnkey Tyranny (https://github.com/TurnkeyTyranny/laser-gcode-exporter-inkscape-plugin)
Designed to run on Ramps 1.4 + Marlin firmware on a K40 CO2 Laser Cutter.
Based on think|haus gcode inkscape extension
Based on a sc... | giomasce/thlaser-inkscape-plugin | turnkeylaser.py | Python | gpl-2.0 | 60,842 | [
"VisIt"
] | e2773d9ad2d1804dc449870222cb0a0274ad2068c23facb273398c4b530070c4 |
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2006-2014, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Public version 2.1 or later. ... | Clyde-fare/cclib | src/cclib/parser/__init__.py | Python | lgpl-2.1 | 1,190 | [
"ADF",
"GAMESS",
"Gaussian",
"Jaguar",
"Molpro",
"NWChem",
"ORCA",
"cclib"
] | ac623f2c208d31471874574f3ffedf7631a900234815d86d3fc326e609915139 |
"""
lwr_client
==========
This module contains logic for interfacing with an external LWR server.
------------------
Configuring Galaxy
------------------
Galaxy job runners are configured in Galaxy's ``job_conf.xml`` file. See ``job_conf.xml.sample_advanced``
in your Galaxy code base or on
`Bitbucket <https://bitbu... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/jobs/runners/lwr_client/__init__.py | Python | gpl-3.0 | 1,873 | [
"Galaxy"
] | 83cbb8e84f8de4492189dee1abbb90b85921e997f53e736c6b44e7f7a2c5c67b |
from __future__ import division, print_function; __metaclass__ = type
import os
import errno
import random
import time
import glob
import numpy as np
import west
from west.propagators import WESTPropagator
from west import Segment
from west.states import BasisState, InitialState
import simtk.openmm.openmm as openmm
im... | nrego/westpa | lib/examples/wca-dimer_openmm/we_custom/openmm_propagator.py | Python | gpl-3.0 | 9,399 | [
"OpenMM"
] | 06be87de16052591d01fa372dfb300add7691229a25b78c1cc83ce116537f4ab |
import neuron
if __name__ == '__main__':
neuron.measure_ca2()
| lennart96/neurons | main.py | Python | isc | 67 | [
"NEURON"
] | 59c955167344c80964142a30e490e39886c774428d4fe30937bfff1222d29c93 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cached networks to use with the population classes, as the only
variables being used is "nodes_ex" and "nodes_in" VERSION THAT WORKS.
"""
import numpy as np
import os
from glob import glob
if 'DISPLAY' not in os.environ:
import matplotlib
matplotlib.use('Agg')
f... | espenhgn/hybridLFPy | hybridLFPy/cachednetworks.py | Python | gpl-3.0 | 26,644 | [
"NEURON"
] | f3ca59f567b68e468af5808aa20c6880814f8623c3ac880ec9684ceccd5c7fc6 |
# Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <ling.thio@gmail.com>
from __future__ import print_function # Use print() instead of print
from flask import url_for
def test_page_urls(client):
# Visit home page
response = client.get(url_for('core.home_page'))
assert b'<h1>Ho... | sanchousese/Flask-User-starter-app | tests/test_page_urls.py | Python | bsd-2-clause | 1,743 | [
"VisIt"
] | d91350b5174edae62c6c1f09ae9fc780dffe441108d2e0b593cb623d967f47ac |
# DONT CHANGE THESE !!
VISIT_REASON = [
('scheduled', '1. Scheduled visit/contact'),
('missed', '2. Missed Scheduled visit'),
('unscheduled', '3. Unscheduled visit at which lab samples or data are being submitted'),
]
| botswana-harvard/eit | eit/apps/eit_infant/choices.py | Python | gpl-3.0 | 231 | [
"VisIt"
] | 7e9a1fe1ab111e02699d79f0c5c8be47517db4bc478ce7c11402f675a7ace496 |
"""Test Axis VMD4 API.
pytest --cov-report term-missing --cov=axis.applications.vmd4 tests/applications/test_vmd4.py
"""
import json
import pytest
import respx
from axis.applications.vmd4 import Vmd4
from ..conftest import HOST
@pytest.fixture
def vmd4(axis_device) -> Vmd4:
"""Returns the vmd4 mock object.""... | Kane610/axis | tests/applications/test_vmd4.py | Python | mit | 3,856 | [
"VMD"
] | 147b5eb3df075a6e6c5ede74778911f6642a362ca4982423c826c8161a4be93a |
import datetime
import json
import unittest
from unittest.mock import Mock
import pytz
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import Val... | torchbox/wagtail | wagtail/core/tests/test_page_model.py | Python | bsd-3-clause | 137,322 | [
"MOOSE"
] | 26ab83435b1fd1dab72f4d0321d724b895d16fa9428c0f5ad14c536153cccf2e |
#-----------------------------------------------------------------
# _ast_gen.py
#
# Generates the AST Node classes from a specification given in
# a configuration file
#
# The design of this module was inspired by astgen.py from the
# Python 2.5 code-base.
#
# Eli Bendersky [http://eli.thegreenplace.net]
# License: BS... | Widiot/simpleblog | venv/lib/python3.5/site-packages/pycparser/_ast_gen.py | Python | mit | 8,675 | [
"VisIt"
] | e6e25129ee9b7c193262093ebfdadbff6e5eba071205787d4d3a4dc4878da210 |
"""
Test Display Options
"""
__RCSID__ = "$Id$"
import unittest
import thread
from DIRAC.FrameworkSystem.private.standardLogging.test.TestLoggingBase import Test_Logging, gLogger, cleaningLog
class Test_DisplayOptions(Test_Logging):
"""
Test the creation of subloggers and their properties
"""
def setUp(se... | chaen/DIRAC | FrameworkSystem/private/standardLogging/test/Test_DisplayOptions.py | Python | gpl-3.0 | 9,182 | [
"DIRAC"
] | 0bca2175b2eb282e96250288a156eb8f326fefa599b0971e73d74e930a8b09ce |
from asap3 import *
from ase.lattice.cubic import FaceCenteredCubic
from asap3.testtools import ReportTest
atoms = FaceCenteredCubic(size=(5,5,5), symbol="Cu")
pot = EMT()
atoms.set_calculator(pot)
for i in (1, 2):
print "*** Pass", i
ReportTest("Energy required", pot.calculation_required(atoms, ["energy"]), ... | auag92/n2dm | Asap-3.8.4/Test/CalculationRequired.py | Python | mit | 1,467 | [
"ASE"
] | 2210897ccdeaed86efd7b824384440014254ab35b487d5851acb5301d3907c13 |
#!/usr/bin/env python
__author__ = "waroquiers"
import os
import shutil
import networkx as nx
from pymatgen.analysis.chemenv.connectivity.environment_nodes import (
EnvironmentNode,
get_environment_node,
)
from pymatgen.util.testing import PymatgenTest
try:
import bson # type: ignore # Ignore bson i... | gmatteo/pymatgen | pymatgen/analysis/chemenv/connectivity/tests/test_environment_nodes.py | Python | mit | 2,091 | [
"pymatgen"
] | 0bdaf89461decb4e7fb22601e0a20fa87b252984448531428cfe55a28d1bc118 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""This file contains code for use with "Think Stats" and
"Think Bayes", both by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
"""... | qrsforever/workspace | python/learn/thinkbayes/thinkbayes2.py | Python | mit | 75,544 | [
"Gaussian"
] | e0fdb6b15c11c354538fc8c44319bb9f8331a18e4d7a13e90dd48952967d41b9 |
'''
Pulse characterization
Created Fri May 12 2017
@author: cpkmanchee
'''
import numpy as np
import os.path
import inspect
from beamtools.constants import h,c,pi
from beamtools.common import normalize, gaussian, sech2, alias_dict
from beamtools.import_data_file import import_data_file as _import
from beamtools.imp... | kikimaroca/beamtools | build/lib/beamtools/pulse.py | Python | mit | 9,048 | [
"Gaussian"
] | 16c6fdea4bceb7528f29534324fc75f14954c68d888e87b5c1294660caac01b0 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpat... | gavmain/django_demo | config/urls.py | Python | mit | 1,665 | [
"VisIt"
] | 96c881e7c1bfca5261fe121e8b491b82a5a8bacbf8d987fd7c5baf8b9e796645 |
from __future__ import division
from subprocess import call
from matplotlib.ticker import AutoMinorLocator
from matplotlib.ticker import MultipleLocator
from matplotlib.ticker import FixedLocator
from matplotlib.ticker import LogLocator
from matplotlib.ticker import FormatStrFormatter
from sets import Set
import sy... | tripatheea/Riemann-Zeta | python/random_matrices.py | Python | mit | 5,531 | [
"Gaussian"
] | c946f2b0f72029f52060f7921e2940580d055d62e22a72101917738db120e3df |
import sys
import pprint
class Reference(object):
def __init__(self, tb_index, varname, target):
self.tb_index = tb_index
self.varname = varname
self.target = target
def marker(self, xtb, tb_index, key):
return Marker(self, xtb, tb_index, key)
class Marker(object):
def... | Hypernode/xtraceback | xtraceback/reference.py | Python | mit | 1,552 | [
"xTB"
] | cc2282ad552d0c43ddaa993c62fe808df5db2398507237f099b16db5b2b13817 |
##############################################################################
# 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/r-genefilter/package.py | Python | lgpl-2.1 | 1,882 | [
"Bioconductor"
] | 99bf8ecfc2dbada7598a221cfda13f66f5ae0d1a27c6eec6d2722dca8af72f67 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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... | googleapis/google-api-python-client | samples/analytics/management_v3_reference.py | Python | apache-2.0 | 14,762 | [
"VisIt"
] | ecd2a6f99cf5634a4f2b458b7efc7f7f41c66710b50b5e6a23f70b37ddedc34d |
#!/usr/bin/env python2
# Copyright (C) 2016-2017(H)
# Max Planck Institute for Polymer Research
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eit... | kkreis/espressopp | examples/electrostatics/electrostatics_example.py | Python | gpl-3.0 | 10,081 | [
"CRYSTAL",
"ESPResSo",
"VMD"
] | 58312be13b673ccccd0c3cae52ffe2bf70e31aeafabfcc2b2d8db2558ba2441c |
from __main__ import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import os
import numpy
import pickle
import json
#
# Load Files
#
class EasyClip(ScriptedLoadableModule):
def __init__(self, parent):
ScriptedLoadableModule.__init__(self, parent)
parent.title = "Easy Clip"
... | DCBIA-OrthoLab/EasyClip-Extension | EasyClip/EasyClip.py | Python | apache-2.0 | 33,447 | [
"VTK"
] | 804e3e9882578295e1fb05fb71a1fc81e62d1160b72093a56dc218ea5a2293e7 |
# run NESTRandConnMat_v2.py 101 1. -18. 1.8 5000.
import nest
import nest.raster_plot
import nest.voltage_trace
import parameters_v1 as pm
import numpy as np
import matplotlib.pylab as pl
import sys
import time
file_name = sys.argv[1]
conmat = np.load("eigens/"+file_name+".dat")
#prefix = file_name+"_"+sys.argv[2]+"... | kalfasyan/DA224x | code/NESTRandConnMat_v2.py | Python | gpl-2.0 | 3,002 | [
"NEURON"
] | 85a34f80a09c9143895a2b937ee79d5193ebffc72749c7290e65b74db9b74134 |
""" JobLoggingDB class is a front-end to the Job Logging Database.
The following methods are provided
addLoggingRecord()
getJobLoggingInfo()
deleteJob()
getWMSTimeStamps()
"""
__RCSID__ = "$Id$"
import time
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import Time
from DIRAC.Core.Bas... | chaen/DIRAC | WorkloadManagementSystem/DB/JobLoggingDB.py | Python | gpl-3.0 | 5,672 | [
"DIRAC"
] | 30bbf2e610926f417e7487c2394b29fd1f358824cfd46aef5fa938b2984fe373 |
"""Unit tests for BioCMA."""
import unittest
from cStringIO import StringIO
from Bio import SeqIO
from biocma import biocma, cma, utils
EX_CMA = "fikk.cma"
EX_FASTA = "fikk-full.fasta"
class IOTests(unittest.TestCase):
"""Tests for parsing and writing the CMA format."""
def test_read(self):
block ... | etal/biocma | test/test_all.py | Python | bsd-2-clause | 3,052 | [
"Biopython"
] | f54f07387718de5cdbf684b122a3084098fd30a8849ddda7682a2a97cd826710 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | thaim/ansible | lib/ansible/modules/network/avi/avi_pkiprofile.py | Python | mit | 5,555 | [
"VisIt"
] | 7543ee002a1bbabc0651734c9d36e28663f394602ce978ac55fbed9168f247d4 |
''' Test_RSS_Policy_SpaceTokenOccupancyPolicy
'''
import unittest
import DIRAC.ResourceStatusSystem.Policy.SpaceTokenOccupancyPolicy as moduleTested
################################################################################
class SpaceTokenOccupancyPolicy_TestCase( unittest.TestCase ):
def setUp( self ):
... | hgiemza/DIRAC | ResourceStatusSystem/Policy/test/Test_RSS_Policy_SpaceTokenOccupancyPolicy.py | Python | gpl-3.0 | 3,959 | [
"DIRAC"
] | daf5b4b114a36650a47c938b88dbb548bde99968f2a771cf4be80d904998657d |
""" HTTP controllers for the HXL Proxy
All of the Flask controllers are in this module.
See unit tests in tests/test_controllers.py
Started January 2015 by David Megginson
License: Public Domain
"""
import hxl_proxy
from hxl.io import HXLIOException
from hxl_proxy import admin, app, auth, cache, caching, dao, exce... | HXLStandard/hxl-proxy | hxl_proxy/controllers.py | Python | unlicense | 54,810 | [
"VisIt"
] | e342a1dc62b94449d8e5d72fac48f78ef0e18a79b5a72342a69fe081d15c6fc1 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | Azure/azure-sdk-for-python | sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_models_py3.py | Python | mit | 79,941 | [
"ASE"
] | e604d4fce74aa8194f2f7e51ac5a99923c45814e2732f952d404a559eaa3ebf7 |
from __future__ import print_function
import os
import shutil
import itertools
import tempfile
import subprocess
from distutils.spawn import find_executable
import numpy as np
import mdtraj as md
from mdtraj.testing import get_fn, eq, skipif
HAVE_DSSP = find_executable('mkdssp')
DSSP_MSG = "This tests required mkds... | casawa/mdtraj | mdtraj/geometry/tests/test_dssp.py | Python | lgpl-2.1 | 3,448 | [
"MDTraj"
] | dda275caf3290f2d4f173508b81ff4249b92b954f796f21a6f86637026565991 |
# coding: utf-8
"""
This module provides objects describing the basic parameters of the
pseudopotentials used in Abinit, and a parser to instantiate pseudopotential objects..
"""
from __future__ import unicode_literals, division, print_function
import sys
import os
import abc
import collections
import json
import six... | yanikou19/pymatgen | pymatgen/io/abinitio/pseudos.py | Python | mit | 57,656 | [
"ABINIT",
"pymatgen"
] | de7fbeca32d8e926e204cafbefbd5e097901576349c5e8fec39f61687e79ebf2 |
#__docformat__ = "restructuredtext en"
# ******NOTICE***************
# optimize.py module by Travis E. Oliphant
#
# You may copy and use this module as you see fit with no
# guarantee implied provided you keep this notice in all copies.
# *****END NOTICE************
# A collection of optimization algorithms. Version ... | mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/scipy/optimize/optimize.py | Python | mit | 104,561 | [
"Gaussian"
] | 55859d6fc5e4310b1eb486c151cb37f16dfd854371d0a64f92c28fa1db84a9a7 |
"""CRYSTAL calculator interface."""
# Copyright (C) 2016 Antti J. Karttunen (antti.j.karttunen@iki.fi)
# All rights reserved.
#
# This file is part of phonopy.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Red... | atztogo/phonopy | phonopy/interface/crystal.py | Python | bsd-3-clause | 13,116 | [
"CRYSTAL",
"VASP",
"phonopy"
] | 74e0eec357cf55946ba758fcb179af4cf5321bf69bb521b650e2ccc0c0011455 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Filters/General/Testing/Python/spatialRepAll.py | Python | gpl-3.0 | 3,220 | [
"VTK"
] | b8057da24f93a69cc8f6c90111e4239331715a09f946e09fd00b8197bc8f5c6d |
# vim: fdm=indent
'''
author: Fabio Zanini
date: 17/03/15
content: Clustering functions
'''
# Modules
import numpy as np
# Functions
def energy_function(v, e1, e2):
'''Energy function to minimize for the cluster-making'''
# NOTE: v comes in as a flattened array, but it's a 2D vector
N = v.sh... | iosonofabio/clusterforce | clusterforce/clustering.py | Python | bsd-2-clause | 8,227 | [
"Biopython"
] | 8a92e57168a74a110b35e92826ac6f7dd554fa660fd652fe2caff57b8e0155dd |
import os
import re
import ast
from setuptools import setup, find_packages
from setuptools.command.build_ext import build_ext as _build_ext
package_name = "omicexperiment"
# version parsing from __init__ pulled from scikit-bio
# https://github.com/biocore/scikit-bio/blob/master/setup.py
# which is itself based off F... | bassio/omicexperiment | setup.py | Python | bsd-3-clause | 2,621 | [
"scikit-bio"
] | e0f78a87c2ad6b2484b53f88cee911b732e016371f184062cf19018eea9851d8 |
from __future__ import absolute_import
import re
import sys
import copy
import codecs
import itertools
from . import TypeSlots
from .ExprNodes import not_a_constant
import cython
cython.declare(UtilityCode=object, EncodedString=object, bytes_literal=object, encoded_string=object,
Nodes=object, ExprNode... | ryfeus/lambda-packs | HDF4_H5_NETCDF/source2.7/Cython/Compiler/Optimize.py | Python | mit | 207,837 | [
"VisIt"
] | 503bb869d102d625515decc9a6cf4356006c24f01229b6f33d64f4e90e8540b9 |
# TODO: Determine which tests are valid for GLSAR, and under what conditions
# TODO: Fix issue with constant and GLS
# TODO: GLS: add options Iterative GLS, for iterative fgls if sigma is None
# TODO: GLS: default if sigma is none should be two-step GLS
# TODO: Check nesting when performing model based tests, lr, wald,... | jseabold/statsmodels | statsmodels/regression/linear_model.py | Python | bsd-3-clause | 113,147 | [
"Gaussian"
] | ae953fa26eee8502e4ffa5b65a282f95a88224dc19464ed471a46a1a360a3db2 |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import xrange
import numpy as np
from matplotlib.testing.decorators import image_comparison, knownfailureif
from matplotlib.delaunay.triangulate import Triangulation
from matplotlib i... | yavalvas/yav_com | build/matplotlib/lib/matplotlib/tests/test_delaunay.py | Python | mit | 6,833 | [
"Gaussian"
] | 0943ec6af17666830a8aaeae52d2aed77e0262de50430f7ef3feec41c8004ed7 |
import numpy.random as rand
# Creating a 100-element array with random values
# from a standard normal distribution or, in other
# words, a Gaussian distribution.
# The sigma is 1 and the mean is 0.
a = rand.randn(100)
# Here we generate an index for filtering
# out undesired elements.
index = a > 0.2
b = a[index]
#... | ebressert/ScipyNumpy_book_examples | python_examples/numpy_22_ex2.py | Python | mit | 469 | [
"Gaussian"
] | f0fecd404aea88133f84b5606fbf1a7eafa165b6afa6c99e9911b6ae1b53d554 |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Documentation is intended to be processed by Epydoc.
"""
Introduction
============
The Munkres module provides an implementation of the Munkres algorithm
(also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
useful for solving the Assignment Problem... | rembo10/headphones | lib/munkres.py | Python | gpl-3.0 | 24,733 | [
"Brian"
] | 802e1c3ddf28362083f27ca22e846524a52aca9aedbd8349b3de615dac183299 |
from nanopore.analyses.abstractAnalysis import AbstractAnalysis
from nanopore.analyses.utils import AlignedPair, getFastaDictionary, getFastqDictionary, samIterator
import os
import pysam
import xml.etree.cElementTree as ET
from jobTree.src.bioio import reverseComplement, prettyXml, system
from itertools import product... | mitenjain/nanopore | nanopore/analyses/substitutions.py | Python | mit | 4,018 | [
"pysam"
] | 642a33605294a9e0cf6ff5535a14edc4dbd8730adb36c9f77b0bbe5cba81dec6 |
#!/usr/bin/env python
#
# $File: statNeTemporal.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistri... | BoPeng/simuPOP | docs/statNeTemporal.py | Python | gpl-2.0 | 1,789 | [
"VisIt"
] | ce140e351d22f27f44d20b8a4cfb191cadbdc288a9fe6688a1fa905fe68a8cd1 |
#!/usr/bin/env python2.6
"""
Oct 5 2012
cp from parseLiteratureBlast.py
Parser Blast output file into a table of clones that have hits matches certain keywords
Filtering criteria includes:
1/ Match score (E.g minPositives = 90%)
2/ Keywords (E.g: autologous keywords)
3/ Min sequence length (to avoid short ... | ngannguyen/immunoseq | src/parseLiteratureBlast_toTex.py | Python | mit | 21,026 | [
"BLAST"
] | f45a51e94a19ef883fda4a8c75991456eacb56e0046ef9501a2ae6bd760e0191 |
from os import path
from numpy import log10, array, float, NaN, nanmin, nanmax, savetxt, hstack, float
from pysces import ModelMap, ParScanner, Scanner
from sympy import sympify, diff, Symbol
from ._thermokin_file_tools import get_subs_dict, get_reqn_path, \
get_all_terms, get_term_types_from_raw_data, create_req... | exe0cdc/PyscesToolbox | psctb/analyse/_thermokin.py | Python | bsd-3-clause | 31,357 | [
"PySCeS"
] | 1f977760b4e4c88d726d806b81257270cbd1332d770ec9fd46f87e3b06f35096 |
import collect_array as ca
import collect_id as ci
import collect_loop as cl
import collect_device as cd
def print_dict_sorted(mydict):
keys = sorted(mydict)
entries = ""
for key in keys:
value = mydict[key]
entries += "'" + key + "': " + value.__repr__() + ","
return "{" + entries[:-... | dikujepsen/OpenTran | src/framework/processing/collect_gen.py | Python | mit | 6,164 | [
"VisIt"
] | 888235d92ba3e614896becf5e82553787ce22d7ae539516ee318caa94d486f9f |
# minNEURON.py
from neuron import h
cell = h.SectionList()
soma = h.Section(name='soma') # create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
# sec.insert('hh') # insert hh
cel... | ProjectPyRhO/PyRhO | pyrho/NEURON/minimal.py | Python | bsd-3-clause | 694 | [
"NEURON"
] | 857943e4f810e7b5ce59192d1fd01c21825f7faadbc8922e067f725831879419 |
#!/usr/bin/env python
#
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# A... | pmisik/buildbot | master/setup.py | Python | gpl-2.0 | 22,871 | [
"Brian"
] | 6aaf8af4d3df056c765a1d7b5123f2c3ad2955259703ac417350bd3c4f10ac06 |
# Making interactions.txt file from sorted BLAST outputs
import csv
import json
import operator
import os
def csv_to_list(csv_file, delimiter=","):
with open(csv_file, 'r') as csv_con:
reader = csv.reader(csv_con, delimiter=delimiter)
return list(reader)
def convert_cells_to_floats(csv_cont):
... | goyalsid/phageParser | parserscripts/interactions.py | Python | mit | 2,875 | [
"BLAST",
"Cytoscape"
] | d5ff0549eef91f3c3f23bd1489107c452bcf547068a42c62822068769b794de9 |
"""VTK output functions.
Create coarse grid views and write meshes/primitives to .vtu files. Use the
XML VTK format for unstructured meshes (.vtu)
This will use the XML VTK format for unstructured meshes, .vtu
See here for a guide: http://www.vtk.org/pdf/file-formats.pdf
"""
__docformat__ = "restructuredtext en"
... | pombreda/pyamg | Examples/ComplexSymmetric/my_vis.py | Python | bsd-3-clause | 14,787 | [
"ParaView",
"VTK"
] | 8d644e19382d8082e7b2759798d70335494115fbcb64ce8f85af9765ff9fb05a |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Xeralux/tensorflow | tensorflow/contrib/py2tf/converters/decorators.py | Python | apache-2.0 | 3,238 | [
"VisIt"
] | e8b0c3123d884204846442f6b677f8b25b456b11d8cde6989f6d6f349ba9443f |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | TK-TarunW/ecosystem | spark-2.0.2-bin-hadoop2.7/python/pyspark/mllib/util.py | Python | apache-2.0 | 19,841 | [
"Gaussian"
] | fa85d6dd75bbaded7021f986c815d220667fad789173ed8fa712d9dcdec52176 |
"""provides the parent frame of Priithon's ND 2d-section-viewer"""
from __future__ import print_function
__author__ = "Sebastian Haase <haase@msg.ucsf.edu>"
__license__ = "BSD license - see LICENSE file"
import six, sys
from .splitNDcommon import *
def viewImgFiles(filenames):
for fn in filenames:
#see ... | macronucleus/chromagnon | Chromagnon/Priithon/splitND.py | Python | mit | 41,286 | [
"VTK"
] | 0f0a1c31efa5920bfdb6751f4bbdfe3972ea68bfd20f726a51f4bfc03cbf230d |
#!python
from __future__ import with_statement
import argparse
import os
import logging
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
# guts of a programmable filter
normalizeMass="""
input = self.GetPolyDataInput();
output = self.GetPolyDataOutput();
output.CopyStructure(input)
output... | tfogal/freeprocessing | batch.py | Python | lgpl-3.0 | 3,747 | [
"ParaView"
] | 59858f7344ddd112a19c3e5ff3f9b85e7bd01d7a85333ebf438387e7c8b6dcdd |
""" DISET request handler base class for the TransformationDB.
"""
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from DIRAC.TransformationSystem.DB.TransformationDB import TransformationDB
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
... | petricm/DIRAC | TransformationSystem/Service/TransformationManagerHandler.py | Python | gpl-3.0 | 29,763 | [
"DIRAC"
] | 6d2e396248b73504bb668c91f049f819756816d432a6b3c9601b8790e9d9d60d |
# -*- coding: utf-8 -*-
import numpy as np
from pgmpy.factors.distributions import BaseDistribution
from pgmpy.factors.distributions import GaussianDistribution
class CanonicalDistribution(BaseDistribution):
"""
The intermediate factors in a Gaussian network can be described
compactly using a simple para... | pgmpy/pgmpy | pgmpy/factors/distributions/CanonicalDistribution.py | Python | mit | 19,128 | [
"Gaussian"
] | 65d181a7da87469e7179abc773d02f147a8d45e9e61653a6c2daad19450eddfb |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Alexander Yang
# Contributors:
#
# MDTraj is free software: yo... | dwhswenson/mdtraj | tests/test_gsd.py | Python | lgpl-2.1 | 3,075 | [
"MDTraj"
] | 563b87a0aec86d87f22f6c5b51ca97a18302c7e94620b118631fb5c48ab30bef |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as defa... | Patrick-and-Michael/trumptweets | config/urls.py | Python | mit | 1,729 | [
"VisIt"
] | b0452bdd124b7896049da4f03b0856960fc9e0c34da92bbeea2938398d5fde06 |
from collections import defaultdict, deque
import random
import re
from typing import Any, Text, List, Dict, Optional, TYPE_CHECKING
from rasa.core.actions.action import ACTION_LISTEN_NAME
from rasa.core.domain import Domain
from rasa.core.events import UserUttered, ActionExecuted, Event
from rasa.core.interpreter im... | RasaHQ/rasa_core | rasa/core/training/visualization.py | Python | apache-2.0 | 20,128 | [
"VisIt"
] | 73ec8ba6deee9acbd772e0902f7c4a5723c2cc7afb960aa9ceecb7f07850f958 |
# Copyright (c) 2006-2007, 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-2021 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Google, Inc.
# Copyright (c) 2014 Eevee (Alex Munroe) <amunroe@yelp.com>
# Copyright (c) 2015... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/astroid/tests/unittest_nodes.py | Python | mit | 42,822 | [
"VisIt"
] | 25b7f8c3435ac0ec4cc3fc6c21989339f3aa5a0c6f0a3c2e694988c555448abf |
""" The input data resolution module is a plugin that
allows to define VO input data policy in a simple way using existing
utilities in DIRAC or extension code supplied by the VO.
The arguments dictionary from the Job Wrapper includes the file catalogue
result and in principle has all the necessary inf... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/Client/InputDataResolution.py | Python | gpl-3.0 | 6,862 | [
"DIRAC"
] | 0a3286a0dacb306cd8c7441c4209ca3abd813a19e409544efabbd665e01fcafe |
# stdlib imports
import os
import uuid
# django imports
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import models
from django.db.models import Max
from django.db.models.signals import post_save
from django.db.models.signals import pre_save
from django.dispatch import r... | cmu-db/dbdb.io | dbdb/core/models.py | Python | apache-2.0 | 20,273 | [
"VisIt"
] | a3146a40640abd361d4bb7b081a48fd99b076d22358c3a47dd12b7a42f43cf2c |
""" LAMMPS Process
This module provides a way to run the lammps or liggghts process
"""
import os
import subprocess
class LammpsProcess(object):
""" Class runs the lammps/liggghts program
Parameters
----------
lammps_name : str
name of LAMMPS executable
log_directory : str, optional
... | simphony/simphony-lammps-md | simlammps/io/lammps_process.py | Python | bsd-2-clause | 2,260 | [
"LAMMPS"
] | 63f3c066ee69c4c063d60450fbea9723b2b8a26f7d5e6b087456027e4f4729fe |
#!/usr/bin/env python
"""
extract_lammps_data.py is a simple script which extracts sections of text from
a LAMMPS data file.
Typical usage:
extract_lammps_data.py SECTION_NAME < FILE.DATA > EXCERPT.TXT
This extracts a section from a LAMMPS data file and saves it in EXCERPT.TXT.
More general usage:
extract_lammps_... | quang-ha/lammps | tools/moltemplate/moltemplate/extract_lammps_data.py | Python | gpl-2.0 | 4,790 | [
"LAMMPS"
] | b1718ac0c640e92416e5c0706cf01a58bdb449cef286be17f9fe2316fb3cb728 |
# Copyright (C) 2015 Hydriz Scholz
#
# 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 ... | Hydriz/DBReports | reports/userprefs.py | Python | gpl-3.0 | 3,658 | [
"VisIt"
] | 0366ee20325afceed420ea5f3d3f9f92a565cc36fd8e3d4ae859bd7bd3b6e9e5 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | fweik/espresso | testsuite/python/electrostaticInteractions.py | Python | gpl-3.0 | 8,644 | [
"ESPResSo"
] | acce82ccffe1a436cf7bce377ec97386315ad0139d0f053ff1a9fd4582d96b9e |
#!C:\Python33\python.exe -u
# -*- coding: UTF-8 -*-
# enable debugging
import cgi
import cgitb
cgitb.enable()
import struct
import array
import uuid
import mysql.connector
from mysql.connector import errorcode
import configparser
import re
import http.cookies
import os
def printRowsForChart(counts):
for row in count... | RKYates/Dark-Souls-Death-Count-cgi-page | cgi-bin/stats.py | Python | gpl-3.0 | 17,316 | [
"VisIt"
] | 2d2b499a1fcf91cedf18eab7bbe92f1259d64d749e2f26f416926b08ed2cbee1 |
import ast
from unittest import mock
import _ast
from nimoy.specification import Specification
from nimoy.ast_tools.feature_blocks import FeatureBlockTransformer
from nimoy.ast_tools.feature_blocks import FeatureBlockRuleEnforcer
from nimoy.ast_tools.ast_metadata import SpecMetadata
from nimoy.runner.exceptions import ... | Luftzig/nimoy | specs/nimoy/ast_tools/feature_blocks_spec.py | Python | apache-2.0 | 6,616 | [
"VisIt"
] | 8d7ca1e5df6b2f1f947eba69ec4eb024edfb865f2b86bac0d5641357a6f44cb6 |
"""
==========================================================
Comparison of kernel ridge and Gaussian process regression
==========================================================
Both kernel ridge regression (KRR) and Gaussian process regression (GPR) learn
a target function by employing internally the "kernel trick... | RPGOne/Skynet | scikit-learn-0.18.1/examples/gaussian_process/plot_compare_gpr_krr.py | Python | bsd-3-clause | 5,191 | [
"Gaussian"
] | c236967ce1d035f60a3633a3a5576b935e7433285ae5e8ce4f1ff9197dc0dded |
#! /usr/bin/env python3
from random import randrange, choice
description = '''
Monopoly odds
Problem 84
In the game, Monopoly, the standard board is set up in the following way:
GO A1 2=CC1 A2 T1 R1 B1 7=CH1 B2 B3 JAIL
H2 C1
T2 U1
H1 C2
36=CH3 C3
R4 R2
G3 D1
33=CC3 CC2=17
G2 D2
G1 D3
G2J F3 U2 F2 F... | mbuhot/mbuhot-euler-solutions | python/problem-084.py | Python | mit | 3,941 | [
"VisIt"
] | 0aa375bd5473a29ac09e8128f50b4ccd69373f0aebb0d515b183d31240a9df94 |
import numpy as np
from ase.tasks.main import run
# molecule
# fit
atoms, task = run('molecule H2 -F 5,2 --atomize -t fitfail')
try:
atoms, task = run('molecule H2 H -t fitfail -s')
except ValueError:
pass
# fitting outside of range must fail!
assert task.data == {}
# fit in range
# when only fitting the num... | grhawk/ASE | tools/ase/test/tasks/optandfit.py | Python | gpl-2.0 | 4,766 | [
"ASE"
] | 2dcd510a25f83ff86b756e1bacb8e54c53076bd77dd1c0f374d37cd48954d40a |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | JPMoresmau/aifh | vol3/vol3-python-examples/examples/example_hopfield_hebbian.py | Python | apache-2.0 | 5,507 | [
"VisIt"
] | 2cf48dab49f35bd5bc04e9eadd363aaef845f6bdeacac40f66a8cf75cadcafde |
"""This is the state that handles battles against
monsters"""
import random, sys
from itertools import izip
import pygame as pg
from .. import tools, battlegui, observer, setup
from .. components import person, attack, attackitems
from .. import constants as c
#Python 2/3 compatibility.
if sys.version_info[0] == 2:
... | justinmeister/The-Stolen-Crown-RPG | data/states/battle.py | Python | mit | 29,392 | [
"BLAST"
] | 4a57c56754584952e8e550a53c3b5fb502a10596b60a2ec1f2ba8cdd6b48583b |
#!/usr/bin/env python
#
# This example demonstrates the creation of multiple actors and the
# manipulation of their properties and transformations. It is a
# derivative of Cone.py, see that example for more information.
#
import vtk
import time
#
# Next we create an instance of vtkConeSource and set some of its
# pr... | CMUSV-VisTrails/WorkflowRecommendation | examples/vtk_examples/Tutorial/Step4/Cone4.py | Python | bsd-3-clause | 3,069 | [
"VTK"
] | b37d09f44b78a0716e6026a249beb711f37e28f9316bb815668dc45725bb7808 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
This module contains the main object used to identify the coordination environments in a given structure.
If you use this module, please cite the following... | gpetretto/pymatgen | pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py | Python | mit | 98,192 | [
"pymatgen"
] | 50ac18300969034016fb97f445b81c66cbd8fe58de4aa5c3b9b90b387a6d5ae5 |
"""Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
pick random sample
pick weighted random sample
generate random permutation
distributions on the real line:
---------------------... | thecodinghub/news-for-good | news/Lib/random.py | Python | bsd-3-clause | 27,228 | [
"Gaussian"
] | 04aec4c586afd2e71b839312b04961e0ef01c2e4037712113c3b571def8723c7 |
"""Metrics to assess performance on regression task
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Ma... | bnaul/scikit-learn | sklearn/metrics/_regression.py | Python | bsd-3-clause | 31,835 | [
"Gaussian"
] | 87e249010e50a0d0482f30e12c90a98bafd142ea17368f96cba584c1391a650e |
# -*- coding: utf-8 -*-
# ---- automatic determination of chunking parameters -----
# functions taken from
# http://www.unidata.ucar.edu/staff/russ/public/chunk_shape_3D.py
# see also
"""
http://www.unidata.ucar.edu/blogs/developer/entry/chunking_data_choosing_shapes
"""
import math
import operator
def binlist(n, wi... | Chilipp/nc2map | nc_utils.py | Python | gpl-2.0 | 4,129 | [
"NetCDF"
] | fd134f397db17eb8ecf98eeaac16292e30ac9dd2543eda68bff9b8f9c40029ff |
"""
Acceptance tests for studio related to the outline page.
"""
from nose.plugins.attrib import attr
from datetime import datetime, timedelta
import itertools
from pytz import UTC
from bok_choy.promise import EmptyPromise
from ..pages.studio.overview import CourseOutlinePage, ContainerPage, ExpandCollapseLinkState
f... | nicky-ji/edx-nicky | common/test/acceptance/tests/test_studio_outline.py | Python | agpl-3.0 | 42,804 | [
"VisIt"
] | 9dea53e9706244807a54c79afc9a885faf349fe3e0c13998e58d771d8e160e2d |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# 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)
#
# Released under t... | MDAnalysis/mdanalysis | package/MDAnalysis/analysis/hydrogenbonds/hbond_autocorrel.py | Python | gpl-2.0 | 23,217 | [
"MDAnalysis"
] | ca42100e15000e3d3ce250413bf56217a2c59da27b49a3c78849aa1dc867f3f3 |
from Errors import error, message
import ExprNodes
import Nodes
import Builtin
import PyrexTypes
from Cython import Utils
from PyrexTypes import py_object_type, unspecified_type
from Visitor import CythonTransform, EnvTransform
class TypedExprNode(ExprNodes.ExprNode):
# Used for declaring assignments of a specifi... | larsmans/cython | Cython/Compiler/TypeInference.py | Python | apache-2.0 | 19,496 | [
"VisIt"
] | 1437120e72dc25fb08449767ddcca7488ff3c251066af942feba6f537d049b49 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | luchy0120/BigDL | pyspark/bigdl/nn/layer.py | Python | apache-2.0 | 184,483 | [
"Gaussian"
] | 8b305479a027ec0174889d8444eea9751c2697d7a96de06cf88d3079e99fa8b0 |
from __future__ import print_function
import unittest
import IMP.rmf
import IMP.test
import IMP.container
import RMF
from IMP.algebra import *
class Tests(IMP.test.TestCase):
def _create(self, m):
pdbname = self.get_input_file_name("simple.pdb")
full = IMP.atom.read_pdb(pdbname, m)
chain ... | shanot/imp | modules/rmf/test/test_representations.py | Python | gpl-3.0 | 4,625 | [
"Gaussian"
] | 54892d1ea760ccf680632dfd3ecfebf89a626e5550d325f379882c9ef5887695 |
## INFO ########################################################################
## ##
## COUBLET ##
## ======= ... | petervaro/coublet | views/window.py | Python | mit | 12,351 | [
"VisIt"
] | a2ba127c6d70fea1159e504655dbfbe8f11a34dd62366a5a54fd7635920bb91b |
import itertools
import os
import random
from collections import defaultdict
from datetime import datetime
from typing import Any, Callable, Dict, List, Mapping, Sequence, Tuple
import bmemcached
import orjson
from django.conf import settings
from django.contrib.sessions.models import Session
from django.core.manageme... | kou/zulip | zilencer/management/commands/populate_db.py | Python | apache-2.0 | 41,025 | [
"Amber",
"Galaxy"
] | a7094855b5af6be01bbbf6da5fa207bca05e72f8fc60f381826b9b4b3b4a454c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.