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
"""Generate C code from an ASDL description."""
# TO DO
# handle fields that have a type but no name
import os, sys
import asdl
TABSIZE = 8
MAX_COL = 80
def get_c_type(name):
"""Return a string for the C name of the type.
This function special cases the default types provided by asd... | MicroTrustRepos/microkernel | src/l4/pkg/python/contrib/Parser/asdl_c.py | Python | gpl-2.0 | 40,250 | [
"VisIt"
] | cbda3fd94b43b649f51e08d19578304abfb729ae577364ca7606b11890a38e7f |
"""
Automaton routines for controlling Google Chrome.
"""
import json
import urllib2
import subprocess
from websocket import create_connection
class MethodBuilder:
def __init__(self, comm, name):
self.comm = comm
self.name = name
def __getattr__(self, attr):
return MethodBuilder(self.c... | conceptcreative/free_grants_community | autocomplete/automaton.py | Python | mit | 1,951 | [
"VisIt"
] | edf5f206a3873fa17107fc664a85d1129667165aa8b1b8e76371c0bcb4764734 |
# Copyright (c) 2014 Alexander Bredo
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the above
# copyright notice, this list of conditions ... | alexbredo/ipfix-receiver | iana/protocol.py | Python | bsd-2-clause | 126,303 | [
"ASE",
"Galaxy",
"MCell",
"Octopus"
] | 0af5884053be2cd9886c0664109fd3461f31216b5455ed7419a0dd3fb8d936cd |
# Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.2/Lib/concurrent/futures/process.py | Python | mit | 15,075 | [
"Brian"
] | 822da1bda4a6e108bcee8a1fe22ad93871cdcab08d4935dd2a3587a4e3c22717 |
from __future__ import print_function, division
import unittest, numpy as np
from pyscf import gto, scf
from pyscf.nao import gw as gw_c
class KnowValues(unittest.TestCase):
def test_sf_gw_corr(self):
""" This is choice of wmin and wmax in GW """
mol = gto.M( verbose = 1, atom = '''H 0 0 0; H 0.17 0.7 0.58... | gkc1000/pyscf | pyscf/nao/test/test_0055_gw_sf_gw_corr.py | Python | apache-2.0 | 583 | [
"PySCF"
] | 70e08e313427122e415ce88a807cfa204c2c4bf6547b5dcee974b63924cfc174 |
###############################################################################
## Initialise analysis
###############################################################################
# Import required modules
import subprocess
import sys
import numpy
import argparse
import itertools
import os
# Import custom modules
fr... | adam-rabinowitz/ngs_python | scripts/HiC/HiC_Pairs.py | Python | gpl-2.0 | 7,718 | [
"BWA"
] | 80306d38de3aee61afa2643cf28b23400af5b70b56967f1e1b816d1b5b6d124b |
#!/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... | h3biomed/ansible | lib/ansible/modules/network/avi/avi_analyticsprofile.py | Python | gpl-3.0 | 29,147 | [
"VisIt"
] | 13f3d660305bcb54770de81a9a3feadcd2e34bfd2545916dd319097eee72e339 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 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 pro... | magic-trip/split_fasta | get_taxonomy3.py | Python | gpl-2.0 | 4,971 | [
"BLAST"
] | ac39ea130ddddaea9502b00af5b1b464b0390eeeb81363b834354d12cc9a43bc |
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
VertexDegree()
| jeromevelut/Peavip | Testing/VertexDegree.py | Python | gpl-3.0 | 125 | [
"ParaView"
] | 0481f9013459b13706bc9222fa18a218836698fed42c33d63a1a37c0be05dd0f |
"""
Support and standalone functions for Robust Linear Models
References
----------
PJ Huber. 'Robust Statistics' John Wiley and Sons, Inc., New York, 1981.
R Venables, B Ripley. 'Modern Applied Statistics in S'
Springer, New York, 2002.
C Croux, PJ Rousseeuw, 'Time-efficient algorithms for two highly robust
es... | bashtage/statsmodels | statsmodels/robust/scale.py | Python | bsd-3-clause | 12,462 | [
"Gaussian"
] | 07aed82142fec148831b11661a1b66a0bf5ac9c395a3e8735b56a388808aee87 |
#! /usr/bin/python3
import argparse,sys,os,textwrap
'''
to make 3.5 version use try on parser.parse_args() and then spit usage
As of February 7, 2017 this is good for Gaussian (g09) & GAMESS
It recognizes the format of the individual programs automatically
No need for extra input format command line flags! For now ... | hmilan/qmminpdb | qmminpdb.py | Python | gpl-3.0 | 5,776 | [
"CHARMM",
"GAMESS",
"Gaussian",
"Jaguar",
"NWChem",
"TURBOMOLE",
"VMD"
] | d842d9e5486052f1c1939eb25f19eaf5f8bbe7dfe83cf53d1ca737ad444b04d6 |
from __future__ import absolute_import, print_function
import click
import numpy
from datetime import datetime
from itertools import product
from pandas import to_datetime
from pathlib import Path
from datacube.api import make_mask
from datacube.model import GridSpec, CRS, Coordinate, Variable
from datacube.api.grid... | ceos-seo/Data_Cube_v2 | agdc-v2/apps/stats/main.py | Python | apache-2.0 | 7,362 | [
"NetCDF"
] | 53bc1a47627d3fc3d32daea583270347d64da5d0eae65eebd9b768e2af3f4826 |
# discrete exploration
from explorer import Explorer
from egreedy import EpsilonGreedyExplorer
from boltzmann import BoltzmannExplorer
from dsde import DiscreteSDExplorer
from egreedysde import EpsilonGreedySDExplorer
# continuous exploration
from gaussian import GaussianExplorer
from sde import LinearSDExplorer
| rueckstiess/dopamine | adapters/explorers/__init__.py | Python | gpl-3.0 | 315 | [
"Gaussian"
] | 49bbcaa640ec09762d21253beb0bc2f49d1d5b7599d1b7225d80ce88590ac697 |
import dropbox
import sys, os, json, re
APP_KEY = 'y7cxubkm19o3f9b'
APP_SECRET = '8rguqnx7oqwjqtm'
ACCESS_TYPE = 'app_folder'
STATE_FILE = 'copy_between_accounts.json'
def main():
if APP_KEY == '' or APP_SECRET == '':
sys.stderr.write("ERROR: Set your APP_KEY and APP_SECRET at the top of %r.\n" % __file_... | levibostian/VSAS | leviTesting/dropbox_sdk/dropbox-python-sdk-1.5.1/example/copy_between_accounts.py | Python | mit | 4,719 | [
"VisIt"
] | 0d1829bcae3d0d827c196c1b131a63da4e108b12a1921d405c54461a2cc4a86a |
"""
CBMPy: MultiCoreEnvFVA module
=============================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2022 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the G... | SystemsBioinformatics/cbmpy | cbmpy/_multicoreenvfva.py | Python | gpl-3.0 | 3,565 | [
"PySCeS"
] | 0480c51adde7a27e4483531f5c2244e6e58de2eb8d19cf9e176e8fc3fac127b1 |
# -*- coding: utf-8 -*-
"""
Bok choy acceptance tests for Entrance exams in the LMS
"""
from textwrap import dedent
from common.test.acceptance.tests.helpers import UniqueCourseTest
from common.test.acceptance.pages.studio.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.courseware import Courseware... | chrisndodge/edx-platform | common/test/acceptance/tests/lms/test_lms_entrance_exams.py | Python | agpl-3.0 | 4,130 | [
"VisIt"
] | dec5a964b57ac7616418f25ebd1eb008164cfdca1bfb476d45cb50adf5dacef6 |
"""Parser for FSSP files, used in a database of protein fold classifications.
This is a module to handle FSSP files. For now it parses only the header,
summary and alignment sections.
See: Holm and Sander (1996) The FSSP database: fold classification based on
structure-structure alignment of proteins.
functions: rea... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/FSSP/__init__.py | Python | gpl-2.0 | 8,794 | [
"Biopython"
] | cc188fba0d0e4bc01a9b354296c328e277b5830016b7a4e8cd48c1f758b04754 |
"""Astral geocoder is a database of locations stored within the package.
To get the :class:`~astral.LocationInfo` for a location use the
:func:`~astral.geocoder.lookup` function e.g. ::
from astral.geocoder import lookup, database
l = lookup("London", database())
All locations stored in the database can be a... | sffjunkie/astral | src/astral/geocoder.py | Python | apache-2.0 | 25,932 | [
"COLUMBUS"
] | 396213612fe1446c1d81194bb451c582f15cb6e9395e6388f3bc6525d2efa8fb |
#!/usr/bin/env python
# the lines should be grouped by queries (as usual, do sort file.blast if not)
import string
import sys
import re
blastres = sys.argv[1]
try:
Hits=open(blastres, 'r')
except IOError, e:
print "file not found or unreadable: ",blastres
pass
bestHit=Hits.readline()
maxscore=bestHit.split()[1... | alunem/bioman | blast/bmn-BlastBestHit.py | Python | gpl-2.0 | 582 | [
"BLAST"
] | e13c3325192d49b25c583810c33faf33db1ce4f27951f25080d7d30a51bf9285 |
# The purpose of this test is to detect a change in the _metric_json of MetricsBase objects. Many of the metric
# accessors require _metric_json to have a particular form.
import sys
sys.path.insert(1, "../../")
import h2o, tests
def metric_json_check(ip, port):
df = h2o.import_file(path=h2o.locate("smalldat... | bospetersen/h2o-3 | h2o-py/tests/testdir_misc/pyunit_metric_json_check.py | Python | apache-2.0 | 10,423 | [
"Gaussian"
] | ffd2ce51dd149393dfedef1501424aba120a932c9fdc416f157cfd1c736fa79b |
# -----------------------------------------------------------------------------
# ParaView Python - Path setup
# -----------------------------------------------------------------------------
import sys, time
pv_path = '/Users/seb/work/code/ParaView/build-ninja'
# sys.path.append('%s/lib' % pv_path)
# sys.path.append('... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/Plugins/RGBZView/Scripts/TestAssemblyExport.py | Python | gpl-3.0 | 806 | [
"ParaView"
] | e33d31dce5d8489bb1b6bb32754d52fd2b68d28778cef9c1d18b4bc30023985f |
# Copyright 2015, 2018 IBM Corp.
#
# 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 require... | stackforge/nova-powervm | nova_powervm/tests/virt/powervm/test_media.py | Python | apache-2.0 | 10,781 | [
"FEFF"
] | aebfa1c767a8fffb5aacb02e440cc1a623e20656c466ea9fe46dc735d228386b |
import moose
import numpy as np
import rdesigneur as rd
def test_chem_osc():
"""Test chemical oscillation.
"""
rdes = rd.rdesigneur(
turnOffElec = True,
diffusionLength = 1e-3, # Default diffusion length is 2 microns
chemProto = [['makeChemOscillator()', 'osc']],
chemDistrib... | dilawar/moose-core | tests/rdesigneur/test_6_chem_osc.py | Python | gpl-3.0 | 900 | [
"MOOSE"
] | c5f30adc80f05afb6c2cf3c79fed64f9b19dfc276a3ba988f434f56d192c25ee |
# -*- coding:utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2010, 2011, 2012, 2013 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your ... | CERNDocumentServer/invenio | modules/bibindex/lib/bibindex_engine_tokenizer_unit_tests.py | Python | gpl-2.0 | 18,395 | [
"Brian",
"Galaxy"
] | 82f03591cb621b09fadba2ae7f8aeb80e8cc42618174a13eff16dcf3a7649dea |
import numpy as np
class NeuralNet:
def __init__(self, Y, X, layers=[1], iterations=10000, normalize=False, bias=0, activation='sigmoid'):
"""
initialize this neural net object with training set, dependent variables and other optional parameters
@param Y dependent variables
@param... | kgwinnup/neural-network-py | kneuralnet/nn.py | Python | bsd-2-clause | 3,565 | [
"NEURON"
] | a0b6f1405c4c334186664a439450c2e5e5f18de1d40f5ae50f364419455f3a87 |
"""
RSEM datatypes
"""
import logging
import os
import os.path
from galaxy.datatypes.images import Html
from galaxy.datatypes.metadata import MetadataElement
from galaxy.datatypes.sniff import get_headers
from galaxy.datatypes.tabular import Tabular
log = logging.getLogger(__name__)
class RsemIsoformsResults(Tabul... | ARTbio/tools-artbio | tools/rsem/rsem.py | Python | mit | 12,603 | [
"Galaxy"
] | 5917473bd511a40eaa9c87c1511b85caedeb1c472d0960397004216c5b8eff58 |
#!/usr/bin/env python
# htcondor_dag.py: distributed python using a HTCondor DAG
# Copyright (C) 2013 Brian Candler
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program... | candlerb/htcondor_dag.py | htcondor_dag.py | Python | gpl-2.0 | 19,345 | [
"Brian"
] | 50c703f7049a3d4dadc7dc887185c5dcf059d0618ca5997dce001515ff3d041b |
# Copyright 2007 by Tiago Antao <tiagoantao@gmail.com>. 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 work with FDist (DEPRECATED).
See http:/... | zjuchenyuan/BioWeb | Lib/Bio/PopGen/FDist/__init__.py | Python | mit | 3,149 | [
"Biopython"
] | c8600224b12201589323c4c3174ceccc0ba4de904e8999ed2d8254c817ca743b |
#!/usr/bin/env python
#=============================================================================#
# #
# NAME: do_RMsynth_3D.py #
# ... | crpurcell/RM-tools | RMtools_3D/do_RMsynth_3D.py | Python | mit | 15,885 | [
"Gaussian"
] | 762aa787ea1c432ab664cbef4667d7f79cd73b1f094ecb796edef6ae6fc42933 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import unittest
import mock
from collections import defaultdict
import sys
import traceback
import subprocess
import json
import re
import os
from rdflib import Graph, Namespace, Literal, XSD
from Bio.Blast import NCBIXML, Record
from superphy.upload._sparql import chec... | kevinkle/semantic | superphy/src/upload/tests/test_gene_location_upload.py | Python | apache-2.0 | 13,343 | [
"BLAST"
] | 7d73288864604ffb65c19b8ded66580f0a2e52a037d135043b0dd9f79e550713 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Safari history plist plugin."""
import unittest
from plaso.parsers.plist_plugins import safari
from tests.parsers.plist_plugins import test_lib
class SafariPluginTest(test_lib.PlistPluginTestCase):
"""Tests for the Safari history plist plugin."""
... | log2timeline/plaso | tests/parsers/plist_plugins/safari.py | Python | apache-2.0 | 1,698 | [
"VisIt"
] | 488414cd2b3a04f24c427ff1f11e416fcc3c19478e8cec7c27b3a9d3ced142f3 |
#!/usr/bin/env python
# Copyright 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
#
# Unless... | sunqm/pyscf | pyscf/mcscf/test/test_avas.py | Python | apache-2.0 | 1,907 | [
"PySCF"
] | 6f3df758b4cac4000fe6573b89fb74172d581c29114d8e9c6b7544e2842ffe7b |
# -*- coding: utf-8 -*-
"""
***************************************************************************
dataobject.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
****************************... | wbyne/QGIS | python/plugins/processing/tools/dataobjects.py | Python | gpl-2.0 | 16,608 | [
"NetCDF"
] | c4be4c0491ed6ff1ce58fd5ce7a6ae2e2ceae1a1880f94b781a36e53bbe72c34 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ===========================================================================
# eXe
# Copyright 2012, Pedro Peña Pérez, Open Phoenix IT
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | UstadMobile/eXePUB | exe/jsui/mainpage.py | Python | gpl-2.0 | 60,336 | [
"VisIt"
] | d41a6155247c717694bb0e87be5ea74019dc7110a05fc18ef0af95f23fb176da |
#!/usr/bin/env python
#########################################################################################
#
# Convert binary spinal cord segmentation to trilinear-interpolated segmentation. Instead of simply re-interpolating
# the image, this function oversample the binary mask, then smooth along centerline (to r... | 3324fr/spinalcordtoolbox | scripts/isct_convert_binary_to_trilinear.py | Python | mit | 6,870 | [
"Gaussian"
] | 9f49391c56719a4cdad610877c9b71e814822f4dc14f8e7b265d784d5dfc6b7e |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"This assumes some of current data in production."
# Note: Don't use "from ap... | myvoice-nigeria/myvoice | myvoice/survey/migrations/0021_clean_hospital_materials.py | Python | bsd-2-clause | 15,639 | [
"VisIt"
] | 19653bbeaa98914c371d7f7d552c2cce335b39d5bf38000aad6e2ebe4fc2434c |
import unittest
from mock import Mock
from DIRAC.Interfaces.API.Job import Job
class APITestCase( unittest.TestCase ):
""" Base class for the Modules test cases
"""
def setUp( self ):
self.job = Job()
def tearDown( self ):
pass
class APISuccess( APITestCase ):
def test_basicJob( self ):
self.... | avedaee/DIRAC | Interfaces/API/test/test_API.py | Python | gpl-3.0 | 6,075 | [
"DIRAC"
] | 8ec77f76a88af8280961c16743fa5f0c24a4d606135f84ad1fb04ceab784b0a8 |
# Example of the visitor pattern
# --- The following classes represent nodes in an expression tree
class Node:
pass
class UnaryOperator(Node):
def __init__(self, operand):
self.operand = operand
class BinaryOperator(Node):
def __init__(self, left, right):
self.left = left
self.rig... | tuanavu/python-cookbook-3rd | src/8/implementing_the_visitor_pattern/example.py | Python | mit | 2,774 | [
"VisIt"
] | 408c624ff7e69c334ecde6c50762fdbdbe29e14c993a9dab74b8702e67e6ce7b |
# ICE Revision: $Id$
""" Paraview interaction
Classes that help to interact with a Python-enabled paraFoam/paraview
"""
hasSimpleModule=True
try:
from paraview import simple
except ImportError:
hasSimpleModule=False
# this import prevents python-source-tools that ude introspection from working
# because it ... | mortbauer/openfoam-extend-Breeder-other-scripting-PyFoam | PyFoam/Paraview/__init__.py | Python | gpl-2.0 | 3,594 | [
"ParaView"
] | efdf0ff3d4e55fdcd8a64d0b0c9377ec1cd25ca5860d9c1ce01c8cc9d02f45f0 |
from __future__ import print_function
import json, sys, os, math, argparse, time
import multiprocessing as mp
from cytoolz.itertoolz import partition_all
import svtyper.version
from svtyper.parsers import Vcf, Variant, Sample, SamFragment, confidence_interval
from svtyper.utils import die, logit, prob_mapq, write_sam... | hall-lab/svtyper | svtyper/singlesample.py | Python | mit | 35,175 | [
"pysam"
] | 6bd76d5022cc66276daacb1cc700cac22b1a0fda6596062f9e17badc1e6ad456 |
from __future__ import (absolute_import, division,
print_function, unicode_literals)
exec(open("ground.py").read())
from scipy.spatial import procrustes
"""
utility.py
--------------
A few helpful routines for plotting
TS, Jan 2016 (made compatible with vectorized hamiltonian.py)
... | tonyshardlow/reg_sde | utility.py | Python | mit | 14,529 | [
"Gaussian"
] | 17a03a4e95ca99a701ee52cf701ea9dd9a5c4c984856ea371d8f9dc23b90ee46 |
# -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
... | erangre/Dioptas | dioptas/tests/unit_tests/test_background_extraction.py | Python | gpl-3.0 | 3,531 | [
"Gaussian"
] | 416e28bc6a394fabb9ac2b0ac1f8a435c82bcdb256c4aefecb3b9f5081623274 |
import numpy as np
def gaussian(x, A, mu, sig):
return A * np.exp(-(x - mu)**2 / (2 * sig**2))
def linear(x, m, b):
return m * x + b
| mmoran0032/pyne | sap/functions.py | Python | mit | 147 | [
"Gaussian"
] | 5fa7e360573eed948fc0c78a6ecc0885a55b310399e546b151c061da88403b45 |
#!/usr/bin/env python
import os
import sys
import numpy as np
import argparse as arg
from datetime import datetime
from collections import OrderedDict
import QM_parser.parser as parser
def checkfile(filename):
if not os.path.isfile(filename):
# print(banner(text='ERROR', ch='#', length=80))
prin... | dpadula85/ExSPy | stable/Opts.py | Python | gpl-3.0 | 12,878 | [
"Gaussian"
] | 5814d8617f52ca418f59bef82a03d509ff117556627b478c649b02cd41af25bf |
#!/usr/bin/env python
# a tool to select the best reference genome given a set of reads
import argparse
import os
import random
import sys
import bias
# dependencies
# * seqtk
# * bwa
BAM_TO_SAM="samtools view -h %s"
BEDTOOLS="bedtools"
BOWTIE_PATH="bowtie2"
BWA_PATH="/mnt/work/reference-bias/tools/bwa-0.7.12/bwa"... | supernifty/reference-bias | bin/choose_reference.py | Python | apache-2.0 | 2,623 | [
"BWA"
] | cf1b318eb5012b4bc31162202a3a35a8323bb0e0c5a6fff29600a0e1520f7f4d |
#!/usr/bin/env python
import sys
version = "1.1"
tag = "20120826-TAW"
# Martini Force Field Definition Generating Script - Polarizable water version
# Version 2012-02-19 TAW
# Dictionary of coarse grained bead types and masses
beads = { # Name: Mass
"P5": 72, "P4": 72, "P3": 72, "P2": 72, "P1":... | penuts7644/InsaneModel | src/main/webapp/insane/martini22p.py | Python | gpl-3.0 | 34,542 | [
"Gromacs"
] | 4461242bec3b0aa2ce9b310aa11d3d927c22006745b88ddc0daaa2a7be55b3b1 |
#===============================================================================
# LICENSE XOT-Framework - CC BY-NC-ND
#===============================================================================
# This work is licenced under the Creative Commons
# Attribution-Non-Commercial-No Derivative Works 3.0 Unported Lic... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/net.rieter.xot.smallplayer/resources/libs/update.py | Python | gpl-2.0 | 2,838 | [
"VisIt"
] | 341c8277e8c0b3c014d4d9798bf5a2df9868661da8502883622ab306007b4d06 |
import numpy as np
from numpy.random import seed
class AdalineSGD(object):
"""ADAptive LInear NEuron classifier.
Parameters
------------
eta : float
Learning rate (between 0.0 and 1.0)
n_iter : int
Passes over the training dataset.
Attributes
-----------
w_ : 1d-array
... | 1iyiwei/pyml | code/ch02/adaline_sgd.py | Python | mit | 3,085 | [
"NEURON"
] | d288fc38b09c11ef95ea83550ab91263bbcec79233be70c903b8da4c604d8dfb |
import matplotlib as mpl
from PyQt4 import QtCore, QtGui
import sys
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
mpl.rcParams['backend.qt4']='PySide'
import numpy as np
import scipy.ndimage as nd
import scipy
i... | dattalab/d_code | imaging/segmentation/CellPicker.py | Python | mit | 47,797 | [
"Gaussian"
] | d88fed5dc7f75f4f76eb1ad12ba53628a5a1bd3fd6ef3e51a14899560327f7d8 |
#!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterf... | valentin-krasontovitsch/ansible | lib/ansible/modules/cloud/amazon/ec2_elb_lb.py | Python | gpl-3.0 | 53,539 | [
"Dalton"
] | ab5612bea90188d57467be08242c73c98c2f75ea375a63ab7658d83e71b91c60 |
r"""*Test runner module for* ``tempvars``.
Context manager for handling temporary variables in
Jupyter Notebook, IPython, etc.
**Author**
Brian Skinn (bskinn@alum.mit.edu)
**File Created**
11 Sep 2017
**Copyright**
\(c) Brian Skinn 2017-2018
**Source Repository**
http://www.github.com/bskinn/tempva... | bskinn/tempvars | tests.py | Python | mit | 2,660 | [
"Brian"
] | 9ec3382d49d7040ef248325cce40f15ae400b7a99209ef57a62496ccdbd66031 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2020, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Input Generator and Parser
#############################
Every attempt is made to follow the Documentation on the
NWChem `website`_ with a general theme of the input Generator
ac... | exa-analytics/atomic | exatomic/nwchem/inputs.py | Python | apache-2.0 | 9,896 | [
"NWChem"
] | 4af2f7989d3aace49f51448a01781f9188f8d1279b3ac1f7ecc4f664ade10cd5 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Parse RANCID db files so they can be converted into Trigger NetDevice objects.
.. versionadded:: 1.2
Far from complete. Very early in development. Here is a basic example.
>>> from trigger import rancid
>>> rancid_root = '/path/to/rancid/data'
>>> r = Ra... | sysbot/trigger | trigger/rancid.py | Python | bsd-3-clause | 14,103 | [
"VisIt"
] | 1ea2d920c383312bcf0bdd87a32aa268321a5550767a241182e7ee30e7d10012 |
import tensorflow as tf
import numpy as np
np.set_printoptions(precision=2)
import logging
import random
import os
os.system("rm -r graph/*")
from os.path import join as j
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# multiple classes, but only one true class
from tensorflow.python.clie... | stefanthaler/tf-spikes | mlp-vae/train.py | Python | apache-2.0 | 9,716 | [
"Gaussian"
] | f5979c629ab1f47bb38916b820451b7892960dfe450de3872aade37735e292e0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl>
#
# This file is a part of the Simple Network Simulator (sim2net) project.
# USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO
# THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H... | mkalewski/sim2net | sim2net/placement/normal.py | Python | mit | 4,637 | [
"Gaussian",
"VisIt"
] | 9eef7f4459e28b73ee18c2190daf07e09fefa6cd25a44da3a935ea7c892d6686 |
####################################################################
# Rdesigneur example 3.1
# Making an axon with a propagating action potential.
####################################################################
import numpy as np
import moose
import pylab
import rdesigneur as rd
numAxonSegments = 200
comptLen = ... | BhallaLab/moose-examples | tutorials/Rdesigneur/ex3.3_AP_collision.py | Python | gpl-2.0 | 1,627 | [
"MOOSE",
"NEURON"
] | 61f0b57ce0a191f4de341eadd4d3a580b0d0f0ed30a9a7388680c182833ea291 |
from .intensity_family import IntensityFamily
from . import viboud_chowell
from .viboud_chowell import ViboudChowellFamily
from . import gaussian
from .gaussian import GaussianFamily
from . import soft_laplace
from .soft_laplace import SoftLaplaceFamily
from .high_level import *
from . import constants
from . import ... | HopkinsIDD/EpiForecastStatMech | epi_forecast_stat_mech/__init__.py | Python | apache-2.0 | 375 | [
"Gaussian"
] | 0e18a19fcc3ff2612b05fa5aa11336405988b466c6afe7335ced4aefd71d6714 |
from datetime import datetime
from sqlalchemy import (
DateTime,
ForeignKey,
Index,
Integer,
String,
Date,
)
from rdalchemy import Mol
from aggregatoradvisor import (
app,
db,
)
# Import Flask-SQLAlchemy objects
Column = db.Column
Model = db.Model
Table = db.Table
backref = db.backref
... | teaguesterling/aggregator-advisor-example | aggregatoradvisor/models.py | Python | mit | 5,683 | [
"RDKit"
] | 09c73f507dad45c7607e5fc14e59cc71716cd9d90979c734e575627c33ba758f |
import os
import sys
import redis
import random
import numpy as np
import yaml
try:
from samcnet import samc,lori,utils
from samcnet.lori import *
except ImportError as e:
sys.exit("Make sure LD_LIBRARY_PATH is set correctly and that the build"+\
" directory is populated by waf.\n\n %s" % str(e... | binarybana/samcnet | exps/exp_class.py | Python | mit | 1,672 | [
"Gaussian"
] | e5c23a7e36e67669993e5165c44dc780b526ee2686fd70123c98e7e10f1cff8d |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Calculation of DDEC charges based on data parsed by cclib."""
import copy
import random
import numpy
import logging
imp... | cclib/cclib | cclib/method/ddec.py | Python | bsd-3-clause | 39,124 | [
"cclib"
] | a59df967304fecdd92fafd13ec05507860f888a89e33e61bdb471e3e149b1c77 |
# -*- coding: utf-8 -*-
"""
pysteps.io.exporters
====================
Methods for exporting forecasts of 2d precipitation fields into various file
formats.
Each exporter method in this module has its own initialization function that
implements the following interface::
initialize_forecast_exporter_xxx(outpath, out... | pySTEPS/pysteps | pysteps/io/exporters.py | Python | bsd-3-clause | 31,978 | [
"NetCDF"
] | e860ae304f6e85ea83cfab786dd60ca99d07fcda2a223de0ec7811f76c980c5b |
# Author: Travis Oliphant 2001
# Author: Nathan Woods 2013 (nquad &c)
from __future__ import division, print_function, absolute_import
import sys
import warnings
from functools import partial
from . import _quadpack
import numpy
from numpy import Inf
__all__ = ['quad', 'dblquad', 'tplquad', 'nquad', 'quad_explain',
... | yuanagain/seniorthesis | venv/lib/python2.7/site-packages/scipy/integrate/quadpack.py | Python | mit | 32,007 | [
"Gaussian"
] | 3decb144b320333b2b5cdcdde59f808643006133583d775d3cccce8980d400e5 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
########################################################################
# Solves problem 41 from projectEuler.net.
# Finds the largest n-pandigital prime.
# Copyright (C) 2010 Santiago Alessandri
#
# This program is free software: you can redistribute it and/or ... | sanSS/programming-contests | project-euler/problem041.py | Python | gpl-3.0 | 1,420 | [
"VisIt"
] | ab2050bb315cea284c3b69f47bb4d457e78cb9f82b39316a331c15f03182b518 |
# -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2010 Thomas Perl and the gPodder Team
#
# gPodder 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... | timabell/gpodder | src/gpodder/gui.py | Python | gpl-3.0 | 169,338 | [
"VisIt"
] | 13f8486c2aae10ab9d62d2ecc6d0235e8fd9bd1b37a1da3ae29ff2f73ca62a61 |
import io
import logging
import mimetypes
import os
import re
import threading
import time
import html
from binascii import crc32
import itchat
import magic
import xmltodict
from pyqrcode import QRCode
from PIL import Image
import config
from channel import EFBChannel, EFBMsg, MsgType, MsgSource, TargetType, ChannelT... | RoyXiang/ehForwarderBot | plugins/eh_wechat_slave.py | Python | gpl-3.0 | 41,783 | [
"VisIt"
] | b8af3455d874fc9a84cd85fd9ac98ca83b0abe782860cdfce753179c993836e2 |
# -*- coding: utf-8 -*-
"""
@file turndefinitions.py
@author Karol Stosiek
@author Michael Behrisch
@date 2011-10-26
@version $Id: connections.py 22608 2017-01-17 06:28:54Z behrisch $
Operations and classes necessary to operate on SUMO connections.
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
C... | 702nADOS/sumo | tools/turn-defs/connections.py | Python | gpl-3.0 | 18,016 | [
"Gaussian"
] | ab2c74d7c4e03d306b1f8b8c64cb48fa3c486c850e36e10c61da7fa3e69df2d9 |
"""
An example of how to load a non-compliant unstructured grid file
NOTE: This example works for loading a gridded dataset from
an arbitrary text file. You should be able to work with
it once loaded.
But ASaving it back out as a conforming file is broken:
We need a "proper" way to save a full dataset. C... | NOAA-ORR-ERD/gridded | examples/non_conforming_files/load_arbitrary_ugrid.py | Python | unlicense | 3,388 | [
"NetCDF"
] | 139b19ec03e4dfe980fd9333e473c6da73fb76c7d1fcb6a2dbc415ac1055b268 |
# GromacsWrapper: formats.py
# Copyright (c) 2009-2011 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
"""
Gromacs topology file (ITP) parser
==================================
.. versionadded:: 0.2.5
Basic reading, manipulat... | pslacerda/GromacsWrapper | gromacs/fileformats/itp.py | Python | gpl-3.0 | 32,517 | [
"Gromacs"
] | e368f94a4a7a6c226219dfed6b42e2e8bb21c79c28849033502ce9272f270426 |
import espressopp
import math
# specify number of particles in cubic box
N = 4
num_particles = pow(N, 3)
# create particle positions in 3d lattice
x, y, z, Lx, Ly, Lz = espressopp.tools.lattice.createCubic(N=num_particles, rho=0.5)
# setup LennardJones system (with 0 particles)
system, integrator = espressopp.standar... | junghans/espressopp | examples/external_force/external_force.py | Python | gpl-3.0 | 1,714 | [
"VMD"
] | 7d21a1d1005ef9bd1973069043fc79649704950fba3d970467b84d9b72c09e80 |
"""
Some non-core utility functions for GPs
"""
from __future__ import print_function
import numpy as np
import pylab
try:
import dill
dill_available = 'yes'
except ImportError: dill_available = 'no'
####################################################################################################
def load(fi... | nealegibson/GeePea | src/GPUtils.py | Python | gpl-3.0 | 6,261 | [
"Gaussian"
] | 94aad4b22d0336247955eddd8a76d1c624bcaaffb2c07765d466c0fa7bc9d514 |
'''
Calculation of the net radiative flux:
Rn = Sn + Ln = Sin (1-alpha) + (Lin + Lout)
where
Rn: net radiative flux
Sin: incoming shortwave radiation
alpha: snow albedo
Lin, incoming longwave radiation
Lout: outgoing longwave radiation
@author: kmu
@since: 19. jan. 2011
''... | kmunve/pysenorge | pysenorge/themes/net_radiative_flux.py | Python | gpl-3.0 | 6,363 | [
"NetCDF"
] | 54e2757809a1095c303f19aeee5611460664cc81fbd55d6c789345b749584d81 |
#!/usr/bin/env python
# ==========================================================================================
#
# Copyright (c) 2013 NeuroPoly, Polytechnique Montreal <www.neuro.polymtl.ca>
# Authors: Julien Cohen-Adad, Geoffrey Leveque, Olivier Comtois
#
# License: see the LICENSE.TXT
# ==========================... | 3324fr/spinalcordtoolbox | scripts/sct_get_centerline.py | Python | mit | 49,809 | [
"Gaussian"
] | 8fd88f9a39b5143b5d915597c0ad083b0a24ad2616484341d951a8b773e06b3d |
import pytest
from io import BytesIO
from tests.utils import Command
from thefuck.rules.gulp_not_task import match, get_new_command
def stdout(task):
return '''[00:41:11] Using gulpfile gulpfile.js
[00:41:11] Task '{}' is not in your gulpfile
[00:41:11] Please check the documentation for proper gulpfile formattin... | mcarton/thefuck | tests/rules/test_gulp_not_task.py | Python | mit | 873 | [
"GULP"
] | 286ff9020d246632496daa5ecbd4e922d299a726896708cab9e25e3cdbbbd4dc |
from urlparse import urlparse
from django.db.models import Q
import urllib2
import re
def parse_domain(url, levels=3):
"""
Given a URL or hostname, returns the domain to the given level (level 1 is the top-level domain).
Uses a list of active top-level domains to ensure long TLD's such as ".co.uk" are cor... | zhy0216/xtimr | web/utils.py | Python | mit | 23,424 | [
"CASINO"
] | 6247e7c0084882e74c3ea3fd0a0597bc923a5d42fddb2f49b5e5507ea942232c |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | BlueBrain/NeuroM | tests/view/test_matplotlib_impl.py | Python | bsd-3-clause | 9,016 | [
"NEURON"
] | 80ca9004d029f6bf2358b4a0eef80308ab5aade14b11fa4541b2f2cd134753ef |
# 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 agr... | lleszczu/PerfKitBenchmarker | tests/benchmarks/speccpu2006_benchmark_test.py | Python | apache-2.0 | 11,667 | [
"GAMESS",
"Gromacs",
"NAMD"
] | 4d0442aa02daec0bc7c415134b80d81414cf9795e0da0b9fed0709347c71548a |
# Author: Jason Lu
import re, time, random
import urllib.request
# proxies = {'http':'http://10.10.10.10:8765',
# 'https':'https://10.10.10.10:8765',
# 'http':'http://223.85.96.238:8123'}
# headers = ("User-Agent",
# "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) Appl... | jinzekid/codehub | python/py3_6venv/spider_hexunpjt/spider_hexunpjt/ly_ProxyRequestUtil.py | Python | gpl-3.0 | 8,384 | [
"Galaxy"
] | 797ba07f4814296ebeb2a3af60b59aeed9bcd83979af050b51892de9cf465de7 |
from pymol import cmd
def setAquariaColors():
cmd.set_color("aquaria_sheet", [0.96, 0.78, 0.09])
cmd.set_color("aquaria_helix", [0.39, 0.568, 0.714])
cmd.set_color("aquaria_coil", [0.435, 0.619, 0.321])
def colorByAquaria(selection='all'):
setAquariaColors()
cmd.color("aquaria_helix", "ss H in " + selection)
cm... | julianheinrich/viewpoints | aquaria_colors.py | Python | mit | 518 | [
"PyMOL"
] | 7aed20b0c8469c26cbc5bb4907e8863eae71bff0a7edcd68032a5d7eb5ef2e8a |
#
# Copyright (C) 2000 Stephen Davies
# Copyright (C) 2000 Stefan Seefeld
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#
from Tags import *
class Fragment(object):
"""Generates HTML fragment for a declaration. Multiple strategies are
... | stefanseefeld/synopsis | Synopsis/Formatters/HTML/Fragment.py | Python | lgpl-2.1 | 2,999 | [
"VisIt"
] | 7a832e8e3a55bf9fb650f13bccea41ddbfdd614a18870685bf678f0b242c9987 |
# author: Uwe Reichel, Budapest, 2016
import mylib as myl
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import copasul_plot as copl
import scipy.stats as sps
import copy as cp
import sigFunc as sif
import sys
import re
import math
from scipy import interpolate
##########################... | reichelu/copasul | src/copasul_styl.py | Python | mit | 70,973 | [
"Gaussian"
] | f002ef6d069aa64c8595543c9aa46f8fc79513ae20b13525d927e18820ea2dbf |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | juanchopanza/NeuroM | neurom/apps/cut_plane_detection.py | Python | bsd-3-clause | 8,607 | [
"NEURON"
] | f969ed0033271b19537adca491d3971f89569bbeef7f8cd8b6d9b016c52534d2 |
""" Test class for AccountingDB
"""
#pylint: disable=line-too-long
# imports
import unittest
from mock import MagicMock
import DIRAC.AccountingSystem.DB.AccountingDB as moduleTested
class TestCase( unittest.TestCase ):
""" Base class for the EmailAction / EmailAgent test cases
"""
def setUp( self ):
sel... | Andrew-McNab-UK/DIRAC | AccountingSystem/DB/test/Test_AccountingDB.py | Python | gpl-3.0 | 18,899 | [
"DIRAC"
] | 12240e6e9308b5fe32736510ee389002eba7e6878f115c7c1efd2102d8cb610f |
# Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | dhermes/gcloud-python | bigquery/docs/snippets.py | Python | apache-2.0 | 111,566 | [
"Brian"
] | 7edd261841462d7df6becdfeddeb8c527dc73c6be9076e51b80aa438284bdd0c |
#--------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU ... | tatiana/invesalius | invesalius/data/cursor_actors.py | Python | gpl-2.0 | 12,485 | [
"VTK"
] | 316e12538822cb58ee6ea41174beddae4470c4f37d91df6fc53a43622dfa1c3f |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Clinic.lga'
db.delete_column(u'clinics_clinic', 'lga')
... | myvoice-nigeria/myvoice | myvoice/clinics/migrations/0040_auto__del_field_clinic_lga.py | Python | bsd-2-clause | 13,045 | [
"VisIt"
] | 9dfbc652f75a764101de8b596cee7b76c85bebc72c024134dee9196157ab5172 |
# -*- coding: utf-8 -*-
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Robert Layton <robertlayton@gmail.com>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Philippe Gervais <philippe.gervais@inria.fr>
# Lars Buitinck ... | deepesch/scikit-learn | sklearn/metrics/pairwise.py | Python | bsd-3-clause | 43,701 | [
"Gaussian"
] | 03b4f7f3c8003057c9a138bcef970cd22f9413a9ebf3678553d92426abe2b1f1 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | modules/tensor_mechanics/test/tests/drucker_prager/small_deform3.py | Python | lgpl-2.1 | 3,894 | [
"MOOSE"
] | 888b0e562f9c247d523d55ec9c7dcf9fa15604458d398224483f4eec4fbc4553 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Main script for unit testing
import os
# Define pychemqt environment
os.environ["pychemqt"] = os.path.abspath('.')
os.environ["freesteam"] = "False"
os.environ["pybel"] = "False"
os.environ["CoolProp"] = "False"
os.environ["refprop"] = "False"
os.environ["ezodf"] = "Fals... | jjgomera/pychemqt | tests/__main__.py | Python | gpl-3.0 | 803 | [
"Pybel"
] | 46afaac4ba0aa74f5282e9a4a02e2d42af7665b3fbf5c9b252d528a6a7d49854 |
from subprocess import call #interface to command LangevinNoisePositive
import scipy.optimize as spo
import scipy.io as sio
import numpy as np
import matplotlib.pyplot as plt
plt.ion() #interactive plotting
fig = plt.figure()
ax1 = fig.add_subplot(131)
ax1.set_title('010 loading')
ax1.set_ylim([0,35])
ax2 = fig.add... | jhektor/Puffin | inputfiles/calibration_crypla/calibration_main_removedCopy2.py | Python | lgpl-2.1 | 7,820 | [
"CRYSTAL",
"MOOSE"
] | 263bac285c8e94f7c47306a252b4d639dbcc4396142b914484f158251c73b09b |
#
# Copyright (C) 2013-2018 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 late... | hmenke/espresso | testsuite/python/coulomb_cloud_wall.py | Python | gpl-3.0 | 5,931 | [
"ESPResSo"
] | a33d8c3cc275a2ec414b7cc36602c7d29a89f8495821de9bd9e7e018026032f9 |
"""
Class for outlier detection.
This class provides a framework for outlier detection. It consists in
several methods that can be added to a covariance estimator in order to
assess the outlying-ness of the observations of a data set.
Such a "outlier detector" object is proposed constructed from a robust
covariance es... | valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/sklearn/covariance/outlier_detection.py | Python | gpl-2.0 | 6,917 | [
"Gaussian"
] | c9f207c0126cace5db9f19f86f05056ab018a6f2167554c8beac9ac8e9b54052 |
# Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
"""
Example: MCMC Methods for Tall Data
===================================
This example illustrates the usages of various MCMC methods which are suitable for tall data:
- `algo="SA"` uses the sample adaptive MCMC method in [1]
... | pyro-ppl/numpyro | examples/covtype.py | Python | apache-2.0 | 8,433 | [
"Gaussian"
] | be248adbc1b2768292f263916a461d8020015fe1e4fc575dc8d1728de9f96806 |
"""Implemented support for Common Workflow Language (CWL) for Toil."""
# Copyright (C) 2015 Curoverse, Inc
# Copyright (C) 2015-2021 Regents of the University of California
# Copyright (C) 2019-2020 Seven Bridges
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in c... | BD2KGenomics/slugflow | src/toil/cwl/cwltoil.py | Python | apache-2.0 | 92,605 | [
"VisIt"
] | a114018b64c8842123ebee765a58ebe9d32f74ef403ed3884a5459490b8f2d50 |
#!/usr/bin/python
"""Test of object navigation."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manually.
sequence.append(KeyComboAction("<Control>r"))
sequence.append(utils.Star... | pvagner/orca | test/keystrokes/firefox/object_nav_links_in_text.py | Python | lgpl-2.1 | 7,683 | [
"ORCA"
] | 74ff217072514b9d555898aeddf6564ef9bb76a5efdb9667f085906a64f96a12 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | kain88-de/mdanalysis | package/MDAnalysis/analysis/encore/similarity.py | Python | gpl-2.0 | 64,696 | [
"Gaussian",
"MDAnalysis"
] | fe6246459f0b308cdabd07aedb254895a0e895cc4a4c0783ab49ca88a51f9e68 |
""" Code for generating filters for neural layers (like gabor filters for
V1).
Author: S W keemink
"""
from __future__ import division
import numpy as np
from scipy.stats import multivariate_normal
def RandomFilter(settings, l):
"""Generates a completely random filter.
"""
return np.random.randn(l, l)
d... | swkeemink/PythonTools | swktools/filters.py | Python | gpl-2.0 | 8,357 | [
"Gaussian"
] | e9240ecbeccc0e7dcc59e67c20bdc5faf2bbef06afd1615bad53738080132cc9 |
#!/usr/bin/env python
# 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.
modes = {
'argparse':0,
'trivia':1
}
mpd_host =... | shippingsoon/Shippingsoon | uploads/articles/src/12/config.py | Python | gpl-3.0 | 31,703 | [
"CASINO"
] | c3b9501e7c303667b3c438e71f002fdb78a747531863d289360e5ff404b9e73c |
########################################################################
# $HeadURL$
# File : PilotMonitor.py
# Author : Stuart Paterson
########################################################################
""" The Pilot Monitor Agent controls the tracking of pilots via the AgentMonitor and Grid
specific sub... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/Agent/PilotMonitorAgent.py | Python | gpl-3.0 | 2,048 | [
"DIRAC"
] | 889d615558e5a039f962aedd7b9ca53b7e35f159e52b33184dfeb49d62022738 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing M2M table for field added_by on 'NeuronArticleMap'
db.delete_table('neuroelectro_neuronarticlemap... | lessc0de/neuroelectro_org | neuroelectro/south_migrations/0043_auto.py | Python | gpl-2.0 | 25,888 | [
"NEURON"
] | 638e4cf507e34c908621b284a82d25b165d8c05a46ec47340cd192acb40b4bd8 |
#!/usr/bin/env python3
#
# calculates the covariance from neutron events
# @author Tobias Weber <tweber@ill.fr>
# @date 30-mar-2019
# @license GNU GPLv3
# @descr This tool comes from Takin 2: https://dx.doi.org/10.5281/zenodo.4117437
# @descr For a good explanation of the covariance matrix method, see T. Arens et al., ... | McStasMcXtrace/McCode | tools/Python/mcresplot/cov.py | Python | gpl-3.0 | 18,615 | [
"CRYSTAL"
] | 09ffe6dd4dd440944d8da951df2f2f5ea187407dea6bf63e9c4272e5b31a2b4c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.