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 |
|---|---|---|---|---|---|---|---|
""" TransformationPlugin is a class wrapping the supported transformation plugins
"""
__RCSID__ = "$Id$"
import random
import time
from DIRAC import gConfig, S_OK, S_ERROR
from DIRAC.Core.Utilities.SiteSEMapping import getSitesForSE, getSEsForSite
from DIRAC.Core.Utilities.List ... | vmendez/DIRAC | TransformationSystem/Agent/TransformationPlugin.py | Python | gpl-3.0 | 8,969 | [
"DIRAC"
] | c4c4d41438a3ea6eaceea60d0b6dcc3ad4497bb4138f275b59514d33f12cfbca |
# Hungarian algorithm (Kuhn-Munkres) for solving the linear sum assignment
# problem. Taken from scikit-learn. Based on original code by Brian Clapper,
# adapted to NumPy by Gael Varoquaux.
# Further improvements by Ben Root, Vlad Niculae and Lars Buitinck.
#
# Copyright (c) 2008 Brian M. Clapper <bmc@clapper.org>, Gae... | yuanagain/seniorthesis | venv/lib/python2.7/site-packages/scipy/optimize/_hungarian.py | Python | mit | 9,379 | [
"Brian"
] | 9401fbbf8a262ee13f46648dc98665f99c67b725dd62ef61c3c62e3fdeaaf3a3 |
"""Optimization method
The methods are implemented by referencing Lasagne
Supported methods:
+ Stochastic gradient descent (Momentum and Nestrov Momentum)
+ Adagrad
+ Adadelta
+ RMSprop
+ Adam
"""
from collections import OrderedDict;
import numpy as np;
import theano;
import theano.tensor as T;
def sgd(cost,
... | duguyue100/telaugesa | telaugesa/optimize.py | Python | mit | 11,588 | [
"Gaussian"
] | de537450c120e6ba10ee96e4bbe45008b6020f8c77b9617366fed653830b54ab |
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of astroid.
#
# astroid 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
#... | si618/pi-time | node_modules/grunt-pylint/tasks/lib/astroid/rebuilder.py | Python | gpl-3.0 | 41,848 | [
"VisIt"
] | 31b2aeb87f91cfe4fa69794eb9d3906eceeb89cc7b1190086caf877b0b376840 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | ptkool/spark | python/pyspark/ml/classification.py | Python | apache-2.0 | 110,995 | [
"Gaussian"
] | 3ad7574eea00585b99014bb51df688325239fdf842e40eeb20aaadf63354389b |
# Version: 0.15+dev
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy
* [![Latest Version]
(https... | pelson/conda-build-all | versioneer.py | Python | bsd-3-clause | 73,152 | [
"Brian"
] | 846446d523e01008aed5e60a6b5a722c8858a3d31ba5f5b79097ed5555bb007d |
# (C) British Crown Copyright 2010 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... | LukeC92/iris | lib/iris/tests/stock.py | Python | lgpl-3.0 | 25,319 | [
"NetCDF"
] | b773bad355fdb2ad99f1b76f1de2f434521b47170fce0f3905ba9a5483db44c7 |
from __future__ import division, absolute_import, print_function
import warnings
import numpy as np
from numpy.testing import (
run_module_suite, assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
fr... | b-carter/numpy | numpy/random/tests/test_random.py | Python | bsd-3-clause | 64,526 | [
"Gaussian"
] | 8340f7489ef2feac3786127c0f92e54efa6d6e48a7da8df736d12c9f2ff9bf5b |
# Copyright 2012 OpenStack Foundation
# 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... | eonpatapon/neutron | neutron/tests/unit/agent/linux/test_ip_lib.py | Python | apache-2.0 | 47,231 | [
"Brian"
] | 8779f251e15485588adb4617b814247100c5e7dd44a34cac7cf62ff760d2ee18 |
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, mer... | MSEMJEJME/ReAlistair | renpy/display/core.py | Python | gpl-2.0 | 68,298 | [
"VisIt"
] | 1b96b8a24a3c569ca76086cfc8463a5d2023ead67388164229e4d9b19e256b52 |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 2 15:47:18 2015
@author: pedro
"""
from libphys import *
import matplotlib
def double_gaussian1d(A1, x1, sig1, A0):
sig1 = float(sig1)
return lambda x: (A0*np.exp(-(x-x0)**2/(2*sig0**2)) + offset) * (1 - A1*np.exp(-(x-x1)**2/(2*sig1**2)))
def double_gauss1d_m... | atreyv/atom-phys | libatomphys.py | Python | gpl-3.0 | 21,937 | [
"Gaussian"
] | a07271a3597cb9533262c94d7d0abc090ab546e2821b83d9127afa4176a41835 |
from fireplace.enums import GameTag
# Buff helper
def buff(atk=0, health=0):
ret = {}
if atk:
ret[GameTag.ATK] = atk
if health:
ret[GameTag.HEALTH] = health
return ret
###
# Game/Brawl set
#
TB_006e = buff(+2, +2)
TB_007e = {
GameTag.ATTACK_HEALTH_SWAP: True,
}
TB_Pilot1 = {
GameTag.DEATHRATTLE: True,
... | oftc-ftw/fireplace | fireplace/cards/data/buffs.py | Python | agpl-3.0 | 11,991 | [
"TINKER"
] | 18484e481570e4b1c89271bb4504c9c2141b95907cb31e3597f7ff8096c176d6 |
from django.apps import apps as django_apps
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
from edc_base.model.models import BaseUuidModel, UrlMixin
from edc_consent.model_mixins import RequiresConsentMixin
from edc_metadata.model_mixins import Updates... | botswana-harvard/ba-namotswe | ba_namotswe/models/crf_model_mixin.py | Python | gpl-3.0 | 2,725 | [
"VisIt"
] | 993d516932dcc0cccc12da7913c5653717efda2a603952cc1524dd339c9a5874 |
""" Module that holds DISET Authorization class for services
"""
from DIRAC.ConfigurationSystem.Client.Config import gConfig
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getGroupsForVO
from DIRAC.FrameworkSystem.Client.Logger import gLogger
from DIRAC.Core.Security import CS
from DIRAC.Core.Security i... | petricm/DIRAC | Core/DISET/AuthManager.py | Python | gpl-3.0 | 10,750 | [
"DIRAC"
] | b48a3d39a1ce45ceb5d2ca06aa1d9c503c59b0d52213c1216837dc6b6ca4fc74 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# module builder script
#
import os, sys, shutil, tempfile, subprocess, platform
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
support_dir = os.path.join(template_dir, 'support')
sdk_dir = os.path.dirname(template_dir)
android_suppo... | arnaudsj/titanium_mobile | support/module/builder.py | Python | apache-2.0 | 7,110 | [
"VisIt"
] | 845f9ed05a04c8d0f6fc8f9cb4fe9a64fed4ab315a8adeadb289fb4e97a08f27 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from math import pi, log
import numpy as np
from scipy.special import gamma
from scipy.interpolate import splrep, splev
from gpaw.atom.configurations import configurations
from gpaw.atom.aeatom import AllElectronAtom, Channel
from gpaw.setup import BaseSetup
fr... | qsnake/gpaw | gpaw/atom/generator2.py | Python | gpl-3.0 | 9,240 | [
"ASE",
"GPAW"
] | 6a5299a66cc543c9ea00a7fe458b21804034a22aad9c2ea11e1bae32bd9bec7d |
###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2008, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License versi... | zenoss/ZenPacks.community.NetWare | setup.py | Python | gpl-2.0 | 3,275 | [
"VisIt"
] | 6eeaee2ba18d842a54e4735888de4c8647ca74c2cfec47fe5b095dea2bb4f5e9 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | wscullin/spack | var/spack/repos/builtin/packages/magics/package.py | Python | lgpl-2.1 | 5,607 | [
"NetCDF"
] | 95b423a9a55d92f7f862c7cbd1a6d21116864c48f66e577e905972dae5028f03 |
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved.
# Revisions copyright 2009 by Peter Cock.
# 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.
#
# Contact: Leighton Pritchard, Scot... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/Graphics/GenomeDiagram/__init__.py | Python | gpl-2.0 | 887 | [
"Biopython"
] | 462b7b2e4dc35ebac2f0fa043e1fc60570bdcfadbd2fd87fac2ba3461658456e |
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflow/tensorflow | tensorflow/compiler/mlir/tfr/python/tfr_gen.py | Python | apache-2.0 | 57,147 | [
"VisIt"
] | 1612afac19d33ecb665b169f658fe67819315c1be44f2ebd4dda2ee997dda029 |
import elasticsearch as es
import elasticsearch_dsl as es_dsl
import json
import os
import argparse
parser = argparse.ArgumentParser(description='Gets Kibana objects ' +
'and generates templates.')
parser.add_argument('user', action='store', type=str,
help='User ID.... | yannakopoulos/elk-admin | scripts/get_templates.py | Python | mit | 3,584 | [
"Elk"
] | e94e04140967d3d4c57ad58ea9ccb9335135b1f2a064737781d4ed414dc33336 |
# -*- coding: utf-8 -*-
#
# Copyright 2012 - 2013 Brian R. D'Urso
#
# This file is part of Python Instrument Control System, also known as Pythics.
#
# Pythics 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 Foundati... | LunarLanding/Pythics | pythics/examples/metropolis.py | Python | gpl-3.0 | 5,540 | [
"Brian"
] | ffb40720a91c758bf340bdec1ad73256f38d85aedd5c7221ba4ef8dc1d6a75cb |
"""Unit tests of MQConsumer interface in the DIRAC.Resources.MessageQueue.MQConsumer
"""
import unittest
from DIRAC import S_OK, S_ERROR
from DIRAC.Resources.MessageQueue.MQConsumer import MQConsumer
from DIRAC.Resources.MessageQueue.MQConnectionManager import MQConnectionManager
from DIRAC.Resources.MessageQueue.MQCo... | andresailer/DIRAC | Resources/MessageQueue/test/Test_MQConsumer.py | Python | gpl-3.0 | 3,819 | [
"DIRAC"
] | 4c72e61b1f0784221cc4f62ab3574b354890a48926a617a0205218cf22426a4a |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | karllessard/tensorflow | tensorflow/python/autograph/converters/directives.py | Python | apache-2.0 | 6,862 | [
"VisIt"
] | fd2d919bad8f78f6a90493b04c76b5fa5f8dd813a070c0aa70d97ff43d2556a3 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to configure .deb packages.
(c) 2014, Brian Coca <briancoca+ansible@gmail.com>
This file is part of Ansible
Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Softwa... | Sodki/ansible-modules-extras | system/debconf.py | Python | gpl-3.0 | 5,305 | [
"Brian"
] | 415de5c031443637357e17a661cb67f0b5c02715ee42a3860260208f5458daff |
# -*- coding: utf-8 -*-
breed_rule_list = {
('Plentiful', 'Plentiful'): (0.5, 0.5),
('Plentiful', 'Common'): (0.7, 0.3),
('Plentiful', 'Uncommon'): (0.85, 0.15),
('Plentiful', 'Limited'): (0.95, 0.05),
('Plentiful', 'Rare'): (0.99, 0.01),
('Common', 'Common'): (0.5, 0.5),
('Common', 'Uncommo... | JiYouMCC/FlightRisingTool | py/fr/__init__.py | Python | mit | 6,897 | [
"CRYSTAL"
] | be435cdf68a94cf1b6052d8741a60a55c52b02ce23a7269382bff10886327c8d |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements methods for writing LAMMPS input files.
"""
import os
import re
import shutil
import warnings
from string import Template
from monty.json import MSONable
from pymatgen.io.lammps.d... | davidwaroquiers/pymatgen | pymatgen/io/lammps/inputs.py | Python | mit | 7,404 | [
"LAMMPS",
"pymatgen"
] | cb8a892300a42e7a2cdae31f3857ec9f04ce905f820017baf02f6969de1c7378 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Eric Nichols, <eric@ecei.tohoku.ac.jp>
################################################################################
'''
`espresso.py`: an implemenatation of the Espresso bootstrapping algorithm
### Usage
Usage: espresso.py [options] [database] [collecti... | underspecified/web-ka | tools/espresso.py | Python | gpl-2.0 | 5,094 | [
"ESPResSo"
] | f697fccd867f5b24c8abaadeaaa75db03c63e5721aeb850bdbe503a2d33b84ea |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from common import db_connection
import sys
import os
limit = 50
if len(sys.argv) != 2:
print >> sys.stderr, "Usage: %s <SKELETON-ID>" % (sys.argv[0],)
sys.exit(1)
orphaned_skeleton_id = int(sys.argv[1])
c = db_connection.cursor()
# Get the project ID first o... | catmaid/CATMAID | scripts/old/put-back-neuron.py | Python | gpl-3.0 | 1,894 | [
"NEURON"
] | 75c2fbe89a999ad6ac05fac9a0d5388d0bbd9155792f0a2cbb34fa4beab012f5 |
r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix', 'nt', 'os2' or 'ce'.
- os.curdir is a string representing the current directory ('.' or... | coursemdetw/2014c2 | wsgi/static/reeborg/src/libraries/brython/Lib/os.py | Python | gpl-2.0 | 35,185 | [
"VisIt"
] | 96793e222788e26b6e8148c5ebae59323582af97f15bb25b078a3919b11a4e39 |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | moto-timo/robotframework | src/robot/reporting/resultwriter.py | Python | apache-2.0 | 5,932 | [
"VisIt"
] | 2fcc40474a28d0cb9c88a6ea9753ff35c697467f2b27289dfcf52674333f8a5f |
import os
import time
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit as u
import mdtraj.reporters
import sys
code = "3DMV"
ff_name = "amber99sbnmr"
water_name = 'tip3p'
which_forcefield = "%s.xml" % ff_name
which_water = '%s.xml' % water_name
platform_name = "CUDA"
timestep = 2.0 * u.... | kyleabeauchamp/fah-projects | old/equilibrate_boxes3.py | Python | gpl-2.0 | 1,723 | [
"MDTraj",
"OpenMM"
] | 9fae905323b403b949a36b3e3983e3a05cd727561e2d03315d2e27e6621589c9 |
"""
Implements Monte Carlo inference for Gaussian HMMs:
Y[t]|(Z, mu, sig2) ~ Normal(mu[Z[t]·], sig2[Z[t]·])
Z[t]|(Z, Rho) ~ Categorical(Rho[Z[t-1]·])
Z[0]|pi ~ Categorical(pi)
where Z is latent.
Data
----
Y : np.ndarray in R^(nobs, nvar)
Latent
------
Z : np.ndarray in (0:nstate-1)^nobs
Parameters
--... | timsf/bayeslib | backends/blocked_gibbs/normal_hmm.py | Python | gpl-3.0 | 5,585 | [
"Gaussian"
] | 1600fdcf30ac0b29a8206943b374f38e43c1bc949b23371bf86003c88ffcf015 |
r"""
Nearly incompressible linear elasticity in mixed displacement-pressure
formulation with comments.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \nabla \cdot \ul{v}
= 0
\;, \quad \forall \ul{v} \;,
- \int_{\Omega} ... | BubuLK/sfepy | examples/linear_elasticity/linear_elastic_up.py | Python | bsd-3-clause | 3,489 | [
"VTK"
] | 591325f158a34082d167d20292ddd2d0555b3e4c551019e64a81868d9e4f3f02 |
import sys
import hashlib
import pytest
import numpy as np
from numpy.linalg import LinAlgError
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_allclose,
assert_warns, assert_no_warnings, assert_array_equal,
assert_array_almost_equal, suppress_warnings)
from numpy.random import G... | pbrod/numpy | numpy/random/tests/test_generator_mt19937.py | Python | bsd-3-clause | 109,478 | [
"Gaussian"
] | 35e019c6dbb5b6c162d51016788cedf9c913e09259d8ab706f4ce6bb010a9bdd |
""" Implementation of a function to read NetCDF files from EMODNET """
import xarray as xr
from ..waterframe import WaterFrame
def read_nc_emodnet(path, clean_data=True):
"""
Open a NetCDF file from EMODNET physics. The file should be from a fixed point observatory due
to this function delete the ... | rbardaji/oceanobs | mooda/input/read_nc_emodnet.py | Python | mit | 2,794 | [
"NetCDF"
] | bbbc2d24ae3b6a0fbbfc144005eb3350cb036c3fdfe8b8aaadb60b497ba319e3 |
import os
from plugins import BaseAligner
from yapsy.IPlugin import IPlugin
from asmtypes import ArastDataInputError
class BwaAligner(BaseAligner, IPlugin):
def run(self, contig_file=None, reads=None, merged_pair=False):
### Data Checks
if len(self.data.contigfiles) != 1:
raise ArastDa... | levinas/assembly | lib/assembly/plugins/bwa.py | Python | mit | 2,226 | [
"BWA"
] | f58f7a1c15a88f6955b4b6d46eab26eeae9e11fb8279207c6abfef3d8e3804f3 |
from __future__ import print_function
from bokeh.objects import ColumnDataSource
from bokeh.widgetobjects import TableColumn, HandsonTable, PivotTable, HBox
from bokeh.document import Document
from bokeh.session import Session
from bokeh.sampledata.autompg import autompg
document = Document()
session = Session()
sess... | the13fools/Bokeh_Examples | glyphs/data_tables_server.py | Python | bsd-3-clause | 1,015 | [
"VisIt"
] | 72c92c79ce3f070e746840c45c4d0da9690b3b67ad3adfaa2bdb644db78745a7 |
"""Contains the hardware interface and drivers for the FAST Pinball platform
hardware, including the FAST Core and WPC controllers as well as FAST I/O
boards.
"""
# fast.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
... | spierepf/mpf | mpf/platform/fast.py | Python | mit | 51,303 | [
"Brian"
] | d7bec3fd20d780b4921fdb97034576e6ae5fb57104d639a3f1285fb709e63a40 |
client_id = '490841412405-bc6e4rs8rerefd8npq0ci6g9iar6bdm7.apps.googleusercontent.com'
client_secret = 'EWBV9wXLE4wwJvVf3lgpG9iJ'
user_agent = 'MediaPanel/1.0'
import os.path
here = os.path.dirname(os.path.realpath(__file__))
storage_file = os.path.join(here, 'calendar.dat')
import gflags
import httplib2
from apicli... | Ultimatum22/MediaPanel | agenda/google_calendar.py | Python | apache-2.0 | 1,854 | [
"VisIt"
] | 4aaad9abdc30eb63d78a7742d7170ae0d1ec8ee617da969891b6266a263e2afd |
import numpy as np
import mayavi.mlab as my
from traits.api import HasTraits, Range, Instance, \
on_trait_change
from traitsui.api import View, Item, Group, HSplit, VSplit
from mayavi.core.api import PipelineBase
from mayavi.core.ui.api import MayaviScene, SceneEditor, \
MlabSceneModel
# L... | isohatalaj/markexp | python/mxOmega.py | Python | gpl-2.0 | 8,260 | [
"Mayavi"
] | a39501982994ebb1f053bbe41fb19bc5a6f573f8853239e227522ee70d37ddd9 |
# vim: fileencoding=utf-8 et ts=4 sts=4 sw=4 tw=0
"""
An RPC client class using ZeroMQ as a transport and
the standard Python threading API for concurrency.
Authors
-------
* Alexander Glyzov
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2012-2014. Brian Granger,... | srault95/netcall | netcall/threading/client.py | Python | bsd-3-clause | 9,858 | [
"Brian"
] | 060f3421349a1051cea2ce0b710c95cb82ab287e6b019a93387fbe0b9ef9df48 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import inspect
import sys
import warnings
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import attr
import py
import six
from more_itert... | pfctdayelise/pytest | src/_pytest/fixtures.py | Python | mit | 53,589 | [
"VisIt"
] | 0b44f1f2c54af685759bfd93a5bba3e87cce421eb6932f0a61817bde94f12799 |
####################################################################################################
# Copyright 2013 John Crawford
#
# This file is part of PatchCorral.
#
# PatchCorral is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | defcello/Children-of-Eden-Synth-Server | src/data/webpages/rolandfantomxr/PRE.py | Python | gpl-3.0 | 8,073 | [
"CRYSTAL"
] | 330f00b4fe1007710dbcb70746d063474594f7f4e1656473211f72b855757c57 |
""" Python test discovery, setup and run of test functions. """
import fnmatch
import functools
import py
import inspect
import sys
import pytest
from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr
import _pytest
import pluggy
cutdir2 = py.path.local(_pytest.__file__).dirpath()
... | ericdill/pytest | _pytest/python.py | Python | mit | 82,584 | [
"VisIt"
] | 9c6ad7a5adaefc4d3f341d943535ed7ebdc267dd4b025eab7d233abb162bd0bb |
""" Methods related to galaxy photometry """
import os
import warnings
import numpy as np
from pkg_resources import resource_filename
from IPython import embed
from astropy.io import fits
from astropy.table import Table, hstack, vstack, join
from astropy.coordinates import SkyCoord
from astropy.coordinates import m... | FRBs/FRB | frb/galaxies/photom.py | Python | bsd-3-clause | 15,115 | [
"Galaxy"
] | 9c1a2c7741219d01c82af9c790549a38c7c0d74e5621b4f634bbb2434e368f50 |
#!/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/getlocations.py | Python | gpl-2.0 | 5,176 | [
"VisIt"
] | 4d8f5c27685d9ca49fb8b111d0907af8adac5bfdcb317203a44ed78184e1d4d7 |
###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2007, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License ver... | rfriedlein/zenoss | ZenPacks/ZenPacks.Coredial.StatusReport/ZenPacks/Coredial/StatusReport/reports/plugins/StatusReport.py | Python | gpl-3.0 | 1,599 | [
"VisIt"
] | 17a80a45f1ca0c7990148df0cf270802f87370023f5c7498335bd3b6640aef81 |
# Copyright (C) 2021
# Sebastian Eibl, Max Planck Computing & Data Facility
#
# 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... | espressopp/espressopp | src/io/DumpH5MDParallel.py | Python | gpl-3.0 | 1,874 | [
"ESPResSo"
] | b746b90656d394002a017767ac634d2170d14a8dc17ec3ed03099ce6a74d3749 |
import os
from pyscf.pbc.gto import Cell
from pyscf.pbc.scf import KRHF, KRKS
from pyscf.pbc.tdscf import krhf_slow_supercell as std, krhf_slow as ktd, kproxy_supercell as stdp, kproxy as ktdp
from pyscf.pbc.gw import kgw_slow_supercell as sgw, kgw_slow as kgw
from pyscf.pbc.tdscf.krhf_slow import get_block_k_ix
from ... | gkc1000/pyscf | pyscf/pbc/gw/test/test_kgw_slow.py | Python | apache-2.0 | 11,211 | [
"PySCF"
] | f5f74e8bd99c549e843728f016c31e47230f9a8aa47bc4caa8251007b1de5296 |
#!/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/stochastic_tools/examples/batch/execute.py | Python | lgpl-2.1 | 2,641 | [
"MOOSE"
] | 7f479dc9698122dc37119e3d66b3cd9bc42cf5950353b82a52a0b6200683c610 |
#!/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... | pli3/e2-openwbif | plugin/controllers/views/web/about.py | Python | gpl-2.0 | 13,760 | [
"VisIt"
] | e26add7267807bae9cf16c4bef77c69daf1d844e287bc4ca711012fedd98305a |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | benthomasson/ansible | lib/ansible/modules/network/avi/avi_authprofile.py | Python | gpl-3.0 | 4,638 | [
"VisIt"
] | 0fb02a61c1a774e912ca34038f107df22860b591415152d5523bac1459ea5f7c |
#!/usr/bin/env/python
##============================================================
##============================================================
import numpy
import scipy
import os
import sys; sys.path.append("../misc/")
import pyfits
import Image
import time
import getopt
from scipy.signal import fftconvolve as c... | drphilmarshall/HumVI | attic/decon/DeconvolveToTargetPSF.py | Python | mit | 18,517 | [
"Gaussian"
] | 32bcc4b0e279ea791c4dc7b8e5bfd06d36320cd50deb0c94feef26f2ff86533e |
#!/usr/bin/env python
##
## @file validateSBML.py
## @brief Validates one or more SBML files
## @author Akiya Jouraku (translated from libSBML C++ examples)
## @author Ben Bornstein
## @author Michael Hucka
##
## $Id: validateSBML.py 13595 2011-04-11 01:34:30Z mhucka $
## $HeadURL: https://sbml.svn.sourceforge... | alexholehouse/SBMLIntegrator | libsbml-5.0.0/examples/python/validateSBML.py | Python | gpl-3.0 | 4,791 | [
"VisIt"
] | 00d3de44c2b2ffbc7378df0322f7e020d6fe6c8bc154a30947a8cd850f763535 |
# Copyright 2021 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, ... | google-research/vmoe | vmoe/train/trainer.py | Python | apache-2.0 | 23,798 | [
"MOE"
] | 6c6b44e9a5bb28eaf7175724c188aa3091182392cda5770c8893e7ce98bbc783 |
#!/usr/bin/env python
#Dan Blankenberg
import sys
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
import bx.align.maf
assert sys.version_info[:2] >= ( 2, 4 )
def __main__():
output_name = sys.argv.pop(1)
input_name = sys.argv.pop(1)
species = sys.argv.pop(1... | dbcls/dbcls-galaxy | lib/galaxy/datatypes/converters/maf_to_interval_converter.py | Python | mit | 1,057 | [
"Galaxy"
] | b3ab4a46dfb933264d201146798e3ea60ada20f1ae2c2ed6974beab036398564 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-dialogflow | tests/unit/gapic/dialogflow_v2beta1/test_versions.py | Python | apache-2.0 | 92,872 | [
"Octopus"
] | e90be059726451daa63776b25494295ab8802b62bcc1f261caafd45b61bed654 |
#!/usr/bin/env python
__author__ = 'Mike McCann'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'mccann at mbari.org'
__doc__ = '''
Master loader for all October 2013 SIMZ activities.
Mike McCann
MBARI 24 October 2013
@var __date__: Date of last svn commit
@undocumented: __doc__ parser
@status... | stoqs/stoqs | stoqs/loaders/MolecularEcology/loadSIMZ_oct2014.py | Python | gpl-3.0 | 5,683 | [
"NetCDF"
] | d6db42e29063e21135ffd059ec9bf069115925420e5cb4dff892bbd507bb9110 |
# A quick and simple opengl font library that uses GNU freetype2, written
# and distributed as part of a tutorial for nehe.gamedev.net.
# Sven Olsen, 2003
# Translated to PyOpenGL by Brian Leair, 2004
#
#
# import freetype
# We are going to use Python Image Library's font handling
# From PIL 1.1.4:
import ImageFont... | mgood7123/UPM | Sources/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/NeHe/lesson43/glFreeType.py | Python | gpl-3.0 | 10,916 | [
"Brian"
] | b434853d6c996bf7446758f41dbf1e964e00e390ea2ffd818fc795b62e49547b |
"""
Get geometrical structural properties
of atom systems, such as:
* coordination numbers
* Cowley's short-range order parameter
[Phys. Rev. 1965, 138, A1384-A1389].
* QSAR volume, etc
"""
from __future__ import print_function
import os, sys
import numpy as np
from math import sqrt
from ase import Atom, At... | lavakyan/ase-bimetall | qsar.py | Python | gpl-2.0 | 19,797 | [
"ASE"
] | 054ac699aebbb54ef95fc81f11fd68c675cdaec9b6ed0db0c90c8cc62242a2bd |
def descriptor(rcut=4, desc_type='se_ar', mneiba=150):
smth_frac = 0.85
if desc_type == 'se_ar':
rmult = 1.5
mneibr = 500
ar_smth = rcut*smth_frac
desc = {
'type': 'se_ar',
'a': {
'sel': [mneiba],
'rcut_smth': ar_smth,
'rcut': rcut,
'neuron': [10, 20, 40],... | Paul-St-Young/solid_hydrogen | qharv_db/dpmd_train.py | Python | mit | 2,815 | [
"NEURON"
] | c04570fc03a79256254ca6d9d59389d98a3e7c7dd8bc15cb7eb44adf1937d62c |
from typing import Callable, List
from minedatabase.filters.base_filter import Filter
from minedatabase.pickaxe import Pickaxe
"""Definitions of filters for pickaxe.
Use this module to define your own filter classes. All filter classes must
subclass Filter. See Filter docstring for more information.
To use any fil... | JamesJeffryes/MINE-Database | minedatabase/filters/similarity.py | Python | mit | 35,739 | [
"RDKit"
] | b10401a24a73200eef098314a5e9c0a63157141d2fb3518fc13c96743f26a6c5 |
""" X509Request is a class for managing X509 requests with their Pkeys.
It's main use is for proxy delegation.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import M2Crypto
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities i... | yujikato/DIRAC | src/DIRAC/Core/Security/m2crypto/X509Request.py | Python | gpl-3.0 | 5,740 | [
"DIRAC"
] | 00f14b5a482c291f916e650d33c77533d8cf0f4f2513b070e422d98735a1737b |
# -*- coding: utf-8 -*-
#
# Copyright © 2007-2008 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be useful, bu... | tyll/fas | fas/safasprovider.py | Python | gpl-2.0 | 18,765 | [
"VisIt"
] | 36834a4096bb081540c8bfb8787be8e3042e2933182dbd6a5b31dd12cb01ec7b |
from __main__ import vtk, qt, ctk, slicer
# import unittest
import os, sys
# Picasa API
import gdata.photos.service
import CIP.logic
#from CIP.ui import AutoUpdateWidget
class PicasaSnap:
"""Module template for ACIL Slicer Modules"""
def __init__(self, parent):
"""Constructor for main class"""
self.pare... | acil-bwh/SlicerCIP | Scripted/attic/PicasaSnap/PicasaSnap.py | Python | bsd-3-clause | 33,572 | [
"VTK"
] | 737bafdac5e6aa3539be436a15e343c7240bc754c8c2edb845300f7ee069f0b1 |
# Copyright (c) 2006-2010 Regents of the University of Minnesota.
# For licensing terms, see the file LICENSE.
# The route_stop class represents points on the map that a route must pass
# through. They can be addressable locations where a user intends to stop,
# intermediate control points to change the route, or tran... | lbouma/Cyclopath | pyserver/item/feat/route_stop.py | Python | apache-2.0 | 8,504 | [
"VisIt"
] | c181277373fd54a9381783e1617ff55964fc6af846d64180ef06685117ec9a57 |
#!/usr/bin/env python
#Guruprasad Ananda
"""
Calculate count and coverage of one query on another, and append the Coverage and counts to
the last four columns as bases covered, percent coverage, number of completely present features, number of partially present/overlapping features.
usage: %prog bed_file_1 bed_file_2 ... | volpino/Yeps-EURAC | tools/regVariation/featureCounter.py | Python | mit | 5,362 | [
"Galaxy"
] | 525d73cdc1fde4fdc05cd6b37539ef25fa508290d6e7f7c4f8bdfc183435790f |
import os
import logging
import numpy
import constants
import pygeoutil.util as util
class IAM:
def __init__(self, iam, path_nc, lon_name = 'lon', lat_name = 'lat', tme_name = 'time'):
"""
Constructor
"""
self.iam = iam
self.lon_name = lon_name
self.lat_name = l... | ritviksahajpal/LUH2 | LUH2/GLM/preprocess_IAM.py | Python | mit | 2,366 | [
"NetCDF"
] | 90cfb62a00031a93c8945208ab118bd9abd608f07dbf5a1e0c46a4d701d49be4 |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Scaled_Features/results/2_categories/test10_cross_validate_categories_mov_fixed_1200ms_scaled_method_iv.py | Python | mit | 4,633 | [
"Mayavi"
] | e445c5be32719e0988ea5861e95647fa82b1d0c79dcf4186d134eed2897a58ce |
#!/usr/bin/env python
#
# Wrapper script for starting the biopet-scatterregions 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-shak... | zachcp/bioconda-recipes | recipes/biopet-scatterregions/biopet-scatterregions.py | Python | mit | 3,379 | [
"Bioconda"
] | 44e355ebce11e847212086c4489b77367c5dc65bb7e87a80bb394623211541dc |
from pylab import *
from vtk_pylab import *
def func3(x,y):
return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
dx, dy = 0.025, 0.025
x = arange(-3.0, 3.0, dx)
y = arange(-3.0, 3.0, dy)
X, Y = meshgrid(x,y)
Z = func3(X,Y)
font = {'fontname' : 'Times',
'color' : 'r',
'fontweight' : 'normal',
... | cliburn/flow | src/experimental/vtktest1.py | Python | gpl-3.0 | 1,204 | [
"VTK"
] | 2f3c5dca480b1bf1dfe6e19140f0c84364f826c71ffc968f66c2c4e8ba9405b4 |
# -*- coding: utf-8 -*-
#
# clopath_synapse_spike_pairing.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 ... | terhorstd/nest-simulator | pynest/examples/clopath_synapse_spike_pairing.py | Python | gpl-2.0 | 5,449 | [
"NEURON"
] | 0e87d0cb231f3f785590d70ca16d2ccfeb077e2a4ac7f15521c7a8a1a9f392f6 |
"""
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
from sphinx import addnodes
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.directives.code import CodeBlo... | wkschwartz/django | docs/_ext/djangodocs.py | Python | bsd-3-clause | 13,834 | [
"VisIt"
] | b7f5bdb9d3cfd6332871d33a7eda5f0eb3acad1d6af032b479fc831445d1e5df |
"""
============================================================
Empirical evaluation of the impact of k-means initialization
============================================================
Evaluate the ability of k-means initializations strategies to make
the algorithm convergence robust as measured by the relative stan... | clemkoa/scikit-learn | examples/cluster/plot_kmeans_stability_low_dim_dense.py | Python | bsd-3-clause | 4,312 | [
"Gaussian"
] | 7785f7e454d2c6a0256d0be39f7a7c1febbda10ec68b0956ea37230c556632b9 |
import json
import numpy as np
try:
import scipy
except:
IMPORT_SCIPY = False
else:
IMPORT_SCIPY = True
from netCDF4 import Dataset
import pythesint as pti
from nansat.nsr import NSR
from nansat.vrt import VRT
from nansat.utils import initial_bearing, gdal
from nansat.exceptions import WrongMapperError, ... | nansencenter/nansat | nansat/mappers/sentinel1.py | Python | gpl-3.0 | 7,816 | [
"NetCDF"
] | 36bb04f57935119fdaa115b911b3c33b95a534aec8a97227773b201f69da202f |
from django.utils.encoding import smart_unicode, force_unicode
from django.utils.datastructures import SortedDict
from django.utils.text import get_text_list, capfirst
from django.utils.translation import ugettext_lazy as _, ugettext
from django.forms.util import ValidationError, ErrorList
from django.forms.forms impor... | Squishymedia/feedingdb | src/feeddb/feed/extension/forms.py | Python | gpl-3.0 | 9,815 | [
"VisIt"
] | 05616340acc401d65a9b09057201bb3593f38d41b8b49e379503ba41fc106781 |
import establishment_sql_manager
import store_sql_manager
def main():
establishment_sql_manager.create_table()
store_sql_manager.create_table()
store_sql_manager.create_staff_table()
stores = [("your_shoes", "snikers", "purple", 48, 52.3, 4),
("your_shoes", "high heels", "12cm", 65, 70,... | MariaKrusteva/MALL | create_mall_database.py | Python | gpl-3.0 | 1,640 | [
"ESPResSo"
] | 6a6cfdf9bfd0524604b9fa96ed2cacb4762b7b9fc3df45f842f0a14146167567 |
#!/usr/bin/env python
#
# Data manager for reference data for the 'mothur_toolsuite' Galaxy tools
import sys
import os
import optparse
import tempfile
import shutil
import urllib2
import zipfile
import tarfile
from galaxy.util.json import from_json_string, to_json_string
# When extracting files from archives, skip na... | nturaga/tools-iuc | data_managers/data_manager_mothur_toolsuite/data_manager/fetch_mothur_reference_data.py | Python | mit | 18,165 | [
"Galaxy"
] | 21b4ba5f3ec523ee7f225895a54451858de0df693833056bb5d07adde4520753 |
# -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsRasterFileWriter.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"... | mj10777/QGIS | tests/src/python/test_qgsrasterfilewriter.py | Python | gpl-2.0 | 9,268 | [
"NetCDF"
] | 9b12ecfe69f8ae9aee55769d59f13e876a4737bd9143952bc8b8e9f1d330cd79 |
########################################################################
# $HeadURL$
# File : CSCLI.py
# Author : Adria Casajus
########################################################################
__RCSID__ = "$Id$"
import cmd
import sys
import signal
import types
from DIRAC.Core.Utilities.ColorCLI import colori... | Sbalbp/DIRAC | ConfigurationSystem/Client/CSCLI.py | Python | gpl-3.0 | 17,875 | [
"DIRAC"
] | e9390b6af7f42bedf8057e0d2a437bb4ffe7755a1f62ca8d66c316f9f49284c8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/tabs/campaign.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# not... | zigitax/king-phisher | king_phisher/client/tabs/campaign.py | Python | bsd-3-clause | 20,449 | [
"VisIt"
] | 019ea6a1c6cef306e627429b26d2c70f80a77eeb5d9612c3b7ec04094cc346ca |
#!/usr/local/bin/env python
"""
Test various utility functions.
"""
# =============================================================================================
# GLOBAL IMPORTS
# =============================================================================================
import abc
import textwrap
import open... | choderalab/yank | Yank/tests/test_utils.py | Python | mit | 15,235 | [
"OpenMM"
] | d5c9f4d3558d3a35fe24fef960f096ac3cecaa454924c4fc418dcaf9d4c36c19 |
import openbabel as ob
import pybel as pb
import numpy as np
import glob, os
import multiprocessing as mp
from multiprocessing import Pool
def bmin_call(file_list):
for filename in file_list:
infile = filename.replace(".com","")
os.system("bmin -WAIT {};".format(infile))
return 0
def cons_o... | ericchansen/q2mm | smiles_to_catvs/scripts/sdf_to_mae.py | Python | mit | 9,521 | [
"Pybel"
] | f71ddd36f7fe6224172b7b8da3998af76234862d6e2f15675cfa43a3835064c4 |
#!/usr/bin/env python
# Copyright 2014-2020 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/cc/uccsd_t_slow.py | Python | apache-2.0 | 9,259 | [
"PySCF"
] | ff78e6c3a0efa35cd807f60aefe62cd1e324107719f1a1f3cf7517ae8f41dcbe |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008,2010 Gary Burton
# Copyright (C) 2008 Craig J. Anderson
# Copyright (C) 2009 Nick Hall
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Adam Stein <adam@csh.rit.edu>
# Cop... | Fedik/gramps | gramps/gui/plug/_guioptions.py | Python | gpl-2.0 | 76,239 | [
"Brian"
] | aec0430c5dfb16d639a04b3d59c352833fbed2bb4fe60137036785a47b83b27b |
from repESP.calc_fields import esp_from_charges, voronoi, calc_rms_error, calc_relative_rms_error
from repESP.charges import *
from repESP.esp_util import parse_gaussian_esp
from repESP.fields import *
from repESP.types import *
from repESP.gaussian_format import get_charges_from_log, MkChargeSectionParser
from my_uni... | jszopi/repESP | tests/test_calc_field.py | Python | gpl-3.0 | 5,401 | [
"Gaussian"
] | 11e199265eacec89039b6e0b76a2bb84c05a1e51a08ad32af52021f19f97dc84 |
import sys
import getopt
import random
import time
import numpy
# import math **** UNUSED
import arcpy
import csv
from arcpy import env
import os
# import my_tools as tools **** UNUSED
# Efficiency: 0' 10'' importing packages
# 6' 17'' retrieving day data for January 2010 (500,000 rows read, 1,326 r... | blt2589/Chicago | Tutt_Chicago_3_network_BAD.py | Python | mit | 15,750 | [
"Gaussian"
] | 90411edc937cad8ee9f8ae534c8922b9708c032edd13f77c5fdb1759858874e3 |
#!/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... | pli3/Openwebif | plugin/controllers/views/ajax/workinprogress.py | Python | gpl-2.0 | 4,598 | [
"VisIt"
] | 681e84c8d935df0ad68a42b5bfb2f9fb2a68121501bf344198480b06695b1480 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | barachka/odoo | addons/project/project.py | Python | agpl-3.0 | 68,654 | [
"VisIt"
] | 570e81504f587c6357b2cc4e5ac70491dbc67d85a55c5875678c1d92fe104ae8 |
"""
Courseware views functions
"""
import logging
import urllib
import json
from datetime import datetime
from django.utils.translation import ugettext as _
from django.conf import settings
from django.core.context_processors import csrf
from django.core.exceptions import PermissionDenied
from django.core.urlresolve... | IONISx/edx-platform | lms/djangoapps/courseware/views.py | Python | agpl-3.0 | 57,007 | [
"VisIt"
] | d51a876b2378afce8a945e6e7d4b0701b9032a551a20202f2a0ea2467c851ff9 |
import matplotlib.pyplot as plt
import numpy as np
plt.xkcd()
# This is adapted from Andrej Karpathy's blog:
# http://karpathy.github.io/neuralnets/
# written in Python instead of JS (Obviously)
# Define out unknown function we want to maximize
def unknown_function(a, b):
return a*b
# Define our in... | medav/yatml | l1-fundamentals/p3-numeric-gradient.py | Python | mit | 1,325 | [
"VisIt"
] | 8d2fab9f2450bcdd0804e1977c5aac893031e33e2fabd410bbf5ed05ef6f0ede |
# Copyright (C) 2016-2020 East Asian Observatory
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version... | eaobservatory/hedwig | test/test_type_misc.py | Python | gpl-3.0 | 10,812 | [
"MOOSE"
] | a3aa74a540b1bef517ff52548cd0b92f5ba755bc8712df6252d7c46ec1e5682a |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2019 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | jgonthier/psi4 | psi4/driver/procrouting/scf_proc/scf_iterator.py | Python | lgpl-3.0 | 35,581 | [
"Psi4"
] | 5529ab4d06c09ee35d21993e25f7185336b99824a1c14b9218a770d6d4752065 |
# Orca
#
# Copyright 2004-2009 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... | pvagner/orca | src/orca/script.py | Python | lgpl-2.1 | 23,935 | [
"ORCA"
] | 419f576c934791213f0c6170b0cb10db085a35207052dafb2092a44ea440bf64 |
import numpy as np
import matplotlib.pyplot as plt
from time import sleep
import ms5637
__author__ = 'Moe'
__copyright__ = 'Copyright 2017 Moe'
__license__ = 'MIT'
__version__ = '0.0.2'
# Bari sensor of MS5637
sensor = ms5637.Chip()
plt.axis([0.0, 600.0, 100000, 102000])
# plt.axis([0.0, 600.0, 15.0, 45.0]) # Temp... | wadda/Bari | live_bari.py | Python | mit | 503 | [
"MOE"
] | 5a11c29ed07e25f981213a2e548f8ab97325dbcfb1737788f61729bf3bbe4cc4 |
"""
Lammps interface.
"""
from . import _version
__version__ = _version.get_versions()['version']
| peteboyd/lammps_interface | lammps_interface/__init__.py | Python | mit | 98 | [
"LAMMPS"
] | a6e4c71628e868903f5d2ce922591ce2616612b65cdf269dc08768092a3b823d |
"""treeSampler.py
2D square lattice Gaussian MRF using tree sampling.
"""
import numpy as np
from scipy import misc
from numpy.random import random_sample
import time
def main():
# Number of particles - N, number of iterations of PGAS - R
R = 1000
# Initialize arrays/matrices
nx = 10
ny = 10... | can-cs/smc-pgm | gmrf/treeSampler.py | Python | mit | 17,240 | [
"Gaussian"
] | 25de3c6c4425926e4f898915f42a44026bd972726a1b886736593b4ce5af3d3f |
#-*- coding: utf-8 -*-
#
# Copyright (c) 2015 blackPanther OS - Charles Barcza
# GPL
#
from smart.interfaces.qt5 import getPixmap, centerWindow
from smart.channel import getChannelInfo
from smart import *
from PyQt5 import QtGui as QtGui, QtWidgets
from PyQt5 import QtCore as QtCore, QtWidgets
class TextListViewItem... | blackPantherOS/packagemanagement | smartpm/smart/interfaces/qt5/priorities.py | Python | apache-2.0 | 15,088 | [
"CRYSTAL"
] | d0775284712f9fa354c78d9c08a370435c82901460730b362c9bb8176b3ac9e5 |
import sys
import readline
import page_finder
class ManualSpider(object):
def __init__(self):
self.link_annotation = page_finder.LinkAnnotation()
self.visited = set()
def visit(self, page, start=False):
self.link_annotation.load(page)
self.visited.add(page)
if not sta... | plafl/page_finder | demo.py | Python | mit | 2,742 | [
"VisIt"
] | 671dac4a1d73febd2159d337976bfafab6748589f62ef454a9adf37a355f7937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.