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 director import lcmUtils
from director import objectmodel as om
from director import visualization as vis
from director.utime import getUtime
from director import transformUtils
from director.debugVis import DebugData
from director import ioUtils
from director import robotstate
from director import applogic as app... | patmarion/director | src/python/director/footstepsdriver.py | Python | bsd-3-clause | 48,845 | [
"VTK"
] | d23f21a83a3fe3d6cb4e0c0b057dfd5e2f3fe9575d325a38cb46e403de8d578c |
#!/usr/bin/env python
"""
Mark datasets as deleted that are older than specified cutoff
and (optionaly) with a tool_id that matches the specified search
string.
This script is useful for administrators to cleanup after users who
leave many old datasets around. It was modeled after the cleanup_datasets.py
script origi... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/scripts/cleanup_datasets/admin_cleanup_datasets.py | Python | gpl-3.0 | 11,489 | [
"Galaxy"
] | 1f344834e832fe12e76d05d33556eec751b0f3068b66b388d71749aa54cd148c |
# MIT License
#
# Copyright (c) 2017, Stefan Webb. 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 limitation the rights
# to us... | stefanwebb/tensorflow-models | tensorflow_models/models/vae_concrete.py | Python | mit | 8,601 | [
"Gaussian"
] | 09bb9ff74d0ae2857ad0bba2b092d7c0cc55f532ec2627d346f3cd275ce59e59 |
# -*- coding: utf-8 -*-
import os
from tempfile import NamedTemporaryFile
from subprocess import call
from django.conf import settings
from django.db.models.expressions import F
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.template import RequestContext
from django.shortcuts import re... | ierror/BeautifulMind.io | beautifulmind/mindmap/views.py | Python | bsd-3-clause | 6,951 | [
"VisIt"
] | 8dd306cef8086c6d9ccbc89b1b5e2bdb472412ba5b45cc6e2471cb5705e4fb4a |
#!/usr/bin/env python
"Check binaries configuration"
#
# Copyright (C) 2012-2017 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#
from __future__ import unicode_lite... | jmbeuken/abinit | abichecks/scripts/check-binaries-conf.py | Python | gpl-3.0 | 4,005 | [
"ABINIT",
"NetCDF",
"Wannier90"
] | a8e7cdf5e4af76070db482b1114a70500a6dfef7716d093e40daf4232616d96c |
# -*- coding: utf-8 -*-
"""
Created on 26 Sep 2012
@author: Éric Piel
Copyright © 2012-2021 Éric Piel, Philip Winkler, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License version 2 as published by the Free Software
F... | pieleric/odemis | src/odemis/gui/cont/streams.py | Python | gpl-2.0 | 149,861 | [
"Gaussian"
] | cc876a650d22762f22360b648e65125be1fe4fc1b6aa66ef239edc0c753bf590 |
"""cdbfunctions.py
Developer: Noelle Todd
Last Updated: August 30, 2014
This module consists of functions which will be called by the user
interface, in order to insert, delete, update, etc. data in the database.
This module is still in its early testing stages; many more functions will
be added or edited in the foll... | ChristinaHammer/Client_Database | cdbfunctions.py | Python | mit | 9,981 | [
"VisIt"
] | 1ef9c3a19446f0f1b5ef2642763e1e3460fc6bbc602ac9bc337b930751ac0505 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/scf/uhf_symm.py | Python | apache-2.0 | 22,155 | [
"PySCF"
] | d5e89c1f3ca6b570f374d217cd48059283d98d601cc13a7b6b30d4a9b07be79d |
#!/usr/bin/env python2
# Make.py tool for managing packages and their auxiliary libs,
# auto-editing machine Makefiles, and building LAMMPS
# Syntax: Make.py -h (for help)
# Notes: should be compatible with python 2.7 and 3.x thanks to 'futurize'
from __future__ import print_function
from builtins import str
from b... | SGenheden/lammps | src/Make.py | Python | gpl-2.0 | 81,008 | [
"LAMMPS"
] | 1b1f84dc754a5c44479f57b90d9ad8b871434115bb5634a2ffd0a6d83935f2e5 |
#!/usr/bin/env vpython3
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for generate_buildbot_json.py."""
import argparse
import contextlib
import json
import os
import unittest
import generate_... | ric2b/Vivaldi-browser | chromium/testing/buildbot/generate_buildbot_json_unittest.py | Python | bsd-3-clause | 167,293 | [
"Octopus"
] | a084c9644fa0b5059013b28ece08f109604d3ff8f01a83f7c741b2e6d5732f17 |
# -*- coding: utf-8 -*-
# Copyright 2012 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 tempfile
import time
import re
import sys
from contextlib import contextmanager
from selenium.common.exceptions import NoSuchEle... | ritashugisha/OmniTube | splinter/driver/webdriver/__init__.py | Python | gpl-3.0 | 16,005 | [
"VisIt"
] | 696c2449eebb7bceba7f3fc2862de4c557d90021647b230345d5e25cda0232d0 |
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-astng.
#
# logilab-astng is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as publis... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/logilab/astng/utils.py | Python | agpl-3.0 | 8,288 | [
"VisIt"
] | dac35e4f268f290898f2911df333c93c2ed5df71850b767ffcd403662ea94f81 |
"""
Records who we trust to sign feeds.
Trust is divided up into domains, so that it is possible to trust a key
in some cases and not others.
@var trust_db: Singleton trust database instance.
"""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall i... | dsqmoore/0install | zeroinstall/injector/trust.py | Python | lgpl-2.1 | 9,078 | [
"VisIt"
] | 87b6d69104c45e17a29e57a5b639d0ec1c1f338e853c0e15b5d45a7e230f633b |
#!/usr/bin/env python
# CREATED:2013-03-08 15:25:18 by Brian McFee <brm2132@columbia.edu>
# unit tests for librosa core (__init__.py)
#
# Run me as follows:
# cd tests/
# nosetests -v --with-coverage --cover-package=librosa
#
from __future__ import print_function
# Disable cache
import os
try:
os.environ.pop(... | decebel/librosa | tests/test_core.py | Python | isc | 17,600 | [
"Brian"
] | 06bf42bf829f458bda3ba2bb2ff908937227c142cb87f9df7295e236399c50b1 |
# -*- coding: utf-8 -*-
"""Test parsing metadata from a BEL script."""
import logging
import os
import re
import unittest
from pathlib import Path
from bel_resources.constants import ANNOTATION_URL_FMT, NAMESPACE_URL_FMT
from pybel.exceptions import (
InvalidMetadataException,
RedefinedAnnotationError,
... | pybel/pybel | tests/test_parse/test_parse_metadata.py | Python | mit | 8,562 | [
"Pybel"
] | 9fed1f792ace5ffc0afcc9d7064d317d477b378e6acb6c893683b837cb26095a |
#!/usr/bin/env python
# This example creates a polygonal model of a cone, and then renders
# it to the screen. It also defines an interaction style by creating a
# set of Command/Observers. (Note: it is far more efficient to create
# new styles by subclassing vtkInteractorStyle. This is just an
# illustrative example.... | naucoin/VTKSlicerWidgets | Examples/GUI/Python/CustomInteraction.py | Python | bsd-3-clause | 7,029 | [
"VTK"
] | 039cf6e476cabf0af30e6758a93366c2551e9f45d307b88aecf9e0b052a4613e |
#
# 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/src/bigdl/orca/learn/tf/utils.py | Python | apache-2.0 | 2,427 | [
"ORCA"
] | 57f65ea94a1a083e99958cf9e74a331db83f9cd67f3f24735f4dfd592c102a9f |
from distutils.version import LooseVersion
import pytest
from cfme.utils.log import logger
from cfme.utils.providers import ProviderFilter, list_providers
from markers.env import EnvironmentMarker
from cfme.utils.pytest_shortcuts import fixture_filter
ONE = 'one'
ALL = 'all'
LATEST = 'latest'
ONE_PER_VERSION = 'one... | quarckster/cfme_tests | markers/env_markers/provider.py | Python | gpl-2.0 | 8,442 | [
"VisIt"
] | 18dc1c99355765731f713be82bcdde7a2f6a869e1d49d1049081e8152cde0eeb |
import sys,os,unittest
from lammps import PyLammps
class PythonPyLammps(unittest.TestCase):
def setUp(self):
machine = None
if 'LAMMPS_MACHINE_NAME' in os.environ:
machine=os.environ['LAMMPS_MACHINE_NAME']
self.pylmp = PyLammps(name=machine, cmdargs=['-nocite', '-log','none', '... | rbberger/lammps | unittest/python/python-pylammps.py | Python | gpl-2.0 | 3,321 | [
"LAMMPS"
] | 856d435571a90704307264490276a8e0649b914f77a0cb961e3b224a630f1349 |
import pytest
from utils import *
from addons import *
import qcdb
#! A test of the basis specification. Various basis sets are specified outright and in blocks, both
#! orbital and auxiliary. Constructs libmints BasisSet objects through the constructor that calls
#! qcdb.BasisSet infrastructure. Checks that the res... | CDSherrill/psi4 | psi4/driver/qcdb/pytest/test_mints9_basisset.py | Python | lgpl-3.0 | 19,482 | [
"Psi4"
] | d52226c13e7d985feeb2a676b80506ac219a02dfb90b0c157f96e88d0a408295 |
# $Id$
#
# Copyright (C) 2007 Greg Landrum
# @@ 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.
#
import sys
from rdkit import Chem
class FastSDMolSuppli... | soerendip42/rdkit | rdkit/Chem/FastSDMolSupplier.py | Python | bsd-3-clause | 2,188 | [
"RDKit"
] | a6a6ed36fc3d883db744c8fbb243a10a848f6c8a978535a9980605826ead8ccb |
"""
This file is part fo Kukkaisvoima. Kukkaisvoima a lightweight weblog
system.
Copyright (C) 2006-2008 Petteri Klemola
This is config file. Kukkaisvoima's license don't affect this file.
You should keep this file private and see that this in not readable
from public web. For example when using Apache webserver cr... | druss316/G-Harvestor | kukkaisvoima_settings.py | Python | gpl-3.0 | 2,518 | [
"Galaxy"
] | 431e79c90f5987f4f644e38e01834e8d7aad9e6cba98915fc7aa7be4a9bf028f |
#!/usr/bin/env python
# pylint: disable=C0116,W0613
# This program is dedicated to the public domain under the CC0 license.
"""
First, a few callback functions are defined. Then, those functions are passed to
the Dispatcher and registered at their respective places.
Then, the bot is started and runs until we press Ctr... | leandrotoledo/python-telegram-bot | examples/conversationbot.py | Python | lgpl-3.0 | 5,628 | [
"VisIt"
] | 14db3cd8af331a1093a72be27eca0060aed960d3846c4057cb7a8897a0b71123 |
# -*- coding: utf-8 -*-
"""
Connected components and strongly connected components.
"""
__authors__ = """Eben Kenah\nAric Hagberg (hagberg@lanl.gov)"""
# Copyright (C) 2004-2008 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.... | JaneliaSciComp/Neuroptikon | Source/lib/CrossPlatform/networkx/algorithms/traversal/component.py | Python | bsd-3-clause | 8,180 | [
"VisIt"
] | 8d5e0facac2c5ceb215fc33e9917efa2966fa3cc74095278c351fb61ebfb91e2 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/epgnext.py | Python | gpl-2.0 | 7,522 | [
"VisIt"
] | b476788a6d0a8eaec6407ae45d7794616c4b8b0285ddb6d2941b95db94075d7c |
##############################################################################
# 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... | TheTimmy/spack | var/spack/repos/builtin/packages/texinfo/package.py | Python | lgpl-2.1 | 1,972 | [
"Brian"
] | 34f3e043359405f6abb8694ec8aad96092c962366ff41ffe35893854f473e255 |
#!/usr/bin/env python
__author__ = 'Mike McCann'
__copyright__ = '2012'
__license__ = 'GPL v3'
__contact__ = 'mccann at mbari.org'
__doc__ = '''
Master loader for all September 2012 CANON activities.
Mike McCann
MBARI 6 September AUgust 2012
@var __date__: Date of last svn commit
@undocumented: __doc__ pars... | stoqs/stoqs | stoqs/loaders/CANON/loadCANON_september2012.py | Python | gpl-3.0 | 12,539 | [
"NetCDF"
] | 3f1b597f7249ba15a9d5a6240999417e0ec069a765d959d5b70af029a06b398d |
# coding=utf-8
# Copyright 2022 The Uncertainty Baselines 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 ap... | google/uncertainty-baselines | baselines/diabetic_retinopathy_detection/batchensemble_utils.py | Python | apache-2.0 | 8,070 | [
"VisIt"
] | 9d8293673418dcecadccbd1aa7455fbe31b59a1f967192d6833cee4cc1774801 |
#!/bin/env python
'''
Author: Alex Walter Date: March 18, 2014
Based on Danica Marsden's earlier code
Reads in a wavelength calibration file (blue, red and IR laser light
) that has a beam map solution, and makes a histogram of photon phase
amplitudes for each pixel. Bad pixels are flagged. Ga... | bmazin/ARCONS-pipeline | wavelengthcal/waveCal.py | Python | gpl-2.0 | 67,956 | [
"Gaussian"
] | cba22d678c46c98f1ace37ad3db1fb2e5f0b58f6bb2ff92d7933aa630462c3eb |
"""Payload management for sending Ansible files and test content to other systems (VMs, containers)."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import atexit
import os
import stat
import tarfile
import tempfile
import time
from . import types as t
from .config import (... | roadmapper/ansible | test/lib/ansible_test/_internal/payload.py | Python | gpl-3.0 | 4,544 | [
"Galaxy"
] | 2d9fa4e03bb6ae418d1313b41da8c153502f109b34f444418687908ba8601afd |
#~~~~~~~GLOBAL IMPORTS~~~~~~~#
# Standard library packages import
import csv
# Third party packages import
import pysam
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
class VariantMaker (object):
"""
Class a generating a coverage graph from a dictionnary ... | a-slide/pyDNA | pySamTools/Variant.py | Python | gpl-2.0 | 6,170 | [
"pysam"
] | 2e4dd22b260957076b263a61f573526ec29d993e885ebeea33b0809ec2558c65 |
"""
Logistic Regression Classifier
Implemented as Binary Classifier on Toy dataset
Courtesy https://beckernick.github.io/logistic-regression-from-scratch/
"""
import numpy as np
import matplotlib.pyplot as plt
#Generating Toy data
np.random.seed(12) #RandomState is initialized, can be called again to re-seed the gene... | Subarno/MachineLearningPracticePrograms | logistic_reg.py | Python | gpl-3.0 | 2,883 | [
"Gaussian"
] | 9c5b2f89e4905baa28fa7a966f87503387b16c9c904b204ff2dcffa091a182b6 |
# -*- coding: utf-8 -*-
"""
Contains rudimentary tools for regression: (iteratively) (weighted) least squares
and functions for plotting the fit from the regression analysis.
"""
try:
import numpy as np
except ImportError:
np = None
from ..units import latex_of_unit, is_unitless, to_unitless, unit_of
from ..... | bjodah/aqchem | chempy/util/regression.py | Python | bsd-2-clause | 11,947 | [
"Gaussian"
] | 6414dbcd440b8d83a73203221c05abdb01cda866ffdd613de339f871acae5145 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Range-seperated functionals customization
'''
from pyscf import gto, dft
#
# The RSH functionals predefined in XC functional library
#
mol = gto.M(atom="H; F 1 1.", basis='631g')
mf = dft.RKS(mol)
mf.xc = 'CAMB3LYP'
mf.kernel()
#
# Customize... | sunqm/pyscf | examples/dft/13-rsh_dft.py | Python | apache-2.0 | 1,319 | [
"PySCF"
] | 2c6e3339e108f87769de5463ecc69fcdadbedb9635580e45b93ada503b33b4d6 |
from __future__ import print_function
import gzip
import logging
import os
import random
import re
import tempfile
import time
from os.path import dirname
import pytest
import requests
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from selenium.w... | freedomofpress/securedrop | securedrop/tests/functional/journalist_navigation_steps.py | Python | agpl-3.0 | 51,528 | [
"VisIt"
] | 96dcb68bfb5b042776dd3014de66b3fb2c80b3ee7290d9cf03acc44c3ed61cc5 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import math
import itertools
import logging
import time
from monty.json import MSONable
import numpy as np
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.transformations.transformat... | dongsenfo/pymatgen | pymatgen/transformations/site_transformations.py | Python | mit | 20,884 | [
"pymatgen"
] | 7f425256422be8cc20d325a659707d6c73471a9a34e21d81c04988d273e4c0b9 |
#!/usr/bin/python
# (C) 2013, Markus Wildi, markus.wildi@bluewin.ch
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# Thi... | RTS2/rts2 | scripts/rts2saf/rts2saf/datarun.py | Python | lgpl-3.0 | 5,738 | [
"VisIt"
] | 81033037e9b2bf3c099a90110410d8abf3b61d909fcec7b591af28b7fa82fbf0 |
# The original enum test suite, applied to enum_simple.
import enum_simple as enum
import inspect
import pydoc
import unittest
from collections import OrderedDict
from enum_simple import Enum, IntEnum, EnumMeta, unique
from io import StringIO
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
# for pick... | ze-phyr-us/fastenum | test_enum_simple.py | Python | mit | 56,820 | [
"MOE"
] | f8adc6deb33b3b85422b81745006c15e325f1063c5179bff24b563398f55cf5b |
../../../../../../../share/pyshared/orca/scripts/apps/empathy/script_utilities.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/empathy/script_utilities.py | Python | gpl-3.0 | 81 | [
"ORCA"
] | 4b93fb3484db3d4c4c25c118c6ee8d5b69209dd28f06898f4f3756fdeb732089 |
'''
Created on 15 Oct, 2010
@author: vbarrera
'''
### siq (Sam Index Queries) is an auxiliary module for
### queries made to a Sam Index.
### This module will be the template for object creation and
### related methods.
############################################################
### v1.0 ():
import pysam
import re
... | vbarrera/thesis | Genomic_Evaluation_of_individual_CpG_Methylation/Python/siq.py | Python | gpl-2.0 | 6,953 | [
"pysam"
] | 42520ef969d220c2366eabdf5abb80e181da28f349033ef6b27cfb3d71c7701b |
'''
DISCLAIMER: This code document is for personal use only. Any violation of the Google Terms of Service is not the responsibility of the authors of the document and is performed at your own risk.
...Just so you know, this sort of thing does violate the Google ToS. We (the authors) personally did not use it in produ... | ARDivekar/SearchDistribute | other/Legacy/googlesearch.py | Python | mit | 20,980 | [
"VisIt"
] | c379c7846d162e8a26b27ca780622b81d7f7ab28a127e00010ec6a9883129473 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
==============================================================================
Gaussian Processes classification example: exploiting the probabilistic output
==============================================================================
A two-dimensional regression exerci... | seckcoder/lang-learn | python/sklearn/examples/gaussian_process/plot_gp_probabilistic_classification_after_regression.py | Python | unlicense | 3,514 | [
"Gaussian"
] | 4c38071de1ed0a014ed2d563d74eb51f992b2b74d335ac518ecb11bdec5811e9 |
# -*- coding: utf-8 -*-
"""
Acceptance tests for Video.
"""
import os
from mock import patch
from nose.plugins.attrib import attr
from unittest import skipIf, skip
from ..helpers import UniqueCourseTest, is_youtube_available, YouTubeStubConfig
from ...pages.lms.video.video import VideoPage
from ...pages.lms.tab_nav i... | nttks/edx-platform | common/test/acceptance/tests/video/test_video_module.py | Python | agpl-3.0 | 45,920 | [
"VisIt"
] | e7020096fb40aa8d8c41e4ab271fd4d01d847a0d099ebfe17e6714c8dad0b050 |
#!/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/lo/test/test_orth.py | Python | apache-2.0 | 4,341 | [
"PySCF"
] | bfe30449d0d35fe8c58c95f665e094c2c1fa385dc7e501758aabfc146014b89d |
from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic import ListView,DetailView
from quiz.models import Question,Choice,Player
from django.forms import inlineformset_factory, ModelForm, CheckboxInput, Select
from django.core.urlresolvers import reverse_lazy
from django.view... | bxgj/quiz_pj | pj2/quiz/views_bak.py | Python | gpl-2.0 | 2,986 | [
"VisIt"
] | 243e53a00f95c6cdc836ae9e577b6ba0c6fac4d66e52f606b02b678da3124662 |
# -*- coding: utf-8 -*-
#This code is adaped from
# https://github.com/dfm/corner.py
# git hash 5c2cd63 on May 25
# Modifications by John Baker NASA-GSFC (2016-18)
#Copyright (c) 2013-2016 Daniel Foreman-Mackey
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, a... | JohnGBaker/ptmcmc | python/covar.py | Python | apache-2.0 | 26,348 | [
"Gaussian"
] | 3b1eaae3fdbe1b60acfe9911751c6cf1f3fa54238fec209b15fd65b8d4478864 |
# Color Corrections Functions
import os
import cv2
import numpy as np
from plantcv.plantcv import params
from plantcv.plantcv import outputs
from plantcv.plantcv.roi import circle
from plantcv.plantcv import fatal_error
from plantcv.plantcv._debug import _debug
def get_color_matrix(rgb_img, mask):
"""Calculate t... | danforthcenter/plantcv | plantcv/plantcv/transform/color_correction.py | Python | mit | 33,699 | [
"Gaussian"
] | 295f63e2eb8fda96189b38af620338d0caacd2e8f604550f41d890fcca0047ec |
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #
# (c) 2010... | Chuban/moose | python/chigger/misc/__init__.py | Python | lgpl-2.1 | 1,005 | [
"MOOSE"
] | 7be4b5a4daff3731244876687f8f8790c6ebbf15f1b01f2f42f34aeb37ee1083 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Base classes representing defects.
"""
import logging
import numpy as np
from abc import ABCMeta, abstractmethod
from monty.json import MSONable, MontyDecoder
from functools import lru_cache
from pymatg... | gVallverdu/pymatgen | pymatgen/analysis/defects/core.py | Python | mit | 25,073 | [
"VASP",
"pymatgen"
] | 994556791854ac1dcb26ff04a9f9903dc51dfce9e6f6c64cfcf81fe6e916f766 |
# -*- coding: utf-8 -*-
#
# hl_api_spatial.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License,... | sanjayankur31/nest-simulator | pynest/nest/lib/hl_api_spatial.py | Python | gpl-2.0 | 45,249 | [
"NEURON"
] | 2075af63f755e30accae97ba23edc420df309c81a543b761cd6d760fd5a3bffb |
# encoding: utf-8
import sys
import os
import numpy as np
from mpl_toolkits.basemap import Basemap
from datetime import datetime
import netCDF4 as netCDF
import pyroms
from pyroms.hgrid import *
from pyroms.vgrid import *
from pyroms.grid import *
from pyroms import io
def write_ROMS_grid(grd, visc_factor, diff_fact... | trondkr/romstools | ROMS-bathymetry/writeGrid.py | Python | mit | 6,879 | [
"NetCDF"
] | a7dd1b4ad7d4cbce32c6d9cf3ddd2ac49326f3756ab2b56b8248242343800fde |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANS... | grilo/ansible-1 | lib/ansible/modules/system/lvol.py | Python | gpl-3.0 | 16,640 | [
"Firefly"
] | b3f908204ef52d1647ddac3d75b15e70a4439140ba3bfc2abbc489f03ff3b52d |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | beernarrd/gramps | gramps/plugins/quickview/references.py | Python | gpl-2.0 | 3,494 | [
"Brian"
] | e830facac4d9216ab61421c38b05eb755c03112c8ca8b8d74bdae0234b9d9892 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 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
#... | jH0ward/psi4 | psi4/driver/qcdb/molpro.py | Python | lgpl-3.0 | 14,076 | [
"Psi4"
] | ce0ac31603e4558a04eee7ff900423c0f37f30cc76d74e75093a47fe2e62b853 |
import datetime
import json
import unittest
from unittest.mock import Mock
import pytz
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import Val... | kaedroho/wagtail | wagtail/core/tests/test_page_model.py | Python | bsd-3-clause | 132,173 | [
"MOOSE"
] | d78e6df1e1b6f8af01c820a5c02d348439fcb6d35af6e5450212fcd518caaef5 |
#
# Copyright 2010, 2011 Brian R. D'Urso
#
# This file is part of Python Instrument Control System, also known as Pythics.
#
# Pythics is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | dursobr/Pythics | pythics/instruments/PTS.py | Python | gpl-3.0 | 2,484 | [
"Brian"
] | 24d7aa69562582bf0465d7d611af7fddd5cf3ed4212299aa48c9b407806adcfc |
#encoding: UTF-8
# Copyright (C) 2016 Mauro Palumbo
# This file is distributed under the terms of the # MIT License.
# See the file `License' in the root directory of the present distribution.
"""
A collection of functions for reading different quantities from files.
"""
import numpy as np
#########################... | mauropalumbo75/pyqha | pyqha/read.py | Python | mit | 16,120 | [
"Quantum ESPRESSO"
] | a8a11a7124868be45511ca02ed3c4940c559929099f253d7f5922f44fe874745 |
'''
Created on Apr 5, 2015
@author: sergio
'''
import numpy as np
import ctypes
import numpy.ctypeslib as npct
import matplotlib.pyplot as plt
import psycopg2
import time
import neurodb.neodb.core
from math import e, pow
from scipy.optimize import leastsq
import neurodb
import random
from sklearn.cluster import KMeans... | sergiohr/NeuroDB | test/test_nodos.py | Python | gpl-3.0 | 7,625 | [
"Gaussian"
] | 170913466897dcf3e9dd52053bc9925418951a38550cb27bb71d0f9a92ce97cb |
import sys
import json
from babbisch.analyze import AnalyzingVisitor
from babbisch.utils import ASTCache
cache = ASTCache()
ast = cache[sys.argv[1]]
try:
v = AnalyzingVisitor()
v.visit(ast)
print v.to_json(indent=4)
finally:
cache.save()
| fredreichbier/babbisch | test.py | Python | mit | 257 | [
"VisIt"
] | 8d8050318fedd1b35249a7f6e8ee30857f19a65ae4887e340c50f5081cdca389 |
#!/usr/bin/env python
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
#
# This file is part of Ansible
#
# Modified to support stand-alone Galaxy documentation
# Copyright (c) 2014, Juniper Networks Inc.
# 2014, Rick Sherman
#
# Ansible is free software: you can redistribute it and/or modify
# it under th... | r2600r/ansible-junos-stdlib | docs/ansible2rst.py | Python | apache-2.0 | 5,778 | [
"Galaxy"
] | 96abbc3bab6a2891a7104ed6158360f874225bd58380443ecc37ec952aca8908 |
# -*- coding: utf-8 -*-
from django.http import HttpResponse,HttpResponseRedirect, Http404
from django.shortcuts import get_object_or_404
from django.shortcuts import render_to_response
from django import forms
from django.forms import ModelForm
from django.db.models import Q, F, Avg, Max, Min, Count
from django.utils... | yejia/osl_notebook | social/views.py | Python | mit | 62,150 | [
"VisIt"
] | 7a980fb4d7c294fdc226bd9f89c8f98a3987baba58f8c78075df1aa97722f7fc |
import pytz
import datetime
import pytest
from django.contrib.auth.models import User
from graphapi.tests.utils import populate_db
from profiles.models import Subscription
from openstates.data.models import Bill
from ..models import Notification
from ..utils import utcnow
from ..management.commands.process_subscription... | openstates/openstates.org | profiles/tests/test_process_subscriptions.py | Python | mit | 7,633 | [
"MOOSE"
] | 615412225a5405fafa8bfadc2e3f71b6c7b11b2cd2fe61966d9cf606012017a0 |
#!/usr/bin/env python
#
# $File: selectOffspring.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistr... | BoPeng/simuPOP | docs/selectOffspring.py | Python | gpl-2.0 | 1,684 | [
"VisIt"
] | 3764b77897c54fd92f36ea1560bcf8a5a9acf243e0f859b4f74318cf0fdf9a68 |
#* 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
from TestHa... | nuclear-wizard/moose | python/TestHarness/tests/test_ArbitrarySpecFile.py | Python | lgpl-2.1 | 1,519 | [
"MOOSE"
] | 6604d8d79008d339c00fe243135735cea57eab5596be8a19e59b692ee2fdfba8 |
# Copyright (C) 2019 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 versio... | psci2195/espresso-ffans | testsuite/python/rotational-diffusion-aniso.py | Python | gpl-3.0 | 14,140 | [
"ESPResSo"
] | fbc00a9b92b95f969cca7ed1f4dd0038f895e80ae86742eabc8fc271298781e4 |
from sympy import Add # noqa
import numpy as np
import pytest
from cached_property import cached_property
from conftest import skipif, EVAL # noqa
from devito import (NODE, Eq, Inc, Constant, Function, TimeFunction, SparseTimeFunction, # noqa
Dimension, SubDimension, ConditionalDimension, Defaul... | opesci/devito | tests/test_dse.py | Python | mit | 94,167 | [
"VisIt"
] | 392f5b3113c83a791715f13d92c29a7660d30676efba9eff719a2ce20740b100 |
from __future__ import division
import numpy as np
import paraBEM
from paraBEM.pan2d import doublet_2_0, doublet_2_0_v, source_2_0, source_2_0_v
from paraBEM.vtk_export import VtkWriter
from paraBEM.utils import check_path
p1 = paraBEM.PanelVector2(-1, -10)
p2 = paraBEM.PanelVector2(1, -10)
p3 = paraBEM.PanelVector2(-... | looooo/paraBEM | examples/vtk/heat_simple.py | Python | gpl-3.0 | 2,150 | [
"VTK"
] | 4818725cc8269b243bcd9879a725d30851a43aedcd8bb63339255290aa7a26e6 |
"""
BondConstraints contains classes for all constraints related to bond length
between atoms.
.. inheritance-diagram:: fullrmc.Constraints.BondConstraints
:parts: 1
"""
# standard libraries imports
from __future__ import print_function
import copy, re
# external libraries imports
import numpy as np
# fullrmc im... | bachiraoun/fullrmc | Constraints/BondConstraints.py | Python | agpl-3.0 | 44,804 | [
"DIRAC"
] | 509faec70f483a6258fac2f05a1ac1772cc24ad5c2776a2295790917ace00943 |
# $HeadURL $
''' PolicyCaller
Module used for calling policies. Its class is used for invoking
real policies, based on the policy name.
'''
from DIRAC import S_ERROR
from DIRAC.ResourceStatusSystem.Utilities import Utils
from DIRAC.ResourceStatusSystem.Command import CommandCaller
__RCSID__ = '$Id$'
class Pol... | andresailer/DIRAC | ResourceStatusSystem/PolicySystem/PolicyCaller.py | Python | gpl-3.0 | 2,734 | [
"DIRAC"
] | 9c9f488ff58bce3c6290b128bb19631048f0792f9fcf12e8877e7137d3a96a2b |
# -*- coding: utf-8 -*-
#
# test_siegert_neuron.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the Lic... | alberto-antonietti/nest-simulator | pynest/nest/tests/test_siegert_neuron.py | Python | gpl-2.0 | 4,878 | [
"NEURON"
] | 9c5bb2c0dc82a69e956e3e51543376df8e1e802710586a97b3ad153cdea3d0ee |
import os
import vtkAll as vtk
from shallowCopy import shallowCopy
import shelve
import os.path
def readPolyData(filename, computeNormals=False):
ext = os.path.splitext(filename)[1].lower()
readers = {
'.vtp' : vtk.vtkXMLPolyDataReader,
'.vtk' : vtk.vtkPolyDataReader,
'.pl... | patmarion/director | src/python/director/ioUtils.py | Python | bsd-3-clause | 5,750 | [
"VTK"
] | 567cb4c1c4760f1e66693ba955324943dc2aff07505dd78bb629ed7b9814c062 |
#!/usr/bin/env python
__author__ = 'Mike McCann, Danelle Cline'
'''
Monitor the dods web site for new realtime hotspot or sbdlog data from LRAUVs and use
DAPloaders.py to load new data into the stoqs database.
Mike McCann
MBARI 12 March 2014
'''
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'config.s... | danellecline/stoqs | stoqs/loaders/LakeMichigan/monitorLrauv.py | Python | gpl-3.0 | 23,161 | [
"NetCDF"
] | 15091dfcd05413089703bceaa281cc7f8bc518149aba7af76115231e3286d98d |
# from matplotlib.colors import LogNorm
# import matplotlib.pyplot as plt
# import numpy as np
import pandas as pd
from root_pandas import read_root
import sys
# from itertools import islice
# MY LIBS
import mie_utils as my
file_name = sys.argv[1]
crystal_name = sys.argv[2]
run_number = sys.argv[3]
particle_name = s... | f-forcher/crystal-channeling-analysis | save_as_hdf.py | Python | gpl-3.0 | 2,308 | [
"CRYSTAL"
] | a4968c98422c4270667a55e01190eb8a537b528d8229e67e1b3ee18b0ff3b4d1 |
from collections import deque
from .block import Block
from .dominator import DominatorTreeBuilder
from .env import env
from .ir import *
from .irhelper import reduce_relexp, is_port_method_call
from .type import Type
from .usedef import UseDefDetector
from .utils import remove_except_one, unique
from logging import ge... | ktok07b6/polyphony | polyphony/compiler/cfgopt.py | Python | mit | 22,036 | [
"VisIt"
] | 76389a4317741ae1df82d7cc0fca20c2c7bfa2ea4caa0247b97074cbc56cbe67 |
# Copyright 2017-2020 The GPflow Contributors. 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 appli... | GPflow/GPflow | gpflow/inducing_variables/inducing_variables.py | Python | apache-2.0 | 3,197 | [
"Gaussian"
] | 99b2275f9aa484bc9a3e6fbc3cbd6e95788baa61c4cc0a8f6dad688f3ce680b7 |
from ase import Atoms
from gpaw import GPAW
d = 0.74
a = 6.0
atoms = Atoms('H2',
positions=[(0, 0, 0),
(0, 0, d)],
cell=(a, a, a))
atoms.center()
#calc = GPAW(nbands=2, txt='h2.txt')
calc = GPAW(nbands=1, xc='PBE',gpts=(24, 24, 24), txt='h2_pbe.out')
atoms.set_c... | miroi/open-collection | theoretical_chemistry/software_runs/ase/runs/gpaw-ase/H2_molecule/H2_gpaw.py | Python | mit | 363 | [
"ASE",
"GPAW"
] | 12650fa0318e8c94dd95191dc1fc0b79e6a92bc4c386d3ca4d9bdc3546a4f1f0 |
#!/usr/bin/env python3
import sys
from vaspirin import outcar,procar,projection
from vaspirin import graceIO,datIO
import argparse
################################
## PARSING AND HELLO MESSAGES ##
################################
def positive_int (value):
'''
Type for allowing only positive int values for argparse... | gmsn-ita/vaspirin | scripts/plot_bands.py | Python | gpl-3.0 | 7,830 | [
"VASP"
] | 2c3db4d0d2c88eadd598ac6e2c1dd9d51b67e65a6b5cfeb80c02a0c702314828 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-service-directory | tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py | Python | apache-2.0 | 214,038 | [
"Octopus"
] | 13c51b44c920751a5f1688534f6ef4cf73913b5d2646bb5894172a864b125985 |
""" I wish who wrote this would have put some doc...
"""
import types
import copy
import time
from DIRAC.Core.Utilities import Time, DEncode
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.WorkloadManagementSystem.Client.JobState.JobState import JobState
from DIRAC.WorkloadManagementSystem.Client.JobState.JobMani... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/Client/JobState/CachedJobState.py | Python | gpl-3.0 | 12,666 | [
"DIRAC"
] | ac926f94d541a757017981de99288f5d8b90622911e4b5b9ed2d884bcc994990 |
class Solution:
# @param {integer} n
# @return {integer[]}
def grayCode(self, n):
if n < 1: return [0,]
if n == 1: return [0,1]
pre_bit = 1<<(n-1)
lower = self.grayCode(n-1)
return lower + [(pre_bit|i) for i in reversed(lower)]
def isIsomorphic(self, s, t):
... | saai/codingbitch | Solution.py | Python | mit | 10,342 | [
"VisIt"
] | 953d7be4c5c84942522b2956d0fee20e9f1033552b2e29564822e23e8823d11a |
# Copyright 2019-present, GraphQL Foundation
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from casing import camel, title
from license import C_LICENSE_COMMENT
class Printer(object):
def __init__(self):
pass
def start_file(self)... | graphql/libgraphqlparser | ast/cxx_visitor.py | Python | mit | 1,218 | [
"VisIt"
] | 9cda3240cf68c2889a51efd437fb4bf7beb3ca6675204db83c39b3326c1a4f2c |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | niktre/espressopp | src/storage/DomainDecomposition.py | Python | gpl-3.0 | 3,840 | [
"ESPResSo"
] | 111b303a53abd300b013fa2bd0d1158d26c60c056fdb7879b29eefbd578103b3 |
# proxy module
from __future__ import absolute_import
from mayavi.components.actor2d import *
| enthought/etsproxy | enthought/mayavi/components/actor2d.py | Python | bsd-3-clause | 94 | [
"Mayavi"
] | 98e632c530a8be3cfc42df840daac510e486344e9542988f6838ecb7803c54e3 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/mcscf/addons.py | Python | apache-2.0 | 44,082 | [
"PySCF"
] | 3e2cd15963686f7bbabfc6f15c882fd6cfe68a9b7670d84ca9649c2261855035 |
#!/usr/bin/env python
from __future__ import division
import numpy as np
import argparse
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import asetk.format.cube as cube
import asetk.format.igor as igor
import sys
# Define command line parser
parser = argparse.Ar... | cpignedoli/asetk | scripts/stm.py | Python | mit | 6,898 | [
"Gaussian"
] | 3977abfa4cc254fa7ae6630db462376ebf3230e76713feb820e5c2f93fe9a32e |
import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate... | agry/NGECore2 | scripts/mobiles/yavin4/hooded_crystal_snake.py | Python | lgpl-3.0 | 1,650 | [
"CRYSTAL"
] | 7ec50f9979b529a6ed0b215186dc97eb061c6828e7a71dde1707c012dba420c5 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | mdtraj/mdtraj | mdtraj/utils/delay_import.py | Python | lgpl-2.1 | 6,995 | [
"MDTraj",
"NetCDF",
"OpenMM",
"VisIt"
] | d0499891080672677f6d31ab4b82a8f4058a9c0c36d72fad6926f01e25ef3542 |
import json
import random
import colorbrewer
import itertools
import numpy as np
from astropy.io import fits
from collections import Counter
# Determine the number of unique morphological classes from GZ2 and the number
# of galaxies in each respective class
def collate_classes():
fitsfile = 'gz2class.fits'
... | willettk/gzviz | prep_json.py | Python | gpl-2.0 | 3,453 | [
"Galaxy"
] | 801b05e697215a097a0078deab75552d234573e8f42f997c11554cc830a51e43 |
from catkit.pawprint import Fingerprinter
from catkit.build import surface
from ase.build import bulk
from ase.build import fcc111
from ase.build import add_adsorbate
import unittest
import numpy as np
class TestGenerator(unittest.TestCase):
"""Test features of catkit.pawprint.generator"""
def test_nonlocal_... | jboes/CatKit | catkit/pawprint/tests/test_generator.py | Python | gpl-3.0 | 4,148 | [
"ASE"
] | c86b6b8570c01d2f1ee060514cab10d08c9ab59f8129c612f344f9f18dc0230c |
from __future__ import print_function
import os
from astar import AStar
from utils import resource_root
from random import randint
class Board:
"""
Contains most of the logic for maintaining a board for the A* algorithm game
"""
def __init__(self, width=10, height=10):
self.width = width
... | Deathnerd/SlidingPuzzleAI | a_star_chase/__init__.py | Python | gpl-3.0 | 7,318 | [
"VisIt"
] | 3b9de9474742e41f1b8df33d375f968e93b5a6ccbd6d6baac26d71e034abf653 |
#
# 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 | src/licensedcode/legal.py | Python | apache-2.0 | 2,585 | [
"VisIt"
] | 9c7003bf5c1e677b5a85cb092b729b0c3d779ed74feaae40d39481653e6316cf |
"""Copyright (c) 2010-2012 David Rio Vierra
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA... | DragonQuiz/MCEdit-Unified | mcplatform.py | Python | isc | 16,165 | [
"Jaguar"
] | 28828e95915dc26a3da440f1d1507253058463f6d90dee11db771f2706118e67 |
"""Tests for indenter.py."""
# Author: Prabhu Ramachandran
# License: BSD style
# Copyright (c) 2004-2015, Enthought, Inc.
import unittest
try:
import cStringIO
except ImportError:
import io as cStringIO
from tvtk import indenter
class TestIndent(unittest.TestCase):
def test_basic(self):
"""Sim... | dmsurti/mayavi | tvtk/tests/test_indenter.py | Python | bsd-3-clause | 9,294 | [
"VTK"
] | e539503086b8546cf41fd554fdfc62f1917b6ece55da0b49a4bb07529a7c31cd |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
import re
import pprint
import json
from collections import deque
def _convert_pdf_to_txt(path):
... | YangLiu928/NDP_Projects | Python_Projects/Python_Web_Scraping/historical_committee_assignments/house/106-111/extract_from_pdf_111.py | Python | mit | 6,170 | [
"Brian"
] | 5313804b750915d5a7e9cdd65ce2576ac6f842d404e929e1573e4ad5300556b5 |
"""Leetcode 112. Path Sum
Easy
URL: https://leetcode.com/problems/path-sum/
Given a binary tree and a sum, determine if the tree has a root-to-leaf path
such that adding up all the values along the path equals the given sum.
Note: A leaf is a node with no children.
Example:
Given the below binary tree and sum = 22,... | bowen0701/algorithms_data_structures | lc0112_path_sum.py | Python | bsd-2-clause | 2,939 | [
"VisIt"
] | 43b75a8c0a9d909715a6c8b4a829d815b9c4e30ea135798fbcc102f723ef3b14 |
import numpy as np
from astropy.table import Table
from astropy.io import fits
import matplotlib.pyplot as plt
import matplotlib
import pickle
from TheCannon_2 import dataset,apogee
from TheCannon_2 import model
pkl_file = open('wl.pkl', 'rb')
wl = pickle.load(pkl_file)
pkl_file.close()
# load path
pkl_file = op... | peraktong/Cannon-Experiment | 0228_plot_simultaneously_labels.py | Python | mit | 52,106 | [
"VisIt"
] | 008a8eed001c4a5ed6f402e5322e67eccb72d71503345a5c68c8cd922efe471c |
import csv
import math
import random
# This is an implementation of the Naive Bayes Algorithm.
# The dataset we are using is comprised of 768 observations of medical
# details for Pima Native American patients.
"""
Pima Native American dataset: https://archive.ics.uci.edu/ml/datasets/pima+indians+diabetes
Row schema:... | smacpher/python-ml | pyml/naive_bayes_demo.py | Python | mit | 10,214 | [
"Gaussian"
] | 13b2fa13ea7715dbc2f5cdcad0354da92c135ae4fcc854cd68750a6a7bd35188 |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | BlueBrain/NeuroM | neurom/check/morphology_checks.py | Python | bsd-3-clause | 13,542 | [
"NEURON"
] | b2bc8c96da0e490ef6c24eefc02e1288a0d172d2b31cf5c6890c32eecf502864 |
'''
Artificial Neural Network.
@since: 14/08/2015
@author: oblivion
'''
import random
def print_neuron(neuron):
'''
Print the internal values of a neuron.
:param neuron: The neuron to print from
'''
for weight in neuron.weights:
print(str(weight) + ", ", end="")
print()
class Neuro... | deadbok/ann-flappy-bird-pygame | ann.py | Python | mit | 4,428 | [
"NEURON"
] | fc10a8fdf3d4bede523828043d3704b2973f016a5d85fabf21502795708366aa |
import numpy as np
from netpyne import specs
from netpyne.batch import Batch
''' Example of evolutionary algorithm optimization of a cell using NetPyNE
To run use: mpiexec -np [num_cores] nrniv -mpi batch.py
'''
# ---------------------------------------------------------------------------------------------- #
def ev... | Neurosim-lab/netpyne | examples/evolCell/batch.py | Python | mit | 11,191 | [
"Elk"
] | 56a3b63d1c5ebdd6adfce457f9d83771fdce8a87eca283bfb2a58f456930b912 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.