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 |
|---|---|---|---|---|---|---|---|
########################################################################
# $HeadURL$
########################################################################
""" DIRAC FileCatalog plug-in class to manage dynamic datasets defined by a metadata query
"""
__RCSID__ = "$Id$"
try:
import hashlib
md5 = hashlib
except ... | marcelovilaca/DIRAC | DataManagementSystem/DB/FileCatalogComponents/DatasetManager.py | Python | gpl-3.0 | 24,592 | [
"DIRAC"
] | 626b0409f1182d51ab0454b4b3093d0e2b60647e03c064d692f94fbee4f33366 |
# -*- compile-command: "cd .. ;./kumodd.py -c config/test.yml -d doc|cut -c 1-110"; -*-
__author__ = 'andrsebr@gmail.com (Andres Barreto), rich.murphey@gmail.com'
# Todo
# use the latest last access time.
# windows last mod time is sometimes not preserved.
# For native Google Apps files, kumodd should use the previ... | andresebr/kumodd | modules/gdrive.py | Python | gpl-2.0 | 28,900 | [
"VisIt"
] | 93d1696ff3f9f2fe0d667047679953f2d9eb0b1ed0b8f0fe63b3c2874cda90b3 |
# Alien Blaster
# Demonstrates object interaction
class Player(object):
""" A player in a shooter game. """
def blast(self, enemy):
print("The player blasts an enemy.\n")
enemy.die()
class Alien(object):
""" An alien in a shooter game. """
def die(self):
print("The alien gasps ... | LewisAndClark-CIS/Chapter_9 | alien_blaster.py | Python | unlicense | 700 | [
"BLAST"
] | d3c58c10628f25f9de533ebede1af77cda7a92abb02f317b8bc756f5db7a732f |
import numpy as np
import mdtraj as md
from mdtraj.testing import eq, get_fn
random = np.random.RandomState(0)
def compute_neighbors_reference(traj, cutoff, query_indices, haystack_indices=None):
if haystack_indices is None:
haystack_indices = range(traj.n_atoms)
# explicitly enumerate the pairs of que... | ctk3b/mdtraj | mdtraj/geometry/tests/test_neighbors.py | Python | lgpl-2.1 | 1,851 | [
"MDTraj"
] | 84abaf2424e9d4b360212b46144c9569f4e1431a26682dcb50f5d00bb3eefb3f |
#!/usr/bin/python
#
# Copyright 2014 Google 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | mbrukman/delayed-replay | proxy.py | Python | apache-2.0 | 7,343 | [
"VisIt"
] | 295ebb569ed349b4ebefca22e1e4b21f309dda56a23b2724974dab351ea6e721 |
../../../../share/pyshared/orca/chnames.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/chnames.py | Python | gpl-3.0 | 42 | [
"ORCA"
] | 2a711c8ce6686561d883f9f4b4f0fbd9d81eb92afda0f3d50cbf029080aeabae |
#!/usr/bin/env python
"""Python wrapper for the EPA's PCS API."""
from epa.envirofacts import Envirofacts
from lookup_table import lookup_table
class PCS(Envirofacts):
"""Python wrapper for the GICS API."""
def __init__(self):
super(PCS, self).__init__()
self.lookup_table = lookup_table
... | codeforamerica/epa_python | epa/pcs/pcs.py | Python | bsd-3-clause | 7,356 | [
"VisIt"
] | a10bb24e21000b66600d5c8a1191760d39f9af0f1c98441c809cd44a7592d19a |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest2 as unittest
import os
from pymatgen.analysis.pourbaix.entry import PourbaixEntry, IonEntry, MultiEntry
from pymatgen.analysis.pourbaix.entry import Pou... | aykol/pymatgen | pymatgen/analysis/pourbaix/tests/test_entry.py | Python | mit | 6,040 | [
"pymatgen"
] | 3e0fe8ffad426feff2c22beef6284028b911a23096ebd1fc85111aedff1c77bd |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | robertwb/incubator-beam | sdks/python/apache_beam/runners/interactive/background_caching_job_test.py | Python | apache-2.0 | 13,983 | [
"VisIt"
] | da7bfa3cd9e2a7fc52227e075ff4f0426be26bab6389a18d2ab1c60bd76347af |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libmesh(AutotoolsPackage):
"""The libMesh library provides a framework for the numerical s... | LLNL/spack | var/spack/repos/builtin/packages/libmesh/package.py | Python | lgpl-2.1 | 12,043 | [
"NetCDF",
"VTK"
] | 2b32c67c9378b38ba7083a1a81e028eac88adc281c6eeac1425087e326741225 |
# -*- Python -*-
# Configuration file for the 'lit' test runner.
import os
import sys
import re
import platform
import subprocess
import lit.util
import lit.formats
from lit.llvm import llvm_config
from lit.llvm.subst import FindTool
from lit.llvm.subst import ToolSubst
# name: The name of this test suite.
config.n... | r0mai/metashell | 3rd/templight/llvm/test/lit.cfg.py | Python | gpl-3.0 | 12,043 | [
"cclib"
] | 32892e64f95d6ccec70c08ef00e76e764b092712346de0f2841effda9a89f45e |
# (C) British Crown Copyright 2014 - 2015, 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... | Jozhogg/iris | lib/iris/tests/integration/test_aggregated_cube.py | Python | lgpl-3.0 | 2,248 | [
"NetCDF"
] | 0c2da46dadfc412b1ce9a5f037a263a4707ff1a857f3014ee4f54c55210538d5 |
import warnings
warnings.warn("pymatgen.phasediagram.pdanalyzer has been moved pymatgen.phasediagram.analyzer. This stub "
"will be removed in pymatgen 4.0.", DeprecationWarning)
from .analyzer import * | Bismarrck/pymatgen | pymatgen/phasediagram/pdanalyzer.py | Python | mit | 216 | [
"pymatgen"
] | fb71daabdd7e24b6fe18a4d5e4e88c2f3158edf77436bbb806e7ed115ceac209 |
from matplotlib import pyplot
import random
from datetime import datetime
import pickle
from neuron import h, gui
class Cell(object):
def __init__(self):
self.synlist = []
self.createSections()
self.buildTopology()
self.defineGeometry()
self.defineBiophysics()
self.... | Neurosim-lab/netpyne | doc/source/code/HHCellFile.py | Python | mit | 2,627 | [
"NEURON"
] | a1b25f2b592f3d2f35cb1405d98aebe726200354a42fadc684a1a3620798a11e |
from bestiary.models import Level, GameItem
from data_log import models
from .test_log_views import BaseLogTest
class CairosLogTests(BaseLogTest):
fixtures = ['test_game_items', 'test_levels', 'test_summon_monsters']
def test_dungeon_result(self):
self._do_log('BattleDungeonResult_V2/giants_b10_rune_... | PeteAndersen/swarfarm | data_log/tests/test_dungeon_log.py | Python | apache-2.0 | 11,547 | [
"CRYSTAL"
] | d46dc94aa5a3eecd5e3ca9998a29573014e869fc426ce5f2bcd59f76ef8f188e |
# -*- coding: utf-8 -*-
##
# TRACK 7
# TOO BLUE
# Brian Foo (brianfoo.com)
# This file builds the sequence file for use with ChucK from the data supplied
##
# Library dependancies
import csv
import json
import math
import os
import pprint
import time
# Config
BPM = 100 # Beats per minute, e.g. 60, 75, 100, 120, 150
D... | shawngraham/music-lab-scripts | 07_louisiana/louisiana.py | Python | mit | 11,115 | [
"Brian"
] | c2f4e20668e3f77605fbb1b64c72abf6a8e235f725d0f7b709a5686aff676fb4 |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... | thica/ORCA-Remote | src/ORCA/Fonts.py | Python | gpl-3.0 | 8,459 | [
"ORCA"
] | 1ca78935aa7fcce6f49f243bf55169352021cd1c5cb22d1484dee181132bdd88 |
from __future__ import with_statement
import os
import posixpath
import six
import stat
import re
import uuid
from fnmatch import filter as fnfilter
from fabric.state import output, connections, env
from fabric.utils import warn
from fabric.context_managers import settings
# TODO: use self.sftp.listdir_iter on Para... | mathiasertl/fabric | fabric/sftp.py | Python | bsd-2-clause | 12,870 | [
"VisIt"
] | 053854a8c1d58f0412cfb92be0fd4ff1ac0001e38b65f22ec8d6804c9e5ed3f2 |
"""The potentials built into Asap."""
# encoding: utf-8
__docformat__ = "restructuredtext en"
from asap3.Internal.Builtins import _asap
from asap3.Internal.CheckArray import check_parameter_array, _ChkLJarray
import numpy as np
import ase
import ase.calculators.emt
import ase.data
from copy import copy
import sys
E... | auag92/n2dm | Asap-3.8.4/Python/asap3/Internal/BuiltinPotentials.py | Python | mit | 13,332 | [
"ASE",
"VisIt"
] | 44c2cce0394ccd5f66ada5e3af9b2315c7a55fa5b0c930b0ce69a56e25d3537a |
#!/usr/bin/env python3
#
# Source: https://github.com/monero-project/monero/blob/master/src/mnemonics/english.h
words = tuple("""
abbey
abducts
ability
ablaze
abnormal
abort
abrasive
absorb
abyss
academy
aces
aching
acidic
acoustic
acquire
across
actress
acumen
adapt
addicted
adept
adhesive
adjust
adopt
adrenalin
adul... | mmgen/mmgen | mmgen/wordlist/monero.py | Python | gpl-3.0 | 11,611 | [
"GULP",
"Galaxy"
] | 9c2313f76f35737e2bff8e2374b46a62328e330aab1ac7ae7b401d65adaaca05 |
#!/usr/bin/env python
"""
configure DCommands
"""
import sys
import types
import DIRAC
from DIRAC.Core.Base import Script
from COMDIRAC.Interfaces import DConfig, createMinimalConfig, critical, guessProfilesFromCS
from COMDIRAC.Interfaces import getDNFromProxy
class Params:
def __init__ ( self ):
self.minima... | pigay/COMDIRAC | Interfaces/scripts/dconfig.py | Python | gpl-3.0 | 3,151 | [
"DIRAC"
] | f6f92cadf9394ab0b3bb34d671ac9bcae9f5fd145fc91f4238f258c4e44da865 |
#!/usr/bin/env python3
"""This script is for when "find_best_calibrations fails. Since that script relies upon planewave fitting, this can occur when planewaves cannot be found for a station
for whatever reason. In this case, callibration files are still needed. There are two reasonable options. First is to use the ca... | Bhare8972/LOFAR-LIM | LIM_scripts/examples/find_mostSimilar_calibrations.py | Python | mit | 4,474 | [
"Brian"
] | bd3d79081f3989bdd7e35c8c0a0907e5917929d30b6ce4998b4de3fb4be7f265 |
#
# pow server
#
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import os
import os.path
import sys
from config import config
routes = [
(r'/', LoginHandler),
(r'.*', DispatcherHandler)
]
i... | pythononwheels/pow3 | server.py | Python | apache-2.0 | 1,214 | [
"VisIt"
] | 910cd03a4bed7de97101b9260712eff8fd2fdf9134d52f1c181a3a7b6c20973b |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
import tempfile
import shutil
from ...exceptions import LoginError
from ...eso import Eso
instrument_list = [u'fors1', u'fors2', u'sphere', u'vimos', u'omegacam',
u'hawki', u'isaac', u'naco', u'visir', ... | ceb8/astroquery | astroquery/eso/tests/test_eso_remote.py | Python | bsd-3-clause | 7,947 | [
"Amber",
"ESPResSo"
] | f9d2b428a86ea1c4db22236b7f403f1f2dfb4cf81c107f2d52eb034e0e83d069 |
#!/usr/bin/env python
from active_worker.task import task
import yaml
import matplotlib
matplotlib.use('Agg')
import time
import os
import glob
import numpy as np
from task_types import TaskTypes as tt
import helper_functions
# The simulation runs with values defined in config-file microcircuit.yaml
#
# NOTE: accordin... | jakobj/UP-Tasks | NEST/microcircuit_task/microcircuit_task.py | Python | gpl-2.0 | 13,136 | [
"NEURON"
] | 20f5ab09a837a4b89e6c7cc6ebb3b12e7f163fadddc551aef6dda7654eae668e |
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
import srwl_bl
import srwlib
import srwlpy
import math
import srwl_uti_smp
def set_optics(v=None):
el = []
pp = []
names = ['S0', 'S0_HDM', 'HDM', 'HDM_S1', 'S1', 'S1_S2', 'S2', 'S2_CRL1', 'CRL1', 'CR... | mkeilman/sirepo | tests/template/srw_generate_data/nsls-ii-chx-beamline.py | Python | apache-2.0 | 30,931 | [
"Gaussian"
] | 8eb3a4d53cd46c2e58e583c15332b2ec5322908a156ef11898a80af5f86c0084 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Test context-sensitive Parser registry. """
# not run
from unittest import TestCase
#logging.basicConfig(level=logging.DEBUG)
from module_test import StrongVistingMacro
from sneakylang import *
class VisitedStateClass:
def __init__(self):
self.visited ... | andrejtokarcik/python-sneakylang | sneakylang/test/test_state.py | Python | bsd-3-clause | 655 | [
"VisIt"
] | 1a228da5f135ce05a1e58365587876e75bdf064f15be73662c92bdb6f049035d |
import argparse
import os
import sys
from scm.plams import init, finish, KFReader, Settings, ADFJob, Atom, Molecule
def main():
"""
Main interface that reads the file and retrieve all useful geoms etc.
Then rewrite geometries in a usable formatter_class
Prep all NBO computations
Ru... | chemistry-scripts/computations-scripts | ASM_NBO.py | Python | mit | 11,221 | [
"ADF"
] | ba85cb0b27fe74568d1e337412124ff74f1858856e6332aa8f7bfb9d31b4ac1e |
#!/usr/bin/env python
"""Copyright 2010 Phidgets Inc.
This work is licensed under the Creative Commons Attribution 2.5 Canada License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/
"""
__author__ = 'Adam Stelmack'
__version__ = '2.1.8'
__date__ = 'May 17 2010'
#Basic imports
f... | danielsuo/mobot | src/move/Python/LED-simple.py | Python | mit | 4,114 | [
"VisIt"
] | 31d6a71693bb10deeff8494510a50d3e89312315799c792b7dfb2894a05b9ecc |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | rabipanda/tensorflow | tensorflow/python/ops/gradients_impl.py | Python | apache-2.0 | 40,448 | [
"VisIt"
] | da1bb3ea1e13fdd00a6fc71eb58dedb0d1603a18112ee2136c900605100edfe5 |
"""
Manager and Serializer for histories.
Histories are containers for datasets or dataset collections
created (or copied) by users over the course of an analysis.
"""
from galaxy import exceptions
from galaxy.model import orm
from galaxy.managers import base as manager_base
import galaxy.managers.collections_util
... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/managers/histories.py | Python | gpl-3.0 | 10,668 | [
"Galaxy"
] | d25ac117d69924dd07b773aae90dc38dbdeb7f60996b14298ce92449130a4aee |
import os
import math
from director.consoleapp import ConsoleApp
from director import ioUtils
from director import segmentation
from director import segmentationroutines
from director import applogic
from director import visualization as vis
from director import vtkNumpy as vnp
from director import objectmodel as om
fr... | patmarion/director | src/python/tests/testPlaneSegmentation.py | Python | bsd-3-clause | 8,215 | [
"VTK"
] | 29f969f75403d55df5781f3d7bd84841bf14af153774ab27dc566b5ae255472d |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Satpy developers
#
# This file is part of satpy.
#
# satpy 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 Licens... | pytroll/satpy | satpy/readers/abi_base.py | Python | gpl-3.0 | 10,921 | [
"NetCDF"
] | d482b7ab0eace3c01084bc619324228b29b775d1977e64f82fce712072ed1729 |
from starcluster.clustersetup import ClusterSetup
from starcluster.logger import log
class SystemInstaller(ClusterSetup):
def run(self, nodes, master, user, user_shell, volumes):
for node in nodes:
log.info("Updating the system on %s " % (node.alias))
node.ssh.execute('echo "deb http://archive.canonical.com/u... | meissnert/StarCluster-Plugins | system_config_ubuntu1404.py | Python | mit | 6,210 | [
"pysam"
] | e6d38e66e943d231d91c3e50635730894655361f0b26afd9b6975776c94c56b5 |
"""Support for Z-Wave lights."""
from __future__ import annotations
import logging
from typing import Any
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import ColorComponent, CommandClass
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
... | kennedyshead/home-assistant | homeassistant/components/zwave_js/light.py | Python | apache-2.0 | 15,794 | [
"Amber"
] | 271f8f5a7934eedaa82dc1411a6213fd28c6099b453c7e475b259fb51c4ce0c8 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Sz(CMakePackage):
"""Error-bounded Lossy Compressor for HPC Data"""
homepage = "https... | iulian787/spack | var/spack/repos/builtin/packages/sz/package.py | Python | lgpl-2.1 | 6,273 | [
"NetCDF"
] | 6bae65d6c8186b8da49059e2b7881e75df0425936e6a490efc8d3e8114235bf5 |
# -*- coding: utf-8 -*-
# Copyright 2007-2016 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... | to266/hyperspy | hyperspy/_components/gaussianhf.py | Python | gpl-3.0 | 5,594 | [
"Gaussian"
] | cf6f4c92822b1e3bc862f696f0c68933c06c2a0badf655d8d879a61024e4896f |
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2018 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from pymor.core.base import ImmutableObject
from pymor.vectorarrays.interface import VectorArray
... | pymor/pymor-deal.II | src/pymor_dealii/pymor/gui.py | Python | bsd-2-clause | 1,276 | [
"VTK"
] | c26a6b224783e79d80a36db1f7db20c660aa01b313b8a5c007c537b6be8c6689 |
# 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/climate | examples/taylor_diagram_example.py | Python | apache-2.0 | 6,252 | [
"NetCDF"
] | 029c90ed771296e488066cd38c03cec470b8c7d5dbf5abd242884c617813614b |
"""
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... | lucidfrontier45/scikit-learn | sklearn/mixture/gmm.py | Python | bsd-3-clause | 26,965 | [
"Gaussian"
] | 8fefb47baa1cefe3a0b6044a550f5b8267cf709f97870872bbff91c4087c8a52 |
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
# with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
# long_description = f.read()
setu... | BC7/mp3PCDLer | setup.py | Python | mit | 1,905 | [
"Brian"
] | 1ef9504d658afc9fdfc275565ae032c98d1399080ad26cf82fcbe13fe7102b6b |
# -*- coding: utf-8 -*-
"""
A pure implementation of the Monte Carlo Tree Search (MCTS)
@author: Junxiao Song
"""
import numpy as np
import copy
from operator import itemgetter
def rollout_policy_fn(board):
"""a coarse, fast version of policy_fn used in the rollout phase."""
# rollout randomly
action_pr... | Dryeck/17-18-Reinforcement | AlphaZero/mcts_pure.py | Python | mit | 7,192 | [
"VisIt"
] | 9940c9f63c30bd5aaf461168c13afabca2f7912c015ecc01ab51cf7d3e20f83c |
# coding: utf-8
#
# Copyright 2020 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | brianrodri/oppia | core/platform/cache/redis_cache_services.py | Python | apache-2.0 | 4,278 | [
"VisIt"
] | 8265fbf4a468e72dfb52ca1e7858c9ff96caabb5ff4615558b47015afeb56690 |
# 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... | capoe/espressopp.soap | src/Version.py | Python | gpl-3.0 | 2,380 | [
"ESPResSo"
] | 2beeeea3fdc4ee707f0a7ee2a0083e508f9eed35082c145787de454397c8dc9a |
# Copyright 2017 Google 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | antamb/google-personal-assistant | src/action.py | Python | apache-2.0 | 11,349 | [
"Galaxy"
] | 2569dbe1810f0fe2510fcfe94f200f8715cb2b6b029f096ca34ac84e732f6712 |
from brian import *
import sys
import gc
def morrislecar():
'''
Model equations and initial parameters are taken from Izhikevich, 2004
'''
clear(True)
gc.collect()
reinit_default_clock()
'Tuning parameter'
V_1 = 0*mV
V_2 = 15*mV
V_3 = 10*mV
V_4 = 10*mV
C = 20*ufarad
... | achilleas-k/brian-scripts | morris_lecar/morris_lecar.py | Python | apache-2.0 | 1,415 | [
"Brian"
] | 442e23071bf4e95757356647a25de41f5cc85f06c0a34a3888c8a837466f903f |
# Adapted from ASE https://wiki.fysik.dtu.dk/ase/
#
#
# Copyright (C) 2010, Jesper Friis
# (see accompanying license files for details).
"""
A module for chemlab for simple creation of crystalline structures from
knowledge of the space group.
"""
import numpy as np
from collections import Counter
from .spacegroup ... | chemlab/chemlab | chemlab/core/spacegroup/crystal.py | Python | gpl-3.0 | 7,982 | [
"ASE",
"CRYSTAL"
] | fd61ea9075639c5c9905b08e09bc89e4b1630ab99506c192f766bcf2b3796d76 |
# 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 (t... | apache/allura | ForgeBlog/forgeblog/main.py | Python | apache-2.0 | 24,374 | [
"exciting"
] | 950790169fe3e58075adc9a05b823fa53343ca1cabdd46745503f77b12d073f2 |
"""Axis binary sensor platform tests."""
from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_MOTION,
DOMAIN as BINARY_SENSOR_DOMAIN,
)
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.setup import async_se... | adrienbrault/home-assistant | tests/components/axis/test_binary_sensor.py | Python | apache-2.0 | 2,369 | [
"VMD"
] | ee6ae390be3c8b44765a4fa3e78f896b286bc349d9eef799d9bee1a3d3bd86b7 |
# func.py
# Aaron Taylor
# Moose Abumeeiz
#
# This file contains a many functions that are used throught the game
#
import xml.etree.ElementTree as xml
import os
from Room import *
from Gurdy import *
from Heart import *
from PHD import *
from Pill import *
from Duke import *
alph = "abcdefghijklmnopqrstuvwxyz012345... | ExPHAT/binding-of-isaac | func.py | Python | mit | 7,621 | [
"MOOSE"
] | 3f4a01724e2b5020f285ae0d8baa7c42988a0a5323c8c17a552965f57efb70a8 |
#########
# ps_drone.py
# (w)+(c) J. Philipp de Graaff, www.playsheep.de, drone@playsheep.de, 2012-2015
# Project homepage: www.playsheep.de/drone and https://sourceforge.net/projects/ps-drone/
# Dependencies: a POSIX OS, openCV2 for video-support.
# Base-program of the PS-Drone API: "An open and enhanced API for unive... | caelooney/pennappsf16site | python/ps_drone.py | Python | mit | 97,326 | [
"VisIt"
] | 94269945c9a5e9671bc8b42a26085e9af974ebe3f1af9c501b71f202be4ce6a2 |
import os
import logging
import math
import itertools
from .SubsectorMap2 import GraphicSubsectorMap
from .Galaxy import Galaxy
from PIL import Image, ImageDraw, ImageFont
class DrawArcsTest(GraphicSubsectorMap):
positions = {'A': (0, 0), 'B': (-8, 0), 'C': (-16, 0), 'D': (-24, 0),
'E': (0, -10),... | makhidkarun/traveller_pyroute | PyRoute/DrawArcsTest.py | Python | mit | 7,633 | [
"Galaxy"
] | 9bd17da6ea13b80a0daf475a16ee8ad0e37dcbcd8e3bcd2628a35cf9b574d19d |
###################################################################################
# SNAPSHOT STUFF
###################################################################################
import inspect
import __main__
from param.parameterized import Parameterized, Parameter
# CEBALERT: Can't this stuff move to the P... | ioam/svn-history | topo/misc/snapshots.py | Python | bsd-3-clause | 8,364 | [
"Gaussian"
] | 6929e8ab42da3c65194b4b247798f344ebf1265bed21c09ed72a9928f4f92cc1 |
# Copyright (c) 2020, 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/features/__init__.py | Python | bsd-3-clause | 8,551 | [
"NEURON"
] | 14fb270f8df8070553c7704eea43982796b59f1fa17302876cbf0b7ba7ea61f5 |
#! /usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-wms-jobs-select-output-search
# Author : Vladimir Romanovsky
########################################################################
"""
Retrieve output sandbox for DIRAC Jobs for the given ... | petricm/DIRAC | Interfaces/scripts/dirac-wms-jobs-select-output-search.py | Python | gpl-3.0 | 3,308 | [
"DIRAC"
] | ef354468dcd3ff40b2def84455703066eec3e893a981b54f125dff0bda0cd249 |
# GromacsWrapper: top.py
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
from __future__ import division, absolute_import, print_function
import os.path
import numpy as np
from numpy.testing import asse... | Becksteinlab/GromacsWrapper | tests/fileformats/top/top.py | Python | gpl-3.0 | 8,274 | [
"Gromacs"
] | 8e35c5513eedf564e972beef001698b9d4c80c88babe88b013c9a29c71545eb1 |
# 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... | espressomd/espresso | testsuite/scripts/tutorials/test_constant_pH__interactions.py | Python | gpl-3.0 | 1,372 | [
"ESPResSo"
] | 7380bd7f781844ad946cf1e91bd7c5baad3de6b121353094229b192a0d475dad |
#ryan g coleman, ryangc@mail.med.upenn.edu
#copyright 2006-7 ryan g coleman, kim sharp crystal.med.upenn.edu
#geometric primitives like distance functions and such
import math
def distL2(a,b):
'''no error checking, very fast, should use everywhere'''
sum = 0.
for count in xrange(len(a)):
sum += (b[count]-a[... | ryancoleman/mol2db2 | geometry_basic.py | Python | gpl-2.0 | 11,016 | [
"CRYSTAL"
] | 3f8b4c5eff3f90e3d50d24606b72b6f03cb2f15d8492f34b18c965d29e12be6a |
# -*- 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-logging | tests/unit/gapic/logging_v2/test_logging_service_v2.py | Python | apache-2.0 | 103,201 | [
"Octopus"
] | 96096aad655b4fe5e049d49792dace8ec6dea698f60673043070b2790f1ec01f |
"""Collection of :class:`~chainer.Function` implementations."""
from chainer.functions.activation.clipped_relu import clipped_relu # NOQA
from chainer.functions.activation.clipped_relu import ClippedReLU # NOQA
from chainer.functions.activation.crelu import crelu # NOQA
from chainer.functions.activation.crelu impor... | ysekky/chainer | chainer/functions/__init__.py | Python | mit | 18,382 | [
"Gaussian"
] | 38dd6ccf72c30ebd2cf244a3e35602b440508cc5c7d882861c94a75091498bb1 |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 16 11:57:04 2016
@author: dan
"""
import pandas as pd
import numpy as np
#pd.options.display.precision = 4
class PROTEOMICS(object):
def __init__(self):
self.uni_to_b = {row[48:54]:row[0:5].split(';')[0].strip()
for row in open("..... | dandanvidi/capacity-usage | scripts/load_proteomics.py | Python | mit | 3,798 | [
"Avogadro"
] | 25946cfca796707ee40fdd777a07a9dcdbc50564edbe753f6137d14cf73c4dcc |
from pupynere import netcdf_file
from BADCtf import BADCtf,makeBasicDummy
import unittest, uuid, os
def btf2nc(ncfilename,source_filename=None,badctf=None):
''' Convert a badc text file object to a netcdf file object.
Call by providing an output filename for the netcdf file,
and one of a source ... | cedadev/badctext | BADCtfTools.py | Python | bsd-3-clause | 3,011 | [
"NetCDF"
] | 10e027bb801e85ff786f92748ad1e6ad281774cbe11e32935063183ecc3d1be8 |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 11 12:52:04 2015
Copyright 2015 Nicolo' Navarin
This file is part of scikit-learn-graph.
scikit-learn-graph 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 ... | nickgentoo/scikit-learn-graph | skgraph/tree/tree_kernels_SST_new.py | Python | gpl-3.0 | 23,696 | [
"Gaussian"
] | c6663e1be7575169f69ab9c24c7952edc58051b959933429bf03a880846f137c |
import os
import sys
from subprocess import Popen, PIPE, check_call, check_output
import pprint
import re
import logging
# This script is intended to help copy dynamic libraries used by FreeCAD into
# a Mac application bundle and change dyld commands as appropriate. There are
# two key items that this curren... | usakhelo/FreeCAD | src/Tools/MakeMacBundleRelocatable.py | Python | lgpl-2.1 | 12,844 | [
"VisIt"
] | 50dbaf2e9c153b9ffd0632431b983bf728922ea8bde8d67ca7bc8cb7c966370a |
r"""
Details about the continum and numerical model equations can be found on:
Sadeghi, M. A., Agnaou, M., Barralet, J., & Gostick, J. (2020).
Dispersion modeling in pore networks: A comparison of common pore-scale
models and alternative approaches. Journal of Contaminant Hydrology, 228, 103578.
"""
import openpnm as... | PMEAL/OpenPNM | scripts/example_transient_dispersion.py | Python | mit | 3,078 | [
"ParaView"
] | 0576b46ffa5dd52988d92f6702d2a6ecb53f216713ed9e05a258c88e77e8841a |
#!/usr/bin/env python
#---------------- EDIT JOB NAME -------------------
#$ -N xwat1OPA
#--------------------------------------------------
#$ -S /usr/bin/python
#$ -v PYTHONPATH=/home/oliver/Library/python-lib
#$ -v LD_LIBRARY_PATH=/opt/intel/cmkl/8.0/lib/32:/opt/intel/itc60/slib:/opt/intel/ipp41/ia32_itanium/sharedl... | iwelland/hop | doc/examples/crystalwater.py | Python | lgpl-3.0 | 1,836 | [
"CRYSTAL"
] | caeb50490f57545dfbc458769467de8e34b1f09a2b0e16546a1589a347e4be9e |
#!/usr/bin/env python
########################################################################
# File : dirac-wms-job-get-input
# Author : Stuart Paterson
########################################################################
"""
Retrieve input sandbox for DIRAC Job
Usage:
dirac-wms-job-get-input [options] ...... | yujikato/DIRAC | src/DIRAC/Interfaces/scripts/dirac_wms_job_get_input.py | Python | gpl-3.0 | 1,617 | [
"DIRAC"
] | 352b2156773b5e91639766c13e304b4fbac98b23e1e57cc3a3ce8330095ebc36 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-admin-list-users
# Author : Adrian Casajus
########################################################################
from __future__ import print_function
__RCSID__ = "$Id$"
from DIRAC.Core.Base... | fstagni/DIRAC | Interfaces/scripts/dirac-admin-list-hosts.py | Python | gpl-3.0 | 1,080 | [
"DIRAC"
] | c1ca9b617b6b1f00205fc1cce1b6f06ef6cf5523fd1f0145390cb13467c13e65 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import contract
from .fhirdate import FHIRDate
class ContractTests(unittest.TestCase):
def instantiate_from(self, filename):
... | all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/contract_tests.py | Python | bsd-3-clause | 24,671 | [
"VisIt"
] | ded07cd519edabb0e59e052051fca90a94488ff77ca6af5a3066e50253188c66 |
"""
This module and its submodules contains utilities for running external
processes and interfacing with job managers. This module should contain
functionality shared between Galaxy and the LWR.
"""
from galaxy.util.bunch import Bunch
from .kill import kill_pid
__all__ = [kill_pid, Bunch]
| jmchilton/lwr | lwr/managers/util/__init__.py | Python | apache-2.0 | 293 | [
"Galaxy"
] | a5568cceea1ce979386a8c62294eb7710e717d5cc70daf6c71af6033dacc3639 |
"""
functions for working with optical properties from vasprun.xml
"""
from math import pi, sqrt
import numpy as np # type: ignore
from scipy.constants import physical_constants, speed_of_light # type: ignore
eV_to_recip_cm = 1.0/(physical_constants['Planck constant in eV s'][0]*speed_of_light*1e2)
def matrix_eigv... | bjmorgan/vasppy | vasppy/optics.py | Python | mit | 3,662 | [
"pymatgen"
] | 642e3ab905b8ac3dfe5392e899e10be5cfa8a922b5e17324a22161f95e559e41 |
"""Test systems for OpenMM
"""
from __future__ import print_function
DOCLINES = __doc__.split("\n")
import os
import sys
import shutil
import tempfile
import subprocess
from distutils.ccompiler import new_compiler
from setuptools import setup, Extension
import numpy
try:
from Cython.Distutils import build_ext
... | choderalab/YankTools | setup.py | Python | gpl-2.0 | 1,877 | [
"MDTraj",
"OpenMM"
] | 35cf949cc68a139da82a3a12e9a0777c9310cb8f5360dac308f6ea6aa41f3143 |
# Author: Wei Xue <xuewei4d@gmail.com>
# Thierry Guillemot <thierry.guillemot.work@gmail.com>
# License: BSD 3 clause
import sys
import warnings
import numpy as np
from scipy import stats, linalg
from sklearn.covariance import EmpiricalCovariance
from sklearn.datasets.samples_generator import make_spd_matri... | BiaDarkia/scikit-learn | sklearn/mixture/tests/test_gaussian_mixture.py | Python | bsd-3-clause | 40,201 | [
"Gaussian"
] | 9848bbe23a4c3a5efc8dc91ed8a18e05f21ad96359c43e96ba372a278898a506 |
#! /usr/bin/python
#Done by: Guru
"""
Get Flanking regions.
usage: %prog input out_file size direction region
-l, --cols=N,N,N,N: Columns for chrom, start, end, strand in file
-o, --off=N: Offset
"""
import sys, sets, re, os
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
fro... | dbcls/dbcls-galaxy | tools/new_operations/get_flanks.py | Python | mit | 9,717 | [
"Galaxy"
] | 2a27ed534e2de6bd01eab11eb45f180c6e3bfa7bd30cad35dfd8cbfdbd1b9c3a |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
"""
Functions and classes in this module should be used for datasets organized as trees.
Valid node order i... | sharkdata/sharkdata | sharkdata_core/datasets/dataset_tree.py | Python | mit | 12,423 | [
"VisIt"
] | 4e1a9e0e9b4d88b6ca6ccf52c7977ac0a5a57fe883ea1fa28455d905d3428235 |
# (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.
#
# This program is distr... | RTS2/rts2 | scripts/rts2saf/unittest/test_fitfunction.py | Python | lgpl-3.0 | 3,365 | [
"VisIt"
] | fa12ec0da50954d39138bc1ade682847ec5afb81763e6f0f69cc482bcf9bba4c |
"""
Test the output of targeted scaling - by calling the scale_against_target
scaling_library function and by directly invoking the perform method scaling
of a TargetScaler.
"""
from __future__ import annotations
from math import log
import pytest
from dxtbx.model import Crystal, Experiment, ExperimentList
from lib... | dials/dials | tests/algorithms/scaling/test_targetscaler.py | Python | bsd-3-clause | 5,609 | [
"CRYSTAL"
] | 8781cef184f2054e6acd1d91ab48b90af5375fd8c41ffdbd3e884b6833cc5bc7 |
# A Regression Digression
##########################
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.tokenize.casual import casual_tokenize
from nlpia.data.loaders import get_data
sms = get_data('sms-spam')
tfidf = TfidfVectorizer(tokenizer=casual_tokenize)
tfidf_docs = tfid... | totalgood/nlpia | src/nlpia/book/examples/ch05_regression_digression.py | Python | mit | 4,707 | [
"NEURON"
] | b009ede534d870dad4ea5c9ad9a9d389e77d1bc31701d4e112819d5070b392ea |
# 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/057_DLbyABr_04b-Hands-On-MNIST-CNN.py | Python | unlicense | 6,294 | [
"NEURON"
] | 6f552bdc1e6e92c2d70565b8151ada56912dd46c076ef334f4088c9c9ec4ece5 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | lhfei/spark-in-action | spark-3.x/src/main/python/ml/gaussian_mixture_example.py | Python | apache-2.0 | 1,530 | [
"Gaussian"
] | a34c38afe57124b51bfa9992b0b8c1f3ea1285d4864fbf94ed6404d94a75d994 |
# Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com>
__revision__ = "$Id: models.py 28 2009-10-22 15:03:02Z jarek.zgoda $"
import datetime
import secrets
from base64 import b32encode
from typing import List, Mapping, Optional, Union
from urllib.parse import urljoin
from django.conf import settings
from django.c... | eeshangarg/zulip | confirmation/models.py | Python | apache-2.0 | 8,608 | [
"VisIt"
] | e8405d2ce6d1b6526c6aecb340ef24f734b47f44b139b68b1a8d7a20dd556560 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2018, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
# from ..numerical import fac, fac2, dfac21, _CFunction, _SFunction
#
#
# class TestNumerical(TestCase):
# def setUp(self):
# self.ns = range(-2, 10)
#
# def test_fa... | alexvmarch/atomic | exatomic/algorithms/tests/test_numerical.py | Python | apache-2.0 | 2,021 | [
"Gaussian"
] | e2702037039b300751c13e7d38f086dd16ca8211ebd52ea104f8826daa6da38b |
# -*- coding: utf-8 -*-
# This file is part of wger Workout Manager.
#
# wger Workout Manager 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 the License, or
# (at your option) any ... | petervanderdoes/wger | wger/settings_global.py | Python | agpl-3.0 | 10,295 | [
"VisIt"
] | b205d829372960d026ea6d29a1bbf512d406f2b709cabc1ad417a9e24000e8be |
# $Id$
#
# Copyright (C) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code for graph-theoret... | rdkit/rdkit-orig | rdkit/Chem/UnitTestGraphDescriptors.2.py | Python | bsd-3-clause | 24,543 | [
"MOE",
"RDKit"
] | ffeff7bc1f3ee9ea29815b95f085e68d39ab3b7971692b63b67929699f65e954 |
from django import forms
from django.contrib.admin.widgets import AdminRadioSelect, AdminRadioFieldRenderer
from ..choices import VISIT_REASON
from ..models import InfantVisit
from edc.base.form.forms import BaseModelForm
class InfantVisitForm (BaseModelForm):
"""Based on model maternal_visit.
Attributes ... | botswana-harvard/edc-bhp074 | bhp074/apps/eit_infant/forms/infant_visit_form.py | Python | gpl-2.0 | 1,165 | [
"VisIt"
] | 7693653724c80d2ca531e1af70b6209870057f0fe319333d00a89ee4377e4240 |
from os import makedirs
from os.path import join, dirname, exists
from string import Template
from galaxy.util.bunch import Bunch
from galaxy.objectstore import build_object_store_from_config
from .test_utils import TempDirectoryTestCase
from .test_objectstore import MockDataset
class LwrObjectStoreTest(TempDirector... | jmchilton/lwr | test/lwr_objectstore_test.py | Python | apache-2.0 | 5,126 | [
"Galaxy"
] | bea46300ede8765f9c6700d17767c8aa7fb26c08e9deb3ae9d300f8f95720c43 |
# coding=utf8
#
# Copyright 2013 Dreamlab Onet.pl
#
# 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;
# version 3.0.
# This library is distributed in the hope that it will be useful,
# bu... | tikan/rmock | tests/func_tests/test_spec.py | Python | lgpl-3.0 | 3,289 | [
"VisIt"
] | 6a2afd3bce8d123c080680e98185b982589c1ada6dfb6a53cf04f535eaa0da64 |
#!/usr/local/bin/python3
# ---------------------------------------------------------------------------------------------------------------------
#
# Bioinformatics Research Group
# http://biorg.cis.fiu.edu/
# ... | camilo-v/Neural-Networks | single-layer-networks/adaline/adaline.py | Python | gpl-3.0 | 4,336 | [
"NEURON"
] | a77610c9ef5196ac9c63a46c243826d4c98bd7eeadc7d07017ea4e9d1cae78d2 |
#!/usr/bin/env python2
"""
Copyright (c) 2012 Dennis Bliefernicht
mc-enchantment-probabilities 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 ve... | TriPhoenix/mc-enchantment-probabilities | enchantingprobs.py | Python | gpl-3.0 | 17,162 | [
"BLAST"
] | e5989ce6ba2dd4556792db1608ec5ea9963a77abcd343d4fbd7b878732105536 |
#!/usr/bin/env python
# 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
# "Li... | cwelton/incubator-hawq | tools/bin/gpload.py | Python | apache-2.0 | 95,521 | [
"ADF"
] | 9451a1f7d73250e4169fd65e7388e163fe7a2f2bca9b113ca6ce43e5222e590e |
# -*- coding: utf-8 -*-
#
## we set up default information.
## first, easy to maintain lists which can eventually be moved to
## files.
# TRANSLATOR WARNING: DO NOT TRANSLATE THE FIELD NAMES: ONLY THE VALUES!!!
fields={'cuisine': ['English','Scottish','Welsh','Irish','American',
'Italian','French'... | Lamecarlate/gourmet | gourmet/defaults/defaults_en_GB.py | Python | gpl-2.0 | 35,055 | [
"Octopus"
] | 5f7a0a0bd819c8e4e349799fc7121511142268154f7045ed163b6a2065733b80 |
# $HeadURL$
""" Collection of DIRAC useful adler32 related tools.
By default on Error they return None.
.. warning::
On error False is returned.
.. warning::
All exceptions report to the stdout.
"""
__RCSID__ = "$Id$"
import types
from zlib import adler32
def intAdlerToHex(intAdler):
"""... | Sbalbp/DIRAC | Core/Utilities/Adler.py | Python | gpl-3.0 | 2,982 | [
"DIRAC"
] | d76de46c67394fcaf96b70aa8fc3c70ad379765797ef6decc5f7909b9afba862 |
"""A simple configuration system.
Inheritance diagram:
.. inheritance-diagram:: IPython.config.loader
:parts: 3
Authors
-------
* Brian Granger
* Fernando Perez
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
#... | Carreau/IPConfigurable | IPConfigurable/loader.py | Python | bsd-3-clause | 7,562 | [
"Brian"
] | 3d7b016fb07e718c7bc09eae9387996dd7f0e90dd41255f500f756c910e32ef4 |
#!/usr/bin/env python
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
def expected():
ini = 1.0
res = 0.5
lim = 1E-5
lo2 = 0.5 * lim
alpha = (ini - res) / 4.0 / lo2**3
beta = -3.0 * alpha * lo2**2
data = [i*1E-5/100 for i in range(100)]
data = [(x, alpha * (x - ... | yipenggao/moose | modules/tensor_mechanics/test/tests/tensile/small_deform_hard3.py | Python | lgpl-2.1 | 977 | [
"MOOSE"
] | 0d0a94ef724a182e3c999d69f718734f1109eee6f8ca2cc610972bbf3244a97d |
# 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
#
# Unless required by appl... | sunqm/pyscf | pyscf/pbc/df/test/test_df.py | Python | apache-2.0 | 6,591 | [
"PySCF"
] | 514d9690b826f2cf290cc0a2849eac23e3e11f8e532cd569412595c1c1527924 |
'''
Created on 2013-05-27
@author: brian
'''
class Cast(object):
def __init__(self, actor):
self.actor = actor
def condition(self):
result = self.actor.getAction()
if result is None:
return False
self.actor.action = result
return True
def do(self):
pass
| Greymerk/python-rpg | src/ai/task/cast.py | Python | gpl-3.0 | 288 | [
"Brian"
] | 9c89435d9dae57c8e676ef6197c90eb31e69dcc4dfc37a9a0ad76d09b5d09d91 |
# -*- coding: utf-8 -*-
"""
Clustering the input samples into genotypes uses Gaussian mixture modes.
"""
import time
from itertools import chain
from collections import Counter
import click
import numpy as np
import pandas as pd
from multiprocessing import Pool
from sklearn.mixture import BayesianGaussianMixture
from ... | JiangYuLab/CNVcaller | Genotype.py | Python | gpl-3.0 | 9,077 | [
"Gaussian"
] | 2e33ee6a2282920e3e9588b205acff5628328bb532be2b5b5f36799a04e98c8e |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
PROG_VERSION = "Time-stamp: <2022-01-24 12:38:12 vk>"
# TODO:
# - fix parts marked with «FIXXME»
# - move global variables to parameter lists, avoiding global variables in general
# - $HOME/.config/ with default options (e.g., geeqie)
# - using clint/resource
# - if n... | novoid/filetags | filetags/__init__.py | Python | gpl-3.0 | 128,037 | [
"VisIt"
] | ee6741e7f35e2db9c5a89529855d76fcba552d7db0de770b652a3cd998102d81 |
# Copyright (C) 2010 Google 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ychen820/microblog | y/google-cloud-sdk/platform/google_appengine/lib/google-api-python-client/oauth2client/tools.py | Python | bsd-3-clause | 4,990 | [
"VisIt"
] | 9a1d6126f1b4bf0c588a44d4f1a9b300a355693e0a3ea7daa2001992d534206a |
# -*- coding: utf-8 -*-
"""Fake data generator.
To use:
1. Install fake-factory.
pip install fake-factory
2. Create your OSF user account
3. Run the script, passing in your username (email).
::
python -m scripts.create_fakes --user fred@cos.io
This will create 3 fake public projects, each with 3 fake con... | TomBaxter/osf.io | scripts/create_fakes.py | Python | apache-2.0 | 19,780 | [
"Galaxy"
] | 58f1f7091c6799575e40bb2488ac3658ca254634210496586703a0bed7f05f8d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.