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 |
|---|---|---|---|---|---|---|---|
VISIT, VISIT_EDGE, POST_VISIT = range(3)
def strongly_connected_components(graph):
'''
Find strongly connected components in a graph using iterative
depth-first search.
Based on:
http://code.activestate.com/recipes/578507-strongly-connected-components-of-a-directed-graph/
'''
identified =... | openvenues/libpostal | scripts/geodata/graph/scc.py | Python | mit | 1,392 | [
"VisIt"
] | 97b9f9a95f7b06f3119427284b3f56ccdffd576785a044645f4709f2e4d3f37b |
#encoding: utf-8
"""
tools.stats -- Toolbox functions for computing statistics
Exported namespace: bootstrap, smooth_pdf, integer_hist
Written by Joe Monaco
Center for Theoretical Neuroscience
Copyright (c) 2007-2008 Columbia Unversity. All Rights Reserved.
"""
import os as _os
import numpy as _N
from sys import ... | jdmonaco/grid-remapping-model | src/tools/stats.py | Python | mit | 3,643 | [
"Gaussian"
] | e1b16e91e0ca11657591ff20ff803c968dd15473517578d3a93617f0fd5d2115 |
#!/usr/bin/env python
#
# -----------------------------------------------------------------------------
# Copyright (c) 2016 The Regents of the University of California
#
# This file is part of kevlar (http://github.com/dib-lab/kevlar) and is
# licensed under the MIT license: see LICENSE.
# ----------------------------... | dib-lab/kevlar | kevlar/__init__.py | Python | mit | 4,870 | [
"pysam"
] | 2abb6b3811893a781308f91a103f4d25ea8dc367ce3e9ce8e361f81642a791af |
from astroquery.simbad import Simbad
from astropy.io import fits
from astropy.wcs import WCS
from astropy.stats import mad_std
from astropy.table import Table
from photutils import fit_2dgaussian, CircularAperture, CircularAnnulus, aperture_photometry, find_peaks
import numpy as np
import os
import matplotlib.p... | CalebHarada/DCT-photometry | Junk/aperture_photometry.py | Python | mit | 9,318 | [
"Gaussian"
] | aaf5a2d46b1021d33d3cfd7b3b01cacfc1bfcba3dfb24ba1ec02902e0cdc2df4 |
#!/usr/bin/env python
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2015, PyStan developers
#
# This file is licensed under Version 3.0 of the GNU General Public
# License. See LICENSE for a text of the license.
#----------------------------------------------------... | chmullig/pystan | setup.py | Python | gpl-3.0 | 8,501 | [
"VisIt"
] | 4c8e0540fb1bcee5479c642769064ab9ff545c8c4510cbb2b4154528fe32c065 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# oiddiscover - front end for openid discovery
# Copyright (C) 2003-2014 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | heromod/migrid | mig/cgi-bin/oiddiscover.py | Python | gpl-2.0 | 1,175 | [
"Brian"
] | b82ec80ab6ecfc438b12a502e70d50094fff1fcf6d8230538fc187fc922328a8 |
#!/usr/bin/env python
# Copyright 2014-2021 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/pbc/dft/cdft.py | Python | apache-2.0 | 4,779 | [
"PySCF"
] | f570845a0b30656c07c7eb6e7b6ec70ac621bd2bd24947ccbcb29d695de57bb5 |
from base.twilltestcase import TwillTestCase
from base.test_db_util import (
get_user,
get_latest_history_for_user,
get_latest_hda,
)
admin_user = None
class UploadData( TwillTestCase ):
def test_0000_setup_upload_tests( self ):
"""
Configuring upload tests, setting admin_user
... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/test/functional/test_get_data.py | Python | gpl-3.0 | 29,277 | [
"Galaxy"
] | 4841ae56c405fe0429d6f890c3e14be662d7d4efbee6594445545022ede3f648 |
from __future__ import print_function
import sys
import random
import os
from builtins import range
import time
sys.path.insert(1, "../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.random_forest import H2ORandomForestEstimator
from h2o.grid.grid_search import H2OGridSearch
class Test_rf_gri... | mathemage/h2o-3 | h2o-py/dynamic_tests/testdir_algos/rf/pyunit_rf_gridsearch_over_all_params_large.py | Python | apache-2.0 | 19,516 | [
"Gaussian"
] | 79b29322b34c5fb513c0733fd7c2047f5bfa5f7facb420f4e06ae155866a1390 |
import os
from urllib import request
from pybel import BELGraph
from pybel.dsl import *
from pybel.language import Entity
from pybel.io import from_json_file
from pybel.examples import egf_graph
from indra.statements import *
from indra.sources import bel
from indra.sources.bel import processor as pb
from indra.sources... | pvtodorov/indra | indra/tests/test_pybel_api.py | Python | bsd-2-clause | 26,279 | [
"Pybel"
] | 2fa8d970d201b10d53034b89894438f656f3eda30ce3cc4cc5116444c51ab25f |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | marscher/mdtraj | MDTraj/utils/unitcell.py | Python | lgpl-2.1 | 6,646 | [
"MDTraj"
] | af0ee111f668239cd3306151d23e7645771c9fdebf3e2da715b25378bca0471d |
import ast
from lenatu import _facts as facts
import collections
def _nodes_of_block(block):
"""
Returns nodes that define or execute the given block.
"""
def visit(node):
if getattr(node, "executed_in", block) is block or getattr(node, "defined_block", None) is block:
yield node
... | smurn/lenatu | lenatu/_scope.py | Python | mit | 4,948 | [
"VisIt"
] | 49739d0f21b3d62864ad6f72240f98165768029948d611126f3f58402b8f39d1 |
from common import Modules, data_strings, load_yara_rules, PEParseModule, ModuleMetadata
class vertexnet(PEParseModule):
def __init__(self):
md = ModuleMetadata(
module_name="vertexnet",
bot_name="VertexNet",
description="General purpose malware",
authors=["... | bwall/bamfdetect | BAMF_Detect/modules/vertexnet.py | Python | mit | 2,546 | [
"Brian"
] | 799d335c155e2d9e3b3a93eb66be4e04876338428b29daa99318dd0515fd8632 |
# Copyright 2017 SAS Project 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 requ... | Wireless-Innovation-Forum/Spectrum-Access-System | src/harness/reference_models/propagation/itm/itm_test.py | Python | apache-2.0 | 12,660 | [
"CRYSTAL"
] | 77daee0d021d6af8edd9087f192e2e0bf5424fd500864f8edf25764f69de6f9f |
#!/usr/bin/env python
# Purdue CS530 - Introduction to Scientific Visualization
# Fall 2013
# Simple example to illustrate the typical structure of the rendering
# pipeline in VTK. Here, we draw a sphere and enter the interactive mode.
# Our example needs the VTK Python package
import vtk
def render_demo():
# ... | saullocastro/pyNastran | pyNastran/gui/vtk_examples/extract_edges.py | Python | lgpl-3.0 | 3,743 | [
"VTK"
] | 3befa651aece731a10962448c298d3acfb84b429b505e30b72f90cf12c20440e |
# Created by Ashkan Bigdeli 2016
# Annow.py
# Main UI and calls for data processing
# wx is external UI module
import wx, os
from src import pid_etr
from time import strftime
script_dir =os.path.dirname(__file__)
class ManualWindow(wx.Frame):
#for manual page display
def __init__(self):
... | ashbig/Annow | annow_v1_0/Annow.py | Python | gpl-3.0 | 19,421 | [
"BLAST"
] | c80b986c0f21807a526e84fb9123787afec9d48815e5ba979b5a874165da8351 |
# Author: Samuel Genheden samuel.genheden@gmail.com
"""
Program to make input to Gaussian for (R)ESPA calculations
Examples
--------
pdb2respa_inp.py mol1.pdb mol2.pdb
pdb2respa_inp.py mol1.pdb -v ff03 -c -1
"""
import sys
import os
import argparse
import time
import numpy as np
from sgenlib import pdb
if... | SGenheden/Scripts | Pdb/pdb2respa_inp.py | Python | mit | 1,634 | [
"Gaussian"
] | d998521490c73a44d580397b494e6ce2ad63021ffbb8f36073664356c289e761 |
import re
import pytz
import datetime as dt
from collections import defaultdict
import lxml.html
from pupa.scrape import Scraper, Bill, VoteEvent
from openstates.utils import LXMLMixin
from .utils import (clean_text, house_get_actor_from_action,
senate_get_actor_from_action)
bill_types = {
'... | votervoice/openstates | openstates/mo/bills.py | Python | gpl-3.0 | 24,779 | [
"VisIt"
] | b5121b2669445f9b5a31702e816b3e5d6f9dde126e135c98cbee696c3ef52e0b |
import decimal
import gc
import itertools
import multiprocessing
import weakref
import sqlalchemy as sa
from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy import test... | sqlalchemy/sqlalchemy | test/aaa_profiling/test_memusage.py | Python | mit | 45,650 | [
"VisIt"
] | 201dadd0bfad21685bfa49c91b5012c3d9f577d116e150d68d8297fa061ae025 |
# Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
#
# This 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 the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This... | h4ck3rm1k3/orca-sonar | src/orca/debug.py | Python | lgpl-2.1 | 16,430 | [
"ORCA"
] | 46b6e7c66608844b62712fbb6cb3c4564f4aa60975b56fc3cbc12eead5c2d85f |
import re
import os
import ast
from .cli import CLI
from .runner import Runner
def _show(node):
for name, val in ast.iter_fields(node):
print("{name}: {val}".format(name=name, val=val))
class SetUpVisitor(ast.NodeVisitor):
def __init__(self):
self.packages = []
def append_testsuite(se... | srz-zumix/wandbox-api | wandbox/__python__.py | Python | mit | 5,533 | [
"VisIt"
] | 306005b162daa8b39cfd48e02763953d92ab17c88cd8a8cfd922abd5aeb9047c |
#########################################################################
# crossComptOscillator.py ---
#
# Filename: crossComptOscillator.py
# Author: Upinder S. Bhalla
# Maintainer:
# Created: Oct 12 16:26:05 2014 (+0530)
# Version:
# Last-Updated: May 15 2017
# By:
# Update #:
# URL:
# Keyword... | BhallaLab/moose | moose-examples/snippets/cylinderMotor.py | Python | gpl-3.0 | 4,461 | [
"MOOSE"
] | c7eccb493145d410a0b4741d95a4c59cb9606af6bc7a5d227bb96fb1d5724a23 |
#
# Copyright (c) 2017 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... | yashdsaraf/scancode-toolkit | tests/scancode/test_api.py | Python | apache-2.0 | 4,108 | [
"VisIt"
] | 6046f53ef236f7a0e0bedd3287225149e43eb688ac8a6c92c5c1f4cad80bea6f |
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import *
import localgroup
import triangle
import sklearn
from sklearn import mixture
import numpy as np
import pickle
import matplotlib.patches as mpatches
save_path = "/afs/slac.stanford.edu/u/ki/mwillia1/Thesis/LocalGroupHaloProps/testplot/"
# Inside t... | drphilmarshall/LocalGroupHaloProps | final_scripts/fingmm.py | Python | gpl-2.0 | 12,395 | [
"Gaussian"
] | 8a7444eece887c6cd1959d2038f5083e1edf5f63189e05c2c3ead05837246d10 |
import rdkit
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.Chem import rdDepictor
from shapely import geometry
import numpy as np
from itertools import combinations
import operator
from timeit import default_timer as timer
class Mo... | ldomic/lintools | lintools/molecule.py | Python | gpl-3.0 | 13,282 | [
"RDKit"
] | 48d4f6d6b895bf41cd9674e323d982e774e5abcd9b61b5945c27c8c641d91a6b |
import os
import platform
import time
import json
import tempfile
import random
import string
from pwd import getpwuid
from sos.presets import (NO_PRESET, GENERIC_PRESETS, PRESETS_PATH,
PresetDefaults, DESC, NOTE, OPTS)
from sos.policies.package_managers import PackageManager
from sos.utilitie... | sosreport/sos | sos/policies/__init__.py | Python | gpl-2.0 | 21,922 | [
"VisIt"
] | 3ac29f575671884f81b57bfc1759939e946d0577937f929669ac08f27232fe82 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/e2openplugin-OpenWebif | plugin/controllers/views/web/mediaplayerfindfile.py | Python | gpl-2.0 | 5,500 | [
"VisIt"
] | 7081495685e9023a13c450b49f2c5d30a78dc7c1328400fe0d6f449114f9fcab |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/symm/Dmatrix.py | Python | apache-2.0 | 6,569 | [
"PySCF"
] | b885298aae7bfdcb99edb9e5b8d0e15b1b8e841cbba976b462ffb7d7179ff58d |
#!/usr/bin/env python
# coding: utf-8
# # Hartree-Fock methods
#
#
# ## Why Hartree-Fock? Derivation of Hartree-Fock equations in coordinate space
#
# Hartree-Fock (HF) theory is an algorithm for finding an approximative expression for the ground state of a given Hamiltonian. The basic ingredients are
# * Define ... | CompPhysics/ComputationalPhysics2 | doc/LectureNotes/_build/jupyter_execute/hartreefocktheory.py | Python | cc0-1.0 | 69,233 | [
"DIRAC"
] | 0d653d463fab22d7a9dc6a69390abac8fb65a480fbc92ad63af8df85e03a3025 |
#!/usr/bin/env python
#
# Copyright 2013-2015 Matthew Wall, Andrew Miles
# See the file LICENSE.txt for your full rights.
#
# Thanks to Andrew Miles for figuring out how to read history records
# and many station parameters.
# Thanks to Sebastian John for the te923tool written in C (v0.6.1):
# http://te923.fukz.org... | paolobenve/weewx | bin/weewx/drivers/te923.py | Python | gpl-3.0 | 99,426 | [
"COLUMBUS"
] | 7cccb97c89363378682606c5677f7921b0a78c50d98abbec4512bf61a01895f3 |
'''
base64 ±àÂëÌåϵÓÃÓÚ½«ÈÎÒâ¶þ½øÖÆÊý¾Ýת»»Îª´¿Îı¾.
Ëü½«Ò»¸ö 3 ×ֽڵĶþ½øÖÆ×Ö½Ú×éת»»Îª 4 ¸öÎı¾×Ö·û×é´¢´æ, ¶øÇҹ涨ֻÔÊÐíÒÔϼ¯ºÏÖеÄ×Ö·û³öÏÖ:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789+/
ÁíÍâ, = ÓÃÓÚÌî³äÊý¾ÝÁ÷µÄĩβ.
ÏÂÀý չʾÁËÈçºÎʹÓà encode ºÍ decode º¯Êý²Ù×÷Îļþ¶ÔÏó.
'''
import base64
M... | iamweilee/pylearn | base64-example-1.py | Python | mit | 657 | [
"Brian"
] | 315587f58a0589006aafb72c9aaa09dbbf3b2c9b87b4e91f33e1d3609e53f06f |
"""
plotter.py: plot functions of the results
Copyright (C) 2017 Hanjie Pan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | hanjiepan/LEAP | plotter.py | Python | gpl-3.0 | 35,130 | [
"DIRAC"
] | 0d615f9ccc7545cb361840c872fc9b2d17a8f1dcf2da9cdcb565a6c5dd54c3be |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
cone = vtk.vtkConeSource()
cone.SetHeight(3.0)
cone.SetRadius(1.0)
cone.SetResolution(10)
coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInputConnection(cone.GetOutputPort())
# ... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Rendering/Core/Testing/Python/TestOpacity2.py | Python | gpl-3.0 | 2,727 | [
"VTK"
] | c5cab511f0dc934790c18c6108911b22c8c7cd529e1c2981d069bf37606600a6 |
from setuptools import setup
VERSION = '2.0.2'
VERSION_TAG = 'v%s' % VERSION
README_URL = ('https://github.com/briancline/crm114-python'
'/blob/%s/README.md' % VERSION_TAG)
setup(
name='crm114',
version=VERSION,
author='Brian Cline',
author_email='brian.cline@gmail.com',
description=... | briancline/crm114-python | setup.py | Python | mit | 1,333 | [
"Brian"
] | 1c2698c2bbaa7bbe1a3e99d5557069adcc3d41fb37a9a1705b9e0c045bb68aea |
################################################################################
# #
# Copyright (C) 2010-2017 The ESPResSo project #
# ... | KonradBreitsprecher/espresso | doc/tutorials/06-active_matter/EXERCISES/enhanced_diffusion.py | Python | gpl-3.0 | 4,875 | [
"ESPResSo"
] | 2449413b2cf3ff276d398df6cec9df373885969fa1a3c970ad48f641ab5907b3 |
"""Translates Python code into Python's built-in AST.
"""
import ast
from py2c.abc.worker import Worker
from py2c.processing import ProcessingError
from py2c.tree.visitors import RecursiveNodeTransformer
from py2c.utils import get_temp_variable_name
__all__ = ["SourceToASTTranslationError", "SourceToAST"]
# -----... | pradyunsg/Py2C | py2c/processing/to_ast.py | Python | bsd-3-clause | 1,431 | [
"VisIt"
] | 783b75a5a2b7a9c60f3c1309a6da60f12361c10e0c85d46874400f84ac21b02a |
"""
=============================
Generic SpectralModel wrapper
=============================
.. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com>
"""
import numpy as np
from pyspeckit.mpfit import mpfit,mpfitException
from pyspeckit.spectrum.parinfo import ParinfoList,Parinfo
import copy
import matplotlib.cboo... | keflavich/pyspeckit-obsolete | pyspeckit/spectrum/models/model.py | Python | mit | 39,132 | [
"Gaussian"
] | c1a00eb5514d192248ad1b648aa46337b47413c8a045ef9adee56423790e83c7 |
# 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.
"""
This module provides code to access resources at ExPASy over the WWW.
http://www.expasy.ch... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/ExPASy/__init__.py | Python | gpl-2.0 | 4,374 | [
"Biopython"
] | 41f904c3418be47a5061ce29ca7a381b90a32d7a13e93044dcb152714323f159 |
import webapp2
import cgi
import datetime
import import_path
from models.tracker.Identifiers import *
from models.tracker.Visits import *
class TrackHandler(webapp2.RequestHandler):
def get(self):
token = cgi.escape(self.request.get('t'))
if token == None or len(token) == 0:
self.response.out.write("no token... | cipicip/appengine | ccutilapp/handlers/tracker/TrackHandler.py | Python | apache-2.0 | 715 | [
"VisIt"
] | 6059f8cbb8486894f978ddb40550c90a09eb0a79826d1120316a33743ffb5e29 |
import os
import tempfile
import unittest
from pyepw.epw import EPW
class TestReadEPW(unittest.TestCase):
def setUp(self):
self.fd, self.path = tempfile.mkstemp()
def tearDown(self):
os.remove(self.path)
def test_read_epw(self):
epw = EPW()
epw.read(r"tests/data/USA_CA_... | rbuffat/pyepw | tests/test_read.py | Python | apache-2.0 | 439 | [
"EPW"
] | 4d1f9827b23695fe1a8e42ee84fe6141f0fa5aae7fb222a84352d0b17ac46fbd |
# Install third-party packages
# Read/write files and directories
import os
# Read command line arguments
import argparse
# Numeric Python
import numpy
# Read JSON file format
import json
# Install imagaing packages
import skimage
from skimage import io
# Ignore warnings so they won't be displayed
import warnings
warni... | ethanlarochelle/solaris-tools | CLI/cli_solaris_batch_export.py | Python | gpl-3.0 | 20,729 | [
"CRYSTAL"
] | 7fcd88825f0085ac75276a5617996da4bc98831720e9bb25b556365848fe2ab3 |
# -*- coding: utf-8 -*-
import re
import math
#抽取一篇文档的特征(此处为不重复的单词)
def getwords(doc):
splitter=re.compile('\\W*')
#根据非字母字符将文档拆分为单词
words=[s.lower() for s in splitter.split(doc)
if len(s)>2 and len(s)<20]
return dict([(w,1) for w in words])
#样本训练函数(省的每次都输入训练数据)
def sampletrain(cl):
cl... | Windriver/codelab | programming-collective-intelligence/docfilter/docclass.py | Python | apache-2.0 | 7,071 | [
"CASINO"
] | 5c1e7bdfe635557ea6697cf14e36371652df8b80c8d8e3f8cbeae386817f7158 |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import add_days, getdate, cint
from frappe import throw, _
from erpnext.utilities.transaction_base import Transacti... | gangadharkadam/sterp | erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py | Python | agpl-3.0 | 9,700 | [
"VisIt"
] | a1a5b326e7f8059858ff06199d3023cd38e631195d9a4adbb1ac0febd3452827 |
import theano.tensor as t
from numpy.random import RandomState
def addLoggingParams (parser) :
'''Setup common logging and profiler options.'''
parser.add_argument('--log', dest='logfile', type=str, default=None,
help='Specify log output file.')
parser.add_argument('--level', dest=... | mbojrab/playbox | trunk/modules/python/builder/args.py | Python | mit | 6,964 | [
"NEURON"
] | 15eff6b5d47bd4724e2fa05a61f3782a3359a89c95b68910b995e6e78194980f |
# -*- mode: python; indent-tabs-mode: nil; tab-width: 4 -*-
# vim: set tabstop=4 shiftwidth=4 expandtab:
#
# Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom, Karl MacMillan
# 2007-2010 Christoph Dalitz and Uma Kompella
# 2014 Christoph Dalitz
#
# This program is free softwa... | hsnr-gamera/gamera | gamera/plugins/threshold.py | Python | gpl-2.0 | 11,906 | [
"Gaussian"
] | b7443fb76e1d6d102b0726cf5369413037b73ea93ce8ca57be67c1e4b4934ce7 |
import pyglet
import socket
import time
import random
#DONE: grab implementation
#DONE: Startup display
#DONE: battery system
#DONE: life-support
#DONE: reactor
#TODO: death
#Copyright 2014 Antonius Frie
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gener... | metaplinius/confederation | main.py | Python | gpl-3.0 | 22,951 | [
"CRYSTAL"
] | 4664a3ffe090444567a477d4edb8845698e9fd0c63aa16802952e236e7a83ade |
############################
# General options/settings #
############################
PING_WAIT = 300 # Seconds
PING_MIN_WAIT = 30 # How long !start has to wait after a !ping
MINIMUM_WAIT = 60
EXTRA_WAIT = 20
MAXIMUM_WAITED = 3 # limit for amount of !wait's
STATS_RATE_LIMIT = 15
VOTES_RATE_LIMIT = 15
ADMINS_RATE_LI... | Epithumia/pyIRCbot | settings/mascarade.py | Python | bsd-2-clause | 17,931 | [
"VisIt"
] | aec17b96ab3831cec05d9870ca9ba8aa5171d1967ae33d6d3c28759103854fe1 |
from aiida.orm import Code, DataFactory, WorkflowFactory
from aiida.orm.workflow import Workflow
from aiida.orm.calculation.inline import make_inline
#from aiida.workflows.wf_gruneisen_pressure import WorkflowGruneisen
#from aiida.workflows.wf_phonon import WorkflowPhonon
#from aiida.orm.data.structure import Structur... | abelcarreras/aiida_extensions | workflows/wf_qha.py | Python | mit | 48,077 | [
"CRYSTAL",
"phonopy",
"pymatgen"
] | eea1363afdad4fbaaf44626fd64165b9091059d4c2ed74ee2e9cb5eb8931dba4 |
import threading
import functools
try:
from Queue import Queue
except ImportError:
from queue import Queue
from os import getenv
from .client import JobClient
from .client import InputCachingJobClient
from .client import MessageJobClient
from .client import MessageCLIJobClient
from .interface import HttpPulsar... | jmchilton/pulsar | pulsar/client/manager.py | Python | apache-2.0 | 9,260 | [
"Galaxy"
] | 888605fbddc3e401d804861fd9576442e12e8991ecf0347226be276a703c835e |
# Copyright 2005-2008 by Frank Kauff & Cymon J. Cox. 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.
"""Linked list functionality for use in Bio.Nexus.
Provides functionality of a... | zjuchenyuan/BioWeb | Lib/Bio/Nexus/Nodes.py | Python | mit | 5,576 | [
"Biopython"
] | 243badbe8bb784f302cc9d078e6795b4981b0ab5504691cf5f9c40a23e21f2e1 |
# This file is part of Fedora Community.
# Copyright (C) 2008-2010 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) ... | Fale/fedora-packages | fedoracommunity/widgets/flot.py | Python | agpl-3.0 | 3,776 | [
"VisIt"
] | ff1acd1b2c04785a6d8db2308f1b7514f9e1288e692ee957b2f39d37607ff1ef |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
#
# License: Simplified BSD
import contextlib
from functools import partial
import os
import sys
import time
import traceback
import warnings
import... | Teekuningas/mne-python | mne/viz/_brain/_timeviewer.py | Python | bsd-3-clause | 46,789 | [
"VTK"
] | ceefeece0fd9de8bcedb66f9aa074017dddecfca3e75930fbdcc37d15214bdbd |
from __future__ import print_function
"""
The basic idea of this module is to provide the STEM class, which simulates
STEM images from atomic configurations. Note that these simulations are very
simplistic, they make the following assumptions.
1. Atoms do not lose/gain/share electrons
2. Atoms' electron clouds are sph... | CJ-Wright/pyIID | pyiid/experiments/stem/__init__.py | Python | bsd-3-clause | 2,468 | [
"ASE",
"Gaussian"
] | 6e7bd68ce06504cb1304218582a57504bcfbf46f31ed2efa315cf7b71b0d7e06 |
"""
QAPI command marshaller generator
Copyright IBM, Corp. 2011
Copyright (C) 2014-2018 Red Hat, Inc.
Authors:
Anthony Liguori <aliguori@us.ibm.com>
Michael Roth <mdroth@linux.vnet.ibm.com>
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file ... | dslutz/qemu | scripts/qapi/commands.py | Python | gpl-2.0 | 7,790 | [
"VisIt"
] | c6f217169398683fb40dd4b5ba5568dcc04a73ba31bb877fea086b6ba9ae6af4 |
"""
DIRAC.WorkloadManagementSystem.Client package
"""
__RCSID__ = "$Id$"
| fstagni/DIRAC | WorkloadManagementSystem/Client/__init__.py | Python | gpl-3.0 | 77 | [
"DIRAC"
] | b0e58e1903cbdfae4f85c06136aef233c866a73609678eedf46a93500b4fc755 |
"""
A collection of utility functions and classes. Originally, many
(but not all) were from the Python Cookbook -- hence the name cbook.
This module is safe to import from anywhere within matplotlib;
it imports matplotlib only at runtime.
"""
from __future__ import (absolute_import, division, print_function,
... | rbalda/neural_ocr | env/lib/python2.7/site-packages/matplotlib/cbook.py | Python | mit | 77,442 | [
"Gaussian"
] | 0bef506ff75b9c9d694a1c5024b6db7c9dbd686e47f8112a050ae4661cfb1e6d |
import os
from ase.structure import molecule
from ase.io import read, write
from ase.parallel import rank
from gpaw import GPAW, restart
import warnings
# cmr calls all available methods in ase.atoms detected by the module inspect.
# Therefore also deprecated methods are called - and we choose to silence those warni... | robwarm/gpaw-symm | gpaw/test/cmrtest/Li2_atomize.py | Python | gpl-3.0 | 10,201 | [
"ASE",
"GPAW"
] | 37fb293c5b155b3a048b875739544bf6d5b2045644fc036e94d6c2e0f23510e8 |
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, ... | Ebag333/Pyfa | eos/saveddata/fit.py | Python | gpl-3.0 | 51,862 | [
"CRYSTAL"
] | 12afaae004c13f262983f43f58a503644b162f2411485d65e76efd5a62370041 |
"""
Module to set up run time parameters for Clawpack.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
from __future__ import absolute_import
import os
import numpy as np
#------------------------------
def setrun(claw_pkg='amrclaw'):
#--------... | ForestClaw/forestclaw | applications/paper/transport_2d_annulus/setrun.py | Python | bsd-2-clause | 10,831 | [
"NetCDF"
] | bb2ae3397b6f813c61b9744001d33abd95ac7549178dde96731fbde4e4a9dc37 |
import cPickle as pickle
from ase import *
from ase import io
from ase.dft.bee import BEEF_Ensemble
from ase.optimize import QuasiNewton
from ase.structure import molecule
from ase.vibrations import Vibrations
from ase.thermochemistry import IdealGasThermo
from espresso import espresso
from espresso.vibespresso import... | chemeng444/chemeng444.github.io | ASE/Adsorption/run_N2.py | Python | gpl-2.0 | 3,523 | [
"ASE",
"ESPResSo",
"Quantum ESPRESSO"
] | 3336ce1d456a97f23379e832e4c4e3db67593c4d6a0a381c1c6e5a358d3682ae |
from __future__ import print_function
from fabric.api import run, env
from time import sleep
from boto.exception import EC2ResponseError
from .util import eval_template
def attach_volumes(vm_launcher, options, format=False):
"""
"""
volumes = options.get("volumes", [])
if not volumes:
return
... | chapmanb/cloudbiolinux | cloudbio/deploy/volume.py | Python | mit | 8,821 | [
"Galaxy"
] | e7503dcebb30849f5861e8ab7648bdbc5f15b9d529a04a223cbf3f73a3e856e0 |
#=== PHYSICS =========================================================================================
# 2D physics functions.
# Authors: Tom De Smedt, Giorgio Olivero
# License: BSD (see LICENSE.txt for details).
# Copyright (c) 2008-2012 City In A Bottle (cityinabottle.org)
# http://cityinabottle.org/nodebox
# This ... | nodebox/nodebox-opengl | nodebox/graphics/physics.py | Python | bsd-3-clause | 78,058 | [
"VisIt"
] | 50116e3aaa83d095e75b9ae33f22b71ccbb011f491b26fedf111f84424ab44e1 |
'''
Program to run FEFF 8.4.175 calculation in cycle
We need only determine the data folder with feff input files
Program return chi dat files for each input file and calculate mean, median, std, max, min values of chi
for all chi dat files
author: Zhenia Syriany (Yevgen Syryanyy)
e-mail: yuginboy@gmail.com
Lic... | yuginboy/from_GULP_to_FEFF | feff/mainFEFF.py | Python | gpl-3.0 | 13,969 | [
"FEFF"
] | d4adcd5e4e84a0ea3eef2f3c3283ffc8cfb3385bf6550bb6323ab7a936e4c944 |
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Andrew I Baznikin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... | Forage/Gramps | gramps/plugins/rel/rel_hu.py | Python | gpl-2.0 | 10,875 | [
"Brian"
] | 52c239118ceb9343290c232fcbb769e04669e0277d95fb04ed74a9dc6a9812ba |
import numpy as np
from ase import Atoms
from ase.units import fs
from ase.calculators.test import TestPotential
from ase.calculators.emt import EMT
from ase.md import VelocityVerlet
from ase.io import PickleTrajectory, read
from ase.optimize import QuasiNewton
np.seterr(all='raise')
a = Atoms('4X',
masses=[... | grhawk/ASE | tools/ase/test/verlet.py | Python | gpl-2.0 | 868 | [
"ASE"
] | e2a86f892eaf9d8dc851752d93fef158e0eaddec71df9c3038c8bb12517015d7 |
#!/usr/bin/env python3
"""
Copyright 2017 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 ... | pwillworth/galaxyharvester | html/updateFilters.py | Python | gpl-3.0 | 9,693 | [
"Galaxy"
] | cfb4b258b67e89eca9bcb827bb43079f82a84b179e2317d5af5c0520a731460d |
# Copyright 2012-2014 Brian May
#
# This file is part of python-tldap.
#
# python-tldap 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.... | brianmay/python-tldap | tldap/backend/base.py | Python | gpl-3.0 | 8,635 | [
"Brian"
] | 8085a72386e3735577996492ca5dbbc534e25f9827fc04dcc9f9d3ba7673ef2d |
"""Unit tests for /tenants/<id>/users/ endpoints."""
# Copyright 2015 Solinea, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | slashk/goldstone-server | goldstone/tenants/tests_user.py | Python | apache-2.0 | 34,229 | [
"Amber"
] | ffe1332e49ba325af061bd5a0e91c3a266125e30c60082de005b73dac5d59e34 |
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 11 16:55:10 2017
@author: Kirby Urner
Grayham Forscutt constructs phrases that file
by letter sum. Examples below. Sometimes add
or subtract 'the' for plus/minus 33.
intelligent infinity + the = 266
focus on visualising the angelic fleet habitation - the = 466
"""
fro... | 4dsolutions/Python5 | numerology.py | Python | mit | 2,065 | [
"CRYSTAL"
] | d9517a89187d3a278b500b3aad71c3dc0148bcf9f97ef70b9b5b3b32ebaa0393 |
from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views import defaults as default_views
from django.views.i18n import JavaScriptCatalog
from graphene_django.views import GraphQL... | jaywink/diaspora-hub | config/urls.py | Python | agpl-3.0 | 1,554 | [
"VisIt"
] | 7214f6fcc07029238b24242fc9615c0c993a6ba2a9a7e31858134e95caac9b06 |
# -insar.py- coding: utf-8 -*-
"""
Created on Fri Sep 3 10:46:50 2010
@author: bosmanoglu
InSAR module. Includes functions for analyzing SAR interferometry with python.
"""
from numpy import *
from pylab import *
from basic import *
import scipy
from scipy import ndimage #scipy.pkgload('ndimage')
from scipy import ... | bosmanoglu/adore-doris | lib/python/insar/__init__.py | Python | gpl-2.0 | 25,698 | [
"Gaussian"
] | eceef6ec85beabb7ed4a7fd217f1316e045bf6e7c389ba6662dba8f99aebc9df |
"""
This file defines IAM resource static configuration parameters for CDK Constructs
"""
IAM_Role_List = {
# Pattern
# "cdk-id": "role-name"
# Example:
# "cdk-infra-editor": "cdk-poc-infra-editor",
# "cdk-infra-viewer": "cdk-poc-infra-viewer",
}
| kubeflow/testing | aws/IaC/CDK/test-infra/config/static_config/IAM_Resources.py | Python | apache-2.0 | 269 | [
"CDK"
] | 9375513a98296d2eb354b234e0c7cf285b3c578ca45b0046e26c27621d66fe4f |
""" This module exposes the BaseClient class,
which serves as base for InnerRPCClient and TransferClient.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import _thread
import DIRAC
from DIRAC.Core.DISET.private.Protocols import gProtoc... | ic-hep/DIRAC | src/DIRAC/Core/DISET/private/BaseClient.py | Python | gpl-3.0 | 28,847 | [
"DIRAC"
] | 5f5eae69d79f6f6f79611f749c2eadff5d7882a3dfd3e6d8112e8f8280108838 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/web/recordnow.py | Python | gpl-2.0 | 5,222 | [
"VisIt"
] | 369134208c35d71266d00a305e29b233d5f74adc7ec92391bc0d4ab7877fecb8 |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 24 16:18:10 2016
http://mmcif.wwpdb.org/pdbx-mmcif-home-page.html
@author: noel
"""
#from Bio.PDB import *
import sys
import Bio.PDB.MMCIF2Dict as mmcifD
from Bio.PDB.MMCIFParser import *
from Bio.PDB.Superimposer import Superimposer
from Bio.PDB.Atom import Atom
import pa... | noelcjr/EntropyMaxima | em/tools/Super_Structures.py | Python | gpl-3.0 | 78,633 | [
"CHARMM",
"CRYSTAL"
] | c01bb9ec7900d3c050f1b3cf7138b941a469242e8f65527a619a0cc5f9ad8ec5 |
#!/usr/bin/env python
#
# Wrapper script for starting the biopet-seattleseqkit JAR package
#
# This script is written for use with the Conda package manager and is copied
# from the peptide-shaker wrapper. Only the parameters are changed.
# (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shake... | matthdsm/bioconda-recipes | recipes/biopet-seattleseqkit/biopet-seattleseqkit.py | Python | mit | 3,377 | [
"Bioconda"
] | f76f5049c9b6a9be9db1c1fb5b16cd2a312dd3042e5f1af3fe13aa53dd8361bc |
# coding=utf-8
# Copyright 2022 The Tensor2Robot 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 ... | google-research/tensor2robot | preprocessors/image_transformations.py | Python | apache-2.0 | 18,591 | [
"Gaussian"
] | b1521d4b442738264c714e0ec6148536a9021be278aead53ae673b70e5360880 |
#!/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 | worker/setup.py | Python | gpl-2.0 | 6,318 | [
"Brian"
] | 564a8a1197ee1e2b75ec79301938bc65b75bf143412342110fdb19fd9bc6b501 |
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
cqsdir = os.path.abspath(os.path.dirname(currentdir) + "/CQS")
sys.path.insert(0,cqsdir)
import logging
import argparse
import string
import subprocess
import pysam
from LocusItem import LocusItem, readBedFil... | shengqh/ngsperl | lib/GATK4/getBackgroundCount.py | Python | apache-2.0 | 4,462 | [
"pysam"
] | bd1e282a1bca719156fc0a8ba31382b82ed33f93fe536d794dc1f6a2b4d3ff4a |
#!/usr/bin/env python
# encoding: utf-8
import pytest
from tbone.db.models import create_collection
from tbone.resources import verbs, Resource
from tbone.testing.clients import *
from tbone.testing.fixtures import *
from .resources import *
@pytest.mark.asyncio
@pytest.fixture(scope='function')
async def load_accou... | 475Cumulus/TBone | tests/resources/test_mongo_resources.py | Python | mit | 14,933 | [
"Brian"
] | ab23920a9f7036e860130e0cd6917ed430133e18249540a0228330e267bb8c2d |
#!/usr/bin/env python
# $Id: simpleExample.py 545 2012-01-18 06:10:03Z cvermilion $
#----------------------------------------------------------------------
# Copyright (c) 2010-12, Pierre-Antoine Delsart, Kurtis Geerlings, Joey Huston,
# Brian Martin, and Christopher Vermilion
#
#-----------------------... | mickypaganini/SSI2016-jet-clustering | spartyjet-4.0.2_mac/examples_py/simpleExample.py | Python | mit | 2,381 | [
"Brian"
] | 5e180819fa72ab3960f777fde439bcf8d1f384ffe36e638baf229047c40fe644 |
from __future__ import print_function, unicode_literals, division, absolute_import
import numba
import numpy as np
from scipy.special import logsumexp
from scipy.ndimage.filters import gaussian_filter
from sklearn.neighbors import KernelDensity
from sklearn.model_selection import BaseCrossValidator
from sklearn.base ... | matthias-k/pysaliency | pysaliency/baseline_utils.py | Python | mit | 14,811 | [
"Gaussian"
] | c9647b7b55cdd702f45533849cd044920d15a4b45c990ece2b8909896f28587d |
""" Module holding function(s) creating the pilot wrapper.
This is a DIRAC-free module, so it could possibly be used also outside of DIRAC installations.
The main client of this module is the SiteDirector, that invokes the functions here more or less like this::
pilotFiles = getPilotFiles()
p... | petricm/DIRAC | WorkloadManagementSystem/Utilities/PilotWrapper.py | Python | gpl-3.0 | 7,685 | [
"DIRAC"
] | e70b468080ed7ec8c49954dfeb555364020d63efaa09cdca4859e6888d685557 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
import numpy as np
import time
from pymatgen.core.structure import Structure
from pymatgen.core.sites import PeriodicSite
from monty.json import MSONable
from scipy.spatial import Voronoi
from ... | dongsenfo/pymatgen | pymatgen/analysis/chemenv/coordination_environments/voronoi.py | Python | mit | 40,607 | [
"pymatgen"
] | 48d1f92fbecbd6019e1d939b3373914b307d6e093e67b01fa17e1da18b4274bc |
# -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein
#
# Visvis is distributed under the terms of the (new) BSD License.
# The full license can be found in 'license.txt'.
import numpy as np
import visvis as vv
import zlib, base64
# todo: parameterize; allow custum Gaussian blobs at specified positions.
if Fals... | chiluf/visvis.dev | functions/peaks.py | Python | bsd-3-clause | 13,421 | [
"Gaussian",
"MOE"
] | 2e3455d2d5489a449cacbb47b0e1160bf2fc47fe76e720099b894b29a19493ae |
## These are the mask bits in ANYMASK / ALLMASK.
#
# From: http://www.noao.edu/noao/staff/fvaldes/CPDocPrelim/PL201_3.html
# 1 -- detector bad pixel InstCal
# 1 -- detector bad pixel/no data Resampled
# 1 -- No data Stacked
# 2 -- saturated InstCal/Resampled
... | legacysurvey/pipeline | py/legacypipe/bits.py | Python | gpl-2.0 | 2,859 | [
"Galaxy"
] | b6251b6ae854d85a1c735e1201ee4942bf7e959c996775e0394e0b66596ac16e |
#-*- coding: utf-8 -*-
#
####
# 2006/02 Will Holcomb <wholcomb@gmail.com>
#
# This 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 the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any l... | alfa-jor/addon | plugin.video.alfa/lib/MultipartPostHandler.py | Python | gpl-3.0 | 4,984 | [
"Brian"
] | 09b43e4a7ac96cd5fb51fc2c8bc31dc71e75f2e8cb5429f58bcbe620950dff3d |
"""Declare critical models for Hydroshare hs_core app."""
import copy
import json
import logging
import os.path
import re
import unicodedata
from uuid import uuid4
import arrow
from dateutil import parser
from django.conf import settings
from django.contrib.auth.models import User, Group
from django.contrib.contenttyp... | hydroshare/hydroshare | hs_core/models.py | Python | bsd-3-clause | 207,265 | [
"NetCDF"
] | 598ede8b4bcf6e55b4f449e73e921af3bb37751fc2804842cf195ae39987ddbc |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines classes to represent the density of states, etc.
"""
import functools
import warnings
from typing import Dict, Optional
import numpy as np
from monty.json import MSONable
from scipy.constants.codata i... | materialsproject/pymatgen | pymatgen/electronic_structure/dos.py | Python | mit | 39,326 | [
"DIRAC",
"Gaussian",
"VASP",
"pymatgen"
] | b976225b1f584a8f312dd1e34b714100d10d49445b7381d85f79a0c139646702 |
from common2 import *
# NAME IDEA -> pooling/random/sparse/distributed hebbian/horde/crowd/fragment/sample memory
# FEATURES:
# + boost (TODO vol?)
# + noise
# + dropout -- temporal disabling of neurons
# + decay -- move from mem to vol
# + negatives -- learning to avoid detecting some patterns
# - prune -- if input ... | mobarski/sandbox | rsm/v9le/v2.py | Python | mit | 5,289 | [
"NEURON"
] | 6ad0d342df384cc6daeaff3e83cf6a929ee2c9b33b39e410fe8a0709d98d9fe1 |
"""
Tools for the instructor dashboard
"""
import dateutil
import json
from django.conf import settings
from django.contrib.auth.models import User
from django.http import HttpResponseBadRequest
from django.utils.timezone import utc
from django.utils.translation import ugettext as _
from courseware.models import Stud... | LICEF/edx-platform | lms/djangoapps/instructor/views/tools.py | Python | agpl-3.0 | 8,753 | [
"VisIt"
] | 8ce9b8a43abeddf8e176a9d1290f9f591074b64df0e90da2963388d38b49e6db |
'''
Deep Residual Learning for Image Recognition, http://arxiv.org/abs/1512.03385
an exmaple of deep residual network for cifar10
commands & setups:
set following parameters in example/image-classification/train_model.py
momentum = 0.9,
wd = 0.0001,
initializer = mx.init.Xavier(rnd_type="gaussian", factor_... | aaalgo/picpac | examples/mxnet/symbol_resnet-28-small.py | Python | bsd-2-clause | 5,340 | [
"Gaussian"
] | 9cc63d0e766d9f37034977378a384d86bce24c142aff90377f0c1118917b5bb4 |
# Copyright (c) 2009-2021 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause
# License.
"""Implement BoxResize."""
from hoomd.operation import Updater
from hoomd.box import Box
from hoomd.data.parameterdicts import ParameterDict
from hoomd.data.typ... | joaander/hoomd-blue | hoomd/update/box_resize.py | Python | bsd-3-clause | 4,573 | [
"HOOMD-blue"
] | 56c329db4ed46de41ba1f0b069f9aed7d81ef0394e126e41b98fcb612db6ca0c |
"""
This class a wrapper around elasticsearch-py.
It is used to query Elasticsearch instances.
"""
from datetime import datetime
from datetime import timedelta
import certifi
import copy
import functools
import json
try:
from opensearchpy import OpenSearch as Elasticsearch
from opensearch_dsl import Search, ... | DIRACGrid/DIRAC | src/DIRAC/Core/Utilities/ElasticSearchDB.py | Python | gpl-3.0 | 19,612 | [
"DIRAC"
] | 8537fd55fcd14d67fffa71a6df6106a269b2da50c4aabaa8691cb0f82c4d50cf |
#
# Differential evolution MCMC
#
# This file is part of PINTS (https://github.com/pints-team/pints/) which is
# released under the BSD 3-clause license. See accompanying LICENSE.md for
# copyright notice and full license details.
#
import pints
import numpy as np
import warnings
class DifferentialEvolutionMCMC(pints... | martinjrobins/hobo | pints/_mcmc/_differential_evolution.py | Python | bsd-3-clause | 11,031 | [
"Gaussian"
] | 77def2541f1aa7cae89000342c5385a9e2f06207912c3a14f4f38a6420de3c92 |
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python
# USAGE:
# PREAMBLE:
import numpy as np
import MDAnalysis
import sys
import os
import matplotlib.pyplot as plt
traj_file ='%s' %(sys.argv[1])
# ----------------------------------------
# VARIABLE DECLARATION
base1 = 1
nbases = 15
#nbases = 3
#Nsteps ... | rbdavid/DNA_stacking_analysis | angles_binary.py | Python | mit | 9,052 | [
"MDAnalysis"
] | aaf26dc5bd24c213721622bf24ae410aa4e09edd734063bd21d63e0e1f760c33 |
from ase import Atoms
from gpaw import GPAW
from gpaw.tddft import TDDFT
from gpaw.tddft.ehrenfest import EhrenfestVelocityVerlet
import sys
d = 4.5
atoms = Atoms('NaCl', [(0,0,0),(0,0,d)])
atoms.center(vacuum=4.5)
d = 4.0
atoms.set_positions([(0,0,0),(0,0,d)])
atoms.center()
gs_calc = GPAW(nbands=4, gpts=(64,64,96),... | qsnake/gpaw | gpaw/test/ehrenfest_nacl.py | Python | gpl-3.0 | 814 | [
"ASE",
"GPAW"
] | 37249e01299da86266924cebf6ea5e44d410b79fd1f030aed21cb51de3df6012 |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | mganeva/mantid | scripts/test/AbinsLoadCRYSTALTest.py | Python | gpl-3.0 | 2,341 | [
"CRYSTAL"
] | ac70207b8382043116f21b6e577b5cbec4823f8b71325e687aecb466f8c3ce6a |
# -*- coding: utf-8 -*-
"""
Unit tests for instructor.api methods.
"""
# pylint: disable=E1111
import unittest
import json
import requests
import datetime
from urllib import quote
from django.test import TestCase
from nose.tools import raises
from mock import Mock, patch, ANY
from django.conf import settings
from djang... | WatanabeYasumasa/edx-platform | lms/djangoapps/instructor/tests/test_api.py | Python | agpl-3.0 | 97,192 | [
"VisIt"
] | 7be0515173bfabbce8c7903e6e90d59f2c0933c2bd44acb187937ade53daa89e |
"""
End-to-end tests for the main LMS Dashboard (aka, Student Dashboard).
"""
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.dashboard import DashboardPage
from common.test.a... | eduNEXT/edunext-platform | common/test/acceptance/tests/lms/test_lms_dashboard.py | Python | agpl-3.0 | 5,617 | [
"VisIt"
] | 58f8371c812aa759cd246b37152d952822c1533fd2b3062888656f1223a6451b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.