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 |
|---|---|---|---|---|---|---|---|
# disable missing docstring
# pylint: disable=C0111
import json
from lettuce import world, step
from nose.tools import assert_equal, assert_true # pylint: disable=E0611
from common import type_in_codemirror, open_new_course
from advanced_settings import change_value, ADVANCED_MODULES_KEY
from course_import import imp... | jelugbo/tundex | cms/djangoapps/contentstore/features/problem-editor.py | Python | agpl-3.0 | 12,644 | [
"VisIt"
] | d97007b9a0442f5e9b8ecf204d80c6e9cd72913de953c522f31ec1343aaff739 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2010 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | dag/genshi | genshi/template/astutil.py | Python | bsd-3-clause | 24,467 | [
"VisIt"
] | 9da73e67ed868bd607238aaaae7a41b4850aebf6b6ba86fea037a314e8ceb3e9 |
# todo: ABC for all displays. Maybe auto-detect fake vs real
from .display_base import DisplayDriver, LEDThing, Gradient
import vtk
class GraphicsDisplay(DisplayDriver):
def __init__(self):
self.__renderer = vtk.vtkRenderer()
self.__rend_win = vtk.vtkRenderWindow()
self.__rend_win.SetSize(1... | stuart-stanley/stormlight-archive | src/displays/graphics_based_displays.py | Python | apache-2.0 | 2,820 | [
"VTK"
] | f3d0b16f1a2794740fdc54c60d096f4532108176e15ced93274f954002e7bfd4 |
#
# general_behavior.py - The primary Owyl behavior tree
# Copyright (C) 2014 Hanson Robotics
#
# 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 (... | linas/eva_behavior | src/general_behavior.py | Python | lgpl-2.1 | 34,678 | [
"VisIt"
] | 0f89405e7414a1f5a54b51bc3c474c60f4e805e9de5b98235c2b3b769645f8a6 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import math
import re
import os
import textwrap
import warnings
from collections import OrderedDict, deque
from io import StringIO
import numpy as np
from functools import partial
from pathlib import Path
from... | montoyjh/pymatgen | pymatgen/io/cif.py | Python | mit | 58,184 | [
"Avogadro",
"CRYSTAL",
"pymatgen"
] | 289ea6c9ec942cf5ded74a7d3021c89672788e05c3adb66614d9b09835b65638 |
#!/usr/bin/env python2
"""
This is an unmaintained one-shot script, only included in the repo for
reference.
"""
from pokedex.db import connect, identifier_from_name
from pokedex.db.tables import Encounter, EncounterMethod, EncounterSlot, Language, Location, LocationArea, Pokemon, Version
session = connect()
def get... | veekun/pokedex | scripts/add-gift-encounters.py | Python | mit | 16,338 | [
"CRYSTAL"
] | 7b9a5e8526681d8a296ed983bf0b0cb4f26667bcaeb92dc0c8b30d5f32164044 |
#!/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 | postWaypoint.py | Python | agpl-3.0 | 9,961 | [
"Galaxy"
] | 6bb347276bbc3a55529783e219441b057addc7dcd530c0b9a5d036212d519a40 |
import json
from coalib.bearlib.abstractions.Linter import linter
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
from coalib.results.Result import Result
@linter(executable='coffeelint')
class CoffeeLintBear:
"""
Check CoffeeScript code for a clean and consistent style.
For more information ... | sims1253/coala-bears | bears/coffee_script/CoffeeLintBear.py | Python | agpl-3.0 | 1,322 | [
"VisIt"
] | f58b6643bb29f9eb77af8dc92aa11a4e14080f35f76e0a09d24a8b4295a91500 |
# -*- coding:UTF-8 -*-
# ---------------------------------------------------#
# Aim of the program:
# Create plots for ENSO_metrics
# ---------------------------------------------------#
# ---------------------------------------------------#
# Import the right packages
# -----------------------------------------... | eguil/ENSO_metrics | pmp_driver/PMPdriver_plot.py | Python | bsd-3-clause | 6,359 | [
"NetCDF"
] | 065bd8279e7e4e21e8043992a115464a83f005f340dce31eabdaa209965995ab |
import os
import subprocess
import pytest
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
USERNAME = 'admin'
gunicorn = None
########################################################################
# ... | UNINETT/nav | tests/functional/conftest.py | Python | gpl-2.0 | 4,760 | [
"VisIt"
] | b99730762232c5d6648ea0c60ed64f05bcfa9142625cab1643162df09f8b0d1c |
# -*- coding: utf-8 -*-
"""
End-to-end tests for admin change view.
"""
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.admin import ChangeUserAdminPage
from common.test.acceptance.tests.helpers import AcceptanceTest
class UnicodeUsernameAdminTest(Accepta... | cpennington/edx-platform | common/test/acceptance/tests/lms/test_unicode_username_admin.py | Python | agpl-3.0 | 1,911 | [
"VisIt"
] | 87a744630b5061734ceaa1faa34a41fad21d445e939b28ff55a52ee3f8d61f06 |
'''
Created on Apr 20, 2015
@author: ayan
'''
from __future__ import (absolute_import, division, print_function)
from netCDF4 import Dataset
import numpy as np
import hashlib
import warnings
from collections import OrderedDict
from gridded.pysgrid.utils import GridPadding #TODO Remove this from the loading system
f... | NOAA-ORR-ERD/gridded | gridded/pysgrid/sgrid.py | Python | unlicense | 53,042 | [
"NetCDF"
] | f3aaa58032a2d837d827f5ab2181b4c4dadb5fe87fc60f942f67b0ab25551da9 |
#
# @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
#... | CDSherrill/psi4 | psi4/driver/util/tty/__init__.py | Python | lgpl-3.0 | 4,312 | [
"Psi4"
] | 3389436e5c7e5e40dffce42ea8519f0f025d0079ac15b4c1f4ec2a914a0d070b |
"""
It keeps the service configuration parameters like maximum running threads, number of processes, etc. ,
which can be configured in CS.
"""
from DIRAC.Core.Utilities import Network, List
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
from DIRAC.ConfigurationSystem.Client import Pat... | DIRACGrid/DIRAC | src/DIRAC/Core/DISET/private/ServiceConfiguration.py | Python | gpl-3.0 | 4,044 | [
"DIRAC"
] | f4a6211b4d998243550d4bccc59ff201edf712bb982cdf088aa9ab6502e30a13 |
"""
The general purpose tools to manipulate the pipeline with the mlab interface.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>,
# Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2007-2015 Enthought, Inc.
# License: BSD Style.
# Standard library imports.
import numpy... | dmsurti/mayavi | mayavi/tools/tools.py | Python | bsd-3-clause | 12,386 | [
"Mayavi",
"VTK"
] | 4e5841375431f3cf21eb79c7ff16ee3d1d32a95b9da86d85f92a85a397f7cdee |
from sklearn import svm, linear_model
from sklearn.cross_validation import train_test_split, PredefinedSplit
from sklearn.preprocessing import scale, StandardScaler
from sklearn.lda import LDA
from sklearn.decomposition import PCA
from sklearn.grid_search import GridSearchCV
from matplotlib import pyplot as plt
from lo... | bauerca/BikeShareDemand_Carl | svm.py | Python | gpl-2.0 | 7,079 | [
"Gaussian"
] | 79850832780b38d9d167ce16779b8b51dea20038a250b07f969bbb25747acc52 |
# -*- coding: utf-8 -*-
"""
This module performs modifications on the network parameters during conversion
from analog to spiking.
.. autosummary::
:nosignatures:
normalize_parameters
@author: rbodo
"""
import os
import json
from collections import OrderedDict
from tensorflow.keras.models import Model
imp... | NeuromorphicProcessorProject/snn_toolbox | snntoolbox/conversion/utils.py | Python | mit | 16,015 | [
"NEURON"
] | 0141cc51546d21cc204a3497d5ad40de9e28fb46c84526dbe449d6519fdc1533 |
import numpy as np
class AdalineGD(object):
"""ADAptive LInear NEuron classifier.
Parameters
------------
eta : float
Learning rate (between 0.0 and 1.0)
n_iter : int
Passes over the training dataset.
Attributes
-----------
w_ : 1d-array
Weights after fitting.
... | petritn/MachineLearning | Objects/CAdaline.py | Python | gpl-3.0 | 4,736 | [
"NEURON"
] | cac9c70ab5f4e5cb228663ffebd6a947894c5278cdb68720bbee1be18407ee48 |
# 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 u... | apache/incubator-airflow | tests/build_provider_packages_dependencies.py | Python | apache-2.0 | 9,837 | [
"VisIt"
] | a6f78a1c6e5cf2c88ae7195bd0012261c2c2c233ec361e7c68ddd266573a06d5 |
#!/usr/bin/python
#author: Vadim M. Gumerov; 09/08/2017
import sys, getopt, fileinput, os, traceback
import collections
'''Script cretaes COGs based on results of blast all vs all. Input: bunch of blast files in 6 outformat.
'''
#usage:
INPUT_DIR = "./blast_output"
OUTPUT_FILENAME = "COGs.txt"
DELIM="@"
IDENTITY_TH... | ToshkaDev/bioinformatics-universe | bioinformatics-universe/bioinformatics-programs/createCOGs.py | Python | mit | 12,501 | [
"BLAST"
] | 2287da64718d37247449066b1de6d6998b29a745752ae4881bcd378116b9524e |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# Copyright (c) 2009-2010 Arista Networks, Inc.
#
# 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
... | hkupty/python-mode | pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/base.py | Python | lgpl-3.0 | 49,156 | [
"VisIt"
] | d010e1dd240d7b690471449f77f9c11d7164a3434c0525c26e45a1485b8b54f8 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | nhynes/neon | examples/early_stopping.py | Python | apache-2.0 | 3,001 | [
"Gaussian"
] | 686bcdaefd01ff4687d28170779f1b189d525141c79a6d9ec1291e541f717248 |
#!/usr/bin/env python
################################################################################
#
# qe_extractor.py
#
# Pulls all sorts of information from a QE output file and writes to standard
# output, e.g. the command "qe_extractor.py INPUTFILE homo" uses the number of
# electrons and the output KS eigenva... | HSINWEI/physics | python/qe_extractor.py | Python | gpl-3.0 | 8,488 | [
"ESPResSo",
"Quantum ESPRESSO"
] | 88a8743c004db888bd7cf4c873b65d87c9cade397bda36fcc2eb1ba2ba1ffa63 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 29 01:48:17 2017
@author: Aretas
"""
#Export Linear MD results to xlsx
import re
import argparse
import os
import xlsxwriter
import collections
import csv
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file',
help='choose the l... | aretas2/High-throughput-molecular-docking | excel-py/xcl2_pho_L.py | Python | mit | 6,624 | [
"CRYSTAL"
] | 922bd3432383f88472ee778a30510d9e189621da7fc64ba79384f693aca8901a |
import subprocess
from Bio import SeqIO
import unittest
import shutil
import os
import time
# Prereqs:
# module load bowtie/0.12.8
# module load java
# module load samtools
# Trinity
# Copy the .gz files in sample_data/test_Trinity_Assembly to current directory
# Run using nosetests
MEM_FLAG = "--max_memory 2G"
TEMP_F... | ssn1306/trinityrnaseq | util/support_scripts/tests.py | Python | bsd-3-clause | 8,295 | [
"Bowtie"
] | edcdf5170a2e12f63e87f3572019d447144e20169b15707ead22589904e1d405 |
########################################################################
# File : CloudDirector.py
# Author : A.Tsaregorodtsev
########################################################################
""" The Cloud Director is a simple agent performing VM instantiations
"""
import os
import random
import socket
im... | xianghuzhao/VMDIRAC | VMDIRAC/WorkloadManagementSystem/Agent/CloudDirector.py | Python | gpl-3.0 | 19,941 | [
"DIRAC"
] | 61ae63c64cf32ef0e9e886f5307cb7f32cc701de68d7c246af94983bd168a00d |
import numpy as np
from scipy.optimize import check_grad
import copy
import pdb
import os
import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pylab as plt
from .context import aep
from .context import flatten_dict, unflatten_dict
from .context import PROP_MC, PROP_MM, PROP_LIN
from test_utils import ... | thangbui/geepee | tests/test_grads_aep.py | Python | mit | 20,873 | [
"Gaussian"
] | b391b10c439f719e9ac21a8448480004a614e3fa107f3381f62f056a33e0c576 |
import ast
from collections import defaultdict
from functools import singledispatch
from typing import Tuple
def generic_visit(node: ast.AST, scope, namespace):
"""Called if no explicit visitor function exists for a node.
Adapted from NodeVisitor in:
https://github.com/python/cpython/blob/master/Lib/as... | thisfred/breakfast | tests/test_attempt_11.py | Python | bsd-2-clause | 1,921 | [
"VisIt"
] | e19c0536fd92b1f16713d309d2d5b1b601f24fbe6547835085ad633bd830539e |
#!/usr/bin/env python
# Parses CWL's "SoftwareRequirement" hints section and dumps a cbl compatible yaml file.
# The purpose with this script is to create smaller composable docker containers for bcbio-nextgen.
#
# Usage: cwl2yaml_packages.py test_bcbio_cwl/run_info-cwl-workflow/steps/process_alignment.cwl > cloudbioli... | chapmanb/cloudbiolinux | utils/cwl2yaml_packages.py | Python | mit | 873 | [
"Bioconda"
] | f3256547daedb45c93af34efd7e476db5baffaf358b6fbfe7e65058951a26157 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/core/lib/settingstab.py | Python | gpl-2.0 | 6,947 | [
"Brian"
] | ab163b69230e306de69fa960a2b7bd097260378a9cc7b128cfb6e9f58f48aae1 |
"""Test for the hide-show feature.
"""
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
from os.path import abspath
from StringIO import StringIO
import copy
# Local imports.
from common import TestCase, get_exam... | liulion/mayavi | integrationtests/mayavi/test_hide_show.py | Python | bsd-3-clause | 4,695 | [
"Mayavi",
"VTK"
] | 669e550e54d7d40145a5d1121659631488cfdc13ad9e339391eaed64d0539135 |
# -*- coding: utf-8 -*-
# Copyright 2007-2021 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | erh3cq/hyperspy | hyperspy/tests/model/test_set_parameter_state.py | Python | gpl-3.0 | 4,051 | [
"Gaussian"
] | 4ae36dad390187a9e70b9d94fc9acb7f028f66a8e4642f7f5bda45b2839fead7 |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/art.py | Python | gpl-2.0 | 6,325 | [
"VisIt"
] | 3ed6285d7ea67a1d98e8250da81979d6d501b5061fa6d6c3b2ad9bb60b109e32 |
#!/usr/bin/env python
#
# restrict_long_contigs.py
#
# USAGE: restrict_long_contigs.py [options] <input_directory> \
# <output_directory>
#
# Options:
# -h, --help show this help message and exit
# -l MINLEN, --minlen=MINLEN
# Minimum length o... | widdowquinn/scripts | bioinformatics/restrict_long_contigs.py | Python | mit | 7,563 | [
"Biopython"
] | 33ce5a3052ddcf6995ce74f18a393c4b4f5dd8fccfbed5e83b97d45e79f048b2 |
"""
==========================================
Statistical functions (:mod:`scipy.stats`)
==========================================
.. module:: scipy.stats
This module contains a large number of probability distributions as
well as a growing library of statistical functions.
Each univariate distribution is an insta... | yuanagain/seniorthesis | venv/lib/python2.7/site-packages/scipy/stats/__init__.py | Python | mit | 9,083 | [
"Gaussian"
] | d45d374bd63a474ffb2f353632a8f20276db51be05c206e958d40987f23f7c2c |
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator as glm
# test scoring_history for Gaussian family with validation dataset and cv
def test_gaussian_alpha():
col_list_compare = ["iterations", "objective", "negative_log_l... | michalkurka/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_PUBDEV_8077_gaussian_alpha.py | Python | apache-2.0 | 3,549 | [
"Gaussian"
] | caa8472496c14f58e717cd70d1dbbe9f089e055e20557b62e4350d1f2f3e02c5 |
# -*- coding:Utf-8 -*-
"""
This module handles CORMORAN measurement data
CorSer Class
============
.. autoclass:: CorSer
:members:
Notes
-----
Useful members
distdf : distance between radio nodes (122 columns)
devdf : device data frame
"""
#import mayavi.mlab as mlabc
import os
import pdb
import sys
import ... | pylayers/pylayers | pylayers/measures/cormoran.py | Python | mit | 164,467 | [
"Mayavi",
"VTK"
] | 755b0ac18083cce96e2fffd88d042592d5107404f5870fc27f7c19be75a288f3 |
import json
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from keystoneclient.exceptions import Conflict
from horizon import exceptions
from horizon import form... | Crystal-SDS/dashboard | crystal_dashboard/dashboards/crystal/policies/bw_slos/tables.py | Python | gpl-3.0 | 4,895 | [
"CRYSTAL"
] | f665993938ba3c4ba061fd071a8aa02ebc47366bd8ad7fd2edaa7967f9e98c67 |
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | intel-analytics/BigDL | python/orca/test/bigdl/orca/inference/test_inference_model.py | Python | apache-2.0 | 2,742 | [
"ORCA"
] | b23be33a133deed6968cbdc674b711bb328aa74f6cd6750c55960258f56a1768 |
# sybase/base.py
# Copyright (C) 2010-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
# get_select_precolumns(), limit_clause() implementation
# copyright (C) 2007 Fisch Asset Management
# AG http://www.fam.ch, with coding by Alexander Houben
# alexander.houben@thor-solutions.ch
#
# This module is par... | pcu4dros/pandora-core | workspace/lib/python3.5/site-packages/sqlalchemy/dialects/sybase/base.py | Python | mit | 28,696 | [
"ASE"
] | 2e2564fd5fb565d0694de6da4f51630e2bf482c1738fddb99e3e82ded72f8824 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | mikehulluk/morphforge | src/morphforge/simulation/neuron/biophysics/modfilecompiler.py | Python | bsd-2-clause | 9,423 | [
"NEURON"
] | 194d0b4921f9e31f7d344a1fc0eed647ad4a80b36cba99612d10130459810c39 |
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | judithfan/sketch-rnn | pix_to_sketch/rnn.py | Python | mit | 16,443 | [
"Gaussian"
] | cc01c395f9f1bc8391c14aeec4d1f84c2f2bea01eb4b39f9176120481c86280e |
#!/usr/bin/env python2
#
# Copyright (c) 2013 Insollo Entertainment, LLC. All rights reserved.
#
# 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 li... | gridmq/gridmq | man/diag.py | Python | mit | 10,294 | [
"VisIt"
] | 0ea76c1554d66592dd89af83eb177027354f1bdefad87edc91df4694cbeb1864 |
# This file is part of cclib (http://cclib.sf.net), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2007, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Public version 2.1 or later. You shou... | Clyde-fare/cclib_bak | src/cclib/parser/molproparser.py | Python | lgpl-2.1 | 30,274 | [
"GAMESS",
"Gaussian",
"Molpro",
"cclib"
] | 7d181f978d35a66aa754db6886ed72c40b017415b59f742aa841b85bf47fa79c |
# Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | mkuron/espresso | doc/tutorials/07-electrokinetics/scripts/eof_electrokinetics.py | Python | gpl-3.0 | 4,100 | [
"ESPResSo"
] | 785a82bcc288b1217a1c9f0ad7f749812e107b4bf20ee30e56627419f3cbd032 |
# Databricks notebook source
# MAGIC %md
# MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html)
# MAGIC
# MAGIC This is a 2019-2021 augmentation and update of [Adam Breindel](https://www.linkedin.com/in/adbreind)'s initial ... | lamastex/scalable-data-science | dbcArchives/2021/000_6-sds-3-x-dl/051_DLbyABr_02-Neural-Networks.py | Python | unlicense | 27,220 | [
"NEURON"
] | 8981781cb2b591ba783b682e08fb3a72aa72bd83fce90343bb2c879435eb3165 |
# coding: utf-8
import logging
import math
import os
import subprocess
import tempfile
import time
import numpy as np
from monty.dev import requires
from monty.json import jsanitize, MSONable
from monty.os import cd
from monty.os.path import which
from scipy import constants
from scipy.spatial import distance
from ... | dongsenfo/pymatgen | pymatgen/electronic_structure/boltztrap.py | Python | mit | 107,508 | [
"BoltzTrap",
"VASP",
"pymatgen"
] | 57ca1189b76591f28e6320f8f26ef092630be15f00fc52cfa15cdd9b88c47ad2 |
__author__ = "Sunil Kumar (kumar.sunil.p@gmail.com)"
__copyright__ = "Copyright 2014, Washington University in St. Louis"
__credits__ = ["Sunil Kumar", "Steve Pieper", "Dan Marcus"]
__license__ = "XNAT Software License Agreement " + \
"(see: http://xnat.org/about/license.php)"
__version__ = "2.1.1"
__main... | MokaCreativeLLC/XNATSlicer | XNATSlicer/XnatSlicerLib/utils/SessionManager.py | Python | bsd-3-clause | 4,595 | [
"VTK"
] | f54b9705dc4282f83d1e0318973a62af636602bd1c1ca265a59e32e7a1d10923 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source <http://www.async.com.br>
## 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 Foundati... | andrebellafronte/stoq | stoqlib/gui/test/test_categorysearch.py | Python | gpl-2.0 | 1,779 | [
"VisIt"
] | fd8bbdcc574b596ce05031944bbccbac1ef68ae426e2b22196a513132a145ec9 |
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This script is intended for use as a GYP_GENERATOR. It takes as input (by way of
the generator flag config_path) the path of a json file that dictates the file... | FelixZYY/gyp | pylib/gyp/generator/analyzer.py | Python | bsd-3-clause | 13,933 | [
"VisIt"
] | 8cf2b8ff7bc4a6cadb14518249ab0ab391618fbea47db6d87a13a76143b9b64a |
import pysam
import sys
from collections import defaultdict
orientations = defaultdict(int)
with pysam.AlignmentFile(sys.argv[1]) as bam:
for i, rec in enumerate(bam):
if rec.is_paired and rec.is_proper_pair and rec.reference_id == rec.next_reference_id:
strand = "R" if rec.is_reverse else "F"... | PROSIC/libprosic | playground/check-read-orientation.py | Python | gpl-3.0 | 814 | [
"pysam"
] | e3d5a9271c644c163994d2046e0420a24d254e56cb29baa979199d0203fd83e6 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | modules/tensor_mechanics/doc/tests/beam_cosserat.py | Python | lgpl-2.1 | 4,962 | [
"MOOSE"
] | 9a4440b18377b10ecfddc7e3855d06edf15ab8353efc0ebc8c0904acfc48e5ab |
# 10/24/2013 Sebastian Raschka
# HydroBond
# PyMOL Plugin for visualization of hydrogen bonds between protein and ligand.
import tkSimpleDialog,tkFileDialog
import tkMessageBox
from pymol import cmd
import sys
def __init__(self):
self.menuBar.addmenuitem('Plugin', 'command',
'HydroBon... | rasbt/BondPack | src/HydroBond.py | Python | gpl-3.0 | 1,588 | [
"PyMOL"
] | 26d7cd34439a989705dd785351007f536b67ff0ac4bdbc3162c24f220b2ac23f |
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2011-2014, 2017 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-2020 Cla... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/pylint/pylint/checkers/variables.py | Python | mit | 83,499 | [
"VisIt"
] | 6765080c63ed5be9e2871abfeac9b891f885f938696b420c1b2fc93fad54d286 |
#
# Copyright (c) 2008--2018 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | shastah/spacewalk | backend/server/rhnChannel.py | Python | gpl-2.0 | 70,972 | [
"VisIt"
] | 5118594c40b1a1b5d9d7365ccdf63b56847fb63418c7771a4416eb7c08be9416 |
from __future__ import unicode_literals
import datetime
import requests
from six.moves.urllib.parse import parse_qs, urlencode
from oauthlib.oauth1 import SIGNATURE_HMAC, SIGNATURE_RSA, SIGNATURE_TYPE_AUTH_HEADER
from requests_oauthlib import OAuth1, OAuth2, OAuth2Session
from .constants import (
ACCESS_TOKEN_UR... | freakboy3742/pyxero | xero/auth.py | Python | bsd-3-clause | 23,846 | [
"VisIt"
] | 732d0d8b9d8d37de07270d340cb66eec5a5512b79fcdaaf8043ae2d020ff6f02 |
"""
bpz: Bayesian Photo-Z estimation
Reference: Benitez 2000, ApJ, 536, p.571
Usage:
python bpz.py catalog.cat
Needs a catalog.columns file which describes the contents of catalog.cat
"""
from __future__ import print_function
from __future__ import division
from builtins import str
from builtins import ... | boada/planckClusters | MOSAICpipe/bpz-1.99.3/bpz.py | Python | mit | 52,171 | [
"Galaxy",
"Gaussian"
] | d945d9addff2a74caf50413042a561f855e57b39b69c8395c6352fabe32a23b0 |
__author__ = 'chris'
import pkg_resources # part of setuptools
import argparse
from pythomics.proteomics import config
version = pkg_resources.require('pyquant-ms')[0].version
description = """
This will quantify labeled peaks (such as SILAC) in ms1 spectra. It relies solely on the distance between peaks,
which can... | pandeylab/pyquant | pyquant/__init__.py | Python | mit | 14,839 | [
"Gaussian"
] | 2ee38c173c9aad2cb41326e12423029f3e2356a8ff58fad2599a2914d82bad33 |
"""
Physical units and dimensions.
The base class is Unit, where all here defined units (~200) inherit from.
"""
from sympy import Rational, pi
from sympy.core.basic import Basic, Atom
class Unit(Atom):
"""
Base class for all physical units.
Create own units like:
m = Unit("meter", "m")
"""
... | hazelnusse/sympy-old | sympy/physics/units.py | Python | bsd-3-clause | 5,011 | [
"Avogadro"
] | 881ed2267d51a74eca85ca354c2690808928db74b185187581e266daac765d87 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, The WGS-HGT Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------... | qiyunzhu/horizomer | horizomer/misc/distance-method/distance_method.py | Python | bsd-3-clause | 46,229 | [
"BLAST"
] | ba9045193e76f6c8d3727bef1007ca2efa7657289dbe4402f6f73fa0b035118a |
# -*- coding: utf-8 -*-
"""
Microsoft translator API
The Microsoft Translator services can be used in web or client
applications to perform language translation operations. The services
support users who are not familiar with the default language of a page or
application, or those desiring to commu... | Akoten/Microsoft-Translator-Python-API | setup.py | Python | bsd-3-clause | 2,436 | [
"VisIt"
] | 79b3b562da73892f894a0308a0a9c3e1f264f6756441b1c926f046921d1afb4b |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | alejob/mdanalysis | package/MDAnalysis/analysis/waterdynamics.py | Python | gpl-2.0 | 44,292 | [
"MDAnalysis"
] | 4c9842b0c8355f555882e5aa890961976071ef0d28c3f88c5e3d1b94b1d717c6 |
# Orca
# Copyright (C) 2014-2015 Synthicity, LLC
# Copyright (C) 2015 Autodesk
# See full license in LICENSE.
import pandas as pd
import pytest
from .. import testing
def test_frames_equal_not_frames():
frame = pd.DataFrame({'a': [1]})
with pytest.raises(AssertionError) as info:
testing.assert_frame... | SANDAG/orca | orca/utils/tests/test_testing.py | Python | bsd-3-clause | 2,290 | [
"ORCA"
] | 872f50228c2cfb76bb75ceb49ff718d27b937946c2f502c0cc9239736ee653cc |
from ase.optimize.sciopt import Converged, SciPyOptimizer
from ase.optimize import Optimizer
class SciPyFminLBFGSB(SciPyOptimizer):
"""Quasi-Newton method (Broydon-Fletcher-Goldfarb-Shanno)"""
def call_fmin(self, fmax, steps):
output = opt.fmin_bfgs(self.f,
self.x0(),
... | alexei-matveev/ase-local | ase/optimize/for_lbfgsb.py | Python | gpl-2.0 | 859 | [
"ASE"
] | ce2a1a4ee3079751b18f66bddeaa801a8bdde5f6e313d53be41001b809a1071b |
"""
Support for the Amazon Polly text to speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts.amazon_polly/
"""
import logging
import voluptuous as vol
from homeassistant.components.tts import Provider, PLATFORM_SCHEMA
import homeassista... | tinloaf/home-assistant | homeassistant/components/tts/amazon_polly.py | Python | apache-2.0 | 6,759 | [
"Brian"
] | f68dc4639f74022938a41a51277bd66b6f6b9af0b782f5ff90aa040d51f24525 |
"""
This module can be used to randomize for example galaxy positions.
:depends: NumPy
:author: Sami-Matias Niemi
:date: 21 May, 2011
:version: 0.1
"""
import numpy as np
__author__ = 'Sami-Matias Niemi'
def randomUnitSphere(points=1):
"""
This function returns random positions on a unit sphere. The numbe... | sniemi/SamPy | astronomy/randomizers.py | Python | bsd-2-clause | 1,064 | [
"Galaxy"
] | 43bc37de3fdebe6eec70f8e85ec3aea3fb6b4f260d978d21ac323947a3053a45 |
""" This is a test of the chain
ReqClient -> ReqManagerHandler -> ReqDB
It supposes that the DB is present, and that the service is running
"""
# pylint: disable=invalid-name,wrong-import-position
from __future__ import print_function
import unittest
import sys
from DIRAC.Core.Base.Script import parseComma... | fstagni/DIRAC | tests/Integration/RequestManagementSystem/Test_Client_Req.py | Python | gpl-3.0 | 6,366 | [
"DIRAC"
] | d18c29b4ad3beb7f467c70153dc45e3b73524fb0c098e0c0c719773fc78bc652 |
#!/usr/bin/env python3
import sys
import os
import filecmp
import unittest
from farm_blast import blast
modules_dir = os.path.dirname(os.path.abspath(blast.__file__))
data_dir = os.path.join(modules_dir, 'tests', 'data')
class TestBlast(unittest.TestCase):
def test_check_blast_type(self):
'''Check dies i... | sanger-pathogens/Farm_blast | farm_blast/tests/blast_test.py | Python | gpl-3.0 | 7,401 | [
"BLAST"
] | 220975c7e03688df5a0a6cbb32bf9ac3a2cd5e36cb623143c2262e9be364d145 |
#!/usr/bin/python
import sys
import numpy as np
import pysam
from collections import Counter
import vcf
from vcf.parser import _Info as VcfInfo
input=sys.argv[1].split("/")[-1]
input=input.split(".")[0]
bam=sys.argv[2].split(".")[0]
bam=bam.split("/")[-1]
#print(input)
#Ensure the bam and csv file match
#if input=... | lauringlab/Benchmarking_paper | scripts/mapq_vcf.py | Python | mit | 2,777 | [
"pysam"
] | b8b2ee8e187a0279b7df5a10eaf98a79655d45708fd6f92d7618b2542e64b05b |
"""
Migration script to update the deferred job parameters for liftover transfer jobs.
"""
import datetime
import logging, sys
from galaxy.model.custom_types import JSONType
from galaxy.util.bunch import Bunch
from sqlalchemy import *
from sqlalchemy import Integer, Table, MetaData, Column
from sqlalchemy.orm import *... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/model/migrate/versions/0104_update_genome_downloader_job_parameters.py | Python | gpl-3.0 | 2,861 | [
"Galaxy"
] | 1e1fa8493bc8ca4a77f2e151b6c98322aa7f2803f919f4ffcc9f3a81cef97196 |
"""Support for Konnected devices."""
import asyncio
import hmac
import json
import logging
import voluptuous as vol
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.web import Request, Response
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.components.discovery import ... | Cinntax/home-assistant | homeassistant/components/konnected/__init__.py | Python | apache-2.0 | 19,557 | [
"VisIt"
] | 8742458de6c495245c9364c92103ecdb3b27e60f75530d2c22515db94d6f7896 |
#!/usr/bin/env python
import os
import sys
from setuptools import setup
from setuptools.extension import Extension
from setuptools.command.test import test as TestCommand
import numpy
# Get __version__ from version.py without importing package itself.
with open('cubefit/version.py') as f:
exec(f.read())
fname =... | kbarbary/cubefit | setup.py | Python | mit | 1,829 | [
"Galaxy"
] | a34644706419700824a10142c8731a6ff6e355ca20da01fd32fdfff43452c31b |
"""
Course Outline page in Studio.
"""
import datetime
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from ..common.utils import click_css, confirm_prompt
from .course_page import ... | doismellburning/edx-platform | common/test/acceptance/pages/studio/overview.py | Python | agpl-3.0 | 27,128 | [
"VisIt"
] | 026f87d5ab596b77bea4067a7d8c5c6c5bef39796b6b26d0d1d9670778856c58 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Stephane Charette
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the ter... | SNoiraud/gramps | gramps/plugins/tool/removeunused.py | Python | gpl-2.0 | 19,993 | [
"Brian"
] | 41b7e01986440e779c37c953c3a48262985842c48cefcd10e142620f420baddf |
# This file is part of xrayutilities.
#
# xrayutilities 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.
#
# This program is distributed... | dkriegner/xrayutilities | tests/test_simpack_powdermodel.py | Python | gpl-2.0 | 6,195 | [
"CRYSTAL"
] | be88d893adff66c6fed161339852ea838ee451c59bdc31ce07157a71d5a61a51 |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string, optparse, subprocess
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['name','version','moduleid','desc... | hiroara/TiTestFairy | build.py | Python | mit | 8,785 | [
"VisIt"
] | 05adce732cc60e266d994245967437efc2da87f5367e7b2b84dcd0815a4189db |
#!/usr/bin/env python
import os, time, re
from functools import partial
from flask import Flask, Module, url_for, render_template, request, session, redirect, g, make_response, current_app
from decorators import login_required, guest_or_login_required, with_lock
from decorators import global_lock
# Make flask use the o... | bollu/sagenb | sagenb/flask_version/base.py | Python | gpl-3.0 | 18,811 | [
"Jmol"
] | 971c455568624e822c10439ec00ab3d5558a1c82500e91f39666c83c38eb875c |
# -*- coding: utf-8 -*-
from math import sqrt
import numpy as np
from ase.neb import fit0
def NudgedElasticBand(images):
N = images.repeat.prod()
natoms = images.natoms // N
R = images.P[:, :natoms]
E = images.E
F = images.F[:, :natoms]
s, E, Sfit, Efit, lines = fit0(E, F, R)
import pyl... | grhawk/ASE | tools/ase/gui/neb.py | Python | gpl-2.0 | 687 | [
"ASE"
] | b7e25efc2ab7bc0d10ead311bc4f68291381c2e4d0fffc04fd83339843d743fd |
# proxy module
from __future__ import absolute_import
from mayavi.modules.outline import *
| enthought/etsproxy | enthought/mayavi/modules/outline.py | Python | bsd-3-clause | 91 | [
"Mayavi"
] | c32f2dc88fc9768e931c2e0d7e510ecadaac7f34b185804ef782f3a6e95b6ffe |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id: netcdf.py 33793 2016-03-26 13:02:07Z goatbar $
#
# Project: GDAL/OGR Test Suite
# Purpose: Test NetCDF driver support.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
##############... | nextgis-extra/tests | lib_gdal/gdrivers/netcdf.py | Python | gpl-2.0 | 97,818 | [
"Gaussian",
"NetCDF"
] | 23f9942bad9b1c849bd0717f32fdb57f0e81c96dd1a32054908751c6068efd29 |
"""
Gaussian Mixture Models.
This implementation corresponds to frequentist (non-Bayesian) formulation
of Gaussian Mixture Models.
"""
# Author: Ron Weiss <ronweiss@gmail.com>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Bertrand Thirion <bertrand.thirion@inria.fr>
import numpy as np
from ..base... | florian-f/sklearn | sklearn/mixture/gmm.py | Python | bsd-3-clause | 26,975 | [
"Gaussian"
] | 7df36cfe3f86fb38f5c3aabe67dd77c758a58658070a2220572c16f2b34012cf |
import deepchem as dc
import numpy as np
import unittest
import pytest
import tempfile
from flaky import flaky
try:
import tensorflow as tf
from tensorflow.keras.layers import Input, Concatenate, Dense
class ExampleGAN(dc.models.GAN):
def get_noise_input_shape(self):
return (2,)
def get_data_inp... | peastman/deepchem | deepchem/models/tests/test_gan.py | Python | mit | 8,693 | [
"Gaussian"
] | 774be68acee9ee03b6da80f7d768cf8c848b5720b44f6df7863e8e117f43b338 |
# By Jay Ravaliya
# Imports
from twython import Twython
from secret import consumer_key, consumer_secret, access_token, access_secret
from model import Posted, db
import requests
import json
import datetime
import random
import math
import sys
# Set up Twitter keys
twitter = Twython(consumer_key, consumer_secret, acce... | jayrav13/njit-events-api | dev_bot.py | Python | mit | 3,984 | [
"VisIt"
] | 71461e47d03279c29d9f37546224e8488e9b27ecdc9a578661fd041422c35b60 |
#!/usr/bin/python
"""
# Created on Aug 12, 2016
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23
#
# module_check: not supported
#
# 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 publ... | e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_api_session.py | Python | bsd-3-clause | 8,381 | [
"VisIt"
] | cc9c25c1d1fd0029cba318b65588e234de4b6314071e63b17c472c5937487d6c |
"""
Handling the download of the shifter Proxy
"""
import os
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities.File import mkDir
from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.Configuration... | DIRACGrid/DIRAC | src/DIRAC/Core/Utilities/Shifter.py | Python | gpl-3.0 | 2,643 | [
"DIRAC"
] | 40ea4f544229a6ee0f29ac76363faadc087d49edabc8de1b6354654de8f03b86 |
# -*- coding: utf-8 -*-
try:
import unittest2 as unittest
except ImportError:
import unittest
import functools
import os
import six
import xml.dom
import xml4h
class TestBuilderMethods(unittest.TestCase):
def test_create_minidom(self):
xmlb = xml4h.build('DocRoot', adapter=xml4h.XmlDomImplAdapt... | jmurty/xml4h | tests/test_builder.py | Python | mit | 31,336 | [
"Brian"
] | ed73a0357577fa54027e00a553498b888ae9efdb2a21bfbd22492cc529e7e0d6 |
# Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google-research/cryptanalytic-model-extraction | src/sign_recovery.py | Python | apache-2.0 | 42,098 | [
"NEURON"
] | 9a07bc78e50dc31d44d188510273e5bae8c20de2ec3282256f5f8a4ebbfe170f |
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from mock import Mock, patch
from nose.tools import eq_, raises
from djfactory.manage import validate_settings
from djfactory.settings_base import (get_apps, get_middleware,
get_template_context_processors)
@patch.object(se... | hfeeki/djfactory | tests/test_settings.py | Python | bsd-3-clause | 3,830 | [
"MOE"
] | 81d783cc00b0333363d71de496caacf69754c149c00fd2379466b6fc56ccd13c |
import os
import unittest
from pymatgen.core import Molecule, Structure
from megnet.data.local_env import (AllAtomPairs, MinimumDistanceNNAll,
deserialize, get, serialize)
MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
def _equal(x, y):
if isinstance(x, list):
... | materialsvirtuallab/megnet | megnet/data/tests/test_local_env.py | Python | bsd-3-clause | 2,142 | [
"pymatgen"
] | 05ec3e8b7adaa15eec66f4ce953b8376cf34c0fe238d3c103e169382358401d9 |
# -*- coding: utf-8 -*-
#
# IRCrypt: Addon for IRCrypt to enable key exchange via public key authentication
# ===============================================================================
#
# Copyright (C) 2013-2014
# Lars Kiesow <lkiesow@uos.de>
# Sven Haardiek <sven@haardiek.de>
#
# This program is free sof... | IRCrypt/ircrypt-weechat | ircrypt-keyex.py | Python | gpl-3.0 | 34,597 | [
"VisIt"
] | 1a87f02a7288ea0cacd5299c6e0a76525c3ba77416de219fb09a57fd5af6f6dc |
# Hidden Markov Models
#
# Author: Ron Weiss <ronweiss@gmail.com>
# and Shiqiao Du <lucidfrontier.45@gmail.com>
# API changes: Jaques Grobler <jaquesgrobler@gmail.com>
# Modifications to create of the HMMLearn module: Gael Varoquaux
"""
The :mod:`hmmlearn.hmm` module implements hidden Markov models.
"""
import string... | mvictor212/hmmlearn | hmmlearn/hmmspark.py | Python | bsd-3-clause | 81,101 | [
"Gaussian"
] | 65a3faef7d7bbd7896b3536954d378cef1fae80ffbeb1ea6b60cbde949fdd318 |
from .algo_utils import XYZVelocity, MovingPixel, SimpleXYZVelocity, Velocity
import random
class FireFly(object):
def __init__(self, display, location, rgb_color, velocity, tail_len):
assert isinstance(velocity, XYZVelocity)
assert len(location) == 3
assert len(rgb_color) == 3
as... | stuart-stanley/stormlight-archive | src/algos/firefly.py | Python | apache-2.0 | 2,706 | [
"Firefly"
] | 9b43597a58ef78624915baee6541afc5e8540b67f0bea77a914a246c218af5f3 |
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 04 14:44:15 2017
@author: DanielM
"""
import unittest
class TestNeuron(unittest.TestCase):
"""
Imports a test neuron as specified by ouropy.tests.testneuron
and the parameters in ouropy/tests/testneuronparams.txt
The tests check that all parameters were... | danielmuellernai/ouropy | tests/genneuron_test.py | Python | mit | 2,037 | [
"NEURON"
] | 9db17498b10a88d1834fad62541825c1cba283a5a2ab15fcafc4e6cb7bda3494 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | arunkgupta/gramps | gramps/plugins/tool/soundgen.py | Python | gpl-2.0 | 4,204 | [
"Brian"
] | a278494bd7fca06bd30c9789a9691c2025e06c2a6e401b52eef67c3e63d5cb76 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes that operate on points or vectors in 3D space.
"""
import re
import string
import warnings
from math import cos, pi, sin, sqrt
import numpy as np
from monty.json import MSONab... | gmatteo/pymatgen | pymatgen/core/operations.py | Python | mit | 21,863 | [
"CRYSTAL",
"pymatgen"
] | d9069e8d517374ff92304f9934f2687fa6cbffe17c43d22146d368462ea93c8c |
"""
Normalizing flows for transforming probability distributions.
"""
import numpy as np
import logging
from typing import List, Iterable, Optional, Tuple, Sequence, Any, Callable
import tensorflow as tf
from tensorflow.keras.layers import Lambda
import deepchem as dc
from deepchem.models.losses import Loss
from dee... | lilleswing/deepchem | deepchem/models/normalizing_flows.py | Python | mit | 10,502 | [
"Gaussian"
] | 9110c50a451ab414602406ea429049d93836e7aec64dfff261d9900d2f766343 |
# (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... | QuLogic/iris | lib/iris/config.py | Python | gpl-3.0 | 7,891 | [
"NetCDF"
] | 904d3b635f9fa9bce908a98f3392f4913a89e99372a2546bc7388d0b4febb968 |
"""
Testing for the forest module (sklearn.ensemble.forest).
"""
# Authors: Gilles Louppe,
# Brian Holt,
# Andreas Mueller,
# Arnaud Joly
# License: BSD 3 clause
import pickle
import math
from collections import defaultdict
import itertools
from itertools import combinations
from itertools ... | lesteve/scikit-learn | sklearn/ensemble/tests/test_forest.py | Python | bsd-3-clause | 51,281 | [
"Brian"
] | 6de5a6c94b94e84734165a706c0852d2004e12e59de3f51342ed67f6990b37c8 |
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, too-many-arguments, bad-whitespace
# pylint: disable=too-many-lines, too-many-locals, len-as-condition
# pylint: disable=import-outside-toplevel
"""Copyright 2015 Roger R Labbe Jr.
FilterPy library.
http://github.com/rlabbe/filterpy
Documentation at:
https://fi... | rlabbe/filterpy | filterpy/stats/stats.py | Python | mit | 32,181 | [
"Gaussian"
] | 576b407938a36b7292f862cf414527e1adc8419d19241f529b6ec2942f31f374 |
#!/usr/bin/env python
import shutil
import tempfile
import configparser
from textwrap import dedent
import tarfile
import pyaml
import hashlib
import os
import re
import bs4
import urllib
from urllib import request
from urllib import parse
from urllib import error
from collections import OrderedDict
import logging
imp... | yesimon/bioconda-recipes | scripts/bioconductor/bioconductor_skeleton.py | Python | mit | 16,419 | [
"Bioconductor"
] | 71ee474cea4956a31fd273ec0e97fd0a1cf2c725ef26760a3630775ef3143f6a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.