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 |
|---|---|---|---|---|---|---|---|
from abc import abstractmethod, ABC
import numpy as np
from scipy.stats import norm
from sklearn.base import BaseEstimator
from sklearn.externals.joblib import dump
from sklearn.utils import check_array
from sklearn.utils.validation import check_is_fitted
from ..plotting import plot_anomaly_score, plot_roc_curve
from... | Y-oHr-N/kenchi | kenchi/outlier_detection/base.py | Python | bsd-3-clause | 11,724 | [
"Gaussian"
] | 67354834a996b74cdcf7791c15743d5928d7b6c99096133ec2306c45a8ecaa39 |
""" Contains the MatrixLight parent classes. """
# light.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
# Documentation and more info at http://missionpinball.com/mpf
from mpf.system.device import Device
class Matri... | qcapen/mpf | mpf/devices/matrix_light.py | Python | mit | 6,658 | [
"Brian"
] | 0b6750b49079e5e1ceea5d782be515fdfeed4f2e3536c58992f5a695046fe71d |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source
##
## This program 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
## of the License, or... | andrebellafronte/stoq | stoqlib/l10n/generic/generic.py | Python | gpl-2.0 | 2,169 | [
"VisIt"
] | 9c0ed0dd82b41326127fc64b8093e1578fe921381a249db44cf982836a17a5e5 |
import tempfile
import numpy as np
import pygimli as pg
pv = pg.optImport('pyvista', requiredFor="properly visualize 3D data")
def pgMesh2pvMesh(mesh, data=None, label=None):
"""
pyGIMLi's mesh format is different from pyvista's needs,
some preparation is necessary.
Parameters
----------
me... | gimli-org/gimli | pygimli/viewer/pv/utils.py | Python | apache-2.0 | 1,816 | [
"VTK"
] | 2513b298893e149e96a574a5554772930f32d92e2d400878dbacde86bfbe2d63 |
# Author: Prabhu Ramachandran <prabhu[at]aero[dot]iitb[dot]ac[dot]in>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
from traits.etsconfig.api import ETSConfig
from pyface.api import GUI, ApplicationWindow
from traits.api import HasTraits, Button, Any
from traitsui.api import View, Group, Item
from pyface... | liulion/mayavi | mayavi/tools/show.py | Python | bsd-3-clause | 4,516 | [
"Mayavi"
] | 6731017d602b82954474210801d91d5be0dc918906e9885e3408026530998b53 |
# Orca
#
# Copyright 2010 Joanmarie Diggs, Mesar Hameed.
#
# 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.
#
# ... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/desktop_keyboardmap.py | Python | gpl-3.0 | 4,636 | [
"ORCA"
] | 14252beec83b2c319c5e9d58d9288411053c6d0e568a7f0976439d196a52dbf9 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/dftd3/__init__.py | Python | apache-2.0 | 752 | [
"PySCF"
] | 69471e0b2b31cacb9827cf5a600f6975228588eb4b377f15984cc2b9f2b0ae6a |
"""
Send an email to settings.FEED_APPROVERS with the feeds that need to
be manually approved.
"""
from django.conf import settings
from django.contrib.auth.models import User
from django.core import mail
from django.core.management.base import NoArgsCommand
from django.template import Context, Template
from ...models... | gnarf/djangoproject.com | aggregator/management/commands/send_pending_approval_email.py | Python | bsd-3-clause | 1,727 | [
"VisIt"
] | 4924377924dbbe557506c2388c1793ff763d2accc16b94243266726d639ffb6f |
#!/usr/bin/env python
########################################################################
# File : dirac-admin-list-users
# Author : Adrian Casajus
########################################################################
"""
Lists the users in the Configuration. If no group is specified return all users.
Exam... | DIRACGrid/DIRAC | src/DIRAC/Interfaces/scripts/dirac_admin_list_users.py | Python | gpl-3.0 | 2,189 | [
"DIRAC"
] | e2b96a7f02329aef5136ded0c15530c73c6b145181946c9b2ef532a8ea224836 |
# -*- coding: utf-8 -*-
from io import StringIO
import json
import platform
import re
from typing import Any, Dict
from unittest import skipIf
from django.db import connection, transaction
from django.shortcuts import get_object_or_404
from guardian.shortcuts import assign_perm
from catmaid.control.annotation import... | tomka/CATMAID | django/applications/catmaid/tests/apis/test_skeletons.py | Python | gpl-3.0 | 79,090 | [
"NEURON"
] | cd4d3d66711cf34f38a36bb6871739f1a5be75a50c329ab4ac81f147c94436c7 |
import unittest
from test import support
from itertools import *
from weakref import proxy
from decimal import Decimal
from fractions import Fraction
import sys
import operator
import random
import copy
import pickle
from functools import reduce
maxsize = support.MAX_Py_ssize_t
minsize = -maxsize-1
def lzip(*args):
... | firmlyjin/brython | www/tests/unittests/test/test_itertools.py | Python | bsd-3-clause | 83,198 | [
"GULP"
] | 14ac0a4330f4742e9d16d9a6eeae84a84a791d31d7405480767c029fea7a624c |
"""Subclass of IsClassMethods, which is generated by wxFormBuilder."""
from beatle import model
from beatle.lib import wxx
from beatle.activity.models.ui import ui as ui
from beatle.app.utils import cached_type
# Implementing IsClassMethods
class IsClassMethods(ui.IsClassMethods):
"""
This dialog allows to a... | melviso/phycpp | beatle/activity/models/ui/dlg/cc/IsClassMethods.py | Python | gpl-2.0 | 2,970 | [
"VisIt"
] | e03d97859a89c3f1fe449625945b0841590ee444368230e88b1b3842850cb2c7 |
##########################################################################
#
# This file is part of Lilith
# made by J. Bernon and B. Dumont
#
# Web page: http://lpsc.in2p3.fr/projects-th/lilith/
#
# In case of questions email bernon@lpsc.in2p3.fr dum33@ibs.re.kr
#
#
# Lilith is free software: you can redistribu... | jeremy-bernon/Lilith | lilith/internal/computelikelihood.py | Python | gpl-3.0 | 4,591 | [
"Gaussian"
] | a69e256a279325ed287f233de21ca0d5d0492ac3df489054b1a460d9c5ef1571 |
import datetime
from django.db import models
from django.dispatch import receiver
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from supersalon.reminders.models import CustomerServiceReminderRel, CustomerProductReminderRel
class ServicePurchase(models.Model):
# Visit
... | dogukantufekci/supersalon | supersalon/purchases/models.py | Python | bsd-3-clause | 4,922 | [
"VisIt"
] | b35ad754b3804b155e201759a2de336b5a4bd9256ce3b72ef34d1098c66aefc0 |
# $Id$
#
# Copyright (C) 2003 Rational Discovery LLC
# All Rights Reserved
#
""" Define the class _KNNRegressionModel_, used to represent a k-nearest neighbhors
regression model
Inherits from _KNNModel_
"""
from rdkit.ML.KNN import KNNModel
class KNNRegressionModel(KNNModel.KNNModel) :
""" This is used... | adalke/rdkit | rdkit/ML/KNN/KNNRegressionModel.py | Python | bsd-3-clause | 1,987 | [
"RDKit"
] | ae3b529e29d4f5f60b8eb8eb5257d4993bfd9a935ceff9a768bc72f61ebb967c |
"""Visualize using VTK or Mayavi for fancy 3D graphics and things
Use VTK/Mayavi to make fancy plots
Author
------
Shankar Kulumani GWU skulumani@gwu.edu
"""
import logging
import pdb
import vtk
from vtk.util import numpy_support
from mayavi import mlab
import numpy as np
from point_cloud import wavefront
def dr... | skulumani/asteroid_dumbbell | visualization/graphics.py | Python | gpl-3.0 | 16,498 | [
"Mayavi",
"VTK"
] | 6adf96b63c6ad2a6ef2256aaa9ece52133668d12714a1d7d3d193828c259aac4 |
"""
Module to set up run time parameters for Clawpack.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
import os
import numpy as np
from pdb import *
import tools
try:
CLAW = os.environ['CLAW']
except:
raise Exception("*** Must First s... | ForestClaw/forestclaw | applications/geoclaw/teton/make_data.py | Python | bsd-2-clause | 17,308 | [
"NetCDF"
] | 0c7b0fd04f9440a92c332b24ff6b82bf9dee09cf7f35c9e23d9882fd65f9e0cb |
"""A very silly example of using a scene editor. More complex examples are
available in mayavi. """
# Author: Prabhu Ramachandran <prabhu [at] aero.iitb.ac.in>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
from traits.api import HasTraits, Enum, Instance, Any
from traitsui.api import View, Item
from t... | dmsurti/mayavi | examples/tvtk/scene_editor.py | Python | bsd-3-clause | 1,964 | [
"Mayavi"
] | 94fccf05509fd2606258f653dc66f9203aba8b6fe15e4172fa65806811b0a8b0 |
"""Test class for Remote Execution Management UI
:Requirement: Remoteexecution
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: RemoteExecution
:Assignee: pondrejk
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import datetime
import time
import pytest
from broker import VMBroke... | lpramuk/robottelo | tests/foreman/ui/test_remoteexecution.py | Python | gpl-3.0 | 16,705 | [
"Galaxy"
] | 8bb761406cbbdb9e0ef7e3a07f274cb857adcfb885a99e98e9a7d5c98f7317b5 |
########################################################################
# $HeadURL$
# File : JobPathAgent.py
########################################################################
"""
The Job Path Agent determines the chain of Optimizing Agents that must
work on the job prior to the scheduling decision.
In... | calancha/DIRAC | WorkloadManagementSystem/Executor/JobPath.py | Python | gpl-3.0 | 4,483 | [
"DIRAC"
] | 83f9b4c2e5070d6322da642c6a1c5a0498a0a5ce079a85f890495994292db76f |
#!/usr/bin/env python
__description__ = \
"""
Do a primary blast with a set of seed sequences. Take the result and then
reverse blast each entry against the entire result. Record the top set of
hits.
"""
__author__ = "Michael J. Harms"
__date__ = "110528"
__usage__ = "reverseBlast.py seed_fasta_file"
import sys
... | harmsm/phylo_tools | reverseBlast.py | Python | unlicense | 4,859 | [
"BLAST"
] | 3fbd811e979836308a968709d346dd96dc28102e0ab3422badc6c94582999ca8 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import warnings
import subprocess
import numpy as np
import os.path
from pymatgen.analysis.local_env import LocalStructOrderParams
from pymatgen.core import S... | gpetretto/pymatgen | pymatgen/analysis/graphs.py | Python | mit | 42,429 | [
"CRYSTAL",
"Jmol",
"pymatgen"
] | 98172a90809e6b6662a37c800c073b254f5d1abc4eee99ed68de4086580aa602 |
#!/usr/bin/env python
#
# Copyright 2011-2013,2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your ... | michaelld/gnuradio | gr-digital/python/digital/qa_mpsk_snr_est.py | Python | gpl-3.0 | 4,376 | [
"Gaussian"
] | 0838c25af82b3f6e401007d23c2401103557c2d00bc5b8c24b8fb5c8554ea5ab |
from __future__ import print_function
try:
from setuptools import setup, find_packages, Extension
except ImportError:
from distutils.core import setup, find_packages
import io
import codecs
import os
import sys
import iAnnotateSV
here = os.path.abspath(os.path.dirname(__file__))
def read(*filenames, **kwar... | rhshah/iAnnotateSV | setup.py | Python | apache-2.0 | 1,937 | [
"Biopython"
] | b6c8f13a25a301130fe7001bb304daddad27ea9ce3a65b802459fb4f96aaca59 |
"""network2.py
~~~~~~~~~~~~~~
An improved version of network.py, implementing the stochastic
gradient descent learning algorithm for a feedforward neural network.
Improvements include the addition of the cross-entropy cost function,
regularization, and better initialization of network weights. Note
that I have focuse... | haphaeu/yoshimi | neural_networks/simple/network.py | Python | lgpl-3.0 | 14,619 | [
"Gaussian",
"NEURON"
] | eb7554ad39c96b445a3ef31121084a13d939edb1b412340e8c8ca7f3216f879f |
import yaml
def replace_types(type):
type = type.replace("DelimitedItemNode<AstNode>", "DelimitedItemNode")
type = type.replace("AstNode", "ASTNode")
if type.startswith("ListNode"): type = "ListNode";
return type
def generate_nodes(yaml_content):
cs = "unit UGeneratedNodes;\n\n"
cs += "/////////... | Turbo87/PasParse | GenerateCode.py | Python | gpl-3.0 | 8,674 | [
"VisIt"
] | c35c23d455029dec0aa2fac555fde2fce390b17e4c6d4db0aad3c2bc44e955b8 |
#!/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/dft/numint.py | Python | apache-2.0 | 91,550 | [
"PySCF"
] | 99e111426ed5d5fe71bddc9df2a81ddb1532dc1aedea70f077ef5d6901893c2a |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | yashdsaraf/scancode-toolkit | tests/licensedcode/test_legal.py | Python | apache-2.0 | 2,204 | [
"VisIt"
] | df2dc1d6c021d78922d687c705b31811e3236c65ad64cd50d0ef7e8f541412a5 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | xguse/scikit-bio | skbio/stats/distance/_base.py | Python | bsd-3-clause | 31,715 | [
"scikit-bio"
] | 8d07b25924621ddac2bd8c5b397c7b560d4412debd507e58a0bfbd08c8e122b1 |
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 13 00:26:05 2016
@author: Yongjin
How to use:
$ python Fermi_surface.py [filepath, filename]
Input:
File name of EIGENVAL files. If not stated, 'EIGENVAL' is default.
Output:
Filename of output. Defalut is 'Xcrysden.bxsf'
This script extract s... | MTD-group/Fermi-Surface | Fermi_surface.py | Python | mit | 10,235 | [
"VASP"
] | 8535f0f9bd5ffaa1cf4a75bb54bed7c3e09201195450be20208ea40e016b51fd |
# -*- coding: utf-8 -*-
import json
from pybel import BELGraph
from pybel.constants import INCREASES, RELATION
from pybel.dsl import hgnc
from pybel.manager.models import Edge, Namespace, NamespaceEntry, Network, Node
from pybel.testing.cases import TemporaryCacheMixin
from pybel.testing.mocks import mock_bel_resourc... | pybel/pybel | tests/test_manager/test_manager_drop.py | Python | mit | 6,010 | [
"Pybel"
] | 3dbd8617b5ece3e3e1d018dc283c1466286871581b8aca814c17f8d017992c3b |
from setuptools import setup
with open('requirements.txt') as f:
require = f.readlines()
install_requires = [r.strip() for r in require]
setup(
name='petulant-bear',
version='0.2.0',
description='Presents etree interface to netcdf4-python objects using NCML data model',
author='David Stuebe',
... | ioos/petulant-bear | setup.py | Python | gpl-3.0 | 1,028 | [
"NetCDF"
] | 434f94a7c7340649edcbf53a70519e29982b886611d43b65a1bd1808f6042f50 |
"""This module contains some convenience helper functions."""
import numpy as np
import scooby
import pyvista
from pyvista.utilities import is_pyvista_dataset
from .plotting import Plotter
def plot(var_item, off_screen=None, full_screen=False, screenshot=None,
interactive=True, cpos=None, window_size=None,... | akaszynski/vtkInterface | pyvista/plotting/helpers.py | Python | mit | 10,854 | [
"VTK"
] | f563d7c08a5ec5c1f1e1e7cc2f1c45970ad3800aa58e57ac8431d9bc379f3d9e |
##############################################################################
# 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... | skosukhin/spack | var/spack/repos/builtin/packages/r-acme/package.py | Python | lgpl-2.1 | 2,300 | [
"Bioconductor"
] | 991ed2a6e2def18aee33d8649d2139cad802d575b8fab16e5d1620ac78a84040 |
# -*- coding: utf-8 -*-
#
# Buildbot documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 10 15:13:31 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | zozo123/buildbot | master/docs/conf.py | Python | gpl-3.0 | 10,814 | [
"Brian"
] | 5315d95e9049986fab2f0b6da680b0f960924a78462d716843a885329c027017 |
#
# Copyright (C) 2013,2014,2015,2016 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | tbereau/espresso | samples/python/h5md_WriteFile.py | Python | gpl-3.0 | 6,732 | [
"ESPResSo",
"VMD"
] | b7ca272c3d8bc569a9381e112257c3feda1c3c937c69a152dbd0f71f88c1dc3b |
from unittest import TestCase
import MDAnalysis as mda
import numpy as np
from MDAnalysis.coordinates.GRO import GROReader, GROWriter
from MDAnalysisTests import make_Universe
from MDAnalysisTests.coordinates.base import BaseReference, BaseReaderTest, BaseWriterTest, BaseTimestepTest
from MDAnalysisTests.coordinates.r... | alejob/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_gro.py | Python | gpl-2.0 | 15,800 | [
"MDAnalysis"
] | 0d92d551a694eb6d58d6065988e57097e86af911c38fa2802e532ae8d8d52761 |
#!/usr/bin/env python
from collections import defaultdict
import json
import logging
import os
import re
import tempfile
import shutil
from urllib.parse import urlparse, parse_qs
from bs4 import BeautifulSoup
import jinja2
import requests
from re import compile
import zipfile
import io
from le_utils.constants impor... | nataren/sushi-chef-engageny | engageny_chef.py | Python | mit | 30,938 | [
"VisIt"
] | f6f49a91246abaee2564dbf9278be95da753dad2f3c072a4ef1aec66c3869065 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__doc__ = """
PyKrige
=======
Code by Benjamin S. Murphy and the PyKrige Developers
bscott.murphy@gmail.com
Summary
-------
Contains class OrdinaryKriging3D.
Reference... | rth/PyKrige | pykrige/ok3d.py | Python | bsd-3-clause | 35,990 | [
"Gaussian"
] | 657cdcabd55a86134385fbbc31fb77186f51321b34fc11cd5a8be7cbdd579d8a |
# Demonstration code for a new external gui appliction, which could be
# implemented using any cross-platform Python GUI (Tkinter, wxPython,
#
# To get started:
#
# (1) Copy this file into PyMOL/modules
# (or create a subdirectory with prefix and rename this file to
# __init__.py inside it: "my_ext_gui/__init__.p... | gratefulfrog/lib | python/pymol/pymol_path/examples/devel/my_ext_gui.py | Python | gpl-2.0 | 2,039 | [
"PyMOL"
] | 2996e88fa804998fd844862d49060e7706630c29e699cb810092348ceee58b51 |
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Gen... | sam-m888/gprime | gprime/filters/rules/media/_hassourcecount.py | Python | gpl-2.0 | 1,783 | [
"Brian"
] | b96f4805693d20488a222ca8a4e4290a1fd5861fb1d22432dfcf648279a4e0a7 |
#!/usr/bin/env python
"""
Provide a method for interactively fitting an analytic template to photon phases
Authors:
Matthew Kerr <matthew.kerr@nrl.navy.mil>
Paul S. Ray <paul.ray@nrl.navy.mil>
"""
from __future__ import division
from __future__ import print_function
#from future import standard_libra... | paulray/NICERsoft | scripts/nitemplate.py | Python | mit | 11,536 | [
"Gaussian"
] | 9a4f179ef578b83d9557a71f075779fc39f43de6f212c8e7fdf69e1a6ae2f241 |
from numpy import exp
def gauss_function(x, *p):
"""Define and return a Gaussian function.
This function returns the value of a Gaussian function, using the
A, mu and sigma value that is provided as *p.
Keyword arguments:
x -- number
p -- A, mu and sigma numbers
"""
A, mu, sigma = p
... | Tarskin/HappyTools | HappyTools/util/fitting.py | Python | apache-2.0 | 362 | [
"Gaussian"
] | ac0a8cacf78de511c0122a68c1ccd2bffa6b2569fcdc027bc930a75457304988 |
# coding=utf8
##----------------------------------------------------------------------------##
## █ █ ##
## ████████ ##
## ██ ██ ... | AmazingCow-Game/Game_Taz | src/hud.py | Python | gpl-3.0 | 6,077 | [
"VisIt"
] | 6f9542247fc971d2458b8a54877effa24ad79dc74ceecb84f84319c636b9b09f |
from argparse import ArgumentParser
from glob import glob
from os import path
import numpy as np
from parcels import ParticleFile
def convert_npydir_to_netcdf(tempwritedir_base, delete_tempfiles=False):
"""Convert npy files in tempwritedir to a NetCDF file
:param tempwritedir_base: directory where the direc... | OceanPARCELS/parcels | parcels/scripts/convert_npydir_to_netcdf.py | Python | mit | 1,935 | [
"NetCDF"
] | 6ad6fced16f58c203230e82ff2d24c7c9485f08e7f3be992be9db13a934a48f5 |
"""This file contains code for use with "Think Stats" and
"Think Bayes", both by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
"""This file contains class definitions for:
H... | AllenDowney/DataExploration | thinkstats2.py | Python | mit | 69,332 | [
"Gaussian"
] | 499a93fa3ce2fe7411bfd7a3353d80fdb916ff102caec163df9276de26ce1d02 |
#!/usr/bin/env python
'''
GAEUnit: Google App Engine Unit Test Framework
Usage:
1. Put gaeunit.py into your application directory. Modify 'app.yaml' by
adding the following mapping below the 'handlers:' section:
- url: /test.*
script: gaeunit.py
2. Write your own test cases by extending unittest.TestCas... | eentzel/myeventbot | lib/gaeunit.py | Python | mit | 23,377 | [
"VisIt"
] | 44099e8e2096272048c8a683de87dead58e4c464c84def319ccf7884ffc7947b |
#-----------------------------------------------------------------------
#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
#
#Author: Daniel M. Pelt
#Contact: D.M.Pelt@cwi.nl
#Website: http://dmpelt.github.io/pyastratoolbox/
#
#
#This file is part of the Python interface to the
#All Scale Tomographic Reconstruc... | aallalou/OPT-InSitu-Toolbox | 3rdparty/astra-1.5/python/examples/s014_FBP.py | Python | gpl-3.0 | 2,596 | [
"Gaussian"
] | 6680ceb6d9a9cdf08dcc9c78aaa2ce351b46896952f80eae7f143a014f95b1dd |
import sys, os, string
def vtkLoadPythonTkWidgets(interp):
"""vtkLoadPythonTkWidgets(interp) -- load vtk-tk widget extensions
This is a mess of mixed python and tcl code that searches for the
shared object file that contains the python-vtk-tk widgets. Both
the python path and the tcl path are searche... | b3c/VTK-5.8 | Wrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py | Python | bsd-3-clause | 2,367 | [
"VTK"
] | c7cf7cc86f89c5efb62458c71296d986221a85b239c731bad740fd2e6203c152 |
#* 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/lgpl-2.1.html
import os
i... | harterj/moose | python/MooseDocs/extensions/appsyntax.py | Python | lgpl-2.1 | 33,720 | [
"MOOSE"
] | 5619365dfab1db38216bc8dffa2d0d6d6adae82ef95b5d48d287a253ad77cffb |
### plot the source space
# for the figure to open well run this script
# in ipython, call it like this: ipython --gui=wx
from mne.datasets import sample
from mne.minimum_norm import read_inverse_operator
fname='ohad_raw-oct-6-meg-inv.fif'
inv = read_inverse_operator(fname)
print("Method: %s" % inv['methods'])
print... | yuval-harpaz/MNE4D | pyScripts/plotSourceSpace.py | Python | gpl-2.0 | 871 | [
"Mayavi"
] | 8bc6df4b1b7d1ca5506d894bd11309999681d86dbf994261ca6a5bb7bb1889a7 |
from pig_util import outputSchema
COFFEE_SNOB_PHRASES = set((\
'espresso', 'cappucino', 'macchiato', 'latte', 'cortado', 'pour over', 'barista',
'flat white', 'siphon pot', 'woodneck', 'french press', 'arabica', 'chemex',
'frothed', 'la marzocco', 'mazzer', 'la pavoni', 'nespresso', 'rancilio silvia', 'h... | pombredanne/jkarn-pub-test | udfs/python/coffee.py | Python | apache-2.0 | 813 | [
"ESPResSo"
] | 5dc6c1ba2df2bf502c0d5f8e72e0999e6c6ea66b2839141bc1b58ef093214ee7 |
#################
'''
numpyMatrixMult.py
Written By: Brian O'Dell, September 2017
This is a short python program to fill 2 matricies with random numbers
Then multiply them togther. There is no output, as it is meant to test
the time taken to complete
It uses the numpy library to handle all the... | brian-o/CS-CourseWork | CS471/Program3/numpyMatrixMult.py | Python | gpl-3.0 | 630 | [
"Brian"
] | 47adbe77ece08971f01a0abc43380af48b711709be7ecec160cfa108808e95fb |
"""
byceps.blueprints.site.user.settings.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from typing import Optional
from babel import Locale
from flask import abort, g, request
from flask_babel import gettext
fro... | homeworkprod/byceps | byceps/blueprints/site/user/settings/views.py | Python | bsd-3-clause | 6,676 | [
"VisIt"
] | 8bf7cf54945b1863028510857147092cac4c64cc3f81641ef77520cdcbbfbb62 |
# -*- coding: utf-8 -*-
import my;
import re;
fBlast = my.os.path.join(my.DIR_output, "blast.out");
fBlastFilterd = my.os.path.join(my.DIR_output, "blast_parsed.out");
fVnt = my.os.path.join(my.DIR_output, "ret.pck");
fOut = my.os.path.join(my.DIR_output, "blast_parsed_with_vnt.out");
cutOff = 0.7;
lstAcc = ['HM005_g... | orionzhou/robin | old/vntOutInBlastFormat.py | Python | gpl-2.0 | 1,969 | [
"BLAST"
] | 15a8daa2d3e341c9e4199a9c98f4acb8d54708bf49b8055e4080c203df45e3dd |
#!/usr/bin/python
"""
Copyright 2010 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of th... | clreinki/GalaxyHarvester | dbShared.py | Python | agpl-3.0 | 10,256 | [
"Galaxy"
] | efdca20f148c642679bce25fc8e16339c37039977f763c241fabde2c4bfb1f85 |
#!/usr/bin/env python3
import argparse
from parse_qm import parseQM
def fh_correction():
"""
This script reads a Gaussian optimization output and uses the last structure in the file to generate the input files
for frq, big basis set and solvation corrections.
* How to set up:
export the lib... | qmcaspian/qmcaspian | scripts/fh_correction.py | Python | gpl-3.0 | 4,121 | [
"Gaussian"
] | 26e91e1b5c921f8f4edae8ad9e6262cfc320ed8374d12d96224ecedb8bb71630 |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | brianmay/karaage | karaage/datastores/slurm.py | Python | gpl-3.0 | 14,138 | [
"Brian"
] | 86e212454ff68febad817b5580b82e5d5c9d87bcfb62d7246bd03496dc038227 |
# import aeropy.CST_lib as cst
import aeropy.CST_3D as cst
import aeropy.CST_3D.mesh_tools as meshtools
import panairwrapper
from aeropy.filehandling.vtk import generate_surface
from aeropy.geometry.fitting import fitting
import pickle
import numpy as np
import matplotlib.pyplot as plt
f = open('edges', 'rb')
raw = ... | leal26/AeroPy | examples/3D_fitting/full/fitting_edges.py | Python | mit | 5,206 | [
"VTK"
] | 1ccc01bc2bcb3b244db2497f56947005871b98768f5092a587658afafdb3a2fd |
from colour import Color
from .core import Heatmap_, Area_, Column_, Bubble_, Line_, Errorbar_
from .core import (
Title,
Axis,
ColorAxis,
Series,
Legend,
DataLabels,
Label,
RenderableList,
Tooltip,
Annotations,
LabelOptions,
)
class HighchartTemplate(object):
chart =... | madgik/exareme | Exareme-Docker/src/mip-algorithms/mipframework/highcharts/user_defined.py | Python | mit | 18,526 | [
"VisIt"
] | 1122bc20a19e4a249c7a7beba36e2ab64d70208492c1578f69cb749951e43693 |
#!/usr/bin/python
#
# Copyright 2017, Population Health Research Institute
# Copyright 2017, Martin Renters
#
# This file is part of the DataFax Toolkit.
#
# The DataFax Toolkit 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 Soft... | mrenters/DFtoolkit | dfpython/signature.py | Python | gpl-3.0 | 16,587 | [
"VisIt"
] | 45ea9d2eb1d9f3c8e02de2a80f3c52cb4e5840d8ff5aa47f3363aaaef44e1e44 |
################################################################################
#
# Copyright 2015-2021 Félix Brezo and Yaiza Rubio
#
# This program is part of OSRFramework. You can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Softwa... | i3visio/osrframework | osrframework/usufy.py | Python | agpl-3.0 | 27,803 | [
"VisIt"
] | 500bafbfdc53c01cf6da3897f096d7fb6b7f07228303663ea79dcab47803a737 |
import numpy as np
import scipy as sp
from scipy.io import loadmat
import pylab as plt
import time
def FLORIS_Stat(wind_speed, wind_direction, air_density, rotorDiameter, yaw, Cp, axial_induction, turbineX, turbineY,
ws_positions=np.array([])):
"""Evaluates the FLORIS model and gives the FLORIS-predict... | byuflowlab/gaussian-wake | src/gaussianwake/FLORISgaussianwake.py | Python | apache-2.0 | 109,512 | [
"Gaussian"
] | 625a27db7c74d3fe1af4c376c2133ea5caf39c473bd98c702fe62567f9add3e9 |
from itertools import product
import numpy as np
import nose.tools as nt
from ..lasso import lasso
from ...tests.instance import (gaussian_instance,
logistic_instance,
poisson_instance)
from ...tests.flags import SMALL_SAMPLES
from ...tests.decorators impor... | selective-inference/selective-inference | selectinf/randomized/tests/sandbox/test_general_lasso.py | Python | bsd-3-clause | 2,702 | [
"Gaussian"
] | 13d2dab2e910551199053b491f15dbf7d6dde9208d412c0fc68f9af358996d71 |
'''
Unittests for pysal.model.spreg.error_sp_hom module
'''
import unittest
import pysal.lib
from pysal.model.spreg import error_sp_hom as HOM
from scipy import sparse
import numpy as np
import pysal.model.spreg
class BaseGM_Error_Hom_Tester(unittest.TestCase):
def setUp(self):
db=pysal.lib.io.open(pysal.... | lixun910/pysal | pysal/model/spreg/tests/test_error_sp_hom_sparse.py | Python | bsd-3-clause | 18,074 | [
"COLUMBUS"
] | 5edbc0025c68e19b850f78b6381a54d5e7cc107220fffb846763e262b7fbc0c3 |
# Single Channel Noise Removal using Iterative Wiener Filtering
# Copyright (C) 2019 Eric Bezzam, Laurent Colbois, Lionel Desarzens
#
# 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 ... | LCAV/pyroomacoustics | pyroomacoustics/denoise/iterative_wiener.py | Python | mit | 15,365 | [
"Gaussian"
] | d6576aae9d1cf4e243bc15b7797c71c76bfef437499709284c0986eaef86bec7 |
#!/usr/bin/python
"""
Copyright 2016 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of th... | druss316/G-Harvestor | html/resourceFinder.py | Python | gpl-3.0 | 2,820 | [
"Galaxy"
] | 74c62f58096bbfc99d6d72abc5a45139ce4ff2e2bc58ae4b66066bdd2e40f01f |
"""
This file is part of Giswater 3
The 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.
"""
# -*- coding: latin-1 -*-
import json
imp... | Giswater/giswater_qgis_plugin | core/shared/info.py | Python | gpl-3.0 | 170,427 | [
"VisIt"
] | b96ba3ea73c2f55c8678398c9a6a36f2b156b849f80fd63729529df177336168 |
import hashlib
import math
import mimetypes
import os
from os.path import isfile, isdir
from ddsc.core.ignorefile import FileFilter, IgnoreFilePatterns
from ddsc.core.util import KindType, ProjectWalker, plural_fmt, join_with_commas_and_and
class LocalProject(object):
"""
Represents a list of folder/file tree... | Duke-GCB/DukeDSClient | ddsc/core/localstore.py | Python | mit | 17,652 | [
"VisIt"
] | 20ad3c8938437061981d34ffe2883f93daf55a93ec073b8412f4380ca256231c |
"""Long or boring tests for vobjects."""
import base, behavior, StringIO, icalendar, vcard, re, dateutil.tz, datetime
# setuptools is required to run the unit tests
from pkg_resources import resource_stream
#------------------- Testing and running functions -----------------------------
def _test():
import docte... | bongo-project/bongo | src/libs/python/bongo/external/vobject/tests.py | Python | gpl-2.0 | 17,437 | [
"Octopus"
] | 3c496de5aa09726ab91fdf64b1cc88bdc634e58dccf2f40efe1856e0e4b6ae44 |
# Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | pikinder/nn-patterns | nn_patterns/explainer/gradient_based.py | Python | mit | 3,817 | [
"NEURON"
] | 23fb202a75eaafd3d526357a21597b8f4a3afd6ad030d1c47b66a593c3afcdff |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | anguslees/kubernetes | hack/verify-flags-underscore.py | Python | apache-2.0 | 8,932 | [
"VisIt"
] | 7b0e8fc5ec73c9a38b810e5812c55b762abdfba49a40ce50488474e46981bdfe |
from __future__ import print_function
import time,gzip,random,os,sys
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Recap
from rdkit.RDLogger import logger
logger = logger()
tests=[1]*1001
if len(sys.argv)>1:
tests=[0]*1001
tests[1]=1
for x in sys.argv[1:]:
x = int(x)
... | soerendip42/rdkit | Regress/Scripts/timings.py | Python | bsd-3-clause | 6,052 | [
"RDKit"
] | 404c0f5d606bce5580233ca95ef5e863a4829242caf22f572458650b9d42bcb9 |
# #
# # Copyright 2016 The BigDL Authors.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable ... | intel-analytics/BigDL | python/orca/test/bigdl/orca/tfpark/test_text_estimators.py | Python | apache-2.0 | 5,003 | [
"ORCA"
] | 28e37ed09e1559474ebd83b24ef34402fa0aa036266fa0fc18a79116c27a3fe3 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011, 2013.
# Author(s):
# Martin Raspaud <martin.raspaud@smhi.se>
# This file is part of mpop.
# mpop 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
# F... | mraspaud/mpop | mpop/saturn/two_line_elements.py | Python | gpl-3.0 | 14,593 | [
"EPW"
] | 133927da410e8a69bf69fdcc18432342c3dd69738ef3fff28fcfa3e4f37d94a0 |
""" Functions for reading ascidoc files (*.adoc, *.asc, *.asciidoc) and tagging each line """
import os
import sys
import glob
import re
import logging
from shutil import copyfile
from pugnlp import futil
from nlpia.regexes import CRE_ACRONYM
# from nlpia.data_utils import iter_lines # FIXME: reuse
from nlpia.constan... | totalgood/nlpia | src/nlpia/book_parser.py | Python | mit | 23,705 | [
"VisIt"
] | ea8c9474cbbfa89a93acd11cc4c7c0b5cf47fc06ebbc311336d7bb9c04050448 |
# -*- coding: utf-8 -*-
# Copyright 2013 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import os
import unittest
import pytest
from splinter import Browser
from .base import BaseBrowserTests
from .fake_webapp import EXAMP... | cobrateam/splinter | tests/test_zopetestbrowser.py | Python | bsd-3-clause | 6,455 | [
"VisIt"
] | 1d2cb8442e42d272572cb5ffb5f9f9d685bf303882aff941f90cd830d016f6ca |
# python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... | deepmind/enn | enn/networks/indexers.py | Python | apache-2.0 | 2,590 | [
"Gaussian"
] | a4e63580ab9f9a48b24dbebe3cacd5f59efff5a23ea7af8895e8366ea25bcd08 |
from sympy import (meijerg, I, S, integrate, Integral, oo, gamma, cosh, sinc,
hyperexpand, exp, simplify, sqrt, pi, erf, erfc, sin, cos,
exp_polar, polygamma, hyper, log, expand_func)
from sympy.integrals.meijerint import (_rewrite_single, _rewrite1,
meijerint_indefinite, _... | kaichogami/sympy | sympy/integrals/tests/test_meijerint.py | Python | bsd-3-clause | 27,564 | [
"Gaussian"
] | 86761e291469c25e45d3aff49d28d87c44e440337475091b557d42997c3cab38 |
#!/usr/bin/python
# MDreader
# Copyright (c) Manuel Nuno Melo (m.n.melo@rug.nl)
#
# Released under the GNU Public Licence, v2 or any higher version
#
"""
Class for the all-too-frequent task of asking for options and reading in trajectories.
version v2016.30.06
by Manuel Melo (m.n.melo@rug.nl) with contribution from J... | mnmelo/MDreader | mdreader.py | Python | gpl-2.0 | 66,642 | [
"MDAnalysis"
] | f1d7ebd8d2eedd9a95b41141725d6a8b9fb2169c9d9de55daca4557258bca356 |
from __future__ import print_function, absolute_import
import os
import sys
import json
import string
import shutil
import subprocess
import tempfile
from distutils.dep_util import newer_group
from distutils.core import Extension
from distutils.errors import DistutilsExecError
from distutils.ccompiler import new_compil... | casawa/mdtraj | basesetup.py | Python | lgpl-2.1 | 11,628 | [
"MDTraj"
] | fa5f6e95cfe15642dd1b8365512f8088196d1d682d9418bf9b9c9158ef9b0174 |
# Copyright (c) 2012, CyberPoint International, LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list... | CyberPoint/libpgm | build/lib.linux-x86_64-2.7/libpgm/CPDtypes/lgandd.py | Python | bsd-3-clause | 5,732 | [
"Gaussian"
] | 8e80297080aa999dd2b2f299778ea481802eed98fe5b3fb4d05bf020acff50fd |
# -*- mode: python; -*-
##
## Utilities for fetching exons from GFF files
##
import subprocess
import time
import os
import errno
import sys
import re
import pysam
from collections import defaultdict
import misopy
import misopy.gff_utils as gff_utils
import misopy.misc_utils as misc_utils
def is_exon_in_mRNA(gff_in,... | kdaily/altanalyze | misopy/exon_utils.py | Python | apache-2.0 | 12,423 | [
"pysam"
] | 3f9bde2d0a4b38a526a61167064007d08db14ad0c21f7138e178194118f61b24 |
#
# AtHomePowerlineServer - networked server for CM11/CM11A/XTB-232 X10 controllers
# Copyright © 2014, 2021 Dave Hocker
#
# 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, version 3 of the... | dhocker/athomepowerlineserver | CommandHandler.py | Python | gpl-3.0 | 6,289 | [
"xTB"
] | b71887e2fd9f1ba61e32534bf4200f3830c967be141e28edb87fd7389af6013c |
# Copyright 2014 Roberto Brian Sarrionandia
#
# 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 t... | sarrionandia/tournatrack | tournaments.py | Python | apache-2.0 | 3,164 | [
"Brian"
] | 09eeeee314e860830b56328a4dee33cdbe21cdced862dc0e8f0e569488b16f39 |
# $Id$
#
# Copyright (C) 2001-2008 greg landrum and rational discovery llc
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" Python functions fo... | bp-kelley/rdkit | rdkit/Chem/Graphs.py | Python | bsd-3-clause | 1,365 | [
"RDKit"
] | c977a05598c2966320d71152bd0e7d9cbf35ddc01b71f3b440c870874d5b68c2 |
# The MIT License (MIT)
#
# Copyright (c) 2018, TU Wien
#
# 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, ... | wpreimes/gldas | src/gldas/reshuffle.py | Python | bsd-3-clause | 8,061 | [
"NetCDF"
] | 9bb5fe62b193d3e2a85213b73bf15140c75c61a1a3ca1a2d311fe41d495fba23 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Module containing analysis classes which compute a pourbaix diagram given a
target compound/element.
"""
from six.moves import zip
__author__ = "Sai Jayaraman"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.0"
__maintain... | Dioptas/pymatgen | pymatgen/analysis/pourbaix/maker.py | Python | mit | 12,459 | [
"pymatgen"
] | d3255e161dc7dc79b7680a4ff802dff66680cbce71157fffd695425b93fccd49 |
"""
Numba-specific errors and warnings.
"""
import abc
import contextlib
import os
import sys
import warnings
import numba.core.config
import numpy as np
from collections import defaultdict
from numba.core.utils import chain_exception
from functools import wraps
from abc import abstractmethod
# Filled at the end
__a... | sklam/numba | numba/core/errors.py | Python | bsd-2-clause | 22,086 | [
"VisIt"
] | e5c2d5fa7731371e1680b8b15dcb2d43d1f0fad65d4fa63066323d025633b708 |
# -*- encoding:utf-8 -*-
from __future__ import print_function
## https://gist.github.com/stummjr/cd9974b513419f0554c5
##
class BSTNode(object):
def __init__(self, key, value=None, left=None, right=None):
self.key = key
self.value = value
self.left = left
self.right = right
d... | amaurywalbert/twitter | BSTNode.py | Python | gpl-3.0 | 2,662 | [
"VisIt"
] | f517401bb7330cebb2cba9768e1e93c886c63f66f6173ec8fe4f44501ad96a40 |
# log_gabor filter and __frequency_butterworth_filter are derived from Matlab
# scripts written by Peter Kovesi. We maintain his copyright notice below.
#
# Copyright (c) 1999 Peter Kovesi
# School of Computer Science & Software Engineering
# The University of Western Australia
# http://www.csse.uwa.edu.au/
#
# Permis... | ikassi/menpo | menpo/convolution/__init__.py | Python | bsd-3-clause | 12,618 | [
"Gaussian"
] | 68046e62b8f9bfd522f1d0fac0304037b2a4e61ff7fa2ebfc906e8385d703fa3 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Using solvent model in the CASCI calculations. There are two ways to
incorporate solvent effects. One is allow solvent to response to the
electron density. The other is to freeze the solvent effects for certain
electron density.
'''
from pyscf ... | gkc1000/pyscf | examples/solvent/02-casci_with_ddcosmo.py | Python | apache-2.0 | 1,202 | [
"PySCF"
] | f08727c256097e6fe4037fd2c8ae834356534b48824c8203b12b6a6d90f71731 |
if __name__ == "__main__":
import prometheus_client as prom
prom.start_http_server(9001)
import os
import shutil
import sys
import logging
from multiprocessing_logging import install_mp_handler
from wepy_tools.sim_makers.openmm.lennard_jones import LennardJonesPairOpenMMSimMaker
... | ADicksonLab/wepy | jigs/prom/source/sim_maker_run.py | Python | mit | 1,719 | [
"OpenMM"
] | d2b217dd64fc7837ec617c087c6619ed349cc3835fda1f6107e819499a464e77 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_mainwindow.ui'
#
# Created: Tue Jan 13 13:18:41 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except ... | morta-code/IntelliStock | intellistock/ui/ui_mainwindow.py | Python | gpl-2.0 | 22,141 | [
"Gaussian"
] | f1ae7a9bcc274fb0c776c26306a9565428a2eb9f1c66de272f33318400ed4ae3 |
#! /ust/bin/env python
# Take a subgrid and subsample the grid
# to make forcing for nesting example.
#
# Uses xarray to simplify array operations
# and in particular writing netcdf-files.
import xarray as xr
romsfile = "../data/ocean_avg_0014.nc"
outfile1 = "forcing_skagerrak.nc"
outfile2 = "forcing_northsea.nc"
A... | bjornaa/ladim | examples/nested/prepare.py | Python | mit | 1,332 | [
"NetCDF"
] | 8a7b3616fac69f8fd6a84549156cc326ac7cbdec634f083f1de1bd41c62c052e |
'''Calculate the inverse of a matrix by different methods
Reference:
- The Inverse of a Matrix (NYU Class: Linear Algebra)
http://www.math.nyu.edu/~neylon/linalgfall04/project1/jja/group7.htm
- Wiki: Invertible Matrix
https://en.wikipedia.org/wiki/Invertible_matrix
'''
import numpy as np
def inv_mat(A, method=... | Chasego/noi | src/inverse_matrix.py | Python | gpl-3.0 | 1,973 | [
"Gaussian"
] | c86d09ba4a51051ca7f0bac6ad5a99730105ca3862edca55cc10496387f10e17 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | demis001/scikit-bio | skbio/stats/distance/_mantel.py | Python | bsd-3-clause | 19,176 | [
"scikit-bio"
] | d51371fd9653c98eea696f0b74d5858aaf41e87310a113f7304fc4aa255f213b |
# Version: 0.17
"""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, 3.5, and pypy
* [![Latest Version]
(http... | InfluxGraph/influxgraph | versioneer.py | Python | apache-2.0 | 68,587 | [
"Brian"
] | baed43493c489069680b7346780414fb5878ecdcfebcd4af41661ad653f90880 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSva(RPackage):
"""Surrogate Variable Analysis
The sva package contains functions ... | LLNL/spack | var/spack/repos/builtin/packages/r-sva/package.py | Python | lgpl-2.1 | 2,530 | [
"Bioconductor"
] | 232068679de98d2c4d4bc71b820d638f9baa02ab4e1297185bc1696d87f310af |
from Sire.IO import *
from Sire.MM import *
from Sire.Mol import *
from Sire.Base import *
from nose.tools import assert_equal, assert_almost_equal
from nose.tools import assert_true, assert_false
# check that we have GroTop support in this version of Sire
has_grotop = True
# Set the GROMACS_PATH to "../io/gromacs"... | michellab/SireUnitTests | unittests/SireIO/test_grotop.py | Python | gpl-3.0 | 3,551 | [
"Gromacs"
] | a5cec780cdc1840ebad4b12c91af390d5c920b8f5f5d9fd4395013cd25807ad0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.